Skip to profile content
  • I don’t think it has a standard name, but I use that kind of structure in the compiler for canonicalization. For canonicalization, I want to show errors for all names that have typos, so the errors are all collected. Perhaps interestingly, I believe my version of this structure does not follow “the…

  • The elm compiler sorts the fields alphabetically in the generated JS. No need to worry about this JS detail in Elm code! The current record update function also preserves the field order in JS.

  • This was work by Max, and I never got too into the particular algorithm details. That said, I believe it was something about “getting enough randomness” for a uniform distribution over a given range. If you have 32-bits to produce 32-bits, it seems like you’d have to go in a predetermined order if …

  • I wrote a parser for Elm types a while ago, so maybe it would help to read through that code: I do not know the specifics of your assignment, but maybe there will be some techniques in there that are relevant! Aside: If you have parentheses around each And, Or, Implies, and Equal, that makes thi…

  • Oh, I thought of another thing! Most data structure performance focuses primarily on speed, but in the browser, it is important to also consider the code size. So a change that (1) improves performance of a certain function and (2) increases code size may not be worthwhile for a “general purpose” i…

  • I still think that is a really interesting project! I recommend giving it a shot if you are interested! Between charting libraries like elm-charts and raw SVG for visualizing certain structures, I personally feel like a really cool interactive learning resource is possible, and I still haven’t seen…

  • Hey @dandrake! This topic can be tricky without a good intro to stack usage, so check out this explanation of “tail call elimination” to learn why the current code is causing issues in the browser: https://functional-programming-in-elm.netlify.app/recursion/tail-call-elimination.html It outlines t…

  • My exploratory compiler work has been going very well! It has been great to work like I used to back in 2011 and 2012, and I wanted to share some of the technical results to give a better idea of what I have been up to. The ideas I will cover here are: dense binary format for Elm types to minimiz…

  • @albertdahlin, I would recommend looking into papers on “effect systems” and “effect types” to get a sense of the ideas that have been tried out. I remember really liking Koka from Daan Leijen, and Elm’s records are based on one of his earlier papers. Two potentially interesting data points: When…

  • Hello @AustinNar, exciting to see discussion of this topic! On the join question, at some point I explored some different options and l personally like the path of using tuples to combine the records. So joining { name = "tom", x = 3, y = 4 } and { name = "tom", age = 52 } on the name field would …

  • The plan is to add an equatable constrained type var. I thought people knew this from the error: Error: Trying to use `(==)` on functions. There is no way to know if functions are "the same" in the Elm sense. Read more about this at: https://package.elm-lang.org/packages/elm/core/latest/Basics#== w…

  • Say that forall x it is true that f x == g x using simple structural equality on the return values. Should f == g? (Q1) Seems reasonable, but then you have to prove arbitrary function equality. So you can choose “no” for technical reasons, but shouldn’t (\x -> x + 1) equal (\x -> 1 + x)? (Q2) It s…

  • I believe you’d need to install a 32-bit version of GHC (a Haskell compiler) and then build the Elm compiler from source. I think the Dockerfile linked from @mattpiz gives a rough outline of what that’d be like, though it’ll be up to you to find a version of GHC that can produce 32-bit binaries on …

  • I really identify with @madasebrof’s experience, so I wonder if there are defaults that would work for a broader range of people. For example: Suppress red squiggles for a declaration if the cursor is present. (Maybe only triggering full compilation when transitioning between declarations, so may…

  • I recall looking into batch for both Html and Attribute when I was implementing elm/virtual-dom, and I recall a few considerations that led me to not add it at the time: It’s would be quite difficult to implement efficiently. I do not recall the exact specifics, but I think it clashed with certai…

  • Earlier today I participated in a panel discussion with Jeff Bezanson of Julia and José Valim of Elixir. https://www.twitch.tv/videos/902104971 I thought it was really interesting to hear their stories, and I was happy to hear how José figured out how to get more full-time work on Elixir. I have b…

  • Here’s the panel discussion I mentioned earlier. https://www.twitch.tv/videos/902104971 That is a venue where I felt comfortable talking more freely about some of the topics in this thread. I certainly found it interesting to hear from Jeff and Jose.

  • I remember seeing that traffic simulation post. Very nice work! It is important to me that the News page is about concrete technical results in the compiler and core libraries. I do not want to run a blog or news aggregation service from that page, nor do I want to promise future technical results …

  • I often suggest that blog posts are a great way to contribute to the Elm community. Anyone in the whole world can write posts about projects like elm-spa or elm-tooling or elm-optimize-level-2 or elm-review or whatever else, and it does not need to be the authors of those projects. Creating those p…

  • I posted a lightly edited version of one of the links I shared: https://github.com/elm/compiler/blob/master/roadmap.md I hope this file is helpful to regulars on discourse who might see threads like this one. Exploring compilation techniques and targets is quite slow and uncertain work, so I appre…

  • I am working on Elm full time, the same as always. I am currently doing some exploratory compiler work that is relatively long term. I wrote about it here and the plans are still the same. If someone has a security issue from the compiler or core libraries, please DM me about it. Outside of securit…

  • Closed on Jan 11, 2021

  • Policies being recommended include: "having someone responsible for actively and periodically checking that everyone feels safe” “having a clear policy for exclusion with a security team” Now imagine you are organizing an event. Imagine that someone reports that they were punched by another atten…

  • This is a neat optimization! I think the most generic version I have heard of is to do this for any direct use of a constructor. For example: type Pairs = Nil | Cons Int Int Pairs swap : Pairs -> Pairs swap pairs = case pairs of Nil -> Nil Cons x y ps -> Cons y x (swap ps) Shou…

  • I have learned that the five year prison sentence has begun already. Thank you @Yoelis for your response. I really like the ideas you shared. I have talked to the ESF lawyer about how trademarks are used by other foundations, and I personally really like the approach used by the Python Software Fou…

  • I saw this tweet which, according to Google Translate, reads as follows: Good evening, Thibaut Assus, one of the creators of ParisRB, was tried at the Paris Assizes and found guilty of rape and sexual assault with the aggravating circumstance: abuse of the authority conferred on him by his functi…

  • Interesting! Can you make a single file without package dependencies that exhibits this behavior? One that’d be easy to download and build. This could be a good example to profile and see if there are any changes that could help. I suspect 19095 cases is not very typical, but still could be interes…

  • Weird! I guess it could be pattern match exhaustiveness checking. Can you share what those case ... of expressions look like? How many variants are in your custom types? Are you pattern matching on pairs or triples of values?

  • 1.6 MB is not so big as to be a concern. The case I looked into deeply had 20 MB elmi files and a decent bit more lines than you, but they were still having faster compiles than you. Also, a type should be no problem. It’d only be a type alias that can make things larger than you’d expect. It sort…

  • Most compile times are pretty quick these days, but I have a theory that explains the outliers in compile times I have heard about so far. EDIT: MY THEORY IS NOT CORRECT AT ALL IN THIS CASE! It turned out later in this thread that this project has a case with 19k+ branches. It seems like that mak…

  • @tcelferact, Dillon and I chatted, he set up an alternative, and I update the /community link. Big thanks to Dillon for acting so quickly on this! @Sebastian, that makes sense. I’ll set the /community link back such that it’s the same system across any links that are out there. Thank you for also g…

  • First, what is “it” exactly? What code runs to hand out Slack accounts? Is it some standard repo that you just run on a VPS? Where is that repo?

  • I’m not sure who set up the Elm Slack, but I think they set that endpoint up at the same time. I don’t recall exactly who that was though. Is it something that can be fixed an alternative way? E.g. someone sets up some other URL that does the same thing?

  • First Reaction My understanding is that the term “combinators” is not a topic on its own. It generally see it as a modifier term for existing things. So “X combinators” is generally like saying “X where I have thought about how to combine one X with another X pretty carefully.” For example, a perso…

  • I do not recall exactly how the 0.18 download process works, but here’s what I would try. If I remember correctly, the packages are all downloaded into folders in your project’s elm-stuff/ directory like this: elm-stuff/0.18.0/Skinney/murmur3/2.0.6/ If I recall correctly, it downloads the package…

  • I should add, I do not actually know what Svelte is doing specifically. I would personally be interested in seeing a little breakdown of their key techniques. Maybe there are lessons that could be applied in Elm. Would be very curious to understand more! And maybe it’s something that could be explo…

  • No problem! I think Svelte was saying “faster than virtual DOM” in a lot of their public communication, so I think many people have this impression. My understanding is that they knew Elm had similar perf numbers to them, but they assumed Elm must be using the same techniques. I told them that was…

  • I typically look at this benchmark to get a feeling for how different rendering systems compare. Try going to the interactive results and putting in: vanillajs-keyed elm-v0.19.1-3-keyed svelte-v3.23.0-keyed react-v16.8.6-keyed react-redux-v16.8.6 + 7.1.0-keyed The aggregated results I am seeing a…

  • It appears that Robin has republished the packages under the new name, so it should now be possible to swap Skinney/murmur3 to robinheghan/murmur3 in your elm.json as well.

  • It looks like there’s some discussion of work arounds on Slack as well. I’m copying the content of this message from turbo_mack (with some edits for weird formatting issues) Some of you who depend on great work of @Robin might experience some issues due to package.elm not liking the fact he change…

  • I believe the root issue is a user name change on GitHub, from Skinney to robinheghan, which ends up changing the hashes for releases. I sent some chats to @robin.heggelund of possible paths and how I can help if needed, but in the meantime, you can get your CI unstuck by placing the following dire…

  • The easiest way is probably to define a simple notion of “chunks” that any file can be broken into. So with Elm code, maybe that means a chunk begins whenever you have a “fresh line” where a newline is directly followed by a letter. That indicates that we are seeing a type, type alias, type annotat…

  • It’s not possible to do donations online at this time. The websites and everything are covered, and I personally would feel uncomfortable soliciting donations without a clear plan of how the funds would be used in a broad range of scenarios. (E.g. if $5k is raised, and it’s way too much for the webs…

  • Earlier I suggested this is not exactly like extensible records for two reasons: That the type of value @X "hi" would be the open type [ a | @X String ] There needs to be a special rule for case expressions. Both of these differences appear in your write up, which makes sense. The fact that the …

  • On the topic of compile times, Elm should be pretty fast! I tried to gather some numbers on it in this repo. Notable data points include: Lines Build From Scratch Median Incremental Build 136,049 2454ms 638ms 278,803 4059ms 825ms There are some outliers in the data, like this one, whe…

  • I’ll have to step out of the discussion for now. I’d need to see typing rules specific to this idea to be able to engage further.

  • I don’t think it’s exactly the same as in Daan’s paper. For example, every record literal has concrete type. So { x = "hi" } can never have a type like { a | x : String } which is really important for getting good error messages in case expressions. In contrast, I believe @X "hi" would need to hav…

  • I’m not personally familiar with “extensible type parameters” in the languages I have seen, and I’m not sure if folks in this thread know the full performance and usability costs of supporting subtyping in a language that aims for full type inference. (Putting aside cases where the inference is con…

  • Reducing dependencies has a lot of benefits, even outside of build failures. I think that can be separated from the suggestion here though. If your suggestion was the default, it would still be up to everyone to “configure their version control correctly” such that they are (1) using version contro…

  • Overall, I don’t really see the benefit over just caching ~/.elm. If you really want to use git as a cache, you can set the ELM_HOME variable to move the ~/.elm directory whever you like. So you can run commands like ELM_HOME=/whatever/you/want/ elm make Then you can commit the resulting director…

  • Are you still observing this? I’m not familiar with the dig tool, but things are working alright for me. I’m also not hearing about similar issues from other people. Is it possible that this is related to DNS resolution in your region or the particular network you were using at the time? I’m not a…

  • Ah, I have it set up such that when the compiler links to a hint, it goes through a redirect that will allow me to change the content later on. So it should be possible to fix this without a new release or anything. I’ll have to have a read through the bad-recursion page to see if the best path is: …

  • If you like what you see now, that’s pretty much what Elm is going to be for a while. I’m currently doing some exploratory work. It is still too early to tell which parts of that might work out, so there is no real news to share at this point. If this works out, even in the wildest version of succ…

  • It is hard to detect “good recursion” statically. I forget if it’s undecidable, so I’ll just go with “hard” in this conversation! I wrote about some of these problems here in 2017. In the current design, you can have recursive functions anywhere you want, but you can only have recursive values at …

  • I suspect people will be able to help more if you can share more of your code. For example, is there a way to make a gist of the whole webpack setup? Directory structure? Etc. Given that you can get the small sizes calling uglifyjs directly, it seems like its is something in webpack or some configu…

  • @teatimes, I suspect the thread linked by @hans-helmut may have your answer: It seems like the root issue there was that the default uglifyOptions are not right for Elm, so @rupert gave a recommendation of how to make those options match the recommended script here: But it looked like the auth…

  • It’s for offline documentation! The README.md is downloaded, but the docs.json file is not in the downloaded bundle. It is actually generated when the package is verified on your machine! Ultimately, it’d be great to have access to offline docs in elm reactor and the current design is to help folks…

  • The oldest discussion I could find of this idea is here from 2013. I still have the same reservations about syntactic simplicity and performance. Adding more syntax means more to learn and get stuck on, whereas the current design encourages the use of named top-level functions instead. I personall…

  • There are lots of designs to look through! It’s probably worth checking ST which has an interesting approach for keeping mutations “local” to a particular context. (It requires a feature that Elm does not have, and I don’t think that feature is in the “keep it simple” spirit of Elm.) I recall hear…

  • The most comprehensive benchmarks I know of are here https://github.com/krausest/js-framework-benchmark They link to a snapshot of all the latest versions of things here https://rawgit.com/krausest/js-framework-benchmark/master/webdriver-ts-results/table.html You can select which frameworks you wa…