Live data from Hacker News

Lumo – A fast, standalone ClojureScript REPL that runs on Node.js and V8

anmonteiro.com

71–78 of 78 posts

Re: Lumo – A fast, standalone ClojureScript REPL that runs on Node.js and V8

#71
post #65
post #57

Earlier quoted context omitted.

I never found the funcall argument terribly convincing, because there is no reason it couldn't be much more concise. And it allows you to avoid silly variable names like lst or fst. In Common lisp to refer to a function as a variable you do (function f) or as (read-table) syntactic sugar #'f. You could easily use destructuring to write HOFs without funcall. So instead of requiring people to write (defun bad-map (f li…

In Common Lisp in your first example it's not (funcall #'f (first list) ...) but (funcall f (first list)) ... f is already a function object. We could write a macro for that or a new version of defun. Here just a macro lisp1fy: (defmacro lisp2fy ((&rest calls) &body body) `(flet (,@(loop for (f . args) in calls collect `(,f ,args (funcall ,f ,@args)))) (declare (inline ,@(loop for (f . nil) in calls collect f))) ,@bo…

Yeah, braino -- thanks. A custom binding form would be another way to do it, but I'd prefer the pseudo-destructuring -- cleaner and more concise. I'd hope a new lisp-2 dialect would come with better destructuring support for defun and binding forms anyway (destructuring-bind, multiple-value-bind and flet could all be subsumed by let if (values ...) (function ...) where valid left hand patterns).

Re: Lumo – A fast, standalone ClojureScript REPL that runs on Node.js and V8

#73
post #70

Earlier quoted context omitted.

I think shared memory is foundational to Clojure's approach to concurrency, and that is something the Erlang VM cannot provide. So some main fixtures of Clojure's standard library, like atoms, STM, agents, become either useless or nonsensical. It's also not clear to me wether the Erlang VM provides what Clojure needs to efficiently implement its user-defined types, protocols, etc That said, a Clojure-like dialect of…

How about targeting Go instead?

Like via transpilation or what? LLVM would be a more natural choice if looking to compile to native.

Re: Lumo – A fast, standalone ClojureScript REPL that runs on Node.js and V8

#74
post #70

Earlier quoted context omitted.

How about targeting Go instead?

Like via transpilation or what? LLVM would be a more natural choice if looking to compile to native.

Yes but it doesnt have a concurrent garbage collector.

Re: Lumo – A fast, standalone ClojureScript REPL that runs on Node.js and V8

#75
post #33

'fastest starting Clojure REPL'... which is still slow compared to alternatives.

Serious question: Why are you such a hater?

Every time Clojure comes up I can rely on you to appear and attack something about it (but never the core merits of the language, as far as I can recall.)

Re: Lumo – A fast, standalone ClojureScript REPL that runs on Node.js and V8

#76
post #36

The startup time is of course very low, so that's good. I think you're underselling the tool for beginners like myself - it's not just a ClojureScript REPL, it's actually an executable which can run node.js scripts written in clojurescript. For example, here's the typical node http server example: https://gist.github.com/anonymous/c14b2b57184c650d9f3ff0a9e1... You can run it with lumo test.cljs

How do I add Clojurescript libraries to my script? Doesn't that require a lein/boot cljs project?

lumo -c `boot show -c`

Re: Lumo – A fast, standalone ClojureScript REPL that runs on Node.js and V8

#77

Earlier quoted context omitted.

I think shared memory is foundational to Clojure's approach to concurrency, and that is something the Erlang VM cannot provide. So some main fixtures of Clojure's standard library, like atoms, STM, agents, become either useless or nonsensical. It's also not clear to me wether the Erlang VM provides what Clojure needs to efficiently implement its user-defined types, protocols, etc That said, a Clojure-like dialect of…

Mnesia is sorta like STM in Erlang.

Actually no, it is completely different internally with different properties.

Re: Lumo – A fast, standalone ClojureScript REPL that runs on Node.js and V8

#78
post #26
post #6

Earlier quoted context omitted.

If I remember correctly, LFE is a Lisp2 Joxa (just like Clojure) is a Lisp1, thus maybe more apt http://joxa.org

I'm curious, what are the practical differences? I know what the theoretical differences are, but do you have any experience with how lisp1 and lisp2 are different in daily use?

I just felt that as you can many functions with the same name but with different arities (number of args) at the top-level why shouldn't I be allowed to have it deeper down as well. Also this means that I can only sometimes refer to a function with just its name, when it is at the top-level you need need both name and arity.

This means that Lisp-1 doesn't really fit anyway so why let it limit you?

Post reply on HN