Joyride is en extension that lets you script VS Code like Emacs users script Emacs. Like with Emacs the scripting language is a LISP, making the programming fully interactive. The language is not ELisp, though. Instead something much nicer: Clojure. Or, something more familiar to some of you: JavaScript.
^ Demo using this starter template ^
In the demo I use Clojure for solving Day 1. But you can use JavaScript if you like. Take a look at .joyride/scripts/aoc2022_1_js.cljs and .joyride/src/aoc/day-1.jswhich form a scaffold for how to do this.
This is a template repository to make it quick and easy to get started using VS Code and Clojure to solve Advent of Code problems.
Two VS Code extensions:
Don't worry if you don't have a clue what nREPL is, I won't even link to it here. What ”you will have both a server and a client” means for you is that you don't need anything else to program in Clojure.
To use the utility for downloading your AOC problems input, you will need to login to your AOC account and make that session available to the Joyride scripts. The utility script assumes a file named .aoc-session
in the workspace root. This file should contain only the contents of the session
cookie from the browser's session. A way to get at this cookie is:
1
if it was the Day 1 problem page).aoc-session
In VS Code that is.
Depending on if you are going to solve the puzzle in Clojure or JavaScript
Then follow the instructions in the files.
See this presentation with demo about what Joyride is and can do:
All content in this repository is free to use as you see fit. At your own risk.
Please join the #joyride
channel on Clojurians Slack to get help, provide feedback, and share your solutions. You can also reach us in the Discussions section of the Joyride repository.