Spyke

Replies

linux

Comment on

[Discussion] Git - How is it classified?

When you make a project with git, what you're doing is essentially making a database to control a sequence of changes (or history) that build up your codebase. You can send this database to someone else (or in other words they can clone it), and they can make their own changes on top. If they want to send you changes back, they can send you "patches" to apply on your own database (or rather, your own history).

Note: everything here is decentralized. Everyone has the entire history, and they send history they want others to have. Now, this can be a hassle with many developers involved. You can imagine sending everyone patches, and them putting it into their own tree, and vice versa. It's a pain for coordination. So in practice what ends up happening is we have a few (or often, one) repo that works as a source of truth. Everyone sends patches to that repo - and pulls down patches from that repo. That's where code forges like GitHub come in. Their job is to control this source of truth repo, and essentially coordinate what patches are "officially" in the code.

In practice, even things like the Linux kernel have sources of truth. Linus's tree is the "true" Linux, all the maintainers have their own tree that works as the source of truth for their own version of Linux (which they send changes back to Linus when ready), and so on. Your company might have their own repo for their internal project to send to the maintainers as well.

In practice that means everyone has a copy of the entire repo, but we designate one repo as the real one for the project at hand. This entire (somewhat convoluted mess) is just a way to decide - "where do I get my changes from". Sending your changes to everyone doesn't scale, so in practice we just choose who everyone coordinates with.

Git is completely decentralized (it's just a database - and everyone has their own copy), but project development isn't. Code forges like GitHub just represent that.

Comment on

Advice needed, son wants to learn how to program

See if you can find a book on python, and work through it a bit. Sit down with him once you know some and try making something basic with turtle or the likes. Your goal is to keep his interest up and not make it a "studying" thing. For a kid the most important part is that he needs to be able to see results of what he's making. Drawing simple shapes, cool patterns, etc. in python is a nice way to start and it can teach all the basic initial things he needs to know.

There's also simple robot kits for kids that could be fun to play with, which he could eventually move on to basic electronics to after from.

W.r.t. safe browsing, I'd try blocking egregiously bad stuff with some DNS blocker that you either buy or host using something like pihole. Use it to block ads and well known "bad" domain names. Also have a conversation about it. (I'm not sure how much this helps here considering he's 8... but better then nothing.)

privacy

Comment on

Why doesn't Signal Desktop support reproducible builds?

Reply in thread

In this context it actually means that you can take the source code, and get the exact same binary artifact as another build. It means that you can verify (or have someone else verify) that the released binary is actually built from the source code it says it is, by comparing their hashes. You can "reproduce" a bit for bit copy of the released binaries.

linux

Comment on

Windows 11 vs Linux supported HW

Reply in thread

Yeah, and Linux still doesn't have a good answer to AD for managing suites of end user machines. Linux has a lot going for it - but windows isn't strictly inferior or anything.

Honestly, the entire AD suite with auth and everything else built in is genuinely a good product. And if what you want is supported by Microsoft, their other services are decent as well.

linux

Comment on

Raspberry Pi - Introducing: Raspberry Pi 5

Reply in thread

Idk about everyone else but I was fine with the specs. A basic Linux machine that can hook up to the network and run simple python scripts was plenty for a ton of use cases. They didn't need to be desktop competitors. The market didn't need to be small form factor high performance machines, and I'd argue it wasn't.

Comment on

White House: Future Software Should Be Memory Safe

Reply in thread

No, rust is stricter because you need to think a lot more about whether weird edge cases in your unsafe code can potentially cause UB. For ex. If your data structure relies on the Ord interface (which gives you comparison operators and total ordering), and someone implements Ord wrong, you aren't allowed to commit UB still. In C++ land I'd venture to guess most any developer won't care - that's a bug with your code and not the data structure.

It's also more strict because rusts referencing rules are a lot harder then C's, since they're all effectively restrict by default, and just turning a pointer into a reference for a little bit to call a function means that you have to abide by those restrictions now without the help of the compiler.

Comment on

How exactly did Reddit become a top website and what does Lemmy need to do to eventually get there?

Reply in thread

Web 3 is different things depending on who you ask. Block chain, decentralization, or whatever else. We dunno, we aren't there yet. I personally believe federated services have a chance of being web 3 (and Blockchain is not relevant).

Web 2 is basically big tech on the internet, everything becoming centralized. Everything became easy to use for the end user, all point and click.

Web 1 was the stuff prior to that, when the internet was the wild west.

linux

Comment on

7 Ways to Tweak Sudo Command in Linux

Reply in thread

The idea is malware you installed would presumably run under your user account and have access. You could explicitly give it different UIDs or even containerize it to counteract that, but by default a process can access everything it's UID can, which isn't great. And even still to this day that's how users execute a lot of processes.

Windows isn't much better here, though.

linux

Comment on

Root access vulnerability in glibc library impacts many Linux distros

Reply in thread

The vulnerability has nothing to do with accidentally logging sensitive information, but crafting a special payload to be logged which gets glibc to write memory it isn't supposed to write into because it didn't allocate memory properly. glibc goes too far outside of the scope of its allocation and writes into other memory regions, which an attacked could carefully hand craft to look how they want.

Other languages wouldn't have this issue because

  1. they wouldn't willy nilly allocate a pointer directly like this, but rather make a safer abstraction type on top (like a C++ vector), and

  2. they'd have bounds checking when the compiler can't prove you can go outside of valid memory regions. (Manually calling .at() in C++, or even better - using a language like rust which makes bounds checks default and unchecked access be opt in with a special method).

Edit: C's bad security is well known - it's the primary motivator for introducing rust into the kernel. Google / Microsoft both report 70% of their security vulnerabilities come from C specific issues, curl maintainer talks about how they use different sanitizers and best practices and still run into the same issues, and even ubiquitous and security critical libraries and tools like sudo + polkit suffer from them regularly.

Comment on

Docker vs Podman, which one to choose for a beginner and why ?

Reply in thread

The point is to minimize privilege to the least possible - not to make it impossible to create higher privileged containers. If a container doesn't need to get direct raw hardware access, manage low ports on the host network, etc. then why should I give it root and let it be able to do those things? Mapping it to a user, controlling what resources it has access to, and restricting it's capabilities means that in the event that my container gets compromised, my entire host isn't necessarily screwed.

We're not saying "sudo shouldn't be able to run as root" but that "by default things shouldn't be run with sudo - and you need a compelling reason to swap over when you do"

Comment on

Let's encrypt?

Reply in thread

Kanidm wants to directly have access to the letsencrypt cert. It refuses to even serve over HTTP, or put any traffic over it since that could allow potentially bad configurations. It has a really stringent policy surrounding how opinionated it is about security.