- As predicted, the XNA guys had a bunch of news to announce at GDC. They launched the XNA Creators Club Online with samples, forums and a new starter kit. Also they announced some cool partnerships for Creators Club Premium members (aka the folks who paid $99 a year to be able to run code on their Xbox 360) including access to the highly anticipated Torque X Engine.
- From Don Syme, we here that the new 1.9 version of F# is almost ready. When I shifted from learning F# to learning PowerShell, it wasn’t because of a sudden lack of interest in F#, so I’m glad to see them still chugging along. And by the time they release 2.0 later this year, I hope to have learned enough PowerShell that I can spend some time focusing on learning F#.
- Apparently Jenny Lam at Microsoft reviewed more than 10,000 images to pick the new Vista Wallpapers. Not sure if I would love or hate that job. But some that didn’t make the cut are available online. (via DotNetKicks)
- Tomas Restrepo reviews a number of lightweight, syntax-highlighting text editors. Personally, I like Notepad2, but as Tomas mentions there’s no way to save your settings. Also, there’s no way to add new syntax highlighting without recompiling it. For example, Wesner Moise compiled a version that added Ruby syntax. I really want a version that that supports PowerShell. Maybe it’s time to give Notepad++ a closer look
- Dale has some new SOAhlocis Anonymous shirts available.
- Jeff Atwood discovers that the French acronym for object oriented programming is POO.
Morning Coffee 38
Morning Coffee 15
- I was checking out the ASP.NET community site, and I noticed a small “Microsoft Communities” toolbar across the top. There’s a little menu that links to other MS community sites like Channel 9 and MSDN Blogs. I’m surprised the NetFx3 community site isn’t included.
- My teammate Dale is blogging about Proper SOA. He lays out 6 Proper SOA principles, and then drills into the first three: meets business needs, requires governance and responds to changing business drivers. I expect to see posts on the remaining principles this week. Maybe Dale should turn this series into an article.
- Speaking of articles about architecture, Architecture Journal 10 is online as a PDF. This issue’s topic is Composite Applications.
- Malbolge
is a programming lanugage that is “specifically designed to be
difficult to program in.” Here’s Hello
World in Malbolge:
(=<`$9]7<5YXz7wT.3,+O/o'K%$H"'~D|#z@b=`{^Lx8%$Xmrkpohm-kNi;gsedcba`_^][ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543s+O<olm
Seriously. Actually, it’s worse than it looks. The effect of any instruction depends on where it is located in memory. Malbolge is so difficult, it took a month to write a Lisp program to generate that program. However, Lou Scheffer thinks we should think about Malbolge as a cryptosystem. I wonder if it could be used for obfuscation? (via Good Math, Bad Math) - Nat Torkington blogs about teaching kids to program. He makes the point about “them to think in terms of small steps”. I was lucky to have a computer teacher in elementary school who did something similar. She had us write down instructions for making a peanut butter and jelly sandwich and she then followed them to the letter. For example, if you wrote, “spread peanut butter on the bread” with out first instructing her to take out a slice, she’d happily spread peanut butter on the entire loaf. (via reddit)
- To this day, my wife thinks the peanut butter and jelly lesson negatively affected my ability to communicate with “normal” people. She’ll even say “peanut butter and jelly” when she thinks I’m being particularly obtuse in my communication.
Managed Lex and Yacc
Buried deep in the docs for v3 of the Visual Studio SDK is something called the Managed Babel System. Babel – in the context of Visual Studio – is the framework for creating language services for stuff like syntax highlighting, brace matching, and IntelliSense completion. As part of the Managed version of Babel, the VS SDK includes the Managed Package Lex Scanner Generator (MPLEX) and the Managed Package Parser Generator (MPPG). Online docs are pretty thin, but there are a few white papers in the additional documentation of the VS SDK install.
Interestingly enough, the white papers were written by John Gough of QUT’s Programming Languages and Systems group. John wrote Compiling for the .NET Common Language Runtime and PLAS has several interesting language projects including Metaphor and Ruby.NET. As you might expect for a group that focuses on languages on .NET, they have a managed version of YACC called GPPG available and John said at Lang.NET that they would be releasing a managed version of LEX “soon”. I’m thinking that QUT’s GPPG/GPLEX combo has been absorbed into the VS SDK and renamed MPPG/MPLEX. Unfortunately, my laptop power connector is broken, so I can’t verify this until Monday.
It’s not a Rosetta stone and the lex/yacc model is getting pretty long in the tooth, but I’m thinking at least Larry O’Brien will be interested in these tools.
Update: Apparently, this is somewhat old news, as per Aaron Marten:
The tools we’re including are called MPPG & MPLex (which stand for Managed Package Parser Generator and Managed Package Lexer). They are derivative works from the open-source GPPG/GPLex tools developed at the Queensland University of Technology.
[Managed Language Tools in Visual Studio 2005 SDK]
Python and DSLs
When I read Larry O’Brien’s post IronPython as a Foundation for DSLs, I had a strong sense of deja-vu. I went thru a very similar thought process when I discovered the early versions of IronPython were written in Python. I figured that meant Python must have some support that makes building compilers easier. Unfortunately, that doesn’t turn out to be the case. Python provides a standard module called parser which “provides an interface to Python’s internal parser”. That means that compiling Python is easy, but there’s no support for compiling any language other than Python.
I’ve been doing a little experimenting in this space. First, as I’ve written before, I’ve been playing with parsing expression grammars. Second, I want to take a close look at Metaphor from QUT:
Metaphor is a programming language with support for type-safe run-time code generation — a form of meta-programming. Metaphor is based on a subset of C# or Java and combines the imperative, object-oriented nature of these languages with the multi-stage programming constructs from MetaOCaml. Metaphor uses the static type system of multi-stage languages to achieve compile-time safety of run-time generated code…
Metaphor is implemented as a compiler on the Microsoft CLR.
Finally, I need to take a closer look at ANTLR. Don’t know how I missed it, but I had never seen ANTLRWorks until Larry linked to it.
Language Features I Wish C# Had – Symbols
Ruby’s symbols are often talked about in terms of efficiency – taking up less memory and executing faster. While these are both laudable goals, symbols are more than just performance improvers. The ability to name things is valuable semantically. Take a look thru p&p’s Composite UI AppBlock and you’ll see strings used as names for things all over the place. It’s great for loose coupling, you see. But how do you tell the difference between a string used as a name and a string used for some other reason like user input? You can’t.
Rails makes extensive use of symbols – anyone who has Rolled on Rails has seen “scaffold :recipe”. That’s just the tip of the iceberg. Rails uses symbols extensively across both ActionPack and ActiveRecord (and probably others I’m not familiar with). It’s a great approach, but one that’s unique to Ruby as far as I’m aware.