Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jfmengels1
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
Problem with Concurrent Linter Fixes
(jfmengels.net)
2 points
by
jfmengels1
23d ago
|
0 comments
2.
▲
by
jfmengels1
2mo ago
Custom kernel never was a feature the language had. It was an implementation detail that people discovered they could hack, but it was never meant as a feature.
3.
▲
Compiler Reminders
(jfmengels.net)
38 points
by
jfmengels1
1y ago
|
6 comments
4.
▲
Multi-files fixes in elm-review
(jfmengels.net)
2 points
by
jfmengels1
2y ago
|
0 comments
5.
▲
ESLint Equivalents in Elm
(elmcraft.org)
1 points
by
jfmengels1
4y ago
|
0 comments
6.
▲
Optimizing for JavaScript Is Hard
(jfmengels.net)
2 points
by
jfmengels1
4y ago
|
0 comments
7.
▲
by
jfmengels1
5y ago
Oh ok. I didn't mean to "reject" the solution, since that's what I see done most of the time in practice, because of the current limitations of the language regarding stack safety. For foldr, I mean that specific impleme
8.
▲
by
jfmengels1
5y ago
The mapHelper version that was rejected changed the order. The one that did `List.reverse` had the correct order, and this one is equivalent to the List.foldr solution. The only difference is List.foldr's implementation is more perform
9.
▲
by
jfmengels1
5y ago
I think it could yes if you had a keyword for adding the guarantee. If you didn't have a keyword, then all functions would have to be made stack-safe, which is I think a lot to ask the users in some cases, especially when the language
10.
▲
by
jfmengels1
5y ago
Factorial was taken as an example (in this post) exactly because it is such a common textbook example, which also happens to be bad example in the sense that it is not stack-safe. As for walking a tree, I agree, but this optimization does
11.
▲
by
jfmengels1
5y ago
Potentially yes. The question then arise: does it ever make sense not to add that keyword, and should you get linter/compiler warnings when it's not used? In which case, there will be little gain. My mind is not yet made up on thi
12.
▲
by
jfmengels1
5y ago
Indeed, though from a conversation with the author, it's only implemented for a subset of what was described in the post, specifically only for data construction. (Conversation: https://twitter.com/let_def/status&#
13.
▲
by
jfmengels1
5y ago
This advice was for custom rules for a team, so it's about enforcing what the team has already agreed upon and understood the trade-offs, not anything the tool decided upon on its own and imposes on the team.
14.
▲
by
jfmengels1
5y ago
Just to clarify: Since elm-review is a static analysis tool separate from the compiler, you can run and compile your program just fine without having to handle all the dead code warnings (which elm-review is actually very good at detecting
15.
▲
by
jfmengels1
5y ago
He is not, but he's still actively working on Elm. You can find his latest interview here: https://elm-radio.com/episode/open-source-funding
16.
▲
by
jfmengels1
5y ago
I couldn't say the same thing for even well-architected TS apps. There are important escape hatches that TS gives that make it unreliable, as summarized in this article: https://incrementalelm.com/tips/typescript-b
17.
▲
by
jfmengels1
5y ago
The issues you mention sound like bad usages of Msg. I recommend asking questions on the Elm Slack to try and figure out what the problems are!
18.
▲
by
jfmengels1
5y ago
With regards to Elm being battle-tested, I'd argue that we've had that battle, and we won it. Elm may not be a good fit for every project out there, like when you need tight integrations with specific JS projects, but it will wo
19.
▲
by
jfmengels1
5y ago
We have, and that's where we reach out to JS/TS through ports or webcomponents. We try to use Elm as much as possible since that's the simplest and the most reliable, but using JS/TS this way is fine in small quantities.
20.
▲
by
jfmengels1
5y ago
The blog website isn't written in Elm. We're using Elm for the product application, not for the blog or for https://www.humio.com/ . I'll transfer the remarks though :)
21.
▲
Why we chose Elm for Humio’s web UI
(humio.com)
122 points
by
jfmengels1
5y ago
|
133 comments
22.
▲
by
jfmengels1
6y ago
Ah alright. That's an interesting technique! You can't do that in Elm, you'd have to rely on the technique I mentioned above and regular tests.
23.
▲
by
jfmengels1
6y ago
And that is exactly the reason why the tool from the article asks you for confirmation at every step. So that you can actually go and say "oh, no, I want to keep and use that". But even if you do blindly accept each fix, the behav
24.
▲
by
jfmengels1
6y ago
Elm doesn't have asserts. Instead, what you'd do is to have the function return a potential error (what in Elm we'd call a Result). so instead of function a(b) { assert(b > 0); return b + 1; } you'd do a b = if
25.
▲
by
jfmengels1
6y ago
The article author wrote this ESLint plugin to do just that https://github.com/jfmengels/eslint-plugin-fp then he (I) happily switched to Elm, because even with a lot of static analysis rules, it's really hard to
26.
▲
by
jfmengels1
6y ago
In pure functional languages (at least in Elm), what happens is that you have data that describes what should be done, instead of doing it directly. is talk called "Effects as Data" describing that idea: https://www.you
27.
▲
by
jfmengels1
6y ago
Sure, but under some assumptions. Assumptions like that some piece of code won't be transformed by a macro, that reasonably looking code like `a.b` doesn't have side effects, etc. It's not that it's impossible, but that