HNHacker News
TopNewBestAskShowJobs

kooi

163 karma · joined July 30, 2026

Research Engineer

Current research Interests: Rust for embedded systems, real time signal processing, control barrier functions for robotic manipulators

meet.hn/city/36.9743626,-122.0294673/Santa-Cruz Socials: - https://sites.google.com/view/david-kooi/ Interests: AI/ML, Books, Cycling, Hacking, Hardware, IoT, Open Source, Philosophy, Programming, Research, Robotics, Science, Space Tech, Writing

---

submissionscomments
kooi··on Show HN: Needle2: 14MB agentic LLM for phones, wearables, smart home and robots
Its pretty significant you've got this working locally in wasm. Very cool.

Re: robotics: I'm unsure how this could be helpful.

It fails a pretty simple navigation prompt.

X0: (0.0, 0.0). Object bounding box: [1.0, 1.0, 2.0, 2.0]. navigate to (3.0,3.0)

I changed it to "call path planner to navigate: a_star(x0, xf, obs)"

Another fail.

My intuition tells me micro llms will/are important for robotics. I just can't grok it. Can someone without control theory experience give me a good example?

Probably at the planning level of the navigation stack. That's where I see reasoning being helpful. Lower than that...idk

Give me an example of a robotics prompt that seems useful and I'll give you an example why we don't need LLMs to be a tracking controller, etc.

kooi··on I wrote my first C project after a long time. Unix wc clone. NO AI
I got inspired by that branchless rust post a couple days ago. Tried it out here and got a ~50% speedup on a 10 million word file. (Averaged over 100 runs).

File IO was the real bottleneck, so I loaded the entire file into RAM and removed the repeated fgetc's so the actual algorithms could be compared.

davidkooi@Davids-MacBook-Pro word_count % ./wc_original lorem_ipsum.txt

   word_counter elapsed time: 0.106370000 seconds
   The number of words is: 10000000
   The number of rows is: 221000
davidkooi@Davids-MacBook-Pro word_count % ./wc_branchless lorem_ipsum.txt

   word_counter elapsed time: 0.043484000 seconds
   The number of words is: 10000000
   The number of rows is: 221000
How does this work?

You're essentially running an edge detector over words so you can for the main loop you can do a psudo-filter over a 2-sample sliding window.

This works because isalnum returns an int which is 0 when it's not a alphanumeric character. So logically the input stream becomes _ _ _---_ _ _---_ _ -- where ___ is 0 and --- is > 0.

You can detect an edge by having a 2-sample "kernel" [1, 0] which you add with a 2-sample sliding window.

That gives us these cases:

- no-word section the result is [1, 0] + [0, 0] = [1, 0].

- a rising edge section the result is [1, 0] + [0, >0] = [1, >0]

- a word section the result is [1, 0] + [>0, >0] = [>0, >0]

- a falling edge section the result is [1, 0] + [>0, 0] = [>0, 0]

So we can use the rising edge case to increment the word count. Row count can be incremented without a conditional as well.

Resultant loop is:

uint32_t i; unsigned char new_ch;

    int prev_now[2] = {0, 0};
    int PREV_IDX = 0; 
    int NOW_IDX = 1; 
    int kernel[2] = {1, 0};
    int result[2] = {0, 0};

   for (i = 0; i < file_size_bytes; i++){ 
           
        // Update now
        new_ch = data[i];
        prev_now[NOW_IDX] = isalnum((unsigned char)new_ch);


        // Edge detect
        result[0] = prev_now[NOW_IDX] + kernel[0];
        result[1] = prev_now[PREV_IDX] + kernel[1];

        *w_cnt += result[0] == 1 && result[1] > 0;
        *r_cnt += new_ch == '\n';

        // Shift without a move operation 
        PREV_IDX = 1 - PREV_IDX;
        NOW_IDX  = 1 - NOW_IDX;

        // Shift with a move operation
        //prev_now[PREV_IDX] = prev_now[NOW_IDX];       
        
    }
kooi··on Prime Agent: A self-improving RLM agent
Only anecdotal benchmarks for what ever that is worth.

I notice the LLM reasoning things like: "The maintainability score went down, let me look.... I see I've duplicated existing code which already exists in this module...I see this logic could be consolidated".

I have noticed file splitting is a strategy to improve the "score".

