Thursday, March 23, 2006

ajaxLaunch? Eh.

You know what? I was writing a really scathing review of Michael Robertson's ajaxLaunch and its first application, ajaxWrite.

I was going to lament how he started off with a really cool premise, gotten my hopes up for a cross-platform Steam-like content distribution system, but then failed me with a lackluster AJAX application that only worked in Firefox, was slow as molasses, and had a terrible file-handling system.

And then ajaxWrite crashed by my browser.

That's right. Your crappy web application crashed the very thing it was designed to run on.

Oh, but that's not all of the irony, you see.

Blogger's post editor is a bit of an AJAX application itself. For instance, every few seconds Blogger is making a copy of my post for safe-keeping, in case I get disconnected or something, right?

Oh, wrong. Because, you see, Blogger apparently can't tell the difference between a page crash and the user navigating away, so when I restore my web-browser, using the awesome Crash Recovery extension for Firefox, I'm greeted with an empty blog post. That's right. Nothing.

So, when ajaxWrite crashed--destroying any valuable work I might have been in the progress of creating with it--it also brought down the rest of the house, thus throwing the baby, the bath water, and most of the tub out the window.

No, I'm sorry. AJAX web applications are never going to replace desktop applications.

Applications like OpenOffice.

You know, the office suite that has a robust document recovery mechanism that ensures all your content does not belong to /dev/null?

Not at this rate.

Here's the best part. It is the most egregious thing of all:

ajaxWrite doesn't work in Internet Explorer because it apparently uses XUL. Look, I can understand that you might want to short-circuit a lot of work that XUL does for you. Hell, I'm all for it, I use languages like C#/Ruby/Boo just because they do a lot of the grindstone work for you. But when you start yammering about the web and interoperability and people not following standards, and then do this...

From ajaxLaunch's FAQ:
"ajaxWrite requires Firefox 1.5, or newer, browser. We are investigating extending ajaxWrite to other browsers such as Internet Explorer. Let us know your feedback on the forum."
What makes this really rib-crackin' funny?
"ajaxWrite is compatible with any operating system, Windows/Mac/Linux, but does require that you use a Firefox 1.5, or newer, browser."
Yeah, OK. Trade-in one form of vendor lockin for another. That's real, uh, heroic.

Coup d'é·tat right there, mofos.

Wait, WAIT, I KNOW WHAT YOU'RE THINKING.

It just gets better, though. I mean, we've got Writely.com, which, fantastically enough, works in any standards compliant web-browser you've got, has a rich user interface, is a very responsive AJAX application...

This is easily the most disappointing thing I've ever seen come from Michael Robertson. The sad part is he really thinks this will replace Microsoft Office.

Man, you're starting to slip. Seriously starting to slip.

Saturday, March 18, 2006

IO Language

Someone just linked to me to Io, a language inspired by Smalltalk, Lisp, and Self. What surprised me the most is not that it embodies the concepts of these languages, but the fact that its syntax is clean, crisp, and for the most part, easily readable.

What I've really disliked about these kinds of languages is that their syntax is not something you read; it is something you study. That's always really kind of annoyed me, because I have other things to do than decrypt a language by constantly flipping through a dictionary or keep a cheat-sheet next to the computer.

Io, on the other hand, seems like a refreshing change of pace. Clear, concise. No violent cacophony of paranthesis clawing at the gates. Sweet.

The unfortunate bit is that its another one of those languages that has its own runtime and libraries, which always leads to the problem of there not being a lot of libraries. So not only do you have to learn the language, you have to learn the unique set of libraries available for it. Not really my concept of a good day, since the knowledge really isn't reusable outside this particular library.

I guess that's why I enjoy .NET so much--when I switched from primarily coding in C# to coding in Boo, I only had to learn the unique syntax. The framework library was familiar to me, so once I was down with the syntax everything else just kind of flowed together and became like gel.

Hm. Its almost 4AM and I'm still up. Guess I'm hungry. Hopefully this will be the last errant post tonight.

Shame on you!

I feel bad for this guy. Both for the hassle Google is giving him, and the insipid people trolling his journal.

Sometimes I have to really wonder, do people read about these things, or do they simply act on reflex and hatred?

I try my best not to fall into those kinds of social and mental pit-falls; evaluate each situation, make sure I understand before I shoot off on the mouth and make myself look stupid. I really think this is key for me because I was "raised" on the computer and understand that in the age of Google and other powerful information networks, data persists. For years.

Any thing I'll say on this blog will be enshrined in Google's search engine for years to come. If I were to say something terrifyingly stupid, I would have to abandon all traces of this nickname, forever and permanently, for all time.

I guess the people posting comments on that guys blog won't have that problem, because they're mostly anonymous, or ashamed of being linked to such slow, meandering thought patterns.

Other GUIs for .NET?

Someone asked me why I stopped blogging in detail about the other UI solutoins for .NET programming.

I'll be honest with you: they suck. Bad. wx.NET has an API that is only comfortable to C++ programmers, and System.Windows.Forms is basically a slightly cleaned up version of MFC.

While this is OK--no API is perfect--they're not really interesting enough to warrant a blog post for each individual one. While they are powerful APIs, they are also APIs that are showing their age. I wouldn't use them unless it was absolutely positively a requirement, which it often is. Still, I hate's em. Damn, do I hate's em.

I know people say the right tool for the right job, but if the right tool happens to be a feces-covered shovel, well, hell, you're screwed either way, right?

Guess I just like living on the edge of new technology.

Monday, March 13, 2006

Minor msbuild modifications for Boo.

I wanted to make sure my boo copy was in sync with the repository, so I went ahead and finished up the tweaking of the msbuild files for Boo. Mainly it was wiring up project properties to the booc task. For some reason the code to generate all the proper command-line switches was in the booc task, but the back-end wasn't wired up to the Boo msbuild target.

Those of you using #dev 2.0 and Boo and wondering where your .pdb files went and why you couldn't debug inside of #dev, well, its fixed now, but you'll have to copy the Boo msbuild lewt from svn over to #develop 2.0's addin directory.

