Async python is such a footgun. Just don't.
Async python is such a footgun. Just don't.
Another 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!
Do it!
If 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!
Combine 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!
Does 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...
This 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...
A 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.
A useful guide on prompt engineering techniques: www.promptingguide.ai
I 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!"
Wow, 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
Today 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. π±