nous

joined 2 years ago
[–] nous@programming.dev 7 points 7 months ago (4 children)

Fair point, would love to see the numbers on this. But it smells of trickle down economics to me. VAT is 20%, I assume this is what will be paid. And lets assume it is on the tuition that parents will now pay. Seems the average tuition paid is around £15k (rounded) for private schools. Which means about a 3k increase in the tuition. That would mean for every 3 students in a private school you could afford to send 1 to public school with room to spare. So to have a negative impact this policy would have to have a what 1 out of every 4 students to drop out of public school and return to private school? Or 25% of students give or take a lot.

But according to the article:

In October however, the ISC said some private schools reported a 4.6% drop in pupil attendance in secondary school uptake, which it attributed to parents now deciding against sending their children to private school.

Which is vastly less than 25% which should make this policy a net positive with loads of head room for my math crude back of the napkin attempt.

Thus, smells a lot like trickle down economics argument to me.

Would love to see a more concrete analysis of this.

[–] nous@programming.dev 1 points 7 months ago

I do use scripts for more complex things. But even then I have a few very frequent one liners in my history that are 3-4 commands chained together that I have not bothered to convert. It tends to only be when they start to have logic in them that I will write a script for. Or more one off commands that are easier to edit in a multi line editor then trying to get everything right in the shells prompt.

[–] nous@programming.dev 5 points 7 months ago

I used to know a guy that would put everything into aliases or scripts in order to avoid remembering them. It worked well most of the time but when something went wrong or was not covered by his scripts he would struggle a lot. He avoided learning the underlying commands and what they did and so could not adapt to things when circumstances changed even a little - which does happen quite a lot.

Which is probably another reason I don't use them. I don't like to set them up straight away while I am learning the tool and once I am comfortable with it a reverse history search is good just as good/quick as a true alias anyway and means I never forget what I am doing and can edit it on the fly easily when needed.

[–] nous@programming.dev 2 points 7 months ago (1 children)

TBH, not quite the same. You have to know which one you want. If you don't quite or get it wrong you need to clear the line and start again. I quite like that I can reverse search and keep typing, or undo what I had typed and still see a list of the most recent things and can select from that list once I see what I want. This works for any command I have previously typed and dont need to setup specific key sequences for it - just any part of that command will find it again. Also works for complex chains of commands or pipes which I do not think aliases do work for.

[–] nous@programming.dev 8 points 7 months ago (10 children)

That argument falls apart because state schools exist and 93% of children already attend. Which means private schools are not very popular despite their tax exempt status. So it is not encouraging many people to attend them and it is not like not going to a private school is not investing in your child's education since a free alternative that is not a complete shit hole exists. Turns out well funded public services can be a good thing and we don't need to privatize everything to see the best results.

In reality this seems more like a tax on rich parents who are the only ones that can afford expensive private schools in the first place all to hopefully better fund the free for everyone else state schools that most people already use.

[–] nous@programming.dev 21 points 7 months ago (12 children)

I seem to be one of very few people that does not use shell aliases. I much prefer just using the reverse history search for previous commands instead. That way I don't have to remember what letter I picked for different things, just ctrl+r then partially type out the command and I can see what it will execute. Bonus that I don't need to set them up before hand and that I can edit them before executing them for those times when I need to do something slightly different.

[–] nous@programming.dev 24 points 7 months ago (9 children)

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 15 points 7 months ago (1 children)

becoming production capable and ready for prime-time use from Linux gamers to workstation customers and data centers.

I would bet on it being the boom in AI increasing demands for Nvidia GPUs in data centers which largely run Linux wanting better support. Bet they don't care at all about workstation users and Wayland support is a by product of making it work better with the kernel overall.

[–] nous@programming.dev 1 points 7 months ago (1 children)

Although ending the program when an error is encountered for invalid user input is probably not desired behavior for an IRC bot.

[–] nous@programming.dev 5 points 7 months ago (2 children)

Your code creeps to the right very quickly. This makes it hard to read and follow. Best to avoid that and avoid too many levels of indentations. Typically when you have:

if condition_1  {
    if condition_2 {
        if condition_3 {
            actual_work();
        }
    }
}

You can refactor it to:

if !condition_1 {
    continue; // or return or some other way to short circuit
}
if !condition_2 {
    continue; // or return or some other way to short circuit
}
if !condition_3 {
    continue; // or return or some other way to short circuit
}
actual_work();

This generally makes things easier to follow, you can check all the validation conditions at the start then forget about them for the actual body. With the nested ifs you generally need to keep them in mind until you know there is no else block or anything else which just adds to the cognitive load while reading the code. Especially in your case with some code and come continues below it means you need to jump up and down between the start and the end trying to understand what code gets run in different conditions.

However in your case you are using if lets which makes things a bit more complex but you can now (in edition 2021 since rust version 1.65) do this instead of the if let:

let Some(command) = message.get(0..6) else { continue; }

This is known as the let-else syntax.


You are also throwing away a lot of errors with this approach. This can be annoying to the user if they format things wrong or do something unexpected you just ignore the message - which could make it seem like the bot is not working. Instead of telling the user they did something wrong and should try again which is much more user friendly.


There is a major usability issue with the bot as well if you ever get more than one user trying to interact with it at once. They will share the same guess and attempts and when one person wins those will be reset causing a huge amount of confusion to the second player. You likely want to store the guesses and attempts in a hashmap on the channel id (I think at least since this is private messages each PM will have a unique ID? If not you need to base it on something unique to that interaction).


Your unwraps on sending the messages could also be an issue. If there is ever a problem with the connection your application will crash losing all in progress games/data. You may want to handle that a bit more gracefully and attempt to reconnect when that happens (ie have a loop around the connection code that keeps trying to connect with a delay between each attempt before trying to get messages in the inner loop.)

[–] nous@programming.dev 7 points 7 months ago (1 children)

Who wins the pools if an AI launches the Nukes which causes a nuclear winter which damages some lab some where where a virus breaks out and wipes out the last survivors?

[–] nous@programming.dev 62 points 7 months ago (8 children)

It has to compete with:

  • Climate change and the disasters it will cause.
  • Nuclear war
  • Some virus
view more: ‹ prev next ›