r/typst • u/FortranMan2718 • 5d ago
Yet Another Vibe Coded Editor
So, like many readers here, I find myself tiring of the endless "I did the thing" posts about creating a new editor. Often these editors implement already available features, or the author is evasive about their use of AI. I though I would share my experience that has recently resulted in the creation of another Typst editor.
I teach engineering at a public university, and our legal team has decided that all course documents must pass all the accessibility standards due to changes in the interpretation of the ADA. I don't want this discussion to dwell on this, but the reality is that I am obligated to make all my class documents compliant. At the time I was working in LaTeX (not directly; we'll get back to that), and realized that I had a pretty big problem on my hands. After taking inventory of all the packages I used at the time, I realized that it would be easier to move my documents from LaTeX to Typst for compliance than to start over on the formatting. Typst itself has been wonderful, and I continue to enjoy it as a document building tool.
Editing the documents in the Kate editor with Tinymist as the LSP has been good. No major complaints. I've managed to get my files converted and fully compliant (at least to the standards I'm held to). Only recently, I found myself creating a large new file instead of converting existing documents. It was at this point that I started to wish for LyX again. It makes writing LaTeX much more like writing than coding, and for this task I prefer that interface. It is not a word processor, nor is it a code editor. LyX is something else, and I felt its absence sorely.
Enter the AI... As an engineering instructor, I'm expected to teach my students how to use AI (really just LLMs and other generative AI tools) both responsibly and productively. Since it wasn't exactly part of my education, I need to gain experience. I also have a school account with OpenAI to use ChatGPT (and Copilot too, but I have found it far less useful). My request started simply enough: build an editor based on the text widget from Tkinter in Python to directly edit Typst files. After that, I incrementally guided the creation of a tool that is legitimately useful to me. The LLM is really dumb, and I have repeatedly been forced to take a direct guidance role with it in development. The alternative is no specialized editor, since I certainly don't have time to do this myself, even if I do have the knowledge and programming skills.
I have no plans to share this editor. There is no github page. I don't expect this to be used by more than myself and one other colleague, and that is actually the most interesting aspect of this whole experience to me. Is the code good? I don't think so. Does it work well enough to be useful to me and speed up my work? Absolutely.
As it stands, TyX is a pretty useful and limited LyX clone for Typst. Unlike LyX, TyX uses raw Typst code, since I always thought LyX was a little too distinct from the LaTeX engine it used. It can edit files and partially render the interesting bits (figures, tables, equations, and any command you put in a list). I don't expect to convince anybody. I pretty sure the only thing I want out of this is to start a discussion on an interesting experience I've had.




11
u/Silly-Freak 5d ago
This reminds me of one of my classes where we learned Smalltalk, and the professor told us about how a part of the Smalltalk philosophy was "personal computing", as in, you can tinker with the system and tweaking the running applications to your personal needs is intended.
AI generated code, unless you put a whole lot of energy into making it maintainable both as a codebase and an ongoing project, is more for personal use. Maybe once the hype has ebbed more people will simply use the tools they create themselves instead of expecting others will want exactly the same tools as they want.
(Not saying that this is ideal in terms of energy usage and overall expenditure of effort, but it has merit in the same way as the Smalltalk version of personal computing had)
4
u/iam-abdullah-al-azmi 5d ago
looks fantastic and amazing! the gui looks pretty to me due to its neatness and cleanliness.
6
u/MoreDimension5963 4d ago
Man as a CS student I've made so many little personal programs where I'd be utterly embarrassed if any of my classmates there to peek at the code, yet they are just genuinely useful.
5
u/RafaeL_137 4d ago
Plus points for the self-awareness
1
u/krtekz 4d ago
Can you share it?
4
u/osfric 5d ago
Quite like the way this looks