

Yeah I think it’s pretty clear what’s going on at this point.
Yeah I think it’s pretty clear what’s going on at this point.
I feel like the best option at the moment is egui. It’s native. Works on the web too. Very easy to get up and running. The things I don’t like about it:
I also tried Slint. Like the author I think the license is pretty reasonable. But it is pretty involved to set up a project and since it compiles everything from source it can take a very long time for a clean build of hello world. It’s like if you were using Qt but instead of a binary package the sources are just included in your app.
Also I have bad experiences from QML (Javascript 🤮, weird scoping rules, etc.) but hopefully they learnt from their experience.
Looking forward to the 2030 edition anyway!
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!
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.
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:
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).
They’re totally ok. Sometimes printf debugging is the best option. (I agree it’s not an excuse to not use a real debugger though.)
The only way you know before doing it is through experience. If you don’t already know you can make a prototype, or just guess and go for it - you might have to change it later though.
I would recommend prototyping when the cost of correcting a wrong decision later is going to be really high.
The other option if you don’t have experience is just to copy what other people have done.
Why though? What action can you take on “Dave is 50% more likely to murder than Jim”?
Murders are too rare for this to be remotely useful.
What’s the advantage of compiling to Rust here? Maybe it would be faster if they just skipped straight to LLVM.