Re:Atomo, the programmer's programmable programming language
by swannodette on Saturday November 13, 2010 @03:37PM
(#1901654)
Sounds reasonable. So is it possible to mix Haskell in with Atomo to get to the metal so speak? Do you have any examples of this?
[ Parent
| on HN ]
Re:Atomo, the programmer's programmable programming language
by vito on Saturday November 13, 2010 @03:42PM
(#1901667)
Yes; all of Atomo's kernel is defined using this Haskell DSL. For example, here's Atomo's ports system: http://darcsden.com/alex/atomo/browse/src/Atomo/Kernel/Ports...
I've also written a few wrappers for Haskell libraries over at http://darcsden.com/alex - see http, json, and command.
Basically, you define your methods in Haskell, and call them from Atomo; these methods can be defined as an expression (=:::), a value (=::), or some arbitrary VM action to be executed to yield a value (=:). (Admittedly those operators have gotten a bit silly.)
The definitions use QuasiQuotes for the method pattern, and can use them for expressions as well, though that's not encouraged (operator precedence and macros make it a tricky thing to do at compile time). They look a bit noisy - [$p|x foo: y|] but that'll be fixed come GHC 7, where that pesky $ is removed.