24 comments

[ 0.26 ms ] story [ 82.0 ms ] thread
Can anyone explain what might need a HTTP request here?
Most likely lazy-loading libraries
Libraries for adding numbers, apparently?
+ is specified in the core library, so yeah.
Yep, lazy-loading core libraries.
Naive question: How does Elm manage to bootstrap a complex thing like a REPL without using basic functions like '+'?
The REPL is written in Haskell.

Elm doesn't target native or node.js yet.

I wonder how a programmer from the 80s would react if they were given a time machine and this was their first experience with modern programming.
"I saw that debate yesterday – you people don't deserve these beautiful screens. Ohhh, glorious glorious pixels!"

"Oh, you're only downloading the software you need, when you need it, from the network? That's smart, you must be really smart to fit all these pixels into 640k"

"Who cares if everyone will need the 'core'. Back in the 80ies the rule is: if you can avoid a goto, doso!"

You can download your programming environment through a ubiquitous computer network instead of mail ordering a set of floppies? That's amazing!
I think they might be feeling quite at home.

It's not like dumb thin clients and mainframes would be a new thing.

Fitting. Elm's website and docs won't load without JS as well.
Probably because it's written in Elm ...
"This is true for the very first expression. That's because it is downloading packages and building everything. After that, it has all that information, so it's faster." - https://github.com/elm-lang/elm-repl/issues/128#issuecomment...
It still seems to need to at least check for the latest version after that first install, I have a ~4 second wait before evaluation of the first expression on every single launch of the REPL while it hits up their package server.

And if you have no internet connection or the package server is down, the REPL will not evaluate any expressions at all, it just shows an HTTP error message on every input (after a timeout).

The only option for offline usage seems to be running the REPL inside a configured elm project directory which has had the core packages downloaded/installed: https://github.com/elm-lang/elm-repl/issues/54

Is this bad since it can't execute a simple command without a library? Or is it good since the error message was so descriptive?

If the consensus is "bad": I imagine at some point elm made the decision to make things highly modular (something which people usually like) and lazy (another thing people generally like), so why are those things a problem in this case?

Update: Mostly what I'm observing here is that the tweet basically implies that the author(s) of elm should be ashamed of themselves for designing (free) software that is so obviously wrong. Publicly shaming projects like this is dumb. I'm not convinced it's ever accomplished anything other than kicking off big flame wars. He should open or contribute to an issue ticket for the elm project. Otherwise, he should just stop using the software if he doesn't like it.

Because those are terrible ideas when applied to the core functionality of an application.
Specifing + in a (the! core)library that has to be loaded(over the network)...

You can call it highly modular. Or you call it functionless. IMHO isn't that in any balance.

I think it's possible to view the tweet as general bemusement rather than an attack, though I obviously don't know exactly what is intended. The next tweet is "I'm sure there's a perfectly rational explanation for why this happens, but it's logged in an issue on Github, which I cannot read".

I mean, it is a bit amusing to get an HTTP error as a result of asking a local interpreter to perform addition.

I'd say it's not unusual for modern languages, particularly those integrating package managers, to lazyily download libraries and/or check for updates on the first run of a REPL. But it is a bit odd or unexpected that elm's REPL requires a network connection for every launch and doesn't fall back to a cached copy of the core library packages from a previous run when the connection fails.

Hmm. If it is indeed the case that elm doesn't cache library downloads, that does seem a bit strange. I can't say that it is though since I don't use it.