What is Hackers' Pub?

Hackers' Pub is a place for software engineers to share their knowledge and experience with each other. It's also an ActivityPub-enabled social network, so you can follow your favorite hackers in the fediverse and get their latest posts in your feed.

0
0
2
0
1
0
0
0
1
0
2
0
0
0
0
0
1
0
0
0
0
6
0

RE: hachyderm.io/@thomasfuchs/1160

Nobody gives a shit anymore about anything.

It’s fine to post absolute tripe like this on a corporate website.

It’s fine to post quotes that were never said in a newspaper.

It’s fine to reference science that doesn’t exist in scientific papers.

It’s fine to commit code that was never checked to software.

It’s fine to post music that no one made.

It’s fine to share videos of things that never happened.

It’s fine to steal, lie and scam people.

All of this is hyped and cheered on by governments, organizations, businesses and individuals.

What in the fucking fuck is wrong with everybody?

0
5
0
0
0
0
0
0
0
23
1
1
0
0
0
2

rant, rust, lapce, we are not gui yet, code editors

every now and then, I have an idea that would require writing a tool with a GUI. having the rest of my stack written in Rust, I would obviously want to write the GUI in Rust as well. and then, evaluating the idea, I take a look at the ecosystem of Rust GUI libraries.

every now and then, I get pissed off at VS code (such as right now, for pegging all my CPUs both on the desktop and the remote server), and try replacing it with something else. something modern. I have grown used to the power of rust-analyzer and at the very least want a tool that integrates it and just works.

and so, every now and then I take a look at lapce and zed again. surely, an editor written in Rust should support my usecase well, as the authors would be expected to dogfood it. you may think the two paragraphs above are unrelated, but it appears that every serious GUI project in Rust ends up spawning its own GUI library. not a great sign.

and every time I get incredibly disappointed.

it’s fine. I can just keep using VS code. it’s winter, and its CPU usage helps keep me warm after all. and what’s a few seconds of LSP assist latency between friends.

it’s fine. I don’t need to make GUI tools, after all. looking at and writing raw coordinates is a perfectly servicable way of talking about rectangles with a computer. you can just look at the numbers and imagine the shape in your head. or if it’s really bad, I can just emit a giant <svg>. interactivity is a superfluous luxury.

and if I absolutely need to make a UI, I can just make my rust code spin up a socket, do some HTTP, and serve some HTML. maybe with javascript if things need to move. all the flexibility of the modern web platform at my disposal.

today’s attempt started by launching lapce on my desktop. it starts up pretty much immediately! blazingly fast is not just an empty slogan! and then it equally fast froze its entire UI hard within the first few seconds.

oh well. the desktop has an nvidia gpu, and quite an old one too. surely I cannot expect a modern UI framework to cooperate with nvidia.ko. let’s try on the laptop.

opened fast. didn’t freeze. pressed “connect to remote”, typed in the hostname, and it established the connection pretty much instantly. neat!

okay, time to actually open a project. click the obvious “open folder” button on top. uh. doesn’t do anything at all. try pressing elsewhere, double clicking, selecting the same option from the (incredibly sparse) menu. nothing. I have an open editor and I have absolutely no idea how to open a file.

in a flash of genius, I bring up the terminal (gives me a shell on the SSH host! nice!) and try typing lapce <directory>. it works! somehow the proxy intercepts the command, and spawns a new tab (this thing has a separate concept of top-level tabs?!? there’s no obvious way I can see of opening such from the UI itself. oh well). the project loads. success!

also, the rust plugin that I installed automatically spawns rust-analyzer. another success!

oh. it gives me a diagnostic. proc-macro server's api version (6) is newer than rust-analyzer's (4). no macro expansion for me. this is a bit of a problem, since I rely on a custom proc macro a lot. also, it somehow works with VS code.

rust-analyzer documentation claims that lapce works out of the box, but the rust plugin ships its own outdated copy of rust-analyzer. however, it is possible to override it in settings.

