Today's #AdventOfCode is postponed until the evening, as it seems I have some fires to put off at work. Today I'm trying to use Chibi Scheme's parser combinators module to read the input, because it can no longer be read as a stream of plain Scheme values — which was great to avoid parsing. More later!
Nevertheless, I haven't yet finished the programs for day 3 of the #AdventOfCode but on my defense I can say that now I know how to use a language feature (record types) which so far I had not touched in other functional languages that I know (OCaml, some Haskell, and so).
Scheme feels like one *really* needs to master the standard library and the language conventions to really become fluent in it. Has somebody else had the same impression with #Lisp like languages?
@aperezdc All I remember was parentheses, lots of parentheses. And car, cdr. It was not my war! 😫
@KekunPlazas Surprisingly, the parentheses are kind of okay, and a good editor (Vim, Emacs... you name it) goes a long way to make that manageable. The car/cdr madness makes one wish for built-in syntax for destructuring, indeed!
@KekunPlazas On a related note, yesterday I discovered the “(chibi match)” module brings in structural pattern matching, and that saves *a lot* of car/cdr/cadr/etc. Example usage: https://github.com/aperezdc/aoc2018-scm/blob/7486ec9487e06347610d0f420958eaaa1ac1166c/day03#L46-L54
There's still plenty of parens, though... Which is inevitable in Lisp-y languages.
If I am understanding correctly, Chibi Scheme's “match” module should work with other implementations as well, docs here: http://snow-fort.org/s/gmail.com/alexshinn/chibi/match/0.7.3/
Server run by the main developers of the project It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!