Advent of Code 2019 - Dyalog APL - Day 2

Поделиться
HTML-код
  • Опубликовано: 2 янв 2025

Комментарии • 1

  • @MogTM
    @MogTM 5 лет назад +1

    Thanks very much for posting these! Your screencasts are terrific and very educational-I'm looking forward to day 3.
    You asked whether viewers have any suggestions about topics to cover in future videos, and there is one area I'd like to learn more about in APL: trains. I've been slowly learning the basics of APL in the past few months, and there are a lot of materials at the just-getting-started level, but I know there are a lot more advanced features that I *could* be using, but haven't quite figured out. I think that trains are at the top of that list.
    In particular, I'd be interested in hearing more about the how to use the left and right tack operators (⊣ & ⊢). They've shown up a few times in these AoC videos, but I don't know that I fully understand how they work. For example, the idiom I've been using to split delimiter-separated text is `delimiter(≠⊆⊢)text`. I don't fully understand what the ⊢ function is doing there; it's described as "same" and the examples on tryapl.org make it look like it'd be equivalent to adding another copy of `text`. But I know it isn't… I'm clearly still missing something about how trains and tacks work.
    I'd also be interested in learning a bit more about the power operator (which you seem to be a big fan of). I'm not sure if that's exactly related to trains, but it feels similar somehow.
    My day 2 solution is at gist.github.com/codesections/0579ee8377784826644d18d19c2f0bbf I'd be very interested in any thoughts or suggestions you might have. My version isn't as concise as your solution-in part because I don't fully understand your code yet!-but it does stick to slightly more pure functions and has a little error handling.
    Finally, what is the best way to reach you/comment on this series? I'd normally send an email (and normally *wouldn't* write RUclips comments) but I didn't see your email listed. But I'm happy to comment here or wherever is convenient. Looking forward to day 3!