Recent submissions

Comment · 1 day ago
Just let it expire and then buy the same one as "new" on sale again! /s
Comment · 1 month ago
> And you cannot distribute an app as as HTML file.

  <script type="module">
    console.log('Hello World!')
    export const a = 5
  </script>
Inline module scripts work fine in HTML. You can't import this, but if you'd anyway need to do some "building" (at least doing some string concatenation as a build script) to get any JS baked into the HTML, so why not just concat the library and your own code to one module script in the HTML. Works fine.

I think it's good that folks are starting to end distributing prebuilt code in every possible format that somebody could ask for. Waste of disk space for most people.

ESM is how it's done now. If you don't like it, build it yourself to some other format.

Comment · 2 months ago
So, given that developers these days mix and match models anyway with harnesses like Pi, has anyone tried letting Claude or GPT do the coding, and Gemini do the comments and documentation? Maybe even asking it to "translate" Claude's output messages to better human language for the developer or subagents?
Comment · 2 months ago
I’m happy for the author, but I feel like that blog post kind of supports parent commenter’s argument. It sounds like Slug would’ve been created even if patents were not a thing. They had their own use case for it, and that usecase alone was enough for the R&D investment. So patents did not encourage innovation in this case. In e.g. medicine, not having patents could arguably mean that companies don’t do as much R&D.
Comment · 3 months ago
Simply hosting a front-end only app is almost free on several platforms (e.g. Cloudflare). Certainly less than the $99 Apple developer membership fee. It starts getting more expensive once you add back-end servers and databases and whatnot, but you’d be needing those with the App-approach too if your featureset requires that.
Comment · 3 months ago
What do you mean by runtime? The JavaScript runtimes, like V8? Yeah those are impressively fast for a dynamically typed ”scripting” language, but that has little to do with TS. TypeScript’s work ends at compilation.
Comment · 4 months ago
For me, the main benefit is deployment bundle/artifact size reduction. Mostly from dropping unneeded files from node_modules. Many packages include both esm and cjs builds, sources, docs, TS types, etc. stuff that you don’t need in prod. This matters for lambdas, for example, because deployed code size has limits there.
Comment · 5 months ago
It's an interesting discussion, but I think simply outputting text can make the software "malware", even if the output isn't executable. What if the output was

  To use jqwik, please login to your Office 365 account:
  http://o365login.phishing.xyz
Comment · 6 months ago
Reminds me of the back and forth competition between Node.js and io.js that we had to endure back in the day. Worked out for the best in the end.
Comment · 7 months ago
minimumReleaseAge and lockfiles also pin down transitive dependencies.
Comment · 7 months ago
Number 1 would only be a win for zero-installs if it happened that registry was up when you made the security hotfix, since you'd need to install the depdencency the first time to get it in VC, but then suddenly down when doing a deploy. Seems like a highly unlikely scenario to me. Also, cases where npm CVEs must be patched with such urgency or bad things will happen are luckily very rare, in my experience.

Most npm CVEs are stuff like DDoS vulnerabilities, and you should have mitigations for those in place for at the infra-level anyway (e.g. request timeouts, rate limits, etc), or you are pretty much guaranteed to be cooked sooner or later anyway. The really dangerous stuff like arbitrary command execution from a library that takes end user input is much much more rare. The most recent big one I remember is React2shell.

Number 2 hasn't been much of an issue for a long time. npm doesn't allow unpublishing package after 72 hours (apart from under certain rare conditions).

Don't know about number 3. Would feel to me that if you have something running that can modify lockfile, they can probably also modify the chekced-in tars.

I can see how zero-installs are useful under some specific constraints where you want to minimize dependencies to external services, e.g. when your CI runs under strict firewalls. But for most, nah, not worth it.

Comment · 7 months ago
> Run Yarn in zero-installs mode (or equivalent for your package manager). Every new or changed dependency gets checked in.

Idk, lockfiles provide almost as good protection without putting the binaries in git. At least with `--frozen-lockfile` option.

Comment · 7 months ago

  - saves infra costs 
  - saves infra headaches 
  - devs only need to be experts in one system (or well I guess one and a half, probably there's something to learn about ParadeDB too, but probably less than in learning Lucine) 
  - no need to worry about keeping data up to date in the separate seach system
  - all data is available when you want to do new queries that you handn't thought of when implementing the data transfer/indexing
Comment · 11 months ago
At TypeScript-level, I think simply disallowing them makes much more sense. You can already replace .push with .concat, .sort with .toSorted, etc. to get the non-mutating behavior so why complicate things.
Comment · 1 year ago
I don't have much experience in dedicated vector databases, I've only used pgvector, so pardon me if there's an obvious answer to this, but how do people do similarity search combined with other filters and pagination with separate vector DB? It's a pretty common use case at least in my circles.

For example, give me product listings that match the search term (by vector search), and are made by company X (copanies being a separate table). Sort by vector similarity of the search term and give me top 100?.

We have even largely moved away from ElasticSearch to Postgres where we can, because it's just so much easier to implement with new complex filters without needing to add those other tables' data to the index of e.g. "products" every time.

Edit: Ah I guess this is touched a bit in the article with "Pre- vs. Post-Filtering" - I guess you just do the same as with ElasticSearch, predict what you'll want to filter with, add all of that to metadata and keep it up to date.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton