Better HN
topnewbestaskshowjobs
Log inSign up

rtpg

21,278 karma · joined Nov 23, 2012 (14y ago) · 6,746 submissions

real name: Raphael

blog: https://rtpg.co

email: raphael at above domain

Submissions

comment 2y ago · link · parent

While I don't really know about posts being migrated, identities at least can be migrated in the common circumstance of someone simply wanting to change providers and the old host being willing to hold onto the "moved" record for long enough

comment 2y ago · link · parent

I don't think that is correct? You can spin up your own instance and do stuff on it. The fact that some people want to share their resources isn't feudalism.

comment 2y ago · link · parent

"Being at will of a server" is always a problem, but with federation you can choose which server you are at the will of. You still need trust, but that trust can be chosen by you based off of your needs (and that trust can be placed in yourself). You're on a different part of the trust gradient.

Meanwhile there's a certain quality of service that can be obtained with "mere" federation that is much tougher for many decentralized strategies. The actual topology matters, but federation is a pretty decent model IMO! There's a reason that e-mail has been so useful as a system for so long!

comment 2y ago · link · parent

I have found that ORM arguments in context don’t stick very well to Django’s ORM, but see the argument applying well to most all the others.

Case in point Django is really good about DB-specific functionality and letting you easily add in extension-specific stuff. They treat “you can only do this with raw” more or less as an ORM design API issue.

My biggest critique of Django’s ORM is its grouping and select clause behavior can be pretty magical, but I’ve never been able to find a good API improvement to tackle that.

comment 2y ago · link · parent

Thunderbird has gotten a lot of love in the past 2 years. Still have random hangs and the like meaning I'm finding myself just using my mail host's web interfaces often, and search... is what it is, but it's better!

comment 2y ago · link · parent

Very fun to see your username outside of Stack Overflow, thanks for your work on having the playground!

Beyond the running costs of the machine itself, has the rust playground been any trouble, or has it mostly been smooth sailing after the initial setup?

comment 2y ago · link · parent

I am a bit frustrated that I don't have a great "tool" environment to build out this stuff, because of having to futz with the I/O. Like most of that stuff is "well I know how to write the Python to do the last step, but wrapping it all up in a simple web UI is Too Much Work". That effort might be small, but it's still orders of magnitude larger than the snippet!

Lots of TUI interfaces try to approximate this, but I think I really just need to build out something a bit like https://anvil.works/

comment 2y ago · link · parent

Took me a second to grok why the field access would require dynamic dispatch and it's because you have to deal with differing layout between structs.

comment 2y ago · link · parent

https://rtpg.co/2016/07/20/supercharged-types.html I wrote this example a long time ago, I think nowadays I could come up with some more interesting examples though.

As to the differences with TS... I think they're playing in similar spaces but the monadic do syntax with Purescript lets you use row polymorphism for effect tracking without having to play weird API tricks. In TS that's going to be more difficult.

(short version: in purescript I could write an API client that tracks its state in the types so that you can make sure you authorize before calling some mechanism. In TS you would need to design that API around that concept and do things like client = client.authorize(). Purescript you could just do "authorize" in a monadic context and have the "context" update accordingly)

comment 2y ago · link · parent

There's some cruel irony in the planet getting hotter not just making it rain more and making rain happen on land.

I do wonder what the state of desalination is. I have read a bit about brine management out of curiosity , but I really have a hard time understanding what can be done about it. If someone figured out how to make concrete from brine or something could we be doing a lot more desalination?

comment 2y ago · link · parent

I remember a long time ago (20 years ago?) playing some Windows minesweeper variant that someone had wrote. It did the "impossible to hit a mine on your first click" thing (That I believe Windows' Minesweeper didn't do), but also had different shapes. You could have a hex map, for example.

Anyone know what I'm thinking of?

comment 2y ago · link · parent

Row polymorphism is excellent. I was intro'd to it in Purescript, but I would like to say that Typescript gives you some things that rhyme with it through its combinations of records at the type level.

Highly recommend people mess around with Purescript, you can feel how much pressure is relieved thanks to the row polymorphism tooling almost instantly. Truly, all we wanted as an industry is an easy way to bundle together various tags into our types, and row polymorphism gets you there.

I think row polymorphism is a fairly straightforward thing compared to dependent types in general, but can let you crush a whole class of errors and pay almost nothing in terms of expression costs.

comment 2y ago · link · parent

But this isn’t hemming to the definition brought up by GP. “I will now, of my own accord, sleep so the OS scheduler takes over” is fairly precise. And it’s different from both just doing an operation that takes time… and different from the program doing an operation that, incidentally, the OS sees and then forces a sleep due to some OS-internal abstraction

But you think about this too much and you can easily get to “well now none of my code is blocking”, because of how stuff is implemented. Or, more precisely, “exactly one function blocks, and that function is select()” or something.

comment 2y ago · link · parent

