Bluish Coder

Programming Languages, Martials Arts and Computers. The Weblog of Chris Double.


2006-06-09

Termite Distributed Scheme Released

Termite, the Scheme-based system with Erlang style concurrency, has been released.

The Termite paper (pdf) outlines the features of Termite. I've been looking forward to trying this out!

Tags: scheme 

2006-06-07

Minix and Haskell

There's an interesting post on the Haskell group about Minix and the possibility of writing OS core components in Haskell for it.

Minix is an open source operating system that's been around for quite some time. I first tried it out sometime in the early 90's after downloading over some very slow dialup connection connected to a BBS.

From the post:

Andrew Tanenbaum said that it is important for a language like OCaml or Haskell to get more visibility among the OS developers; and Minix offers a very good way to do that. Minix3 is based on micro-kernel; all of the OS services (memory manager, file system, all the drivers, etc.) run as regular processes communicating through a well-defined protocol. It is irreleveant what language these services are written in, so long as they obey the protocol.

The poster goes on to suggest a way of slowly migrating the system routines to Haskell:

With Minix, we can replace one kernel service of the full-fledged, working OS with the one written in Haskell -- and immediately see how it all works. If it doesn't, the rest of OS still works and so we can unload the faulty service and load another implementation. Minix3 does indeed offer an easy road to the OS kernel for a language other than C. I said that there may be quite a bit of interest in Haskell community in such a project. I wonder if I'm right...

Tags: haskell 

2006-06-07

Mt Vic Dojo Open Day - Kyokushin Karate, BJJ, Judo and Yoga

The Mt Vic Dojo is having an open day on Sunday 11th June. The day includes demonstrations, free classes, t-shirts and discounts to be won. All the styles that hve their home at the Mt Vic Dojo will be there. These being:

A poster with details is here (very high quality pdf).

If you're at all curious about any of these great activities go along and have a look. It'll be well worth your while. The dojo is at Level 2, 25 Home St, Wellington, behind City Nissan, next door to Spec-R .

Tags: martialarts 

2006-06-07

E4X with Server Side Javascript

I've updated the Server Side Javascript distribution to include an example which uses E4X.

E4X is described in Ecma-357 and adds a Native XML syntax to Javascript. The XML is converted to a Javascript object which can be used to query and manipulate the XML.

The E4X example servlet generates the XHTML to be displayed using:

var result = 
      <html>
        <head><title>HTML Using E4X!</title></head>
        <body>
          <p>Hello from E4X on: {new Date()}.</p>
        </body>
      </html>;

It embeds the current date and time by calling out to Javascript's Date object. This is done by wrapping the Javascript expression inside curly bracket: {new Date()}.

Given the XML object now stored in the 'result' variable it can be sent over the wire in the same manner as the other servlet examples:

var text = doctype + result.toString();
resp.setContentType("text/html")
resp.setContentLength(text.length)
resp.getOutputStream().print(text)
resp.flushBuffer()

I prepend an XHTML doctype to the output as the XML generated is actually XML not HTML. This means things like <br> need to be <br/>, etc. I've not found a way to get E4X to generate HTML which is a pity - if anyone knows if it is possible I'd appreciate you dropping a comment here.

The updated code is available as javascript-server-0.2.tar.gz and in the darcs repository:

darcs get http://www.bluishcoder.co.nz/repos/javascript-server
Tags: javascript 

2006-06-07

Phobos available for download

Phobos appears to be available for download now.

Phobos is the server side javascript system that Sun is making available. Robert Chinnici has a blog outlining features of Phobos and answering the question about why you'd want to use Javascript on the server.

Tags: javascript 


This site is accessable over tor as hidden service 6vp5u25g4izec5c37wv52skvecikld6kysvsivnl6sdg6q7wy25lixad.onion, or Freenet using key:
USK@1ORdIvjL2H1bZblJcP8hu2LjjKtVB-rVzp8mLty~5N4,8hL85otZBbq0geDsSKkBK4sKESL2SrNVecFZz9NxGVQ,AQACAAE/bluishcoder/-61/


Tags

Archives
Links