Hacker News new | ask | show | jobs
by thejvexperience 2822 days ago
I'm feeling old. This is really at the top of a HN thread?

Since you self-describe as "coming from Python," you maybe haven't yet really gotten that deep into the internals of computers and what kind of stuff you might wanna do that isn't well supported by higher-level languages. This is especially relevant when we get to talking about performance guarantees, wherein very little can get "guaranteed" about a garbage-collected system, by definition. So while it is a pain to deal with "low-level concepts" like in Rust, it is also well worth it depending on what kind of tech you need to make.

1 comments

I'm an EE, so I did take some microprocessor and FPGA classes and can write some assembly.

With that being said, my day job isn't programming, but engineering which involves a lot of managing data so scripting languages are very vital: Python, Perl, R, Bash, Powershell...etc. Also, other technology like SQL and Excel are daily drivers.

I've used Java & C# a bit in the past which are fast languages, but they're missing the majority of linear algebra and optimization libraries that are widely available in Python/Matlab/Julia.

So what if one of my simulations is too slow for comfort? Re-writing Python in Julia or Nim isn't too hard (syntax is very similar) and i get a huge speed boost. That's all I'm saying. I'm being pragmatic about the situation. Of course I can rewrite performance critical code in C/C++/Fortran/Ada/Rust, but that is a huge last resort as those languages (well Fortran isn't as bad as they say) take me much longer to get something going and you're absolutely correct that my hardware understanding has greatly atrophied since college. For an engineer (in this case a traditional engineer and not a software engineer), we generally need code to A.) automate processes B.) design and run simulations C.) do data analysis.

We rarely write low-level software to twiddle bits unless we really have to. There are simply better choices to make the things I care about run faster even if I was good at C.

> I can rewrite performance critical code in C/C++/Fortran/Ada/Rust, but that is a huge last resort

Random benchmark with the latest release. I don't know how reliable it is but in my experience Nim can often be very fast:

https://github.com/drujensen/fib

I have noticed a lot of similarities between Julia and Nim as well. It would be an interesting compiled companion language to use alongside Julia. Both have really nice generics but I assume interop + generics isn't something that works out too well.