This feels mostly right to me. I think that you get into interesting things in the margins (is a memory read blocking? No, except when it is because it's reading from a memory-mapped file!) that make this definition not 100% production ready.

But ultimately if everyone in the stack agrees enough on a definition of blocking, then you can apply annotations and have those propagate.

comment 2y ago · link · parent

"asynchronous code does not require the rest of your code to be synchronous" fails the smell test.

Many APIs are shipping async-only. You can't stick calls to those APIs in the middle of your sync code in many cases (unless you have an event loop implementation that is re-entrant). So... you gotta convert your sync code to async code.

I am curious as to what a principled definition of a "blocking" function would be. I suppose it's a call to something that ends up calling `select` or the like. Simply saying "this code needs to wait for something" is not specific enough IMO (sometimes we're just waiting for stuff to move from RAM to registers, is that blocking?), but I'm sure someone has a clear difference.

If you care about this problem enough, then you probably want to start advocating for effect system-like annotations for Rust. Given how Rust has great tooling already in the language for ownership, it feels like a bit of tweaking could get you effects (if you could survive the eternal RFC process)

comment 2y ago · link · parent

There's a gap between public fora and the blogosphere though.

Generally speaking there are plenty of blogs that get linked in places like here. Blogs just don't have comment sections hosted on their own as much anymore.

Having discussions happen in separate places is also interesting, because the HN convo and some subreddit convo will be different, for example.

There's a lot more mainstraeam stuff but I think niche communities still exist. Glibly, we're not a part of most of them on account of having gotten older. Or we are a part of some, but there's plenty we're not seeing.

comment 2y ago · link · parent

Tiled is great. I really wish there was an SVG equivalent though. Inkscape is alright but custom data parameters are really annoying to deal with, and ultimately the tool is built around drawing things to paper.

comment 2y ago · link · parent

Got the screen right there, watch a random movie like the rest of the Hoi Poloi!

I think it's honestly a great moment for cultural leveling. There's always a couple classics in the machine. I (un)seriously judge people who feel the need to get Wifi access on flights so that they can just chat on Discord. You have an excuse to just watch a movie!

comment 2y ago · link · parent

Fair point, yeah.

comment 2y ago · link · parent

Funnily, the way I used to check Keybase profiles is to check Twitter because a blue checkmark there was usually a good indication of them being "the famous person" but thanks to Twitter Blue that feature is no longer usable.

I understand Keybase allows you to link up a bunch of accounts, but it doesn't prevent you from making all of those accounts say you are the CEO/CTO of some company unfortunately.

comment 2y ago · link · parent

Only $15-$30 per user! What a deal!

Somebody hasn't experienced Salesforce pricing

comment 2y ago · link · parent

I'm fortunate enough to have only taken trains in places where there's an understanding that people actually... really actually do need to get to where they're going.

If your network doesn't have any sort of resilliance to failure, not much to do really.

(Aside: for the longest time I was always a bit miffed at France's train network, because it's mostly "go to Paris"/"move away from Paris" and very few sideways connections. Germany's transit map has always looked more evenly spread out! But every German I know who tries to take train transport complains about this lack of resiliance and now I'm pretty convinced that the network is too thinly spread out)

comment 2y ago · link · parent

Gunicorn expects `\r\n` for lines (see gunicorn/http/message.py:read_line), though it's possible that every middleware that is in front of gunicorn in practice normalizes lines to avoid this issue.

comment 2y ago · link · parent

Took me a second to get what was going on here, but basically the idea is that you middleware might not see `C:D`, but then your application _does_ see `C:D`.

And given your application might assume your middleware does some form of access control (for example, `X-ActualUserForReal` being treated as an internal-only header), you could get around some access control stuff.

Not a bytes-alignment thing but a "header values disagreement" thing.

This is an issue if one part of your stack parses headers differently than another in general though, not limited to newlines.

comment 2y ago · link · parent

I.... I really don't feel like driving in a traffic jam is better than being in a train in anything except the most extreme cases of train crowding. I haven't experienced massive commuter driving but even the cases I've just been stuck in stop and go traffic for 30 minutes it felt worse than any train ride I've taken except for the few times I was in "I feel like I'm going to get crushed" levels of crowded.

And like... generally speaking, the crowded train is still going to get you where you need to go. I don't know how you walk away from the 30 minute trip that took 2+ hours with any happy feelings. To each their own of course

comment 2y ago · link · parent

People say this as if there’s some conspiracy.

But I think the uncoordinated explanation is just that annd top executives often operate in a world where informal quick access to a bunch of powerful people is important. And in that universe it simply makes sense to have people be in the same place.

And beyond that, in their eyes… why wouldn’t you want to live in these wonderful cities? Why wouldn’t you want to be in the office and work through things? These are people who self select through working being their life so they barely conceptualize alternatives

In the same way you can’t conceptualize why someone would want to be in the office, they can’t conceptualize why you wouldn’t.

comment 2y ago · link · parent

I mean if you're paying 5+ digits a month on CI it starts being reasonable to say "maybe I should do things to lower the absolute cost of this". 5 dollars time a big enough number is real money!

comment 2y ago · link · parent

Availability's definition:

> every request received by a non-failing node in the system must result in a response

I don't believe that encodes latency

Instead, here's consistency:

> any read operation that begins after a write operation completes must return that value, or the result of a later write operation

"after a write operation completes" feels like where latency kicks in? Because within that space you can play around with completing a write operation to get what you want.

1
333435
225