hoichi.io
/
blog
Jun 24, 2020
be-good: Simple and Flexible Data Decoders for TypeScript
This post is an introduction to both JSON decoders and my humble library of building blocks for them, called be-good.
TypeScript
decoders
JSON
Jun 5, 2020
Simple Sum Types In TypeScript Without Common Fields
All the glory of the discriminated unions, none of the ceremony. And nobody gets anyone’s goat.
TypeScript
tricks
React
Dec 21, 2019
Real-World Composable Error Handling in Reason
If you’ve ever considered handling errors in Reason or OCaml, chances are, you’ve happened upon Vladimir Keleshev’s article. Everybody links to it, so it seems like the way to handle errors. But how does it look in practice?
Reason
polymorphic variants
error handling
Nov 4, 2019
Type-And-Test Driven Development
I know what type-driven development is (didn’t say I’ve mastered it). I sort of get what is test-driven development, or even red-green-refactor. But can you do both at the same time? If you start with types, is there anything left of the green-red-refactor cycle? Or does that mean you write your tests post factum?
Reason
types
tdd
Jan 19, 2019
How Not to Introduce ReasonReact to Your Project
Well, actually the reality is not as harsh as the clickbaitey title would make you think. Nothing particularly wrong came out of my introduction of ReasonReact and, by extension, ReasonML to the static build of this very site. The claim that you can introduce Reason & ReasonReact to an existing application one component at a time is entirely true.
Reason
ReasonReact
frontend
Sep 15, 2018
Tail-optimized functions in ReasonML
For that mechanism to work, you have to be sure you don’t do anything with the result of the recursive call other than return it as is. That way, you don’t have to return at all. The function instance that is called last evaluates the final result and returns it straight to the original callee.
recursion
FP
OCaml
Reason
BuckleScript
Aug 18, 2018
Types vs clever code
“If it’s hard to typecheck, it’s probably hard to understand.” — Jared Forsyth
types
quotes
Aug 17, 2018
TIL: Why ReasonML Has No Nullary Functions
“If you don’t provide all of a function’s parameters, you get a new function from the remaining parameters to the result. As a consequence, if you could actually provide no parameters at all, then func() would be the same as func and neither would actually call func.”
TIL
Reason
OCaml
Dr Axel
Feb 4, 2016
Sorting Lists, Testing Units
Here’s your brain on drugs.
chops
all I build is this blog
csp
Jan 28, 2016
Chops v.0.0.0 Is Out
Well, no, my little watchful static build engine called Chops is not even actually out. It’s not published, it’s not documented, it’s not even a proper NPM module. I use it via npm link and that gives npm (or Yarn) a fit of recursion.
chops
all I build is this blog
Jan 9, 2016
Look Ma, No Comments!
Ok, since this blog is experimental anyway, I’ve decided to experient some more and go without comments, at least for now. The first reason, to be honest, is I’ve played with Muut (don’t get me started on things like Disqus), aaand it’s somewhat hard. Much as I’m intrigued by Riot from the same authors, overriding a whole lot of Muut’s css rules is boring (and none of those!importants are particularly easy on these poor eyes).
social
not-much
Jan 7, 2016
Hello world
Hi y’all. If you read this, that means I’ve started my little developer’s blog that doubles as a project because none of those static site builders are any good I need to build something to learn JS and Node. And reading code is harder` than writing.
hello
world