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 3y ago · link · parent

In a world where most programming languages have async/await style abstractions this stuff is pretty applicable IMO

comment 3y ago · link · parent

Coroutined make programming for pico8 very chill as well.

The biggest challenge is sometimes you do want external flow control, and there coroutines can get hard to untangle if your design is a bit messy.

Something like “A signals to B to do something else” starts to be a bit tricky (along with interruptible actions). I think there are good patterns in theory but I’ve found myself with pretty tangled knots at times.

This is ultimately a general problem when programming everything as functions. Sometimes you need to mess with state that’s “hidden away” in your closure. Building out control flow data structures ends up becoming mandatory in many cases.

comment 3y ago · link · parent

Maybe not 10x but even just noting stuff means that picking up an older task that you had to shelve before could go from a 15 minute thing to a 30 second thing depending on what context you put down/how accessible it is.

Ultimately a lot of this stuff is commingled with comfort with tools and general ability to juggle things though, so hard to isolate the effects

comment 3y ago · link · parent

The challenge is more in the stack. Building GUIs is tricky, and the web stack offers a lot of useful tools which make it a very good default choice from a “get shipped” perspective. Qt is nice but it sure feels like a big step back in velocity for me

comment 3y ago · link · parent

We don't want stuff to crash. But we also want data integrity to be maintained. We also want things to work. In a world with extensions written in C to support a lot of cool things with Postgres, you want to walk and chew bubblegum on this front.

Though to your point, a C extension can totally destroy your data in other ways, and there are likely ways to add more barriers. And hey, we should fix bugs!

comment 3y ago · link · parent

There are plenty of people who live in Tokyo who speak ~no Japanese, despite being here for 20+ years. Not recommended from a social sanity perspective, but there are enough foreigners to where you can just exist in the non-JP bubble for ~ever. Especially in the fancier parts of town.

And even absent that you can just figure out and manage. It's not the Netherlands but you can be functionally illiterate and exist here

There are plenty of Japanese classes in Japan. There are formal language schools, things offered by the city, and you can also just pay for private lessons. But if you're coming for work you're probably busy with work

Having said all that... loads of companies do the whole "English is the official language" thing here but are still properly segmented into "can speak Japanese" and "cannot speak Japanese" cliques. It's not the end of the world but I would say the workplace is where the questions are the biggest for me

comment 3y ago · link · parent

To put an even finer point on this: no matter how good your office is, if your office is in the middle of a huge metropolis then you are now asking people to either do long commutes or make some honestly hefty sacrifices in living arrangements to be close.

No amount of office niceness can compensate for the surrounding area to be not a place you want to live in.

I think it’s a huge missed opportunity for smaller startups to not place their offices in areas a bit off the beaten path. SF is uniquely weird about this from what I understand, but like NYC or Tokyo is filled with startups putting their office in places where workers either have an hour commute or have to increase rent by a lot to live closely. All for, frankly, the status of the address. Then companies whine about high salaries and nobody wanting to come or Mori tower.

Meanwhile there are many neighborhoods that are cheaper, have near equivalent services, and could offer a nice environment where people want to live closely. Commercial real estate is not always available, but the rent savings alone could easily pay for a lot of renovations to another building

comment 3y ago · link · parent

aesthetics are very nice, and the slash menu mechanism + syncing make it nice when working with people. If Google docs looked nice this convo would be different but Google docs doesn’t look nice!

comment 3y ago · link · parent

The core idea is that you are syncing a data structure, for example a map, so you can get a lot done with that (yjs’s presence stuff can be helpful for other live features).

In the end I have just been stuffing the data structure directly into postgres “as-is”. I think there are some tricks you can use to shrink some historical data but I think it’s pretty straightforward if you get to a size where the data size matters

comment 3y ago · link · parent

blocknote looks very nice! I am unsure why I didn't take this as an option earlier, as I think I looked at it. I will check it out.

FWIW I picked up prosemirror because I have experience working with CodeMirror 6, and I trust the general model to be right, if complicated to use. But honestly I might not need the level of complications provided by PM.

comment 3y ago · link · parent

I did not rely on the webrtc implementation. Really you gotta do a lot of "echo server"-style shraing of messages and some sync messages from time to time but Yjs/CRDT stuff works pretty smoothly on this front.

