3 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 8mo 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 8mo agoAh, so you've traded the possibility of bad dependencies for certainty.
- raddan 8mo agoRemember, our objective function here is “feels safe.”
- invaliduser 8mo 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 7mo ago[deleted]
- deleted 7mo ago[deleted]
- senordevnyc 7mo agoBecause AI threatens the identity of many programmers.
- deleted 7mo ago[deleted]
- deleted 7mo ago[deleted]
- troad 7mo 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 8mo 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 7mo 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 7mo 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 7mo agoIs there any package manager incapable of working offline?
- lelanthran 7mo 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.
- 7mo ago