Better HN
topnewbestaskshowjobs
Log inSign up

TacticalCoder

10,595 karma · joined Dec 4, 2013 (12y ago) · 4,861 submissions

email: I'll add a suitable email one of these days
Submissions

comment 8mo ago · link · parent

I happen to have a 11 y/o daughter too. I teach her coding not because I want to make her a dev: but to me it's important that she gets, early on, the mindset.

So "gamified coding" it is. Online platforms with simplified source code (but still actual code), making little animals move on the screen, by using code, to solve challenges. She already did more than 300 such challenges and understood loops and variables. She begins to understand how functions do work, side-effect, pure functions, etc.

But the thing is: she's 11 y/o. I'm the boss. A nice boss, a gentle listening boss. But I'm the boss. I get to decide whether she can spend 16 hours per day in front of screens playing or not (she can't). I get to decide how many time she can play out in the street with the neighbour's kids (as I type this she's doing just that) and how many hours she does maths, code, etc.

Then I apply concepts between maths on paper and code. For example she loves having one variable named "O_o" as a joke.

This shows a great understanding of what a variable is (although a poor choice in naming it!).

Then we do maths, on paper, and I literally generate her exercise on paper sheet with:

    O_o = 3 * x + 2 * y + 7

    Find me the value of O_o for the following values of x and y.
She loves that: suddenly she sees, on paper, that same O_o variable she sometimes uses in the code as a joke. And she sees me doing the joke.

She'll be a rebellious teenager soon enough that, as of now, I still get to decide ; )

P.S: at 11 y/o she doesn't have a phone yet either. That shall come soon enough too.

P.P.S: space repetition too. For maths for example... I see where she's struggling, then it's space repetition mode. I generate her custom exercises and three times a week it's hammering.

comment 8mo ago · link · parent

> https://difftastic.wilfred.me.uk/

ah, it's using tree-sitter to not bother reporting changes that have no effect.

That's very nice!

Now, of course, the biggest issue is that our DVCes still are from the paleolitic era and store source code as non-structured text files instead of trees, so we need to the proper thing "outside" the DVCS (which is using tools like diffstatic / tree-sitter: tools that have seen the light).

It's basically the old "tabs vs space" and "tabs = how many spaces?" and "bracket on the same line or not" discussions all over again. I'm pretty sure I've got comment from 15 years ago saying that in a proper world this shouldn't even be a concern because this should purely be a client-side concern, on the dev's machine. And that the DVCS should have a specific representation, not opened for discussion (a code formatter for example, but ideally just the source code already as a tree). And then no more bitchin' about tabs vs space, about how many spaces is a tab worth, on which line brackets should go, etc.

Don't get me wrong: it's great that people are doing the right thing. But it's still a kludge that's needed because the underlying tool were made by us and for us cavemen and really could have been oh so much better.

comment 8mo ago · link · parent

But not all project exploited in a supply chain attack get exploited on the same day.

So when project A gets pwned on day 1 and then, following the attack, project B gets pwned on day 3, if users wait 7 days to upgrade, then that leaves two days for the maintainers of project B to fix the mess: everybody shall have noticed on the 8th day that package A was exploited and that leaves time for project B (and the other projects depending on either A or B) to adapt / fix the mess.

As a sidenote during the first 7 days it could also happen that maintainers of project A notices the shenanigans.

comment 8mo ago · link · parent

That sounds like serious AI slop to me:

> "The project-level folder holds team configuration. You commit it to git. Everyone on the team gets the same rules, the same custom commands, the same permission policies."

> "Most people either write too much or too little. Here’s what works."

It feels like I've been teleported into a recent LinkedIn feed. Do real people actually already write like AI or is it AI generated?

comment 8mo ago · link · parent

Weird. I've got two Firefox instances, from two different user accounts, opened at all times. Tens of tabs in each. I know some people do hundreds of tabs. I've got zero issue. I've got chromium too but typically I use Firefox.

My only hack is I wrap Firefox with a TCP_NO_DELAY lib: probably cargo culting a bit but I do feel it's even snappier that way.

P.S: main desktop is an AMD 7700X with only 32 GB of RAM. Nothing crazy.

comment 8mo ago · link · parent