I think what happened is, Daniel (Boo #develop hacking hero) had a modified copy of the boo msbuild stuff to make sure that it emitted debug info, and when he upgraded to the latest and greatest svn version of boo, he lost those modifications. Anyway, fixed now, so no harm no foul.

These'll probably be my last few modifications for awhile, unless something heinous pops up while I'm coding something.

Sunday, March 12, 2006

Oops!

In my previous post, I mentioned the new anyall module. Well, bamboo removed the module from svn, so please ignore the previous post about them.

Author: bamboo
Date: 2006-03-12 15:53:09 -0500 (Sun, 12 Mar 2006)
New Revision: 2167

Removed:
boo/trunk/src/Boo.Lang.Useful
/Functional/
boo/trunk/tests/Boo.Lang.Useful.Tests/Functional/
Log:
any/all were not formally approved and the tests were not passing
When I first checked in anyall.boo, the tests were passing, so I'm not sure what to make of that message. Looks like a minor bugfix I made to the anyall module last night exposed another problem, but I'm not sure if its a problem in Boo or in the module. Since its probably in the module there's no point in trying to debug it. ;)

Rant
What actually bothers me is the first half of the message -- that they weren't formally approved. I don't mind in particular that they were removed because the testcases were failing; its my bad for checking in the minor fix without running the unit tests.

But the first half of his message brings to light one of the most irritating things about Boo development. The major reason I stopped contributing code to Boo in the first place was that patches were just kind of dangling on JIRA with feedback from users, but in general ignored by bamboo. My given-when, Doug's given-when, the BOO-1 custom unit patch, Boo.Lang.Useful contributions, ckknight's optimized for-loop, are just kind of rotting as the codebase gradually change and the patches become out of sync.

Its very depressing--a lot of the people that have attached bugfixes to JIRA issues and contributed modules for Boo.Lang.Useful review that have been ignored in general. Nobody wants to write a patch that doesn't at least get looked at; it feels like a bit of a waste of your time, since the feasability of maintaining your own copy of Boo with the patch is very unlikely.

With SVN access, I was kind of hoping I could change some of that by at least working with the Useful contributions, updating the patches and merging the ones that seem the most popular, but if its going to take formal approval then everything is in the same situation it was before.

But, it is bamboo's baby, so the choice on how to handle the situation is ultimately his. I should probably take a bit of a break from hacking on Boo and find something else to do for awhile.

Sidenote: The one majorly annoying things with RTF input forms on a webpage is that you can't press tab and indent text. Tab has been historically reserved for jumping over hypertext elements in a web page, which means that some editors have simply adopted "indent" and "deindent" buttons on the toolbar.

Blogger doesn't have those.

Kinda hoping that the "threat" of XAML/WinFX encourages better user interface design on the web. XUL is nice but aside from the one Amazon.com XUL browser everyone uses to herald The Coming of The XUL, there's not much else using it.

I pine for the day I can press tab while editing a document in a webpage and stuff works like a real text editor.

Friday, March 10, 2006

Boo, life, etc.

Boo!

I got Boo SVN access. My first commit was a feature, BOO-675 I think, basically better delegate adaption. Boo is smarter now.

In .NET 2.0, the Thread constructor has can accept two kinds of delegates. One of them is parameterless, one takes one object as a parameter.

This meant that Boo had ambiugation problems with this kind of code:

t = Thread( { print 'Boo!' } ) because it wasn't sure if the closure was a ThreadStart delegate or a ParameterizedThreadStart delegate. I modified the scoring system so that Boo would check a callable (closure, first class function, etc) compared to any delegates it might match. In the example I just gave you, the scoring algorithm would give higher precedence to ThreadStart instead of ParameterizedThreadStart, since ParameterizedThreadStart takes one parameter, while ThreadStart takes no parameter--and this matches, perfectly, the callable, that does not accept a parameter either.

In the case of t = Thread( { i| print i } ) Boo would pick ParameterizedThreadStart instead, since they both match the best (one parameter!)

I also added the any() and all() functions. BOO-604. Here's a quick self-explaintory sample.

import System
import Useful.Functional from 'Boo.Lang.Useful'
class Vector:
public X as int
public Y as int
static id as int
def constructor():
id++
def constructor(x as int, y as int):
self()
X = x
Y = y
def ToString():
return "Vector #${id}; (${X}, ${Y})"
Above:
get:
return X >= 0
vectors = []
r = Random(DateTime.Now.Second)
gimmie = { return r.Next(-5, 5) }
for index in range(10):
vectors.Add(Vector(gimmie(), gimmie()))

#for the sake of argument let's say this is a videogame.
#we're making sure none of our vectors are in the negative, since that means they're underwater or something.
result = all(vectors).Above
if result:
print 'All vectors above ground'
print result
else:
print 'There are vectors not above ground!'
print 'The following vectors failed.'
print result.Failed
#Let's assume this is a vehicle coordinate system. At least one of the vehicle's vectors has to be above ground
#for it to be working correctly.
result = any(vectors).Above
if result:
print 'At least one vector above ground'
print result
else:
print 'None of the vectors above ground!'
print 'The following vectors failed'
print result.Failed


Here's some sample output.
There are vectors not above ground!
The following vectors failed.
[Vector #10; (-2, 0), Vector #10; (-4, 2), Vector #10; (-4, 0), Vector #10; (-5,
-1), Vector #10; (-5, 1)]
At least one vector above ground
Passed (5): [Vector #10; (3, -1), Vector #10; (2, -3), Vector #10; (2, -3), Vect
or #10; (4, -3), Vector #10; (3, 4)]
Failed (5): [Vector #10; (-2, 0), Vector #10; (-4, 2), Vector #10; (-4, 0), Vect
or #10; (-5, -1), Vector #10; (-5, 1)]

Its a bit more useful in actual practice.

EDIT: oops. You'll notice I made a juvenile mistake with the id. I meant to have a private _id property to go with the static id property, but I got bogged down in tracking down a bug I found in the any/all implementation concerning null values. Tch. Oh well. Go ahead, laugh, jackass.

The upside is that the anyall module is now minus 1 bug. ;)

Dolla Dolla Bills

Haven't gotten much love on the code front, lately. Not surprised--the usual suspects seem to be busy or not in desperate need of a code mercenary. However, the prospect of having to float a resume'--an actual, genuine resume'--on somewhere like Monster.com does not strike a chord with me. Hopefully something comes my way, as I'm not looking to get my fingers into anything seriously long term--I like the short-term hit-and-run kind of stuff, myself.

We'll see what happens.

Saturday, March 04, 2006

Subliminal advertising: YOU WILL HIRE ME.

Yeee haw! Its that time of the month (that was a quick one, wasn't it?)

I'm available, again, for short term .NET-based contracting work.

I'm a very discreet software engineer, as some of you may not know. What it means is, if asked, I'll be sure not to rattle you off as a reference when asked about previous employment opportunities. I understand that, on the Internet, anonymity is preferred in a great number of situations.

As a result of this, though, I've given up on carting a resume' around (never updated the one I had, anyway) and typically like to say that I know what I'm doing when dealing with:

Languages:
  • C#
  • Boo
User interfaces:
  • Windows.Forms
  • wx.NET
  • GTK#
.NET platforms:
  • 1.1
  • 2.0
.NET/relevant technologies:
  • ADO.NET
  • COM interop (RWAR!)
  • XML
  • SQL
  • Sockets
  • Webservices
  • Reflection
  • In general, the requisite technologies needed to build and maintain.NET application.
Misc:
  • I have experience in exposing Boo as a scripting language.
  • I also have minor experience in writing technical documentation, but am confident that I can deliever concise, easy to understand documentation on demand.

and I have dabbled with (and can learn more on demand for)
  • ASP.NET (cavaet: I am /not/ good at making things look pretty)
  • Code Access Security
  • IronPython
Money (The Green):
Typically I charge a flat rate. I like doing this because people can come to me with small problems and not feel like they've been gutted like a pig afterwards. However, if the work is in flux, or you estimate that you'll need X amount of man hours to make the magic happen, I can quote you on some hourly figures if you give me the sufficient information required.

I'm also down with "profitable charity work," like software bounties for your favorite open-source .net applications. I prefer these software bounties to be very precise due to the constantly changing nature of open source projects, and some project mantainers being hostile to patches from strangers. ;)

email / jabber: l33ts0n@gmail.com
My cell is available on request.

Sunday, January 22, 2006

GUI frameworks available for .NET: GTK#

This is my second post about user interfaces available for the .NET, which I will probably call the "CLR" from here on out, since its easier on my fingers. The first part is here, be good to it.

As a special note, GTK#, the toolkit I'll be talking about, just recently had a new release. I'm going to be discussing an older version because I have not really had a chance to explore this version in depth.

Now we're going to discuss...

GTK#
A binding to the graphical user interface called GTK+, GTK# is easily a step above the rest when it comes to API quality and expressiveness, when you consider the alternatives. On the pecking order, GTK# comes in closely behind WinFX, and way, way ahead of S.W.F and wx.NET. I'm going to ignore GTK+ entirely, and write this blog post as if GTK# was the whole kettle.

GTK# uses a container based layout system, which is basically a fancy way of saying that you drop down a container, tell it how you want it to layout your controls, then start flinging those controls like spaghetti onto an artist's canvas. Although this sounds pretty haphazard in theory, its possible to make a beautiful and usable user experience using GTK#.

GTK# uses an xml-based serialization format, called Glade, that enables an abstraction between user interface design and wiring up the controls to the data-driven back-end. Unfortunately there are very few graphical designers that support GTK# and Glade, and so inevitably you have to rely on The One True Glade Designer. Its got an awful user interface and should not be used to judge the abilities of GTK#, because it falls short. Very, very, very short. Midget short.

There's plenty of base controls, in particular the powerful TreeView that allows for different styles of data visualization. However, there is a distinct lack of convience when dealing with GTK#: although virtually nothing is impossible due to the robust way GTK# is built, some of the most commonly repeated idioms do not have any convient shortcuts, which means that for even some of the simpliest scenarios--like simple listboxes filled with text--require an inordinate amount of effort given the task you want to accomplish. It would be nice if GTK# shipped with a lot of prefabbed controls for the most common user interface idioms, but that does not seem to be the kind of development paradigm they're going for.

GTK# is crossplatform in theory, but the platforms with the strongest support are really just various Linux distributions and of course Microsoft Windows. It can run under Mac OSX, but I have been told that it is not a pleasant experience by some. Not having a Mac, I can't really say anything more. I myself have successfully gotten GTK# programs to run on Windows and Ubuntu without recompiling.

There's a lot of things that seem to be amiss if you touch on GTK# after having done WPF development for awhile; most notably, you can't arbitrarily place a control inside of a control: you'll have to "paint" it by hand yourself, and, as far as I know -- I haven't done anything beyond *drawing* the controls -- wire up the events as the parent control receives them. It is nothing brutal, but the time spent custom painting controls could be better spent doing something--anything--else. Most toolkits suffer this flaw, so if you have no experience with WinFX, then custom drawing is standard. Other things WPF developers will find lacking is "styling" and the magic of the, uh, what'chu'call'it, DataContext, I think, but that's about it.

All in all, its a pretty good toolkit if you need to write an application targeting Mono and any of the platforms it supports. I think if a lot more effort was put into making the API more agile then it could see itself being on common footing with WinFX. It compares quite nicely at its current state, however, so don't dismiss it outright. ;)

Score: 7/10

Monday, January 16, 2006

GUI frameworks available for .NET: WinFX

I thought I would do a little blogging on the user interfaces bindings currently exposed to .NET, and how I feel about them, their APIs, and their documentation: basically the stuff you need to know to work with the APIs, and the APIs themself. They're in no particular order, but I'll give them a rating from 1-10 based on how fluid it be, yo.

Each blog will focus on just one user interface framework. Let's get it started.

Windows Presentation Framework (WPF)
When you first look at the API, it is mindblowing -- there is shit everywhere, and the inheritance and interface definitions are off the chain. For a moment it seems like one big cluster fuck, but this is one of those situations where examining the API without using it is a Bad Thing To Do. After a few hours working with it, I began to realize the reason there were so many interfaces and inheritances trees was to keep things simple. You only implement what you need, nothing more. This is a startling contrast to most of the UIs that have .NET bindings (including Win32 itself), where there is generally a huge base class with lots of overriable methods and properties. At first glance it seems like a sweet deal, but then you run into "ok, what is the absolutely minimum number of virtual method/properties I have to override?"

I really began to appreciate the design when I started to do more complex stuff. I needed a "Icon List" control, which is basically a panel that holds a bunch of icons, with optional text beneath each icon. There's no such convience control in WPF, so I realized I had to make one by hand. It only took minutes to get the basic functionality in: the main panel, to hold all the icons, was a WrapPanel. Each of the "icon" elements was basically a Canvas with an image on it. The best part was when I realized I wanted to add "tagging," support, all I had to due was plop a text box down, anchored to the bottom of the Canvas... and I was "done" so to speak.

"Styling" controls is really easy, and in fact one of the things I really like about the WPF. One style can apply to any kind of UIElement, really, which are the building blocks of user interface controls. So you can apply the same style to a radiobutton and a textbox and achieve the same result. Really cleans things up quite a bit.

The fact that any UIElement can be placed inside of another UIElement becomes invaluable after spending a few days with it. It makes compositing controls a real killer feature. This is to be expected, though, since WinFX is a "next gen" API and isn't carrying the baggage of backwards compatibility, so it has no other choice but to be better than the current toolkits or die trying.

There's other goodies I haven't had time to jump into, like DataContext, a really sweet way of data-binding. Basically this is how you tell UIElements to interpret your class/structure. Then all you have to do is supply your object and things work like magic.

Still, there are some serious downsides: documentation, for one, is pretty much nonexistant. The API is in constant flux as well, since every CTP makes a few dozen breaking changes. I would not ship software targeting any given CTP of WPF right now, but software that doesn't have an "offical" release until sometime next year is a good canditate, in my opinion. I know that I'm using WPF right now to develop something.

Score: 9/10


Friday, January 13, 2006

Back in the game again.

I'll be available for some work-for-hire starting today. I know C#, Boo, and if I must -- I mean really if I must, Java. I like to charge a flat rate for the work I do, and there'll be no problems as long as you don't suddenly up and make a major change to the requirements.

Thursday, January 05, 2006

Opera > Firefox?

I just read a blogger article linked from OSNews -- a site whose link quality is slowly degrading. However, it does provide little gems like this one:
Popular Technology.net: Opera is Faster, More Secure and More Compliant than Firefox

Now, I'll be the first to say that Opera is a very good web-browser, but this guy does more harm than good to its community. You notice right in the beginning that something wayward this way comes, with the fucked up metric of using vulnerability count as a blanket way to consider how secure a software product is. In reality, I think most of us would take ten (10) javascript vulnerabilities that with infinitely looping javascript prompts over 1 (one) 0-day exploit like this one.

Unfortunately, the article only gets worse from there, and ends on the less-than-subtle note of him/her/it arbitrarily declaring Opera the best browser. What pains me the most is that some potential Opera users are going to read that blog entry before they try the browser itself and immediately be put off by the attitude of smug superiority justified by a random link and a short pithy two-three sentance paragraph.

Personally Opera has a lot going for it, but until we're able to write extensions for it -- there are some that exist for Firefox like Scrapbook, and Location Navigator, that I cannot live without -- I'll be sticking with Firefox on point, with Opera covering the flank until it gets a bit more experience in the field.

For people who don't like customizing the browser (quite a number of people), Opera is on it like white on rice, since the "out of the box" experience everyone always oozes on and on about is much better than Firefox's.

Wednesday, December 21, 2005

Extension syntax for Boo

I was thinking about the proposals for expanded extensions for Boo -- I would rather call them mixins, since this is what they seem like in my mind, with their syntactic sugar. Its also easier to type mixin.

I've been thinking about properties and mixins. Take the following example, with my completely made-up syntax.

mixin System.String:
Words as (string):
return self.Split(' ', ';', '.', '!') #Doesn't work, no implict conversion to char

As far as code goes, its pretty simple. Infact, this could easily be a method.

def Words(target as string):
return self.Split(' ', ';', '.', '!')

Then you, know, Words("Hello, world!") is just as effective as "Hello, world!".Words.

But sometimes, being able to do something one way doesn't necessarily mean its better than doing it another way. This kind of syntax blends very well with the way of the OOP, and allows for a better visual recognition of what object is being manipulated.

The flip side is, of course, "Is Words part of System.String, or an extension?"

My answer is, "Does it matter?" Do you really need to know wheither its an external function or an instance function? Well, that would be my answer in an ideal system, where extensions showed up when you used reflection on a type. Right now, they don't, though, so knowing the difference between an extension and instance members is important if you plan on doing reflection-based operations on a type at runtime - you'll have to root around in some namespaces for those extensions rather than just checking the members of a type.

Tuesday, December 20, 2005

Hey, you!

Rodrigo B de Oliveira, why the hell are you syndicated by Monologue?! You post like once a month, you lazy bastard. ;)

Monday, December 19, 2005

Thanks, Blogger.

Thanks for saying, "Hey, you can't post this because it has unclosed HTML tags!" to my face but secretly going behind my back and posting the entry anyway, generating at least 10 half-assed blogposts because I think none of my posts are showing up on my blog: people tend to assume that when you tell them, anyway.

Ugh. I think I should get a new blog somewhere else. That's ridiculiously pathetic.

Attack of the WinFX December CTP!

http://blogs.msdn.com/tomarcher/archive/2005/12/19/505502.aspx

The WinFX December CTP has been dropped to the public at large. The one big change I'm sure everyone has noticed by now is that, aside from a few minor tweaks, the "mini language" of XAML has been removed entirely. Bits and chunks have been removed piece by piece, but the December CTP finally sees the removal of the last straggling hold-outs.

If you're not sure what I'm talking about, here's a snippet from Chris Sells' blog:

Or, rather, you would be seeing a snippet, if Blogger's posting control what's it didn't suck an incredible amount of ass. Infact, I just had to copy and paste the text here to note-pad and back, because Blogger's state of the art RTF control forgot to close a tag. Thanks, bitch. Anyway:

http://www.sellsbrothers.com/writing/avbook/changenotes/Wpf09-05CtpTo11-05CtpChangeNotes.htm

Its under the general section.

Anyway, thank God.

By making the format more rigid in terms of syntax it means that
XAML won't become the kind of mess the SVG spec turned out to be; and as someone who once wrote a SVG-to-VG transformer, I know exactly the kind of pains in that spec. Taking the "convenience" out of the spec means that there's no ambiguity or multiple ways to parse one attribute.

These file formats aren't meant to be written by hand, damn it. Tweaked? Sure. WRITTEN? No. Its harder to automate this junk when there are seven different *
valid* ways to write something. The easier it is to programmatically consume XAML the more tools will crop up that can read/write XAML and modify it.

No, sorry, VIM is not a good example of a tool. I mean *REAL* tools, like Sparkle, Cider, #develop.

Sunday, December 18, 2005

Wikipedia founder 'shot by friend of Siegenthaler' | The Register

Andrew Orlowski apparently spent several hours on Wikipedia today trying to track down something to make Wikipedia look bad. Took him awhile, but he finally found something in the revision log: vandalism claiming that the Wikipedia founder was murdered by a friend. Like all incredibly bad journalists, he cropped out of the revert time, so even though the vandalism was corrected within minutes, he decided to "only" take a screenshot of the edits, rather than the edit times.

Ahh, quality journalism from The Register strikes again. Tell me why I shouldn't trust Wikipedia more than those guys, again?

Read more at www.theregister.com/200...

Friday, December 16, 2005

Nemerle, a hybrid functional / OO langauge for .NET

With my itchy, twitchy fingers, I have been checking out other languages that run on top of the .NET platform. Nemerle is one I checked out over the weekend. The language has a lot of features - a nuclear silo's worth. A powerful matching construct, a readable syntax (compared to any other functional language I've seen), and generic support. Mmm, generics. Those who know me all too well know I yearn for generics in Boo, and the lack of support causes me to stray and check out other languages from time to time.

For the sake of brevity, I'll model this blog post after the things I don't like about the language, and modifications I would make. There are too many things about the language I really like, so starting off like that would really eat up some time.

To get one thing straight, I'll pop up this disclaimer: I know nothing about functional programming. At all. I just tend to drill into a language, ignoring the design methodologies that went into and whatever. So, make no mistake: I have no idea what I'm talking about.

Things I would change:
  • The match construct throws an exception if there is an unmatched item. This is suprisingly useful in theory; in practice however the exception provides so little detail that its barely worth it. It should at least spit out what the match variable was. C'mon man, gimme a hint or something, Christ.
  • The match construct syntax. The match construct is powerful - it is easily the sweetest thing I've laid eyes on. But the syntax is the ugliest I've ever seen. Personally, I would just totally rip Boo's "given when" syntax and call it "match when" and whistle innocently. The problem with the match syntax is that its completely foreign to everything else in the language for no apparent reason. I cannot think of one reason for the syntax to be laid out in such a hard to type (finger acrobatics, maximum!) and hard to stare at manner. It looks like a twitchy, "shit, let's just do what the old guys did" implementation. I'd 21st century-ize that sucka.
  • Explicit return statements. Recently, a pattern I've developed is using return statements to avoid processing the rest of a method without having to drop an exception. This is extremely handy for methods that can return null, or a default object. This seems thoroughly impossible with Nemerle, unless you're willing to use the match construct at the very beginning of a method. This of course means two or three relatively small match bodies, and then one huge match body for the "rest" of the method. I like implict returns, but I wanna be able to be explicit, too.
  • N10005. The reason Nemerle sample code is littered with ignore() functions. The reason sample code scrolls an entire screen of N10005's because nobody wanted to type ignore() everywhere. Man, that might be cool or hip when you're running on a framework where every return value is important, but some of the time all it this return data is, is extracellnous information that we don't need. I don't really wanna type ignore(). I'm sorry. I don't. I'm lazy.
  • Fuse braces and indentation. Boo/Python really turned me on to indentation based syntax. Hell, I was going to indent anyway. I would fuse'em in Nemerle: start a block with a brace, end a block with a brace. Otherwise, use indentation for syntax. There we go. Kung-fu with both syntaxes, now. Nemerle offers an -i switch, but that's almost as good as not offering indentation-based syntax at all.
Yep, that's about it, doc. Otherwise, its a really swell language that doesn't have decent IDE support. They've got a Corsavy addin, but it takes too much effort to get working: why they bundled a .sh script with it I'll never know. Copying the relatively simple instructions from the shell script do no good, since something in the plugin or the architecture of #develop 2.0 have changed, so you have to do some kind of wobbly dance to make the addin work. I can't remember what I did the first time to make it work.

Anyway, that's it. There. I posted a blog entry. Now, don't expect another one for awhile.

Wednesday, November 30, 2005

A Boo survival guide.

Over at boo-contrib, I've begun work on the Boo Survival Guide. Its not for newbies, and at the moment its pretty disorganized; its meant to be mainly a compedium of information on how to do things in Boo, rather than the basic mechanics of how a programming language works. That's why its called a survival guide, I guess. ;) There's a pregenerated PDF included and the OpenDocument files I used to build it in the same download.

