Hacker News new | ask | show | jobs
by hei-lima 102 days ago
Great work! Might do it too in some other language...
2 comments

I got a convertion to Java. It worked (at least I think...) in the first try.

Then I want to convert this to my own programming language (which traspiles to C). I like those tiny projects very much!

how did you do the transliteration/port?
I asked ChatGPT to translate (the free version), pasting the source code. The resulting Java code came back a second later.
Zig, here.

Anything but Python

At least python can do this exercise without pulling 3rd party dependencies :)
What's missing from Zig and its std lib for this?
Zig version [0] doesn't need any external dependencies.

0. https://tangled.org/m17e.co/microgpt

Sweet! Presumably this one is even faster than the JS?