Atomo, the programmer's programmable programming language
1–10 of 37 posts
Re: Atomo, the programmer's programmable programming language
#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?Re: Atomo, the programmer's programmable programming language
#30 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?
Re: Atomo, the programmer's programmable programming language
#4Re: Atomo, the programmer's programmable programming language
#50 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
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
#6Getting the source right now to see what's inside.
Re: Atomo, the programmer's programmable programming language
#7Re: Atomo, the programmer's programmable programming language
#8Earlier 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.
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
#9Earlier 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.
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
#10This 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?
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.