RSSAmplifier

Blog

Bigger on the Inside

Recent content on Bigger on the Inside

blog.chewxy.comRSS feed ↗167 posts

Latest posts

How I Write

I’ve been silent on this blog for a while. I’ve been reducing my time on the internet to “touch grass” more as the young-uns put it. I guess I’ll return to more active contributions on open source software and writing on this blog when the LLM hype thing dies down a little more.
This post is more of a overflow piece. I was about to reply to Christine Lee’s…

Show Your Working

I just awokened from a really visceral dream of a time in primary school. Just need to write it down somewhere.
When I was a kid in school, I hated showing my working. I recall one maths test that I did where I had scored a 100%, and the teacher marking my exam deducted 10 marks for not showing my working*Later when I was in high school I similarly had marks deducted from my physics exam for…

Reputation

I’ve been thinking a bit about reputation lately. This was spurned by a few events/incidents in my life:
A startup founder I am consulting with threw a temper tantrum due to inconsistent results due to a combination of UI complications and machine learning algorithms. They claimed that “…We need to fix this in the next 24 hrs because our reputation is on the line here. If…

Visually Validate Date Ranges

Two coincident things happened at work today. Both things coincidentally were solved by me using emacs to provide a visual depiction of date ranges.
First, as part of a larger project, I wrote a bit of code to break up a date range into multiple intervals. A key issue of debate is whether it would be better to split up the full date range into a bunch of smaller intervals with gaps in between…

Intense

Today was truly an intense day for me despite having minimal physical activities. I started my work day at 9 a.m.-ish having a bunch of discussions comparing random forests and gradient boosted machines and how we can get one process to converge onto the results of another process with similar-enough internal structures. This was then followed by another meeting discussing the inner workings of…

GopherConSG 2023 - A Retrospective

I had fun at GopherConSG! It’s my third time at GopherConSG and after a few years of absence (thanks to COVID-19), it was sure good to see some old familiar faces like Valentine, Sau Sheong, Dave and Bill. This blog post is a retrospective on my GopherConSG 2023 talk: Man Bites Dog.
My GopherConSG talk was way too long. I had to trim down my talk from 1 hour 45 mins to 30 mins, and I…

Ween

The English language needs a new modal verb denoting an epistemic modality - specifically one that expresses a modality of probability. I propose the word “ween” (/we꞉i꞉n/ way-in). The preterite form is “weend” (/we꞉i꞉nd/ way-ind), though I am uncertain as to when one would use the preterite form.
As an example of expressing a modality of probability, here’s an…

Letter to the Editor

Dear Editor,
I am grateful to have been asked to provide some reflection on the eve of the 15th anniversary since the last publication by this journal, of a report written entirely by human minds. As one grows older, one finds more things to reflect upon. Perhaps then we should reflect on the most incredible journey that humanity has taken so far.
As I write this, the budding field of…

