#Python: standard operations recognize special (dunder) methods like __repr__, __len__, and __iter__ through its runtime data model.
#Rustlang: standard operations use explicit standard-library traits like Debug, FromStr, and IntoIterator.
JetBrains IDEs are now powered by libghostty! This brings huge feature and performance improvements to JB terminals! Based on their own annual reports, that's over 12.5 million active users across all platforms about to get a libghostty-powered terminal. https://t.co/DOG78NoGBp
I'll repeat myself: libghostty is and was always the primary goal of the Ghostty project (I said this in the first public talk I ever gave about Ghostty). The importance and impact of a free, liberally licensed, high quality terminal emulator library that runs anywhere and everywhere dwarfs any single terminal emulator application on its own.
I've estimated Ghostty's (GUI, not libghostty) own users at around a couple million. Overnight, 6x that are using a libghostty-powered terminal. From one integration.
Happy to see this, happy to hear JetBrains had a positive experience, and looking forward to continuing to improve and ship a stable libghostty tag soon!
#Python PEP 249 (https://t.co/6sNzZPyJND) and #Golang database/sql (https://t.co/8lGtkuEf4s) show why DB standards matter: apps get one stable API across drivers. PEP 249 defines a shared set of exception types, so switching DBs preserves your basic error handling structure.
val, ok := m[key] // Maps
val, ok := <-ch // Channels
val, ok := i.(Type) // Assertions
val := m[key]
val := <-ch
val := i.(Type)
In #golang, the 2nd variable ok is completely optional. Use it when a ok is needed.
Always benchmark, but for writer starvation: "https://t.co/zucOB7BQKI If any goroutine calls RWMutex.Lock while the lock is already held by one or more readers, concurrent calls to RWMutex.RLock will block until the writer has acquired (and released) the lock "
Lock() in sync.Mutex / sync.RWMutex vs RLock() in sync.RWMutex:
Lock() — blocks readers AND writers
RLock() — blocks writers only, does NOT block other readers
Use RWMutex RLock() when reads >> writes.
#golang#concurrency
sync.Once's .Do and sync.OnceFunc both take func() — no return.
So the result has to live somewhere: a separate struct field you write to as a side effect.
sync.OnceValue takes func() T — the return value IS the cache. No extra field.
#golang#concurrency
time.After(d): Concurrency tool. Sets up a background timer and returns a channel.
t.After(u): Date/time method. Instant boolean comparison to check if timestamp t occurs after timestamp u.
#Golang time package
Go goroutine stack dumps show a bracketed state like [chan send] or [chan receive]: that means blocked. The full list lives in src/runtime/runtime2.go as waitReason constants. Not documented anywhere else. #golang
https://t.co/9aTetrDHIo
It’s great to see the #golang compiler using stack allocations to kill those noisy 1, 2, and 4-item heap allocations—even for escaping slices.
Optimized performance, automatically. https://t.co/6JmOjKBgG9
become allocation aware #ziglang
Check out the official list of Go replacements: https://t.co/BuA1CMpNSH
From Go 1.26+, `go fix` helps you with each of these replacements automatically! #golang