aoc/typed #1

Closed
bennn wants to merge 3 commits from typed into master
bennn commented 8 years ago (Migrated from github.com)

Hi Matthew B,

I tried converting your solutions to Typed Racket without changing a line of code. My plan was to find places where the type system couldn't follow a reasonable programmer's reasoning.

And indeed there were many such places. Sadly most were with for loops, so I just changed the code (best case: changing for/first to for/or). Also, using ann is always sad (e.g. day10). But there were a few places I could use trivial/regexp to macro-expand a use of regexp-match and convince TR that the groups would always capture.

Well, now you know these typed versions exist. Here's hoping that by the end of the summer the code in some of these can deviate less from the untyped versions.

Hi Matthew B, I tried converting your solutions to Typed Racket without changing a line of code. My plan was to find places where the type system couldn't follow a reasonable programmer's reasoning. And indeed there were many such places. Sadly most were with for loops, so I just changed the code (best case: changing `for/first` to `for/or`). Also, using `ann` is always sad (e.g. [day10](https://github.com/mbutterick/aoc-racket/compare/master...bennn:typed?expand=1#diff-df7d8c4873e3cc53f3cb84e3f6552ac0R12)). But there were a few places I could use [trivial/regexp](https://docs.racket-lang.org/trivial/index.html?q=trivial%2Fregexp#%28mod-path._trivial%2Fregexp%29) to macro-expand a use of `regexp-match` and convince TR that the groups would always capture. Well, now you know these typed versions exist. Here's hoping that by the end of the summer the code in some of these can deviate less from the untyped versions.
mbutterick commented 8 years ago (Migrated from github.com)

Santa's elves thank you.

Santa's elves thank you.
This repo is archived. You cannot comment on pull requests.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mbutterick/aoc-racket#1
Loading…
There is no content yet.