Hacker Newsnew | past | comments | ask | show | jobs | submit | Twirrim's commentslogin

I've seen stuff posted about chained assignment footguns in python regularly over the years, and it always surprises me. I don't think I've ever written them, or reviewed code that does. I don't think it'd occur to me to even think about writing a chained assignment.

Is chained assignment a pattern that comes from another language that people are applying to python?


I get tolerable performance out of a quantized gpt-oss 20b on an old RTX3050 I have kicking around (I want to say 20-30 tokens/s, or faster when cache is effective). It's appreciably faster on the 4060. It's not quite ideal for more interactive agentic coding on the 3050, but approaching it, and fitting nicely as a "coding in the background while I fiddle on something else" territory.

Just in case anyone hasn't seen this yet:

https://github.com/ggml-org/llama.cpp/discussions/15396 a guide for running gpt-oss on llama-server, with settings for various amounts of GPU memory, from 8GB on up


Yeah, tokens per second can very much influence the work style and therefore mindset a person should bring to usage. You can also build on the results of a faster but less than SOTA class model in different ways. I can let a coding tuned 7-12b model “sketch” some things at higher speed, or even a variety of things, and I can review real time, and pass off to a slower more capable model to say “this is structural sound, or at least the right framing, tighten it all up in the following ways…” and run in the background.

OCI supports it with Intel. I know it works with AMD, but we don't officially support that so far as I'm aware. The performance hit on AMD is bigger than Intel, last I looked.

Projects around planting trees have often failed, in part from the choice of tree, in part because it takes more than just planting a tree to restore the habitat. It's generally better to work with the existing flora to promote growth and expansion, and/or help the stumps of trees that have been cut-down grow fresh again (e.g. https://www.youtube.com/watch?v=S5g60g9vmlY)

The opening ceremony for the London 2012 Olympics included a celebration of the National Health Service, which got mysteriously cut from the broadcast in the US, at a time when there was a bunch of fuss over Obamacare that had come into effect a year or two before.

Was hard not to imagine that was a deliberate choice.


I’m in the US and I saw it and recall thinking it was a strange thing to specifically celebrate in the Olympic opening ceremonies.

But to each their own.


The NHS is the UK's one and only True and Universal Religion, and it's quintessentially british, like Mr Bean, crumpets and the queen.

Not celebrating the NHS during the London Olympics opening is akin to blasphemy.

Maybe it was cut for some international broadcasts because not everyone will understand.


Look again at the insurmountable hill that is the US's potential transition to a fully public healthcare system, and consider that celebrating having done that elsewhere might be valid.

Strange hill to celebrate climbing if the peak is a healthcare system widely regarded both inside and outside the UK as mediocre at best.

Could be worse, at least they don't have to choose between financial ruin or a healthy life.

They might have just thought it a bit boring?

You can check it out - the first couple of minutes here of people in nurse costumes standing by beds and moving around a bit. Not really must see stuff. https://youtu.be/ReJjvlipXpM


Drug companies and insurers are big advertisers.

That's insane.

look at the Fortune 500, and notice how many of them are top 10, or top 50

many of the US' problems can be figured out simply by looking at this list


Well the "no censorship!"-crowd in rhe US has been strangly focused on the censorship of racists, bigots and nazis. I don't think they consider censorship that benefits the Neo-feudalist lords as censorship.

The naive part of me these past years was thinking that calling out contradictions would bring shame and reflection to these people.

It's still important to call them out for all the onlookers, but he goal in suc discussions should not be to try and convince the other party in these cases. They at best don't care and are going all on vibes, and at worst knowingly contradict because their goal is also onlookers.


Even if a large conspiracy isn't involved, I believe that biases in worldview can contribute to these effects. However, I still think it's important to inform people of things they might be missing and hold media accountable for their choices, regardless of whether those choices are random or unknowingly biasedWe need to be careful not to fall into the allure of "fake media" in our outrage, as this could ultimately benefit populists in the long run.

[flagged]


The NHS is genuinely loved by most British people, for all it's faults. Not celebrating it would have been very weird. So not really propaganda, just showing the world the things we are proud of.

Feel free to censor it on your end if you find the very idea dangerous.


Great. Are British free to opt out? You know, they don’t pay into the NHS and they don’t get to use it.

Are they? I mean, if it’s such a great idea and universally loved, it’s weird it needs to be imposed by force. Doesn’t it?


How is the NHS very different from the military. Americans love their military and often have propaganda-style bits like fly-overs during football games. American's don't get the option to 'opt-out' of paying for its gigantic costs. Why not have military spending depend on voluntary donations?

They actually should be able to, for the most part.

The original idea of state exists to ensure 3 things:

- Protection of the territory of the state

- Protection of the integrity of the individual citizen

- Protection of the private property of the citizen

This is why people started organizing in societies and allowing the existence of a ruler class. These 3 things.

You will always need some amount of military to be part of the state. But what most countries waste today (the USA for instance), is pornographic. The state should only be allowed (by taxation) enough military to defend their territory, not to exert control over the all planet like the USA wants to do.

