Giter VIP home page Giter VIP logo

advent-of-code-2022's Introduction

I am doing Advent of Code 2022. (I also did 2021)

I am also learning Haskell.

And I am again coding on Windows with Sublime Text 4 and GitSavvy.

Learnings

  • Oh boy Haskell is going to be a learning curve. Day 1 probably took me an hour to wrap my head around.
  • Haskell tried to get a little too cute with operators. The fact that you've got things like . and $ and \ are understandable, but !! to index a list? I have some dignity.
  • Things I need to learn instead of just trying permutations until they work:
    1. What's IO? Why do IO functions need to be use with <- instead of let? Is this related to do/return?
    2. . and $ seem to be useful in getting rid of ()s but not always. Are there better ways to do paren-heavy nested calls than the way I'm doing them?
    3. Why are tuples so useless? (Especially with more than 2 elements?)
    4. Should I be creating objects to make code like day 5 a little more scrutable?
  • Objects have annoying boilerplate no matter how I do them (with or without named properties). I prefer neither.
  • The ... where ... syntax is pretty useful, I should use that more.

Days of note

  • Day 8 was the first really challenging day. My first solution for part 1 was O(n^2) (or maybe worse?) and then part 2 made that infeasible. As of the 9th I still need to go back and redo part 2.
  • I struggled with day 12 for a while. Functional programming really forces you to think about problems like this in terms of transformations. I had to wrap my head around what would turn a "step" in the solution into the next "step", and then kinda work from there.
  • Around a middle of the month, I acknowledged I was not having as much fun as I wanted, so I've started doing only the days that I feel like doing. It's a tiny failure, but this isn't a job, it's for fun.

advent-of-code-2022's People

Contributors

plutor avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.