Containers - How do they work?

Motivation I hear the word “container” in the software context a lot but I do not really know it means. To quote Tim Urban ([again][first-post]), I get the “ugh it’s that icky term again nah go away” feeling. I also definitely have some magpie tendencies, so it was difficult for me to tell how much of the buzz was about shiny-ness and how much was immediately useful. ([This article][container-joke] captures how I felt any time containers came up in articles or Hacker News comments....

April 19, 2017

Google Sign In and Google Sheets: Step by Step in Python

Motivation As part of my CashCoach project, I want to share and update spending reports with a user using Google Sheets. It turns out there a lot of different options for interacting with the Google API’s likely because people want to interact with them in all sorts of different scenarios. They primarily center around 2 decisions you want to make: 1. Do you want to act as if you were the user or have a “robot” user for your project?...

March 27, 2017

Morse Code to Emoji: A Brief history of character encodings

Introduction I found myself wondering what Unicode symbols looked like at the bit level. In the ASCII world, a single byte is a single character, so the encoding is relatively straightforward. However, in the UTF-8 encoding, a single character can span multiple bytes, so how does the program know when the character starts and ends? This question led me on a winding trail of history via Wikipedia and other sources through UTF-8, UTF-16 back to ASCII....

March 7, 2017

Buckle Typings - Part 2: Walking the AST

In my [last post][1], I layed out the plan to make a converter from TypeScript .d.ts type declarations to OCaml external modules useable in BuckleScript. When I left off, I had made a call to the TypeScript compiler and received a SourceFileObject. In this post, I’ll dig into what is in the SourceFileObject and go through typing an Enum. What is in the SourceFileObject? In order to get a feel for what is in this object, I fired up the node repl and created one in the same way I have been doing so far:...

February 4, 2017

Buckle Typings - Creating modules useable in BuckleScript from TypeScript typings

In my [last post][1], I put together a simple (and incomplete) wrapper around PixiJS in order to use it in BuckleScript. This is a common task when using untyped code in a typed system; you have to specify the types. TypeScript has to do this as well. These type definitions take work to get right, so it would be really nice if you could re-use the work the TypeScript community has put in to creating definitions for many popular libraries....

January 20, 2017

Buckle Pixi - Using PixiJS with BuckleScript

Introduction In my [last post][1], I talked about what BuckleScript is and how to get started. I found that when writing posts, my weakest posts come after I have been spending a lot of time on a topic and then go back and try to fit a post around it. That’s what happened with that post as I had been fooling around with BuckleScript for several weeks before writing the post....

January 14, 2017

Getting started with BuckleScript

I recently started playing around with BuckleScript. In this post I’ll try to answer the following questions: What is BuckleScript? Why would I want to use it? How do I install it? How do I use it in practice? What is BuckleScript? From the website: BuckleScript is a backend for OCaml which emits readable, modular and highly performant JavaScript. Let me break that down. OCaml First, what is OCaml? OCaml is a programming language that’s been around for a long time....

January 2, 2017

Doorbell Hacking Part 2: Buying Components

In [Doorbell Hacking Part 1][1], my friend and I gained an understanding of how my doorbell system works. We also came up with a plan to hook it up to my RaspberryPi given a few extra components. In this post, I’ll look at shopping for the electronic components I will need. Goals It’s worth noting the 2 goals of hooking up my doorbell in order of priority: Buzz someone in from my phone Get a notification if someone rings my doorbell on my phone Goal #1 is mostly for being super lazy, or potentially hooking it up to a home assistant so I could say “Ok Google/Alexa – Buzz them in”....

December 14, 2016

Switching to Ubuntu from Debian

From Debian to Ubuntu I recently decided to switch from Debian to Ubuntu on my Macbook air (see [my previous post][1] about installing Debian). There were two situations that prompted this: 1) I was trying to work with ROS and finding that installing with Ubuntu would be easier and 2) working with OCaml and running into an issue with system packages. Neither of these is a very compelling reason since I am sure there were ways to get both to work in Debian....

December 1, 2016

Debugging a Doorbell

The Problem I live in an apartment with a front lobby and a buzzer that lets people in. Having a button to push to remotely unlock a door is pretty neat, but you know what’s neater? Being able to do it from your phone. That’s what I set out to do in this project. I saw a post on Twilio’s blog with a run down of quick rundown of how they did their system....

November 16, 2016