HN user

DominikPeters

2,154 karma

CS researcher in Paris (CNRS / Paris-Dauphine)

https://dominik-peters.de/

Posts9
Comments250
View on HN

Hi Henri, thanks for all your work on pgf, and congrats on the recent push on CI etc. The reason I think that GPL-3 would bite is that adding support would require more or less translating the pgfplots source to javascript, so that the app can parse and then correctly render the code, and that would definitely be a derived work. But I think the add-on route should be okay.

If people are curious, I've worked on this project since February 2026, relatively consistently. In that time, through Codex, I've used around 700M tokens for this project (not counting cache reads), which at API rates would have cost $15k (but I actually paid only around $500 in ChatGPT subscription fees).

The first part I implemented was the basic parser -> SVG renderer (restricted to the simplest TikZ constructs) and then put in a basic drag-and-drop interface to validate whether the architecture was promising. Code structure was decided pretty much entirely by Codex -- it asks my opinion with multiple choice questions during plan mode, which I like. I tend to alternate between feature expansion and code quality passes (e.g. making sure no files are too big, folder structure makes sense, test coverage is good, etc).

Indeed I have scripts for compiling a given tikz figure using latex (in particular dvisvgm so I get an SVG instead of a PDF) as well as my js-based renderer. I apply that script to various corpuses, mostly particular pages from the tikz manual (see https://tikz.dev), but there are also a few books about TikZ that have downloadable zips of all the examples they use. I then inspect the correspondence between the two renderers by eye and give Codex a list of which figures are wrong and why, and it then goes and fixes the underlying issues.

You'd think that finding discrepancies between the renderers could be done automatically, but it hasn't worked well in my experience. The models are multimodal but still kinda blind; they think two pictures are the same even if they are very much not the same. But once you tell them whats wrong, they're then pretty good at iterating until it is fixed. (One could also try to do a pixel diff of rasterized images, but that's super noisy, and text rendering isn't going to be pixel perfect anyway.)

Thanks, this is good feedback. I think the difficulty lies not so much in code generation, but determining what a user would expect. If I click the "align bottom" button, I would be surprised if

  \begin{tikzpicture}
    \draw (0,2) rectangle (1,1);
    \draw (1.5,2) rectangle (2.5,1);
  \end{tikzpicture}
suddenly were to get a new randomly named \coordinate and relative coordinate notation. On the other hand, if you start out with "nice" code, the app will in many cases refuse to let you drag things since it doesn't know (and in many cases can't know) what the drag should mean (do you change the named coordinate or change the offset to the coordinate etc).

Elsewhere in this discussion, we talked about positioning like "right of", and some good suggestions were made (https://news.ycombinator.com/item?id=48647683).

I don't use Typst myself and am not familiar with Cetz. From the docs it looks like it's in early stages of development, so it doesn't feel like the right time to do this to me (or at least should be a separate, perhaps forked, app). But certainly it would make sense to develop bidirectional converters that could in particular be used at file open and file save in this app.

Generally yes! It is permissively licensed. I originally considered writing this app as a VS Code extension (because most app ideas that include a source editor are more simply done as an extension) but then decided that I wanted to have more control over the source view.

An explanation for the name from the TikZ docs:

TikZ’s name is intended to warn people that TikZ is not a program that you can use to draw graphics with your mouse or tablet. Rather, it is more like a “graphics language”.

While making the app I was worried that I was going against the TikZ philosophy. Maybe I should have named it "TikZ ist doch ein Zeichenprogramm" (TideZ)..

It does support editing it if relative positioning is used in the code, i.e. if you drag the object it will continue being relatively positioned. But if you add new elements with the various tools, they will be absolutely positioned (not sure what would be a good UI for switching an element to relative positioning) unless you edit the source. You can try with

  \begin{tikzpicture}
    \node[draw] (A) at (0,0) {A};
    \node[draw, right of=A] (B) {B};
  \end{tikzpicture}

I think pgfplots should in principle be possible. I've postponed it thus far because pgfplots is GPL licensed, while the editor is MIT licensed, so I would need to distribute pgfplots support as a separate add-on. But in due course, putting in add-on infrastructure could make sense, because it would also allow adding support for stuff like tikzcd and CircuiTikZ (or tikzpingus!).

Intriguing thought. Of course by writing code it can be done

  \foreach \i in {1,...,5} {
    \node[circle, draw] (n\i) at ({90 - 72*(\i-1)}:1cm) {$\i$};
  }
but I'm not sure how to expose that as a UI in a nice way (maybe: if something uses polar coordinates and the user holds shift, then during drag the radius stays fixed, and I nudge towards even angular spacing + multiples of 15 degrees?)

The landing page (clearly to a large part written by LLM) does not mention that both KaTeX and mathjax can render to SVG in node. This wasm approach might still be lighter, but the advantage is not as clear as the page makes it seem. (It also contains LLM dishonesties like that the bundle size is 0 KB.)

This approach started with the “Ask a question about your code” feature, which is more comparable to single chat message with relatively predictable token usage. Now it’s an agent who might work for 30 minutes, read the whole codebase, and write 1000 lines

It's interesting that the API token cost of GPT-5.5 is double the cost of GPT-5.4, but Copilot charges a 7.5x multiplier and gates the model in premium plans. Clearly, they severely underpriced previous models like GPT-5.4 which they sell at $0.04 per request -- and these models can of course work for 30+ minutes in response to a single request and incur costs of several dollars.

Large cars impose heavy many negative externalities on people (take up more space, make it difficult to get through a narrow street when they park there, higher mortality when they drive into pedestrians or cyclists, reduce visibility for others, aesthetically offensive). Policy is slow to shift those costs onto the people causing the externalities but it is predictable that it will happen eventually.

Prism 6 months ago

Yeah I realized the parallel while I was writing my comment! I guess what I'm thinking is that a much better experience is available and there is no in-principle reason why overleaf and prism have to be so much worse, especially in the age of vibe-coding. Prism feels like the result of two days of Claude Code, when they should have invested at least five days.

Prism 6 months ago

This seems like a very basic overleaf alternative with few of its features, plus a shallow ChatGPT wrapper. Certainly can’t compete with using VS Code or TeXstudio locally, collaborating through GitHub, and getting AI assistance from Claude Code or Codex.

As an arXiv author who likes using complicated TeX constructions, the introduction of HTML conversion has increased my workload a lot trying to write fallback macros that render okay after conversion. The conversion is super slow and there is no way to faithfully simulate it locally. Still I think it's a great thing to do.

Given that the warming impacts of contrails are short-lived (roughly a day), I think it is a good idea to do research now on the weather forecasting needed to avoid producing contrails. But I don't really see a reason to actually start avoiding them now, with the associated costs in terms of fuel, CO2 emissions, and time. We can start avoiding them in a few decades when it might have become urgent to have cooling.