Live data from Hacker News

Clojerl – Clojure for the Erlang VM

github.com

91–100 of 105 posts

Re: Clojerl – Clojure for the Erlang VM

#91
post #2

That’s very cool. I’ve added Clojerl to my list of alternative languages on the BEAM: https://gist.github.com/macintux/6349828#alternative-languag... Given the extent to which the Erlang VM is optimized for immutable data, network transparency, and message passing, I can see why Clojure on the JVM and CLR would not have had the same success with the actor model as Erlang has.

I like your list, but one thing that would be helpful for me is in the alternative languages available on the BEAM, make the distinction between those implementations which are "BEAM languages" vs those that are simply implemented on the BEAM. For example, Elixir is a proper BEAM language that targets the BEAM directly in a compile step.... but Luerl is not: Luerl is basically a Lua interpreter written in Erlang. I w…

I think if I were running this as a repo with the possibility of pull requests I’d get more granular, but I can rarely be bothered to do much more than occasionally add a link.

To be pedantic, btw, Elixir compiles to Erlang Abstract Format, not the BEAM itself.

Re: Clojerl – Clojure for the Erlang VM

#92
post #89

Earlier quoted context omitted.

This seems like an argument being made backwards. > Most (all?) large systems developed using Erlang make heavy use of C for low-level code But they use C... because Erlang is too slow. Erlang isn't slow because they use C. This is actually an argument for the need to make Erlang faster - we've got proof it's not fast enough for what they want to do! And the worst thing is that when you start to use C code it's them…

Isn't that how all scripting languages became viable, they provided fast C extensions where it mattered the most. I.e. dropping to C for performance is by design.

Yes it made sense at the time. But now look at Ruby where they're trying to add a better GC and JIT because people want more speed - they're severely restricted in their options by the design of the C extension API.

Re: Clojerl – Clojure for the Erlang VM

#93
post #87

Earlier quoted context omitted.

> Why doesn't it have… Perhaps because it wasn't intended to be used for everything — "What sort of problems is Erlang not particularly suitable for? … Most (all?) large systems developed using Erlang make heavy use of C for low-level code, leaving Erlang to manage the parts which tend to be complex in other languages, like controlling systems spread across several machines and implementing complex protocol logic." h…

This seems like an argument being made backwards. > Most (all?) large systems developed using Erlang make heavy use of C for low-level code But they use C... because Erlang is too slow. Erlang isn't slow because they use C. This is actually an argument for the need to make Erlang faster - we've got proof it's not fast enough for what they want to do! And the worst thing is that when you start to use C code it's them…

Seems like an intentional separation of concerns.

> But they use C... because

They use C because they think it's a good tool for some things.

http://erlang.org/doc/tutorial/c_port.html

Re: Clojerl – Clojure for the Erlang VM

#94
post #89

Earlier quoted context omitted.

Isn't that how all scripting languages became viable, they provided fast C extensions where it mattered the most. I.e. dropping to C for performance is by design.

Yes it made sense at the time. But now look at Ruby where they're trying to add a better GC and JIT because people want more speed - they're severely restricted in their options by the design of the C extension API.

[deleted]

Re: Clojerl – Clojure for the Erlang VM

#95
post #59
post #57

Earlier quoted context omitted.

There is no doubt that JVM can provide massively better performance for a lot of stuff, but I wouldn't be suprised if Beam kicked JVM's butt in at least some areas. It's pretty much the only system I know of that provides for massive numbers of fairly scheduled, preemptive green threads. To do so it makes trade-offs that are not generally attractive, but I'd be surprised if it didn't beat the JVM here.

I would be. BEAM is just a very slow platform, not just compared to Java, but also compared to JavaScript and Go. Again, that's not to say it's not very useful for some things (although many Erlang apps are really mixed Erlang/C apps because of BEAM's performance). Hey, CPython is really slow, too and yet very useful. Green threads is another matter as it's not a feature that currently exists on the Java platform (th…

I appreciate the work you are doing on Loom. As someone who has done production Erlang code in the past and presently has to code in Java, I eagerly await the day that Loom becomes production ready.

What are your thoughts on Pony (https://www.ponylang.io/)?

Re: Clojerl – Clojure for the Erlang VM

#96
post #78
post #68

Earlier quoted context omitted.

Yeah, but lightweight threading is a built in primitive in BEAM, so if you only measure scheduling overhead it is very low, but once you do any work inside those processes, it runs like any code running on low-performance runtimes. The isolated heaps are also OK, but the modern JVM GCs would still give you lower latency even with a shared heap. BEAM, CPython, MRI Ruby and other low-performance runtimes get the job do…

Don't forget Fibers - coming to a JVM near you soon!

Hard for him to forget that -- take a look at who you're responding to.

Re: Clojerl – Clojure for the Erlang VM

#97
post #2

That’s very cool. I’ve added Clojerl to my list of alternative languages on the BEAM: https://gist.github.com/macintux/6349828#alternative-languag... Given the extent to which the Erlang VM is optimized for immutable data, network transparency, and message passing, I can see why Clojure on the JVM and CLR would not have had the same success with the actor model as Erlang has.

> I’ve added Clojerl to my list of alternative languages on the BEAM

Nice!

As a bit of a shameless plug, I have an entry for your list: https://otpcl.github.io/ (GitHub repo: https://github.com/otpcl/otpcl)

Re: Clojerl – Clojure for the Erlang VM

#98
post #59

Earlier quoted context omitted.

I would be. BEAM is just a very slow platform, not just compared to Java, but also compared to JavaScript and Go. Again, that's not to say it's not very useful for some things (although many Erlang apps are really mixed Erlang/C apps because of BEAM's performance). Hey, CPython is really slow, too and yet very useful. Green threads is another matter as it's not a feature that currently exists on the Java platform (th…

I appreciate the work you are doing on Loom. As someone who has done production Erlang code in the past and presently has to code in Java, I eagerly await the day that Loom becomes production ready. What are your thoughts on Pony ( https://www.ponylang.io/ )?

I just saw a couple of talks about it. Seems very interesting (more interesting to me than Rust), but I think it's too opinionated to gain much attention in this climate.

Re: Clojerl – Clojure for the Erlang VM

#99
post #47
post #3

Why would I use this over elixir?

Another reason might be the "cultural" aspects of Clojure, and their impacts on its ecosystem - in particular simplicity and stability are paramount, whereas the Elixir ecosystem seems to put more emphasis on immediate ease of use and elegance à la Ruby, at the cost of doing some "magical" designs which you tend to not see in the Clojure ecosystem.

How exactly is stability not paramount in Elixir? It runs in the BEAM.

Re: Clojerl – Clojure for the Erlang VM

#100

Earlier quoted context omitted.

Just curious--what don't you like about Elixir's syntax?

It's been a while since I looked at Elixir but the different syntax for invoking named functions vs lambdas really left a bad taste in my mouth... Also I remember trying to do something with the pipe operator that I couldn't get working due to the syntax of the language but which would've been trivial in Clojure using one of the threading macros.

Pardon me for saying it but it sounds like you tried for 5 minutes, gave up because it's not familiar to you, and then said you don't like the pipe operator.

You might have wanted to say something else but this is how you sounded to me. Am I wrong?

Post reply on HN