HNHacker News
TopNewBestAskShowJobs

kortex

8,442 karma · joined February 1, 2017

submissionscomments
kortex··on uv: An extremely fast Python package and project manager, written in Rust
We use uv to compile requirements.txt from pyproject.toml to get the locked versions.

    # Makefile
    compile-deps:
     uv pip compile pyproject.toml -o requirements.txt
    
    compile-deps-dev:
     uv pip compile --extra=dev pyproject.toml -o requirements.dev.txt
kortex··on Everything Is Down
When I see a spike in a dozen different services simultaneously, I can be pretty confident something is pretty snafu.
kortex··on A receipt printer cured my procrastination
"I got a shiny task!"

Absolutely brilliant. It's so stupid (in that it's kind of silly how easy it is to game our mammal brain) but I can absolutely see this giving an extra kick of motivation.

Have you heard of the INCUP model for ADHD? Interest, Novelty, Challenge, Urgency, and Passion. The more factors an activity has, the more drive the ADHD mind has. Rarity system adds novelty and a bit of passion.

Also if you have looked into operant conditioning at all, you know that variable interval reward schedules are the strongest behavior-forming systems (hence, slot machines and every game that act like them).

kortex··on A receipt printer cured my procrastination
I love it. Using a thermal printer to print physical tasks you can crumple on completion and throw in a bin is absolute madlad goblin energy and I'm all for it. I think you've actually perfectly distilled the essence of "game-loop" and operant conditioning, and mapped it to the real world. I have been using a whiteboard for tasks, which is better than nothing, but the problem with that approach is the feedback is minor, and once erased, it's like "wtf did I even do this week". So there is limited short-term feedback and zero long-term feedback. You need both the power-up noise and the level progression for a loop to be satisfying.

I have been planning on making a system based on those long scrolls of paper for doodle boards, so at least there is a history, but of course I procrastinated on building the mount for it.

I would love to use your application, I know there's a million to-do apps out there but I get the overwhelm/daunting very easily, so I really appreciate the scope-hiding aspect.

kortex··on Quarkdown: A modern Markdown-based typesetting system
So how does going back to multiple incompatible character sets help anything?
kortex··on Understanding the Go Scheduler
Fantastic writeup! Visualizations are great, the writeup is thorough but readable.
kortex··on Collaborative Text Editing Without CRDTs or OT
Then you need central coordination, either a single central server containing the counter, or something like Snowflake where you have multiple counters, each assigned orthogonal blocks ahead of time (that need to coordinate with a central server).

UUIDs/ULIDs/etc are fully distributed, you can have two clients assign an ID without coordinating with ~0% of collision.

kortex··on Pipelining might be my favorite programming language feature
I would wager within a rounding error, all humans have a lifetime of experience in following directions of the form:

1. do the first step in the process

2. then do the next thing

3. followed by a third action

I struggle to think of any context outside of programming, retrosynthesis in chemistry, and some aspects of reverse-Polish notation calculators, where you conceive of the operations/arguments last-to-first. All of which are things typically encountered pretty late in one's educational journey.

kortex··on I analyzed chord progressions in 680k songs
I am pretty sure the analysis is: however the chord is notated in Ultimate Guitar, that's how it's analyzed. So if the chord sheet says C Am F G, that's exactly how it's being analyzed, even if that G is almost certainly acting as a dominant 7th, especially once you factor in what all the other voices are doing.
kortex··on Encryption Is Not a Crime
Has there been a single instance where someone faced legal repercussions for not affirming someone's gender?
kortex··on Temu pulls its U.S. Google Shopping ads
The nicotine bottle size constraint is a safety concern. Spilling a 200ml bottle of nicotine easily has the potential to cause lethality or morbidity through skin absorption, particularly in children. A 10ml bottle can still cause injury, but it is way more likely to be survivable.

In this case, the safety concerns outweigh the environmental concerns.

kortex··on US Administration announces 34% tariffs on China, 20% on EU
> But we still import oil! Why? Because the oil we produce isn’t entirely the right kind for everything we do with it.

