Hacker News new | ask | show | jobs
Show HN: Learning Rust by writing a Markdown to HTML compiler (andreadimatteo.com)
14 points by deotman 6 hours ago
Hi HN,

I'm new to Rust and, after half of `The Rust Programming Language` I decided to delve into a project I would actually use: a markdown to html compiler that actually serves my micro-blog (I started just right after publishing the project hehe). The project is intentionally small and one-file contained: I wanted to have the full picture in mind.

I'm open to comments, suggestions and PRs. If you asked me more convincing arguments to "why did you do it?" rather than "to learn Rust" I would respond with: LLMs are effectively a new type of web users today and will be more and more present in the future. Having a full, well formatted, .md interface of a website can make it easier for them to access the content.

2 comments

I think you have mixed up ordered and unordered lists? But a fun sounding project, good luck!
HTML is notoriously complicated to parse correctly.

* Is generating valid HTML documents as complicated/difficult?

* How much time did you spend on reading the HTML Standard?

* What resources did you use? MDN? The spec itself? LLMs?

- I think it's orders of magnitude easier, we have abandoned easy and semantically significative HTML years ago ~thanks~ to frameworks like React. I would say that fine-tuned LLMs are one feasible and fast approach to this problem.

- I'm using the subset of HTML useful for my scope, no more than 2-3 hours if you already know some HTML is enough.

- W3C is enough for a project of this size I suppose.