HNHacker News
TopNewBestAskShowJobs

rvirding

486 karma · joined October 6, 2007

Hello Robert
submissionscomments
rvirding··on Ask HN: On Rob Pike's Concurrency is not Parallelism?
"I love Erlang but I cannot get the past the syntax."

I cannot understand this hangup about syntax. Syntax is the easiest thing to learn with a new language, you just look it up. It's the semantics and usage where the real problems are.

Erlang doesn't have static typing, it is dynamically typed. It has always been dynamically typed.

And however you look at it doing highly concurrent systems with processes is much easier. And who says that processes imply "parallel access to shared memory"? Quite the opposite actually.

rvirding··on C10K 2012: Erlang Wins, Go a close second. Java, Haskell, Node & Python fail
I am not competent to judge the tests Eric used. But the obvious reply to those who complain about his test for some language is to fix it and come with an improvement which you feel better represents that language. It's all on github so fork it and come with a pull-request.

To say it bluntly, "put your money where your mouth is".

rvirding··on Luerl - Lua on the Erlang VM
There are a number of reasons why I did this:

1. I want to experiment with implementing an imperative language with mutable global state on top of Erlang. A goal was to do it in straight Erlang without extensions.

2. I am giving a talk on implementing DSL's on Erlang at the next Erlang Factory in San Francisco in March, http://www.erlang-factory.com/conference/SFBay2012 (be there, it's going to be good, the whole factory I mean), and I wanted to be able to give practical experience from implementing a real-life imperative mutable data language. Lua is a nice, small, relatively clean language and is a good choice for this. And it is actually in use. I was also considering PHP or Javascript but they are definitely not small and clean.

3. Lua is an interseting language in its own right and has some cool ideas. You can get quite far with a few simple primitives. I don't know if these would be transferable to Erlang.

4. I like implementing languages.

While erlua is definitely interesting it is "just" an Erlang interface to a standard Lua system and not what I was after. I know that this idea is being used in some commercial systems so it is definitely a viable option.

Whether this is of any practical use I don't know. For doing large amounts of Lua execution then a solution like erlua is probably better as the straight lua implementation is faster than luerl can ever be; doing mutable data in an immutable environment is not free. However, the interface between Erlang and Lua in luerl is definitely faster so for smaller amounts of work it may be better. There is also the benefit of while there are many languages there is only one system running them. Could lead to easier maintenance.

This only a first version and there is much still to do. I am experimenting with different ways of implementing Lua's mutable data and I am looking at compiling the Lua code down to native Erlang machine code; the current version is an interpreter. There are also some language features left to implement. More libraries would help.

That is the status as it stands. My goal is to have a system where people could take their Lua code and just run it in luerl.

rvirding··on New chapter of Learn You Some Erlang
There is a lot of documentation of Erlang/OTP in the standard distribution and on the erlang.org site, both describing the various libraries and the philosophy behind OTP. Though I will freely admit that some of it can be difficult to find, especially in the beginning. And release handling and upgrades have been a bit of black magic, though that has improved now.
rvirding··on Functional Programming Is Hard, That's Why It's Good
We know, we know. BUT no one has come up with a better syntax that really works, all the time. There have been suggestions but none have really worked.
rvirding··on How and Why Mixpanel Switched from Erlang to Python
Seriously, it would be interesting to see your code. As an Erlang inventor/developer it would be interesting to see how the language is actually used and how that relates to the problems people have.

I agree that not having Erlang competence in your company IS a good reason to change language.

rvirding··on Ask HN: An Acceptable Erlang
LFE is still very much alive and I work on it when I have the time.
rvirding··on Ask HN: An Acceptable Erlang
If you view the comma and semicolon as separators instead of terminators it works much better. It is also what they really are.

A semicolon separates two clauses, either two if/case/receive clauses or two function clauses and means or. Either choose the first clause or the clause following the semicolon. An if/case/receive is terminated with an 'end' while a function is terminated with a dot.

Fred Hebert, the author of Learn You Some Erlang, wrote this on syntax: http://ferd.ca/on-erlang-s-syntax.html

