HN user

algesten

917 karma
Posts2
Comments262
View on HN

I wouldn't define it as Sans-IO if you take an IO argument and block/wait on reading/writing, whether that be via threads or an event loop.

Sans-IO the IO is _outside_ completely. No read/write at all.

Ok, pipelining as in using the fact that the socket is bidirectional, so you queue up the next request before the previous response has arrived?

Sounds a bit dodgy, since any response could potentially contain a Connection: Close. Maybe ok for some scenarios with idempotent methods.

I assume with HTTP/1.1 this would be less useful, since each synchronized request would require another socket, thus hitting potential firewalls limiting SYN/SYN-ACK rate and/or concurrent connections from the same IP.

In some respects this is abusing the exact reason we got HTTP/3 to replace HTTP/2 – it's a deliberate Head-of-Line (HoL) blocking.

One thing I toyed with, but didn't get very far, was to encode the HTTP/1.1 protocol as a Sans-IO state machine with .await points for the IO, but rather than the IO registering Wakers with an async runtime, it relinquished control back to the user to perform the IO manually. One can think of it as .await releasing "up" instead of "down".

In the context of HTTP/1.1 the async code became a kind of "blueprint" for how the user wants the call to behave. At the time I was dead set on making it work for no_std (non allocator) environment, and I gave up because I couldn't find a way around how to need dynamic dispatch via Box<dyn X> (needing an allocator).

[dead] 2 years ago

What are the chances this survives a court challenge?

Story: In a previous life I worked as a consultant in Sweden. My employer had a clause like this in the employment agreement. I quit and joined a company that technically was a client. My previous employer tried to make a legal thing out of it saying I owed them money, but backed down with a sternly worded letter from my lawyer.

My lawyer roughly told me that "they can't block me from earning a living without offering me the same amount they're trying to deny me to earn". Sounds like a very fair law. Wonder if it's still like that? Was some time ago.

I've spent lots of time in India. It's good to learn what the mosquito that can carry Dengue looks like. They are smaller and fly much faster and more erratically than a common mosquito – way harder to swat! If they settle down, you can see white stripes on their long legs and body.

If you notice them, you can sometimes figure out why they are congregating, they need blood and standing still water to procreate.

At one place I stayed, next door there was a construction site where the workers also slept bare skinned at the site. That's the only time I caught it. Another place I stayed was also seriously infested, I couldn't sit outside. I went looking and found two barrels of rain water on the roof, full of larvae. I added a small amount of dishwasher liquid to the barrels, which worked. Mosquitos went away in a few days.

This style of reporting is so irritating. Surrounding facts and statistics in a heart felt drama of suffering and human angle. Of course I feel for Sonja Bingham, but if I'm trying to get my head around the consequences of Harm Reduction, I want facts, statistics clearly laid out with analysis by (named) experts in the field.

Rotten Apple 2 years ago

Call me old fashioned, but I prefer it when web pages open in a web browser and don't pretend to be native apps.

For me the A380 is the most comfortable. I'm slightly scared of flying, and turbulence making the entire plane jump around makes it that much worse. I'm only speculating, but I think it might be the sheer bulk of the A380 making it the smoothest rides I've ever been on.

And then it typically interacts and fails without feedback. I've tried so many times to tell Siri "Send a message to x that I'm 10 mins away", only to realize much later that "message delivery failed".

No clear feedback, a weird timing issues where it just stalls and show the message it' about to send in case it got it wrong.

It's just a terrible UX all around.

Explains a lot. I remember having truffle shavings at the table on pasta at a posh italian restaurant in the early 2000, and it was reassuringly expensive. Didn't taste of much, I wasn't overwhelmed. A bit earthy, but nothing special. Then I read somewhere that some people can't taste truffle. So I put it down to that.

More recently if I get something that says "truffle", it's this crazy almost garlic style punch (without the aftertaste of garlic). I've been confused why my experience of this changed so much from then to now… should have known I was being scammed!

You will adjust without even realizing. You'll change your pitch to sound right in relation to everyone around you. This probably means that in practice your finger is slightly up or down depending.

It is also a reason why when playing an A, many prefer moving the hand to 4th position on the D string, rather than using the A-string with no finger. Partly because you can make a better tone (add vibrato if wanted), but you can also intonate.

I don't get it. "Instead of learning jq DSL, learn zq DSL".

To me they look similarly complicated and the examples stresses certain aggregation operations that are harder to do in jq (due to it being stateless).