Sgo, a dialect of Go

A dialect of Go with optional types and without nil references. https://github.com/tcard/sgo The billion dollar mistake “It was the invention of the null reference in 1965. […] This has led to innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pain and damage in the last forty years.” C. A….

Analyzing Go code with BigQuery

Recently my colleague Felipe Hoffa told me about a new public dataset in BigQuery: ALL THE PUBLIC GITHUB CODE! Counting Go files As a gopher, my first reaction was to check how many Go files are in that dataset. My SQL is not amazing, but I’m able to do that! SELECT COUNT(*) FROM [bigquery-public-data:github_repos.files] WHERE…

Go Data Structures

https://github.com/emirpasic/gods   Containers Lists ArrayList SinglyLinkedList DoublyLinkedList Sets HashSet TreeSet Stacks LinkedListStack ArrayStack Maps HashMap TreeMap HashBidiMap TreeBidiMap Trees RedBlackTree BTree BinaryHeap Functions Comparator Iterator IteratorWithIndex IteratorWithKey ReverseIteratorWithIndex ReverseIteratorWithKey Enumerable EnumerableWithIndex EnumerableWithKey Sort Container  

Fast trigram-based code search

https://github.com/google/zoekt This uses ngrams (n=3) for searching data, and builds an index containing the offset of each ngram’s occurrence within a file. If we look for “the quick brown fox”, we look for two trigrams (eg. “the” and “fox”), and check that they are found at the right distance apart. Regular expressions are handled by…

Redis-backed WebSockets server

https://github.com/pote/philote Philote is a minimal solution to the websockets server problem, it doesn’t even do most of the work: it acts as a bridge between websockets clients such as browser JavaScript engines and a Redis instance, taking advantage of it’s PubSub capabilities. What it does Philote has two features: it serves websockets connections and it…