6 ms·
For a lot of code, I switched to generating code rather than using 3rd party libraries. Things like PEG parsers, path finding algorithms, string sanitizers, dat
by invaliduser 6mo ago
For a lot of code, I switched to generating code rather than using 3rd party libraries.
Things like PEG parsers, path finding algorithms, string sanitizers, data type conversion, etc are very conveniently generated by LLMs. It's fast, reduces dependencies, and feels safer to me.
- troad 6mo agoAh, so you've traded the possibility of bad dependencies for certainty.
- raddan 6mo agoRemember, our objective function here is “feels safe.”
- invaliduser 6mo agoHow can you come to that conclusion, given the specific examples I have given, which are tedious to write, but easy to proof-read and test?
- deleted 6mo ago[deleted]
- deleted 6mo ago[deleted]
- senordevnyc 6mo agoBecause AI threatens the identity of many programmers.
- deleted 6mo ago[deleted]
- deleted 6mo ago[deleted]
- troad 6mo agoLol. My most recent comment before this one is here: https://news.ycombinator.com/item?id=47583593 https://news.ycombinator.com/item?id=47583593. You judge if AI threatens my identity. But hey, don't let the facts get in the way of a slick narrative.
- tzs 6mo agoOr find the best third party library and copy the code from a widely used version that has been out long enough to have been well tested into your source tree. The problem is not third party libraries. It is updating third party libraries when the version you have still works fine for your needs.
- estebank 6mo agoDon't do this. Use a package manager that let's you specify a specific version to pin against. Vendoring side steps most automated tooling that can warn you about vulnerabilities. Vendoring is a signal that your tooling is insufficient, 99% of the time.
- gjadi 6mo agoVendoring means you don't have to fetch the internet for every build, that you can work offline, that you're not at the mercy of the oh-so-close-99.999 availability, that it will keep on working in 10 years, and probably other advantages. If your tooling can pull a dependency from the internet, it could certainly check if more recent version from a vendored one is available.
- estebank 6mo agoIs there any package manager incapable of working offline?
- lelanthran 6mo ago> Is there any package manager incapable of working offline? I think you've identified the problem here: package management and package distribution are two different problems. Both tools have possibilities for exploits, but if they are separate tools then the surface area is smaller. I'm thinking that the package distribution tool maintains a local system cache of packages, using keys/webrings/whatever to verify provenance, while the package management tool allows pinning, minver/maxver, etc.
- 6mo ago