Posts tagged python
Advent of Code 2023 is starting on December 1. This will be my fourth year, after participating in 2022, 2021 and 2020.
My primary programming language is Racket, so I expect to code most of the solutions in it; however, the rest of my language stack includes Python, Javascript and C++, so I’ll code some of the solutions using them also.
Advent of Code 2022 will start on December 1. This will be my third year, after participating in 2021 and 2020.
I hope to have time to code all of the solutions in Racket, my favorite programming language, and I should be able to translate some of them into Python and/or Javascript as a learning exercise.
My primary goal is to create an elegant Racket solution for each day’s puzzle that is clear, commented and tested. For some of the days, I may also create variants that emphasize performance or conciseness.
One of Haskell’s features I really liked was list comprehensions. I created a comparison between Haskell and Julia list comprehensions almost exactly a year ago. It appears that Python list comprehensions are as nice as either Haskell’s or Julia’s! Although, having to use Python’s lambda
form to simulate the more concise Haskell/Julia function definition is less than ideal.
I’ve learned a number of programming languages since I began programming 25 years ago. Earlier in my career, my choice of which programming language to learn was largely driven by external factors such as a class or job requirement, or the expectation of job demand in the future.
I’ve been teaching my eldest daughter to program in Logo over the summer. Brian Harvey has posted PDF files for a set of excellent books on learning to program in Logo on his web site. The Berkeley version of Logo he’s produced is really excellent. It’s not just your typical turtle graphics language; it has arrays, macros, file processing, graphics, etc.