Better HN
topnewbestaskshowjobs
Log inSign up

rtpg

21,271 karma · joined Nov 23, 2012 (14y ago) · 6,737 submissions

real name: Raphael

blog: https://rtpg.co

email: raphael at above domain

Submissions

comment 9mo ago · link · parent

The thing you gotta make sure to do is basically return inside of switch statements. Typescript will gladly propagate a type that you think is never but is actually ThatOneCaseYouForgot if it's not ever used or referred to.

Every TS project I've worked on has an assertNever(val) thing specifically to check for this kinda stuff

comment 9mo ago · link · parent

useMemo is definitely a scourge on my existence. Doesn't help that a bunch of people write articles like "don't bother with it!!" when memoisation results can cause actual real bugs when integrating with a third party lib.

Unmounting and then remounting the same component is actually a bad thing when you lose your component state in the process. And when you have enough useEffect's in your system that's exactly what happens unless you're liberally sprinkling useMemo

comment 9mo ago · link · parent

I think there's a couple stories of people shipping some performant "webapp"-y stuff in Rust... but of course you can just compile those kinds of components and write the rest of your app in any other system

comment 9mo ago · link · parent

Kinda funny how this is true but there's a line of Mac OSes that can't connect to the App Store anymore so you can't upgrade the OS without manually downloading it off of an Apple help page.

It's not the end of the world, but I've had to help more than one person walk through this process cuz they're like "I can't update the OS????"

comment 9mo ago · link · parent

I just want a forge to be able to let me push up commits without making a fork. Do the smart thing for me, I don't need a fork of a project to send in my patch!

comment 9mo ago · link · parent

I really don't get this... like you're a code checkout away from just asking claude locally. I get that it is a bit more extra friction but "you should have an agent prompt on your forge's page" is a _huge_ costly ask!

I say this as someone who does browse the web view for repos a lot, so I get the niceness of browsing online... but even then sometimes I'm just checking out a repo cuz ripgrep locally works better.

comment 9mo ago · link · parent

Is there anything worthwhile in moving games at Gigo 3? Even back in the Sega era it felt like it was mostly those generic Taito cabinets running most things.

comment 9mo ago · link · parent

To anyone who has an opportunity I highly recommend taking any chance you get to try and play any of the bigger "moving" arcade machines like the AX Monster Ride shown in the video.

Even for really old stuff like Space Harrier the feeling of moving along with the screen gives you a more visceral experience than almost any VR setup. Hard to fake the effects of gravity!

[0] has a list (in japanese) of moving arcade machines. Mikado in Takadanobaba has some of these. These things are getting older and older of course so the window of opportunity is unfortunately shrinking as time goes on.

(EDIT: just realised that list itself is over 10 years old at this point so YMMV)

[0]: https://www.space-harrier.com/arcade.html

comment 9mo ago · link · parent

I mean the high level stuff is still there right? Be straightforward, leave the right kind of pointers into the thing, say the right kind of things.

But... I guess nowadays you can be vague and it'll get the gist of it.

comment 9mo ago · link · parent

Perhaps, but in Google's case that's, what, 10 years of value I got out of knowing how to write good searches? Probably more honestly.

Everything is temporary to some extent.

comment 9mo ago · link · parent

I do think that there's some meta-skills involved here that are useful, in the same way that some people have good "Google-fu". Some of it is portable, some of it isn't.

I think if you orient your experimentation right you can think of some good tactics that are helpful even when you're not using AI assistance. "Making this easier for the robot" can often align with "making this easier for the humans" as well. It's a decent forcing function

Though I agree with the sentiment. People who have been doing this for less than a year convinced that they have some permanent lead over everyone.

I think a lot about my years being self taught programming. Years spent spinning my wheels. I know people who after 3 months of a coding bootcamp were much further than me after like ... 6 years of me struggling through material.

comment 9mo ago · link · parent

> Objectivity is the default state of honest storytelling. If I ask what happened ? and somebody only tells the parts that suit an agenda, they have not informed me.

Already at the level of what stories are covered you have made choices about what's important or not.

Your newspaper not covering your neighbors lawsuit against the city against some issue because they find it to be "not important" is already a viewpoint-based choice

A newspaper presenting both sides on an issue (already simplifying on the "there are two sides to an issue" thing) is one thing. Do you also have to present expert commentary that says that one side is actually just entirely in bad faith? Do you write a story and then conclude "actually this doesn't matter" when that is the case?

There are plenty of descriptions that some people would describe as fair story telling and others would describe as a hit piece. Probably for any article on any controversial topic written in good faith you are likely able to find some people who would claim it's not.

I think it's important to acknowledge that even good faith journalism is filled with subjectivity. That doesn't mean one gives up, you just have to take into account the position of the people presenting information and roll with that.

comment 9mo ago · link · parent

Shrug, to be honest if you don't understand the value of sketching out certain problems it's probably because you're not working on anything particularly difficult.

comment 9mo ago · link · parent

> It mentions writing down in the notebook before writing code, but I can't test my notes, I can't really send my notes for code review.

I think generally it's more about sketching the high level structure of the code. I will routinely write things like :

  documents = ...
  by_client = documents.group_by(client)
  for client, doc_set in by_client:
     for doc in doc_set: csv.write(doc)

Not at all following the actual APIs I use, but I can fill in the blanks when getting the code in place.

The above is very simple, of course, usually I'm working through something where I just want to play through what pieces of data I might or might be missing

comment 9mo ago · link · parent

