Hacker News Comments on
"Outperforming Imperative with Pure Functional Languages" by Richard Feldman
Strange Loop Conference
·
Youtube
·
42
HN points
·
5
HN comments
- This course is unranked · view top recommended courses
Hacker News Stories and Comments
All the comments and stories posted to Hacker News that reference this video.> Functional programming experts say that their code is efficient because the compiler translates it to an efficient representation on the CPU. They have TCO and other things. But they don't mutate data and hence every function call creates a new data in memory taking up space. How do they overcome that?By letting the compiler make assumptions. For example, consecutive map calls can be converted into a single one. If the data isn't shared with something else, the compiler can mutate it. MUCH easier to paralellize maps.
As a starting point for those nitty grittys, this talk is probably as good as any https://www.youtube.com/watch?v=vzfy4EKwG_Y
Maybe https://www.roc-lang.org/ ? It's not production ready, I just saw nice talk by Richard Feldman [1] about it and it's inspired by Elm.
So many new programming languages coming up with clever features that makes me wish I could mix and match their core features while using libraries from more popular languages.Up and coming Languages I am excited about -
1. Roc - https://www.youtube.com/watch?v=vzfy4EKwG_Y
2. Zig - https://ziglang.org/
3. Scopes - https://sr.ht/~duangle/scopes/
4. Gleam - https://gleam.run/
5. Odin - https://github.com/odin-lang/Odin
6. Koka - https://github.com/koka-lang/koka
7. Unison - https://github.com/unisonweb/unison
⬐ sixbrxDon't forget Kind (https://github.com/Kindelia/Kind) which is mentioned in the "How can I Help?" section as a potential language for targeting HVM.⬐ arc776Nim - https://nim-lang.org/Lets you mix and match other libraries with their native ABI as it compiles to C, C++, ObjC and JS + has excellent FFI.
⬐ metadat⬐ udbhavsWhat about support for using Golang or C# packages? That'd be handy.Interesting read about NIM-
https://www.quora.com/Why-hasnt-Nim-Nimrod-become-as-popular...
Key points:
- Nim lacks official support to multiple inheritance or interfaces (as that in Java) or mixin (as that in Ruby). It feels uneasy when implementing common design patterns, which is important for middle to large-sized projects.
- The error messages emitted from Nim compiler looks a bit obscure. Sometimes you have to guess or google to comprehend what really happens in your code.
These seem like pretty good problems compared to common annoyances and caveats in many other languages.
⬐ arc619TBF the reply in that link was written 4 years ago, before the language went 1.0> Nim lacks official support to multiple inheritance or interfaces
Multiple inheritance is a bit of a trainwreck IMO (see diamond problem).
The language isn't designed around OOP, and is instead procedural with metaprogramming for extension. You get more bang for your buck this way, but for people with their head in inheritance it’s probably a shock.
Not general purpose but has very interesting ideas nonetheless - https://imba.io/⬐ laerusthere is also maybe Dada https://dada-lang.org/welcome.html⬐ throwaway17_17I have seen talks and/or papers on all of these except Scopes and Gleam. Out of the list the only one that does not provide something I am interested in is Unison. Given that your feelings for interesting language features seems to be at least marginally close to mine I am going to check out Scopes and Gleam just to see what they have that interested you.Personally, from a conceptual level, I find that Koka and Roc provide some of the more interesting developments in PL design. For anyone wondering, as to Roc (which I don’t think has an implementation or even a full description yet) I am particularly interested in their concept and implementation of the ‘platform’/‘application’ layer idea. As to Koka, the papers the team has generated are almost all excellent. The paper describing Perseus, the GC/resource tracking system, and the compiler implementation review are stunning.
⬐ joaogui1There is an initial version of Roc, though the repo is private and you need to ask Richard Feldman for access⬐ the_dukeUnison is really quite interesting:* Effect system
* Built in code distro distribution. As in: call a function on a different node that doesn't have that code yet
But most interesting: stops storing code as plain text files, but in a database instead. This breaks many workflows but could offer quite a few interesting properties.
⬐ throwaway17_17I don’t really have any outstanding objections to the goals of Unison, it is just focused on paths through the PL design space I am not particular deep into. My hobby language is a multi-modal, multi-type system,‘concatenative’ language. So my tastes and interests are pretty far away from where Unison is experimenting. But varying paths travelled hopefully lead us to a more diverse and productive place for everyone.
This talk by Richard Feldman about Roc (a new language) goed into why immutable does not necessarily mean slow and given enough attention can mean higher performance in certain cases: https://youtu.be/vzfy4EKwG_Y
> How would one optimize for immutability in this case, other than turning it back into mutability behind the scenes?Roc-lang, which is a functional, systems language in development uses something called opportunistic in-place mutation to do just that. Here's a video where the creator talks about it: https://youtu.be/vzfy4EKwG_Y?t=1276
⬐ sharmin123Facebook Safety Tips: Take Steps Now and Avoid Hacking: https://www.hackerslist.co/facebook-safety-tips-take-steps-n...