Range Over Ticker In Go With Immediate First Tick

Profile   Tick Toc Croc

The Go standard library has a really cool type – Ticker. Tickers are used when you want to do something at a regular interval, similar to JavaScript’s setInterval. Here’s an example: As per the docs, a ticker is a struct that holds a receive-only channel of time.Time objects. In the example at the beginning of … Read more Range Over Ticker In Go With Immediate First Tick

Connecting To RabbitMQ In Golang

photo 1557431518 26e2500b8680

RabbitMQ is a message broker that’s great for pub-sub systems in a micro-services architecture. At my current day job, we use RabbitMQ in our data ingest pipeline. All the services are written in Go, and they all push data through hundreds of RabbitMQ queues. Let’s take a look at how to efficiently publish and subscribe … Read more Connecting To RabbitMQ In Golang

(Very) Basic Intro To White-Box Cryptography

depositphotos 233639070 stock video abstract 3d monochrom cube rotating

White-box cryptography combines methods of encryption and obfuscation to embed secret keys within application code. The goal is to combine code and keys in such a way that the two are indistinguishable to an attacker, and the new “white-box” program can be safely run in an insecure environment. What Does “White-Box” Mean? In penetration testing, … Read more (Very) Basic Intro To White-Box Cryptography

Using ‘Go Generate’ To Deploy Multi-Process Apps

GE 740x520 1

In microservice architectures, it is fairly common to have a project that includes different worker types. A Makefile can be used to manage the creation of multiple programs, but the Go toolchain has a great tool that can be used as well, go generate. Here are some examples of how we take advantage of ‘go … Read more Using ‘Go Generate’ To Deploy Multi-Process Apps

Use Anonymous Structs For JSON Marshalling in Go

photo 1493476523860 a6de6ce1b0c3

Go is a language built for the web. The Go standard library comes with everything we need to stand up a production web server. Today we are going to explore marshaling JSON using anonymous structs. Anonymous structs can help keep API handlers clean and simple. What Is A Struct? Go’s structs are typed collections of fields. They’re … Read more Use Anonymous Structs For JSON Marshalling in Go

Quantum Programming 101: Superdense Coding Tutorial

Superdense coding

By Macauley Coggins What is Superdense coding ? Superdense coding is a quantum communications protocol that allows a user to send 2 classical bits by sending only 1 qubit. The Protocol Step 1: Preparing the Bell Pair First a bell pair consisting of 2 qubits is prepared. Where q0 is the senders qubit and q1 … Read more Quantum Programming 101: Superdense Coding Tutorial

Announcing Go-TinyTime, Go-TinyDate’s Sister Package

tinyclock

time.Time is the perfect choice for most cases, it even comes in the standard library! The problem is that the time.Time{} struct uses more than 24 bytes of memory under most conditions. Go-TinyTime solves this problem by restricting the available dates to the range between 1970 – 2106, and only supporting UTC timezones. This brings … Read more Announcing Go-TinyTime, Go-TinyDate’s Sister Package