Better HN
topnewbestaskshowjobs
Log inSign up

genshii

223 karma · joined Sep 30, 2022 (4y ago) · 50 submissions

Submissions

comment 1mo ago · link · parent

Glad to see Astro doing well here. It's by far my favorite way to build sites of all kinds, both content rich MPAs, and react heavy web apps.

comment 2mo ago · link · parent

What are you on about? You clearly don't like video games and think they're a waste of time, which is fine. Other people do like them and find them fulfilling for whatever reason, which is also fine.

Why are you trying so hard to "prove" that someone's hobby is a waste of time?

comment 3mo ago · link · parent

Maybe I just need to get over it, but this post reeks of Claude-isms and it immediately makes me stop caring about what the post has to say.

Obviously having an LLM write these kinds of things is the norm now, but what doesn't have to be the norm is the writing style. The way Claude (and other popular LLMs) write is so obnoxious and verbose. I think a simple pass of "make this more terse and to the point" would do wonders here.

comment 4mo ago · link · parent

Someone could come into this post and leave a comment saying they're a security researcher, that they audited the codebase, and include a summary of their findings. And that person could be lying.

I think saying that it contributes nothing because a) someone could do it themselves, b) the output might be slop, and/or c) they could be lying, is a bit silly. Those things apply to basically everything posted on the internet.

Whether an LLM security review is actually valuable is an entirely different discussion.

comment 4mo ago · link · parent

Astro is a meta-framework that allows you to plug in other web frameworks where you need it (React, Solid, etc). Although it would also be fair to consider Astro a sort of build tool / bundler.

Node is a runtime, not a framework.

So there's really only one framework here (Astro). Using other web frameworks within it is completely optional.

comment 4mo ago · link · parent

Just moved my astro project over to v7 and saterri the other day. Writing MDAST/HAST plugins is so much better/easier, so great job there :)

comment 5mo ago · link · parent

This is cool, but when the very first paragraph of the readme is clearly LLM generated, it makes me doubt the quality of the project.

8.

You (probably) don't need TLS_insecure_skip_verify(adamhl.dev ↗)

2 points · by genshii · 5mo ago · discuss

comment 6mo ago · link · parent

Not a bug, the post 'A HN post with negative points – how?' is a link to this post.

But yeah it's a bit confusing for one HN post to take you to another HN post.

comment 8mo ago · link · parent

I've been presented with this thought experiment before and I always feel like I'm missing something when other people talk about it. Why would you ever take both boxes?

The premise is that the predictor is always right. So whether you take one or both boxes, the predictor would have predicted that choice. We know from the setup that if the predictor said you would take the one box, it will have a million dollars. Therefore, if you take the one box it will have a million dollars in it (because whatever you choose is what the predictor predicted).

As an aside, I think whatever this says about free will or if you're actually making a "choice" is irrelevant in regards to if the million dollars is in the box. The way I see both choices is this:

You "decide" to take both boxes -> the perfect predictor predicted this -> the opaque box has zero dollars -> you get a thousand dollars

You "decide" to take the opaque (one) box -> the perfect predictor predicted this -> the opaque box has a million dollars -> you get a million dollars

If you want to consider the version of this where the predictor is almost perfect instead of truly perfect, I don't think that changes anything. Say it's 99% accurate or even 90% accurate.

You take the opaque box -> the predictor has a 90% chance of predicting this -> it follows that there's a 90% chance that the box has a million dollars -> you have a 90% chance of getting a million dollars

Had you picked both boxes, you have a 90% chance of not getting the million.

comment 10mo ago · link · parent

https://adamhl.dev

12.

Please stop building scroll-driven websites(adamhl.dev ↗)

9 points · by genshii · 10mo ago · 4 comments

comment 1y ago · link · parent

Hi Jarred, thanks for all your work on Bun.

I know that one thing you guys are working on or are at least aware of is the size of single-file executables. From a technical perspective, is there a path forward on this?

I'm not familiar with Bun's internals, but in order to get the size down, it seems like you'd have to somehow split up/modularize Bun itself and potentially JavaScriptCore as well (not sure how big the latter is). That way only the things that are actually being used by the bundled code are included in the executable.

Is this even possible? Is the difficulty on the Bun/Zig side of things, or JSC, or something else? Seems like a very interesting (and very difficult) technical problem.

comment 1y ago · link · parent

