7 ms·
I just checked the 2nd place[^0] person and they... also have their own programming language...[^1] What's going on here? Are they just extra motivated to show
by culi 4y ago
I just checked the 2nd place[^0] person and they... also have their own programming language...[^1]
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 https://adventofcode.com/2022/leaderboard
[^1]: https://github.com/Vyxal/Vyxal https://github.com/Vyxal/Vyxal
[^2]: https://github.com/leijurv/Kitteh2 https://github.com/leijurv/Kitteh2
[^3]: https://github.com/nim-ka/nim https://github.com/nim-ka/nim
- matusp 4y agoI think it's quite common for competitive programmers and code golfers to have their own language, often inspired by APL. They often do not require any ecosystem as they are supposed to only solve puzzles, so it's really easy to develop them.
- 082349872349872 4y agoBack in the day, I would prototype in python and code in C. Maybe now I should try prototyping in an idiolectal golflang and coding in python?
- satvikpendem 4y agoSame thing as programmers making tools; if you know you have a defined set of inputs and outputs that you need to use over and over, it might make sense to write your own functions, methods, classes, macros and programs. Taking that one step further, it might then morph into a full blown custom programming language. Domain specific languages are after all fairly common in many domains.
- jonahx 4y agoSmall correction: hyper-neutrino is a code-golfer and user of Vyxal, but the creator of Vyxal is: https://github.com/Lyxal https://github.com/Lyxal
- culi 4y agoAh my mistake. Thanks for the correction. Though it looks like they've made some contributions
- emmanueloga_ 4y ago* Advent of code is about solving puzzles. * 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 :-)
- obilgic 4y agoThat means they got a plenty of free time for both the AoC and their language :)
- eddsh1994 4y agoI think the point of being on the top of the AoC is that they don't have spare time so have to do it in seconds :P
- deleted 4y ago[deleted]
- nim-ka 4y agohey that's me in 7th. that language you're looking at is a short lived project i made when i was 12 lol. it's actually the source of my username, i didn't name it after myself but the other way around. anyway yeah it's crap and barely turing complete and definitely NOT what i use for aoc by any stretch. > Is making your own programming language more common than I realized? yep it's just that
- redrobein 4y agoSome armchair philosophy here. I think languages are fundamentally related to how we think about, process, and express ideas. When you spend a lot of time doing something, you naturally come up with the words to express complex and abstract ideas, which lets you process information faster. These competitive programmers have the experience to realize certain syntax, patterns, common functions better helps them solve the problems they usually encounter, so they build these DSLs to serve that purpose.
- specialist 4y agoYes and: Reading someone else's code is akin to mind reading.
- fxtentacle 4y agoI think it's just very common. When I was in high school, I built my own C compiler just to learn how things work under the hood. 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.
- lanternfish 4y agoLeijurv isn't using Kitteh2 for AoC (YouTube videos indicate python). I think it was just a project.
- Double_a_92 4y agoBuilding a compiler is usually a part of Computer Science, so most people with a CS degree will technically have some own programming language (although probably a very limited and bad one).
- modernerd 4y agoAoC problems often benefit from knowledge of lexers, parsers, and other text processing gymnastics. 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: https://craftinginterpreters.com/ https://craftinginterpreters.com/ https://compilerbook.com/ https://compilerbook.com/
- sph 4y agoYou just need Lisp then, and you can have all your DSLs you want for the problem at hand, instead of writing a new tokenizer, lexer, parser, interpreter every time. ;-)
- modernerd 4y agoCoalton is a good option to explore if you fancy trying AoC with Lisp: https://github.com/coalton-lang/coalton https://github.com/coalton-lang/coalton
- trenchgun 4y agoI disagree
- sph 4y agoOK, you've convinced me.
- pierrebai 4y agoThe problem, as far as AoC is concerned, is that Lisp tend to produce lisp-like DSL, so won't match AoC specs. Then again AoC specs are simple enough that you can still get away with using Lisp. 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.
- 4y ago
- dmitriid 4y agoI think AoC isn't that far removed from code golfing, and a lot of people have custom languages for code golfing.
- protomolecule 4y ago"same with the 7th place[^3]. " No, that's not the Nim[0]. [0] https://github.com/nim-lang/Nim https://github.com/nim-lang/Nim
- xdavidliu 4y agowhat's with the carets [^0] instead of [0] in your citations?
- Retr0id 4y agoimplied superscript
- 082349872349872 4y agoso I was going to give you actual superscripts: ⁰¹²³⁴⁵⁶⁷⁸⁹ but (I guess for legacy reasons?) they display with uneven weights?
- Retr0id 4y agoEven weights on my machine, I guess the font at the top of your font stack has poor coverage of newer codepoints.
- culi 4y agoThe few examples of markdown systems I've come across that support references use the carrot. Including GitHub flavored markdown. It's also closer to how restructured text does it I actually haven't come across any markdown flavors that support references and don't use a carrot
- fjfaase 4y agoThis year, I also started to develop a language (with a simple syntax) from scratch (in C) to solve the puzzles. It is a lot of work. So, I quit after having solved three puzzles. I did it in a kind of literary programming style using MarkDownC (https://github.com/FransFaase/IParse/blob/master/README.md#markdownc https://github.com/FransFaase/IParse/blob/master/README.md#m...). You can see the page with the code at: https://github.com/FransFaase/AdventOfCode2022/blob/main/Language.md https://github.com/FransFaase/AdventOfCode2022/blob/main/Lan...
- Retr0id 4y agoMy theory: (Competitive) programming speed is largely a function of how intimately you know your chosen set of tools and standard libraries. Time spent reading docs is "wasted" time. 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.
- saagarjha 4y agoI use a custom Python preprocessor for Advent of Code (n.b. I don't come very close to winning). It definitely beats writing pure Python for me but given that I only use it once a year it's hard to keep all of it in my head. So YMMV, I guess. 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.
- modernerd 4y ago> 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… Any recommendations of who/where to watch? I’d love to see what their process looks like.
- mattgruskin 4y agohttps://youtube.com/@jonathanpaulson5053 https://youtube.com/@jonathanpaulson5053 is usually near the top of the leaderboard and takes time to explain his approach after each solve
- 4y ago
- z3t4 4y agoA language made to win hacking competitions prioritize speed and power as in solving a problem fast, rather then readability, debugging, performance, etc.
- abecedarius 4y agoI've done AoC using my own language before. As a task it's at a sweet spot for finding weaknesses in the language/library/implementation: real and varied enough to exercise your system, small chunks of work, lots of code to compare yours to, with fun and competitive juices. 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-of-code https://github.com/darius/cant/tree/master/examples/advent-o... (haven't done this year's so far)
- sudosysgen 4y agoBeing good at parsing is most of what you need to be a top AoC contender, so there's a strong connection there. On a sidenote, I've had a good time reformatting input as python expressions and using eval()
- johnfn 4y agoMaking your own programming language is not that hard. It's understandable to think that it is, because large, common languages have millions of lines of code and hundreds of thousands of commits authored over decades. But don't compare yourself to them - just making a scrappy language to fit your precise problem domain can be done in a couple of thousand lines of code and a couple of weeks. It's also super fun! (I've done it before...)
- hyper-neutrino 4y agoHey! hyper-neutrino here - I notice you've already clarified but yes, Vyxal is originally made by code-golf user Lyxal and not me; I've contributed minimally to it but I would definitely recommend checking it out as it's a great project and goes a lot more in-depth and is way more organized than what I've done :) hence why I've pinned it to my profile. 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. [^0]: https://github.com/hyper-neutrino/proton https://github.com/hyper-neutrino/proton