Introduction As you might know, at the re:Invent AWS recently announced the capabilities of running Lambda by getting the code directly from a docker image you provide, as illustrated here. Moreover, they also announced the Amazon ECR Public and Amazon ECR Public Gallery that you can reach at https://gallery.ecr.aws/. And this was pretty much my reaction: What you might need to know before begin First of all: keep calm, because there’s already a Github Repo to build an entire fleet of microservices - with their respective ECR-based repository - with only one command from the shell.
repost · coding · golang · miscellaneous · algorithms coding · golang · busy-beaver · tibor · computational · theory
Preamble This is a repost of an old article :) In 1962, Hungarian mathematician Tibor Radó introduced the Busy Beaver competition for Turing machines: in a class of machines, find one which halts after the greatest number of steps when started on the empty input. Even if it could seem trivial, the Busy Beaver competition has implications in computability theory, the halting problem, and complexity theory. I decided to use GoLang to implement a Turing machine library and accomplish three goals: first, having a Turing Machine model to play with for learning purpose; second, learning how to use interfaces and the factory pattern, other then testing package to test my code and let it be more flexible for future enhancement (at least I hope!
coding · golang coding · golang
Introduction Function composition is something we as developers do every day, more or less. This concept come from Mathematics: if you search on Wikipedia, you find out that function composition is an operation that takes two functions \(f\) and \(g\) and produces a function \(h\) such that \(h(x) = g(f(x))\). In this operation, the function \(g\) is applied to the result of applying the function \(f\) to the input \(x\). That is, the functions \(f: X \rightarrow Y\) and \(g: Y \rightarrow Z\) are composed to yield a function that maps \(x\) in \(X\) to \(g(f(x))\) in \(Z\).
coding · golang coding · golang · channel · goroutine · algorithms · benchmark
Introduction First of all...happy new year! I decided after a while to come back online speaking about Golang. In this post, I will focus on parallelism and concurrency and how you can achieve the same behavioral pattern you can achieve with Node.js using await/async statements, without the difficulties (hopefully) of dealing with Single Threaded Event Loop and these primitives (that, btw, keep things really simple). Let's start! A bit of confusion Concurrency and parallelism are two terms that are bound to come across often when looking into multitasking and are often used interchangeably.
coding · miscellaneous · life hugo · gitlab · aws · golang · holidays · styles
Intro In the last 50 days I had to work a lot for many… many different reasons. The main ones: I was accepted as a Speaker at FullStackConf19 in Turin, talking about coding in mobility. You can find the slide of my speech here and the material I prepared the talk in this Github repo. By the way, I was truly inspired by some of the talks during the conference, and I started brainstorming around the next post; I moved back to Italy and trust me -> it was a pretty complex goal to achieve, with particular regards to my car; I joined Enerbrain and I’m really having fun with theme building smart-energy solution as a Devops Engineer; I joined a softball team - yes, it’s mixed, but it’s officially played also by men hahe.
coding · api · golang coding · golang · api · graphql · guide
Prelude GraphQL is an open-source data query and manipulation language for APIs and a runtime for fulfilling queries with existing data. GraphQL was developed internally by Facebook in 2012 before being publicly released in 2015 because - believe me or not - it was quite tricky for them dealing with their schema. It allows clients to define the structure of the data required, and exactly the same structure of the data is returned from the server, therefore preventing excessively large amounts of data from being returned.
coding · golang · miscellaneous · algorithms coding · golang · busy-beaver · tibor · computational · theory
Preamble In 1962, Hungarian mathematician Tibor Radó introduced the Busy Beaver competition for Turing machines: in a class of machines, find one which halts after the greatest number of steps when started on the empty input. Even if it could seem trivial, the Busy Beaver competition has implications in computability theory, the halting problem, and complexity theory. I decided to use GoLang to implement a Turing machine library and accomplish three goals: first, having a Turing Machine model to play with for learning purpose; second, learning how to use interfaces and the factory pattern, other then testing package to test my code and let it be more flexible for future enhancement (at least I hope!
coding · golang · algorithms coding · golang · unik · cpt · ml · sequence · prediction
Introduction Predicting the next item of a sequence over a finite alphabet has important applications in many domains. Since I always wanted to implemented something like that, while I was looking for an interesting approach I found this interesting idea based on tree. And you don’t deal with trees since a lot, be prepared because as usual it seams simple, but it not. Moreover, since I like Golang and I always wanted to try UniK, I decided to implement my version of the CPT using Golang and use this exercise as a source to build my first unikernel image.
coding · golang · theory · algorithms coding · golang · ann · elman · adding · neural · networks
Introduction This is actually a sort of back-to-the-future post because it’s related to something I completed one year ago: I built this Elman network and it learnt to count. What I shame, I forgot it, now it’s kind of its first birthday so let’s celebrate :D This is Elman, the best in class in adding int32 numbers. For everybody who already knows what I will talk about (what?!), here’s the Github repo.
coding · golang · aws coding · aws · lambda · golang · grafana · sentiment · analysis
Introduction In this article I will talk about my experience with AWS Lambda + API Gateway, GoLang (of course) and Grafana to build a sentiment analysis tool over customizable topics. Who should you read this post? Don’t know, maybe a CIO, a CTO, a CEO, a generic Chief or a MasterChef, for sure an AWS and GoLang fan like me. First of all: to better understand how to use Elasticsearch, read my previous post Elasticsearch over My home Network Attached Storage: it’s not so exciting as it seems, but you will have a general idea about what is Elasticsearch and how can you use it.