EDIT: Yeah, I should have guessed the part of the "integrity of the individual citizen" would, of course, be twisted. No, it's not protection of the individual from disease of from his own stupidity or lack of ability. It just means the role of the state is to ensure the citizen is protected from deliberate harm from another individual.


I would say that in the list 'Protection of the integrity of the individual citizen' is something that a NHS would serve. Individually, people want to know that if they get injured or sick they can be taken care when they can't for themselves. Everyone is at risk of these things. Society as an organism also benefits from having resources dedicated to repair of its components in the same as it does in defense of external threats. 'Protection of the territory of the state' also can be served by an NHS because of the damage and danger of highly infectious diseases.

> 'Protection of the territory of the state' also can be served by an NHS because of the damage and danger of highly infectious diseases.

Let's be honest here. You know the NHS (and various equivalents across the world) go way, way beyond this.

And I'm not even against the existence of a public funded health service within limits. But this is just phonographic. In my country (and from what I've read in the NHS it's relatively similar), in the past 10 years we added more than 90% medical doctors and nurses to the national NHS. The budget for the local NHS increased by 72% in that same period.

And the service has become absolutely terrible and now people (the ones that only benefit from it but don't pay the costs) are asking to raise taxes even more to put even more money into the problem.

Naa, enough is enough. I don't want to support this crap.


Fair enough to complain about the execution, but glad to see you see the logic of its existence. Back to the military comparison, the waste (fraud, corruption, kickbacks, etc, etc) in that part of the public expenditure is pretty massive. Yet there don't seem to be the same outrage or call for reforms in that area. Even when multi-billion dollar programs stagger about for years then produce nothing useful (except for the profits extracted by the defense firms and their investors). Lots of hate for NHS waste, but military spending waste seems to get a free pass. Why is this?

Basically, because the military got a massive budget in WWII and Americans just got used to it because slaughtering the Nazis was the only thing that can convince Americans to buy into that level of welfare.

Now it's mostly a jobs program for poor people plus pork for politicians to throw at their favored contractors/companies. Can't really be eliminated without political suicide because too many mouths are fed off of it and will make it their mission every waking moment to damn anyone who tries to do it.

Since prevention is a lot cheaper than cure we're trying to avoid the same mistake with other things rather than commit political supuku on things that already exist.


The idea behind taxation is to enable collective spending power for things that ideally benefit society. The NHS is likely to be useful for the vast majority of people at some point or another though individuals may well not get value for money if they're healthy or die young etc. However, providing free/cheap healthcare enables people to get check-ups and hopefully catch problems earlier which can make a huge difference to the outcomes. Of course, increasing the health of the workforce is going to benefit the economy as well, if you're looking for a purely monetary benefit.

Are Americans free to opt out of taxation for things they don't want to support?

There's option to opt out of social security if you are of the right religion that existed before, I want to say, by the 1960s was the nominal date in the statute -- and registered as such by some gatekeepers in the religion. The Amish won't let those who didn't grow up in the community register although some Mennonites might. Or are working as a preacher.

It should probably be challenged because it's a clear religious discrimination. I looked seriously at renouncing my right to social security but eventually I found out they've gamed the system in favor of a few insular religions.


So either fraud or no options ?

They absolutely should!

Every Brit has used the NHS multiple times.

It's far from perfect but no propaganda is ever required, just direct experience.


Every Brit has also used a Pub multiple times. Let’s nacionalize them and make them “free”.

I don't think anyone will complain about a cheap federally funded bar. And if they do they still have their fancy expensive bar to go to.

So what's the problem here?


What a lousy try at an argument

What a weird worldview, celebrating censorship that aligns with corporate interests in healthcare, a basic necessity, while using the tired diatribe "but muh tax money!" to pathetically drum support for it, lol.

Aren't you tired of being so angry at the wrong stuff? Such an exhausting way to live.


[flagged]


Nope, I came commenting on your comment which given the pattern of your other comments getting flagged all the time shows to be an exhausting way to live: being mad at small things.

You just proved my point.


I wish I could live in your bubble, where disliking the state forcibly taking away 50% of my salary (more actually) to redistribute to people that don't contribute to society and to waste in severely mismanaged public services is "being mad at small things".

Unfortunately, I don't live in the bubble.


You live in the bubble where taxation is only to redistribute to wasteful means. In that bubble you get blinded by black-and-white thinking that can never achieve any kind of nuance to actually address issues, only seeing issues in it all is not conducive to creating concrete criticism which is the first step to change. You can only be cynical, and contrarian.

So yeah, seems exhausting, being mad at it all because you can't think in specifics, just a general sense of madness and outrage at a black hole of frustration.

Unfortunately you live in that bubble.

Sorry you live in a broken society, maybe do something to change it.


What a sad world view

The NHS is a bit like the NRA in the US. Politicians and rich folk would ideally do away with it, but they cannot, so they have to play lip service to gain favour with the public.

So its not propaganda in the way you are thinking of.


What a mental stretch to compare a free life saving organisation with a organisation that supports guns to kill with. Seriously?

It's a classic American worldview.

Pooling connections somewhere has been fundamental for several decades now.

Fun quick anecdote: a friend of mine worked at an EA subsidiary when Sim City (2013) was released, to great disaster as the online stuff failed under load. Got shifted over to the game a day after release to firefight their server stuff. He was responsible for the most dramatic initial improvement when he discovered the servers weren't using connection pooling, and instead were opening a new connection on almost every single query, using up all the connections on the back end DB. EA's approach had been "you're programmers, you could build the back end", not accepting games devs accurately telling them it was a distinct skill set.


I've biased towards this heavily in the last 8 or so years now.

I've yet to have anyone mistakenly modify anything when they need to pass --commit, when I've repeatedly had people repeatedly accidentally modify stuff because they forgot --dry-run.


I wouldn’t want most things to work this way:

    $ rm file.bin
    $ rm —-commit file.bin
    $ cat foo.txt > bar.txt
    $ cat foo.txt | tee —-write-for-real bar.txt
    $ cp balm.mp3 pow.mp3
    $ cp —-i-mean-it balm.mp3 pow.mp3
There is a time and a place for it but it should not be the majority of use cases.


Totally agree it shouldn't be for basic tools; but if I'm ever developing a script that performs any kind of logic before reaching out to a DB or vendor API and modifies 100k user records, creating a flag to just verify the sanity of the logic is a necessity.


    if [ -n "$DRY_RUN" ] ; then
        alias rm='echo rm'
        alias cp='echo cp'
    fi
Of course, output redirects will still overwrite the files, since the shell does it and IIRC this behaviour can't be changed.


set -o noclobber


Yep. First thing I do for this kind thing is make a preview=true flag so I don’t accidentally run destructive actions.


Now I like that idea as an environment variable that takes precedence over the command parameters.


For most of these local data manipulation type of commands, I'd rather just have them behave dangerously, and rely on filesystems snapshots to rollback when needed. With modern filesystems like zfs or btrfs, you can take a full snapshot every minute and keep it for a while to negate the damage done by almost all of these scripts. They double as a backup solution too.


I used to have alias rm='rm -i' for a few years to be careful, but I took it out once I realised that I had just begun adding -f all the time


Yeah, but that's because it's implemented poorly. It literally asks you to confirm deletion of each file individually, even for thousands of files.

What it should do is generate a user-friendly overview of what's to be deleted, by grouping files together by some criteria, e.g. by directory, so you'd only need to confirm a few times regardless of how many files you want to delete.


See also rm -I (capital i), which only prompts when deleting directories or >3 files


Even in those basic examples, it probably would be useful. `cp` to a blank file? No problem. `cp` over an existing file? Yeah, I want to be warned.

`rm` a single file? Fine. `rm /`? Maybe block that one.


That last one would error without doing anything anyway because it's not recursive.


Uhuh:

    $ rm -rf /

    rm: it is dangerous to operate recursively on '/'
    rm: use --no-preserve-root to override this failsafe


That's a special case that is a) easy to call accidentally from a script when variables end up being unset and b) almost never a sensible thing to do.


—dry-run should default to true



Agreed, these seem like ideal patches to me for a first contribution. Solves a specific problem, doesn't require a lot of effort on maintainers side to review, and should give them a straightforward path to familiarise themselves with the process.


>Roundabouts are worse for land use though, which impacts walkability, and the safety story for pedestrians and bike users with them is decidedly not great as well.

They're much safer for pedestrians than intersections. You're only crossing and dealing with traffic coming from one direction, stopping at a median, and then crossing further over.

Unlike trying to navigate a crosswalk where you have to play guessing games as to which direction some vehicle is going to come at you from while ignoring the lights (people do the stupidest things, and roundabouts are a physical barrier that prevents a bunch of that)


In Waterloo Region I used to cycle through multiple intersections that were "upgraded" some years ago from conventional stoplights to roundabouts and imo it was a huge downgrade to my sense of safety. I went from having a clear right of way (hand signal, cross in the crosswalk) to feeling completely invisible to cars, essentially dashing across the road in the gaps in traffic as if I was jaywalking.

I could handle it as an adult just walking my bike but it would be a nightmare for someone pushing a stroller or dependent on a mobility device.


Roundabouts are relatively "busy"/"complicated" situations, so I suspect many drivers have less attention left over to check for pedestrians.

IMO you are absolutely playing frogger with the gaps in the traffic.


To an extent… drivers tend to accelerate when leaving roundabouts which can make crossing difficult for pedestrians


Especially bad when crossings are like 30cm from the roundabout. Some are better with at least one car's length between the two.

Otherwise you either risk getting run over by a car exiting the roundabout without seeing you; or getting run over by the car that stopped, but was rear-ended by another inside the roundabout.


>from one direction, stopping at a median, and then crossing further over.

This assumes a median, which is not present at most smaller roundabouts in the US.


They (you?) haven't even figured out Matrix yet, from the looks of things.

edit: If you really are the author of the post, I'd strongly encourage pulling it, now. Although the damage is now already done to Cloudflare, keeping it up just exasperates it. At best you can hope a sincere apology will mitigate some of the damage.


*exacerbates it


Thanks, no idea where my brain was when I typed that!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: