News for hackers. Stuff that matters.
Re:Show HN: a lexer, parser, interpreter and web runtime (np... by akkartik on Sunday March 17, 2013 @06:53PM (#5391431)
I'm curious: why did you choose the lisp-like (f x) syntax for function calls?
Re:Show HN: a lexer, parser, interpreter and web runtime (np... by Udo on Sunday March 17, 2013 @07:12PM (#5391508)
The short answer is: I wanted to experiment and do something different. I thought it was worth looking into the fact that we've become so accustomed to the f(x) form, when more logically the function should form a more obvious unit with its parameters.

However, I have to admit that it still takes some getting-used-to even for me. Maybe there is something about f(x) that is inherently more readable then (f x), but I'll reserve my judgement for a week weeks.

Re:Show HN: a lexer, parser, interpreter and web runtime (np... by goldfeld on Sunday March 17, 2013 @08:09PM (#5391678)
I have been coding CoffeeScript for a while and slowly got rid of it's parentheses down to doing `do someFunction`. When I learned about Clojure and got excited to learn it (but haven't yet), I also gradually shifted my aesthetics to using (someFunction param1, param2) in CoffeScript every time that was needed for making it unambiguous (e.g. chained function calls), and now I consider someFunction(param) a most hideous invocation. But (fn x y) is even nicer. I have noticed you allow for optional commas when invoking multiple parameters.

Overall I love your syntax decisions, maybe I'm partial for liking lispy-ness and lambda syntax, but still it's refreshing to see someone experimenting beyond all the C-ness that pervades us. I feel like there's a dash of Rust and a sprinkle of Haskell too. Nice work! And if you keep development I might actually consider using this for a project or two in the future.

Re:Show HN: a lexer, parser, interpreter and web runtime (np... by Udo on Sunday March 17, 2013 @08:20PM (#5391709)
> I have noticed you allow for optional commas when invoking multiple parameters.

Yes, but they're thrown away by the lexer. I'm actually still on the fence about some of these details.

> And if you keep development I might actually consider using this for a project or two in the future.

That's great to hear, thanks! There is still a TON of bugfixing and fleshing-out of the runtime library to do, but when it's ready I'll be doing a project with it as well. Gotta see how it all holds up under pressure!

Re:Show HN: a lexer, parser, interpreter and web runtime (np... by stormbrew on Sunday March 17, 2013 @07:42PM (#5391610)
I don't think I've seen it argued before that (f x) is a more obvious form than f(x). Usually the argument for (f x) is premised on a lisp-based idea of homoiconicity (code/data parity).

The reason f(x) seems more obvious in meaning, to me at least, is that f is a thing and (x) is a message or application I'm giving it.

Re:Show HN: a lexer, parser, interpreter and web runtime (np... by pash on Sunday March 17, 2013 @09:30PM (#5391882)
The traditional syntax really falls down when your functions are curried and you want to do partial application. In that context, as in Haskell, the f x_1 ... x_n syntax is as natural as it gets.
Re:Show HN: a lexer, parser, interpreter and web runtime (np... by akkartik on Sunday March 17, 2013 @07:15PM (#5391514)
I'll be curious to hear more over the coming weeks. Email in profile.

(I have a dog in this fight, but I'll avoid saying more right now and wait for you to settle on a position :)