FizzyOrange

joined 2 years ago
[–] FizzyOrange@programming.dev 3 points 20 hours ago (3 children)

ORMs are a pain and so is hand rolling SQL queries and doing the mapping manually.

I definitely think there's scope for NoSQL databases where the database "shape" matches the normal struct style of programming languages. Kind of like how JSON does and XML doesn't.

But it seems like all we got was MongoDB and Firebase which are both shit.

Are there any good NoSQL databases? MongoDB and Firebase don't even have schemas.

[–] FizzyOrange@programming.dev 17 points 20 hours ago (2 children)

You don't need ORMs to prevent SQL injection. Prepared statements have existed for decades.

I always like "by example"s for learning languages - here's Rust's.

I'd probably make a project with it. Maybe a CLI tool using clap_derive and some crate that does something neat that you want to do. Depends what you're interested in I guess.

I wouldn't recommend trying to do leetcode problems with Rust because they are obsessed with linked lists and linked lists are awkward in Rust.

Also I wouldn't recommend making a game or GUI app with Rust yet since the ecosystems there are immature.

A microcontroller project using Embassy is probably a fun way to learn too but I haven't actually tried it yet.

[–] FizzyOrange@programming.dev 1 points 4 days ago (1 children)

How does it integrate Slack and WhatsApp, given they don't have official APIs? All reverse engineered?

[–] FizzyOrange@programming.dev 12 points 4 days ago (1 children)

Well they're open source so we're not losing them yet. Especially with uv, it's pretty clear that it is such a vast improvement over the clusterfuck of pip that a community fork is virtually guaranteed if it is ever necessary.

[–] FizzyOrange@programming.dev 1 points 1 week ago

Yeah I feel like it was more than 3 years ago but I guess it's been a long 3 years!

https://blog.rust-lang.org/2022/08/05/nll-by-default/

[–] FizzyOrange@programming.dev 15 points 1 week ago (2 children)

Yeah I think the reputation was probably deserved early in Rust's life, but as time has gone on it has gotten a lot easier to write, especially with the non-lexical lifetimes update 3 years ago.

[–] FizzyOrange@programming.dev 8 points 1 week ago

It's better than nothing but it really only drags Bash from "your code is definitely horribly broken" to "your code is probably broken". Nothing like Rust!

[–] FizzyOrange@programming.dev 1 points 1 week ago* (last edited 1 week ago)

Yeah I know, but if you really mean that analogy then the conclusion is that the normal thing for 99% of programmers to do should be to use AI. In the same way that 99% of people do not get around by running.

I don't agree with that yet - so far I've found AI to be a very fast but mediocre programmer. Kind of like giving a beginner access to all the documentation and a time machine. Sometimes that's exactly what you want. But definitely not most of the time.

[–] FizzyOrange@programming.dev 1 points 1 week ago (2 children)

Not everyone that runs is an avid runner.

But I do feel like the analogies aren't that great. Coding in notepad instead of an IDE is dumb because IDEs work and don't really have any downsides. AI mostly seems to produce slop that barely works without a ton of cajoling.

[–] FizzyOrange@programming.dev 1 points 1 week ago

modern C++ facilities do make a difference to prevalence of bugs.

This is true, but just saying "write modern C++!" doesn't actually work in practice. First, there are a ton of footguns that even best-practice C++ doesn't avoid. Using std::shared_ptr? Great, you're probably going to avoid memory leaks. Null pointer dereference? Not so much. What's the modern C++ way to avoid integer overflow?

Second, it's pretty much impossible to completely avoid raw pointers etc. even if you're trying, and good luck getting your colleagues to actually try. I can't even get mine to write proper commit messages. You need a machine forcing them to do it properly. Something they can't opt out of (or at least where opting out isn't the easy lazy option).

So yeah it's better to use modern C++ and it is an improvement, but not enough the change the conclusion that you should just use Rust instead.

[–] FizzyOrange@programming.dev 4 points 2 weeks ago* (last edited 2 weeks ago)

Damn that's pretty good! (Outside the US I mean.)

Presumably this would be a bit higher actually since it's contract work, not full time.

0
submitted 1 year ago* (last edited 1 year ago) by FizzyOrange@programming.dev to c/linux@programming.dev
 

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?

view more: next ›