But my requirements are pretty loose

comment 3y ago · link · parent

At the risk of sabotaging stuff I've worked on, it's _astoundingly easy_ to glue together Y.js, prosemirror, and a little bit of express.js to get a distributed Notion clone with conflict free resolution.

Like I have something that I got working in 3 days with multiple pages, so links between things, and cursor syncing (most of this work is provided by wonderful people with full-featured libraries!). There's some trickiness with how Y.js actually works (in particular map ID conflict resolution meaning you don't want a dictionary of page names to pages but UUIDs and then some sort of manual revision checking....). But you can get that and probably with a bit more work get ~instant search and the like. All with free offline capabilities.

Of course then I stared at this and was like "I like notion because it looks nice" (I personally don't care about the AI stuff or the database stuff), so just went and paid for notion for my family usage.

comment 3y ago · link · parent

Definitely a thing, yes

comment 3y ago · link · parent

People say this but it's patently obvious that life was more miserable 150 years ago! ~everyone's life was basically toiling away every day to survive. There are obviously examples at the margin that change things up but let's be real. Life is a bit better!

I am personally for some financial incentive changes (though I think that we can somehow figure out how to build communities that don't cost as much to run), so it's not like reddit in its current form has to exist. I just think that we can acknowledge that online communities are a nice to have for many people.

And to expand on that, online communities can complement offline communities in very interesting ways (See how chess has grown thanks to things like chess.com, and all that feeding into an increase in people participating in social chess events. Or things like board games being complemented by things like BGA)

comment 3y ago · link · parent

I mean I get that for absent-minded browsing but even just...having a hobby and talking about it with people feels pretty much like Normal Person Behavior(TM) and Reddit's subreddits worked well for that in the same way that forums in the past did.

Not the end of the world but as a kid who only could find other people to talk about certain hobbies with online up until college sounds like a lot of pepole will be more bored.

comment 3y ago · link · parent

I don't really think that "every community can interact with each other" is a pure benefit. This is exactly the sort of stuff that leads to "everything being about everything", along with general loud people occupying every space.

I still am very happy about "fediverse" stuff because it enables a simple-ish protocol and working mechanisms for various communities to interact. But I really think that, for example, mastodon.social is a net negative to fediverse stuff except for pure "get people to adopt" reasons.

comment 3y ago · link · parent

Conspiracy stuff: just removing competitors outright and taking advantage of inroads to sell what they really want to sell (their own brands).

A similar thing I saw: Asahi was in charge of Budweiser distribution in Japan. Absolutely miserable sales (not that I like Budweiser, or would drink it by choice), almost no presence. AB got the rights back to sell it, and now Budweiser is a reliable presence in many places and I see it out there in ways I never did.

My head canon is that Asahi got the distribution rights purely to slow roll it and make it so that AB would have no reason to build up a local presence. That way Asahi protects its local brands and simply needs to send some executive once a year to be like "hey I dunno nobody seems interested in this drink"

comment 3y ago · link · parent

Clojurescript has a lot of interesting stuff behind it, but honestly Clojure stuff has a pretty high learning curve (CLI tools whose error messages are extremely unhelpful, docs that are pretty minimal, and other things that make falling off the happy path rough). I think it's a very interesting "serious" choice, especially if you also want to run stuff as Clojure. But I found it a bit hard to get into.

Purescript has, I think, some of the most interesting things going for it from a FP language, as its effects system paired with the very nice support for JS objects through Record means you can build effects systems like "this function reads from the DB" vs "this function writes to the DB", or "this function accesses a single user's data" vs "this function is multitenant". The FFI story is also very straightforward IMO.

ReScript feels close to Elm in that it's very focused on a straightforward usage of ML and isn't trying to be fancy. I haven't messed with it in a while but honestly OCaml is pretty straightforward and lets you easily fallback to simple imperative tricks in a way that Clojurescript and Purescript don't.

I think if you want to go full FP, Purescript has the most interesting stuff to bring to the table (and because it's not lazily evaluated the mental model is not hard). ReScript has the easiest onboarding IMO... and Clojurescript is good if you're into Clojure/lisp-y stuff in general. But they're all very distinct flavors and it's ultimately a bit of an aesthetic choice IMO

comment 3y ago · link · parent

A fun project would be to somehow use the Newton ROM and some emulation layer to get this stuff working on your tablet. Don't know how feasible it is

comment 3y ago · link · parent

One sort of point was a recent article going around showing that sulfur output from cargo ships was lowered recently, and this seems to have lead to a noticable increase in ocean temperatures along shipping routes. So the cut in sulfur lead to measurable changes less than a year into this change (and the change has seemed to be consistent). In peer review but if that holds this would probably have similar qualities.

comment 3y ago · link · parent

There was some stuff recently about reducing sulfur emissions from cargo ships. It sounds like this was done for health reasons.

Is there something about the stuff being recommended here that makes this not very nasty to just dump all over the ocean?

$350m/year sounds very cheap though. Just convince some billionaire to pay for this for the next 40 years?

comment 3y ago · link · parent

Why would you go to the middle of the American desert? There’s no magic in the ground (or maybe there is??)

comment 3y ago · link · parent

I am very glad to not have Rust end up along that path (I am sympathetic to the threading idea he mentioned though).

Rust as an alternative to C++ does, for me, involve all of the weird magical nonsense that you kind of need to get any of this working. The extreme use of generics to build out DSLs to get things working. General libraries being very hard to write, but still possible, to get alright ergonomics for usage itself. And yeah... the zero-cost abstraction thing.

I think Graydon-Rust would have also been very interesting, but it sounds unappealing to me, person who wants "C++ but nicer".

But to his point... saying "you could have much faster compile times" is very tempting! Just, especially when it's messing around with Rust "for fun", the ergonomics sound pretty unfun.

comment 3y ago · link · parent

Incorrect answers are not what moderators are moderating. A super easy way to make answers that look right even if they are wrong, for people trying to game SO's point system, is a perfect way for there to be just a huge amount of extra work for mods without ~any benefit.

There are definitely alternatives to the unilateral ban (Thinking about how, like, chess.com does bans based on people cheating), but saying "AI content is qualitatively no different" ignores the bigger ecosystem problem from having the average answer quality simply go down

comment 3y ago · link · parent

Most definitely

comment 3y ago · link · parent

I mean in that case there is nobody engaged in journalism! You choose what you cover, and who you interview, and how much you spend hemming on a source's claims, etc etc etc.

It's a lot easier to think about journalism as the result of human output that is indeed biased towards certain ideas, and to then read from various things, look into things yourself, or reading things from outlets that you believe have your interests at heart.

Expecting one group to collect all the info and present a pro/con list is gonna be very hard, but if you just check out a handful of outfit's coverage on something you might get a good enough picture to apply some judgement.

comment 3y ago · link · parent

I get what you're saying w/r/t CSRF. While every app could be different, in practice most websites do real bog-standard CSRF tokens, and I could see a user agent be able to get things working with like 95% of websites. Though I could think of many schemes to obfuscate things dynamically if you are motivated enough! But I like the idea of a user agent that is built around making it easier for you to just get "your" data in these ways.

> introduces no new holes - everything I ask for is already possible when running a native application.

A native application involves downloading a binary and installing it on your machine. Those involve a higher degree of trust than, say, clicking on a random URL. "I will read this person's blog" vs "I will download a binary to read this preson's blog" are acts with different trust requirements. At least for most people.

I suppose in a somewhat ironic way the iOS sandbox makes me feel more comfortable downloading random native apps but it probably really shouldn't! The OS is good about isolating cookie access for exactly the sort of things you're talking about (the prompt is like "this app wants to access your data for website.com)), but I should definitely be careful

comment 3y ago · link · parent

> Strange to see all the comments arguing that in fact the browser ought to be an Origin Agent

Funny

One universe I could see is the browser allowing a user to grant cross origin cookies when wanted. Though even then a site B that really doesn’t want this can stick CSRF tokens in the right spots and that just falls apart immediately

I imagine you understand the security questions at play here right? Since a user going to origin A might not know what other origins that origin A wants to reach out to.

CSRF mitigations mean that origins could still block things off even without CORS, but it’s an interesting thought experiment

1
565758
225