I go to the settings tab. I find the option in the obvious place. I run which rust-analyzer in a terminal and copy-paste the full path (in .local/bin) into the text box. Why is there not just a “use whatever is in the $PATH“ checkbox? oh well.

after I’m done typing in the box, I touch some other UI element. the path I just typed disappears. oops. well, maybe I pressed something stupid on the keyboard. I type it again. this time it doesn’t disappear. I close the settings and consider my work of changing the plugin configuration done.

I have no idea how to actually apply the setting. I decide to go to the plugin menu, and press “reload plugin”. it restarts rust-analyzer! that should do it.

it does not, in fact, do it. still the same mismatch. oh well, I restore the configuration back to its default while thinking how to diagnose the issue. however, I see the plugin has an update button. it seems I installed it a long time ago, on my previous attempt. I click it, and after a bit, I see the plugins version number double. oh my, that was old.

rust-analyzer restarts. I get a mismatch once again, but now the rust-analzyer’s claimed api version is 5 instead of 4! so this thing ignores my setting and runs its own rust-analyzer anyway!

in the meantime, I also look at other settings of the plugin. there’s not many of them, but it allows me to replace the “check” command with something else. I type in clippy into the textbox. I try pressing Tab to move on to the next input in the settings tab, which is some checkbox.

uhh. it completely ignores the Tab button. they just don’t implement the obvious way to navigate by keyboard? how am I supposed to use the settings tab without a mouse anyway?

I click on some random other setting textbox. the clippy I just typed disappears as a result. at the same time, the “rust-analyzer path” textbox reverts back to the path I have typed in there before and removed. WHAT.

I try a few more times to get the settings to the values I want. at some point, the value ends up somehow stuck at clipp and any attempt to change it gets reverted by the settings GUI. meanwhile, cargo is yelling at me that clipp is not a valid command.

sigh. okay, apparently I cannot expect UI frameworks to actually work in any way. but the settings page is not the core purpose of a code editor, the core purpose is editting code. so let’s give it one more chance.

I close lapce and edit its configuration in nvim. nvim may be rough around the edges and annoying in many ways, but I am reasonably sure it can edit a JSON and have it stay editted.

I start lapce again. rust-analyzer now loads, and the version mismatch is gone! so the fucker wasn’t even using my settings before at all. sigh.

however, rust-analyzer now gets stuck at Indexing: 4/289 (core) and hangs there. I attempt to click that string to see if I can check what’s going on, or request a restart, but it does nothing. I search the entire UI for any kind of diagnostics output or LSP server status, but there’s nothing.

I try to see if any LSP integration is actually working. my go-to-definition muscle memory doesn’t work, so I right-click an identifier. it brings up a context menu, and there’s a “Go To Definition” option. yay!

oh wait. pressing the right mouse button opens the context menu, but releasing it immediately closes it. this is a bit of a problem. I try to select an option while still holding the RMB, but there’s no effect. oops.

I sigh loudly and give up on the concept of using lapce. I like the concept of lapce. I like its nominal feature set. and I want to like lapce itself, but it just doesn’t work at all.

I guess it’s time to cover my nose to mask the stench of AI and try out Zed?

0

Somehow even years after transition, cis het women still seem about as baffling and different as they did before. I'm obviously still friends with a great many, but I still always kinda feel like an outsider in their groups. It's probably at least a lot on me, but even still. I wish I knew how to relate better to people who have been "normal" their whole lives.

0
1
1
0
1
0
0
0
0
18
0
0
0
0
1
1
0
0
1
0
0
1
0
0
0

💋 There is only one way to KISS – Keep it Safe and Secure: with strong encryption, ban on spyware, democratic oversight and communities with power. Anything less than that is control & surveillance.

Together with allies, we’re launching this campaign to protect our messages AND devices in digital space.

If you ♥️ encryption & 💔 spyware, check out & support our campaign ➡️ edri.org/take-action/our-campa

Campaign graphic with the text "Keep it safe and secure: protect encryption, ban spyware"
0
2
0