[-] nous@programming.dev 25 points 4 months ago

LSF is not a distro. It is a instruction manual and teaching aid. Don't use it as a base for you main OS. And IMO Gentoo does not really teach you more then Arch does. It gives a bit of flexibility that not many care about (how things are compiled) at a very big cost (of having to compile everything yourself). I would not use either unless compiling things is your hobby.

Sure, try them in a VM if you really want to. But I would not really consider that moving on from your current distro nor do you really need to do that.

[-] nous@programming.dev 26 points 1 year ago

But why won't anyone think of the AI shareholders...

[-] nous@programming.dev 26 points 2 years ago

Seems like a fair way to tax richer parent IMO. Given

Approximately 93% of children in the UK currently attend state schools, Phillipson said. Only the richest people are actually really attending private schools and most people are already priced out of them.

The money raised would go towards investing in state schools and teacher recruitment, Phillipson wrote in the Telegraph., external She added that £1.8bn would be raised a year by 2029-30.

That would be nice. But lets be real. Will the state schools see this money? Or will it be funneled to other things?

But the Independent Schools Council (ISC), which represents most of the UK's private schools, said the money the government claimed it would raise was an "estimate, not a fact".

Yeah, I can believe that as well.

"Labour's decision to tax education will mean thousands of hardworking parents will no longer be able to afford to send their children, including those with SEND [special educational needs and disabilities], to private school."

Oh no, a few thousand not quite rich enough kids will have to attend a state schools like 93% of other children. What ever will they do!?!?! Not sure about that call out for SEND specifically though... seems like fear mongering to me. Are there not already loads in state schools? Are state schools not equipped for this already? And will any of those extra funds be used to improve that situation at all?

[-] nous@programming.dev 26 points 2 years ago

That being said, I don't keep one in my car.

Now is the time to change that.

[-] nous@programming.dev 26 points 2 years ago

You dont need syslog. Journald is good enough for most systems.

[-] nous@programming.dev 25 points 2 years ago

bcachefs is meant to be more reliable than btrfs - which has had issues with since it was released (especially in the early days). Though bcachefs has yet to be proven at scale that it can beat btrfs at that.

Bcachefs also supports more features I believe - like encryption. No need for an extra layer below the filesystem to get the benefits of encryption. Much like compression that also happens on both btrfs and bcachefs.

Btrfs also has issues with certain raid configurations, I don't think it yet has support for raid 5/6 like setup and it has promised that for - um, well maybe a decade already? and I still have not heard any signs of it making any progress on that front. Though bcachefs also still has this on their wishlist - but I see more hope for them getting it before btrfs which seems to have given up on that feature.

Bcachefs also claims to have a cleaner codebase than btrfs.

Though bcachefs is still very new so we will see how true some of its claims will end up being. But if true it does seem like the more interesting filesystem overall.

[-] nous@programming.dev 26 points 2 years ago

If a family member gets banned for cheating while playing your copy of a game, you will also be banned in that game.

This sucks.

Yeah, but I an see why as it would be easy to abuse. Only need one copy of the game and you could cycle accounts that never owned the game out of the family sharing when they get banned.

Might be other ways to limit that, but would also likely need more restrictions on the feature that might be more annoying.

[-] nous@programming.dev 25 points 2 years ago* (last edited 2 years ago)

Any field in a DB can be vulnerable to SQL injection. Filtering out characters is a terrible way to mitigate that attack, you should be using prepared queries where it does not matter what chars you have in your username or password. You should never form a query with string concatenation.

