This looks really cool and reminds me a lot of Io. Speaking of Io, this make me curious about the performance of Atomo. Io while an amazing experiment in expressivity has terrible performance. Does Atomo similarly prioritize expressivity to the detriment of reasonable performance?
Right now, my priority with Atomo is consistency in the design and simplicity in the implementation. It's acting as an incubator for a ton of interesting language features at the moment (both for myself and for Slate), so I haven't made optimization a priority yet as major parts of it are constantly changing. For example, the version on Hackage has a traditional exception system, while the latest darcs changes have replaced that entirely with a condition/restart system written in Atomo.
I'd call it "fast enough," but it's no speed demon. It's pretty early on; I just started planning Atomo's design this June. There's almost certainly some low-hanging fruit when it comes to optimization, and it is something I've been keeping a close eye on for a while now. It's only been getting faster, and in my testing of GHC 7 I saw pretty substantial performance boosts for free. And that's the nice thing. It's built on a fantastic platform, which you can drop into very easily whenever you want with a nice DSL.
Glad you like it, though. I completely understand the caution when it comes to performance of such a high-level language.
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.
It reminds me so much of Io, that I'm a bit disappointed that Io is not mentioned in the "its design is inspired by ..." text at the top of the first page.
It does mention Slate, among others. After skimming the intro, I was similarly surprised it didn't mention Self, but it was probably more directly influenced by Slate. (Slate and Io were both strongly influenced by Self.)
Self and Io are both languages that have similar concepts but weren't direct inspiration; in Self's case, it was pure chance (I've never actually used Self), and in Io's case, Slate was a more direct influence. Io didn't have much mindshare, despite being another language I love (but never use).
Looks cool, but what are the use cases for Atomo? Would be nice if there was a section "Why Atomo", on the website.
More specifically, what prompted the creation of Atomo? Is it only for fun/personal research? Is it a school project? Is there a business problem that Atomo is solving?
(I'm just curious, this is not a "do we need another programing language?" criticism. I always wanted to write my own programming language for fun :)
Hackage has been down all day; I've uploaded a new version (0.2.1) just now which has the new condition/restart system, new REPL, and other goodies. Should be just a "cabal update; cabal install atomo" away! :)
The examples I'm surprised no one has mentioned so far: C and C++. (gcc is written in C. clang is written in C++. Just about every C or C++ compiler is written in C or C++ or both, though there are exceptions like the C compiler on the Symbolics Lisp machines.)
The Workshop on Self-sustaining Systems (S3) is a forum for discussion of topics relating to computer systems and languages that are able to bootstrap, implement, modify, and maintain themselves. One property of these systems is that their implementation is based on small but powerful abstractions; examples include (amongst others) Squeak/Smalltalk, COLA, Klein/Self, PyPy/Python, Rubinius/Ruby, and Lisp. Such systems are the engines of their own replacement, giving researchers and developers great power to experiment with, and explore future directions from within, their own small language kernels.
The Jikes RVM (Research Virtual Machine) uses a similar approach: http://jikesrvm.org/ Most of the implementation is written in Java, but there's a small core written in C that bootstraps the VM.
Aside from a tiny VM written in C++, nearly all of Factor (http://factorcode.org/), including its parser, optimizing compiler, and code generator, is written in itself. The author of Clay (http://tachyon.in/clay/) is working on a new version of its compiler written in itself too.
I think I read the very first implementation of Pascal was in Pascal. Which of course meant it couldn't run at all! So it ran on the second Pascal implementation: a hand translation of the first to assembler.
Sure, but I'm surprised by the "reversed" notation. Wouldn't it be
fib 0 = 1
in Haskell? I just felt that this order works well for pattern matching functions, but not as well in other contexts. No CS background here, by the way; maybe I'm just missing your point.
Both of those uses of = above are actually pretty consistent, given how Atomo's scoping and dispatch system works.
When you said "for 0, fib is 1," you could just as easily say "for the current scope object, x is Object clone." This is exactly how it works. Method dispatch is 100% pattern-matching, and Atomo's scopes are 100% message dispatch, combined with delegation.
When you say "0 fib = 1", the method is inserted on Integer. When you send a message to an Integer, you're sending (pseudocode) `Single "fib" (Integer 0)`. The methods on Integer pattern-match on that, in this case with `PSingle "fib" (PMatch (Integer 0))`. If that pattern fails, it moves on to "1 fib = ...", and finally to the least-precise "(n: Integer) fib := ...".
Not sure if that answers your question, but I thought I'd expand on it a bit.
Very close. However even though I've tried to make it look identical you can see the differences poking through. And reading through the Atomo docs there are (naturally) other divergences.
I would say that Atomo is probably more closer to Ioke (http://Ioke.org) than Io. The philosophy behind Io is to keep it small & simple. Whereas Ioke is Io + extra syntax, literals, etc baked in.
Worth keeping an eye on Atomo... as is Io & Ioke. For reference here are the other examples in Io:
File with("out-file") open do (
write("hello, world!\n")
)
fib := method (n,
if (n == 0, return 1)
if (n == 1, return 1)
fib(n - 2) + fib(n - 1)
)
list(1, 2, 3) sum
Range 0 to(5) map(* 2)