Live data from Hacker News

Atomo, the programmer's programmable programming language

atomo-lang.org

1–10 of 37 posts

Re: Atomo, the programmer's programmable programming language

#3
post #2

0 fib = 1 1 fib = 1 (n: Integer) fib := (n - 2) fib + (n - 1) fib Reading the first line as "For zero, 'fib' is 1" is surprisingly intuitive. Not sure if this translates to something like x = Object clone though. Maybe some conventions shouldn't be touched?

http://en.wikipedia.org/wiki/Pattern_matching

Re: Atomo, the programmer's programmable programming language

#4
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?

Re: Atomo, the programmer's programmable programming language

#5
post #2

0 fib = 1 1 fib = 1 (n: Integer) fib := (n - 2) fib + (n - 1) fib Reading the first line as "For zero, 'fib' is 1" is surprisingly intuitive. Not sure if this translates to something like x = Object clone though. Maybe some conventions shouldn't be touched?

http://en.wikipedia.org/wiki/Pattern_matching

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.

Re: Atomo, the programmer's programmable programming language

#8
post #5

Earlier quoted context omitted.

http://en.wikipedia.org/wiki/Pattern_matching

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.

Re: Atomo, the programmer's programmable programming language

#9
post #5

Earlier quoted context omitted.

http://en.wikipedia.org/wiki/Pattern_matching

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.

It would be. My bad, I thought you were talking about the concept not the order of things.

I'm not sure how I feel about it, to be honest. But I do love me some pattern matching...

Re: Atomo, the programmer's programmable programming language

#10

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.

Post reply on HN