You may want to limit chars in a username to ones allowed in URLs (or even ones that don't need escaping) if you ever want it to appear in a URL though. Or any other places the user name might be used, but a entry in a DB should not matter.

[-] nous@programming.dev 25 points 2 years ago* (last edited 2 years ago)

Although AAA games also tend to work these days within days of release

And TBF, Far too many AAA games tend to not work well on Windows within the first few days of release either. Even a few like elden ring that worked better on Linux before Windows. Though I still avoid getting games on their release date. You are generally going to have a far better experience on either system by waiting a bit and seeing what others say about it.

[-] nous@programming.dev 25 points 2 years ago

Rust however… are Arc, Box, Rc, async, etc. fine?

Yes, these are all fine to use. When you should use them depends on what you are doing. Each of these has a usecase and tradeoffs associated with them. Rc is for when you need multiple owners to some heap allocated data in a single threaded only context. Arc is the same, but for multithreaded contexts (it is a bit more expensive than an Rc). Box is for single owner of heap allocated data, async is good for concurrent tasks that largely wait on IO of some sort (like webservers)

match or if/else?

Which ever is more readable for your situation. I believe both are equally powerful, but depeding on what you are doing you might find a simple if let enough, other times a match makes things a lot more succinct and readable. There are also a lot of helper functions on things you often match on - like Result and Option that for specific situations can make a lot more readable code. Just use which ever you find most readable in each situation.

How should errors be handled?

This is a large topic. There is some basic advice in chapter 9 of the book though that is mostly about Result vs panic. There are also quite a few guides out there about error handling in rust in a broader sense.

Typically they suggest using the thiserror crate for errors that happen further from main (where you are more likely to care about individual error variants - ie treating a file not found differently from a permission denied error) and the anyhow crate or eyre crate for errors closer to main (when you are dealing with lots of different error types and don't care as much about the differences as you typically want to deal with them all in the same way when you are near to main).

Also the fact that there is no inheritance leads to some awkward solutions when there is stuff that is hierarchical or shares attributes (Person -> Employee -> Boss -> … | Animal -> Mammal-Reptile-Insect --> Dog-Snake-Grasshopper).

I have rarly seen a system that maps well to an inheritance based structure. Even the ones you give are full of nuances and cross overs that quickly break apart. The classic animal example for instance falls flat on its face so quickly. Like, how do you organise a bird, a reptile, a dog, a fish and a whale? You can put the whale and dog under mammal, but a whale shares a lot of things with the fish, like its ability to swim. Then think about a penguin? It is a bird that cannot fly, so a common fly method on a bird type does not make any sense as not all birds can fly. But a penguin can swim, as can other birds. Then just look at the platypus... a mammal with poison spurs that swims and lays eggs, where do you put that? Where do you draw the lines? Composition is far easier. You can have a Fly, Swim, Walk etc trait that describe behaviour and each animal can combine these traits as and when they need to. You can get everything that can fly in the type signature, even if it is a bird, a bat, or even an insect. Inheritance just cannot do that with the number of dimensions at play in any real world system.

IMO it is simpler and makes more sense to think in terms of what something can do instead of what something inherits from.

[-] nous@programming.dev 26 points 3 years ago

Yup, they basically said they will only support it as long as:

  • it does not threaten the security/safety of the devices/consumer data. AKA will continue to let them lock out parts and software under the excuse of security.
  • focus on docs, tools and parts for authorized repair channels. AKA what they currently do/want as they already control these sectors.
  • force repair providers to disclose use of unauthorised or used parts. AKA force third parties to advertise they don't use genuine/new parts as apple don't and likely still wont make these parts available (just continue with expensive whole assembly repairs).
  • only apply these rules to new products.

So the way I read it - Apple see they are losing the right to repair fight so now want to flip sides so they can better control the laws that get put in place to better quite their needs by cutting off the teeth of any bills all the while claiming they are supporting right to repair for PR purposes.

[-] nous@programming.dev 26 points 3 years ago* (last edited 3 years ago)

On the other hand I think the false positive rate would be low.

Yeah, because any good engineer will noop the hell out of there and anyone left will likely not pass. Cannot have any false positives if you filter everyone out...

1 hour is more reasonable, 2 hour max I would say.

view more: ‹ prev next ›

nous

0 post score
0 comment score
joined 3 years ago