Just wanted to elaborate a bit on this. Oil is a fantastic example for "why international trade good?" Oil is weird in that it is a fungible commodity (one barrel here is the same as one barrel there), but at the same time, functionality it's not. Each oil formation has different geology and chemistry. There are light sweet crudes, sour crudes, heavy crudes, and so on [1], and refineries (which are massive capital investments with specialized work forces) are typically tooled out to only process one type or family of types of crude oil products.

One paradox of the USA crude industry is that nearly 70% of U.S. refining capacity runs most efficiently with heavier crude, but our shale crude is lighter. Thus, 90% of crude oil imports into the United States are heavier than U.S.-produced shale crude [2]. So even if we had perfect supply/demand of crude within the USA, we would not be able to run our refineries efficiently without a massive overhaul. They have been built under decades of the assumption of a high degree of free international trade.

And these companies will be loathe to invest in retooling if they believe that the tariffs will just be rolled back in four years.

[1] https://en.wikipedia.org/wiki/List_of_crude_oil_products

[2] https://www.afpm.org/newsroom/blog/whats-difference-between-...

kortex··on The great Hobby Lobby artifact heist
The complexity lies in the fact that there is rarely a bill of sale like "Priceless scroll taken from tomb under ancient church before it was demolished - ISIS". There's a lot of laundering and changing of hands before they even go up for sale by these brokers whom HobbyLobby purchase from. This is completely antithetical to the ideal process for the sake of scholarship and preservation, which is meticulous and slow, documents all of the context before even touching anything, maintaining a chain of custody so that context is preserved even after removing artifacts from the site, etc.
kortex··on The Burnout Machine
> It’s only adversarial because you want to get as much pay as possible out of them for as little productivity as possible.

And the employer wants to pay the employee as little as possible for as much productivity as possible.

In a perfect world with perfect information and rational actors on a level playing field, this is great: we expect supply and demand to converge, this is econ 101.

But it's not a perfect playing field, one side is coercive, holds most/all the cards, calls all the shots, treats people with lives and experiences as "resources", and seeks profit over all other objective functions. This is class dynamics 101.

kortex··on Extracting DNA from the air – DNA evidence of human occupancy in indoor premises
And early Europeans avoided saying the name of the terrifying land mammal out of taboo / fear it would summon it, and instead referred to it as either "the brown one" or "wild animal" (exact etymology is unclear which it was), giving us the word "bear", to the point where the "arktos" based word has been lost. Often times euphemisms stick.

https://en.wikipedia.org/wiki/Bear#Etymology

kortex··on Block YouTube ads on AppleTV by decrypting and stripping ads from Profobuf (2022)
> The typical [HACKERnews] article [about hacking] that is applicable to [computer enthusiasts].

Fixed that for you.

kortex··on Show HN: Watch fascism unfold in realtime – an AI-powered tracker
Thought-provoking but also pretty vague. It makes no distinction between hard auth-left and hard auth-right.
kortex··on WASM will replace containers
It really won't. For some use-cases, yes.

> WebAssembly is a true write-once-run-anywhere experience.

Except not. The wasm ISA is really quite limited in the types of operations. A full-blown RISC/CISC ISA will have way more opportunities for optimization. To say nothing of multithreading and pipelining. JITing also has overhead.

> You can compile several languages into WebAssembly already.

But if you can compile them, why not just compile to container, and get free performance?

Wasm will have a hard time with anything low level: networking, I/O, GPU, multimedia codecs.

kortex··on A Coup Is in Progress in America
What is undemocratic is suggesting that somehow the civil participation process just goes on hold between every election.

People are seeing a trajectory even worse than anticipated and sounding the alarm. The Trump administration is blasting off executive orders that many feel are unconstitutional, and the populace wants to pump the brakes.

kortex··on Discussion: Reduce error handling boilerplate in Golang using '?'
That is exactly how go usually works with error handling though.

    func mayfail() error {
        if snafu {
            return errors.New("oops")
        } else { return nil}
    }


    err := mayfail()
    if err != nil { handle }

Same as `mayfail() ? handle : happypath` would behave with lazy evaluation.
kortex··on Show HN: Banan-OS, an Unix-like operating system written from scratch
How does one even begin to write drivers for nvme, ata, rtl nics, etc? I know mice and keyboards use HID which is a standard, but are there similar standard protocols for all other devices?

Is this how linux manages to avoid needing to "install drivers" in the vast majority of cases? And if there are standard device APIs, why does windows have to go through that whole install driver routine every time I plug something in?

kortex··on Show HN: Rill – Composable concurrency toolkit for Go
That ship has long sailed. ALGOL 1958 used := and Pascal popularized it.

https://en.m.wikipedia.org/wiki/Assignment_(computer_science...

kortex··on One of Florida's most lethal python hunters
I have never tried to shoot a snake but I imagine their high aspect ratio makes getting a critical hit on them challenging, compared to just "yoinking" them.

Garret Galvin @fishingarrett has made a name for himself yoinking all sorts of critters in the wild but in particular seems to be targeting invasive pythons in the Everglades. He's very entertaining if you like nature stuff, he's like Steve Irwin's spiritual successor.

kortex··on How long til we're all on Ozempic?
Hot take: "choice" is a myth when it comes to long-term executive processing, one doesn't choose to be obese/not, drug addicted/not, etc, the same way one chooses whether they want chicken or beef ramen for lunch. It's an unending grind of executive functioning against more basal impulses, that is heavily influenced by the blend of nature and nurture and life events.
kortex··on An e-waste dumping ground
There's no world in which atomized nicotine, glycol/glycerin, and some flavors, is comparable, let alone worse, than inhaling smoldering tobacco leaves. Even the purest, organic tobacco made from the nicest leaves lovingly collected by happy family farmers, is still gonna give you cancer if you burn it and inhale the smoke. That's just chemistry.

The only exception is if the vape juice contains something it "shouldn't", like the vitamin E acetate debacle, but if you put the same wrong things in tobacco, you get the same issue. This problem is avoided entirely with a verified source of ingredients.

Partial combustion products will always contain, at minimum, polycyclic aromatic hydrocarbons, a verified carcinogen. The hotter the conditions, the more complex the precursors, and the more incomplete the reaction is, the more nasty junk you will create. Vaping might or might not be bad, but the chemistries of smoking includes the full set of chemistries of vaping, and then way way more, due to the incomplete combustion of the much larger molecules in plant matter.

Bottom line: probably don't put the volatile reaction products of substances heated above 100°C into your lungs: tobacco smoke, vape, campfire smoke, car exhaust, brake dust, etc. But some reactants are far worse than others.

kortex··on Gavin Newsom vetoes SB 1047
What's to stop someone from downloading an open source model, running it themselves, and either just not sharing the hashes, subtly corrupting the hash algo so that it gives a false negative, etc?

Also you need perceptual hashing (since one bitflip of the generated media alters the whole hash) which is squishy and not perfectly reliable to begin with.

kortex··on Floating megabomb heaves to near the English coast
Ammonia is produced at scale by the Haber-Bosch process, N2 + 3H2 => 2NH3. Most H2 is currently produced by steam reformation of natural gas, CH4 + 2H2O => CO2 + 4H2.

It's not really feasible to turn ammonium nitrate back to natural gas, moreso GP was insinuating it's a way to export (a proxy for) natural gas, eg to bypass sanctions.

kortex··on Counting Sheeps with Contracts in Python
Cool stuff! Might be fun to integrate with a type validation library like Pydantic or Msgspec to provide in-line coercion/assertion.

What is the performance hit like? I could see these getting pretty expensive (but correctness is invaluable). Seems like it would be great for something like aws lambda in python where you have already decided performance isn't an utmost priority and scrutability is difficult, so any correctness you can bolt on is a boon.

kortex··on Zb: An Early-Stage Build System
I kinda dig zeeb! Naming is hard. Really awesome project by the way! Should have mentioned that first. Build systems are neat. I've always wanted to try building a build system, in a "learn how it works" sense, not so much "yet another build tool".
kortex··on Zb: An Early-Stage Build System
How do you pronounce "Zb"? Zee-bee?
← PreviousPage 5 of 34Next →