by lordnacho · 2y ago · 0 comments
One of the key skills of a a senior dev is to be able to judge the tradeoff between rolling your own and borrowing someone else's. In your life as a dev you'll be making this choice all the time. The pros and cons are generic: time spent, potential bugs, security, free upgrades, specific vs general solutions, external reliance, and so on. But you will exercise this judgement constantly.
Also not being a LISP guy, is it really so common to roll your own everything? Would you write your own JSON parser, is it that easy in LISP?
The latest video I've found about it, and Kris' interviews are usually great: https://www.youtube.com/watch?v=fytGL8vzGeQ
That said, Lisp developers learn to fight their instinct and not redefine the language all the time, just as Haskell developers learn to fight their instinct and not make complex types all the time, and C++ developers learn to fight their instinct and not use STL all the time. But those take some experience.
No, that's more of a Haskell thing to do (you start with your own parser combinator, of course).
Common lispers write their own testing framework - I guess that's Peter Seibel's fault ;)
https://sabracrolleton.github.io/testing-framework
https://gigamonkeys.com/book/practical-building-a-unit-test-...
I only dally with Lisp(s) but probably not, I'd reach for a library in quicklisp.
However, in Janet (https://janet-lang.org/) there's a PEG parser and I wrote a JSON parser for fun in 134 lines that passes most of the test suite by Nicolas Seriot.
So I'd say it's reasonably easy for a better-skilled programmer than I am.
Well, there are a lot of them. Here's a link to a guide someone wrote to compare a bunch of them: https://sabracrolleton.github.io/json-review.html
Ironically this blog post isn’t even targeted at developers but more management types, but it wouldn’t be life without being spectacularly wrong on HN and raked over the coals on it. In short though I agree it’s not like you can just use off the shelf for everything or that that is even a good idea to try as that has its own set of problems.
As someone who has dabbled in lisp: IME, everything is easier - enough so that I more-often _consider_ inventing something that solves my subset of the problem.
I suspect this contributes to the poor library availability situation (I understand that's improved markedly in recent years, but still).