I used Proxmox for years to run a fairly comprehensive homelab, and a few months ago replaced the entire thing with Incus (on a debian host, haven't tried IncusOS yet). Incus is amazing and it makes so many things so much easier compared to Proxmox.

One thing in particular is permissions in unprivileged containers. In Proxmox, you have to do a bunch of somewhat confusing ID mapping. In Incus, it's as simple as setting "shift=true".

Also the profile system in Incus is really powerful and allowed me to deduplicate a ton of config.

comment 1y ago · link · parent

Maybe it's just too early in the morning for me, but I genuinely can't tell if this is satire or not.

comment 1y ago · link · parent

That's great to hear, thanks!

comment 1y ago · link · parent

I'm personally looking forward to this change because I currently pay $20/month just to get edit prediction. I use Claude Code in my terminal for everything else. I do wish I could just pay for edit prediction at an even lower price, but I can understand why that's not an option.

I'm curious if they have plans to improve edit prediction though. It's honestly kind of garbage compared to Cursor, and I don't think I'm being hyperbolic by calling it garbage. Most of the time it's suggestions aren't helpful, but the 10-20% of the time it is helpful is worth the cost of the subscription for me.

comment 1y ago · link · parent

There are plenty of larger ones and plenty of ones that used the date as the version, but I was mainly curious about packages that followed semver.

Any package version that didn't follow the x.y.z format was excluded, and any package that had less published versions than their largest version number was excluded (e.g. a package at version 1.123.0 should have at least 123 published versions)

comment 1y ago · link · parent

After double-checking some things, the real winner is actually: https://github.com/nice-registry/all-the-package-names

I made a fairly significant (dumb) mistake in the logic for extracting valid semver versions. I was doing a falsy check, so if any of major/minor/patch in the version was a 0, the whole package was ignored.

The post has been updated to reflect this.

comment 1y ago · link · parent

Ah this is cool, thanks!

comment 1y ago · link · parent

Hmm yeah, I decided that one counts because the new packages have (slightly) different content, although it might be the case that the changes are junk/pointless anyway.

22.

Which NPM package has the largest version number?(adamhl.dev ↗)

168 points · by genshii · 1y ago · 76 comments

comment 1y ago · link · parent

Hmm, maybe I need to think about this more, but since operations are a language feature (and could have any name, see custom operations), I don't think they could be attached to the filterql class like that.

You're right though, the naming of the `filter` method is confusing. I need to split off the filtering and applying of operations into two separate methods. And probably provide an additional `query` method like you said which would do what `filter` is doing now. Appreciate the feedback!

comment 1y ago · link · parent

Ah good idea, thanks. Gonna put that on the todo list :)

comment 1y ago · link · parent

I've been using it in a CLI tool [1] to query media in my *arr services.

If you're talking about a query where you want "foo" to not be "evil" OR "silly", you could write 'foo != evil || foo != silly'.

There's a separate case where the value itself is an array/collection/set, in which case doing anything with that is currently unsupported. Values can only be strings, numbers, or booleans.

[1] https://github.com/adamhl8/inspectarr

comment 1y ago · link · parent

I thought about doing exactly what you suggested, where a query could access deeper properties with a syntax like "model.cost", but ultimately decided against it because I didn't like the complexity that would necessitate.

As for arrays, I usually opt for joining the string and then doing an "includes" query. e.g. ["sm", "md", "lg"] -> "sm,md,lg" and then you could write a query like "size *= md". Obviously this approach has its disadvantages though.

I'm definitely open to rethinking both of these if that's a common enough want/need.

comment 1y ago · link · parent

Thanks! Glad my efforts there didn't go unnoticed :)

comment 1y ago · link · parent

Mainly because you might not always want to filter in-code. e.g. A CLI tool could take in a query as an argument, or a web app could allow a user to enter a query.

29.

Show HN: FilterQL – A tiny query language for filtering structured data(github.com ↗)

77 points · by genshii · 1y ago · 21 comments

comment 1y ago · link · parent

Fair, but I think the JavaScript ecosystem is unique in that the language is very separate from the thing that executes/compiles it. When you write Go, 99.9% of the time you're writing for the Go compiler.

When you write JavaScript (or TypeScript that gets transpiled), it's not as easy to assume the target is Node (V8). It could be Bun (JavaScriptCore), Deno, a browser, etc.

12