[-] robinm@programming.dev 7 points 4 months ago

Thank you! I didn’t realized that I was using my lemmy account and not my mastodon account.

[-] robinm@programming.dev 8 points 4 months ago

Good advice, clear, simple and to the point.

Stated otherwise: "whenever you need to add comments to an expression, try to use named intermediate variables, method or free function".

[-] robinm@programming.dev 7 points 8 months ago

Usually when people say “I suck at maths”, it means that they are bad at doing manual calculus. Maths is extremely useful in programming, but it’s absolutely not the same kind of math. I don’t think that the grade you had in math at school will influence in any if you will be good or bad in programming.

[-] robinm@programming.dev 7 points 8 months ago* (last edited 8 months ago)

There take on what they call capabitilites is very interesting. Basically anything that would make a function non-pure seems to be declared explicitely.

A computational effect or an "effectful" computation is one which relies on or changes elements that are outside of its immediate environment. Some examples of effectful actions that a function might take are:

  • writing to a database
  • throwing an exception
  • making a network call
  • getting a random number
  • altering a global variable
[-] robinm@programming.dev 7 points 9 months ago

If you try to learn git one command at a time on the fly, git is HARD. If you take the time to understand its internal data structure it's much, much easier to learn. Unfortunalely most people try to do the former because it works well (or better) for most tasks.

I can't recommand enough the git parable.

[-] robinm@programming.dev 6 points 10 months ago

I didn't know about CACHEDIR.TAG, that's good to know. And yes, Rust tooling is stellar.

[-] robinm@programming.dev 7 points 11 months ago

That was a fantastic read. I'm both impressed by the stellar performance of C, and the stellar safety of Rust while keeping nealy best in class performances.

[-] robinm@programming.dev 7 points 11 months ago

Now that you can compile and run tests, how performant are they compared to rustc+llvm? I know that thinLTO is not yet enable, and I guess a few other important optimisation, but I'm interested to know what we can already get.

[-] robinm@programming.dev 6 points 1 year ago

IIRC the orbit of Mercure doesn't work with Newton Model, and astronomers were predicted the discovery of Vulcain a small planet between Mercure and the Sun. So a new model had to be invented since Vulcain couldn't be found.

[-] robinm@programming.dev 7 points 1 year ago

As far as I know, adding the support for restrict didn’t trigger any bugs in GCC

That's very impressive for gcc. IIRC adding restrict to LLVM triiggered major bugs and miscompilations at least for the first two attempts. As they said they need to do a crater run to be sure, but even passing the initial smoke test is an achievement for gcc.

However, I'm surprised the code is “only” 3% faster using restric annotation. IIRC the speed-ups were about 5% for LLVM so maybe there is still some performance to gain on the gcc side?

[-] robinm@programming.dev 6 points 1 year ago

And you should not forget that Emacs is way harder when you are 4 because your hands are smaller!

view more: ‹ prev next ›

robinm

joined 1 year ago