Highly recommend the Age of Napoleon podcast, which has some good long sections about military logistics on this point during its earlier episodes on Napoleon's early career. Really helps to visualize the nuts and bolts of moving a bunch of soldiers around even across relatively small distances.

comment 9mo ago · link · parent

The plastic bag is sold to businesses! If every supermarket in the world decided to never buy another plastic bag then they would no longer be produced!

There can be a futility to it all in that the “ideal option” simply isn’t produced of course.

I find boots theory is often a bit too convenient in this topic though. There is unlikely to be magic structural solutions that allow every part of your life to remain as convenient. At one point our lives will have to change in structure.

EDIT: to be extra clear, I think systemic coordinated changes is needed. I just think the “it’s the corporations doing this!” narrative to obscure the needs for reorganization of daily life on top of systemic change

comment 9mo ago · link · parent

While arguments can be made at the futility of individual action against a system action, it’s not like companies are making a bunch of product just to throw them in the trash. There are consumers of what is being produced!

Society’s choices and lifestyles are the cause of fossil fuel consumption, at a very high level. The plastic bag exists because it has users.

There are quantitative arguments against many silly consumer-focused initiatives. In aggregate tho companies aren’t burning fossil fuels for fun. Burning fossil fuels costs money, and a lot of people would rather not spend that money!!

comment 9mo ago · link · parent

>I don't think so, I think you're just getting a high end that isn't in the original audio. In the places where there are high frequencies the aliasing and the hiss just gets in the way.

I don't get this, are you saying that this aliasing is just an artifact of the emulation? Like the GBA speaker/headphone jack itself would also be affected by the same aliasing right? And in that case the song was composed for that, right?

I don't think it would be right to go as far as to say that there's a huge strong interplay in every single GBA title's song with the hardware (I'm sure some stuff was phoned in and only listened to by the composer in whatever MIDI DAW thing they were using) but at one point the GBA was the target right?

comment 9mo ago · link · parent

I disagree with the "just"-ness of setting up bugzilla + cgit... but I do wonder how far you could go with just being on literally any platform.

Obviously technically the same things are possible but I gotta imagine there's a bit less noise on projects hosted on other platforms

comment 9mo ago · link · parent

Oh yeah fair point, the HTTPS-ness of the first step is a helpful backstop

comment 9mo ago · link · parent

> Who would connect to unknown person's hotspot?

SSID "Sydney Airport Wifi" or the like.

comment 9mo ago · link · parent

This is super bad right? Like anybody who has this running will be vulnerable to a super basic HTTP redirect -> installer running on their machine attack, right? And on top of that it's for something that is likely installed on _so many_ machines, right?

I don't think I've ever seen something this exploitable that is so prevalent. Like couldn't you just sit in an airport and open up a wifi hotspot and almost immediately own anyone with ATI graphics?

comment 9mo ago · link · parent

In the Axiom Verge noclip documentary, the dev talks about how everyone is surprised about how he really made the whole game himself (except localization + marketing (and I imagine final testing but...)).

And he was like "people say 'even the music?' The music was the easiest part!!!'

It does make me feel like once you get into the right headspace and figure out how most of the tooling works all of this becomes quite smooth.

comment 9mo ago · link · parent

> in many cases, sometimes you just want (relative) simplicity, both in terms of complexity and deployment, and should use something like SQLite.

So many times when trying to just go for simplicity with SQLite it takes me like one working day until I run up against enough annoyances to where resolving those is more work than setting up the "set up and forget" postgres instance.

Granted, this is for personal stuff... but "Postgres packaged for low maintenance" is present in a lot of OS package managers! Even for smaller data analysis work SQLite perf leads _loads_ to be desired (once had QGIS struggling with a sqlite DB... pg made everything mostly instant. Indices etc... but stuff I _couldn't easily get with sqlite_)

If SQLite works for you that's great, I do think it's worth it for people to _try_ to do simple pg setups to understand just how painful it is to use pg (for me: not that high)

comment 9mo ago · link · parent

Counterpoint being that Slack, for example, for all its faults, does not have ads in its chats.

If Anthropic is positioned as "thing for professionals to do professional work" then I think you just avoid this issue entirely. Fee for service. OpenAI trying to be the thing everyone is using won't work in that model, though.

comment 9mo ago · link · parent

Though I think there's way less of this issue in Japan because there are a lot of gov't-involving procedures and record ownership in land ownership transfers making it quite hard to go all the way(and hey, even in the US you have title insurance), there was a bit of a wild case a couple years back where a fraudster sold a 5.5 billion yen piece of land to a major developer[0].

Fraud is always fun to look at because people are constantly looking for those little windows of trust that end up forming in these flows because otherwise everything would take months to execute upon.

[0]:https://mainichi.jp/english/articles/20181121/p2a/00m/0na/00...

comment 9mo ago · link · parent

YC companies are constantly spending the money they get from YC right? Why get money, then put it in some stablecoin, only to then immediately cash out on salaries or whatever?

How does that make any sense to the company? Who's out here wanting their salary in stablecoin? And who among those want that and can't receive dollars and then turn them into stablecoin?

There's a sliver of talent that won't have access to the US banking system, but I can't imagine that making it worth putting up with risk + txn costs of stablecoins for the whole company.

comment 10mo ago · link · parent

For me it's mostly about doing as much of CI locally as feels reasonable to do quickly to save an iteration cycle. But I live in a world of badly configured text editors and the like so I usually have some silly formatting error
1
121314
225