New Hampshire Crossing
  • FAQ
  • Login
  • Public

    • Public
    • Groups
    • Recent tags
    • Popular
    • Directory

Conversation:

Notices

  1. kat (boneidol)'s status on Tuesday, 16-Apr-2019 10:00:03 EDT kat kat
    Remote profile options...
    I've just done (part of) Advent of Code 2018 q9 in #Haskell.  My first attempt, I thought was elegant and readable, but consumed all RAM in the universe.  My second attempt, was more nuanced, throwing away all the things the solution did not rea…
    Tuesday, 16-Apr-2019 10:00:03 EDT from indy.im permalink

    Attachments

    1. boneidol-20190416-ostatus-l67c.html
    1. kat (boneidol)'s status on Tuesday, 16-Apr-2019 10:08:32 EDT kat kat
      Remote profile options...
      This is a nice explanation of the State Monad https://wiki.haskell.org/State_Monad #Haskell I've basically cut and paste the example more than once before to solve problems.
      Tuesday, 16-Apr-2019 10:08:32 EDT from indy.im permalink
    2. kat (boneidol)'s status on Wednesday, 17-Apr-2019 16:15:12 EDT kat kat
      Remote profile options...
      Ok, I made some changes, and it does the first part in a 0.1s now, and the second part in 7s.  However the code looks very much like an imperative language now.  There is a loop over a list inside which we do things, and use the State Monad to c…
      Wednesday, 17-Apr-2019 16:15:12 EDT from indy.im permalink

      Attachments

      1. boneidol-20190417-ostatus-bv27.html
      1. kat (boneidol)'s status on Wednesday, 17-Apr-2019 16:42:03 EDT kat kat
        Remote profile options...
        I suppose I should be pleased.   A execution time from 11min -> 0.1 sec 

        This functional programming malarky seems a bit dangerous.  Making everything stateless and recursive seems nice, but picking the correct data structures and choices makes a huge difference.
        Wednesday, 17-Apr-2019 16:42:03 EDT from indy.im permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • Privacy
  • Source
  • Version
  • Contact

New Hampshire Crossing is a GNU social hub. It runs version 1.1.3-beta3, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All New Hampshire Crossing content and data are available under the Creative Commons Attribution 3.0 license.

Switch to mobile site layout.