Archive for May, 2008

Linking to "Dynamic Languages Strike Back"

Wednesday, May 14th, 2008

I just read a great lecture, available as video to to those who prefer, titled as above, here, talking about reasons to use dynamic languages.

Except for the usual productivity, maintainability (both a result of reduced LOC, a result of tersness, and a result of avoiding type tagging, and ability to inspect at runtime), he also gave a great reason to expect performance to be on par with compiled languages, at least some time in the future, and the same for level of IDE’s, based on a single point that might seem strange at first:

  • JIT can achieve better performance then compilers.

The reason is very simple: runtime information. Runtime information, as opposed to compile time information, accurately shows where your program is spending its time (hot spots), avoids optimizing unrequired stuff and provides the missing (at compile time) type information (in the case of dynamic languauges).

Steve’s additional point was that the same tools used for JIT are useful for Rename refactoring and other IDE requirements, and he brings IntelliJ’s IDEA as an example that shows that a good IDE for a dynamic languauge (javascript) is possible. I’d add that the rope project for python is also a good example (and of course as he mentions in the talk, smalltalk started with the refactoring browser, and smalltalk is definetly dynamically typed).

Of course I fully expect pypy to prove that Steve is right.

Apache – what a bleeping waste of a day!

Sunday, May 11th, 2008

Half a day gone, on what? let’s see:

  • VirtualHost – 2 hours
  • ProxyPass – 2 more
  • RewriteRule – 10 minutes. Why didn’t I think about that first?

Anything for fellow apacheres out there? Why yes, I’d say a couple of things:

  • ProxyPass has some trailing slash problems, RewriteRule with [P] is much easier to debug, and actually works. When using it you can (should?) remove any Proxy* directive – it isn’t needed (you still get reverse proxing).
  • VirtualHost for some ungodly reason gave all the requests to the first VirtualHost directive, until I finally changed from VirtualHost * to VirtualHost *:80 (with appropriate NameVirtualHost).

From textarea to embedded word processor

Sunday, May 11th, 2008

I’ve got this django app which I’m slowly heaping features on. The latest attempt is to augment the admin interface to allow rich text edits. I found and tested two solutions so far:

  • dojo – specifically, 2.1.3 (and also 3.0.8 but quickly backed out, it’s alpha). It’s a whole framework, I just looked at dijit.Editor. Turns out it is very feature inferior to the next option
  • tinyMCE – I think this is what moinmoin uses [update: nope, they use fckeditor – needs investigation] . Very nice, has tables, right to left, html raw edit (I would have prefered it like moinmoin, with an option to be raw in the same form, not open a popup – I guess I could do that myself)

So far the experience thaught my  that javascript, and the whole browser api, can be pretty nice (at least as seen through dojo).

So, if anyone has any opinions on a prefered widget for this sort of thing, chime in!

links for continued work are gathered in my wiki

About

Thursday, May 1st, 2008

About open source and how it’s going to take over the world, and make all computers hard to use and annoying. Yay!

Tag chooser as an ML project

Thursday, May 1st, 2008

I think that would be cool: machine learning is used to tag stuff, that is to classify things. How about learning classes? it does that too. So it doesn’t seem to be too out of the way for someone to create a system that suggests tags for a blog, given a bunch of examples (i.e. existing posts, other people’s posts and tags). Anybody know of an existing one?

How do you choose Tags?

Thursday, May 1st, 2008

Just completed tagging my blog. It took me too days since I failed to notice that I only got half yesterday! There is something to be said for “all on one page” views. Anyhow, how would you choose tags? I started by trying to reverse engineer the topics. Then I added some tags based on type of content – like video, people, books if it contains video, mentions a person or a book. Now I think I should also add tags for mood I was in – but those are hard to post-add. Like “procrastinating”. meh.

Commenters (that’s you Joel) – how do you choose tags?