4 ms·
Hm, it's also because we use dynamic languages with shitty implementations. JavaScript has been optimized to hell, it has a proper JIT compiler, and it's extrem
by tachyonbeam 6y ago
Hm, it's also because we use dynamic languages with shitty implementations. JavaScript has been optimized to hell, it has a proper JIT compiler, and it's extremely fast, about half the speed of C in many cases. Python and Ruby are inexcusably slow in comparison. We have the technology to make them fast, but the language implementations were born in the 1990s, at a time where everybody thought single-core performance would always double every 18 months. It's this kind of "performance doesn't matter" mentality that lead to poor implementations and a huge waste of CPU cycles. IMO, those languages will inevitably be displaced for performance reasons. It will take time, but it's inevitable.
- pdimitar 6y agoIt's already happening. On the C++ side we have Rust, Zig, maybe Nim, Haskell. On the dynamic side we have Elixir. Problem is the unwillingness of the market to move. But it's happening, I am witnessing it while I am contracting.
- dunefox 6y agoOn the dynamic side there was always Lisp. Very efficient, very dynamic, extremely cool.
- pdimitar 6y agoI do like LISP, don't get me wrong, but the lack of speed and modern multicore support (actors and transparent parallelization like in Erlang/Elixir) has always put me off. Maybe I am getting old but I started to be skeptical about language features and power if at the end I can't make it max all CPU cores and use async I/O everywhere. I think we all could use a bit more pragmatism. I for one don't like Rust but I am relentlessly investing in mastering it because I do need low-level statically typed and compiled language and I still have PTSD from C/C++. F.ex. I loved Racket. It is an amazing language and extremely well-crafted and thought out. But, call me when they have Erlang/Elixir's processes (actors) and preemptive scheduling.
- mikepurvis 6y agoWhat don't you like about Rust? I haven't done any of it in anger but I did Advent of Code in it this year and have been having a great time. I miss some stuff like Python's generators and some of the crates I've found (like ndarray and euclid for example) have felt a bit incomplete but overall the language and standard library feel very well thought out and enjoyable to use.
- pdimitar 6y agoThere is a lot of obscure error messages surrounding lifetimes and borrowing. Most of the time I would have immediately fixed my problem by being told "you are returning a reference to the insides of a temporary structure, either clone it or make the structure's lifetime `static`" but no, I have to get an error about not implementing a certain trait with anonymous type parameter... :( I'm getting there though. Rust is an acquired taste, plus I am very much sold on its premise and love the results. The journey, not so much. But I want to have that extremely powerful tool in my toolbelt so I am muscling though the learning process.
- swsieber 6y agoPlease, please, please file bugs for said cruddy errors. No doubt if you run into it others do too. Bad error bug reports are greatly appreciated.
- pdimitar 6y agoEncouraging, thank you. Will do.
- mikepurvis 6y agoThanks for this reminder, will do as well! Overwhelmingly I've actually been really impressed with the quality of the compiler diagnostics— 9 times out of 10 the prompt is telling me exactly what I need to do. I will try to do a better job of keeping track of the occasional bad/baffling ones.
- 6y ago
- Rochus 6y ago> On the C++ side we have Rust, Zig, maybe Nim, Haskell Don't forget Crystal, which is a compiled Ruby-like language with static typing and type inference.
- ibraheemdev 6y agoIs Crystal in production use anywhere? It hasn't hit 1.0 yet...
- Rochus 6y agoSee e.g. https://github.com/crystal-lang/crystal/wiki/Used-in-production https://github.com/crystal-lang/crystal/wiki/Used-in-product...