HNHacker News
TopNewBestAskShowJobs

jalk

849 karma · joined August 12, 2015

submissionscomments
jalk··on A SQL Heuristic: ORs Are Expensive
It's a big help if you know how to retrieve and interpret execution plans for the database you use.
jalk··on A SQL Heuristic: ORs Are Expensive
Can we agree that this is only applies to queries where all the filter conditions use cols with indexes? If no indexes can be used, a single full table scan with OR surely is faster than multiple full table scans.
jalk··on Quicksort explained IKEA-style
Snabb Sortera
jalk··on Quicksort explained IKEA-style
Stuck in second round of step 2, since there is no middle cup to lift!
jalk··on Podman Desktop celebrates 3M downloads
Havn't tried Colima, but podman is very simple to use and smells like docker cli.

On Apple Silicon machines however, latest podman version uses VM images which Rosetta doesn't work with, and hence it will use qemu for running amd64 containers. You can fix this by either installing podman 5.5 or create the VM from and older image [1]. My only complaint here is that the stock machine images are pretty large (~1G )

If you use containers to run tools that create files in your host (i.e. build tools), then you can use your host username as the default in the VM (machine init --username $(id -un)), and then run containers with --userns=keep-id. That way the the container command starts with the same username and uid as you host user - this is pretty tricky to get working with docker, from my experience.

We use Bazel as our build tool and we create a lot of images based on shared layers. Bazel produces oci layout directories that contain descriptors and symlinks to the actual layer tars. Podman can start a container "directly" from these directories[2], which speeds up image testing considerably, since it can detect known layers immediately. With docker you have to stream a tarball with all the layers and descriptors to the docker daemon, only for it to discover that it already knows most of the layers.

[1] https://docs.podman.io/en/latest/markdown/podman-machine-ini... - machine images https://quay.io/repository/podman/machine-os

[2] podman run oci://<path to oci-layout-dir>

jalk··on Zoxide: A Better CD Command
in my homedir

  > fd -t d | wc -l 
  213842
takes 5 seconds.

Population doing `cd ~/**<tab>` takes way way longer than 5 seconds though.

But regardless of the speed up one could add to cd + fzf in this case, I will still be using zoxide:

  > zoxide query -l | wc -l
  1294
and `zi` starts instantaneous if I need the dynamic filtering

edit: layout

jalk··on GNU Midnight Commander
That should be doable with `kubectl debug ...` - e.g. attach an ephemeral sidecar container with mc to already running pod. And you would ofc. configure that in K9S as a plugin to easily launch it :)
jalk··on Perceived Age (2024)
My dad, who is now 80, recently told me that the years do seem to pass quicker, but the future is still as far away as it has always been. I can definitely feel that myself.
jalk··on Show HN: Attempt – A CLI for retrying fallible commands
This is useful. Don't want to think about how many times I have implemented retrying in shell scripts. I appreciate the extensive documentation, but I would suggest adding the output of `attempt --help` to the README / docs, so that features can be discovered at a glance.
jalk··on Using Claude Code to modernize a 25-year-old kernel driver
We have been emphasizing on creating abstractions since forever. We now have several different hardware platforms, programming languages, OS's, a gazillion web frameworks, tons of databases, build tools, clustering frameworks and on and on and on. We havn't done so entirely collectively, but I don't think the amount of choice here reflects that we are stupid, but that rather that "one size doesn't fit all". Think about the endless debates and flame wars about the "best" of those abstractions. I'm sure that Skynet will end that discussion and come up with the one true and only abstraction needed ;)
jalk··on Stone Age settlement found under the sea in Denmark
Can you provide some references to that. Also I've never before heard about Christian crusades earlier than the late 11th century one started by pope Urban II. Perhaps you are thinking about peoples like the Wends in Arkona (Slavic "pagan" tribe in northeastern Germany), who were force converted into Christianity in the 12th century. If they somehow were worshiping the stones in question, then that sounds more like retrofitting existing ancient monuments into their own religion, rather than keeping some ancient knowledge alive.
jalk··on Stone Age settlement found under the sea in Denmark
The Wikipedia article suggest that they could have been erected as far back as 6000-7000 years ago - so older than Stonehenge, and therefor also older than Celtic culture. The Wikipedia article suggest that early Christians defaced and destroyed some of the stones, but knowledge about the people who erected those stones was lost way earlier than 300CE.
jalk··on Use One Big Server (2022)
This article (from Nov. 2022) shows that "utilizing Lambda is preferable until Lambda is utilized about 40 to 50 % of the time"

