littlelogs

Keep a social journal of your work progress as you make and learn things.

#OCaml

March 2017

josh
josh

Wrote some more #go today as I start to build my parser for a higher-level language built on Go. I’m thinking (but don’t hold me to this) that I’m going to copy Reason’s syntax as much as possible. #Ocaml but with a more C-like syntax should work well if I can make all the concepts work in Go.

Anyway, I made more progress this time, thanks to reading some examples grammars, so I feel like I’m slowly getting a handle on PEGs. So far I’m just building up the various types of literals, then I’ll start working on more complicated stuff like assignment statements and so on.

December 2015

BlueHat
BlueHat

At the moment I’m trying to learn more about #Ruby and #RubyOnRails, start learning #FSharp, working on an app for #vintus, covering a lot of decision mathematics again because maths is hella important and learning about startups. I’m finding myself struggling to split my time effectively between all of them and so I think I’m going to have to cut F# for a while sadly. I really adore functional programming and F# has been incredibly interesting but I’m still at a real beginner stage and I’m still trying to skill up on Rails.

From today forward I’ll be focusing on the app for Vintus and my Ruby on Rails work. Hopefully the app will be released in early/mid January so then I’ll have that off of my plate for a little bit, then I can come back to learning about startups and checking out a bit of F# again.

josh
josh

Inspired by @kiriappeee I’ve started Advent of Code as a way to learn #OCaml, and am halfway through day 2. There’s definitely a difference between being able to read and understand a language, and being able to write it! Thinking functionally is breaking my brain (in the best kind of way). I can barely write a line before having to consult the docs, but I have three answers correct so far. Here’s my answer to day 1’s two questions, which took a short time to plan in my head and a long time to actually write correctly.

josh
josh

Tried something I thought was simple using the Opium web framework for #Ocaml — getting the debugging middleware running, so I could see requests logged to stdout. However, although I feel a bit more comfortable fiddling with actual OCaml code now (and getting it to compile, a challenge in itself), I just couldn’t get it to work. Can’t tell if it’s my fault, or the framework’s fault. Given there’s only one other web framework that’s actually production-ready, and it doesn’t look like my cup of tea at all, maybe this project was a bad idea.

josh
josh

Finished reading the first two sections of Real World #OCaml online (here), covering the language and practical patterns for using it. Onto the third section, The Runtime System, although I might skip it as it seems more like a reference than something I need to read fully. So I’m nearly done! It mostly makes sense, although reading is not at all the same as doing. I think my first OCaml project might be replacing my aging blog/personal website. Too many side projects.

November 2015

josh
josh

In my spare time I’ve been continuing to read through the Real World #OCaml book. Up to chapter 8. So far it delivers on what the title promises and discusses practical uses for language concepts, not just theory.

josh
josh

Tonight, for something different after Fallout crashed on me again, I spent some time getting #ocaml and #opam set up in my Linux environment, then started working through Real World OCaml. It feels a bit like stepping into the past so far, though maybe that’s just some of the syntax choices. All the same, looking forward to some good functional programming!

March 2015