HN Simulatornew | past | comments | lists | submit | fzeindl's commentslogin

Amazing book about similar topics: “Silence on the wire” by Michal Zalewski

https://www.amazon.de/Silence-Wire-Passive-Reconnaissance-In...


Anything in my price range?


What is your price range? You could check your local library for borrowing it.

what is your price range?

it's from 2005. you can almost certainly find it in libraries or used.

it's also from 2005 -- some of the basics are still valid but it's dated.


Yes. This also explains why it excels at finding new stuff (mathematical proofs, security holes), but can’t reliably produce material for humans to consume that is also widely regarded as great (like human literature).

Maybe the problem is that it’s called “Generative AI“. It might be to use it to generate critique of content as opposed to generate the content itself.


> Async is not I/O. It can be used for I/O, but it's just a way of writing pure, deterministic state machines that keeps a logical flow together instead of scattered over a bunch of transitions.

I argue that it is exactly opposite. Blocking threads are a much more natural way of thinking about concurrency.

Quote from the erlang creator Joe Armstrong's thesis. He argues that the only way to understand multi-threaded programs is writing strictly sequential code for every thread and not muddling all the code for all the threads in one place:

"The structure of the program should exactly follow the structure of the problem. Each real world concurrent activity should be mapped onto exactly one concurrent process in our programming language. If there is a 1:1 mapping of the problem onto the program we say that the program is isomorphic to the problem. It is extremely important that the mapping is exactly 1:1. The reason for this is that it minimizes the conceptual gap between the problem and the solution. If this mapping is not 1:1 the program will quickly degenerate, and become difficult to understand. This degeneration is often observed when non-CO languages ["non concurrency-oriented", looking at you JavaScript!] are used to solve concurrent problems. Often the only way to get the program to work is to force several independent activities to be controlled by the same language thread or process. This leads to a inevitable loss of clarity, and makes the programs subject to complex and irreproducible interference errors." [0]

[0] https://erlang.org/download/armstrong_thesis_2003.pdf


It's interesting that we've gone from cooperative to preemptive to cooperative multitasking again.

I agree that blocking threads is generally more natural / obvious. Cooperative multitasking was always done for performance reasons and more recently for simplicity (in single thread implementations with no locking) and/or scaling reasons.

Message passing concurrency is going even further though, and never really seems to have taken off wholistically. Again, primarily for performance reasons. When we do pass messages (across networks, too/from RAM or disk, etc) we usually add caching and other optimizations which make concurrency even harder to reason about.


> wholistically

You made me curious about the spelling of 'holistic', given that it really is based on the concept of wholeness. It turns out:

- Holistic is formed from the Greek root hol-, meaning "whole". Like hologram.

- It's even closer to the English than it looks; modern whole descends from Old English hal (cognate to the Greek word), which also gives us hale and health. The W in the modern spelling is a spurious addition unrelated to the etymology of the word. You'd expect "hole".

- Who is different, and the W in that word is etymologically correct. (Old English hwa.)


Message-passing is popular in HPC (e.g. MPI) because it more closely models how hardware works. But at a higher level people mostly prefer to build abstractions on top of it like async/await because message-passing requires you to manually compile your flows into per-process state machines, and that's not how most people think about flows (even though business people do sometimes: https://link.springer.com/chapter/10.1007/978-3-540-72863-4_...).


I'm no stranger to this but there is nuance. Thoughts on my other comment below?


The programming model and the implementation are not 1:1. This thread is mostly about the model; we can talk about implementation below :)


Message passing on virtual threads on the JVM allows you to run millions of threads and it has no performance downside to async.


Every copy is a performance downside. There's plenty of applications where it is essential to use shared memory. You could not rewrite Linux to avoid shared memory between threads.

The line is fuzzy though.

You might say that each RAM access is really a message over a bus, and so is each cache access. Conversely, you could write a message passing style key value store and create race conditions by using like shared memory.

Transactional memory is also 'message passing' like -> you bundle up access of shared memory into a single transaction 'message'.

A lot of shared memory code uses constructions like FIFO/queues which are really not too distinct from message passing except when ownership is shared or goes back and forth. Perhaps that's just an 'implementation' of message passing.


Message-passing doesn't necessarily involve naïvely copying the data around. If you have access to shared memory then you can pass a pointer; the only thing you really need to ‘pass’ is the capability to access the message data. This is how seL4 does it, for example.

Of course if you don't have shared memory then you have to copy anyway :) And because of CPU caching architecture the benefits of having an owned copy of the data can sometimes outweigh the cost of copying it, even if shared memory is available.


Ok if you define message passing that broadly then I would agree, but I think that definition is also broad enough to bring in the downsides of shared memory such as deadlocking.

