Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> If there isn't a package for something that I need (and, surprisingly often, there are packages for what I need, and excellent ones!), I find that I can just do it myself. Quickly.

(Serious question) With or without an LLM?



GPT 5 and Gemini 2.5 Pro are usually unable to write compiling Typst code, getting it confused with Markdown. Claude Opus 4.1 and Sonnet 4 manage to produce compiling Typst code more often than not, but is far from being able to follow instructions.

I assume there is just next to no Typst code on the internet as of their training and the similarities to MD + MathJax result in LLMs hallucinating Typst syntax, often using `#` for headings or `\` and `{ ... }` in math mode.

Therefore, I must say that LLMs are more of a hindrance than help when writing Typst code. The syntax is nice enough though that I can fully understand that writing something oneself is very simple once you understand the concepts (content as a type; `show:` vs `show [rule]:` vs `set`; control flows with `if`, `for`, `while`). And for any questions there is an active discord channel with helpful real people.


Presumably it works fairly well if you include a syntax cheatsheet and some example typst markup in the context you send to the LLM?


Without. I’ve recently tried using Claude, though, for things like mathematical drawings, and it works pretty well with a little back-and-forth and debugging. Especially with similar example code in context.


(not op)

I have had no luck with LLMs writing typst code. Normally its a better code writer than me, but the LLM (gpt4-o maybe?) hallucinated most of the document.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: