Better HN
topnewbestaskshowjobs
Log inSign up

rtpg

21,281 karma · joined Nov 23, 2012 (14y ago) · 6,748 submissions

real name: Raphael

blog: https://rtpg.co

email: raphael at above domain

Submissions

comment 5y ago · link · parent

to be fair, you shouldn't be messing with your radio or things like that while driving anyways. Just stop somewhere!

comment 5y ago · link · parent

monadic IO isn't pure in the same sense that even a pure Haskell function isn't pure (cuz it's usually executing on a register machine), but from a language semantics thing, it _is_ a pure thing!

The whole premise is that you end up with some main function which is a description of side effects, but you still have referential transparency and the like at a language level (so I/O doesn't need special treatment).

(there's a whole thing about "monad = IO" in laypeople discussion of Haskell which I think muddies this. There are loads of monads not about doing side effects, like list. But instead people think there's a link between monads and side effects, because we say "IO monad" instead of just "in IO" or something)

EDIT: it's v true that like.... side effects are side effects are side effects, so you can take that shortcut when talking about stuff. But if you want to get into the details about whether some expression is pure or not, you're brushing up against important semantics!

comment 5y ago · link · parent

Sounds like someone that afraid of shoplifters shouldn’t be allowed to have a gun, or really have any punitive enforcement capabilities on anyone.

Cops are the whiniest babies. Everyone else does their job without self-crucifixion at every opportunity. “Wow I’d really like to ruin this persons life but paperwork”. So much wrong with this mentality

comment 5y ago · link · parent

Have you considered that the choice of phone might be despite this policy rather than because of it?

It is possible to demand better things from something you use. Not every issue is a hill to die on.

comment 5y ago · link · parent

Typescript, as a counterexample, doesn't need GADTs because it has first-class union support + nice type filtering. There's a bit of manual tagging that's needed but the ergonomics are both easy to understand and more flexible (not to mention supporting even other usage patterns).

    type Term = {kind: 'lit', value: number} | {kind: 'pair', left: Term, right: Term};

    function pair(left: Term, right: Term): Term & {kind: 'pair'} {
        return {kind: 'pair', left, right};
    }
    function lit(n: number): Term & {kind: 'lit'} {
        return {kind: 'lit', value: n};
    }
    let t: Term =  pair(
        pair(lit(1), lit(2)),
        lit(3)
    );

comment 5y ago · link · parent

Nice linguistic trick of trying to just mix "homogenous populations" and "good areas/bad areas" as if they're interchangeable /s

There's definitely huge variation in quality of areas in Tokyo (more or less parks, more or less access to services etc). Less so now, but many areas had a good amount of crime too! Loads of people don't want to live in areas cuz of the "bad vibes". People get stuff stolen here too! And there's a "good school"/"bad school" thing for certain areas.

But there's a baseline that is still something you can survive with. So yeah maybe you have a shitty environment but it's not "the entire bottom has fallen out" like chunks of the US. The schools have (some) money, and (relatively) clean water comes out of the pipes. And if you make very little money there is some semi-public housing that can fit a family of four.

And poorer families are given cash, not food stamps with 1000 exceptions to them.

All this sociological exoticism (mainly from Americans) is really missing the forest for the trees. A lot of it is the result of giving people some means to survive, even in difficult times. The US would change a lot if it could adopt that attitude.

comment 5y ago · link · parent

this could easily be combined with legislation providing tools to make it harder and harder to participate in mining off-fork.

US financial laws have been very useful for the gov't to be able to de facto give it worldwide jurisdiction in some areas, I think there would be relatively few qualms about continuing down this path. Especially if (for example) Robinhood and Coinbase were forced to follow along. At one point the "blessed" thing will become the only place you can really operate.

comment 5y ago · link · parent

There's probably bigger issues to solve there, like the actual poverty that leads people to digging through trash to find can-shaped dimes? People aren't doing that for fun

Have the deposit system, _and_ force Coke + Pepsi to house the homeless! Problem solved (half-joking)

comment 5y ago · link · parent

A judge! A judge can just claim jursidiction!

Imagine if Goldman Sachs did this. A judge can say "look, you can follow our rules or we start seizing assets etc".

And when you're sitting around trying to be anonymous, well... you're doing everything on a public ledger, so now you're extremely restricted.

Hell, courts/legislative bodies could even go down the "force all miners within their jurisdiction to rollback an unwanted transaction". You think miners care enough to make a stand on this kind of stuff?

Unless you're going to like.... download your consciousness onto the blockchain you are still just as liable to being told by a court what to do as anything else.

comment 5y ago · link · parent

Drag n drop UIs don't really help when you have too much dynamism (like "oh only have this button appear in these conditions", "do this here", etc). And I would say that box layout offered by CSS is much nicer than the constraint layout system _when you have a lot of dynamism_.

Like I wouldn't want to have to deal with an interfrace like facebook in native stuff. I don't think it's impossible, but I feel like it would require a lot more up-front design and correct engineering.

You're right about XML being a medium, just kinda my memories of working with this stuff.

comment 5y ago · link · parent

Try writing a GUI with other toolkits. Hours of tweaking random XML to try and figure out why some constraint solving thing just isn't working...

Despite all the mess, I have an easier time getting buttons on a screen and doing things sanely (once all the fuss is set up) compared to trying to get the ball rolling in Qt/GTK/etc (especially if you're not using Java or C++)

comment 5y ago · link · parent

The point is that whatever you would need to make Mars habitable could _directly apply_ to keeping Earth habitable at orders of magnitude less difficulty.

Imagine trying to build up population centers at the bottom of the ocean in order to have a backup plan for some nuclear winter on the surface. You could just build your hermetically-sealed, closed-system things on the ground! They'd work just as well (absent, I guess, the getting nuked part). Mars is that, plus you gotta actually get over there to send resources for the first couple hundred years.

comment 5y ago · link · parent

High-speed rail feels like such a red herring for the US (and really any part of the world). You know what's great and costs a fraction of this stuff? Normal trains. HSR is not very useful for local commutes cuz if it's going fast there aren't going to be many stops. So just build cheaper intercity networks that bring people where they need to go, and have _lots_ of stops.

Successful HSR exists in places like France and Japan because of how urbanism was shaped in those places. Everything is in Paris, so people _have to go to Paris_. So the "every TGV line is to- or from- Paris" serves that purpose. Japan is one-dimensional, so you also only need one HSR line for effect (exageratting a bit). But HSR in both of those countries are extremely expensive, and despite people posting all the "Japan is cool" stuff with people taking the shinkansen every day for work, the reality is more banal (business trips, family vacations, same stuff as what you find with planes).

But the big payoffs come from having people be able to rely on trains for more day-to-day stuff. And you solve the last mile problem by just building a train station every mile! And in that case your train really doesn't actually need to go that fast.

comment 5y ago · link · parent

That's an interesting way to put it. Python does have a form of prototypical inheritance (given how objects end up being `__dict__`s with behaviour defined through `__class__`, though not only that!).

Python descriptors are extremely flexible though, and I _guess_ you could emulate almost all of it through Javascript proxies, but I can't imagine the performance of that being great. Hash tables would also not be re-usable between JS and Python (since Python hash tables allow many more varieties of objects), and Python has a distinction between attributes and keyed access (which JS lacks).

Python exposes much more of the global environment and internals than JS does, and doesn't have some of the requirements JS has put on itself for security reasons. I'm not super sure you could emulate Python blocking style with a JS transformation statically. Blocking Python for something that is only available in a non-blocking JS environment would require effectively wrapping every Python operation (since almost every Python operation can have arbitrary side-effects).

I think there are people who write sort of syntax-y transpilers, but that's not really going to lead you down to nice code re-use.

comment 5y ago · link · parent

Python's object semantics are extremely different from JS. There might be _some_ ways of emulating them with JS thanks to Proxy objects nowadays, but you're looking at a pretty big uphill battle I think.

comment 5y ago · link · parent

Tesla autopilot is not a comparable product though! It operates nowhere at Waymo capacity.

My understanding is that Tesla is extremely behind on these fronts compared to Waymo, and that gap keeps widening every day. I know who I would bet on

comment 5y ago · link · parent

Yes

comment 5y ago · link · parent

You know who’s making real progress on AI driving? Waze is. I don’t want to be too dismissive of EV progress thanks to Tesla but I feel like there’s no contest about who is pushing forward AI driving beyond the status quo.

And Waze doesn’t need a professional troll to go around garnering media support 24/7.

comment 5y ago · link · parent

Mostly speculation, but I think a big part of it is that MacOS will heavily throttle as it needs to, and I imagine that Windows laptop drivers get a lot of love in that space too since the manufacturers want to get good battery life in their machines as well.

I'm sure a huge component of it is just people-hours spent in figuring out the right balance of defaults that don't just mess people's setups up.

comment 5y ago · link · parent

Lots of people buy 15 inchers with dedicated graphics etc. Or like... run Linux (which hoses the battery on a lot of stuff if you just use it out of the box without tweaking stuff).

Also really cheap laptops aren't as great about battery life just cuz of reasons. I think there's a lot of selection bias (like people who have a lot of money will buy macbooks in general cuz that's what everyone says to do)

comment 5y ago · link · parent

And there's the even "real-er" cost of bringing in thousands of people in an ongoing pandemic (it might be hard to realize for the many Americans on this site, but many places, including Japan, are still only getting a trickle of vaccines for example).

It would be possible to just vaccinate every athlete (talking less than 10k people). It might be possible vaccinate all of the staff as well. But in a country where not even all the doctors have gotten vaccinated yet, it's not a great look, politically.

And if you choose not to do mass vaccinations, you're talking about doing a mass event with huge risks of spread at every level.

comment 5y ago · link · parent

I mean if you care about perf you can do it in one step. It’s not that huge of an ask, and engineering wise “compile some typed code” is a hell of a lot more straightforward than “try to guess what I should speculatively compile at runtime”

There was a piece by v8 devs a while back where they ended up turning down JIT aggressiveness cuz it ended up making normal web pages slower (except for like Google Docs).

This is just me backseat-BDFLing “why do the hard thing when we could do the easy thing” tho

comment 5y ago · link · parent

> “My honest sense of why everybody is leaving because they're tired of Jason and David's behavior — the suppression of voices, of any dissent,” one employee told me. “They really don’t care what employees have to say. If they don't think it's an issue, it's not an issue. If they don't experience it, then it's not real. And this was the final straw for a lot of employees

Sounds a hell of a lot like the house cleaning needing to happen is at the top.

That quote is the clearest indication that this isn’t a politics issue, it’s a management issue. This sort of “I don’t think it’s an issue so let’s not handle it” attitude applies just as much/more to actually getting work done. Classic bad manager 101 stuff.

You can have good success by being a bad manager of course! My bet is that there’s a lot of great ICs that counteract whatever messy people mgmt stuff is going on.

comment 5y ago · link · parent

So much stuff just from the readme would introduce breaking changes to the Python ecosystem.

Part of the reason Instagram can get away with this is they likely have almost complete control of their dependencies and the like. But the changes they decide to make would not just work for everything.

That being said I think we could get a lot of neat PEPs from this.

EDIT: this is just my opinion , but in a world where we have type annotations, JITs feel like a massive step back. Stuff like mypyc could get us way further into high performance stuff (and no black box hand waving for perf things).

comment 5y ago · link · parent

Through work we deal with Japan Post, and there a letter can get basically anywhere in the mainland from anywhere else in one business day.

Granted, the nation is one-dimensional in shape so things are helped there, but the reliability is expected.

On one hand, I think overworking mail workers isn’t worth it. On the other hand tho, surely there’s a way to make this stuff work better than requiring 3 days to move a letter across town.

1
949596
225