HNHacker News
TopNewBestAskShowJobs

erikpukinskis

14,676 karma · joined September 16, 2009

Personal web site: http://snowedin.net

Email: erik@snowedin.net

submissionscomments
erikpukinskis··on Anti-ageing protein injection boosts monkeys’ memories
I guess we have to accept that this perspective will be at the bottom of such threads.

But this is the conclusion I’ve come to as well. I used to fear death, now I fear wasting my life.

The more I learn about the natural world, the more I can see that death is a gift, a mechanism for renewal as well as for protecting things which have existed for millions of years.

Nothing I have in my brain is that special, compared to what the collective of life has created. I’m happy to give up living and become a more background part of what comes next. It’s an honor. And I hope I can honor it.

It’s very interesting to read this thread though and remember that so many people see death as a simple black line that might just as well be evaded as understood.

erikpukinskis··on Anti-ageing protein injection boosts monkeys’ memories
Great, so we can look forward to having presidents who are 200yo instead of 100yo?
erikpukinskis··on JavaScript Gom Jabbar
FWIW, I have a side project, confgen https://github.com/erikpukinskis/confgen, which tries to help with this.

Assuming it’s an app (and not a library) to get what you are describing you would run:

    npx confgen@latest @app vite dist:app typescript eslint prettier react
Unlike create-react-app the idea is you can keep running that command, adding other runtimes and presets, and it will keep working. That’s the sense in which it’s “idempotent”.

It’s somewhat opinionated (vite, react only) for now. But I’d be happy to see pull requests for other stacks so long as things don’t get too complex.

It’s also pre-1.0 but I’ve used it on dozens of projects and it’s somewhat stable.

erikpukinskis··on Is ORM still an anti-pattern?
I don’t think you can call Prisma a “query builder”…

It introduces its own global DSL for describing relationships between tables, and then you query that. So if you need a relationship for any query, it’s now present in the model for every query. That doesn’t feel like a query builder to me.

A query builder should still look like the SQL if you blur your eyes. Prisma does not.

erikpukinskis··on Initiative to connect all European capitals through a high-speed train network
This seems like an impossible claim to me. Surely it depends on many factors, off the top of my head:

- the occupancy of the trip

- the distance

- the number of stops

- the form of “last mile” transportation required

- the age and model of the vehicle

- the specific fuel source

I mean, I believe the statistic is true in aggregate. It’s like saying “vegan food has lower carbon emissions” which is true in aggregate. But wild game is often astronomically lower emissions (not to mention lower cruelty) than typical vegan food.

So these aggregate statistics are interesting points to ponder, but we don’t live in aggregate. We eat specific foods and we travel specific routes.

And at the individual level these statistics become... well not “mostly false” but certainly “frequently false”.

To me, the base statistic is a great starting point but the next questions we need to ask is: when are flights lower emission? When is hunting more humane? Etc. That’s how we can really drive better individual decisions. “Just ride the train and eat vegan” won’t get us to a globally sufficient decision framework.

erikpukinskis··on Titan sub CEO dismissed safety warnings as 'baseless cries', emails show
I wonder, if his ghost could talk to us now, I’d he would have done anything differently.

Maybe that seems like an absurd question to ask because... he’s dead. But his position seems to be: some things can never happen unless someone just risks it.

And that math doesn’t really change with the knowledge “he dies”. It’s possible there are some alternative timelines out there where “he risks it and survives” and maybe there are zero timelines where “he plays it safe and makes it to the Titanic” and if that’s the case then maybe he did it exactly as he intended.

There are many pursuits like this: mountaineering, car racing, etc, where the choices (at a certain level of aspiration anyway) are: A) risk death or B) don’t do it.

I’m certainly not risking death, but I don’t really judge people who do.

I do judge that dad who convinced his teenage son to risk his life. That was absolutely evil.

erikpukinskis··on Eating microwave popcorn increases the level of PFAS in body (2022)
A good blender works too.
erikpukinskis··on Eating microwave popcorn increases the level of PFAS in body (2022)
You can make ceramics harder than the hardest steel so staying sharp shouldn’t be a problem.
erikpukinskis··on Building a Slack/Discord alternative with Tauri/Rust
Every browser tab pretty much takes ~100mb. So IMO that’s a pretty reasonable amount for an app to take. 3x that seems fine.
erikpukinskis··on Cities turn to ‘extreme’ water recycling
This is a place where government needs to step in for this to work. They need to pay farmers rebates for doing this stuff: storing water in the landscape, recharging aquifers, limiting fertilizer discharge (pollution), improving soil quality, limiting erosion.

There’s no individual incentive to do those things, at least on a year-to-year basis which is how people make decisions. You think about this year, within the boundaries of your own property.

