819 karma · joined Dec 24, 2017 (8y ago) · 146 submissions
comment 1w ago · link · parent
I'm running an old Qt X11 app with a modern retina MacBook with multiple different density screens and it works fine. There were some minor issues with that to start with but I pretty much just said "this happens, please fix it" and Claude figured it out without even having access to a Mac, which is impressive.
Honestly the thing that was hardest was keyboard layout. That kind of stuff never worked well for me in any remote desktop app, and now I can see why! You might never notice if you only use the US layout tbf. It works pretty well now though - I got it to query your local layout and the dynamically build an X keyboard layout and send it to the server.
I've run it with up to about 4 large windows and it seems to work fine. It doesn't send anything when nothing is changing so lots of windows won't matter unless they're playing videos or whatever - it's more designed for old Windows/Qt/Gtk style apps. I suspect you could do better with a traditional video codec but unfortunately the server I use has no GPU so that wasn't really an option.
comment 1w ago · link · parent
You just run `mycommand connect host` and it will connect via SSH, start a Wayland server with X support, set up the appropriate environment variables, and also automatically reconnect, so you only have to do this once.
After that you can just run GUI commands via SSH and appear locally like you always wished they would. It uses a VNC-like image data protocol so the client works on any OS. And windows are seamless - no windows within windows nonsense. I haven't put much effort into the video protocol tbh but it's already better than Xpra and very usable with 100ms latency (London to NY) so that's good enough for me.
I'll try to open source it.
I think a better solution would be if SSH itself supported some GUI channel, but the only thing is the Kitty graphics protocol which kind of sucks tbh. I did try writing some tools using that for the GUI a while back but it's awkward because you have to use PNG, you're still stuck with the character grid for text, etc.
comment 1w ago · link · parent
At least in my company, it is. I have vibe coded three apps that are far better than the competition: an Xpra/Wprs alternative that's faster and much more reliable, an alternative to the VSCode Git Graph extension that is much faster and has tons more useful features (e.g. drag and drop to move/copy/rebase commits which is a feature I always wanted), and a Mac app that lets you use cheap MIDI controllers to control your screen brightness, volume, media playback etc.
I use them all every day and they're all extremely reliable, and much better than the existing tools. One was entirely vibe coded and the other two were unfinished projects that I vibe completed (probably 70% vibe code).
I suspect a mountain of people and companies have tools like these but they haven't open sourced them because a) I used company tokens so there's admin to get things open sourced, and b) it almost feels like there's no point... you can just vibe code your own version to your exact liking. Do you really want to use mine?
comment 2w ago · link · parent
I can't even get an obvious UX improvement through PAM because they like it broken.
comment 1mo ago · link · parent
Yeah I've definitely noticed this. On a project I'm working on Opus 5.5 found a bug in Smithay and another in Winit. It did tell me about them but its preferred solution was just to work around them locally. To be fair we don't really want agents going off and reporting bugs automatically...
I don't run any big open source projects but I think my preferred solution to AI PRs would be to get my AI to implement the same thing, and give then afterwards tell it to look at the PR for anything it missed. Then I at least know that I'm using a competent model and it reduces the danger of just blindly accepting someone else's code. (And obviously review the code if you have time and care, but that isn't always the case.)
comment 2mo ago · link · parent
As I recall X11 doesn't really support that at all so there was no way to implement that on Linux. Doing it on mouse up seems sensible though. I couldn't find my bug report but I bet it was met with "I like it broken".
comment 3mo ago · link · parent
I believe there is (or once was) also an Inkscape plugin somewhere but I never tried it.
As for how I reverse engineered it, I just used a USB sniffer and wireshark. I don't think there's a big risk of bricking these devices - I don't think they even have non-volatile storage, so worst case you turn it off and on again.
I would like to reverse engineer my solar power inverter too, but that is definitely brickable (the first one they shipped me came pre-bricked!) and is a lot more expensive so I've had to resist. :/
comment 4mo ago · link · parent
V8 is actually a nice case for CHERI since you can easily sandbox the JIT'd code. If you were to just rewrite V8 in Rust then you wouldn't get that benefit (you can't run the borrow checker on generated assembly). I assume they have some other sandboxing methods instead though.
But in general if you think about things like V8, that's used on high performance application class consumer CPUs. It's going to be at least 10 years before anyone has one of those with CHERI (unless ARM changes its mind about Morello). I would not bet against V8 being ported to Rust before that.
As I said I think CHERI is great technology and I hope it does succeed, but it does seem like the business case for it is not as strong as it was just a few years ago.
comment 4mo ago · link · parent
There are two counter-arguments:
1. There's a lot of C/C++ code still out there. You can't rewrite it all. I'm not totally convinced by that though because, a) do you need to? Google has shown that just writing new code in Rust is very effective, and b) AI is actually pretty decent at porting from C/C++ to Rust so maybe you can?
2. CHERI also allows really strong and fine grained compartmentalisation. This is absolutely fantastic for robustness, supply chain security and so on. If you want the absolute 100% most secure code possible, then Rust + CHERI with compartmentalisation is basically the best thing you can do. (Though Rust compartmentalisation is still not actually ready yet; it's in progress though.) That's really great but I'm not sure that level of security is needed by most projects, and also I think you can get pretty good compartmentalisation (though definitely not CHERI level) by doing something like what Xous does (basically isolation with processes/virtual memory, combined with the ability to call functions in other processes; IIRC Hubris OS does something similar).
CHERI is clever tech though and it would definitely be a boon for RISC-V if it succeeds.
comment 4mo ago · link · parent
That's not the case at all. The spec is developed in the open: https://riscv.github.io/riscv-cheri/
If you want to run CHERI code, it's true that silicon isn't easily available, but that's simply because it takes time. Various companies are working on it (Codasip, SCI, Secqai, lowRISC, etc.).
But you don't need silicon to run CHERI code. There are various emulators available that support it. There's QEMU: https://github.com/CHERI-Alliance/qemu There's also the RISC-V Sail model, this is the latest CHERI branch: https://github.com/CHERI-Alliance/sail-riscv (unfortunately it is a bit behind upstream master, and also a bit behind the latest CHERI spec which is still evolving).
There are also a few open source chips available that implement CHERI which you can run in Verilator or an FPGA. For example cheriot-ibex https://github.com/microsoft/cheriot-ibex . This is actually a variant of CHERI for microcontrollers called CHERIoT. Long story but the plan is to merge CHERIoT back into CHERI so it is just a "profile" of CHERI.
21.
Rust vs. Zig Compilation Time(blog.timhutt.co.uk ↗)
2 points · by timhh · 4mo ago · discuss
comment 4mo ago · link · parent
https://blog.reds.ch/wp-content/uploads/2018/09/questa13.png
Or something like Visual Studio.
Obviously most GUIs are not nearly that complex so immediate mode can get you quite far. Its biggest limitation is that it makes it hard to do some layouts. Your GUI layout becomes dictated by your data dependencies which is quite awkward.
comment 4mo ago · link · parent
But it's definitely more awkward and has costs throughout the CPU.
I would be really surprised if the lower code density is worse than the improvement due to everything being nicely aligned. Especially because Qualcomm had actual data that it isn't (if you add new instructions with the extra coding space you free up).
comment 4mo ago · link · parent
Yes that's precisely the point of excluding it from the RVA profiles. It would mean that Linux distros don't compile code with C enabled, so chips are free to not support C and therefore can achieve higher performance (probably). And it opens 3/4 of the instruction encoding space for use by other things.
> Also the excuse given by Qualcomm - that it would make all instructions fixed length and so much easier to decode - is just wrong. RISC-V supports variable length instructions, even much longer than 32 bits, and you've just got to deal with it.
It's not wrong. RISC-V defines a mechanism by which 48/64 bit instructions might be used, but currently none are actually defined. All existing instructions are 16 or 32 bits. Without C all instructions are 32 bits. You don't have to deal with 48 bit instructions because there aren't any.
It's possible that they will add some in future, but I'm doubtful of that because a) it would be a huge pain, and b) they didn't for Vector which is where it would have been most useful.
> Just because Qualcomm acquired a company with a microarchitecture that could only deal with fixed length instructions is no reason to break the ecosystem.
Yeah it was too late to change but that doesn't mean it wasn't a mistake.
Zicond looks good - I forgot that exists.
comment 4mo ago · link · parent
There's a practically unending list of undefined/implementation defined behaviours, which is great if you want to implement an ultra minimal microcontroller with 100 flops, but pretty awful otherwise.
Requiring the C (compressed) extension in the RVA profiles was definitely a mistake. The lack of true 16/64kB pages and conditional moves are probably a mistake (though fixable).
I don't know how any of these make it more robust and mature.
(But to be clear, I still think it's pretty good overall.)
comment 5mo ago · link · parent
I suspect that is not KDE's fault (or Wayland's) - it's probably PAM, which by default has a 2 second delay (+/- 50%). That default is extremely difficult to change, but you can configure it. See my instructions here: https://github.com/linux-pam/linux-pam/issues/778#issuecomme...
Also if you follow that issue you can see I've been trying to convince the PAM developers to fix it (by changing it to a 0.5 second delay, which is much more tolerable and no less secure). Unfortunately they have this weird idea that users want the delay, because it lets them recompose their thoughts after getting the password wrong or something like that.
comment 6mo ago · link · parent
That isn't a fundamental limit of the algorithm though; you can easily add error checking, as I did here: https://github.com/Timmmm/expr/blob/1b0aef8f91460974d526b5ba...
I'm not really sure why this is omitted.
comment 8mo ago · link · parent
> You can't run unix_chkpwd against a local account without root because you won't be able to access /etc/shadow to get the hash.
unix_chkpwd can access /etc/shadow because it is suid.
> Otherwise you have to use the setuid version which won't let you run it directly.
Haha you mean this?
$ unix_chkpwd
This binary is not designed for running in this way
-- the system administrator has been informed
Take a look at the source code I linked about 6 comments ago!> Perhaps try checking something yourself?
I have. You haven't.
printf 'hunter2\0' | unix_chkpwd yourusername nullok; echo $?comment 8mo ago · link · parent
Wrong. At least check before you say something is obvious.
> No, it's very simple.
Even more wrong: https://github.com/linux-pam/linux-pam/issues/778#issuecomme...
> feels like arguing with an LLM
I could say the same about you, repeatedly and confidently asserting falsehoods.