Archive for March, 2006
Extensible languages
Tuesday, March 28th, 2006 | Academe | No Comments
Yesterday I attended a colloquium where Erik van Wyk from University of Minnesota spoke on techniques and tools for making extensible languages. Now extensible language may sound like a strange concept, but it is a fairly simple idea that lies at heart of this: I want to add this new construct to my language because it may simplify my work
. Now that’s a pretty basic motivation for us to do some work, so we don’t have to do so much work.
van Wyk et al. have developed something called Silver that allows them to specify these extensions using attribute grammars, which is a context-free grammar that has been extended with attributes, semantic rules and conditions. He described how they use forwarding in the attribute grammars to get modularity through refinement of the functionality of the extension.
What this means is that at the core level you could write an extension, say to introduce SQL statements directly in your language, you could introduce using connection select name, address from customers where balance > `balance and have it automatically converted to connection.Execute("select name, address from customers where balance > " + balance). This means at the core level your extension is nothing but a macro in the pre-processing sense.
Given your extension at the core level any error reporting, for instance is forwarded, is forwarded to your generated code. This is where the extension refinement comes in, because if you define the appropriate error reporting extensions to your module you could return better errors. And their framework builds further onto this, also making syntax- and control-flow analysis available using two temporal logics, CTL and LTL-FV. You can read more about temporal logics in Logic in Computer Science by Huth and Ryan.
Everything cannot be bliss, however, as this thing requires that the host language is written with these extensions in mind – that is, it has been written in Silver. van Wyk’s team is working on both a C and Java implementation, but given the sizes of in particular Java, it probably isn’t realistic that they’ll get a full model of Java for this. Another problem is, of course, that writing a full-fledged extension requires the programmer to know about attribute grammars, forwarding, temporal logic and a lot of other nitty gritty things. So, get ready to hire me or someone like me.
On a more realistic note I think the ramifications of having support for this in a language are huge as you can customise your language on the basis of your needs very easily. But I don’t think it will be feasible until the day that these extensions become easier to write. Until then I’m afraid it will remain an academic exercise, but here’s to hoping.
Presenting for the academe, and miscellaneous thoughts
Sunday, March 26th, 2006 | Academe, Personal | No Comments
I think I need to work on posting more often than once or twice a month at best. A list of thoughts to post about would probably come in handy if I wasn’t so prone to misplace my lists of things to do. Alas.
One of my courses at DIKU has been on scripting- and domain specific languages, in particular how we can use them to solve recurring problems, when we develop them, and a long range of presentations on different languages and the problems they try to solve. This course is (/was) a seminar course, which means that students are meant to participate in the lecturing by giving one or more presentations. For this course we are (/were) meant to give two presentations each.
The last paragraph was, of course, the world’s best thought-out foreshadowing of getting to the point where I talk about what I talked about. Catchy, right?
My first presentation, and in my opinion the better rehearsed of the two, was on using the .NET framework as a platform for embedding scripting languages and creating domain specific languages for web-based pipelines. The .NET framework is indeed superb for doing these things, but not superb in the way that C is superb for it, nay, superb in the way that everything is easy and doesn’t require a lot of code. But if you do not believe me, you can look at the slides for yourself.
The second presentation was on domain specific languages for specifying illustrations. Now many people may ask why on Earth we would need something like that, when we can just draw stuff in Adobe Illustrator or equivalent. However, Illustrator does not lend itself kindly to automatically (meaning programatically) generating large-scale visualisations of systems. We could, for instance, visualise the internet using a program. We could visualise the order of page visits made by website visitors, and many other things. One of my great interests is typography and keeping fonts consistent between documents and illustrations and whatnot, but the presentation only touched briefly on this. In the presentation I discussed GraphViz, METAPOST and TikZ/PGF. The slides are available here.
This brings me to the second part (or third, depending on how you count) of this post: reactions. I have been teaching in different contexts over the past decade (God is it that long already). I have taught high school students maths, I have tutored grade school pupils in maths, I have given lectures on error handling methodologies for corporations, I have taught employees advanced/new programming methodologies in corporations, but this was my first real, terrifying encounter with presenting for the academe. But presenting here is different.
Where have you performed?
Murray asked me from behind a copy of Variety. Well, I don’t perform, exactly,
I answered, but I have spoken at synagogues, and I lecture from time to time at colleges and universities.
Universities?
Murray sputtered. Did he say universities? Worst audience in the world. I spoke at a university once. They invited me to speak about the hotel industry. Believe me, I’ve got a pretty good routine on this; I’ve used it many times before, and I know where I’m supposed to get reactions: chuckles, laughs, applause. Son of a bitch, I stand up there and it’s a grim audience! All these young people in jeans and sneakers. I open it up for questions. These bastards are dead serious -they’re taking notes! I realized later, they weren’t an audience, they were students. They take notes and get grades. They’re not there to laugh. Who wants to perform for an audience like that?
Outwitting History
Lansky does portray the situation fairly well, except there isn’t a lot of taking notes in this course. Reflecting on it, however, I can see how right he is. We hardly ever react to any of the witticisms, puns or great revelations. We just sit there and try to embrace it all, catalogue it, connect it to existing material and just not fall behind in keeping up with the new information that is presented. We simply do not have time to pick up the small off-remarks that are meant to liven up the crowd. But God it’s frustrating when you’re the speaker as you haven’t got the vaguest inkling of whether the crowd is bored witless of what you’re saying, or whether it’s the coolest thing they’ve heard of since sliced bread. I have since received word from a couple of people that at least parts of my presentations were interesting, so that is something, at least.
There are, however, a few pointers I’d like to share with other people who are going to be presenting to the academe. Not so much pointers that I give because I have now done presenting to this particular crowd, but pointers that I have come to understand as part of listening to presentations daily for almost seven years in this world. The points are fairly simple: know your material, know it really well, rehearse before you speak, and rehearse multiple times before you speak, and lastly, make sure that your slides support your talk. Your slides should not be your talk. It is not interesting to have slides read aloud to you. Dazzle us with your message, use slides to underline your points, illustrate the key topics. If you wish to learn more about good presentation methods, I will warmly recommend Garr Reynold’s blog on professional presentation design: Presentation Zen. He has a lot of interesting ideas, but I believe a lot of them a better suited for product pitches, broad overviews and the like. Presenting a programming language will need more stuff on the slide, but there are still things to be learned. If you look at my slides you will see that I in particular do not honour his No more bullet points
mantra. I happen to like a small number of bullet points to underline my message. But like humans then no two presentations are created alike.
Before I get overly philosophical, let us derail the discussion to the third (or fourth) and last part of my post: cool gadgets for doing presentations. If you’ve stuck with me this far then I will present to you: Trust Wireless Presenter TK-3300p.
The presenter functions as a wireless trackball mouse with dedicated buttons for page up and page down and it comes with a nifty red laser pointer. I used it for my second presentation and the flow of the presentation became a lot better than when I had to walk back and forth between the computer to change slides. The Trust presenter is fairly inexpensive, so even if you only have a small number of presentations each year, I will warmly recommend it as it makes your presentation just that much more well-connected, and it gives a better impression on your audience. Plus, of course, you aren’t interrupted every time you have to move to the computer. And, of course, it still has the cool gadget factor. The presenter is placed next to my Creative MuVo memory stick so you can compare size. The presenter is placed very nicely in your hand and it contains a left mouse button underneath that is operated with your index finger. The three top buttons can be a bit tricky to get right all the time, but with a bit of practice it is fairly easy. Alright, enough product placement and endorsement for one post, and back to my paper for me. More on that in a later post (I hope).
When the sprites go adventuring
Sunday, March 5th, 2006 | Personal | No Comments
Today started like any day: get up, go online (not necessarily strictly in that order), start working on school stuff (yes, even though it’s sunday and everything). However, peace, prosperity and focus didn’t last long as Rubin had the benevolent idea to introduce me to Kid Radd, the not-entirely-sprite comic. Very nice story and a humourous idea in the first place. Of course it probably helps if you did play these kind of games back in the day. So thanks, Rubin, for “wasting” my entire day on another webcomic.
Categories
Archives
- November 2009
- October 2009
- June 2009
- May 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- December 2006
- November 2006
- October 2006
- September 2006
- June 2006
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- May 2005
- April 2005
- March 2005
- February 2005
- January 2005
- December 2004
- June 2004
- April 2004
- February 2004
- November 2003
- January 2003
- November 2002