←back to thread

1208 points jamesberthoty | 6 comments | | HN request time: 1.336s | source | bottom
Show context
jbd0 ◴[] No.45260954[source]
I knew npm was a train wreck when I first used it years ago and it pulled in literally hundreds of dependencies for a simple app. I avoid anything that uses it like the plague.
replies(3): >>45260975 #>>45261085 #>>45261124 #
epolanski ◴[] No.45261124[source]
"I knew you weren't a great engineer the moment you started pulling dependencies for a simple app"

You realize my point right? People are taught to not reinvent the wheel at work (mostly for good reasons) so that's what they do, me and you included.

You ain't gonna be bothered to write html and manual manipulation, the people that will give you libraries to do so won't be bothered reimplementing parsers and file watchers, file watcher writers won't be bothered reimplementing file system utils, file system utils developers won't be bothered reimplementing structured cloning or event loops, etc, etc.

I myself just the other day had the task of converting HTML to markdown, because I don't remember whether it was Jira or Github APIs that returns comments as HTML and despite it being mostly few hours of work that would get us 90% there everybody was in favor of pulling a dependency to do so (with its own dependencies) and thus further exposing our application to those risks.

replies(1): >>45261333 #
komali2 ◴[] No.45261333[source]
Pause, you could write an HTML to markdown library in half a day? Like, 4 hours? Or 12? Either way damn
replies(1): >>45261344 #
epolanski ◴[] No.45261344[source]
One that gets me 90% there would take me few hours, one that gets me 99% there few months, which is why eventually people would rather pull a dependency.
replies(1): >>45261442 #
williamcotton ◴[] No.45261442[source]
Or about 15 minutes with an LLM?

https://github.com/williamcotton/markdown-to-html-llm

  ;)
replies(2): >>45261661 #>>45262461 #
1. epolanski ◴[] No.45262461[source]
I love how it took you very short to implement...the wrong thing.

> I myself just the other day had the task of converting HTML to markdown

> you could write an HTML to markdown library in half a day

replies(1): >>45262539 #
2. williamcotton ◴[] No.45262539[source]
LOL! Good point, my friend.
replies(1): >>45262940 #
3. williamcotton ◴[] No.45262940[source]
Claude Code just added support for HTML to Markdown. Seems to work?
replies(1): >>45263201 #
4. epolanski ◴[] No.45263201{3}[source]
In any case, not following the point you're trying to make.
replies(1): >>45263450 #
5. williamcotton ◴[] No.45263450{4}[source]
LLMs are pretty good at greenfield projects and especially if they are tasked with writing something with a lot of examples in the training data. This approach can be used to solve the problem of supply-chain attacks with the downside being that the code might not be as well written and feature complete as a third-party package.
replies(1): >>45265192 #
6. epolanski ◴[] No.45265192{5}[source]
I use LLMs too, but don't share your opinion fully.