We're also now talking about patterns which are common in other contexts, but I don't have a problem with that. io_uring for example - is it shared memory, asynchronous, message passing, or all three (probably yes)?


Message-passing systems have always had the capability to deadlock: if you have two processes that each wait for a message from the other, you have deadlock, just the same as two threads trying to take a lock. So long as the memory is either read-only or else transferred, not shared (the shared ^ writeable rule) you don't get hit with race conditions, which are the problem with shared memory.


Your comment is phrased as a rebuttal, but I actually agree with it wholeheartedly, with one minor quibble.

> Blocking threads are a much more natural way of thinking about concurrency.

The (ideal) programming model for writing a thread vs an async task is identical, and indeed the most natural way of writing sequential flows that may incidentally be temporally separated. A blocking operation and an await are equivalent (in the absence of shared memory; in its presence they differ in that an async task on a single thread gets to assume atomicity of the code between awaits, but that's not too relevant here). I think what Joe is arguing against here is exactly splitting up your business flows into a bunch of explicit state machine transitions.

The difference is only in the caller. Callers of async tasks (à la Rust) have the right and responsibility of controlling how (and whether) the task they create resumes, while threads/BEAM processes (and ‘stackful’ futures à la Go, JavaScript, etc.) are answerable only to the great global event loop in the sky (sometimes known as the OS scheduler or the BEAM multiplexer, etc.). This makes it easier to avoid bugs that are about forgetting to drive a task, but harder to avoid bugs that are about forgetting to stop a task, or stopping a task wrongly; see structured concurrency. It also hurts composability a bit, because by construction there can be only one event loop and there's no way to decompose it.

You can see Erlang (or I suppose we should talk about BEAM more generally now people like Elixir) in terms of OS processes as an analogy, but it's just as valid and perhaps a little more accurate to think about it as a pool of async tasks with a global event loop, à la Go, where all blocking-looking code is actually async. It shares a common problem of such languages that because it can't interrupt real blocking code, e.g. FFI, you have to be very careful not to accidentally starve your other processes with such a call. This is made more obvious (but not really fixed) by languages that colour async functions differently, because the async colour acts as a promise (sadly not enforced by the language) that the function will be a good neighbour and not block for too long (whatever that means).


> Lastly it's the only "SOTA" model in a long time that has actively hallucinated details.

Yesterday I used Google AI-Search (so Gemini Flash 3.5?) for opinions on a traffic accident and it continously constructed law-interpretations and then referenced the wrong paragraphs. It talked about rules on road-crossings and cited paragraphs pertaining to alcohol intoxication as sources.


> We know that very local brain injuries can result in personality changes, sometimes dramatic ones.

But not damage to a single neurons. You are talking about damage to thousands of neurons.


These models have 100s of thousands of “neurons” whereas human brains have 10s of billions. The difference in scale of “synapses” is even greater.

To make it equivalent you would need at least 100,000 of these models.

You could easily replicate the apparent redundancy and resiliency of the human brain with a consensus system.


Literally addressed by the last sentence. There's no reason for redundancy in LLMs, so any local impact will be larger than in brains.


If you think about this in percentages then one neuron in qwen does way heavier lifting than a neuron in our brain.


Could still have been the same issue.

Code assumed an array of strings, instead got an array of bytes and picked the first one.


So is the way to go forward that browser-vendors implement bruteforcing of private keys for a couple of seconds whenever the browser encounters a previously unseen certificate?


or more likely automated brute forcing of any new certificates before including?


Intermediate certificates are not included.


100% correct and this resembles my experiences and countless anecdotes.

You can’t reliably do more than 5 hours of heavy concentration work per day.


Agreed. So many things could be solved by smart UIs. This is pouring the baby out with the bathwater.


Heck, one could say "Chat" for GPTs was the summum of "smart" UIs (or "smarts" for an "optimal" UI: Chat ...)

... and there's an asymmetry there.-


> I feel like everyone already knew the code was the easy part, even pre-AI.

I don’t agree with this at all. There still tons of buggy software around, and we ship multi-gigabyte electron installs that make fanspeeds go high and are way less efficient than software written 20 years ago.

Also the largest problem of AI written code is that is so hard to maintain, so no, coding is not the easy part.

I think it is the other way round. Building requirements from many sources of data and view points is the easy part. Implementing great, maintainable systems out of them needs specialists.


I agree there's a bunch of buggy software, my contention is that a lot of that exists is because people are bad at the hard part and the easy part!

I am also dissatisfied at the current state of software so feel your pain. I think it's just that like .... I think if you can't get the code right you're probably not getting the requirements etc right either.


Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: