HNHacker News
TopNewBestAskShowJobs

dmkolobov

434 karma · joined October 13, 2013

submissionscomments
dmkolobov··on How Ukraine’s killer drones are beating Russian jamming
No one is arguing the merits of drone warfare.

We have two years of footage from Ukraine, where camera-equipped drones are launched from a several miles away at most, and where there are networks of pilots and support specialists to assemble and launch more drones in case of (frequent) failure.

I don’t think it’s wise to wager the success of a 6-month mission deep in enemy territory on a plan with a single point of failure, especially when the alternative is equipping each drone with < $100 cameras.

But sure, you’re clearly the better thinker.

dmkolobov··on Ukraine's autonomous killer drones defeat electronic warfare
So now the camera is pointed at the target? How is it checking that the other drones are headed in the right direction? And the personnel on the ground? They're just chillin' waiting for those other drones to come intersect with the stationary spotter drone's line of sight?
dmkolobov··on Ukraine's autonomous killer drones defeat electronic warfare
So the old “use a single unreliable 2D instrument to coordinate multiple fast-moving projectiles in three dimensional space” approach.
dmkolobov··on Ukraine's autonomous killer drones defeat electronic warfare
I understand that you’re probably just gonna reply with “still only need one camera”

…but if GPS is jammed, and there’s only one camera per fleet, how exactly are the other drones supposed to navigate towards the spotted targets unless they’re all equipped with cameras?

dmkolobov··on Progressive JSON
Yeah, it has its limits for sure. I like it for the streaming aspect.

I think you can still have the functionality described in the article: you would send “hole” markers tagged with their level. Then, you could make additional requests when you encounter these markers during the recovery phase, possibly with buffering of holes. It becomes a sort of hybrid DFS/BFS approach where you send as much tree structure at a time as you want.

dmkolobov··on Progressive JSON
If you send the tree in preorder traversal order with known depth, you can send the tree without node ids or parent ids! You can just send the level for each node and recover the tree structure with a stack.
dmkolobov··on The Two Ideals of Fields
It’s interesting that you use the “a monad is a monoid in the category of endofunctors” example. That kind of statement is definitely hard to parse when you’re trying to learn concepts.

However, the more I’ve learned about category theory, the more I’ve understood it as a way of defining what things are and what properties follow from those definitions.

Like, a monad really doesn’t have meaning beyond “monoid in the category of endofunctors”. The same is true for monoids and endofunctors: it’s all about the properties of those objects.

In the context of programming, we can impose all kinds of meaning, but the definitions and laws are really what makes it all work when you piece it together.

I guess my approach is to suffer through it until some understanding is gleaned, which admittedly isn’t very satisfying or easy haha.

dmkolobov··on Zod 4
The point is that somewhere, you need to chuck bytes over the network and someone needs to receive them.

If the teams working on the two are different, or even if the expertise level is uneven, something like a typed serialization library is a great boon.

At work, I maintain a Haskell-like programming language which spits out JSON representations of charts over OLAP queries. I’m the only one who knows the language extensively, but everyone is expected to do work with the JSON I push. If I serialize something incorrectly, or if someone else mistypes the frontend JSON response definition, we’re in for a world of pain.

Needless to say, I’ll be adding something like Zod to make that situation safer for everyone.

dmkolobov··on Show HN: Vaev – A browser engine built from scratch (It renders google.com)
Maybe? I'd say it depends on what you're rendering. We rendered HTML that we created ourselves, filled in with data that we parsed and validated. Styles across the documents generated were also largely the same.

If your job is to render arbitrary user HTML, this could get much more hairy. First of all, print rendering at the time(and probably now) was notoriously finicky. Things like adjusting colors, improper rendering of SVGs, pagination were difficult. It took a lot of effort to get right.

Furthermore, if you're sending arbitrary HTML, you now have a much larger security exploit surface. If someone figures out how to call `addEventListener` within the page context, they can snoop on every PDF generated by that page.

dmkolobov··on Show HN: Vaev – A browser engine built from scratch (It renders google.com)
It was!

I remember the afternoon I had the idea: it was beer Friday -and it took a few hours to write up a basic prototype that rendered a PDF in a few hundred milliseconds. That was the first time I’d written a 100x speed improvement. Felt like a real rush.

dmkolobov··on Show HN: Vaev – A browser engine built from scratch (It renders google.com)
Ooh blast from the past!

At a previous company we moved off of wkhtmltopdf to a nodejs service which received static html and rendered it to pdf using phantomjs. These days you probably use puppeteer.

The trick was keeping the page context open to avoid chrome startup costs and recreating `page`. The node service would initialize a page object once with a script inside which would communicate with the server via a named Linux pipe. Then, for each request:

1. node service sends the static html to the page over the pipe

2. the page script receives the html from the pipe, inserts it into the DOM, and sends an “ack” back over the pipe

3. the node service receives the “ack” and calls the pdf rendering method on the page.

I don’t remember why we chose the pipe method: I’m sure there’s a better way to pass data to headless contexts these days.

The whole thing was super fast(~20ms) compared to WK, which took at least 30 seconds for us, and would more often than not just time out.

dmkolobov··on Material 3 Expressive
The scrolling behavior of text on this blog is pretty wild. Each paragraph has “subtle” animation when you stop scrolling on mobile: as if each paragraph is independently floating into its spot. It’s incredibly disorienting.

Like… I get it: your design language revolves around treating UI elements as physical objects. Messing with text is a step too far. Text is not a bunch of boxes connected by springs.

dmkolobov··on The Day Hobie Made Nixon a Surfboard
Yep! That was my first kind I built. Also things like choppers, swing-bikes, etc.

My definition is pretty vague, usually requiring a bit of trashiness in the finished product.

dmkolobov··on The Day Hobie Made Nixon a Surfboard
Freakbike building is one, although rather niche :)
dmkolobov··on Ghostty 1.0
Which culture would that be? Starting off a post with “I hate things… this is one of them”?

I think the discussion here would be different if the tone was more moderated. Seems like you’re dying on a hill for the right to be abrasive without consequence.

dmkolobov··on Ghostty 1.0
I would think, or hope, that this guideline is geared towards protecting a years-long effort such as writing a performant, feature-rich terminal emulator, rather than a comment which takes 5 minutes max to draft.

Not clicking on a documentation link on a technical project is the definition of a shallow dismissal in my opinion.

dmkolobov··on Four limitations of Rust's borrow checker
The consequences of use-after-free are different for the two.

In rust it is a logic error, which leads to data corruption or program panics within your application. In C it leads to data corruption and is an attack vector for the entire machine.

And yes, while Rust itself doesn’t help you with this type of error, there are plenty of Rust libraries which do.

dmkolobov··on Four limitations of Rust's borrow checker
I tend to agree w.r.t. managed languages.

Still, being free from GC is important in some domains. Beyond being able to attach types to scopes via lifetimes, it also provides runtime array bounds checks, reference-counting shared pointers, tagged unions, etc. These are the techniques used by managed languages to achieve memory-safety and correctness!

For me, Rust occupies an in-between space. It gives you more memory-safe tools to describe your problem domain than C. But it is less colloquially "safe" than managed languages because ownership is hard.

Your larger point with indices is true: using them throws away some benefits of lifetimes. The issue is granularity. The allocation assigned to the collection as a whole is governed by rust ownership. The structures you choose to put inside that allocation are not. In your user ID example, the programmer of that system should have used a generational arena such as:

https://github.com/fitzgen/generational-arena

It solves exactly this problem. When you `free` any index, it bumps a counter which is paired with the next allocated index/slot pair. If you want to avoid having to "free" it manually, you'll have to devise a system using `Drop` and a combination of command queues, reference-counted cells, locks, whatever makes sense. Without a GC you need to address the issue of allocating/freeing slots for objects within in an allocation in some way.

Much of the Rust ecosystem is libraries written by people who work hard to think through just these types of problems. They ask: "ok, we've solved memory-safety, now how can we help make code dealing with this other thing more ergonomic and correct by default?".

dmkolobov··on Four limitations of Rust's borrow checker
It’s not the same. The term “safe” has a specific meaning in rust: memory safety. As in:

- no buffer overflows - no use after free - no data races

These problems lead to security vulnerabilities whose scope extends beyond your application. Buffer overflows have historically been the primary mechanism for taking over entire machines. If you emulate pointers with Rust indices and don’t use “unsafe”, those types of attacks are impossible.

What you’re referring to here is correctness. Safe Rust still allows you to write programs which can be placed in an invalid state, and that may have security implications for your application.

It would be great if the compiler could guarantee that invalid states are unreachable. But those types of guarantees exist on a continuum and no language can do all the work for you.

dmkolobov··on GPT-5 is behind schedule
Obviously not. I want legislation which imposes liability on OpenAI and similar companies if they actively market their products for use in safety-critical fields and their product doesn’t perform as advertised.

If a system is providing incorrect medical diagnoses, or denying services to protected classes due to biases in the training in the training data, someone should be held accountable.

dmkolobov··on Wuppertal's suspended monorail proved its doubters wrong [video]
Genuine question: wouldn’t we still be able to do that? Im imagining similar behavior to swinging cup of water around on a string. The liquid experiences the same acceleration and “settles” within the new orientation of the container.
dmkolobov··on AMD's trusted execution environment blown wide open by new BadRAM attack
Ah that makes sense.

I would think as long as the manufacturer and the operator are not the same entity then the danger in that regard would be mitigated.

dmkolobov··on AMD's trusted execution environment blown wide open by new BadRAM attack
The operators own the hardware and lease it to customers for computation. Those customers do not trust the operators to not peek at their Super Sensitive Data. TEE is a way for the operator to provide assurances to their customers that they will not, and more importantly cannot, exfiltrate customer data.

This is in theory. In practice, as demonstrated by the article, these assurances are not bulletproof.

dmkolobov··on A Novel Idea About `Functor` in Rust?
How dare people have new ideas.

For those that don’t hate new ideas, functors and the like allow you to write transformations on data in terms of elements, rather than the structure of the container. This means that it doesn’t have access to things like neighboring elements or the size of the overall structure( unless other traits which provide those capabilities are mentioned in the trait bounds ). Such well-known algebraic restrictions can be useful for managing complexity when writing compilers or other data pipelines.

The simplest use-case is when you want to use an algorithm across multiple representations of a data structure(list vs array, for example).

dmkolobov··on Dependency management fatigue, or why I ditched React for Go+HTMX+Templ
I’d say all of those bullets fall under the umbrella of “rendering” in an asynchronous execution environment like browsers, where code often depends on a consistent and predictable view of the DOM.

I’m willing to hear arguments about the merits of how React approaches these issues, but I would want any frontend UI library for generating and updating DOM trees to address them in some way.

dmkolobov··on Raw milk recalled for containing bird flu virus, California reports
Free adults make decisions for children, and there is a long precedent( imo well justified ) of regulating decisions wrt to children: see vaccinations and mandatory schooling.
dmkolobov··on A dictionary of single-letter variable names
It’s essentially a way to give types to “mutable” views into larger data structures.

s - the larger data structure

a - a view value

b - a “update” value

t - the data structure after an update is applied

Of course, everything is still immutable in the same way that cons-ing a value onto a list is immutable.

The change in type between s and t allows you to nest these views, hide information, etc.

dmkolobov··on A dictionary of single-letter variable names
I know this is a troll comment, but the situations you see these variables are in highly-polymorphic( generic ) code in which there are no more descriptive names.

It’s like the use of `T` as a name in most Java or C++ generics.

dmkolobov··on Ask HN: What happens to ".io" TLD after UK gives back the Chagos Islands?
A bunch of startups losing out on domains they bought despite best practices is not an event I would call “detrimental to the smooth operation of the global DNS network”.

This was a known and willfully ignored business risk for these places.

dmkolobov··on The upstream cause of the youth mental health crisis is the loss of community
Right. I would argue that organized religion provides(provided?) a guided framework of accountability, transparency, and acceptance for your "justifications" amongst your community. In a vacuum, these differences compound into a complete breakdown of understanding.

It's harder to call someone a "libtard" or a "troglodyte" if you have to sit next to them in a pew for the rest of your life.

← PreviousPage 2 of 5Next →