https://medium.com/life-at-apollo-division/compare-the-cost-...

jalk··on Tesla said it didn't have key data in a fatal crash, then a hacker found it
I imagine, he dumped the car data onto his laptop, so that he could work on the problem in a more cozy place, than his messy bitcave
jalk··on Japan has opened its first osmotic power plant
Great analogy. This is similar to producing gas from sewage to feed back into the gas network, which is used to cook food, which produces sewage. (i.e. https://www.hofor.dk/english/hofor-utilities/town-gas/)
jalk··on Prime Number Grid
Set cols to anything divisible by 6, to get the same kind of "stacks" with more cols (i.e. 90)
jalk··on Show HN: NextDNS Adds "Bypass Age Verification"
So it protects your connection by putting up a spectacle? (assuming it meant Colosseum)
jalk··on His psychosis was a mystery–until doctors learned about ChatGPT's health advice
I.e. Bleach against covid

edit: A quick google search shows, there is no evidence of anybody actually in-gesting/jecting bleach to fight COVID

jalk··on We'd be better off with 9-bit bytes
I believe the 360 degrees is attributed to Babylonians, who were using the Sumerian base 60 number system (6*60=360)
jalk··on Ozempic shows anti-aging effects in trial
Wonder how the "online star-rating economy" affects US doctors.
jalk··on C10kday
Curl has been in my toolbelt for perhaps 9000 days. Can’t remember when I discovered the retry/timeout options, but that allowed me to remove a large chunk of buggy bash code, from a semi important cron job.
jalk··on Remote hosting for your telescope
Thanks for the tip, but night + travel outside of the city, is why I'm looking for something online
jalk··on The Fulbright Program: Chock Full of Bright Ideas
Surprised that Fulbright scholarships are still a thing, given DOGE. Cultural exchange programs seems like something the current US administration would get a severe rash from.
jalk··on Remote hosting for your telescope
This service is for hosting your own remote controlled telescope, not short term rental of a shared telescope (think colo. vs cloud provider)
jalk··on Remote hosting for your telescope
I've been looking to take my kids to an observatory, but the logistics makes it tricky (travel + night time), so I have been searching for online services where you can get a guided tour, with "hands-on" telescope control, but have so far come up short. It needs to be guided, since I know very little about astronomy and telescopes.
jalk··on I hacked my washing machine
But the fast cycles of olden day cames at a price in terms of power draw and water usage, so it’s unfortunately similar to missing incandescent light bulbs.
jalk··on The IRS Is Building a System to Share Taxpayers' Data with ICE
Wasn't it auto-filling that got killed recently? IIRC TurboTax has to provide free filing service along with their paid services, but they employ a ton of dark patterns to steer people into the paying parts
jalk··on The death of partying in the USA
The majority of the bad decisions we made, was when there were no girls around. It's sheer luck that no one was seriously injured or arrested
jalk··on Epanet-JS
I was under the impression that municipalities use GIS systems to contain "everything" (sewers, water and gas pipes, and the electricity,telephone,fiber cables etc) Is that just a pipe dream (no pun intended) or do those lack the simulation part ?
jalk··on Programming as Theory Building: Why Senior Developers Are More Valuable
The same thing happens with third party tools and frameworks/libs. The documentation very rarely help you develop a sound mental model of how it work, so your only option is to get your hands dirty - and often also burn your fingers in the process.
← PreviousPage 2 of 13Next →