But the benefits are largely for the region, not the individual.

So, it need to be done by government, or it won’t be done at all (at scale).

Of course some small individual farms will do (and are doing) it on principle because it’s the right thing to do. But we can’t rely on ethics to drive behavior at the economic level.

erikpukinskis··on I made a smooth shadows generator
Yeah, you’re right that it doesn’t make sense if you think of the rectangle as a flat thing hovering above the background like a piece of paper.

But I think the intention is to simulate the rectangle being the top surface of a 3D box. If you shine a light at a cube on a desk, the shadows are very sharp right where the cube touches the desk, and then further away are softer.

I think that’s the effect they’re trying to achieve here?

So it’s not changing the gaussian for falloff, it’s changing the shape of the shadow, from a rectangle to a rhombus, and using different gaussians along the edges.

Here’s what it’s doing with the settings tweaked to make it more visible: https://imgur.com/a/NUXhHrn

erikpukinskis··on PostgreSQL reconsiders its process-based model
> there isn’t a whole ecosystem of packages that depend on access to a thread unsafe C API

They mentioned a similar issue for Postgres extensions, no?

> Haas, though, is not convinced that it would ever be possible to remove support for the process-based mode. Threads might not perform better for all use cases, or some important extensions may never gain support for running in threads.

erikpukinskis··on I don't need your query language
> You can aggregate the result of a subselect into a single column (the underling data doesn’t have to be stored as JSON, you can convert as part of the query)

For anyone (like me) who is not quite able to visualize this, here is an example:

    SELECT json_agg(trips)
    FROM (
        SELECT 
            json_agg(
                json_build_object(
                    'recorded_at', created_at, 
                    'latitude', latitude, 
                    'longitude', longitude
                )
            ) as trips
        FROM data_tracks
        GROUP by trip_log_id
    )s
From StackOverflow user S-man https://stackoverflow.com/a/53087015
erikpukinskis··on I don't need your query language
> But if that's the case, why are declarative languages not more popular?

Declarative programming is not very popular because it’s hard to debug. You can’t step through it and inspect intermediate representations. It presents a black box to the developer.

That said, they do seem to show up around certain very complex APIs sometimes.

Besides SQL, CSS is the obvious one.

And I think many parts of otherwise functional/imperative APIs are pseudo-declarative.

For example, React is famously functional in its current form, with render functions and hooks being functions… but then common hooks take a dependency array which is declarative. And at the boundary of these hooks the code is no longer procedural, it disappears into the framework.

> I wish databases have better, faster, and standardized support for a fast procedural language.

That’s a fascinating idea. It would take someone with deep knowledge of a query engine to encapsulate it with a procedural API instead of a declarative one.

That’s not me, but I would love to see it.

erikpukinskis··on Did Reddit just destroy mobile browser access?
I am a user of the official Reddit app, even though it sucks, and I just deleted it. As an “experiment”.

I’ll probably come back at some point, because I do like being in touch with some of the subreddits.

But I’ll see how Reddit-free life feels for a bit. I find it really offensive that they can have such a trash UX in their app and then shut down the other apps.

The Reddit UI has always felt really hostile, which is fine… I just chalk it up to incompetence. But shutting out people who are more competent just feels way off.

erikpukinskis··on Reddit permanently bans account of user advocating Lemmy migration
> We just want reddit without the bullshit.

What is the Reddit bullshit?

erikpukinskis··on Apple unveils new Mac Studio and brings Apple Silicon to Mac Pro
I still consider expert systems to be AI. Is there some reason why I should stop?
erikpukinskis··on Apple Vision Pro: Apple’s first spatial computer
Using a laptop on a flight is very uncomfortable for me. Just being able to push the keyboard to the back of the tray table and push the screen out into the row in front of me would be worth a lot to me.

Not $3500, but a lot.

erikpukinskis··on Conservative Americans are building a parallel economy?
I suspect this will be as successful as leftist brands are: Credo mobile, various hippie brands, etc.

I don’t buy the narrative that companies like Google are “leftist”… sure you can find stories about some progressive decision being made, but there are just as many regressive decisions being made (union busting, protecting sexual harassers in high levels, etc).

erikpukinskis··on Meta announces its Quest 3 VR headset
Wow, no eye tracking.

My prediction is that eye contact will be the “killer app” of VR. I keep waiting for someone to release an affordable headset that would let you make eye contact with your family/colleagues.

But here we are, 4 generations in and Meta isn’t doing it.

Kinda bizarre, but the future can wait I guess. Hopefully the Quest Pro will prove out the use case at least for the business market.

