Paul SomeoneElse
487 following, 264 followers
Once I started getting more confident in programming
I felt the urge to make everything I do an library or an
API or a framework. What that means is when I noticed
I was making something bespoke, I would split it off
into the abstraction. Then I'd program the original
against the abstraction. TLDR, I programmed things
so that it could be re-used. Like instead of making a
web site I made Django.
Anyways that was good. I like how it separates the mode
of thinking and attention. Like when I am coding
the bespoke part it doesn't matter as much, but when
coding the API/framework/lib it matters a lot.
Like it's surprisingly not as slow as it sounds.
Oh so much of programming is learning that slow
is fast. Like a bad abstraction typically costs more
than redoing things a few times. [0]
So now .....
I am like saying that was good, but now I want you
[1] to program bespoke things. O_O There is a tension
here, I like keep wanting to jump to a new file in my
text editor and code the abstraction before the thing.
Yeah it's weird like in the real world (i am being loose
for effect) programming for the abstraction is bad.
The bespoke thing should be the focus.
(Like healthcare blocks the person from going to the ER.)
((Going to the ER is bespoke, healthcare is the abstraction.))
The abstraction and the actual also get caught up in
the language you use to refer to them. Like I need
quasiquote IRL.
Think of how black is the absence of color IRL, but
it's all colors at once in the ideal.
The mind gets confused between two things with the
same name. And also two things when one is
a abstraction of the other. Or in the color case they
are almost mutual abstractions.
Anyways this is my permission to write code directly.
[1]: me
OMG this is so stupid.
The RAG "injection" is adding a record in a local database.
Like that's a lot of drama to say...
"I can corrupt my own local database."
Yeah no shit.
But that is all irrelevant. RAG is a "pre-processing"
thing. People (i certainly hope) are not putting
un-vetted data into their RAG databases.
It's like saying I can corrupt a users address
but updating their address in the database
with bad data. Yeah ... obviously.
#;16> (load "wiki/db.scm")Here's the code ... i love it so much :P
; loading wiki/db.scm ...
#;17> (import wiki/db)
#;18> (get-breadcrumbs db 12)
()
#;19> (get-breadcrumbs db 4)
(((id . 4) (title . "title123") (level . 0)) ((id . 2) (title . "shild123123") (level . 1)) ((id . 1) (title . "root..") (level . 2)))
#;20>
#scheme #chicken #sql #CTE
#|
Get a list of nodes from the current node
up to the root.
|#
(define (get-breadcrumbs db node-id)
(let* ((sql #<#_end_
WITH RECURSIVE hierarchy AS (
SELECT id, parent_id, title, 0 as level
FROM wiki_node
WHERE id = #node-idUNION ALL
SELECT w.id, w.parent_id, w.title, level + 1
FROM wiki_node as w, hierarchy as h
WHERE w.id = h.parent_id
AND h.parent_id IS NOT NULL
)
SELECT id, title, level
FROM hierarchy
_end_
))
(sqli:map-row
(lambda (a b c)
(zip-alist '(id title level) (list a b c)))
db
sql)))
I usually use 'let* because more oftern than not I am
doing something with the results and I like the pattern
of just a successive "letting" of things :P
* Like I will frequently have subsequent let
lines with the same var as I refine it.
and the code just has this added:
#;23> (load "wiki/db.scm")
; loading wiki/db.scm ...
#;24> (import wiki/db)
#;25> (get-breadcrumbs db 4)
(((id . 1) (title . "root..") (level . 2)) ((id . 2) (title . "shild123123") (level . 1)) ((id . 4) (title . "title123") (level . 0)))
...
SELECT id, title, level
FROM hierarchy
ORDER by level DESC -- <-- this
They are to me examples of prioritizing
ergonomics for discoverability.
* I like UIs for discoverability too.
I have it charging now, I'm trying to get it turned on
enuf just to stop it from recording.
I had naively assumed it would time out :)
Maybe that's some safety thing to keep running
until dead.
I wonder if an HTTP Basic Auth prompt would stop AI scrapers. The username and password would be rendered to the page so that humans can quickly type it. Like a dumb captcha that makes the clankers think an account is required, so they just move on. I know it's an accessibility hit, but what am I gonna do, pay a ransom to Cloudflare? At this point I don't even care if my site is indexed in search engines, they're all basically rotten.
Some ideas for the password:
- permutation of today's date
- a very basic riddle ("'peanut' spelled backwards", "'puppy' in all caps")
- something that can only be discerned from viewing with CSS enabled ("only the bold letters in this sentence")
- something copyrighted that would jeopardize a bot (DVD scramble key)
Would this be an easier way to stop the bots that spoof user agent rather than maintaining IP blocklist and throttling? @alex
@winduptoy
Unfortunately, some browsers (including Edge) are dropping Basic Auth support, for some stupid reason...
@alex
@pkw Right now many of my endpoints are protected by a simple form with no password. The idea is from https://github.com/splitbrain/botcheck by @splitbrain – so right now the defence doesn’t have to be very elaborate.
For example I will go visit some ppl and on the way I
will imagine in great detail that they got in a car accident
and no one knows where they are.
* I had to make that more general just now, because
it was too real when I gave the actual example and
was upsetting me.
* As much or moreso than the right of people putting those
things in public places.
Oomfies, what's more gay? The winner is likely going to be my desktop OS. Others ideas are welcome, as long as it's fairly usable, open source and not Linux
| OpenBSD: | 30 |
| NetBSD: | 37 |
Closes in 1:53:56
@nina_kali_nina @libreleah i know you have dome thoughts on this >.>
@lucy @nina_kali_nina does netbsd have librewolf?
@libreleah @nina_kali_nina hmmm i dont think so?
@lucy @nina_kali_nina then i'm installing netbsd.
@lucy @nina_kali_nina i already ported librewolf to openbsd. and freebsd already had it, added by someone else. netbsd doesn't have it, so now i want to add it there.
@lucy @nina_kali_nina but i recommend openbsd by default. openbsd is the best IMO, for nearly every use-case scenario.
@lucy @nina_kali_nina btw https://codeberg.org/vimuser/librewolf-openbsd-port/
i recently ported librewolf web browser to openbsd. it's a modified firefox without all the spyware and other crap. just a really nice web browser in general. i'm trying to get it merged in their ports system, hopefully for 7.9 release (but otherwise definitely 8.0)
so that's like, reason #1 to use openbsd and not netbsd. because i haven't ported librewolf to netbsd yet :P
I mean i would be happy with either for sure :)
boostedAnother reason to hate #Apple We're seeing more 2018+ MacBook Pro/Air donations — but Apple's T2 chip means even after iCloud sign-out and reset, the firmware stays locked to the original account.
Without donor contact, these machines are useless. :(
I've upcycled ~1,000 older Macs, but T2 era machines will end that. It's controlling, creates e-waste, and will only get worse. #righttorepair matters — Apple couldn't care less.
It's not done, like I still need to add the "level"
WITH RECURSIVE hierarchy AS (
SELECT id, parent_id, title FROM wiki_node
WHERE id = 4UNION ALL
SELECT w.id, w.parent_id, w.title
FROM wiki_node as w, hierarchy as h
WHERE w.id = h.parent_id
AND h.parent_id IS NOT NULL
)
SELECT * FROM hierarchy
WITH RECURSIVE hierarchy AS (
SELECT id, parent_id, title, 0 as level
FROM wiki_node
WHERE id = 4UNION ALL
SELECT w.id, w.parent_id, w.title, level + 1
FROM wiki_node as w, hierarchy as h
WHERE w.id = h.parent_id
AND h.parent_id IS NOT NULL
)
SELECT * FROM hierarchy
ORDER BY level DESC
sqlite> .schema wiki_node
CREATE TABLE wiki_node (
id INTEGER PRIMARY KEY,
user_id INTEGER NOT NULL,
parent_id INTEGER NULL, -- NULL means it is a root node
data TEXT NOT NULL DEFAULT '',
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated TIMESTAMP NULL, title TEXT NOT NULL DEFAULT 'title123',
FOREIGN KEY (user_id) REFERENCES user(id),
FOREIGN KEY (parent_id) REFERENCES wiki_node(id)
);
CREATE TRIGGER wiki_node_updated
AFTER UPDATE ON wiki_node
BEGIN
UPDATE wiki_node SET updated = DATETIME() WHERE id = NEW.id;
END;
Sometimes I wish I could show all the fancy pages I
used to make with colors and fonts and react.
But while those pages look more impressive, it is
pages like this that I really like. I find the decoration
of web sites gets old if you using them A LOT.
Like a task tracker or a wiki.
This task tracker used to be a common-lisp app
also using fastcgi. It's very similar to the current
one just swapping common-lisp for scheme
and like spinneret for chiccup.
I was using a common table expression SQL lib to do hierarchy stuff
with the wiki nodes.
So far I am not needing it. I am just using a self referencing 'parent_id
column.
I think I might need it when I re-write the breadcrumb stuff.
To get the list of nodes from the current one back up to
the parent and sort by "level". That "level" is the thing
you don't get with basic SQL stuff.
Also I am kinda riffing, because I haven't gotten to that
yet.
That was one of the things that made me not like
python anymore.
The old python I liked cared more about consistency
and stability. The new python is basically javascript
npm. That is very much not a compliment.
But if you are into python and consistency and reproduce-ability
over time then pip and pip-tools is all you need.
If you care more about rust or how fast you can compile
your dependency tree then i don't know what to tell you.
If you think types belong in python (beyond pydantic)
then i also don't know what to tell you.
This lib was the main reason I used django for my wiki.
Also because I needed to get back into python
for my last job. But now i see ... claude commits :/
Oh well, I guess I'm glad I only bothered to look
know, because I would have been really bothered
to know that when I was still using it.
(I am technically still using it, but in maintenance
mode and for comparison.)
I will say having a wiki is really great.
The obvious stuff is to take notes and sorta cross
organize the things I am working on.
But the interesting thing to me was that
it helped me A LOT at my last job.
I just used it constantly. My co-workers
got used to seeing it whenever i shared
my screen. It really helped me communicate,
and I think it helped my projects too, because
I had pretty good memory of all the "issues"
because of it.
When I would do demos I would write out
an instruction for me to follow. Initially
because I was bad at speaking (even virtually)
in public. But then I just started showing my
notes when i demo'd and it was basically like
powerpoint.
I could put in things I didn't say and it really
helped me to respond to questions with pretty
quick and deep nuance.
I realized that this wasn't a "cheat sheet" but
just a legit way to talk to present to people.
It really helped my anxiety because I knew
if I got stuck I could just "start reading off the
steps from the wiki page". (Which predictably
i didn't need, like when you make a really good cheat
sheet and inadvertantly it helps you study.)
I have important news: my LibreWolf port for OpenBSD now *works perfectly*!
I compiled the master branch on OpenBSD -current (7.9 snapshot).
I rewrote the port again, this time making only the most surgical changes relative to www/mozilla-firefox.
LibreWolf uses mozconfig, so OpenBSD CONFIGURE_ARGS has no effect; I provide a patched mozconfig at build time.
*Everything works*. I rocked out to some tunes, and read some news.
Just doing some minor polishing, ready for submission to openbsd ports team.
They're already in release mode, so who knows if this will land before OpenBSD 7.9. I hope I can get it in the release.
LibreWolf is similar enough to FireFox, and my port is conservatively-enough engineered relative to www/mozilla-firefox that it fits well into their infrastructure, with little friction. For all intents and purposes, it is essentially the same browser as FireFox, just without the enshittification.
My port is ready for submission; I will soon submit my port to the OpenBSD Ports Team for review.
This branch shows what I will send:
Branch name labelled submit1, because I anticipate that they may ask for a few changes. So the expected 2nd draft would be sent to submit2, and then submit3, and so on.
Yes. With any luck, they *might* merge my patch for 7.9 - my changes, relative to www/mozilla-firefox, are quite conservative and done in the most surgical way possible.
@libreleah thanks for the port successfully tested on 7.9-beta!
@fcbsd i just woke up from my nap, having had a wonderful dream. and your screenshot is better than said dream. thank you.
@libreleah very nice. You plan to submit this to the official ports tree? I would love to give a package a try
If `sed` is not enough
| AWK: | 35 |
| Perl: | 12 |
Closes in 3:18:41:10
@RosaCtrl See, I love perl. But even I'm gonna say awk here.
If you're doing anything that awk can't handle, you should definitely use a REAL language.
(same content)
The power of shame in a post-truth world | Ken Roth, ex-director of Human Rights Watch
there's a lot on what idealism vs. praxis means to me in this
* to be clear from this perspective idealism is the driving force ultimately
or IOW words praxis needs to follow its ideals.
I think of how in the past there might have been a utility to
deferring to the status quo.
But definitely now the law of nature is that deferring to
the status quo is a death machine.
Any valid sense of deferring to the status quo is really
just bottoming out in that option is better on its merits.
So it's not really deferring to the status quo.
Any case where the only reason for a thing is because it
is the status quo, is bad.
s/asd/qwes=asd=qwe
I'm looking for someone to create some svg pictures for me. Where on the internet could I go to look at portfolios of vector art illustrators? (Actual illustrators, not people who prompt computers to generate stuff.)
@marijn I think @andycarolan might be able to help you out. You can find his portfolio here: https://www.andycarolan.com/
“Your Federal return was rejected.”
Oh, come on!
on the one hand, i don’t need a second sort of guitar that i don’t actually know how to play; on the other i have just seen what the fernandes zo-3/nomad looks like 😻
The shape and size is defn. good though.
The neck is a little smaller but feels pretty normal.
I think if I got the intonation fixed I'd drag
it around with me. It's not delicate like an acoustic
is, but has that same "play it anywhere" vibe.
In some ways it's nicer because you can turn it down.
Like if you just wanna practice fingering while
in public.
@pkw i saw they sell a u.s. flag version here as well, which would almost be wonderfully tacky if i wasn’t so disgusted by it
thanks for the info!
Those "AI" techbros really don't understand how shitty and broken their day-to-day experience with software will be once they've bullied all the neurodivergent people out of mainstream software development, huh?
@peter_sc I mean, this is already the reality with all mainstream software, isn't it?
@Bubu Indeed. But I bet a lot of them think that people will come back to fix things once the bubble pops and I'm not so sure about that anymore. This drive to "AI" is salting the earth. Hard.
I agree AI/LLM crap only exists because of that.
I keep trying to imagine what is next.
I kind of picture like a world of software
where it's based on superstition and really loose
connections to reality, but no understanding.
Like astrology before astronomy.
But I see that's very vague and handwavy and undeveloped.
this could be a neat interface to some microcontroller
or embedded computer system. Like this and a numpad
and some conventions around entering letters.
* Like I would do the compiler course in C and
I'd leave the class and go program it right away.
I wouldn't be waiting till the last minute, because
me now would love it.
There was one professor that was into lisp, and
in my class at least no one really got it.
Perl was still kinda new then and i think it
took that energy, because it was a dynamic
language and most things were c/c++.
(Java was new too, so lots of newer students
were EITHER java or perl.)
... The computer engineer majors just used C :P
*** Of course this is HIGHLY anecdotal
It was a slow burn for java to become considered
"compiled" like it is today.
@pkw I remember learning Pascal at university! 😨 We did our first commercial project using SQL Windows (later Centura). We switched to Java 1.3 or 1.4 (?) years later and I still remember that brown/beige (?) Java in a Nutshell book lying around and nobody really wanting to use Java except for that one intern who ended up convincing everybody else. And since I was using Linux at home, I was fascinated by the of "write once, run everywhere" -- little did I know how little that would end up mattering.
Also that book! It was on lots of desks at a couple
of my jobs too. All dog eared and bookmarked :)
I have put java back on my resume.
AI/LLM has made me like it again because like
it's not anywhere near that bad.
@pkw For sure! My programming bookmarks have a tiny section with Pascal links. I don't even know why. I suspect it's because I used Turbo Pascal as a kid and I still have some Turbo Vision nostalgia…
Sigh! What a time to be alive with so many languages to choose from. Sometimes I feel like every project of mine should be written in a different language. 😅
I go to the source download page, and see what language
it's written in. If I can I look at the recent commit history
and find the top committer. I then judge them politically.
* being into crypto or AI is political AFAIC.
** generally, this is a lot why i don't like rust.
Thank you past me :)
Like it was still just in a pile of mail, but i knew to put
that one piece of mail into a folder and note it.
Like those two lines are crossing, but they
haven't crossed yet.
* By older i mean it's harder to stand up
and me knees are kinda sore when i do stand up.
* But the things I can do that i couldn't do before
are still outweighing that. Like i don't even
think twice about bending over and tying my shoes,
or walking up the super steep hill to my neighborhood.
(cars don't use the hill in winter it's too steep)
I want you to picture what immediately comes to mind when I say the phrase "the Strait of Hormuz is closed." Got that mental picture? Great. Because, if you're an American, odds are everything you're currently imagining is wrong.
You might be thinking that in order to "close the Strait", some amount of military presence is required. Some form of naval barricade. Ships with guns and mines and things. Or at the very very least, boats. And you would be wrong.
The Strait of Hormuz is not closed due to some physical barricade. It's closed because of paperwork. And, more specifically, insurance paperwork. And, even more specifically, American capitalist insurance paperwork. This sounds like the most boring subject ever - until you realize that it controls literally everything about the war, how the war ends, and how things ever get back to "normal". (Spoiler warning, they don't.)
On February 28, 2026, the same day Iran publicly announced that a peace deal was on the table in which America gets literally everything they ever wanted, America decided to set fire to Iran in the form of (deep sigh) "Operation Epic Fury". We live in the stupidest timeline. In less than an hour, American military forces bombed more than 1,000 civilian and military targets in Iran, and murdered more little Iranian girls attending elementary school than the Taliban ever did.
Ships going through the strait immediately saw their insurance rates rocket sky high. Why? Because war is one of the things that insurance covers, along with piracy, natural disasters, and foreign governments seizing your cargo. Before the bombing, ship cargo insurance ran about 0.02% of the value of the cargo they're hauling. On an average cargo ship carrying somewhere in the neighborhood of 15 million barrels of cargo worth approximately $100 million dollars, that's a rounding error. $20,000 per transit is nothing. Immediately following the bombing though, that insurance rate went up to 5% of the value of the haul. Or roughly FIVE MILLION DOLLARS per ship per transit. Put simply, that's like you waking up one day and finding out that because some idiot bombed the Toyota factory half a world away, your car insurance just went up to $50,000/ a month overnight.
And then, to make things worse, on March 2, the insurance companies just yanked everyone's insurance completely. They sent out letters saying that in 72 hours, all ships in the Strait of Hormuz would have their insurance cancelled. If you had infinite money, you couldn't buy insurance for your vessel. The actuarial tables took one look at the state of US involvement in Iran and just went FUCK NO. So, on March 5, 2026, every single vessel attempting passage through the Strait of Hormuz - an active war zone - quietly and completely lost all their insurance.
Now, what can ships do without insurance? Basically nothing. If you're an uninsured cargo vessel, no port is going to take you, your cargo won't make it through customs, your financing collapses, and your flag State pulls your registration. Basically the entire legal infrastructure underpinning global overseas trade says if you don't have insurance, you don't sail. So don't sail is exactly what everything and everybody did. America essentially clockblocked itself using capitalism.
Over the next few weeks Iran began allowing a few vessels through the Strait, from nations it considers non hostile. And by "allowed", what I mean is, the insurance companies decided that some non hostile nations such as China could buy insurance for their vessels. But there's a catch. They had to buy that insurance using Chinese yuan. Which, China was only too happy to do.
And then, THEN, something amazing happened. Something that hasn't ever happened before in the history of the world. Cargo ships started broadcasting their international country of origin AS CHINA. Japanese and Indian cargo ships started blasting the airwaves claiming "China owner" or "All crew and ship Chinese". They were hacking the embargo WITH BRANDING. And it worked! They bought insurance with Chinese yuan, and were allowed passage through the Strait. Problem solved! Everyone's happy!
Guess who isn't so happy about that, though. America. America, who is the largest exporter of petroleum and liquid natural gas in the world. Of course, Trump wants the Strait open. If America can't export its petroleum and petroleum based byproducts, because its ships, and its ships alone can't buy the insurance they need at literally any amount of American dollars, then American petroleum manufacturers start losing money. Which means Trump starts losing money.
So what does Trump do next? In his infinite wisdom, he decides to, in order:
- insult them
- insult their religion
- threaten them with annihilation
- send the Navy to physically blockade the Strait.
The Strait which was open before he bombed them, and is still open to everybody but him, and which he desperately needs to be open.
And I want you to just have a little think about what that "blockade" actually looks like. Because if you think the US Navy is just shooting down Japanese and Chinese and Indian and South Korean civilian shipping vessels with absolutely no response from those governments, you're a special kind of stupid. No, what this actually looks like in practice is a US Navy vessel is parked just outside the Strait of Hormuz asking everyone else - who has the legal right and paperwork to sail through the Strait - to please pretty please don't sail though. And then when they fucking ignore us and sail through the Strait anyway, the US Navy writes down the ship's identification number on a list and has a little cry about it.
So, here's the international state of affairs as it stands right now:
America is currently blockading itself, and ONLY ITSELF from passage through the Strait of Hormuz using its own Navy, because of actions taken by its own Air Force, which closed the Strait of Hormuz due to its own capitalist system, which is the only reason America even gives a shit about Hormuz in the first place.
Art of the fucking deal, folks.
History