ManMachine
@max@manmachine.me
It's very annoying the way I have to get half way through writing a long detailed explanation of why someone is wrong before I figure out why they're right.
@simontatham happens to the best of us. sometimes you get lost a little and end up taking a more circuitous route towards understanding, but there's no shame in that.
@simontatham
It's annoying, but it's good that you have a way that you figure out that you're wrong, and if I understand correctly it's even before you get into the public debate.
@simontatham I didn't quite do that yesterday, but I did reply to a post to assert that, unlike France, Germany only has one time zone. I then had to go off and check
Yes, Germany does have only the one, and France does have ... 12!
@simontatham It can go something like this:
(1) You work out what the right answer to something is.
(2) You remember the right answer, but forget the detailed reasoning. From now on you just know what the answer is but would be pushed to justify it.
(3) A few years pass.
(4) Someone claims that your right answer is wrong. You can't instantly see what's wrong with their argument, but you know that you know the right answer, from way back.
There are two possible scenarios.
(a) Yes, you're still right, and the "someone" has come to the wrong conclusion by repeating, yet again, the age-old mistakes whose details you've forgotten.
(b) The world has changed. The "someone" is, now, right, even though they wouldn't have been a while ago. You'd better try to recreate your age-old reasoning and spot the assumption you made that was true then but is not true now.
@simontatham But dude, that counterfactual is so useful. Not only did you convince yourself that they’re right, but now you know how to walk others through it!
"Some factual information for you. Have you any idea how much damage that bulldozer would suffer if I just let it roll straight over you?"
"How much?" said Arthur.
"None at all," said Mr. Prosser.
Pick the best fallacy
| Sunk Cost has been my favorite since 1982: | 371 |
| Proof by Assertion is best: | 65 |
| Why y'all hate Strawman so much: | 76 |
| I just heard about Recency Bias: | 152 |
| If you don't vote Ad Hominem you're ugly: | 91 |
| Any fallacy fan knows No True Scotsman is best: | 191 |
| God told me Appeal to Authority is his favorite: | 112 |
| "Vote for False Attribution" - Abraham Lincoln: | 69 |
| The best is Circular Argument because it's awesome: | 205 |
| Category Error is the prettiest fallacy: | 94 |
| You said Tu Quoque so I did too: | 30 |
| C'mon vote Bandwagon everyone's doing it: | 125 |
| Vote Slippery Slope, next thing you're doing drugs: | 204 |
| I like turtles and also Non Sequitur Fallacies: | 241 |
| If Appeal to Probability can be chosen then it is: | 70 |
| Motte-and-Bailey is best, but I meant kinda good: | 72 |
| These are all bad and wrong, vote Fallacy Fallacy: | 352 |
Image source: https://commons.wikimedia.org/wiki/File:ISO_7010_W071.svg
Author: Wikimedia Commons user Clemenspool
CC0 (http://creativecommons.org/publicdomain/zero/1.0/deed.en)
thinking about putting my aseprite qbasic BSAVE format export script on git. wondering if i should do it as a gist or as a full repo. it's less than 90 lines of lua so a repo feels overkill but gists arent very discoverable
what do fedi
| gist: | 9 |
| repo: | 67 |
| some secret 3rd thing: | 17 |
| i just like voting in polls: | 33 |
Closed
you're not allowed to vote "some secret 3rd thing" without telling me what the third thing is!!
@eniko does the whole thing fit in one post on your instance? 
The secret third option is fighting Bahamut and an acquiring them as your GF.
@eniko my suggestion is chuck it in whatever form makes best sense for it to you, then link to it in a big collection page named something like Eniko's Stuff
@eniko repo, with the possibility of turning it into an random utils repo if more things like this come up?
@eniko Is it likely to see much revision? If so, I'd vote for a repo.
If it's likely to be largely static and not need any history? You have a website!
@JeremiahFieldhaven hm it might grow. though it might also not >_>
@eniko repo only if you think you'll edit it a lot in the future, because then people could see the edit history more easily, which might be educational
@prahou@merveilles.town big CONTROL vibes
@louis i don't know what that is :')
@prahou@merveilles.town I'm talking about the CONTROL game, where awesome posters likes these ones can be seen throughout the office
> Did you know?
Adblockers actually block more than ads. Our content will not display properly if you use an adblocker.
whatever freak shit you are doing that is getting blocked by my add blocker should also be blocked lol
Zipbomb JSON.
Someone who is not me should formulate a maximally-malicious JSON file. I made one with a nesting depth of ~182 million, but "jq" gives up early, at only around depth 3,000. So one trick would be to find the right balance of nesting and array length that stays under typical parsers' limits as long as possible, while requiring as much RAM as possible to get there.
https://jwz.org/b/yk2x
Ok FINE, since you have all failed me, I wrote my own JSON bomb generator. https://jwz.org/b/yk2x
@jwz I can't help but smile a little that people are still using perl to make the internet a better place.
@jwz in Perl no less!
@jsatk I like languages that are *stable* and don't require me to have 7 different versions installed at once.
@jwz brother I hear you. As someone who has written JavaScript for 17 years I’m exhausted by all the changes to it and node.
#retrocomputing folks: I'm trying to get a sense of the proportion of people here who are into a given class of retrocomputer today but didn't experience the machines when they first came on the market. I want everyone's input! Please boost!
This poll is about the early consumer home computers released between say 1977 and 1994.
Minicomputer poll: https://oldbytes.space/@fluidlogic/116026497511100991
32-bit home/personal computer poll: https://oldbytes.space/@fluidlogic/116026605156645610
| I had access to an 8 or 16-bit computer during their heyday: | 786 |
| I did not have access to an 8 or 16-bit computer during their heyday: | 60 |
| 8 or 16-bit computers had their heyday before I was born or when I was an infant: | 175 |
"AI is built on the collective knowledge of humankind."
No. Nononononono. It is not built on _knowledge_, it it built on _data_. And not everyone's experiences are available as data, many communities are excluded. Also: "Collective" implies some sort of collaboration and shared activity. But "AI" is just accumulation by a few powerful.
So No. It's not collective but extractive, not knowledge but data, not humankind but the hegemonic western view. Everything in that statement is wrong.
@tante I have been reliably informed, since the 80s, that knowledge is data with parentheses around it.
#poll for all you beautiful hard working professional computer touchers out there:
"my day job has me making the world a ____ place"
(be honest, don't just repeat what your CEO says)
| better: | 438 |
| worse: | 93 |
| not better not worse but a secret third adjective: | 337 |
| my mental health depends on me not examining this: | 332 |
im doing a thing on a linux vm at work and forgot everyting lol, less than a year since i stopped using linux and can barely remember a thing
maybe i need to get a vm or something for practice
This textbox is a message and part of a system of messages. Java is installed on over three billion devices. Java is found everywhere, even in your car. We thought we were a powerful culture.
Condensed Flexflex, after Guido de Boer
It's so weird that a lot of people think the quality of software is measured in how often it gets updated—it's literally the opposite.
@thomasfuchs thats exactly why i'm a big fan of #clojure and #lisp updates yes if necessary otherwise it just works.
@thomasfuchs If the quality of software is literally measured by how infrequently it gets updated then Internet Explorer is high quality. Don't think so.
Software update frequency has little to do with quality. Software updates often do tend to make software better, at least in open source where entshittification does not play a role. Frequent updates also mean software is actively developed, which is also a good thing.
@thomasfuchs that’s why I love Common Lisp libraries. Most of them are just “done” and haven’t been updated in 15 years or so.
@thomasfuchs A lot of developers will disagree with both statements. Without knowing any details, having good test coverage, single-responsibility functions and clean static and dynamic analysis results looks good. Updating the code base itself is not necessarily desirable, but keeping current on dependencies certainly is.
@alison @thomasfuchs that’s mostly a problem of people working in unstable dependency environments like npm
@mirabilos @alison I wish people would understand that dependencies like used today are a relatively new development in software.
For decades it was normal that apps included a standard library of the language used and sometimes maybe a few select external libraries (that rarely got updated).
The Internet where we go back to running our own servers, age verification by "these are my friends I've known for years"
RE: https://mastodon.social/@verge/116041069446538092
lol fuck that i aint doing that
Discord will require a face scan or ID for full access next month https://www.theverge.com/tech/875309/discord-age-verification-global-roll-out
@eniko Finally something* I can point to when people whine about me bitching about Discord and not wanting to sign up to any channels there
* Other than **gesticulates vaguely at everything** which they see as illegitimate commie nerd type whining that has no real consequences despite an ever flowing stream of evidence
@eniko Ah, so the question "should I make a discord channel for my game" somehow just answered itself
@eniko I kind of want to make a bunch of discord accounts now, just to see the lowest quality effort I can use to get a face scan to pass. Will a crappy model in MakeHuman work? :)
@eniko lol fuck no indeed. which brings up the question, what are the alternatives that provide for relatively low-latency voice comms? teamspeak, either managed or self-hosted? steam chat if everyone is on steam? (ignoring the hardest of the problems, the one of getting your community/raid group/whatever to move in unison)
@eniko I truly hate the "protect the kids" excuse the government and Big Tech use to justify internet censorship. If you need the government to keep your kids safe online, you're just a bad parent.
@eniko it’s still a problem if you want a community on there, but apparently it’s pretty easy to bypass https://80.lv/articles/people-are-using-garry-s-mod-to-circumvent-the-uk-censorship-law
RE: https://mastodon.social/@alatiera/116041284960493206
Haven’t had my hair cut since the pandemic started. Now I’m afraid going and turning into an AI shill.
"I stood on the street after my haircut and let sink in how big this was, how this technology has become an essential aide for so many, how I could lead performance efforts and help save the planet. Joining OpenAI might be the biggest opportunity of my lifetime."
Look, I understand grabbing the bag and I have been a fan of Brendan Gregg's work.
But maybe don't be completely delusional about working for a yet another big tech company thats destroying the society/planet?
https://www.brendangregg.com/blog/2026-02-07/why-i-joined-openai.html
@janl fuck, I haven't had a haircut since 2019 either
@thomasfuchs @janl same, November 2019 I had my final haircut - for my wedding - a whole lot of life has happened since then
something I've been thinking about is how, when I teach a class, I tell the TAs to never, ever touch the keyboard when they're helping a student with an assignment. not even once! because as soon as someone else is driving, it becomes real easy for the student to stop thinking and just let things happen.
kind of like what happens when we use a coding assistant.
You know, a glass teletype. That toy that kids keep calling a "monitor," even though we all know monitors are reference speakers used in audio production.
[…] I’m anti-the branding of it as “artificial intelligence”, because it’s not intelligent. It’s a form of machine learning. “Generative AI” is just a very good Markov chain that people expect far too much from.
it has been 0️⃣ days since I had to send a corporation a nastygram about disrespecting my “reduce motion” and “do not autoplay videos” accessibility settings
@0xabad1dea Do you ever get a helpful reply where they change things for the better?
As a vertigo/migraine haver, I spend a lot of time nobbling motion on my screen and arguing with my employer about it.
Sadly WCAG v2.2 doesn't go far enough, it allows motion for up to 5s or for it to be on-till-user-turns-it-off which isn't good enough if you ask me. Cos I get triggered before I can OFF it.
We have reached a new era of civil engineering; now we can build bridges by simply dumping truckloads of shit into the river until the shit mountains are tall enough that some people and maybe cars can cross the river. Truly, it is a revolutionary technology that democraticizes access to bridges; now everyone can dump a truckload of shit over small rivers here and there and cross the rivers instead of asking an engineer to build the bridge for them. This approach completely removes all the bottlenecks in engineering, too: no need to navigate difficult legal or ethical frameworks. The biggest players on the market are staring to replace their bridges with shit mountains, you'd better be catching up and learning how to use this new groundbreaking technology. Some of you have ethical concerns, but this is beyond of the scope of my post. I also recognise that some might notice fish in the rivers dying, or simply slip on the shit; just you wait, I bet it'll be fixed in ~6 months
Look, there are lots of skeptics out there, but the shit mountains are becoming really useful these days. With just a shit mountain or two you could reach places that previously required a ladder or a bridge or a vehicle. The vehicle part is still out of reach, but in the future we can make shit mountains placed in such a way that, when we pour some shit between them, would allow us to reach the destination almost as fast as cars and boats. And it runs on shit, and as you know, shit is virtually free, you can literally go to a number of websites and get the shit for free. You can even get open-sourced shit these days, and pour it locally. Open source shit mountains are not as good as the commercial ones yet, but we're getting there.
Anyway, the bottom line, shit mountains are here to stay. Learn how to live with them.
@nina_kali_nina is that the origin of code smell
@nina_kali_nina it's inevitable! we can't put the genie back in the bottle so I will keep wishmaxxing! We have no agency in this matter at all, so I will continue to boost it
@nina_kali_nina people worry that frontier models have hit a fecal maxima but oh buddy there's so much more shit where this all came from, infini-
@nach I need a "vomiting rainbow" emoji, why there's no such emoji on my home server, lool
@nina_kali_nina me and my local neighborhood agree with you, I just walked on the street past an ad for what's probably AI shit (haven't looked at what it is and the ad doesn't explain it either but it sure has that distinct visual fragrance of arrogance) and it was defaced to hell with countless tags saying "IA = caca" meaning "AI = shit" but in beautiful French it rhymes
I feel at times that AI advocates have the kind of attitude that says that innovation and creativity has been saturated and that there is nothing else left to innovate or create. That we just have to train models on the current heritage for the sake of maximum "perceived" efficiency.
Thanks to your post, now every time someone says "AI is the future" I will hear "shit mountains are the future" 😅
@gee8sh which is frankly an absurd position, considering how much innovation is happening around, and how much we need more of diverse thinking...
You know, I'm really dreading that the future is indeed going to be full of shit mountains. That'd be really bleak.
@nina_kali_nina but but but... You're doing the shit dirty with your posts comparing it to genai 😢
Shit is actually useful when I tend the fields in my farm...
@hkz shit is pretty great; many AI applications are great too! Computer vision was done in ethical and safe ways for decades. :3 shit should be where it belongs.
Incidentally, shit can be and is a construction material. My parents' place used a mixture of clay and horse manure for its building blocks, iirc. But it isn't the same as dumping a mountain of shit in a house-shaped way, or asking an agent of chaos to keep dumping mountains of shit on top of each other until they start to shape into a house
@nina_kali_nina We got here because software engineering has never required licenses or guardrails like other engineering professions.
Look, OK, it doesn't work now, but if can just add enough shit, it will surely become sentient, and that's why we're scraping everyone's toilet 24*7.
@nina_kali_nina
@nina_kali_nina legit question: how did civil engineers do it? Capital wise they have the same incentives, why do buildings not fall over all the time?
@bakuninboys civil engineering is a profession with thousands of years of history. The first known regulations for it were introduced about 3700 years ago, apparently, and since then it evolved into a highly regulated area that requires practicioners to have mandatory certifications and follow the laws. It seems the laws were added or improved due to large-scale disasters caused by engineers (building or bridges collapsing, fires spreading faster than they could be put off). Software engineering could have leveraged existing engineering practices, but lack of regulation and rapid development of the profession mean that finding creative ways to bypass law is still more profitable than doing things the right way. Civil engineers still do that every now and then; in this aspect, comparison to asbestos usage might be relevant.
@nina_kali_nina so I guess pushing for better regulation and actual responsibility for harm would improve things? Like most software limits liability as much as possible right?
@bakuninboys probably, but that doesn't come naturally, unfortunately
@nina_kali_nina@tech.lgbt Oh wow – this analogy is pretty strong. Will test this against unsuspecting AI prophets next possibility.
@ChrSt I feel like I'm making way too many strawmans here. But as you can tell, I'm very bitter about the loss of engineering practices across the industry, or, rather, industries
@nina_kali_nina @ChrSt I think the main missing thing is how the stench of the shit somehow is only a problem for people who live far away from the shit mountains. Yet they advocate for more shit mountains the most.
@nina_kali_nina@tech.lgbt As am I. But before right now, I could not put it into words. Drawing an analogy to other engineering fields somehow did not yet occur to me. Silly me – I always thought that the argument about destroying the planet might suffice …
@ChrSt I stopped arguing with LLM users, mostly. I feel like the divide is mostly ideological by now.
I also think that if we magically had a technology to make bridges out of shit that were safe, durable, and ethical, that'd be pretty awesome. But this ain't it; I think we're still shown shit mountains that are barely holding up together and told "that's the future of bridge building, look, it's cheap and solves today's business needs"
@nina_kali_nina@tech.lgbt Additionally realization I had today:
Why do we (as in ppl) need to democratize art? There is so much beautiful art out there. Why do I need to be able to create "art"? What do we gain from emotionless slop art?
@ChrSt this is especially morbidly funny in the context of the history of art...
Yeah it really feels like we could divide up workloads and everyone gets a day a week to be as good as they can at playing the banjo, even if they're never going to blow anyone's socks off.
@davey_cakes @wyatt @ChrSt idk about you but whenever I see my friends playing an instrument or doodling _for me_ I almost cry from happiness
I need to crack the whip at my friends so, they're shirking! 😀
@nina_kali_nina @davey_cakes @wyatt @ChrSt in my case, i like to make food like cakes or cappuccino for the ones i love, my parents love it, especially my grandma :3
@ChrSt @nina_kali_nina I thought art was already ready pretty democratic. Or are we talking about art in the sense of commodity objects that have "value" due to their requisite aspirational skill-level to reproduce. Anyone with a mouth can rap. Why do we need to "democratize" that one Wu-Tang record (except to seize power from that douchebag Martin Shikreli)
@FloppySalmon@dice.camp @nina_kali_nina@tech.lgbt I mean art more in a drawing kind of region.
It is not democratized for me, as I do not have the means (mostly as in time) to hone skills required to produce something „drawn“, that makes me happy looking at it.
@ChrSt @FloppySalmon you know, I've been typing and erasing my reply to this message a few times. Do you need help? There really are options available for uhhh art
@nina_kali_nina @ChrSt moi? I try to art by playing TTRPGs with my friends. I do wish I had more time and resources (and attention/motivation) to make stuff in other directions as well and develop skills. but the tabletop thing really keeps the focus of success based on what brings my friends and I joy. My sketches and drawings and maps and story hooks aren't good enough to sell but they're enough for an evening of good company at least.
@nina_kali_nina@tech.lgbt @FloppySalmon@dice.camp as in wanting to make a point this might have gotten a grimmer tone, than what reality really reflects – so no worries :D But what you write is the perfect embodiment of what I meant, just for text (and what has been said by
This is what I am afraid to loose. Either because it is outright slop, or because ppl that try avoiding burning a planet for a shitty mail text feel so under pressure to follow the trend of „a lot of text fast“ that they also will stop having this soul in their works.
@nina_kali_nina@tech.lgbt @FloppySalmon@dice.camp (somehow sorry for bringing yet another stream of thoughts to this :D)
@ChrSt @FloppySalmon no worries! I actually made a blog post in the spirit of this half a year ago. Long story short: I was working on a little video game, I needed art for a character who is a revolutionary, and I built a character sheet based on it. I am sure that a talented artist could have made a great illustration based on this character sheet. I think GenAI wouldn't have any difficulty in generating an illustration that, with a bit of extra polish, would have looked professional, and reflected the character sheet. And I think if I used either of these two options I'd be pressured to accept it if it looked good.
But I was drawing the illustration myself. Drawing it myself made me realise that my character sheet is straight out bad and doesn't reflect who the character is. And I think getting polished art based on poor design choices would only solidify mediocrity of the design; it'd be absolutely unmemorable, which is a grave sin for the poster character.
@nina_kali_nina great analogy! The closing is so spot on 😂
@nina_kali_nina mixed with the attention economy people clamor to say proudly 'i made this pile of shit' for some updooks
(language pun: dookie)
@nina_kali_nina Of course, when you dump a truckload of shit somewhere you can’t expect it to flow predictably in the direction you want to go, but if you dump dozens of truckloads flowing in different directions and piling on top of each other one of them will eventually touch the other side. You just need to keep dumping.
@nina_kali_nina I mean, this but literally for natural gas (and even coal) plants being built to power data centers.
@nina_kali_nina my fav are the blog posts that are like "in only one day i was able to build a shit bridge that 63% of users were able to cross successfully. i take no joy in saying this but civil engineering is cooked"
@aparrish "deploying a bridge isn't a bottleneck anymore" checks: we are in the business of building public transit systems end to end, from building vehicles to running them
@nina_kali_nina as an engineering firm, what would you rather deal with:
- *years* of meetings with crusty old engineers with their "math" and "simulations" and "safety protocols", and endless staffing meetings?
~ OR ~
- *days* to see a fully-functional mountain of shit?
just in terms of time-to-market, the mountain of shit is the clear winner, and the way of the future.
@JamesWidman be a "market disruptor", obviously, investors love this
@nina_kali_nina "Shit mountains are unstable and smell bad, but we know how to solve the problem, just give us 563 quadrillion dollars more and sure this time we will get it right, not like the other times we promised it in the previous 3 years."
@nina_kali_nina Reading it gave me a mild PSTD since I had been working on some dams the last few weeks and I don't know what's worse, a shit dam or the radioactive dam I was working on. 
@nina_kali_nina Also, all the shit will have washed away in three to seven years’ time, so we will need everyone on the planet to shit themselves into oblivion to generate enough material to rebuild. There will be plenty of shit for this cycle to continue indefinitely, we are sure.
Since @majenko is out gallivanting this evening, a late-running replacement stream will be departing from https://twitch.tv/baljemmett at 2100ish GMT (about half an hour from now). We'll be looking at the PSU design I started on Sunday, but chucking that out and starting over in a way that isn't boring and sucky. Hooray!
In what seems to have become somewhat of a theme this week, I'm going to steal @TechTangents's usual Sunday slot since he's unable to stream today - so I'll be moving mine forward from the planned 2100 GMT to take advantage of the gap. Hoping to finish off the LTO sled PSU board design so the extra time might come in handy!
That'll be at the usual https://twitch.tv/baljemmett from, eh, probably 1730 GMT (half an hour from now). Need to find myself a big coffee first...
@baljemmett @TechTangents One pint of coffee...
@TechTangents @chloeraccoon Absolutely! Proper British pint, too, none of these American short measures ;)
the fediverse is just a bunch of neurodivergents building their own internet so they don't have to talk to the other internet
from an article about the bitcoin crash: “Bitcoin is crashing hard, reaching historic lows of well below the $70,000 mark. At the time of writing, the token is hovering just above $63,000, levels we haven’t seen since October 2024.”
Given that I personally remember people being excited that bitcoin had reached the mark of one (1) dollar, the term “historic lows” to describe returning to the state of things slightly over one year ago is rather telling about the tech industry’s lack of perspective and cultural memory…
(it’s still dropping though 😌)
@0xabad1dea I used to get my pieces of bitcoin from public faucets. Back before they added all the extra decimal places.
@0xabad1dea isn't the big landmark that it now costs more to mine a bitcoin (in dollars) than 1BTC is worth?
@0xabad1dea I still remember people screaming that it was now too expensive in transaction fees to be a useful currency when it first hit the 1000 USD mark.
@0xabad1dea Bound to happen eventually. Traffic on the network has completely fallen off the table ever since the SegWit stuff.
@0xabad1dea That's such a weird piece of reporting.
Let me know once it hits $1 again, that will be exciting.
@0xabad1dea just part of the bigger ‘store of value’ playing out over 16x longer, I guess https://mastodon.social/@urlyman/116034002574640490
@0xabad1dea $10 was when I looked at it, realised it was a ‘greater fool’ thing, and thought it was probably too late to buy because the supply of greater fools must be close to exhaustion.
@0xabad1dea
It sounds like a dog whistle to lure in more investors. "Historic lows, grab your chances!"
From the context in the article it looks like an editing error. They meant to say that the drop is unprecedented (which it is in absolute terms, possibly not in percentage terms).
Capitalism has convinced people that new always equals “better” so if you want to rebel against Capitalism start to recognize that “new” is often just a way to extract more money from you.
Existing (or “old”) things can be functional and beautiful, and often easier to repair.
The word “old” should not be an insult. Not to things or to people.
@rasterweb I'm also trying to stop using "amateur" to mean sloppy and "professional" to mean high quality. That has always been a shitty dichotomy, and deskilling is only going to make it worse.
@attoparsec "Amateur: a person who engages in a study, sport, or other activity for pleasure rather than for financial benefit or professional reasons" seems about right!
It's about doing it because you love doing it.
@attoparsec I once emailed a community member letting them know we had to hire a "professional" to do something and he replied saying "Have I done a sub-standard job in the past as a volunteer?" and I had to explain that we were basically being extorted by a venue who was going to charge us *more* to have our own volunteer do something rather than pay them to do it.
(I put "professional" in quotes to mock the term, but he didn't get it until I explained it.)
#OtD 6 Feb 1916 the Cabaret Voltaire nightclub opened in Zürich, Switzerland. Described as "history's wildest nightclub" it was the spiritual home of the often radical Dada art movement, formed by artists revolted by the capitalist carnage of WWI https://stories.workingclasshistory.com/article/10606/opening-of-the-cabaret-voltaire-nightclub
_Why_, in sed and perl, does the s/foo/bar/ syntax default to substituting just one occurrence, and not all of them?
I can't immediately remember any situation where that was specifically what I wanted. And I can remember lots of situations where I was caught out by forgetting to add the 'g' flag on the end. (One of them three minutes ago, oddly enough.)
Why isn't 'g' the default, and 'only substitute once' a special option you have to select?
@aleteoryx I wonder if the answer in that case is _also_ "because it's what sed did" – that language, whatever it is, went with what seemed to be the existing convention. Maybe all the blame for this can be laid on a single decision decades ago that everyone's been following since.
@aleteoryx @simontatham I feel like it's a case of "the cheap one time operation as the default, expensive unbounded operation as the opt-in".
Lua is the only laguage off the top of my head that does not do that. str:gsub("a", "b") will replace all instances, but str:gsub("a", "b", n) is how you do only n substitutions.
@andnull @aleteoryx Python too:
>>> "tomorrow, and tomorrow, and tomorrow".replace("tomorrow", "stoats")
'stoats, and stoats, and stoats'
@i ah, and in an _interactive_ editing session, you might well want to replace a thing just once, or at least one at a time, because a single instance of that operation in ed is the analogue of moving the cursor over to it in a full-screen editor and deleting/retyping. Could be!
@simontatham @i And if you see that you wanted another, you can type s///p, and if you see that you wanted all, you can type s///gp
@simontatham Computationally cheaper in 1970?
@simontatham Perl does it, I'm 99% sure, because sed did it, and at the time Larry was writing perl it was a think replacement for shell scripting so inherited all the quirks of the tools being replaced to make it easy for folks (including, I suspect, Larry) to switch between the two.
@simontatham The typical use is “find a particular thing and replace it”. One wouldn't want it to do a second replacement just because there _happened_ to be a second instance of the thing later on. It would be a footgun, your program would work until it encountered the one-in-ten-thousand case where something unrelated looked like the thing your program happened to be searching for.
What I don't understand is what kind of atypical usage patterns you have for s/// that you don't understand this.
@mjd but 'sed s/foo/bar/' doesn't replace just one instance. It replaces (at most) one instance _per line_. I don't see why _that's_ likely to be what you want!
Plus, even if I really did want to replace one instance of foo per line, I might well need to choose which instance it was in a way that's more subtle than 'first occurrence on the line'. So s/foo/bar/ is underpowered for that purpose.
There are lots of obvious use cases for replacing all instances. Renaming an identifier in a program, for example. (Yes I know you're supposed to use a fabulously sophisticated language-sensitive editor for that these days; you haven't always set one up in a given situation.) If I only rename one instance of the identifier per line, the ones I missed cause compile errors.
@simontatham The basic use case for sed is that you have structured data, one record per line, all of the same form, and you want to perform a single operation on each record.
I think the disconnect here is that you're thinking of freeform text, rather than structured data.
@mjd yes, in which case it might very well be that the 'foo' I want to replace is the one in the third field of each line, if any. And there might or might not happen to be a foo in the preceding fields, or the following ones, and if so, I want to leave those ones alone. So then even sed s/foo/bar/ won't do what I want.
@simontatham Counterpoint: I went and looked in Perl code I had around to find examples for you and: I found none.
I didn't use s/// much—it gets more use in ephemeral command-line stuff. All the uses I found of s/// either
1. used anchors (so wouldn't be broken by a default /g) or
2. used /g or
3. default /g wouldn't matter for some other reason or,
4. in one case, had a subtle latent bug.
I found no uses at all of `sed` because when I use sed, it's not in a file. If I were writing some awful shell script, and I needed to do a substitution, I would use perl.
@mjd in Perl, you now remind me, I do have at least one use case for 'replace once', which is to run it in a loop, allowing each substitution to see the string output by the previous one:
1 while s/foo/bar/;
But I'm not sure that's quite in the spirit of "replace once" :-)
@simontatham Then, that would probably be an awk kind of problem. sed has traditionally shied away from numbered fields.
OTOH, if one extended sed, possibly its regular expression notation, possibly its command language, to be able to, say, recognise the beginning, ending, and interior of an n:th delimited field of every line, it would instantly become a significantly more powerful tool than it currently is.
@simontatham Btw, ObRant: if sed is so extended, the extension should be flexible enough to be easily applied to RFC 4180 CSV streams.
cut, too, should be able to handle those. I've got a homebrew cut that allows fields to be specified via -q (for 'quoted delimited fields', because -c and -s were already taken and -v has ... connotations) besides -b, -c, and -f, and can optionally get the field names from the first data tuple. One day, I'll clean it up and submit a patch to GNU coreutils, but I haven't gotten around to it just yet.
@riley by coincidence I ran across https://github.com/wireservice/csvkit a couple of weeks ago, which includes a tool called 'csvcut' which is like cut(1) but specialised to CSV.
@simontatham @mjd I default to thinking of it as starting munging each line from the left and applying more transformations until I'm done with the whole line.
Obviously, I built this mental model around how s/// already works, so trying to imagine the reverse, where I have to limit every operation, feels very awkward.
Maybe the cost of this model is having to write more complex/specific "foo"s than you do/want.
@simontatham I'm afraid it's because that's how ed (I) does it, because that's how QED did it: https://bitsavers.trailing-edge.com/pdf/sds/9xx/940/ucbProjectGenie/mcjones/R-15_QED.pdf#page=33 (page 6-1): IS/newtext/oldtext/ does one, IS:G/newtext/oldtext/ does all, and IS:123/newtext/oldtext/ does 123
QED doesn't claim an ancestor editor, so "because the QED authors chose to do it like this"?
and that will be because this is the behaviour you want when you're using (s)ed commands interactively to create a document; if this command language was devised ex nihilo today in a stream processing context, it would probably be the reverse, I agree
@simontatham "First, do no harm"? When I do M-x query-replace-regexp in Emacs, I always do a few test cases before hitting "!" to speedrun the rest of the file... because even after 35 years I can fatfinger a regex. And there have been any number of times where I've been like, ooh, doing a regex for this really complicated case is gonna be way more trouble than just going down the file and eyeballing it, yes, yes, yes, no, not that one, yes, no, not these two, yes, yes, yes, okay NOW speedrun it...
But then I suspect that your use cases and mine are rather radically different... but I think my human factors prof would say that doing it just once by default would satisfy the rule of least surprise...
That's my take on it, others may think differently...
@stonebear2 but, as mentioned elsewhere in the thread, "sed s/foo/bar/" doesn't replace it just once _total_, it replaces it just once _per line_, and that's the part that seems _more_ surprising than replacing it everywhere.
Yes, in interactive editing you often want to do things one at a time and check each one. The general consensus in this thread seems to be that 'sed' inherits its default from 'ed'. In an interactive ed session, s/// is your normal tool for replacing any part of a line – the equivalent of cursoring over to a piece of text and retyping it. So in that context it certainly makes sense that global replace is not the default.
But as soon as you're running the same s/// over every line in sed, you're doing a high-speed all-at-once batch processing operation whether you like it or not. If you're not confident your sed command will do the right thing, you have no way to confirm it one operation at a time. All you can do is put the output in a fresh file and check it before you replace the original (if you were even going to do that at all).
@simontatham oh, _right_...
No, I've done the trick where I wanted to replace the _first_ doublequote in a line with a single quote (and then follow up with s/"$/'/....) really useful where I'm maybe doing a here document and trying to get the quoting right... though I'm most often running said sed (ahem) _inside_ vi rather than in a batch file...
And then Perl is just being sed-consistent.
https://faultlore.com/blah/c-isnt-a-language/ deserves a fucking record for managing to trigger people into being extremely upset while also demonstrating that they don't understand the actual point being made
@mjg59 I had to stop reading halfway through as it gradually dawned on me that this was giving me a slow-burn panic attack. 176 triples. aaaaaaaaaaaaaa
@glyph @mjg59 This is bringing back some *really* old memories for me, too... I had entirely forgotten that one of my projects at Lucid was automating our FFI. I wrote a Lisp package that parsed C header files and auto-generated the FFI interface, without running a C compiler, so it had *just enough* of an implementation of cpp to barely limp by on the common cases... What a horror that was. this must have been like 1991?
It doesn't matter whether C is good or not. It matters that if I write code in two languages that aren't C, and I want it to all be part of the same process, I need to care about C. C pervades all. You cannot escape it. C will outlive all of us. The language will die and the ABI will persist. The far future will involve students learning about C just to explain their present day. Our robot overlords will use null terminated strings. C will outlive fungi.
@mjg59 Not if I write my libraries in Fortran
@iris_meredith Well sure but if you want anyone else to call them you're smashing on a shim to translate C strings because how else do I call you from Go
@mjg59 @iris_meredith unless we also create a cffi alternative for Fortran (fffi?) and ftypes.
(I am old and lack a proper sense of humor. Going back under my rock now)
@mjg59 @iris_meredith @gabriel
If you write all the needed functions the libc library provides into a language specific system library, you can escape a lot of C APIs, until you need to communicate with kernel ABIs. Then you're back at wrapping the language native APIs into a C ABI to be able to the syscalls.
And what will make it even more fun ... You'll need to do that for each single OS platform you want to support, to have something being portable.
This kind of stunts is something you only can afford to do on specialised embedded single purpose systems where you need to have as little code running as possible, to be able to fully audit all possible call chains - like in criticial secure systems for aviation or nuclear power plant systems and such like. It won't ever happen on general purpose systems at all.
We're basically stuck with C ABIs until the day someone is successful replacing it something new and better AND provide all the applications people need and want to use at the same time. It will be a revolutionary paradigm shift if someone is capable of pulling that one off. And I'm not holding my breath.
@dazo @iris_meredith @gabriel This is a great explanation of why we have ended up in this situation, but is not an assertion that it's the best outcome we could have had if different decisions had been made in the past.
@dazo @iris_meredith @gabriel And yeah I agree that given where we are it's what we're going to be stuck with forever, but sometimes it's nice to think about alternative futures
@mjg59 @dazo @iris_meredith @gabriel I have an idea! Let's wrap all this ABI stuff in XML!
*runs away veeeerrrry fast*
@mjg59 Dooming us all to inhuman toil for The One whose name cannot be expressed in signed char.
@LapTop006 @mjg59 @jwz that sounds scary, can you summarise?
The only modification I had in any of my code was an two byte sequence that makes a null, which is technically not utf8 valid but works as a way to code a null in a C style utf8 string when needed.
"But C++ libraries" motherfucker I did not live through the C++ ABI wars of the 2000s to have people tell me with a straight face that C++ will be interoperable 1500 years from now, but I would wager a lot of money that whatever software they're building then will be able to call into libglib.so
@mjg59
Any examples around of good, language-interoperable ABIs around? Or has C sucked all the oxygen out of that room?
@mjg59 /me fondly recalls that paper from Drepper from 20 years ago.
Aaaanyway the point that C is a protocol is very true.
But the flip side to that is: there are no pervasive cross-platform, multi-language protocols other than it.
If you e.g. see WASI as an attempt to rectify this, for one it's basically XKCD 927 (https://xkcd.com/927/).
But even if it catches on, an IDL based approach basically concedes that some underlying protocol is *forever*.
Might still be the practical way "out".
@mjg59 You could argue that with a sufficient supply of graduate students you could build a complete software system with ABIs divorced from C. You’d kind of have to build a new processor too though because all the modern instruction sets have been co-evolved along with C/C++ compilers for the last 30+ years.
@mjg59 meh, that's what they said, and with far better grounds, about Latin.
@resipiscent Which does remain as the international interoperable standard for describing what kind of organism you're talking about
@mjg59 you're confusing Linnaeas's corruption of Latin centuries after Latin became French. No one who spoke or wrote Latin functionally would makes heads or tails of Linnaeus, he appropriated pseudo Greek and Latin morphology specifically because they were dead and thus unchanging.
@mjg59 It's kind of amusing thinking back to 16-bit Windows where pretty much all of the ABI used Pascal calling conventions.
I guess it wasn't always destined to end up like this.
@jamesh Chunks of AmigaOS used BCPL calling convention because AmigaDOS was based on TRIPOS which was a Martin Richards production so obviously he wrote it in his language (TRIPOS being a Cambridge University reference because obviously)
@mjg59 Looking at this Raymond Chen blog post, it seems the choice was to reduce code size rather than because they saw Pascal as being more interoperable: https://devblogs.microsoft.com/oldnewthing/20040102-00/?p=41213
It also seems they didn't use Pascal calling conventions for all of the win16 ABI: just most of it.
@mjg59 @jamesh I recall VMS having an "official" API for libraries of different languages to be used, I don't remember if it was based on any language in particular, but it was relatively easy to call in FORTRAN and much harder in C funnily enough.
And, of course, MacOS (the original) was all Pascal.
I guess we have Unix to blame for it ending up being C. Not just because C exists because of Unix, but because it was all considered "good enough" at the time, and for some reason everyone went "Unix is the perfect operating system" in the late 1970s and most of the 1980s and decided to copy everything it did, including its mistakes.
Give me my Amiga back damn it! But with... capability addressing or something?
@mjg59 my deerwife studies compsci in bristol university and when i visited her i went to uni with her for fun. there was a security class that was talking about Return-to-libc attacks that she attends, i’m not someone who’s familiar with things that low level but i know enough C to know what they’re talking about. the entire class that day was basically just going over how it works and the lecturer smugly going “but now you might ask: why the fuck is it like this? that’s so fucking stupid! and i will tell you it’s because of C.”
@twinkle The absolute worst part of teaching operating security is having to explain why things are the way they are and seeing people's hope for the future leave their bodies
@mjg59 C is the first great machine language abstraction to exist. This property is what makes it immortal. You are talking binary through C with your machine in the most efficient way possible. It is an awesome tool. The other fluff may as well not exist but does because for some people, managing memory was too much or unnecessary, which in itself is understandable.
@siim and also it's just fucking wrong? C is an abstraction layer, it is definitionally not the most efficient way to talk to a machine. Even ignoring whether a compiler can optimise as well as a human, in some cases C's assumptions are not well aligned with how hardware behaves
@mjg59 oh yeah?
Here is one of my slides from 2001-2. I once presented this slide in a talk with Dennis Richie in the room.
@mjg59 We should have more preemptive embarresment for the decisions we make (and carry) today, that will force the hands of people in the future.
That being said, I still hope that one day (within the coming century) we will be able to unify operating systems and PL research and not be bound by Unix to a almost-lowest common denominator.
@mjg59
May be C already dead, as in, I actively avoid writing C, choosing Rust instead.
Most of us already live in: there is ABI, and there is your tooling (languages).
@mjg59 Only until there is an alternative widely-accepted ABI. Rust is working on a stable ABI for a subset of the language, and I doubt it will be a 1-to-1 correspondence with C.
@mjg59 We could trigger even more people by stating that using whatever the fuck the rust people cook up will probably be worse than what we have now.
@mjg59 Reading this and thinking about LuaJIT-FFI's approach, which is that instead of parsing C header files it defines a easily-parseable subset of C and parses that. You wind up editing your header files into long strings and passing them into Lua.
Maybe this "parseable header C" should be a cross-language standard.
@mjg59 This is my favorite blog post of all time. I recommend it to everyone all the time. In fact I did that just a few hours ago.
@mjg59 yes, I really liked that post. A long time ago I had to optimize code for a Fortran-wrtitten program. I wrote my portion in C, because in some cases (use of intrinsics without having to write asm) it made things easier (and it was impossible in Fortran directly). Everything used the C ABI anyway.
This article is a little advanced for me, is the point that not enough languages have written their own methods to interface with assembly?
I know very little about what goes on outside of the IDE. Just some vague notion that "the compiler makes this into assembly" But is it more like the compiler makes it into C and then C makes it into assembly?
@mjg59 that blog post was at least partially responsible for getting me interested in computer architecture/systems as a subject 😅
Is C 'the problem' here, or is the problem deeper than C and C is just the 'how we document the problem'?
If we could 'not care' about C, we'd still need to care about most of the things that make C ugly?
And not wanting to care about those things in assembler is why we put up with caring about how C wraps around those things?
Like, I'm not sure I understand the problem, but I kind of get the sense that any other approach would just be differently not-universal.
https://xkcd.com/927
@mjg59
@mjg59 We need to standardize a subset of C declarations that only uses types with a fixed definition like uint32_t and never "long long" or whatever, and maybe some very basic preprocessor features. When I make bindings for some library I need to be interpreting the headers and I wish that effort could be shared in the shape of a universal, easy to parse C header, instead of people having to repeat the same thing over and over for each language and for each ABI change.
Me: sharing a fun old tech thing
Rando: that’s for posers and hipsters
Accept my sincere GTFO
This is specifically a Mastodon problem, I don’t see this on other platforms that often
@thomasfuchs
I'm pretty sure that assholes are everywhere.
@dzwiedziu I have been on social media for 20 years+ and Mastodon is by far the worst place for this.
For example, your reply essentially calls me a liar.
@thomasfuchs I'm not trying to call you that. I can't as I cannot prove or disprove your personal experience.
At best I can counter my personal experiences where I saw such assholes on multiple platforms and probably was one. Yet this would not be much useful as this would be anecdote-to-anecdote combat, which is not very constructive.
Still, I'm sorry If what I wrote was accusatory, this wasn't my intention.
@dzwiedziu thank you!
fwiw what I’m mentioning is a shared experience of many uhm, “terminally online” people like me who post a lot.
I think Mastodon as a whole is often a bit too self-celebratory as “the alternative to corporate social media” and doesn’t work enough on fixing the issues a less evenly moderated space brings with it.
Good and bad sides to it.
@thomasfuchs
Yes, Mastodon is a technology and those can't fix a vast majority of societal problems.
See the case of Black Mastodon for example.
I just want to remind you that in 1992, the Internet cost $2.50 an hour to access ($4.00 after the first four hours a night), was three million times slower than WiFi, and nobody in your house could take phone calls while you used it. Doomscroll on THAT.
What’s your laptop/desktop backup recommendation for general public, not-highly-technical people who don’t have extreme security needs and just want not to lose their family photos etc?
Maybe it’s just “use the cloud drive,” but…OneDrive seems to cause a lot of problems? or does it?
@inthehands Time Machine on two removable USB drives. One lives in your house and gets connected regularly; one lives somewhere else and you back up to that once or twice a year. All other answers are incorrect.
@jwz
Yeah, that’s my exact setup too (except the remote one is more like monthly). It feels like a lot for the tech-phobic who find even a password manager overwhelming, but maybe that’s just a hurdle worth finagling people over.
@inthehands In my humble but correct opinion, they can either get over using external drives, or they can get over losing all of their photos. There's no third choice.
@jwz @inthehands I have bad xp with this setup, particularly the time machine part. TM doesn’t like being interrupted at all, and for nontechies, cable being unplugged during backup is certainity. Fixing that was hard for *me* and imho impossible for normies.
If it’s just Photos, maybe having them drag&drop? At least for the cold storage disk?
@almad @inthehands Time Machine isn't perfect, but literally everything else is worse. There's a lot of "don't go like that then" in the whole space.
@inthehands @jwz May I ask where the remote one is? Parent's/friend's house? Safe deposit box?
@jwz @inthehands I use TM on *three* removable USB drives—two SSDs (one to carry outside the house in case of fires) and one spinning rust (for reliability). Also Dropbox for file sync to the spare machine, a hot spare which *also* has two SSDs for Time Machine, but isn't always freshly backed up (or touched) from one week to the next.
@cstross @inthehands I know *so* many people whose backup strategy is: I have never taken a photo in my life with something other than an iPhone, so if I ever lose access to my iCloud, everything I've taken since I was a teenager is gone forever.
@jwz @inthehands As I was last plausibly a teenager in late 1984, more than an entire teenage lifespan before the iPhone first appeared, I now feel ancient …
@cstross @inthehands Not only were almost all of my employees born after @dnalounge opened, but probably most of them were born after I took it over...
@cstross @inthehands @jwz I have family photos on tin-types. No, I have not digitized them, there is no point. I am the last in my family to know who those people were. I just grab all the boxes and stuff them in my car.
@jwz @cstross @inthehands you need to take responsibility for your loved ones as well.
My wife lost a year's worth of photos when her iPhone was stolen. I used to have PhotoBackup (rsync-based photo backup app on iOS) handling this for her, but it hasn't been maintained for a while and its cipher set no longer has any compatible with a default OpenSSH installation so they basically failed silently.
I now switched her to the Immich app, but the damage was done. Another lesson learned is to use something like healthchecks.io to alert you if a backup hasn't successfully completed in N days.
@cstross @jwz @inthehands but aren't SSD’s unrealiable for long-term archiving? i see the SSD as more of a mobile solution with HDs with with the more long term one.
i mean, i have 15 year old HDs still working as archives of old media.
@blogdiva @cstross @jwz I was part of the team (though not a very important part, tbh) that advised Minnesota Public Radio on a storage format when they were digitizing their audio archives in the late 90s / early 00s. The conclusion our group reached was that •no• workaday digital format is suitable for long-long-term archiving, and by far the best approach is to have a process for copying and recopying it all forward onto new physical media into perpetuity.
@inthehands @blogdiva @cstross Exactly this. Don't worry about how long your media will last, just assume that it won't, and have a system that tolerates that. When my backup drive fails, I notice immediately and it's a complete non-issue.
History