Tuesday, November 29, 2005

Me vs my professor.

I had to do a little verbal kung-fu in front of my Linux Security/PHP class in order to save face a little over an hour ago. Here's my story:

A little introduction
Recently, it became required curriculum to take a "PHP and Linux Security" course. Never-you-mind the fact that we never had enough time to either go indepth in PHP or Linux Security very much during the session aside from a very broad and ultimately useless overview of both concepts. I'm not sure whose clever idea it was, but it wasn't a very good one to combine two completely different subjects into one amalgamation that can barely be taught in a semester.

So, the course has gone as I expected - slow, meandering, and without any real substance since its been divided between "Here's Linux" and "Here's PHP," and it comes time for final exams - except they're final projects instead, for some as of yet unnamed reason.

The Project
The professor seems very laid back, and in the beginning that was alright -we were verbally instructed to create a "PHP and MySQL" webpage, and then at the end he mentioned something randomly about homework. Yes, he gave homework the same day he told us about our final project, assigning them both to be due on the same day, which is of course an immediate priority conflict: one of them has to take precedence. They're not hard, per-say, but they are time consuming, an issue compounded by the fact that this isn't the only class I have to take. He is of course the only teacher still giving out homework so late in the term.

So, today was one of the alloted days to give presentations. Two people, who were obviously basing their presentation of existing PHP projects, went first: one smart foreign fellow was creating a CMS for the commpany he worked at to handle task tracking, and one other dude who had developed forum software for use with his associates. The rest of the projects were obviously from scratch and incomplete, judging by the quality of the one other I saw, and the people shaking their head and saying, "I'm not done yet" or "its not presentation quality." Hey, no sweat. We all have other classes, too, right?

The Presentation
Me? I volunteer. I'm done. I did the smart thing: I based my website off an existing template that came with the book for the course, whose author gave his blessing for modifications. I transformed one of the template sites to an ad-hoc image gallery, nothing really fancy but to be honest that's all I had time for, between those magical things called other classes.

So, when I'm done, what's the first thing he calls me on? You got it: the template. Well, that's great, except in his verbal "I-didn't-write-it-down-so-there's-no-proof" instructions he said we should consider using the examples in the book as templates. I can't quite tell him this to his face of course, because its incredibly insulting to call him out like that in front of the class, and the project is worth 35% of the final grade. I'm no sucker.

Gotta retaliate though (I have an ego), so I start quipping good development practices, like "a good programmer knows how to reuse code" and the typical, as the polite conversation almost turns into a debate. I had already queued up a logical argument on the issue of web development in general, when he suddenly distracts me with a copyright question. I hadn't removed the template author's copyright from the HTML page. I tell him its OK, since the author gave permission. He said I should have taken out the copyright notice. In hindsight I should have probably made a seperate 'credits' section and named him there, but I had more important stuff to do.

wtf?
Still, totally caught by suprise by the nature of his comment, I mumble the knee-jerk, "Uh, questionably legal area?*" and the class starts an ad-hoc discussion about it. By then I had lost my opportunity to argue the issue of using a template in my favor, though the professor still looked pretty displeased when I got up to go back to my seat.

I believe I saved quite a bit of face, though.

Sheesh.

In only two hours I'm probably going to have this same situation with another professor: the assignment didn't say to create our own data structures, so I logically used the tried-and-true STL data structures instead.

I've made a grave mistake assuming my professor's are all aboard the logic train.

*This is the only thing I remember from my CyberEthics class, even though the semester hasn't ended yet.