Finding Joy: Middleware

In this series of posts, we are working our way up to understanding the Joy web framework by creating the building blocks ourselves. See part 1 and part 2. Let's start simple again: (import halo) (defn hello [request] {:status 200 :body "Hello, world!"}) (halo/server hello 8080) The thing I want to point out here is the call to halo/server. It seems kinda crazy that we could build a powerful, modern web app by passing one handler function to the server.

Read more...

Finding Joy: Handlers

In part 1, we created a very simple web app: (import halo) (defn hello [request] {:status 200 :body "Hello, world!" :headers {"Content-Type" "text/plain"}}) (halo/server hello 8080) Let's dig into this. First we import the halo module. The halo module contains the server function which starts the server up and listens for requests. We can call it by prefixing it with the module name: halo/server. The server function takes 2 arguments: a handler function, which we have defined as hello, and a port to run on.

Read more...

Finding Joy: First Steps

Lately I've been having fun playing around with the Janet programming language. Janet is a small Lisp with a Clojure-inspired syntax. A few of my favorite things about it: Janet apps start instantaneously, consume little memory, and can be compiled to a single binary for easy deployment. For someone with a personal web app creation habit and a simple vps, Janet seems like a great choice. Since most of my personal projects are web apps, I quickly found the Joy web framework by Sean Walker.

Read more...

Getting Started with Fable PixiJS

This post is part of the F# Advent Calendar in English 2017. Thank you Sergey, who's been keeping the F# community updated weekly for over 5 years! We're going to take a look at how to get started creating cool stuff with Fable and PixiJS. PixiJS is a a JavaScript library that creates very fast 2D WebGL content. It's great for creating graphical visualizations and games. Combining Fable with the PixiJS bindings allows us to do this with F#.

Read more...

Getting Started with Fable Elmish

tldr: Learn Elmish by working up to the Counter sample app from scratch. Prerequisites This post assumes that you are already aware what Fable is. Knowledge of Elm might help, but is not required. It's also assumed that you have the following installed: F#: Parts of the Fable compiler are written in F#. The “Use” tab on the fsharp.org site can walk you through F# installation. Node.js: Fable takes advantage of the JavaScript Node.

Read more...

Review: OCaml from the Very Beginning

OCaml from the Very Beginning is an introductory book on the OCaml programming language by John Whitington. From that link, you can buy the DRM-free e-book for $14.99. For an additional 10 dollars, you can get a bundle of OCaml from the Very Beginning and Mr. Whitington's second OCaml book OCaml: Algorithms, Methods, and Diversions. Review TLDR: This is a great first book to get your feet wet with OCaml.

Read more...

Taking Ionide Out for a Spin

This post is part of the F# Advent Calendar in English 2015. Be sure to check out the other posts! Ionide is a set of plugins that allow cross-platform F# development within the Atom and Visual Studio Code text editors. The project was started by Krzysztof CieĊ›lak earlier this year and has grown to a handful of contributors since. Development of the plugin is done in F# and transpiled to JavaScript using FunScript.

Read more...

Getting into FunScript

This post explores what it takes to set up an environment for writing a simple FunScript application from scratch using a non-Visual Studio environment. It's targetted at the beginner, using a step-by-step process that tries to remove a few stumbling blocks I encountered when trying to do the FunScript tutorial without using an example solution. The dev environment is Xamarin Studio (version 5.9.8) running on a Mac. If you'd like to see other environments, let me know in the comments.

Read more...

CSE341

Recently I started looking into F# again. F# is based on the ML programming language, so I started checking it out too. That's when I came across the CSE341 Programming Languages course taught by Dan Grossman. The course materials have graciously been made available online. I watched a couple of the videos and got hooked. It is rare to come across teaching of this quality in any topic, let alone programming.

Read more...