Which it does so in seconds, faster than I can type. The code is correct, it compiles and does exactly what I wanted. And the code looks pretty reasonable. It handles flotas, has error handling and handles space or line separated numbers on stdin.
Rust 1.96.0 released
Version\
1.96.0 of the Rust programming language has been released. Changes
include a new set of Copy-implementing Range types,
assertions with pattern matching, a number of stabilized APIs, and two
Cargo vulnerability fixes. ⌘ Read more
QuiznessDesk, Thursday, May 28
In which Australian State or Territory would you find the Adelaide River?
During the Great Plague, what was painted on the front doors of plague-ridden houses?
According to the Bible, on what day did God create the beasts of the Earth?
What type of animals are portrayed in the book Watership Down?
In the Star Wars films, which two actors played Obi-Wan Kenobi?
How many US presidents’ heads are sculpted on Mount Rushmore?
Who had a number one hit in 1980 called Cryi … ⌘ Read more
The two types of Miku (dotthebot) [vocaloid] ⌘ Read more
Show HN: Posthorn, self-hosted mail without the mail server
Introducing Posthorn, a self hosted email gateway. One docker container (or Go binary) between every self hosted app on your VPS and your transactional email provider. Set up Posthorn once, point your apps to it, done.
I was trying to deploy Ghost on a DigitalOcean droplet and found that DO and many different VPS services have started to block the default SMTP ports to try to combat the various types of abuse they get. To actually configure my app, I had to hack to … ⌘ Read more
QuiznessDesk, Tuesday, May 26
Which of the following elements has the atomic number 2? Carbon, Lithium or Helium?
What type of animal is a mandrill?
What do edentulous mammals not have?
In which year did the Japanese bomb Pearl Harbour?
Which king was killed by an arrow to the eye?
In which country does the story “The Pied Piper of Hamelin” take place?
What colour spots does a common ladybird have?
Who directed the 1974 film Blazing Saddles?
In what sport is the “Fosbury flop” technique used?
Whi … ⌘ Read more
Launch HN: Chert (YC P26) – Twilio for iMessage
Hey HN! We’re Gary and Ian, and we’re building Chert ( https://www.trychert.com/), an API for businesses to send, receive, and automate iMessage conversations at scale. Check out our demo: https://www.youtube.com/watch?v=SRdwvVxMMoI.
We originally started by building products on top of iMessage because the blue bubble interface, typing indicators, and reactions made agentic conversations feel more human than ones on SMS … ⌘ Read more
QuiznessDesk, Monday, May 25
What is the only country that Denmark borders?
What type of animal is a sidewinder?
Chemically pure gold contains how many carats?
Which Charles Dickens novel featured the character of Tiny Tim?
What is the longest river in France?
Which Lion King character did Jeremy Irons provide the voice for?
Who had a hit in 1982 with Maneater?
In mythology, which of the following did Pegasus have that a normal horse wouldn`t? Wings, a crown, or three eyes?
In a deck of cards, wh … ⌘ Read more`
NTSB Wants PDF Removed After It Exposed Final Cockpit Audio From UPS Crash
The NTSB temporarily closed public access to nearly all investigation dockets after people used a spectrogram image from a PDF in the UPS flight 2976 crash file to reconstruct approximate cockpit voice recorder audio and post it online. “We show our work and we’ve been doing this type of thing for years. Nobody was aware that … ⌘ Read more
@tftp@tilde.town mentioning in here requires he whole shebang. With jenny, if using vim, there is a key combination:
Nick name completions: Allows you to use ^X ^U to turn verbatim nick names into full twtxt mentions. For example, typing “cath” and then pressing ^X ^U will turn “cath” into a full mention, like “@”. (This function will read the contents of your “~/.config/jenny/follow” file.)
QuiznessDesk, Monday, May 18
The Hoover Dam in America was built on which river?
Little, Eurasian Eagle and Burrowing are all types of which species of bird?
Carbon, Oxygen and which other element make up carbohydrates?
Who created havoc in 1938, when his radio broadcast of The War Of The Worlds was believed to be true?
By what nickname, meaning little barrel, is the artist born Alessandro di Mariano Filipepi better known?
According to Oscar Wilde, what is `the name everyone gives to his mistakes … ⌘ Read more`
Yet another Dirty Frag type vulnerability: Fragnesia
Sam James has sent an announcement
to the OSS Security mailing list about another
local-privilege-escalation (LPE) exploit in the same class as Dirty Frag, called
“Fragnesia”. From the disclosure:
This is a separate bug in the ESP/XFRM from dirtyfrag which has received its own patch. However, it is in the same surface … ⌘ Read more
Challenging UPS and FedEx, Amazon Opens Its Shipping Network to All Businesses
This week Amazon opened up its parcel shipping, fulfillment, and distribution “to businesses of all types and sizes.” Any business can now ship, store, and deliver “using the same supply chain that supports Amazon,” according to Monday’s announcement of “Amazon Supply Chain Services.”
The move sent shares of UPS and FedEx “ … ⌘ Read more
@movq@www.uninformativ.de Oh, nice! I never was brave enough to try to move the OS to a different machine, always reinstalled from scratch. :-S
A mate also had this or a very similar white Samsung netbook. I remember typing on that thing was no fun at all for me, never hit the single right key. :-D
I’m not a fan of netbooks, there’s not remotely enough screen space for my taste. I always had 15 inch notebook. Sure, they are way heavier, but I can actually get work with them done. And yes, glared screens are an invention right from the devil himself. Completely stupid.
Security review of Plasma Login Manager (SUSE Security Team Blog)
SUSE’s Security Team has published a detailed\
blog post on their recent review of the Plasma\
Login Manager version 6.6.2,
which was forked from the SDDM display\
manager.
While most of the code [remains t … ⌘ Read more
What Type of Mattress Is Right for You? (2026)
Here’s how to pick the best mattress for your sleep needs, straight from a professional mattress tester. ⌘ Read more
Just saw the video. Can’t believe that ladder is that expensive. Even in AUD, it is almost $100. It is also 2.5 stars, with 13 reviews. Gulp. Engineering aside (and you are right, it is pretty interesting, and some, if not most of it went over my head), the ladder is rubbish. This is the one I have. Not super, but have been with me for a while, and used quite a bit, still as good as new.
[$] One Sized trait does not fit all
In Rust, types either possess a constant size known at compile time, or a
dynamically calculated size known at
run time. That is fine for most purposes, but recent proposals for the language
have shown the need for a more fine-grained hierarchy.
RFC 3729 from David Wood and Rémy Rakic would add a hierarchy of
traits to describe types with sizes known under different circumstances. While
the idea has been subject … ⌘ Read more
AMD Ryzen 9 9950X3D2 Benchmarks: The Best Desktop Performance For Linux Developers, Creators
Today we can finally share performance benchmarks of the long-rumored AMD Ryzen 9 9950X3D2 Dual Edition processor. This new halo product for the Ryzen 9000 series desktop line-up offers captivating performance for developers frequently compiling code, creators, technical computing workloads for students or hobbyists or those not able to afford a Threadripper / EPYC type workstation, or similar heavy computing use. With … ⌘ Read more
Linux 7.1 Adds New AMD SMCA Bank Types, Presumably For Upcoming EPYC Venice
The AMD Machine Check Exception “mce_amd” driver as part of the Error Detection And Correction (EDAC) subsystem is introducing support for new SMCA bank types on AMD platforms. Given the timing these new bank types are presumably for AMD’s upcoming Zen 6 / EPYC Venice hardware… ⌘ Read more
@lyse@lyse.isobeef.org AI result ahead, feel free to ignore.
I “asked” the AI at work the same question out of morbid curiousity. It “said” that SQLite converts that integer to floating point internally on overflows and then, when converting back, the x86 instruction cvttsd2si will turn it into 0x8000000000000000, even if the actual floating point value is outside of that range. So, yes, it allegedly actually saturates, as a side effect of the type conversion.
I couldn’t find anything about that automatic conversion in SQLite’s manual, yet, but an experiment looks like it might be true:
sqlite> select typeof(1 << 63);
╭─────────────────╮
│ typeof(1 << 63) │
╞═════════════════╡
│ integer │
╰─────────────────╯
sqlite> select typeof((1 << 63) - 1);
╭──────────────────────╮
│ typeof((1 << 63) ... │
╞══════════════════════╡
│ real │
╰──────────────────────╯
As for cvttsd2si, this source confirms the handling of 0x8000000000000000 on range errors: https://www.felixcloutier.com/x86/cvttsd2si
The following C program also confirms it (run through gdb to see cvttsd2si in action):
<a href="https://we.loveprivacy.club/search?q=%23include">#include</a> <stdint.h>
<a href="https://we.loveprivacy.club/search?q=%23include">#include</a> <stdio.h>
int
main()
{
int64_t i;
double d;
/* -3000 instead of -1, because `double` can’t represent a
* difference of -1 at this scale. */
d = -9223372036854775808.0 - 3000;
i = d;
printf("%lf, 0x%lx, %ld\n", d, i, i);
return 0;
}
(Remark about AI usage: Fine, I got an answer and maybe it’s even correct. But doing this completely ruined it for me. It would have been much more satisfying to figure this out myself. I actually suspected some floating point stuff going on here, but instead of verifying this myself I reached for the unethical tool and denied myself a little bit of fun at the weekend. Won’t do that again.)
Claude Code’s Source Code Leaks Via npm Source Maps
Grady Martin writes: A security researcher has leaked a complete repository of source code for Anthropic’s flagship command-line tool. The file listing was exposed via a Node Package Manager (npm) mapping, with every target publicly accessible on a Cloudflare R2 storage bucket. $ du -hs .35M .$ find -type f | sed ’s/^.*\.//’ | sort | uniq -c | sort -bVr 1332 ts … ⌘ Read more
Bills Would Ban Liability Lawsuits For Climate Change
An anonymous reader quotes a report from Inside Climate News: Republican lawmakers in multiple states and Congress are advancing proposals to shield polluters from climate accountability and prevent any type of liability for climate change harms – even as these harms and their associated costs continue to mount. It’s the latest in a counter-offensive that has unfolded … ⌘ Read more
Sodium-Ion Battery Tested for Grid-Scale Storage in Wisconsin
“A new type of battery storage is about to be deployed on the Midwestern grid for the first time,” reports Electrek:
Sodium-ion battery storage manufacturer Peak Energy and global energy company RWE Americas will pilot a passively cooled sodium-ion battery system in eastern Wisconsin on the Midcontinent Independent System Operator network — the fi … ⌘ Read more
sqlparse is also unsuitable for me: https://github.com/andialbrecht/sqlparse/issues/688
I’m supporting incremental SQLite schema changes to just upgrade from an older database version to whatever the current software version supports. In the past, I already noticed that this is quite expensive in unit tests when each test case runs through the entire schema patches and applies them one by one.
To speed up test execution I now decided that I finally go through the troubles of maintaining both a set of incremental patches and a full schema setup in one go. A unit test verifies that both ways end up with the same structure. This gives me a set of SQLs to check the structures:
SELECT type, name, tbl_name, sql
FROM sqlite_schema
ORDER BY type, name, tbl_name
Unfortunately, the resulting CREATE TABLE SQL queries are formatted differently, depending on whether the full schema was set up in one big step or the structure had been modified with ALTER TABLE. Mainly, added columns are not on their own lines but appended in one physical line. That’s why I wanted an SQL formatting tool. Since I didn’t find one that works decently, I’m now doing some simple string manipulation. Joining consecutive whitespace into a single space character, removing spaces before commas and closing parentheses and spaces after opening parentheses. This works surpringly good enough. Of course, if it fails, the “diff” is absolutely horrendous.
Now for the cool part, my test execution dropped from around 5:05 minutes to just 1:32 minutes! I call that a win.
I just stumbled across PRAGMA table_info('tablename') https://sqlite.org/pragma.html#pragma_table_info, PRAGMA foreign_key_list('tablename') and friends. I guess, I have to play with that, now. It’s probably much better to use than the SQL text approach.
@bender@twtxt.net H-Blockx covered it, the original was by Snap! https://en.wikipedia.org/wiki/The_Power_(Snap!_song) But it’s actually not my type of music at all. The high pitch refrain “I’ve got the power” is iconic and has somehow burned itself into my brain. Must have been a short circuit.
@movq@www.uninformativ.de Luckily, I’ve never encountered any bugs in Vim with my type of work and features I use.
@lyse@lyse.isobeef.org hahhaha! Succulent, as in this type of plant. Certainly not looking to eat them, for sure! 😅
Resile is an ergonomic, execution resilience and retry library for Go.
Resile is an ergonomic, type-safe execution resilience and retry library for Go. Inspired by Python’s stamina, it features generic execution wrappers, AWS Full Jitter backoff, native Retry-After header support, and zero-dependency observability for distributed systems. 1 points posted by cinar ⌘ Read more
A Nuclear Reactor Backed By Bill Gates Gets Federal Approval To Start Building
An anonymous reader quotes a report from the New York Times: A novel type of nuclear power plant in Wyoming backed by Bill Gates received a key federal permit on Wednesday, making it the first new U.S. commercial reactor in nearly a decade to receive clearance to begin construction. The Nuclear Regulatory Commissio … ⌘ Read more
Vehicle Tire Pressure Sensors Enable Silent Tracking
Longtime Slashdot reader linuxwrangler writes: Dark Reading reports that a team of researchers has determined that signals from tire pressure monitoring systems (TPMSs), required in U.S. cars since 2007, can be used to track the presence, type, weight, and driving pattern of vehicles. The researchers report (PDF) that the TPMS data, which includes unique sensor IDs, is … ⌘ Read more
PEP 827: Type Manipulation
We propose to add powerful type-level introspection and construction facilities to the type system, inspired in large part by TypeScript’s conditional and mapped types, but adapted to the quite different conditions of Python typing. ⌘ Read more
Trump’s ‘Board of Peace’ Explores Stablecoin For Gaza
An anonymous reader quotes a report from the Financial Times: Officials working with Donald Trump’s “Board of Peace” are exploring setting up a stablecoin for Gaza as part of efforts to reshape the devastated Palestinian enclave’s economy, according to five people familiar with the discussions. The talks around introducing a stablecoin – a type of cryptocurrency whose v … ⌘ Read more
Ceph In Linux 7.0 Lands Support For AES256K Keys
For those making use of the Ceph open-source, distributed storage platform, with the upcoming Linux 7.0 kernel they are introducing support for the AES256K key type… ⌘ Read more
Linux 7.0 Brings Apple Type-C PHY, Snapdragon X2 & Rockchip HDMI 2.1 FRL Additions
Ahead of the Linux 7.0 merge window ending this weekend, the PHY updates were merged this week for this next major kernel release. There are some notable PHY additions particularly for Apple Silicon USB Type-C support as well as additions for Qualcomm’s new Snapdragon X2 laptop SoCs… ⌘ Read more
NASA Chief Classifies Starliner Flight As ‘Type A’ Mishap, Says Agency Made Mistakes
NASA has officially classified Boeing Starliner’s 2024 crewed flight as a “Type A” mishap, acknowledging serious technical failures and leadership shortcomings that nearly left astronauts unable to safely return. Administrator Jared Isaacman released (PDF) a 311-page internal report citing flawed decision-m … ⌘ Read more
Vim 9.2 Released
“More than two years after the last major 9.1 release, the Vim project has announced Vim 9.2,” reports the blog Linuxiac:
A big part of this update focuses on improving Vim9 Script as Vim 9.2 adds support for enums, generic functions, and tuple types.
On top of that, you can now use built-in functions as methods, and class handling includes features like protected constructors with _new(). The :defcompile command has also been impro … ⌘ Read more
ByteDance Suspends Seedance 2 Feature That Turns Facial Photos Into Personal Voices Over Potential Risks
hackingbear writes: China’s Bytedance has released Seedance 2.0, an AI video generator which handles up to four types of input at once: images, videos, audio, and text. Users can combine up to nine images, three videos, and three audio files, up to a total of twelve fi … ⌘ Read more
Brookhaven Lab Shuts Down Relativistic Heavy Ion Collider (RHIC)
2001: “Brookhaven Labs has produced for the first time collisions of gold nuclei at a center of mass energy of 200GeV/nucleon.”
2002: “There may be a new type of matter according to researchers at Brookhaven National Laboratory.”
2010: The hottest man-made temperatures ever achived were a record 4 trillion degree plasma experiment at Brookhave … ⌘ Read more
Les Dossiers du 10e Homme : promotion exclusive !
Enfin, vous aussi, vous allez pouvoir devenir ce type insupportable qui dit « Je vous l’avais bien dit ! » à Noël ! Vous en avez marre d’être celui qui découvre les crises en même temps que votre belle-mère sur BFM TV ? Vous rêvez secrètement de pouvoir dire « Ah tiens, la dette française ? J’en ai parlé il y […] ⌘ Read more
Hmmm, that’s a pity. I never realized that before. The following Go code
var b bool
…
b |= otherBool
results in a compilation error:
invalid operation: operator | not defined on b (variable of type bool)
I cannot use || for assignments as in ||= according to https://go.dev/ref/spec#Assignment_statements. Instead, I have to write b = b || otherBool like a barbarian. Oh well, probably doesn’t happen all that often, given that I only now run into this after all those many years.
Google Axion CPU Performance With The New Google Cloud N4A Instances
Back in 2024 Google rolled out their Axion in-house ARM processors with the Google Cloud C4A instance type. Today they are expanding their Axion offerings in Google Cloud with the N4A instances now out of preview. The Google Cloud N4A instances are designed for scale-out web servers and microservices, containerized applications, back-end application services, databases, data analytics, and cost-effective development/staging/testing environments. ⌘ Read more
Linux 7.0 Apple Silicon Device Tree Updates Have All The Bits For USB Type-C Ports
Ahead of the Linux 6.20~7.0 cycle kicking off next month, the Apple Silicon Device Tree updates have been sent out for queuing ahead of that next merge window. Notable this round are the Device Tree additions for rounding out the USB 2.0/3.x support with the USB-C ports… ⌘ Read more
Spent basically the entire day (except for the mandatory walk) fighting with Python’s type hints. But, the result is that my widget toolkit now passes mypy --strict.
I really, really don’t want to write larger pieces of software without static typing anymore. With dynamic typing, you must test every code path in your program to catch even the most basic errors. pylint helps a bit (doesn’t need type hints), but that’s really not enough.
Also, somewhere along the way, I picked up a very bad (Python) programming style. (Actually, I know exactly where I picked that up, but I don’t want to point the finger now.) This style makes heavy use of dicts and tuples instead of proper classes. That works for small scripts, but it very quickly turns into an absolute mess once the program grows. Prime example: jenny. 😩
I have a love-hate relationship with Python’s type hints, because they are meaningless at runtime, so they can be utterly misleading. I’m beginning to like them as an additional safety-net, though.
(But really, if correctness is the goal, you either need to invest a ton of time to get 100% test coverage – or don’t use Python.)
@lyse@lyse.isobeef.org The thing is that’s hard to avoid if TYPE_CHECKING, but documentation tools such as pdoc don’t support that … so it’s either type hints or API docs. 🤷
I hope I can eventually find a way out of this mess …
Here am I looking at the different tcell.Key constants and typing different key combinations in the terminal to see the generated tcell.EventKeys in the debug log. Until I pressed Ctrl+Alt+Backspace… :-D Yep, suddenly there went my X…
So far, it appears as if I can have either only Ctrl or Alt as modifiers. But not in combination. And Shift is just never ever set at all. Interesting.
I’m trying to implement configurable key bindings in tt. Boy, is parsing the key names into tcell.EventKeys a horrible thing. This type consists of three information:
- maybe a predefined compound key sequence, like Ctrl+A
- maybe some modifiers, such as Shift, Ctrl, etc.
- maybe a rune if neither modifiers are present nor a predefined compound key exists
It’s hardcoded usage results in code like this:
func (t *TreeView[T]) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive)) {
return t.WrapInputHandler(func(event *tcell.EventKey, setFocus func(p tview.Primitive)) {
switch event.Key() {
case tcell.KeyUp:
t.moveUp()
case tcell.KeyDown:
t.moveDown()
case tcell.KeyHome:
t.moveTop()
case tcell.KeyEnd:
t.moveBottom()
case tcell.KeyCtrlE:
t.moveScrollOffsetDown()
case tcell.KeyCtrlY:
t.moveScrollOffsetUp()
case tcell.KeyTab, tcell.KeyBacktab:
if t.finished != nil {
t.finished(event.Key())
}
case tcell.KeyRune:
if event.Modifiers() == tcell.ModNone {
switch event.Rune() {
case 'k':
t.moveUp()
case 'j':
t.moveDown()
case 'g':
t.moveTop()
case 'G':
t.moveBottom()
}
}
}
})
}
This data structure is just awful to handle and especially initialize in my opinion. Some compound tcell.Keys are mapped to human-readable names in tcell.KeyNames. However, these names always use - to join modifiers, e.g. resulting in Ctrl-A, whereas tcell.EventKey.Name() produces +-delimited strings, e.g. Ctrl+A. Gnaarf, why this asymmetry!? O_o
I just checked k9s and they’re extending tcell.KeyNames with their own tcell.Key definitions like crazy: https://github.com/derailed/k9s/blob/master/internal/ui/key.go Then, they convert an original tcell.EventKey to tcell.Key: https://github.com/derailed/k9s/blob/b53f3091ca2d9ab963913b0d5e59376aea3f3e51/internal/ui/app.go#L287 This must be used when actually handling keyboard input: https://github.com/derailed/k9s/blob/e55083ba271eed6fc4014674890f70c5ed6c70e0/internal/ui/tree.go#L101
This seems to be much nicer to use. However, I fear this will break eventually. And it’s more fragile in general, because it’s rather easy to forget the conversion or one can get confused whether a certain key at hand is now an original tcell.Key coming from the library or an “extended” one.
I will see if I can find some other programs that provide configurable tcell key bindings.
PEP 821: Support for unpacking TypedDicts in Callable type hints
This PEP proposes allowing Unpack[TypedDict] in the parameter list inside Callable, enabling concise and type-safe ways to describe keyword-only callable signatures. Currently, Callable assumes positional-only parameters, and typing keyword-only functions requires verbose callback protocols. With this proposal, the keyword structure defined by a TypedDict can be reused directly in Callable. ⌘ Read more
America Is Falling Out of Love With Pizza
The restaurant industry is trying to figure out whether America has hit peak pizza. From a report: Once the second-most common U.S. restaurant type, pizzerias are now outnumbered by coffee shops and Mexican food eateries, according to industry data. Sales growth at pizza restaurants has lagged behind the broader fast-food market for years, and the outlook ahead isn’t much brighter.
“Pizza i … ⌘ Read more