Async python is such a footgun. Just don't.
26.02.2025 14:00 β π 2 π 0 π¬ 1 π 0@jamesguthrie.bsky.social
computers, coding, networking, rust software engineer in AI at Timescale πΏπ¦ in π¨π
Async python is such a footgun. Just don't.
26.02.2025 14:00 β π 2 π 0 π¬ 1 π 0Another day, another bug caused by the lack of type safety in a snaky duck-typed language.
Why do we do this to ourselves?
Why am I doing this to myself?
Meanwhile, in the distance I hear the the gentle laughter of the crabs, frolicking in their blissfully-typed world π¦
#python #rust
Nice, looking forward to this!
25.12.2024 16:24 β π 1 π 0 π¬ 1 π 0Do it!
22.12.2024 17:01 β π 1 π 0 π¬ 0 π 0If it were up to me Iβd replace the phrase βproving a program correctβ with βconvincing another human the program is correctβ
I think the latter phrase promotes better intuitions for how to approach formal methods
I know the operator soup is somewhat reminiscent of line noise, but the power!
10.12.2024 07:40 β π 0 π 0 π¬ 0 π 0Combine that magic into:
UPDATE <table>
SET <jsonb_column> = <jsonb_column> #- '{"path", "to", "delete"}'
WHERE <jsonb_column> @? '$.path.to.delete';
π€―
`@?` returns if a jsonpath is in an object:
> SELECT '{"foo": {"bar": "baz"}}'::jsonb @? '$.foo.bar' as "@?";
@?
----
t
`#-` deletes a field specified by a path:
> SELECT '{"foo": {"bar": "baz"}}'::jsonb #- '{"foo", "bar"}' as "#-";
#-
-------------
{"foo": {}}
Postgres is awesome. I wanted to remove a key from a jsonb column. The `#-` and `@?` operators come to the rescue!
`#-` deletes a field specified by a path, and `@?` returns if a jsonpath is in an object.
Hey, I do Rust stuff!
13.11.2024 00:08 β π 2 π 0 π¬ 0 π 0Does anybody in my (small) network know of anybody who is _not_ using the default 8k page size in Postgres? And why?
Please repost for reach.
Seems like you found it? Maybe the real question is how to reproduce it?
Did it help that you were writing for a specific person (as opposed to a broader audience)?
This was a pretty eye-opening podcast episode, going into the computer security around political campaigning in the US. securitycryptographywhatever.com/2024/10/13/c...
10.11.2024 13:09 β π 1 π 1 π¬ 0 π 0This change in the 2024 edition is great! βHiddenβ unsafe ops in unsafe fns are a great way to overlook the safety constraints that the caller must uphold. And Iβve seen the bugs to prove its value. I wonder how many codebases that really need it will turn it off. doc.rust-lang.org/nightly/edit...
09.11.2024 22:01 β π 1 π 0 π¬ 0 π 0A few weeks ago I figured out how to access devices on two tailscale networks (tailnets) simultaneously (no more dreaded "switch tailnet") and wrote up my findings here: jamesguthrie.ch/blog/multi-t...
If you're interested in networking you might like it.
Just in time for the weekend: I finally got to the bottom of the cause for undefined behaviour in a Postgres extension written in Rust. Blog post incoming.
08.11.2024 21:38 β π 2 π 0 π¬ 1 π 0A useful guide on prompt engineering techniques: www.promptingguide.ai
06.11.2024 12:47 β π 0 π 0 π¬ 0 π 0I am reminded of that old joke about the optimist and the pessimist: the pessimist says "Everythingβs terrible, itΒ canβtΒ get any worse." and the optimist says "Oh, yes it can!"
06.11.2024 11:27 β π 7 π 2 π¬ 0 π 0Wow, I had forgotten how slow cargo's old git-based fetch was. Just switched to 1.60 to debug something, and was surprised by this fellow:
Updating crates.io index
Fetch [===============> ] 64.08%, (149529/291979) resolving deltas
The great thing about daylight savings time ending: an extra hour to sleep in.
The bad thing: kids donβt care about wall clock time.
A raspberry pi pico w with headers pre soldered, a pico inky display, and a raspberry pi pico debug probe
Welcome to my π§΅ where I post my progress and steps on a short embedded project in Rust π¦ on the Raspberry Pi Pico!
I hope to finish it today, but may end up being tomorrow.
does everybody know about my favorite website, the embroidery tips page that forgot to close its <h3> tags
25.10.2024 15:39 β π 8090 π 3502 π¬ 349 π 428Today at work I discovered that the front end components (react) donβt know anything about the types of the data coming out of the store (mobx), despite us using typescript.
Iβm surprised that anything worked.
Fixed the typing: one gajillion type errors. π±