Posts
-
From Raw Text to Word Vectors: Building a Tokenizer and Word Embeddings with Tenmo [Tenmo]
We build word2vec-style embeddings from scratch with Tenmo (a tensor library built in Mojo) — starting with a custom tokenizer, then training a CBOW model with negative sampling on IMDB reviews, and finally probing the learned vectors for semantic similarity. -
From Bytes to Gradients: Tracing a Neural Network Through Tenmo, One Layer at a Time [Tenmo]
A line-by-line trace of one MNIST training step through Tenmo — from raw memory allocation, through SIMD-vectorized matmul and compile-time autograd, to the SGD parameter update — all in pure Mojo, no Python, no CUDA. -
A solana on-chain contract and off-chain client in rust
https://github.com/ratulb/solana_program_and_rust_client
-
Migrate kubernetes embedded etcd to external etcd - easy back and forth switch
Gist:
-
VPC native kubernetes cluster in GCP
VPC native k8s clusters have quite a few advantages:
-
grpc connect — rust, java and grpc-web
Gist: Route calls from browser(using grpc-web) to rust grpc application(implemented using tonic), which in turn delegates to java grpc and vice versa.
-
Format shell script
snap install shfmt
-
Linus Torvalds on rust in linux
https://www.zdnet.com/article/linus-torvalds-on-where-rust-will-fit-into-linux/
-
Algorithmic Muscle Excercise - maximum subsequence length in rust
Maximum sub-sequence length of 3 strings - bottom up approach:
-
Algorithmic Muscle Excercise - Word Search In Rust
Word search in a grid:
-
Algorithmic Muscle Excercise - Rain Water Trapping Problem In Rust
Water trapped along continuous extent of buildings of different heights:
-
Nesting all the way - kubernetes on openstack on google compute engine
The gist: Can gcp/azure/AWS can be squeezed into one machine?
-
NFS persistent volume and claim in kubernetes
This write up shows detailed steps of how to setup a nfs server as a storage backend and make use of it in POD’s persistent volume via persistent volume claim. These have been tested to work with kubernetes v1.19.3 and nfs v4.2 version ubuntu Ubuntu 18.04.5 LTS.
-
Nested virtualbox VM inside google compute engine
Though guest VM inside google compute engine raises concerns about performance, there are situations where they prove useful. In this post I am going to discuss how we can install a ubuntu guest VM on google compute engine instance.
-
Exploring envoyproxy
With the adoption of micro-services, we need to tackle hosts of issues associated with remote calls and networking - because what used to be an in-process function call now becomes a RPC call that need to be handled by a service which needs to be discovered. Service discovery has its own issues - among others, the most important being able to discover services that are active. Once services are discovered - we need to handle uniform spread of requests among discovered service instances. Traffic encryption becomes another issue that we need to handle once a call goes out over the wire from one micro-service to another.
-
Algorithms and data structures in rust - mergesort
Bets aboutrust are turning out to be right. Initially proposed as system programming language(read servo - rewrite of firefox browser) - numerous front end web frameworks are appearing and becoming ubiquitous. Rust has a steep learning curve - but that is a reasonable investment considering the low level power it gives to do system level things at the same time high level abstraction that comes without the price(zero cost). Borrow and ownership prevent memory issues, move semantics avoids data races, effort less C binding, avoidance of a runtime are some of the salient features of rust. Its implementation of Async & wait is also novel.
-
Quick sort routine in rust
A quick sort routine in rust:

-
Install PySpark on windows
- Install java and expose JAVA_HOME
- Install spark and expose SPARK_HOME
- Install findspark:
-
Kubernetes Secrets in plain English
Want to get a high level view of kubernetes secrets? Read on…
-
Back propagation in neural network training
Back propagation fundamental to neural network training. As always, Andrej Karpathy does a fantastic job explaining how it is calculated and applied during neural network training.Check this out!
-
The essence of a monad
Many people when they encounter the term ‘monad’ for the the first time, they decide to look it up, at least the curious bunch. But when they do consult the blogs, articles, Wikipedia, haskell documentations- explaining the term monad - they become deeply confused and angry at themselves for not being able to make any sense of it - at least people like me, whose brain is not bigger than the size of a peanut. They curse themselves and grok more blogs, articles, try to learn haskell in the hope that, may be this time they would be able to grasp it - but to no avail. Their brain hurts and they become even more confused. As they keep persisting in their efforts -they come across monads being described as elephants, space suits/burritos/fluffy clouds and what not! Some say - you need to know category theory to understand monad, some say no you do not - while people trying understand monad remain in a state of utter confusion for months or maybe years on end. This happened to me also - couple of years back(As I said before my brain is not bigger than a peanut!).
-
Recovering from scala delimited continuation encounter
As I have said before, delimited continuations are wild beasts. Its one of those things that bends and hurts the mind. You might have to spend months in a state of delirium trying to figure them out! In the scala-lang.org’s delimited continuation page, one reader commented and I quote, “From my perspective, these are convoluted ways of adding numbers and I have no idea what is being gained or accomplished”. Reading his comment - I had laughed my heart out -really! I could understand his frustration - even though my plight was only marginally better! So, if this is the first time you are hearing about them - maybe you should do some googling for them before going through rest of the stuff in this post. Once you are sure that you are confused enough - you should take some rest and then start with this post. Hopefully, once you are through with this post - some of the mists would disappear and you will be better equipped to explore them further. So, without further ado, let’s get to them.
-
Scala for the uninitiated java developer: 22 scala things you may not have known
Scala’s popularity is rising among developers. Yet, many java developers have hardly paid any attention to it - thinking it is some sort of esoteric programming langauge isolated from the java main land. They are the target audience of this post. This post is not a tutorial - it presents the scala features with minimum technical detail and tries to show how java and scala reside under the same roof(JVM).
-
Iteratee fundamentals for the beginer
Iteratees are an alternative to commonly prevalent, imperative blocking IO. While reading from a stream, if is data is not available - the reading thread blocks - which is not desirable. The alernative would be to register a callback which gets invoked as data become available. Iteratees are callback handlers and much more. If you have heard about them but not sure what they are - then this post is for you.
-
Asynch concurrency: In the promised land of scala futures
The basics:
-
scala xml wrapper utility
XDoc is a utility wrapper over scala.xml.Elem that simplifies XML processing. -
Deploy play 2.0 app on cloudfoundry
How to deploy a Play 2.0 application on CloudFoundry using the vmc command-line tool. -
Delimited continuations
Understanding Scala's delimited continuations by building a framework to capture and remotely execute frozen computations.