Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bobholt/advent-of-code-2022
https://github.com/bobholt/advent-of-code-2022
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/bobholt/advent-of-code-2022
- Owner: bobholt
- License: agpl-3.0
- Created: 2022-11-30T14:36:34.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-13T01:08:24.000Z (almost 2 years ago)
- Last Synced: 2024-10-03T19:10:48.891Z (about 1 month ago)
- Language: TypeScript
- Size: 96.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Advent of Code 2022
Functional, strongly-typed (not gradually-typed) immutable typescript
version.## Requirements
- [Node](https://nodejs.org/en/) with NPM
- [Typescript](https://www.typescriptlang.org/)
- [ts-node](https://typestrong.org/ts-node/)## Usage
The Typescript files in the `src` directory will can be executed from the
command line if [ts-node](https://typestrong.org/ts-node/) is
npm-installed globally.My plan is to edit the day's file (`src/1.ts` for day 1), which should be
executable (`chmod 755 *.ts`), and execute it on the command line
(`./src/1.ts`).## Methodology
I'm planning on treating this as purely functional as I can get. JS-based
means that I won't be frustrated by syntax, and that I can implement
helper modules or functions as I go that will help me maintain functional
patterns without thinking too hard about it. A familiar syntax means that
I'll stick with it longer.## Testing
I'll figure that out. But since I can run files arbitrarily from the
command line and use my files as ES modules, I should be able to have a
`test` directory with a files corresponding to each src file that imports
that source file as a module, executes its functions and returns whether
or not the values match the expected. If I find myself creating a more
fully-featured test suite, I'll just import one.