erikpukinskis··on WebAssembly is eating the database?
I feel like WASM gets a lot of attention from devs who are like “the web sucks, because JavaScript sucks. I won’t sully myself with such a childish programming language. If there was ever a way to build web apps without JavaScript and I could use [my preferred language] then web development would instantly become a joy and I would be happy doing it”.

Those people seem to get excited at the idea that you could build web apps with a “real compiler”.

But personally I just don’t buy that JavaScript is the reason web development is hard. I think it’s just the natural outcome of the fact that the capabilities of browsers are both varied and ever changing, and therefore the expectations of clients are always changing, and therefore the tooling to be able to (relatively) quickly meet those requirements is always changing.

But we’ll see. Maybe there will be some beautiful, stable web dev framework built on WASM that comes out!

erikpukinskis··on My Inventions – Nikola Tesla (1919)
I certainly do this with code. Sometimes I am working well at the computer, but sometimes I go walk in the woods for a few hours and go over architectures in my head, probing for details I might have missed that would change the design.
erikpukinskis··on Ditching TypeScript for JavaScript
> If you're working with the same data shouldn't its type have a single identity?

That's a good instinct, which is probably why people do it in TypeScript.

But, IMO this is not how TypeScript works best. When you write a function, you should fully type the data that you need for that function. This type is semantically tied to the implementation of the function: by writing out that type, you are "certifying" that that is the type that the function needs.

If you then go and use that type in another function, you've lost that "certification" in both places. You now have a type which is the union of the data structure needed by both functions.

This has two negative results:

1) There is no longer any point in the code where you are actually describing the specific contract requested by either function. And,

2) If you want to change Function A, you now have to spend 30 minutes reasoning out whether the contract required by Function B is still compatible with their shared type.

Result 2) is what causes the "I write the code and then I spend 2 hours making the types happy" issue that I was responding to.

Some side notes:

- I can't claim that this is the right approach for all typed languages. But the TypeScript compiler specifically is very happy to exchange one type for another as long as they're compatible. It is designed to handle "duck typing" like this at its core.

- I want to emphasize that syntactically it makes no difference whether you reuse types. And certainly it saves you keystrokes. The problem with reusing a type is you're omitting crucial semantic information about which "slice" of that type is needed for a function.

- I will accept that sometimes it's worthwhile to Pick<> some properties off of an object. But even this is usually avoidable.

erikpukinskis··on The Prime Video microservices to monolith story
Yah, I was confused by that too. Out of:

1) event-driven

2) procedural

3) functional

4) inheritance

I would say event-driven is tied for last as the hardest to reason about.

erikpukinskis··on Ditching TypeScript for JavaScript
That’s not my experience. I find in carefully typed projects I can do pretty large refactors with high confidence that once the types are correct again, a lot of tests will pass, and a lot of behavior will work.

It’s not that there aren’t bugs, but I have a high degree of confidence after fixing a small number of bugs that the overall system has a high degree of correctness.

There are several things that go into this

- good types

- good tests

- good interfaces between modules

All three I think give me a big jump in how quickly and confidently I can refactor.

erikpukinskis··on Ditching TypeScript for JavaScript
It’s definitely possible to create very brittle types that feel like a house of cards.

I think the most common mistake people make is re-using types. Even if a type works in two places, you can’t guarantee that the semantics in those places will stay consistent.

Devs working in TypeScript often think that in order to keep things DRY you should reuse the same types all over a codebase. For me it’s the opposite: using a type in two places is a code smell. You’re not really leaning on the compiler if you’re re-using types. The compiler loves to take two types and tell you if they’re compatible. Sharing the same type across use cases is just not necessary.

I find keeping types as local to a function as possible helps a LOT with alleviating that “house of cards” feeling you’re describing.

It’s a real problem though.

erikpukinskis··on PornHub blocks users in Utah, cites state’s age verification law
It’s based on IP addresses, not computers. There are “IP Geolocation” services that aggregate many different databases to try to guess where an IP address has be allocated physically. See https://whatismyipaddress.com/geolocation
erikpukinskis··on Datomic is Free
I suspect they don’t want to deal with pull requests from people they didn’t hire.
erikpukinskis··on Apple Pay’s long road to paying off is getting shorter
Imagined. No one is noticing how many seconds it takes you to pay. They notice if the cashier has to call a manager, or if you are using some coupon that doesn’t scan or something that interrupts the normal flow of a transaction. They’re not noticing that you’re taking 20 seconds to find a credit card or unlock your phone.
erikpukinskis··on Micro- and nanoplastics breach the blood–brain barrier in mice
> Glass and many other materials that can be nano-ized can do the same.

Isn’t that just clay?

← PreviousPage 5 of 34Next →