FizzyOrange

joined 2 years ago
[–] FizzyOrange 5 points 1 day ago

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!

[–] FizzyOrange 1 points 1 day ago

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 1 points 1 day ago

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?

[–] FizzyOrange 1 points 1 day ago (1 children)

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...

[–] FizzyOrange 1 points 2 days ago (2 children)

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.

[–] FizzyOrange 1 points 2 days ago

Some Dell/Intel business laptop. Nothing exotic.

[–] FizzyOrange 9 points 2 days ago (14 children)

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!

[–] FizzyOrange 4 points 2 days ago

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.

[–] FizzyOrange 4 points 3 days ago (5 children)

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.

[–] FizzyOrange 17 points 3 days ago (3 children)

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...

[–] FizzyOrange 3 points 3 days ago (8 children)

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.

[–] FizzyOrange 13 points 4 days ago (1 children)

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).

26
submitted 3 weeks ago* (last edited 3 weeks ago) by FizzyOrange to c/linux
 

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 video codec I assume it will have similar performance issues (though maybe not as bad?).

I recently discovered wprs which sounds interesting but I haven't tried it.

Does anyone know if there is a good solution to this decades-old apparently unsolved problem?

I literally just want to ssh <server> xeyes and have xeyes (or whatever) appear on my screen, rootless, without lag, without complicated setup. Is that too much to ask?

 

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.

10
Dart Macros (youtu.be)
submitted 11 months ago by FizzyOrange to c/rust
 

Very impressive IDE integration for Dart macros. Something to aspire to.

view more: next ›