In my experience, I've been doing more the architectural guidance. There is also a rules engine which I have not used, but looks pretty interesting:

``` [constraints] max_cycles = 0 max_coupling = "B" max_cc = 25 no_god_files = true

[[layers]] name = "core" paths = ["src/core/"] order = 0

[[layers]] name = "app" paths = ["src/app/"] order = 2

[[boundaries]] from = "src/app/" to = "src/core/internal/" reason = "App must not depend on core internals" ```

kooi··on I wrote my first C project after a long time. Unix wc clone. NO AI
Personally, I'd make the NULL_PTR error message a bit more specific. "Memory Error" is quite general. The real issue is that specific invalid arguments were passed in.

Now since this may live in it's own module and not be a public function, that could be fine. But if it's ever expanded, you'll want callers to know what specifically went wrong to help debugging.

kooi··on I wrote my first C project after a long time. Unix wc clone. NO AI
Also, for some reason the "standard" in C return values is 0 for success.
kooi··on I wrote my first C project after a long time. Unix wc clone. NO AI
Seems pretty good.

When I was at NASA, their C coding required everything to be explicit. So

`if(!w_cnt || !r_cnt) return NULL_PTR; `

was wrapped in real brackets.

I was also told not to use ternery operators. But that's NASA specific things.

Another NASA specific thing was to declare all variables at the top of a function instead of scattering declarations throughout. I see you've put them after the argument checks, so actually I think that lives up to that spirit.

kooi··on Prime Agent: A self-improving RLM agent
Add Sentrux to the LLM loop. https://github.com/sentrux/sentrux

It's an offline coding grader. It works well: You ask for a new module, LLM starts spitting out bloated crap, the code score goes down. LLM keep looping until code score is back up.

Not a substitute for human code review, but keeps things within tight guard rails.

kooi··on Pareto Front
I've been wondering if OpenAI make Luna artificially cheap to get people into their eco system.

I think it's great and hope the price can stay the same.

kooi··on Decimen Optical Transfer: fountain-coded QR file transfer
Fountain codes are so lit
kooi··on Decimen Optical Transfer: fountain-coded QR file transfer
As someone who has implemented acoustic modems (underwater comms)... yes, yes very annoying. It's like a demonic dolphin.

Bringing it into the ultra sonic band would help.

kooi··on Ask HN: What is a good format for a tool to report data to a LLM?
Standard disclosure of "I'm no LLM expert".

Could tokens be pre-embedded and saved? Suppose you're transferring a context to another agent. Currently I just copy/paste, tell the other agent to reference a .md file.

What is I could get a "compressed" binary file containing the context in the embedding space. Then the other agent can consume that and continue on it's merry way.

kooi··on Design by Contract and Effects for LLMs
IMO this is what makes rust excellent for LLM coding. Sure other languages support this type of design by interface, but I feel like Rust's compiler forces the LLM to conform to existing interfaces.

Another pattern related that I've found useful with multi-threaded programming is to hand code threading and signal interactions. Up to this point, I've only had at best over complexity and at worst complete failure wrt multi-threaded logic.

SoI make sure the core multi-threaded logic is sound. Then the LLM can do a resonable job once the "scaffolding" is in place.

kooi··on Don't be a meat proxy
I mean at the end of the day, if it works, it works!
kooi··on Don't be a meat proxy
Oof, is it a fig tree or a fiddle leaf leaf tree, that's hilarious.

There's the new pelican bench mark

kooi··on Don't be a meat proxy
sKiLl IsSuE - some redditor XD

Agreed with the caveat that I think if you know what you're doing and are very cognizant, LLM generated Rust is amazing. I feel like it's hard compilation requirements gives a guardrails for a LLM and if it compiles, you're pretty safe against memory issues.

kooi··on Many of you have this job: Orchestrator
It's kind of like assembly moving to C moving to Python, etc...

That does not mean the need to C and assembly developers will disappear.

Same thing with "manual coding" and "orchestration"(or what ever you want to call it). Just different levels of the stack.

It's different levels of the development stack and system's orchestration lives on top of the application level.

kooi··on Don't be a meat proxy
Infinitely, that's a stretch.

Over the past year maybe 1.5x to 2.0x for me. As in: I can work on two projects at the same time with reduced amount of context switch. But that's it for me.

