Windows 8 & Phone 8 UG August Meeting

August 29, 2012

Last evening we had a User Group meeting in Microsoft Offices in Ra’anana, with a lot of activity and fun. Thank you all for participating!In the first part, we discussed the Windows 8 Store from various angles, end user and developer.In the second part, we discussed Windows Phone 7.x and the upcoming 8, along with other sporadic topics - C++, WinRT, DirectX, COM, XNA, XAML… it was fun! And don’t forget the giveaways!Just as a gentle reminder, out next meeting is on September 13th, where we’ll have an interesting session on “Metro” User Experience and User Interface from an...

Can Windows 8 Apps Share Memory?

August 21, 2012

Windows 8 Applications (formerly Metro) run inside a sandbox, making communicating with other application difficult at best. There is no easy way to do it, and for good reason, too. When one app is running, all other may be suspended, so what’s the point of communicating anyway? Furthermore, there is no guarantee that the other app even exists on the machine.Still, suppose we wanted to share some information (I’m not talking about the standard share contract) via (say) shared memory. Can we achieve that?Flipping to the documentation of the CreateFileMapping Win32 API shows that unfortunately this is only available...

Console Calculator with Roslyn (Part 2)

August 8, 2012

In the first part we created a simple enough calculator, but it lacked two features I wanted to have:1. work with degrees or radians in trigonometric functions.2. allow simple variables to be used without first declaring them.Let’s see how we can implement these features, starting with the first.Trigonometric functions work in radians, which is sometimes inconvenient.What we need is a way to change the parameter to the trigonometric functions by multiplying it by PI/180 if degrees was requested.First, we’ll create a simple state managing class for the calculator with just one property: class CalculatorOptions {     public...
no comments

Console Calculator with Roslyn (Part 1)

August 6, 2012

A while back I create a Console Calculator project (on CodePlex) that used manual expression parsing to “understand” a mathematical expression and resolve it. As parsing was involved, this wasn’t a trivial undertaking. What about implementing something similar with Roslyn?Roslyn is Microsoft’s “Compiler as a Service” initiative, now in its second CTP. It provides a powerful framework for examining and manipulating code (among other services). Roslyn can be installed on VS 2010 SP1 or VS 2012 RC. Let’s create our simple calculator.Fist, install Roslyn. Next, open Visual Studio 2010 or 2012 and create a new Roslyn Console project (snapshot...
no comments