4 ms·
"Update: Wow, this got a second life! Seeing a spike in GitHub clones (328+ in 2 days). If anyone's trying G, I'd love to hear: What's your use case?
by pouyathe 8mo ago
"Update: Wow, this got a second life! Seeing a spike in GitHub clones (328+ in 2 days). If anyone's trying G, I'd love to hear:
What's your use case?
What's the biggest hurdle you faced?
What feature would make G actually useful for you?
Thanks for checking it out! — A 17yo student building this."
- snovymgodym 8mo agoNo offense, but the source code for this is wild. It's almost like outsider art. https://github.com/pouyathe/glang/blob/main/source/dub/source/app.d https://github.com/pouyathe/glang/blob/main/source/dub/sourc... Still, I have to respect the dedication it must have taken to get this working. I'm sure you'll go far. My advice to you would be to read Crafting Interpreters by Bob Nystrom (it's free online) and try to apply some of the techniques from it to your project. https://craftinginterpreters.com/ https://craftinginterpreters.com/
- its_magic 8mo agoEverything was going reasonably OK until I got down to that gigantic rat's nest of if-else statements and embedded for loops. OMG
- ternaryoperator 8mo agoYowza! Lines 1566-1637 consist entirely of closing braces. That's 70 closing braces in a row. Beyond the nightmare of maintenance, it's got to be a performance drag on the compilation.
- bw86 8mo agoAlmost lisp-like, isn't it?)))))))
- pouyathe 8mo ago"Outsider art" - that's one of the best descriptions I've heard! You're absolutely right. Thank you for the book recommendation. I've just downloaded "Crafting Interpreters" and will study it properly. I've been coding in isolation (due to circumstances I can't easily explain), so learning from established resources like this is exactly what I need. The messiness comes from years of solo experimentation without mentorship. I'm now committed to cleaning it up using proper techniques. I appreciate both the kind words and the tough love.
- zenethian 8mo agoOh, we’re talking to an llm. Gross.
- machiaweliczny 8mo agoMan this is art
- mndgs 8mo agoIt hurts my eyes to see spelling mistakes in error messages. I know English is not your first language, but, dude, in the age of autocorrect and AI, it is sloppy and screams incompetence. Not what you want anybody to see when using your interpreter. Otherwise, what a cluster*uck of a code this is.. I am amazed and appalled at the same time.