It's definitely improving. I thought the same as you but I looked through my recent ChatGPT prompts and it's actually decent now, at least at simple/throwaway tasks. It doesn't stand a chance at the niche domains of my actual job.
Yeah I agree. It's often easier to start from something that's wrong than a blank page.
Sounds dumb but maybe they are trying to say they don't like languages where everything is implicitly a references (Java, JavaScript, Python, etc.) and they prefer languages where references are explicit and objects can be easily copied (C++, Rust, Go).
In which case I totally agree. Making everything a reference is a lazy hack to get decent performance at the cost of unintuitive semantics (pretty good interview questions!) and making actual copying unreasonably difficult.
Until relatively recently the recommended way to deep copy an object in JavaScript was to serialise it to JSON and back.
What's the advantage of compiling to Rust here? Maybe it would be faster if they just skipped straight to LLVM.
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 personally think the default style could do with improvement. Mainly it's way too cramped. There's a happy middle ground between no padding and bootstrap. I mean Win32/Qt/etc. got this basically right.
- Immediate mode. Yeah it's easier, especially with Rust, but ... it's surely not how it's supposed to work.
- The low level drawing API (like if you're making custom widgets) is surprisingly amateur. Not something I'd want to target if I'm spending a lot of time e.g. writing a custom map widget or git graph or something.
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!
Windows is fine. Get off your high horse.
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:
- 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
undefined
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).
No.
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.)

Best rootless remote X solution?
Edit: rootless
in this context means the remote windows appear like local windows; not in a big "desktop" window. It's nothing to do with the root account. Sorry, I didn't come up with that confusing term. If anyone can think of a better term let's use that!
This should be a simple task. I ssh to a remote server. I run a GUI command. It appears on my screen (and isn't laggy as hell).
Yet I've never found a solution that really works well in Linux. Here are some that I've tried over the years:
- Remote X: this is just unusably slow, except maybe over a local network.
- VNC: almost as slow as remote X and not rootless.
- NX: IIRC this did perform well but I remember it being a pain to set up and it's proprietary.
- Waypipe: I haven't actually tried this but based on the description it has the right UX. Unfortunately it only works with Wayland native apps and I'm not sure about the performance. Since it's just forwarding Wayland messages, similar to X forwarding, and not e.g. using a

How to see a graph of open/closed issues & PRs on GitHub?
Does anyone know of a website that will show you a graph of open/closed issues and PRs for a GitHub repo? This seems like such an obvious basic feature but GitHub only has a useless "insights" page which doesn't really show you anything.

Dart Macros

YouTube Video
Click to view this content.
Very impressive IDE integration for Dart macros. Something to aspire to.