Latest Articles
-
Why Every Programming Language is Terrible
clean-code commentary languages productivityTell me you've never hated your programming language. Tell me it doesn't have any features you wouldn't be caught dead actually using. Tell me there's a programming language so dear to you that you not only enjoy writing it in the moment but enjoy reading what you've written in the somewhat distant past. Tell me—and this is key—that you not only enjoy reading what you've written, but what others have written.
-
Running Play Framework on NixOS using JDK 11
nixos play-framework sbt scalaGood morning! First, some personal news: I'm switching to NixOS, and I'm kind of excited about it, so expect some articles to that effect. Today, I'm celebrating the ease with which I got a Play Framework environment up and running, including installing sbt and downgrading to JDK 11.
-
De-Microsofting Your Development Environment
commentary javascript rescript toolingAnyone who has been following the web ecosystem over the last few years knows it has been rapidly consolidating under Microsoft. That consolidation economically threatens the open web. Diversifying your tooling could protect you as much as diversifying any investment, and it's much more convenient than you might think.
-
Continuously Deploying to GitLab's NPM Package Registry
devops gitlab javascript npm rescriptIn a previous article, we explored how to continuously deploy to the npmjs.com package registry. This is all well and good, but an advantage of CI/CD is that we can easily deploy wherever we want. This article will explore how to deploy an npm package to both npmjs.com and GitLab's own package registry, including how to change package names when necessary.
-
The Second Best Way to Pick Your Next Programming Language
commentary growth languages object-orientationExperienced developers often say that the best way to pick your next language to learn is to pick a project you want to ship and pick the best language for the job. This isn't wrong, but beginning developers often respond that the only "project" they have in mind for now is to learn more about programming generally and become a better developer overall. If this is your goal (and it's a good one!), then the "best way" to pick your next programming language just isn't applicable. But I think you'll appreciate the second best way.
More articles can be found in the archive.
Tagged “bucklescript”
-
Writing Service Workers in ReScript
bucklescript documentation progressive-web-app reasonml rescript service-workerDoes your SPA work fully offline? Would you like to define a caching strategy in an exhaustively type-safe way? If so, you might be interested in this Service Worker binding for ReScript (formerly BuckleScript / ReasonML). This article documents the binding by example, including two different caching strategies and a service worker registration example.
-
Setting Up Webpack for ReScript
bucklescript progressive-web-app reasonml rescript webpackAs much as I strongly prefer ES6 modules, using them with ReScript (formerly BuckleScript / ReasonML) and ServiceWorkers just isn't practical right now. I'm writing this article so that I can easily grab the configuration the next time I need it. This is a beginner's guide because I am a webpack beginner, and, well, everyone is a ReScript beginner right now.
-
Displaying Notifications in ReScript
bucklescript documentation progressive-web-app reasonml rescriptThis article will serve to document and demonstrate the
rescript-notifications
npm package, a complete set of bindings for the JavaScript-compiling ReScript language (formerly BuckleScript/ReasonML). At the close of this article, the reader should be able to enable and display notifications in an entirely type safe and functional way.
-
Writing Elm Ports in ReScript
bucklescript documentation elm reasonml rescriptThis is a post-rebrand update to my previous post, "How to Write Elm Ports in ReasonML." I rewrote the package in the new ReScript syntax so that people who aren't familiar with the old syntax can still read it. Recently I've published an npm package called res-elm and put it into production on a couple of projects. It's documented briefly by its README, but I think it deserves a full post. This post will walk through how to set up ports both into and out of an elm 0.19 project using ReScript.
Tagged “reasonml”
-
Writing Service Workers in ReScript
bucklescript documentation progressive-web-app reasonml rescript service-workerDoes your SPA work fully offline? Would you like to define a caching strategy in an exhaustively type-safe way? If so, you might be interested in this Service Worker binding for ReScript (formerly BuckleScript / ReasonML). This article documents the binding by example, including two different caching strategies and a service worker registration example.
-
Setting Up Webpack for ReScript
bucklescript progressive-web-app reasonml rescript webpackAs much as I strongly prefer ES6 modules, using them with ReScript (formerly BuckleScript / ReasonML) and ServiceWorkers just isn't practical right now. I'm writing this article so that I can easily grab the configuration the next time I need it. This is a beginner's guide because I am a webpack beginner, and, well, everyone is a ReScript beginner right now.
-
Displaying Notifications in ReScript
bucklescript documentation progressive-web-app reasonml rescriptThis article will serve to document and demonstrate the
rescript-notifications
npm package, a complete set of bindings for the JavaScript-compiling ReScript language (formerly BuckleScript/ReasonML). At the close of this article, the reader should be able to enable and display notifications in an entirely type safe and functional way.
-
Writing Elm Ports in ReScript
bucklescript documentation elm reasonml rescriptThis is a post-rebrand update to my previous post, "How to Write Elm Ports in ReasonML." I rewrote the package in the new ReScript syntax so that people who aren't familiar with the old syntax can still read it. Recently I've published an npm package called res-elm and put it into production on a couple of projects. It's documented briefly by its README, but I think it deserves a full post. This post will walk through how to set up ports both into and out of an elm 0.19 project using ReScript.
Tagged “rescript”
-
De-Microsofting Your Development Environment
commentary javascript rescript toolingAnyone who has been following the web ecosystem over the last few years knows it has been rapidly consolidating under Microsoft. That consolidation economically threatens the open web. Diversifying your tooling could protect you as much as diversifying any investment, and it's much more convenient than you might think.
-
Continuously Deploying to GitLab's NPM Package Registry
devops gitlab javascript npm rescriptIn a previous article, we explored how to continuously deploy to the npmjs.com package registry. This is all well and good, but an advantage of CI/CD is that we can easily deploy wherever we want. This article will explore how to deploy an npm package to both npmjs.com and GitLab's own package registry, including how to change package names when necessary.
-
Writing Elm Ports in ReScript - 0.3
documentation elm rescriptThis is an update to a previous article following a breaking change in the
res-elm
binding. In short, theinit
function has been broken up intoinit
andinitWithOptions
to allow for Elm initialization flags and Elm web applications. Recently I've published an npm package called res-elm and put it into production on a couple of projects. It's documented briefly by its README, but I think it deserves a full post. This post will walk through how to set up ports both into and out of an Elm 0.19 project using ReScript.
-
Binding to a JavaScript Function that Returns a Variant in ReScript
javascript indexeddb rescript variantReScript provides easy ways to bind to most JavaScript functions in a way that feels both native and safe. Conveniently, it even provides an
@unwrap
decorator for parametric polymorphism. However, there are a few places where we still have to fill in the gaps. This article documents how to bind to a JavaScript function that can return any one of several different types using ReScript variants.
Tagged “documentation”
-
Writing Elm Ports in ReScript - 0.3
documentation elm rescriptThis is an update to a previous article following a breaking change in the
res-elm
binding. In short, theinit
function has been broken up intoinit
andinitWithOptions
to allow for Elm initialization flags and Elm web applications. Recently I've published an npm package called res-elm and put it into production on a couple of projects. It's documented briefly by its README, but I think it deserves a full post. This post will walk through how to set up ports both into and out of an Elm 0.19 project using ReScript.
-
Writing Service Workers in ReScript
bucklescript documentation progressive-web-app reasonml rescript service-workerDoes your SPA work fully offline? Would you like to define a caching strategy in an exhaustively type-safe way? If so, you might be interested in this Service Worker binding for ReScript (formerly BuckleScript / ReasonML). This article documents the binding by example, including two different caching strategies and a service worker registration example.
-
Displaying Notifications in ReScript
bucklescript documentation progressive-web-app reasonml rescriptThis article will serve to document and demonstrate the
rescript-notifications
npm package, a complete set of bindings for the JavaScript-compiling ReScript language (formerly BuckleScript/ReasonML). At the close of this article, the reader should be able to enable and display notifications in an entirely type safe and functional way.
-
Writing Elm Ports in ReScript
bucklescript documentation elm reasonml rescriptThis is a post-rebrand update to my previous post, "How to Write Elm Ports in ReasonML." I rewrote the package in the new ReScript syntax so that people who aren't familiar with the old syntax can still read it. Recently I've published an npm package called res-elm and put it into production on a couple of projects. It's documented briefly by its README, but I think it deserves a full post. This post will walk through how to set up ports both into and out of an elm 0.19 project using ReScript.
Tagged “monad”
-
Parsing JSON in ReScript Part III: Getting to the Point
bucklescript rescript reasonml monadAfter having established some requirements and some basic utilities, we're ready for the fun part: putting the pieces together. At the end of this post, we will have our working parser.
-
Parsing JSON in ReScript Part II: Building Blocks
bucklescript rescript reasonml monadThis is the second in a series of articles on how to build one's own, general-purpose parsing library. After having established a few expectations in the previous post, we are ready to begin building our utilities for our library. Let's start with some highly generalized utilities for functional programming.
-
Parsing JSON in ReScript Part I: Prerequisites and Requirements
bucklescript monad rescript reasonmlThere are few things more satisfying than a slick, readable, and safe JSON parser. It's one of the joys of functional programming. Using a good JSON parsing pipeline can feel like magic. This series seeks to lift the veil and empower readers (and, importantly, my future self) to build their own customizable and extensible parsing libraries. This article, the first of several, will be a skimmable introduction to the subject as I see it.
-
Safer Data Parsing with Try Monads
csharp monadI have written previously on maybe monads and how to use them with lists to eliminate the possibility of null references in an object-oriented programming language. This standalone post walks through how to use a more generalized kind of monad to prevent all other kinds of unhandled exceptions, using data parsing exceptions as an example.