rvirding··on Job Security Through Code Obscurity
Yes, wonderful. Shows the true power of OO.
rvirding··on Erlang vs. Scala
Erjang is looking good, they have almost implemented the full functionality in the standard BEAM implementation. You can quite happily run distributed Erjang together with distributed Erlang BEAM, it is very impressive. As LFE (Lisp Flavoured Erlang) runs without problems on Erjang (it would be surprising otherwise) this means that there is now another Lisp on the JVM.
rvirding··on Erlang vs. Scala
While the dictionary itself is mutable the data in it, both keys and values, is immutable like all data in Erlang. It is the same with ETS tables which behave more or less like processes, the data in them is also immutable.
rvirding··on Erlang - overhyped or underestimated?
I do get tired of the Erlang syntax complaints. Why should a language syntactically look like another language if the semantics are different? Erlang and Java are very different languages so why should they look the same? IMAO this will be even more confusing than having to learn a new syntax. When teaching Erlang we have problems with '=' and that though it looks a assignment it is really a match with completely different semantics.
rvirding··on Erlang - overhyped or underestimated?
The language has very definitely moved on and lost ALL of the defining features of Prolog except for some syntax elements. It only resembles Prolog in a very superficial way, mainly that variables start with a capital letter. The semantics are completely different.
rvirding··on Lisp Flavored Erlang
The best place to get LFE is https://github.com/rvirding/lfe .
rvirding··on A response to "Erlang - overhyped or underestimated"
I find that the actual moving of code is the least of my worries when writing a program. It's working out what to move which takes much longer time.
rvirding··on Ask HN: What have you built with Erlang?
Where did you get all that from? Erlang was never intended for research but as a tool for writing real switch applications. Yes, the original Prolog interpreter was slow, but that has not been used for almost 20 yrs. We never had "big iron" computers to play with, and never really needed them either as the system has been efficient enough to run on computers that were cost effective for the actual applications. The implementations have always been optimised for applications that are highly concurrent and extremely fault-tolerant, like telephone switches. Yes, it was a bit slow in being able to use more cores but that was because Ericsson, who still maintains the BEAM implementation, did not have need of it. Now, it will take as many cores as you can throw at it, and be able to use them if you have written a truly concurrent application (Amdahl's law). Transparently too.
rvirding··on Gödel, Escher, Bach: A Mental Space Odyssey
Why are all the fun courses so far away?
rvirding··on Apple bans modular programming - Game of Life implementation not allowed
Of course you can. The emulator is hand-coded in C so it is perfectly legal to run it. Now compiled erlang code is just binary data, the emulator handles it as such, and it isn't illegal for an app to generate data. So what is the problem?
rvirding··on [dead]
We get a different CNN in Europe which seems to contain more news and less celebrity gossip. It is actually worth viewing.
rvirding··on Follow up to "Functional Programming Doesn't Work"
Agreeing with @pwnstigator I think the important thing is to separate the pure functional code from the impure code with side effects. And be very explicit that this code is impure and does change state so when you use it you must take this into account. If this is done properly you generally find that the impure code need only be a small portion of the whoe program.
rvirding··on Erlang for Skeptics
The only time it is sensible to do this with variable names is when they are some form of logical progression, for example when threading a state variable through the code which may be modified.

  f(..., State0) ->
    {A,State1} = foo(..., State0),
    {B,State2} = bar(..., State1),
    {C,State3} = baz(..., State2),
    Res = fubar(A, B, C, ...),
    {Res,State3}.
Otherwise you just create confusion.
rvirding··on Erlang for Skeptics
It is as you say, you must make a choice, trying to have both becomes very confusing. In LFE (Lisp Flavoured Erlang) I went the other and added proper scoping. It is the lack of scoping which I consider to be the most confusing and has caused some strange features.

Having mutable variables is definitely possible but I don't really see the problems with immutable ones. You get used to it very quickly.

rvirding··on Is this a new high or low for XKCD?
The ultimate revenge, wonderful.
rvirding··on Real Programmers...
A true classic, and wonderfully funny. Though I prefer tea.
rvirding··on Implementing Functional Languages: A Tutorial
I think "The Implementation of functional Languages" by Simon PJ is better, a real aha book. It is also available on-line for free. Though the one mentioned here is newer.
rvirding··on Yay! Hacker News is on a new and improved server now.
Perhaps if they had been running Erlang on the server you wouldn't have had to take the site down while migrating to a new server. Sorry just had to point this out
rvirding··on How Erlang evaluates funs (i.e. lambdas)
This is code from the erlang interpreter, erl_eval. It takes the abstract syntax of the code for a fun and returns a "real" fun which when called will interpret the code. This means that the fun which is returned can be called by compiled code, any code for that matter, as if it were compiled.

It has absolutely nothing to do with the code the compiler generates for a fun.

rvirding··on Queue Magazine: The Concurrency Problem (Many good articles)
The Erlang article here by Jim Larson is very good.
rvirding··on Parkinson's Law (On Amazon reader, but the book is excellent)
A truly brilliant book!
rvirding··on Ask YC: Intact Medieval Towns?
Yes, definitely see Visby if you can: http://en.wikipedia.org/wiki/Visby
← PreviousPage 4 of 5Next →