Yeah unfortunately I have to use Linux for work. I have considered WSL but... I dunno even with its many bugs I think WSL is probably worse. I have no idea how you get X apps working under it for example.
FizzyOrange
I don't see why that would cause lock ups? I'm pretty sure it's just a driver bug. Didn't used to do it but I upgraded the kernel recently and then it started.
Interesting thread anyway - do you know if they ever fixed the defaults?
Yeah that was the first thing I did - 16 to 32GB but apparently the hardware doesn't support more. At least that's what the IT guys told me and it isn't worth fighting them.
Seems a bit shit of the hardware to me. I bought a second hand desktop for very cheap and it came with 128GB which seems like a more reasonable amount for a professional programmer...
Nah this is like once a week. Windows (post XP) crashes on me maybe once a year. It's much more stable than desktop Linux in my experience.
Some Dell/Intel business laptop. Nothing exotic.
I was forced to enable swap because it I run out of RAM without swap then 95% of the time my laptop hard reboots. Adding a ton of swap fixed it.
My next issue is that sometimes it just hard-freezes. Zero warning, under no load, I can't even move the mouse. Linux on the desktop!
Tool Command Language. It's a shitty stringly-typed scripting language from the 80s that took a neat hack (function bodies are string literals) way too far.
It's a bit less shit than Bash, but shitter than Perl.
Unfortunately the entire EDA industry has decided to use it as their scripting interface, which isn't too bad in itself - the commands they provide are pretty simple - but unfortunately it leads to people stupidly basing their entire EDA infrastructure on TCL rather than wrapping it in a saner language.
No not in the same way Tony Stark did. But Tony Stark is imaginary. Obviously nobody can build an electric car or a rocket in the same way that Tony Stark does.
Of all the criticisms of Musk this is the weakest. There are many way more valid ones... for instance:
- He's an arsehole.
- He straight up called that diver a paedo, and even paid a scammer to investigate him.
- The scummy lottery thing for votes for Trump. I don't care if it ends up being technically legal, it's clearly immoral.
- Selling the promise of FSD for hard cash when it clearly is never going to happen as he claimed. I still don't know why there's been no class action suit over that.
- Backing proper insane far right groups in Europe. These people are worse than Trump. I wouldn't say he is backing neonazis, but he's certainly in the vicinity.
Despite all that he clearly has a pretty good handle on engineering and is definitely involved. He's not just a figurehead.
I know right, people are multidimensional. You can downvote if that blows your mind.
Be thankful we got Javascript. We might have had TCL! 😱
Interesting footnote: the founding of Netscape occurred at the same time I was deciding where to go in industry when I left Berkeley in 1994. Jim Clarke and Marc Andreessen approached me about the possibility of my joining Netscape as a founder, but I eventually decided against it (they hadn't yet decided to do Web stuff when I talked with them). This is one of the biggest "what if" moments of my career. If I had gone to Netscape, I think there's a good chance that Tcl would have become the browser language instead of JavaScript and the world would be a different place! However, in retrospect I'm not sure that Tcl would actually be a better language for the Web than JavaScript, so maybe the right thing happened.
Definitely dodged a bullet there. Although on the other hand if it had been TCL there's pretty much zero chance people would have tolerated it like they have with Javascript so it might have been replaced with something better than both. Who knows...
Yeah Teslas were pretty leading edge at the beginning. Then they started doing weird stuff like removing stalks and making triangular trucks.
Falcon 9 and Starship are obviously futuristic too.
Use -ffast-math
... if you dare. Or just use
inline double position_from_steps(int steps) {
return (2.0 * PI / 4096.0) * steps;
};
The reason it doesn't optimise it into one multiplication is because that isn't actually the same calculation. Floating point numbers aren't real numbers, so it isn't true that (a * b) / c == (a / c) * b
. Since the "optimisation" would actually change the semantics, compilers don't do it by default.
-ffast-math
says "hey I don't care about reliable semantics; just do whatever to make it fast". But it also does a load of stuff that you may find surprising. so you really shouldn't use it. Much better just to reorganise your code.
You can also use -funsafe-math-optimizations
which is the more specific subset of -ffast-math
that does this particular optimisation. See https://gcc.gnu.org/wiki/FloatingPointMath
Also I would question if it matters. This micro-optimisation will make zero difference on x86. On a microcontroller (I assume what you're actually using if you're encoding motor positions) it might matter a bit more but double check your microcontroller even has an FPU. Lots don't. Even if it does, doing it in integer space will probably be faster (though not necessarily).
I installed the IOT edition which doesn't require a Microsoft account and has zero ads as far as I can tell. Enjoy it while it lasts!