Live data from Hacker News

Designing a programming language to speedrun Advent of Code

blog.vero.site

1–10 of 101 posts

Re: Designing a programming language to speedrun Advent of Code

#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 and functional languages that are written like this too.

Re: Designing a programming language to speedrun Advent of Code

#5
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…

I don't really even understand what is meant by "being able to write code from left to right without backtracking”, much less why that is bonkers. Scrolling down and seeing the code examples, the language even seems quite conventional, so I'm even more confused.

Re: Designing a programming language to speedrun Advent of Code

#6
post #5
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…

I don't really even understand what is meant by "being able to write code from left to right without backtracking”, much less why that is bonkers. Scrolling down and seeing the code examples, the language even seems quite conventional, so I'm even more confused.

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?

Re: Designing a programming language to speedrun Advent of Code

#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?

Re: Designing a programming language to speedrun Advent of Code

#8
post #5

Earlier quoted context omitted.

I don't really even understand what is meant by "being able to write code from left to right without backtracking”, much less why that is bonkers. Scrolling down and seeing the code examples, the language even seems quite conventional, so I'm even more confused.

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?

That's what it sounds like to me. Thinking about a line of code before writing it down, or knowing what the code will do instead of trial and error (which... is what I often do, lol)

Re: Designing a programming language to speedrun Advent of Code

#9
post #5

Earlier quoted context omitted.

I don't really even understand what is meant by "being able to write code from left to right without backtracking”, much less why that is bonkers. Scrolling down and seeing the code examples, the language even seems quite conventional, so I'm even more confused.

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("\n\n"))

map(sum, map(ints, puzzle_input.split("\n\n")))

max(map(sum, map(ints, puzzle_input.split("\n\n"))))

----------------------

Compare to this postfix syntax where you can write this incrementally as you think through the operations:

puzzle_input split "\n\n" map ints map sum then max

Re: Designing a programming language to speedrun Advent of Code

#10
post #5
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…

I don't really even understand what is meant by "being able to write code from left to right without backtracking”, much less why that is bonkers. Scrolling down and seeing the code examples, the language even seems quite conventional, so I'm even more confused.

[deleted]
Post reply on HN