FParsec and Fsi
Geek, Eh Blog - Shane Charles
by
2y ago
I like exploring ideas and new libraries using the REPL (Read Evaluate Print Loop). There’s something about being able to get started quickly without having to plan out an entire project. I started looking at parser combinators. It’s been on my “to learn” list for some time now. I started with FParsec for .Net and hit a couple of snags getting things running with F# Interactive. The FParsec documentation has the solutions to these issues but I thought I would put them here so I can remember. Library Load Order Matters FParsec uses 2 libraries, FParsecCS.dll and FParsec.dll. Loading them up in ..read more
Visit website
Advent of Code 2017 Day 3 Part 2
Geek, Eh Blog - Shane Charles
by
2y ago
Advent of Code 2017 Day 3 part 2 was quite the gruelling exercise. We needed to locate the first memory value larger than the input we are given. The memory locations store an accumulative value (still spiralled) based on its existing neighbours. This is the example given. 147 142 133 122 59 304 5 4 2 57 330 10 1 1 54 351 11 23 25 26 362 747 806---> ... Location one still starts at 1. Location two only has one neighbour with a value of 1, so it get’s a value of 1. 1 1 Location three gets a value of 2 since it has neighbours one and two in which bo ..read more
Visit website
Advent of Code 2017 Day 3 Part 1
Geek, Eh Blog - Shane Charles
by
2y ago
Day 3 part 1 was about calculating the Manhattan Distance for a specific memory location to memory location 1. The memory blocks are stored in a spiralling out formation with the first block being in the middle of the grid. The memory blocks would look like this: 17 16 15 14 13 18 5 4 3 12 19 6 1 2 11 20 7 8 9 10 21 22 23---> ... I decided to try and figure out an equation for calculating the locations and distance instead of using the brute force method. (It wasn’t until later I learned about the squares in the bottom right hand corner… oops) Generating the Rin ..read more
Visit website

Follow Geek, Eh Blog - Shane Charles on FeedSpot

Continue with Google
Continue with Apple
OR