Quickly Annotate Your Machine Learning Dataset with One Weird Trick (It's Lisp)

TL;DR - I wrote annotation-mode, which is a emacs minor mode for annotating text documents for machine learning purposes. Recently at work I had to annotate some text documents for a piece of NLP work. The annotation involves marking regions of the text with a category, as well as a rectangle which represents the region.
At first I thought to build a webapp to do the annotation. The webapp…

Random Thoughts on Empathy and Compassion, and Neural Pathways

Earlier in my afternoon nap, I think I made the most interesting connection. It may well be wrong - my explanation is certifiably sloppy and unrigorous. It definitely needs a lot of refinement. Yes, this will be very bullshitty if you know anything about neuroscience or psychology. It also relies on some very unproved hypotheses of how brains work. I am mainly putting this brain dump down for…

The BNF Dream

This post was originally a series of tweets I wrote on a dream I had last night. For posterity I’ll be re-describing the dream here. Words might be slightly different from the tweets given the lack of character restrictions.
I had a dream last night. It was a weird dream. I dreamt that all human languages could be shrunk down into a CBNF (C is for Contextual, or Chewxy)*There aren't such…

On The Basics of Modeling

I had a very interesting chat with a few data science students yesterday. Part of the chat involved the idea of statistical modeling. Throughout the chat, it occured to me that the students didn’t have a very good grasp of what modeling is. To their credit, they were proficient in the techniques of linear regression, and deep learning, but I got the sense that they were very much pushing…

The SARS-CoV-2 Build Log

Happy New Year!
2020 was definitely a weird year. The majority of the year was dominated by news of the COVID-19 pandemic. There were mass lockdowns across different countries. International travel halted to a trickle. Jobs were lost. Lives were lost. I am very thankful to not have been impacted as much by the pandemic. I didn’t get the virus, nor did any of my close friends or family -…

Double Your Linear Search Speed with This One Weird Trick

Recently at work I optimized key-lookup for Ristretto, a caching library for Go, effectively doubling the lookup speed with one trick. This post walks you through what I did. The benchmarks and code can be found here.
Overview Ristretto is a fast concurrent cache library in Go. In the upcoming version, the cache is B-tree based. In this, the keys and values are stored in one flat slice of…

Some Thoughts On Library Design

This post was [originally published in GopherAcademy](https://blog.gopheracademy.com/advent-2019/pkgapi/) for their Advent 2019 series. It's been republished here for posterity. As programmers we use libraries a lot. But library design is hard. In this article, I will walk through some considerations in designing a library.
We will start by bifurcating the acts of programming. We start by…

31482

The following are final copies of my dissertation for the completion of 31482.
Closure Calculus is Better than the Pure λ-Calculus (Dissertation) A Reflection on 31482 An Alien Lambda Calculus (Video)

The Y-Combinator MBA Project

A friend of mine is doing an MBA. Her course this semester follows the Startup School model - each week they have lectures regarding issues a startup face while creating a startup at the same time. They have to create a product for the startup that they create. They first have to find customers and solve their customers problems, and create a product and startup around the problem.
The problem…

Writing Clearly is Clearly Hard

These days I am slow in my blogging. I am trying to write my thoughts out more clearly. I don't think I am very good at it. Consider this snippet of conversation:
Chewxy: Star Wars is typical Campbellism. and here I use the word 'typical' in the typical fashion which is to say, not the usual connotation of 'usual' what I meant is 'a representative of a type' where '

Go is a Pretty Average Language

I had a data visualization problem at work. I’ve been thinking about set coverage issues, and wanted to test some ideas for visualizations. I had wanted to visualize the space of aggregate measures (i.e. things like means, etc). It later transpired that I didn’t need it, because my thinking around the issue had been wrong to begin with. I had written some code, and was eager to check…

A Most Vivid Dream

I have had the most vivid and unusual dream that I feel compelled to note it down for posterity. Or for future self-introspection. It’s too long to write in my notebook and I feel more comfortable typing it out anyways.
In the dream I was at a birthday party of a friend of mine. It had gone particularly wrong - I was the organizer and I had arranged for logistics to cater for two…

Deceptively Simple Is Deceptively Simple

I recently used the words “deceptively simple” to describe lambda calculus. One person reading my paper sent a comment back: “do you mean ‘deceptively complicated’?”. What I had meant to say was on the surface, lambda calculus looks simple. But when you consider all the meta conditions of alpha-renaming and substitutions - you know, practical things about…

Namespaces Are Useful

I was extending Gorgonia for a project of mine when I rapidly ran into a dot-import gotcha in Go. Specifically I was trying to implement a fused version of the Conv2d function that exists. The current Conv2d function works well, if you want to do image convolution related work. It could be quite a bit faster (if anyone from Intel is reading, I’d love some help in the same way Intel boosted…

Do You Need Deep Learning?

As a guy who has his own deep learning library that aims to rival Tensorflow and PyTorch, the answer is: “chances are, no”.
Around this time last year, I was running a startup and as a side hustle, I was doing consulting work for any parties interested in machine learning. I get a lot of requests from businesses who want to empower their businesses with “AI”.
The…

How To Use Go Interfaces

I occasionally give free Go consults and code review on top of my daily work. As such, I tend to read a lot of other peoples’ codes. And while this is really more of a feeling * Now, you should go, really? You're a statistician by training ffs , I’ve seen an increase in what I call “Java-style” interface usage. 
 This blog post is a Go specific recommendation from me,…

Tuples Are Powerful


In this post I lay out the unjustifyable reasons why Gorgonia lacks tuple types. Along the way we revisit the idea of constructing integer types from natural numbers using only tuples and the most basic functionalities. I then close this blog post with further thoughts about computation in general and what that holds for Gorgonia's future.
 
 Over Chinese New Year clebrations, a…

Term Rewriting Chinese Relatives

I recently attended QFPL’s excellent Haskell course. Tony Morris was a little DRY * It's a joke. Tony kept mentioning Don't Repeat Yourself and being lazy but nonetheless was an excellent presenter * The course shook my confidence in my existing ability to reason in Haskell for a bit but it was for the better - I had some fundamentals that were broken and Tony explained some things in a way…

Go For Data Science

This may come as a surprise for many people, but I do a large portion of my data science work in Go. I recently gave a talk on why I use Go for data science. The slides are here, and I’d also like to expand on a few more things after the jump: 


Data Empathy, Data Sympathy

Today’s blog post will be a little on the light side as I explore the various things that come up in my experience working as a data scientist. 
 I’d like to consider myself to have a fairly solid understanding of statistics * I would think it's accurate to say that I may be slightly above average in statistical understanding compared to the rest of the population. . A very large…

Sapir-Whorf on Programming Languages

In my previous blog post I had a brief mention about the Sapir-Whorf hypothesis, and how it blind-sided me to an obvious design. In this blog post I’ll retell yet another story of how Sapir-Whorf blind-sided me yet again - just moments, actually. I’m getting sick of this shit, yo.
Sapir-Whorf, Briefly Briefly, the Sapir-Whorf hypothesis states that the language you speak influences…

Tensor Refactor: A Go Experience Report

I recently finished a major refactor of `tensor`, which is a package for generic multidimensional arrays in Go. In this blog post I will recount the refactoring process, and why certain decisions were made. Further more I will also share some thoughts with regards to generics in Go while trying not to sound like a complete prat. 
 There has been major refactors done to the tensor subpackage in…

Garbage Collection is Also a Side Effect

On Twitter a couple of days ago I posted this tweet which had this image: 


21 Bits Ought to Be Enough for (Everyday) English

I was working on some additional work on lingo , and preparing it to be moved to go-nlp . One of the things I was working on improving is the corpus package. The goal of package corpus is to provide a map of word to ID and vice versa. Along the way package lingo also exposes a Corpus interface, as there may be other data structures which showcases corpus-like behaviour (things like word embeddings…

The Double Blind Monty Hall Problem

Last night as I was preparing today's lunch, I ran into an interesting real life scenario that is a variant of the Monty Hall problem . As I thought more about the subject I became more and more convinced that the probability of choosing the right door by switching was 0.5 instead of 0.6667. I even sketched out a Bayes theorem proof of why that is. Then I realized an assumption that the original…

The Handmaid's Tale

Hulu just released three episodes of The Handmaid’s Tale, an adaptation of Margaret Atwood’s book of the same name. I binged watched it over the weekend, and I had some difficulty being immersed into it. There was something about the world that didn’t sit quite right with me in this adaptation, but I couldn’t quite put a finger on it. Eventually of course, I figured it out.…

Deep Learning from Scratch in Go

Note: This post was originally published at GopherData . This blog post is the exact same copy. 
 Summary: In this post I talk about the basics of computations, then I go on to show parallels between Go programs and mathematical equations. Lastly I will attempt to persuade you that there is a point in using Go for doing deep learning.
 
 Welcome to the first part of many about writing…

New Blog

For about a month now, this blog has been a static site generated by Hugo. There had been a few issues with my wordpress installation at my previous host, and it left me unable to publish blog posts - they end up in “limbo” - some weird combination of plugins and tables. I had to hunt down all the posts I had published since the problem occured, and manually restore them.

What To Test

You’re in a rush. Your product demo was due three months ago. And you still don’t have good unit tests. What do you do? You prioritize. 
 You wrote a very complex piece of machinery with a lot of moving parts. You sorta know how they all fit together in your mind but there isn’t any good know if the program you wrote actually works the way you want it. The solution: unit…

A Direct Way of Understanding Backpropagation and Gradient Descent

Summary: I believe that there are better representations of neural networks that aid in faster understanding of backpropagation and gradient descent. I find representing neural networks as equation graphs combined with the value at run-time helps engineers who don't have the necessary background in machine learning gets them up to speed faster. In this post, I generate a few graphs with Gorgonia…

Advent of Code/Go

Apparently today is the start of Advent of Code/Advent of Go. I’m not exactly sure what they are (AoC seems to be a bunch of puzzles, AoG seems to be a bunch of blog posts). Nonetheless I think this is a good excuse for me to get busy writing blog posts every day, if only to trigger my writers’ block away.

Numbers are Weird, Man

Numbers are weird, man. I have an amateur interest in the history of maths*That is to say, I can't be arsed to actually invest time and energy to do serious research about it, but I am interested enough to retain knowledge about history of maths that I read - to the point that in my book about JavaScript, I had a small section devoted to the history of numerical representation., and I’ve…

How To Make Money

Hey Chewxy, what do you think will happen if one day everyone decides to move their money onto a blockchain and no longer need banks? 
 That was a question that a friend asked me last week. I thought about the situation, gave some answers based on my what I understood of the world and the economy, while sketching out in broad strokes, what would happen. Essentially the conclusion was…

Gorgonia

I released Gorgonia on Thursday. Gorgonia is a library like Theano or TensorFlow , but mainly written in Go. It provides the necessary primitives for creating and executing neural networks and machine learning algorithms. 
 According to cloc, these are the stats: 
 
chewxy@chewxy-Gallifrey:~/workspace/goworkspace7/src/github.com/chewxy/gorgonia$ cloc .
 357 text files.
 321…

Yes and No


 I was teaching my partner some mandarin recently and I came to the conclusion that 'yes' and 'no' are very weird constructs of language. 

 We were practicing one day, where I'd ask her questions in English and she'd reply in Mandarin. I asked her a yes/no question and she replied 不, to which I surprised myself by pointing out that 不 is ever only used in a negatory manner. People who…

On the memory alignment of Go slice values


 TL;DR and Meta I was playing around with some AVX instructions and I discovered that there were some problems. I then described the investigation process of the issue and discovered that this was because Go s slices are not aligned to a 32 byte boundary. I proceed to describe the alignment issue and devised two solutions, of which I implemented one.
 
 On Thursday I decided to do…

On Binary Classification of Human Beings

Over the years I have come up with some fun ideas of binary classifying people. They say “those who can’t do, teach”. That’s a binary classification – teachers and doers. I once did something like that, with a longer elaboration: Hackers and Engineers
Abstract Thinking Capabilities Some people have better abstract thinking capabilities than others. I’ll use an example that makes this a…

Bloody Side Tracking Brain

This morning I woke up with Hungarian Dance No. 5 by Brahms stuck in my head. In my head, it’s a superiorly orchestrated, super high definition audio – much like sitting in the concert hall and being enveloped by the music of a live orchestra. I also have a very high quality copy of Hungarian Dance on my hard drive. I woke up at 5.45 am, went to gym, and returned at 7am and showered.

Batman v Superman – A Quick Thought

I watched BvS today. I don’t know what to think about it. Overall, I think the movie was a bit of a mess. But I can’t seem to pinpoint why. Breaking it down by the standard things that people use to judge movies, there doesn’t seem to be anything wrong.
Characters Character-wise, I liked it quite a bit. Superman is at his Superman-est. Batman is also amongst the most Batmanest Batman I’ve…

Not Enough

Do you sometimes feel like you’re not smart enough, not strong enough… not _ enough to do your pursuits?
At what point do you give up? I am so tired. The alternative – not pursuing what I want to do… is worse.
Argh,.

Naming Things Poorly

computer scientists have a very unfortunate way of naming things. Take S-expressions for example. They’re pretty a fundamental notation method for functional programming. I was re-implementing a variant of it recently, and obviously I named the package sexp
Part of the implementation I wrote was that I had a “shortcut” way of representing the S-expressions internally – as slice (called List)…

On Buying A New Vacuum Cleaner

Just happened. Her: Ooh, Dyson is on sale! Me: Yeah, no. Dyson sucks. Her: So, we ll buy a Dyson? Me: Er, I mean, Dyson doesn t suck. Her: So, we ll buy a Dyson? We re buying a Miele instead. Because Miele vacuum cleaners are awesome at sucking.