13 ms·
Elm 0.19.1
- markgall 7y agoElm has long been at version 2.5.8. Why they couldn't come up with a name that wasn't already in use I will never understand.
- duncan-donuts 7y agoI don’t understand. Can you rephrase this?
- jamil7 7y agoThe comment is a reference to an email client of the same name. A comment like this appears without fail on every HN post regarding Elm.
- m000 7y agoWhich proves the point of @markgall.
- vito 7y agoAll it really proves is HN's tendency to tear down projects for any arbitrary reason they can find.
- penagwin 7y agoHis point is completely unrelated to elm-lang. So why does it need to be made on every elm-lang thread? This is like complaining about Java every time somebody brings up Javascript.
- deleted 7y ago[deleted]
- MichaelGlass 7y agoI have recently forked the elm language to produce a much better language. please come to our discourse https://discourse.pine-lang.org https://discourse.pine-lang.org
- khuey 7y ago"elm" is also a text-based Unix email client.
- chrshawkes 7y agoNaming/branding is very important. As an example, look at Perl 6 being renamed to Raku.
- burkaman 7y agoI think it is a complaint that this language has the same name as an email client that hasn't been updated in 14 years: https://en.wikipedia.org/wiki/Elm_(email_client) https://en.wikipedia.org/wiki/Elm_(email_client)
- aeonflux 7y agoHe is complaining that elm reused name of an old email client (which wasn't updated for last 15 years, btw).
- empath75 7y agoLiterally every time elm is mentioned, someone has to point out the mail client.
- deleted 7y ago[deleted]
- phtrivier 7y agoMaybe that's a strange form of guerrilla marketing, to actually get people to use the email client ?
- papln 7y agohttps://www.merriam-webster.com/dictionary/elm https://www.merriam-webster.com/dictionary/elm First Known Use of elm before the 12th century
- hombre_fatal 7y agoI'm in my 30s and have only ever seen someone mention the Elm email client across all technical forums I've been on when commenting on Elm-the-language to suggest that other people might be confused. (Nobody is, btw) Time to move on, folks.
- KurtMueller 7y agoIt never fails that an Elm lang post on Hacker News will always have a comment about Elm the mail client.
- hellofunk 7y agoI’m not sure who the intended audience for this post is, but I’ve never known any serious or productive developer who quit learning a language just because they got hung up on a few of the trivial syntax examples in this article.
- wjsetzer 7y agoDid you read the part about survivorship bias? And on top of that, it's a blog post. Evan gave examples of really helpful error messages. I don't use elm, as I don't do webdev and I don't agree with Evan's tendancy to minimalism, but I really wish other languages had the "pair programming" aspect of the elm compiler.
- uhryks 7y agoThat and iirc Evan concieved Elm with the aim of making it an accessible language, and used (uses?) it to introduce teenagers to webdev.
- uwaces2 7y agoThe people who become a serious programmer didn't give up. I think this is a real problem with the industry as a whole. I've known a few people who gave up on programming because they were introduced to it through a language that didn't value their error messages, or that had really bad new programmer failure modes. By "new programmer failure modes" I mean a program that gives no relevant feedback to a new programmer gone wrong.
- flexd 7y agoThe point here is to improve the user/developer experience learning Elm. It's one of the things that make Elm such a nice language to work with. A error message that suggests how you might fix the problem is so useful when you are not familiar with the language or programming in general. Being able to do frontend development that /just works/ when it compiles is fantastic. I have yet to use Elm for anything serious because I mostly do backend work, but if I need to Elm would be my choice. No more 'undefined is not a function' mysteries or trying to figure out what part of the latest Javascript framework is stopping me. Elm has the basics of what you need to develop frontend applications today, even though I'm sure there is work to be done yet.
- shritesh 7y agoElm already was the gold standard when it comes to helpful error messages and it's amazing to see that they're still working to make it even better. I hope other languages follow suit.
- skohan 7y agoGood error messages can make all the difference. I haven't worked with Elm, but Rust and Vulkan (through validation layers) also have specific, informative errors and warnings like this. Both those technologies have well-earned reputations for having not-so-shallow learning curves, but that's almost not an issue when the tools always make it clear what has gone wrong.
- steveklabnik 7y agoWe (Rust) took a lot of inspiration from Elm here. One similarity to this post that sticks out: > Maybe you just try the JavaScript way to see if it works: Given that the final syntax for async/await was a bit controversial (postfix .await), the compile folks implemented parsing for (at least) the JavaScript way of doing it, and so you get a good error message telling you the correct way: error: incorrect use of `await` --> src/lib.rs:2:5 | 2 | await bar() | ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await` This kind of thing can really help polyglots, as well as people new to the language.
- methehack 7y agoIt really stands out with Elm and Rust and is much appreciated. A human/e interface to compiler errors is critical to me. It means the difference between the compiler being an ally and the compiler being an enemy (or maybe a teacher who thinks you're just a bad student and is going to give you a bad grade no matter what, not that there's any scar tissue there). Matters the world to me personally in terms of my enjoyment and flow and represents the kind of computing I want to do.
- gavinray 7y agoPolyglot developer here I have not personally had the usecase for Rust just yet, but it is the only language I have never heard a negative thing about. That's huge, with how opinionated developers are. The arguments for the language and general consensus are so strongly positive that without having used it myself I frequently recommend it (I passively follow the language's progress online). A huge part of it is the developer ergonomics, a large amount of which comes from your compiler error messages. When I talk to people about the gold standards, Rust and Elm are the examples I give. Thank you guys for all your work!
- Existenceblinks 7y agoI think Elm too much underestimates people who learn a programming language. I really like the Browser module recently.., it enables people to build more things easier, that solves serious problems people trying to use Elm seriously. I am not sure how Elm evaluates feedback from language users. Elm is too much focus on new comers, make it so new people are excited about it first week, and then get stuck on things they want to actually build, and move on.
- wjsetzer 7y agoI would love to use elm. For me, it needs more in the standard library, but this is the language that has an unzip function and removed the zip function.
- bussierem 7y agoI mean yes they don't have an explicit function that does exactly zip anymore, but that's because it's been generalized into (IMO) a much more powerful function: https://package.elm-lang.org/packages/elm/core/latest/List#map2 https://package.elm-lang.org/packages/elm/core/latest/List#m... The docs example even shows it being used as a zip.
- justinsaccount 7y agoI had similar experience. I get the core syntax of elm, but where I run into issues is how to USE things like the browser module to do routing. That isn't a syntax problem but a larger structural one.
- Existenceblinks 7y agoTrue that's biggest thing people complaining about, I'm cool with no Typeclass whatever, but to build large app it's going to have crazy boilerplate. I can't stand removing Weboscket module, that made me leave because I don't want Port to be a solution of all things.
- bussierem 7y ago
- roebk 7y agoThe error messages in Elm are fantastic. Checkout this error that came from an extra `}` via babel. It's completely unreadable and very unhelpful. Uncaught Error: Module build failed (from ./node_modules/babel-loader/lib/index.js): SyntaxError: my-file.js: Unexpected token, expected ";" (283:4) [0m [90m 281 | [39m [36mvar[39m newWidth [33m=[39m totalWidth [33m>[39m width [33m?[39m (clientWidth [33m-[39m padding) [33m:[39m (img[33m.[39mwidth [33m+[39m paddingTotal)[33m;[39m[0m [0m [90m 282 | [39m [36mvar[39m newHeight [33m=[39m newWidth [33m/[39m imageAspectRatio[33m;[39m[0m [0m[31m[1m>[22m[39m[90m 283 | [39m } [36melse[39m [36mif[39m (imageAspectRatio [33m<[39m [35m1[39m) {[0m [0m [90m | [39m [31m[1m^[22m[39m[0m
- chownie 7y agoThis looks alarmingly unreadable to me, are those terminal colour codes? Is that accidental or is that how the output genuinely appears?
- roebk 7y agoThat's genuinely how the error appears in the browser's console.
- hombre_fatal 7y agoJust looks like it thinks it's printing to terminal due to misconfiguration. Check out what went wrong or find the appropriate ansi --color/--no-color toggle.
- qwerty456127 7y agoObviously browsers should add color codes support. JS frameworks should make color output optional. But this is hardly sufficient to say the language errors are uninformative. Just a bug with a logically straightforward solution.
- iwalton3 7y agoThose are definitely terminal color codes. Here is what the output above would look like: https://i.imgur.com/4FRZ3gA.png https://i.imgur.com/4FRZ3gA.png
- triangleman 7y agoUpdate the title, this is more than just a release; the new messaging is worth reading about.
- protomikron 7y agoThat's really cool and I hope Elm keeps getting better. I like the opinionated approach it takes and I will probably build my next web UI in Elm. I just have to figure out what's the best way to wrap JS libraries, but I am sure there is a way.
- paulsmal 7y agoYeah, there's elm ports. You can send messages between JS code and Elm
- MichaelGlass 7y agoand also wrapping widgets in custom elements when that's appropriate. https://guide.elm-lang.org/interop/custom_elements.html https://guide.elm-lang.org/interop/custom_elements.html
- dorian-graph 7y agoAs much as I really like Elm (and use it professionally), the speak of making it developer/learner-friendly is humorous considering how the --debug flag was broken for ~ 1 year [1]. fyi compilation speed has had a noticeable improvement as well with this release, but is not mentioned in this blog post. [1] https://github.com/elm/compiler/issues/1851 https://github.com/elm/compiler/issues/1851
- vanderZwan 7y agoRE: compilation speed, given that it appeals to an entirely different demographic than the one being reached out to in this blog post I suspect it was not mentioned because it would only be distracting. Nice though!
- pdamoc 7y agoMentioning compilation speed needs solid data to back the claim. This would have delayed the release. To my understanding, there is some work being done on a script that would produce this kind of reliable data and a later post will be made to cover this detail.
- ananonymoususer 7y agoElm was my favorite Unix email client back before GUI-based email clients became a thing. I still think it's the best text-based email client out there. It's faster than anything else, supports Unicode, and provides a sensible user interface. It's too bad that the project name was appropriated by this (otherwise perfectly sensible) language project.
- papln 7y agoElm was my favorite tree back before Unix became a thing. It's unfortunate that projects appropriate commmon English words.
- twh270 7y agoOne character is enough to name a programming language. And how could we possibly need more than 26 languages? </tongue-in-cheek>
- coldcode 7y agoOther than B and C and D and K, what other 1 letter languages are there?
- macintux 7y agoJ and Z at least.
- mden 7y agoAlso R
- esclerofilo 7y agoWhich is an implementation of S
- iLemming 7y ago
- gregwebs 7y agoTake a look at how the prior 0.19 release makes elm projects smaller than is possible with normal JS [1]. [1] https://elm-lang.org/news/small-assets-without-the-headache https://elm-lang.org/news/small-assets-without-the-headache
- andrepd 7y ago>Say you are learning Elm and do not know how to import modules yet. Maybe you just try the JavaScript way to see if it works. Or maybe you read the documentation section "Importing modules" which takes you 5 f*ggin minutes? That's a lot less to ask than "implement very verbose error messages that talk to you like you're a baby". My opinion at least.
- hombre_fatal 7y agoWell, this kind of RTFM bravado mindset is one of the reasons every compiler has garbage errors and why manpages are more hassle than just googling "how to unzip with tar" and why so many projects can't even be fucked to flesh out a README. ("Just read the tests!") So, if that's what you want, you already have every other programming language to pick from. Let the rest of us have our fun. I've been programming for 20 years and appreciate Elm's errors every time. Why should I need to do any more work than read a compiler error when I accidentally write "import Webgl" instead of "import WebGL"?
- andrepd 7y agoI'm giving my opinion. Please understand some people think differently than you and that's fine. >why so many projects can't even be fucked to flesh out a README Not relevant. >manpages are more hassle than just googling "how to unzip with tar" Not relevant. >Why should I need to do any more work than read a compiler error when I accidentally write "import Webgl" instead of "import WebGL"? Still not relevant, since that wasn't the example given (correcting typos like this is indeed a very helpful compiler error; gcc does it for like a year or two now). >RTFM bravado mindset I really don't think telling people to learn a language instead of typing random things in hope that the compiler corrects them is being a hacker-neckbeard who tells you to rtfm. The example given in TFA is literally: "if you don't know how to import things yet, instead of reading the introduction, googling "elm import", or literally just taking 2 minutes to figure it out, just type what you would do in some other language, and the compiler will gently tell you how to import a module in Elm", or in other words "type random stuff until it works". Should the compiler also correct the user if they write `#import <set.h>`? Or `open Set`? Or `from Set import `? Again, in my opinion* this is neither relevant nor desirable.
- markdog12 7y agoGave it a whirl online, tried to change WebGL import to Webgl, thinking it wouldn't do anything helpful. It told me the lib import was prob a typo, with suggestions, and WebGL at the top: You are trying to import a `Webgl` module: 11| import Webgl ^^^^^ I checked the "dependencies" and "source-directories" listed in your elm.json, but I cannot find it! Maybe it is a typo for one of these names? WebGL Set Svg Array Hint: If it is not a typo, check the "dependencies" and "source-directories" of your elm.json to make sure all the packages you need are listed there!
- zerr 7y agoAny examples of large-ish real world apps?
- gherkinnn 7y agoThere was one mentioned on HN not long ago: Link: https://blogg.bekk.no/using-elm-at-vy-e028b11179eb https://blogg.bekk.no/using-elm-at-vy-e028b11179eb HN discussion: https://news.ycombinator.com/item?id=21204761 https://news.ycombinator.com/item?id=21204761
- jleven 7y agoI work at NoRedInk. We have over 200,000 lines of production Elm and it's going great! (Evan, the creator of Elm, also works at NoRedInk)
- seddona 7y ago100k+ at CircuitHub
- dbrgn 7y agoSmall, but real-world-ish with a JS map: https://gfrör.li/ https://xn--gfrr-7qa.li/ Still missing a lot of festures and polish though.
- zerr 7y agoEDIT: I've originally meant example sources to look at. Thanks for the replies though - also interesting :)
- Libbum 7y agoMy biggest project, it's about 6k loc. So maybe that's not what you meant by 'big', but many of the others here have listed a lot of closed source apps. https://github.com/Libbum/Odyssey/tree/master/src https://github.com/Libbum/Odyssey/tree/master/src
- Latty 7y agoI have an open source Cards Against Humanity clone web game—not huge, but not small either. https://github.com/Lattyware/massivedecks/tree/v2 https://github.com/Lattyware/massivedecks/tree/v2 That's the current development version (the master is still on Elm 0.18). You can see it in action at https://massivedecks2.herokuapp.com https://massivedecks2.herokuapp.com.
- miki123211 7y agoI hate using ^ to indicate an offending position on a line. For those unfamiliar, the idea is that you display two lines, the erroneous one, and one full of spaces, with a single ^ in it, where the ^ is directly underneath the offending character. This is bad for accessibility and screen readers. They read that the ^ is here, but actually finding out what the wrong character is is problematic. Python does this, I think Rust too, and now Elm. Just provide a column number next to the line number, just like Golang does. Any decent editor will let me check what column I'm on. The ^ can, of course, be kept for the rest, but the column number would be a welcome addition.
- DougBTX 7y agoI can’t speak for the others, but at least in Rust the column number is at the end of the first line of the error, in format file.rs:line:column, eg main.rs:5:10 There are a few example errors here: https://github.com/rust-lang/rust/issues/36611 https://github.com/rust-lang/rust/issues/36611 Are the annotated code snippets after the first line useless with screen readers? I wonder if there’s a flag to hide just the snippets.
- steveklabnik 7y agoThere is a flag to hide the snippets and give a more compact output; you can also get it in JSON, I believe.
- miki123211 7y agoseems I was mistaken, Rust seems fine. I was probably misremembering, as I haven't played much with it. The point about Python and other still stands, though.
- razze 7y agoYou can get these infos from the json the compiler provides you on errors, that's also what all editors will use to show you errors, so they are aware where the error acually is.
- mostlysimilar 7y agoI love Elm. I'm brand new to it but can't get enough. The compiler is so friendly. It feels like Evan Czaplicki is talking to me directly. :)
- sunseb 7y agoI built a project using Elm last summer. Here is my quick feedback: + The language syntax is very nice and refreshing. + It's a joy to work with the compiler. + If it's compiling, it's working! No runtime exceptions. + Static typing! + Functional programming! - The language doesn't have component composition (like in React or Vue) and you end up having huge chunks of spaghetti code (but to be fair, it kind of works because of the compiler). - It's complicated to implement routing and to build a Single Page Application. - Only pure functions in Elm, so doing API calls and generating random numbers are unnecessary hard. - It's a pain to parse JSON. - There is no variable shadowing, so naming your stuff is harder than it should be. - Vue embraces HTML, Elm avoids HTML, and it's really a pain to build HTML view in Elm. <div><a href="hello">world</a></div> becomes div [] [ a [ href "hello" ] [ text 'world" ] ] - There is a lack of leadership and community building in this project. We don't know what's going on and where the project is going. It's like a black box. No roadmap. All issues on Github, all posts on Elm Discourse get no response. So in the end, Elm is an interesting beast, but I think it's too academical and not really practical for serious projects.
- toastal 7y agoHAML and Pug/Jade got popular precisely because HTML/XML is harder to read and easy to make mistakes with all the closing delimiters you need. Making HTML a function with two arguments for virtual DOM is simpler than needing to make an XML parser with special rules ala JSX where people constantly get hung up on className, etc., which compiles to this same binary functions you use in Elm is API. Pure functions are definitely a selling point. Random number generation needs to be in an isolated part of your app unless it's a toy. Because it deals with IO much like reading from disk, it should have a "hard"-ness to it.
- deleted 7y ago[deleted]
- sunseb 7y agoOk let's see. Please can you convert this Vue code into Elm code? https://pastebin.com/trFAuJ7T https://pastebin.com/trFAuJ7T Good luck!
- MohitKumar2020 7y agoCjf
- reimertz 7y agoI remember meeting Evan back in 2013 when we both rented rooms in the same apartment. I didn’t see him much but the first time he introduced himself, I got to see an early version of the Mario demo. I can still remember how I didn’t understand a thing ( was just starting my internship) but still knew that he would achieve great things with Elm. So happy to see him succeed and being able build such an amazing community just by being himself. Finally, I love how his personality has become a part of the language, most obvious when reading error messages.
- quickthrower2 7y agoAah! I just saw this on my terminal after a routine install of elm-live on a different machine: Your elm.json says this application needs a different version of Elm. It requires 0.19.0, but you are using 0.19.1 right now. Smile to my face! So I came here. Awesome :-).
- jweir 7y agoOur application is mostly Ruby, but any interactive front end is now written in Elm. The one problem, for us, is when there is an Elm project the developers _not_ working on it are jealous of the developers who are. It is fun to work with. I think it because the compiler is freeing your brain from trivial issues and allowing the brain to focus more on creative problem solving.
- lolc 7y agoI really appreciate the focus on helpful messages in Elm. When working with it I'm recurringly surprised at how the computer seems so considerate for once. Time well spent!
- Karupan 7y agoI’ve been using Elm for about a year now. It’s my go to for most UI work these days. However, my main concerns have been around: 1. How community contribution is handled. I’ve been following the compiler repo for a year now, and the number of bug reports (and PRs) that remain open is concerning. I get it - they want to move slow and be deliberate in the way it is developed. But fixing well known compiler bugs shouldn’t take a year. Makes it harder to sell to dev teams. 2. Using private packages. I know there have been workarounds (including multiple src directories tracked via git), but they feel hackish. I’ll continue using Elm for personal projects, but it is still a hard sell.
- G4BB3R 7y agoWhat is your approach to UI? Elm Css, Elm UI or separated css files?
- Karupan 7y agoI've used elm-css-modules-loader[1], although haven't tried it with Webpack 4 yet. Since my CSS is usually small (< 300 lines), I prefer a standalone stylesheet. [1] https://github.com/cultureamp/elm-css-modules-loader https://github.com/cultureamp/elm-css-modules-loader
- mordrax 7y agoWe here at Pacific Health Dynamics, Sydney, Down Under want to give a big thanks to Evan and the core team for all your hard, free, work! We've recently hit 100k loc for our main frontend written all in Elm. The journey from inception 2.5 yrs ago has been amazing and now we're in full production mode, reaping the rewards of purity and the type system.
- fortran77 7y agoWe used Elm for our web client and loved it. None of us in our company are "web people" -- we're low-level C++/CUDA folks (and Erlang for network code) -- but we needed to have a public facing web interface. Elm worked great, and we had no problem having several developers contribute to the same project without stepping on each other, with everyone able to read each other's code. It's been 100% stable, predictable, and reliable. And, yes, we're calling JavaScript via ports. Works well.