Live data from Hacker News

Designing a programming language to speedrun Advent of Code

blog.vero.site

41–50 of 101 posts

Re: Designing a programming language to speedrun Advent of Code

#41
post #7

> I solve and write a lot of puzzlehunts, and I wanted a better programming language to use to search word lists for words satisfying unusual constraints, such as, “Find all ten-letter words that contain each of the letters A, B, and C exactly once and that have the ninth letter K.” So... Perl?

W in Wordlist, length(W,10), maplist(\L^memberchk(L,W),[a,b,c]), nth(10,W,k).

I think memberchk will do one check for each letter (not checking the rest of the list and leaving no choice point) rather than checking each letter is present only once.

Re: Designing a programming language to speedrun Advent of Code

#42
post #3

> Before we move on, I want to point out that “being able to write code from left to right without backtracking” is a completely bonkers thing to optimize a programming language for. This should not be anywhere in the top hundred priorities for any “serious programming language”! There are plenty of serious languages that are written this way. Most noticeably are shell scripting languages but I’ve seen stack based an…

The syntax reads similar to R with pipes

Re: Designing a programming language to speedrun Advent of Code

#43
post #18

I didn't realize who this was by the title, but this is betaveros, the guy who won 1st place in Advent of Code every single year since 2019: https://clist.by/account/32289/resource/adventofcode.com/

Including in 2022 with the self-created programming language the post is about, which is just amazing, and lives somewhere in my head near FlaSh's 2020 decision to switch to playing pro StarCraft Brood War tournaments as the Random race -- requiring him to become world-class at three races (nine race matchups) while his opponents only have to be world-class at one race (three race matchups). FlaSh came third in the largest tournament that year.

From the post:

> I think I predicted that requiring myself to use only Noulith on Advent of Code would make my median leaderboard performance better but my worst-case and average performances significantly worse. I don’t think my median performance improved, but my worst-case performance definitely got worse. Somehow it still didn’t matter and I placed top of the leaderboard anyway. (I will note that 2021’s second to fourth place all didn’t do 2022.)

Re: Designing a programming language to speedrun Advent of Code

#44
post #18

I didn't realize who this was by the title, but this is betaveros, the guy who won 1st place in Advent of Code every single year since 2019: https://clist.by/account/32289/resource/adventofcode.com/

Including in 2022 with the self-created programming language the post is about, which is just amazing, and lives somewhere in my head near FlaSh's 2020 decision to switch to playing pro StarCraft Brood War tournaments as the Random race -- requiring him to become world-class at three races (nine race matchups) while his opponents only have to be world-class at one race (three race matchups). FlaSh came third in the l…

It seems crazy that 2nd to 4th in 2021 didn't do 2022 at all! It's an annual ritual for me, I couldn't imagine being so heavily into it one year and then not competing at all the next. Was there a reason?

Re: Designing a programming language to speedrun Advent of Code

#45

Earlier quoted context omitted.

Including in 2022 with the self-created programming language the post is about, which is just amazing, and lives somewhere in my head near FlaSh's 2020 decision to switch to playing pro StarCraft Brood War tournaments as the Random race -- requiring him to become world-class at three races (nine race matchups) while his opponents only have to be world-class at one race (three race matchups). FlaSh came third in the l…

It seems crazy that 2nd to 4th in 2021 didn't do 2022 at all! It's an annual ritual for me, I couldn't imagine being so heavily into it one year and then not competing at all the next. Was there a reason?

I heard something about a large competitive programming tournament (i.e. a commercial one) happening at a nearby time to AoC, I think it was that for at least one person.

(I also don't think it's unimaginable; lives change, everyone's going to have a point where they played one year and not the next, most obviously illness, but also life changes like marriage, kids, stressful new job, etc?)

Re: Designing a programming language to speedrun Advent of Code

#46

Earlier quoted context omitted.

It seems crazy that 2nd to 4th in 2021 didn't do 2022 at all! It's an annual ritual for me, I couldn't imagine being so heavily into it one year and then not competing at all the next. Was there a reason?

I heard something about a large competitive programming tournament (i.e. a commercial one) happening at a nearby time to AoC, I think it was that for at least one person. (I also don't think it's unimaginable; lives change, everyone's going to have a point where they played one year and not the next, most obviously illness, but also life changes like marriage, kids, stressful new job, etc?)

All it takes is someone convincing you to take a travel vacation around Christmas so that you are too busy to be competitive. (And maybe you don’t bother to play if you can’t be competitive at it.) Nothing LIVES CHANGE sized has to be the case...

Re: Designing a programming language to speedrun Advent of Code

#47

Earlier quoted context omitted.

Isn't that a whole lot more "being able to write code without making a lot of dumb mistakes", which is a feature of the programer. So it boils down to getting gud and practice?

The post gives an example of how python doesn't have this feature in the section [ https://blog.vero.site/post/noulith#coding-with-and-without-... ] Python fails this criteria because if you type as you think through the process, you have to move the cursor to the beginning to prefix the 'map' around the input. For example this series of transforming the input: puzzle_input.split("\n\n") map(ints, puzzle_input.split(…

after a while, my brain reorganized and i think of the map() first, before thinking about the content of the map, basically to avoid the keystrokes required to go to beginning of line, then back to where I was typing.

Re: Designing a programming language to speedrun Advent of Code

#48

Earlier quoted context omitted.

W in Wordlist, length(W,10), maplist(\L^memberchk(L,W),[a,b,c]), nth(10,W,k).

I think memberchk will do one check for each letter (not checking the rest of the list and leaving no choice point) rather than checking each letter is present only once.

Oh, yeah, my brain skipped over that part of the constraint. Does ruin the simplicity a bit.

  (findall(C,member(L,W),S),length(S,1))

Re: Designing a programming language to speedrun Advent of Code

#50

Earlier quoted context omitted.

Including in 2022 with the self-created programming language the post is about, which is just amazing, and lives somewhere in my head near FlaSh's 2020 decision to switch to playing pro StarCraft Brood War tournaments as the Random race -- requiring him to become world-class at three races (nine race matchups) while his opponents only have to be world-class at one race (three race matchups). FlaSh came third in the l…

It seems crazy that 2nd to 4th in 2021 didn't do 2022 at all! It's an annual ritual for me, I couldn't imagine being so heavily into it one year and then not competing at all the next. Was there a reason?

"I don't know what his total will be when he's finished because life gets in the way. Things happen."

One great golf on another younger great golfer that might catch up to him.

Post reply on HN