by culi · 3y ago · 0 comments
What's going on here? Are they just extra motivated to show off their languages? Is making your own programming language more common than I realized?
EDIT: same with the 4th place person[^2]
EDIT2: same with the 7th place[^3]. Btw this is the 4th person that's clickable so actually 3/4 leaders with their GHs linked have their own programming languages
EDIT3: jonahx pointed out I made a mistake and the 2nd place person didn't actually create Vyxal, just used (and contributed) to it
[^0]: https://adventofcode.com/2022/leaderboard
[^1]: https://github.com/Vyxal/Vyxal
People who’ve made compilers and interpreters are both attracted to the problem solving element of AoC and good at solving those problems.
Beyond that, making your own compiler or language is fun — more people should try it.
These are great starting points:
Obviously, the OP targeted their language for AoC because, come on, whoever would want to have the ability to swap the precedence and meaning of operators? That would be a fresh hell that would make early-90s abuse of operator overloading in C++ seem like a joyful time.
I still had to restart the REPLs from time to time! I came to the conclusion I enjoy more a language with near 0 startup time as opposed to live environments. Extremely loose typing is not a good compromise for me... but I also came to dislike the "straight jacket" of extremely strict types systems (like Haskell's and friends!).
I think these days Golang is a good compromise between practicality and safety. It's fast, cross platform, it now supports generics (since 1.18) and it is overall OK to work with. I feel it falls in an OK sweetspot of features.
depends what you do, but many Lisp-based live environments have a near 0 startup time in a terminal. Try SBCL (a version of Common Lisp providing fast native compilation, incremental and batch) for example. SBCL also saves all memory (on demand) and can restart it, so one is in the same environment in milliseconds.
> Is making your own programming language more common than I realized?
yep it's just that
I'd assume that it's similar for others in that their programming languages aren't up to date or practically usable, but more like cool side-effects of their learning journey.
* Making a programming language is like solving a puzzle.
* People that like solving puzzles like puzzles of all kinds, so the likelihood of a top advent of code solver to also have worked in the "puzzle" of making a programming language is big.
Feels pretty logical to me :-)
The first time I did it it forced me to fix some major problems. My language would still be a handicap for me now, albeit a comfy one.
fwiw: https://github.com/darius/cant/tree/master/examples/advent-o... (haven't done this year's so far)
I do have my own programming languages though; my best one so far is proton[^0] though it's pretty buggy because I wrote it in high school before I took the uni-level CS classes that taught things like language design and how to make actual parsers.
No, that's not the Nim[0].
If you've written your own language, assuming it's a decent one, then:
a) It has all the tools you need to be productive.
b) You know exactly how it works and what the APIs are (assuming the implementation details are still fresh in your memory).
c) The features are tailored to exactly how you like to use them, personally.
IMO, high-speed competitive programming is part knowing your tools well, but also a lot about coming up with abstractions on the fly very quickly. If you watch the top Advent of Code solvers they'll carve up the problem in seconds, and they're really good at picking just the right amount of complexity for the problem at hand and not investing any more than that. Coupling that with a touch of cleverness ("let's eval the input", "who needs a tree when I can shove everything into a dictionary") and a very low error rate (I would hit the leaderboard but almost always lose a significant time to debugging…) and they come out on top.
Any recommendations of who/where to watch? I’d love to see what their process looks like.
Python is a very popular language to use in AoC. My theory: If Guido van Rossum were competing, he would not be on the leaderboard at this point.
He certainly knows Python much better than everyone using Python who is currently on the leaderboard.
He wouldn't be on the leaderboard because "knowing your tools and standard libraries" is only a small component of what makes you good at competitive programming.
On a sidenote, I've had a good time reformatting input as python expressions and using eval()
I actually haven't come across any markdown flavors that support references and don't use a carrot