Those limits also do exists somehow in other countries. In France for example it's been a very long time some petrol station say "150 EUR maximum". People are going to say it's not a "real" limit but I did hit it once or twice while going on vacation: 80 liters tank, near empty / car only taking 98 octane fuel (more expensive than 95) / ultra-pricey fuel at petrol stations on the highway (so pricey it's usually cheaper to just get off the highway, fill the tank in a village, and go back to the highway).

At 2.2 EUR / liter, 75 liters is 165 EUR so I was blocked at 150 EUR.

50 liters I definitely cannot fill my car entirely.

comment 8mo ago · link · parent

Wait... Most of my shell scripts have zero unused variables: I prefer to comment them if I may need them later on.

Why do you disable SC2034?

I don't think not having unused variables prevent me from doing things in my scripts!?

I understand if it's a preference but SC2034 is basically one of my biggest timesavers: in my case unused variables are typically a bug. Except, maybe, ANSI coloring variables at the top of the script.

comment 8mo ago · link · parent

I've got many like these I copied from various people over the years.

One I came up and that I use all the time:

    alias wl='wc -l'
I use it so much I sometimes forget it's not stock.

comment 8mo ago · link · parent

That's a nice one.

One thing I do is configure my keyboard so that "modifier+{ijkl}" mimicks the inverted T arrows key cluster. So there's never a need for me to reach for the arrow keys. And {ijk} makes more sense than vi's {hjkl} and is faster/more logical/less key fingers travel. The nice thing is: as I do this at the keyboard level, this works in every single map. "modifier" in my case is "an easily reachable key in a natural hand position on which my left thumb is always resting" but YMMV.

I set that up years ago and it works in every app: it's gorgeous. Heck, I'm using it while editing this very message for example.

And of course it composes with SHIFT too: it's basically arrow keys, except at the fingers' natural positions.

comment 8mo ago · link · parent

That is the spirit! A friend recommended me to buy a Bambu P2S: there are parts I want to print and I don't want to model then send them to have them printed, nor to bother my friend all the time. Funnily enough I've got magnets falling too: for an alarm system on the doors/windows and they don't hold well anymore after the years. Then my car's radar detection device (fully legal) doesn't fit nicely in the phone holder I use to that effect: I want it a specific angle (I want it both inclined and facing towards me a bit). So I'll model those and just print them. There are a few things like that where I keep thinking: "If I had a 3D printer, I'd just print a part".

Most importantly: I've got a 11 y/o and I think it's cool for the kid to see how it works.

Already watch a few vids. Doesn't look too hard for simple things.

comment 8mo ago · link · parent

I have fond memories of visiting a university in the early 90s on a demo day and there was a (physical) sphere in a Cornell box:

https://en.wikipedia.org/wiki/Cornell_box

And next to it was a super beefy computer doing a 3D rendering of a similar scene.

35 years+ later I've got "many spheres in a Cornell box" rendering in my browser, love it : )

comment 8mo ago · link · parent

The guys deterministically bootstrapping a simple compiler from a few hundred bytes, which then deterministically compiles a more powerful compiler and so on are on to something.

In the end we need fully deterministic, 100% verifiable, chains. From the tiny boostrapped beginning, to the final thing.

There are people working on these things. Both, in a way, "top-down" (bootstrapping a tiny compiler from a few hundred bytes) and "bottom-up" (a distro like Debian having 93% of all its packages being fully reproducible).

While most people are happy saying "there's nothing wrong with piping curl to bash", there are others that do understand what trusting trust is.

As a sidenote although not a kernel backdoor, Jia Tan's XZ backdoor in that rube-goldberg systemd "we modify your SSHD because we're systemd and so now SSHD's attack surface is immensely bigger" was a wake-up call.

And, sadly and scarily, that's only for one we know about.

I think we'll see much more of these cascading supply chains attack. I also think that, in the end, more people are going to realize that there are better ways to both design, build and ship software.

comment 8mo ago · link · parent

> If you don't what's the point of checking only the install script?

The .tar.gz can be checksummed and saved (to be sure later on that you install the same .tar.gz and to be sure it's still got the same checksum). Piping to Bash in one go not so much. Once you intercept the .tar.gz, you can both reproduce the exploit if there's any (it's too late for the exploit to hide: you've got the .tar.gz and you may have saved it already to an append-only system, for example) and you can verify the checksum of the .tar.gz with other people.

The point of doing all these verifications is not only to not get an exploit: it's also to be able to reproduce an exploit if there's one.

There's a reason, say, packages in Debian are nearly all both reproducible and signed.

And there's a reason they're not shipped with piping to bash.

Other projects shall offer an install script that downloads a file but verifies its checksum. That's the case of the Clojure installer for example: if verifies the .jar. Now I know what you're going to say: "but the .jar could be backdoored if the site got hacked, for both the checksum in the script and the .jar could have been modified". Yes. But it's also signed with GPG. And I do religiously verify that the "file inside the script" does have a valid signature when it has one. And if suddenly the signing key changed, this rings alarms bells.

Why settle for the lowest common denominator security-wise? Because Anthropic (I pay my subscription btw) gives a very bad example and relies entirety on the security of its website and pipes to Bash? This is high-level suckage. A company should know better and should sign the files it ships and not encourage lame practices.

Once again: all these projects that suck security-wise are systematically built on the shoulders of giants (like Debian) who know what they're doing and who are taking security seriously.

This "malware exists so piping to bash is cromulent" mindset really needs to die. That mentality is the reason we get major security exploits daily.

comment 8mo ago · link · parent

Europe here. I disagree. Many SMEs are totally happy with Google Workspace and Canva, as GP mentioned. I know people using just that. And they don't understand why there are people suffering from the Microsoft-Stockholm syndrome.

The market may not yet be 365-sized but as GP mentioned: it's there.

And there are young people arriving at an age to open a business who have never used a Windows computer in their entire life. To them Microsoft is the company that make the virus-infested, slow, computers full of ads they see at their grandparents' house. That cohort ain't buying Windows / buying Office / using Azure.

comment 8mo ago · link · parent

And burntsushi is one of us: he's regularly here on HN. Big thanks to him. As soon as rg came out I was building it on Linux. Now it ships stocks with Debian (since Bookworm? Don't remember): thanks, thanks and more thanks.

comment 8mo ago · link · parent

> Next I'm going to set it loose on 263 GB database of every stock quote and options trade in the past 4 years.

Options quotes alone for US equities (or things that trades as such, like ADS/ADR) represent 40 Gbit per second during options trading hours. There are more than 60 million trades (not quotes, only trades) per day. As the stock market is opened approx 250 days per year (a bit more), that's more than 60 billion actual options trades in 4 years. If we're talking about quotation for options, you can add several orders of magnitude to these numbers.

And I only mentioned options. How do you store "every stock quote and options trade in the past 4 years" in 263 GB!?

comment 8mo ago · link · parent

Yeah I only ever use 1.1.1.3. Of note is that 1.1.1.3 is like 1.1.1.2 but with know adult sites also blocked, in addition to malware.

comment 8mo ago · link · parent

Thirding it except I do it from Emacs. Three side-by-side pane with left / common ancestor / right and then below the merge result. By default it's not like that but then it's Emacs so anything is doable. I hacked some elisp code a great many years ago and I've been using it ever since.

No matter the tool, merges should always be presented like that. It's the only presentation that makes sense.

comment 8mo ago · link · parent

A big thanks for making the Linux kernel better!

> Since virtualization is hardware assisted these days

I was running Xen with full-hardware virtualization on consumer hardware in... 2006. I mean: some of us here were running hardware virt before some of the commenters were born. Just to put the "these days" into perspective in case some would be thinking it's a new thing.

comment 8mo ago · link · parent

> Or machine gun defence when you're protecting tens of thousands of Iranians from the Islamist regime.

I agree with you. Also one where you try to prevent olympic athletes from being publicly hanged by islamists.

Or when you try to detect lies from the islamist republic of Iran: for example when they said they didn't have long range missiles and they now just tried to attack targets 2000 km away. The intel was right after all.

But there's an issue in the west: some people hate free people and their own west so much that they prefer to side with islamists, with Hamas, with people chanting "from the river to the sea", that they'll only half-condemn Oct 7th saying it's "resistance", that they'll refuse to see when groups of people refuse to integrate into the US, that they'll never condemn a mayor of major US city saying "it's now time for US citizens to follow the teachings of prophet muhammad", etc.

And don't get me started on those saying the islamist veil is "empowering" for women and a sign of "tolerance". Moreover it's coming from those who happen to on the same side that constantly criticizes "toxic masculinity". But criticizing the most patriarchal culture and religion of them all? "Won't hear / Won't see / Won't talk".

It's never-ending. Their hatred for half of the people in their own country make them side and root for absolute evil.

To me there's a word for such people: they're traitors. Plain and simple. And they're definitely my ennemies.

I cannot be friend with someone condemning a US missile landing on a school but not condemning islamists killing 30 000+ of their own people and publicly hanging olympic athletes.

Plain and simple. And they're the ones who should look deep down in their soul to see how dark it is, not me.

comment 8mo ago · link · parent

> One of these two countries is riding on momentum, but the drag from waste and mismanagement of resources is increasingly slowing it. The other country is building momentum while reducing drag.

Let's not stop at the two biggest economies: the US and China. Let's add the EU to the mix. The EU saw, inflation adjusted in USD, hardly any growth since the 2008 financial crisis to now. While both the US and China's GDPs grew like crazy.

I agree that China atm is doing something very right but if you believe the US not on a good path, you should look at the EU. The EU has nothing but one company left in the top 50 of the biggest worldwide companies by market cap. Not that long ago the UK was the world's first superpower and France just before that.

And now my EU is headed on a path leading to third-worldness.

The times they are a changin'.

comment 8mo ago · link · parent

> I’m somewhere between horrified and impressed, in that I feel we’ve finally discovered a cross platform binary resource embedding solution.

Maybe I'm misunderstanding your comment about having "finally discovered" that...

For to me embedding binary resources in source files is nothing new at all? It was definitely done in the early JavaScript days for a variety of reasons.

Arguably early basic listings that had lots of DATA text lines were already doing that. Maybe not the most portable but we're talking about the 70s and 80s here and definitely binary data in source code.

Games for the Atari ST and Amiga, for example, could partially share at least some of their source code and it wasn't uncommon to encode binary inside sources, including... Fonts! Back then fonts were not reused from one game to another.

Heck, I've done in Java (and Java is cross platform) in the past: quick visual debug tools for Java GUI apps to toggle a debug mode showing something not dissimilar to a HUD. Pixel-perfect fonts encoded in .java source files.

I really don't think it's anything new.

P.S: I'm pretty sure it's done like for some fonts in the Linux kernel too.

comment 8mo ago · link · parent

There's more to this. Iran, not happy with protesters, killed 30 000 of its own unarmed civilians a few weeks ago (and sent its islamists into hospitals to finish the wounded). A few days ago they publicly killed an athlete who spoke against the regime.

And because they cannot retaliate by sending nuclear bombs on to Israel and on to the US they... Attack every single neighbouring country? Including other countries ran by islamist cracknuts who also rule by sharia law?

I don't want to know what a country who publicly executes athletes, who kills 30 000 of its own and who throws a tantrum by attacking every single neighbouring country would do once it'd get nuclear weapons.

I know there are many people who are going to guarantee us that a country doing these horrible things would suddenly be all wise and nice once it'd have nuclear weapons but I think these people are, at best, totally delusional.

comment 8mo ago · link · parent

Also of note, the exploit relied on:

    - CVE-2025-31277 or CVE-2025-43529
    - CVE-2026-20700
    - CVE-2025-14714
    - CVE-2025-43510
    - CVE-2025-43520
Any single of these patched and the exploit was not functional anymore. After a collaboration between the Google Threat Intelligence Group and Apple all of these have been patched.

comment 8mo ago · link · parent

Already posted it here in the past, answering the same question (and some people seem to like it so here we go).

Around 1991 I was writing a DOS game... In a very rare circumstance the game would crash but it could happen after playing for 15 minutes or more. Sometimes not at all. I couldn't make sense of it.

At some point I decided to rewrite my entire game loop to make the game engine fully deterministic: input, time (frame) at which input happened. So that I could then record myself playing the game and replay it fully deterministically.

Except this was in 1991 and deterministic game engines did not exist back then. The first time I read about one was on a postmortem about Age of Empire on Gamasutra (IIRC). I even wrote to the article's author telling him: "Oh wow, it's the first time I read about a deterministic game engine. I made one in 1991 but since then had never heard about anybody using one." and he answered, as much excited as I was, saying he didn't know about any game doing that in 1991 either and he liked why I came up with it.

Since then it became extremely common: a game like Warcraft III for example, where there can be hundreds of units, has tiny save game files for it only records inputs and the time at which they happened (and btw it of course requires to have a same version of the game engine, or a backward compatible one, to be able to replay the save files).

But Age of Empire (1997) is the first one that I remember describing using such an engine.

Back to my 1991 DOS game... I rewrote the game engine, wrote a simple recorder recording the inputs, and played and played and played until it crashed. I then replayed the game (seen that now I could): and, sure enough, the game crashed. Huge relief. At that point I knew the bug was dead: I could reproduce it, I knew I'd smash it.

Turns out: when the hero had taken an extra allowing it to fire two shot at once and would fire two shots, and the first shot would kill the last thing on the level, then the second shot would keep living it's life during the next level (my logic would keep updating that shot and overwriting memory it wasn't supposed to access), happily corrupting memory until something would make the game crash.

It was tricky because it require a special condition.

And the only way I found to be able to reproduce the bug was to basically invent the concept of a deterministic game engine. Or at the very least independently discover it.

The game was never published but it's how my career started (very long story, for a blog or something).

P.S: if anyone know of a game using a deterministic engine from before 1991, I'm all ears (especially if it's an arcade one: that'd really make my day).

1
353637
163