Maybe I don't have the brains for 1000x terminal agent coding, but 2 parallel projects seems like my saturation point.

kooi··on Don't be a meat proxy
Any competent developer knows there are limits to prompting.

Personally I've found LLM's suck at multi-threaded applications. (Because I've been tempted by the ~agentic loop~ and been burned. Then I hand code the core logic and all is well).

Woe to the developer who tries to prompt their way through this.

kooi··on Don't be a meat proxy
It happens outside the developer world as well.

People get information from Google AI mode and take it as 100% truth. In reality, blogs, reddit, and junk are often sourced link...which is fine if you inspect the sources...which some people don't!

Have has examples of people AI-moding a questing and they get one answer based on how they asked. Then another person asks and they get another answer.

Issue: People read what they want to read, don't listen to humans anymore beacause the AI will tell them what they want.

kooi··on Californians' data deletion requests, DROP, become enforceable Aug. 1
here-here
kooi··on US Government map of Africa mislabels every country at global conference
Lol.

"AI watermark"... that's something important and should be in all AI generated images.

kooi··on NF humanoid disarm protocol: Fire-alarm protocol to stop humanoid robots
It's a good idea. Some of the readme sounds very vibed.

I like the crypto element, but not sure how this relates to proving the shutdown sequence is implemented. Can't a robot sign the certificate and continue on it's merry way?

It implies NFC as the physical layer? That's very close range. Too close too be comfortable. Or perhaps the author is mashing terminology and means "any near range wireless protocol".

kooi··on Karpathy’s Pelican
I think the most important insight is the limitation of LLM perception:Slowly taking screenshots.

That method of perception probably scales N^2... so sure with more compute, LoTR animation will improve. But I think to get a real jump in "experiential feedback", perception needs to scale linear or sublinear. Maybe that's there LeCunn's jepa will come in.

There needs to be the removal of the middle man:

image -> text -> action

To image -> action.

kooi··on Ask HN: Any tips for a college freshman enrolled in computer science?
100% non-ai coding.

Sure, prompt studying in the right was is useful. But the temptation to spit something out you don't fully understand is huge. Part of learning is simply struggling.

Its tough, but for many of us it was a gauntlet of projects, internships, feeling like we're over our heads in a huge code base.

Focus on 1 code base at a time.

More useful to add to an existing code base than to code up some one-off project and name it "Jasper" (idk why CS student love derp names from their microprocessor. "I made a SSH wrapper and called it Turtle" )

Find mentorship from people who can teach architectural concepts.

Good luck!

kooi··on Long Range Wi-Fi – Pushing 2.4 GHz Wi-Fi to the limits (2019)
Used to work at an evtol company and we used a plain ol router connected to a huge PoE antenna to connect to the vehicle which had some plain ol usb wifi antenna.

It was TCP/IP data streaming down and commands going up.

Demi-automonous testing at some 2km range. Worked great...

XD

kooi··on Doom on Emacs
Sweet, want to try this. Bonus points if you can hot key away into some other file ;)
kooi··on Marvin Minsky: a proof that led to the first AI winter
Nice article
kooi··on Ask HN: Do older programmers/CS academics view AI safety as a form of arrogance?
> it's worth remembering that people were saying just a couple of years ago that AI can't even count the number of letters in a word or do basic maths.

That's very true. I think LLM's have passed the Turing test and I remeber that used to be a very high bar. I remember being flabbergasted when chatgpt went public.

I guess I'm just not convinced self-improvement is a thing...yet

I think it comes down to an information theoretic question of: Can a LLM create information that is a projection outside it's data subspace? Something like can it increase it's "matrix rank" and not just create a dependent row. What ever metaphor... it's fun

> but that there are many potential risks with signal digit probabilities. When you consider the overall risk landscape, that's when things get worrying.

That's a good point too. The number of possible bad and good things goes up and every gets access to doing more complex things previously contained to someone's skill silo.

kooi··on How the HSA Became the Top%'s Wealth-Building Loophole
I mean, it does have a ~4000 yearly contribution limit.

Still... We'd be filling that up for sure if we didnt have to choose between HSA and standard health insurance.

kooi··on Show HN: Great Spectations, the Spec Checker
Address not found.
← PreviousPage 4 of 5Next →