Quantcast
Channel: tech cottage
Browsing latest articles
Browse All 48 View Live

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...

View Article



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...

View Article

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!...

View Article

Fun with scala's for comprehension: Solving sudoku in 11 lines!

Scala's for loop(comprehension) may look deceptively similar to java's for loop, but it is much more powerful than java's for loop. While java's for loop is just to repeat some computation for...

View Article

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...

View Article


Image may be NSFW.
Clik here to view.

Back propagation in neural network training

Back propagation is one of the fundamental building blocks of many neural network models in use today. As always, Andrej Karpathy does a fantastic job explaining how it is calculated and applied during...

View Article

Image may be NSFW.
Clik here to view.

Kubernetes Secrets in plain English

Want to get a high level view of kubernetes secrets? Read on...

View Article

Image may be NSFW.
Clik here to view.

Install PySpark on windows

Install java and expose JAVA_HOMEInstall spark and expose SPARK_HOMEInstall findspark:Launch jupyter lab and use pyspark in notebook:

View Article


Image may be NSFW.
Clik here to view.

Quick sort routine in rust

A quick sort routine in rust:Source: https://github.com/ratulb/algos_in_rust

View Article


Image may be NSFW.
Clik here to view.

Algorithms and data structures in rust - mergesort

Bets about rust 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...

View Article

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...

View Article

Image may be NSFW.
Clik here to view.

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...

View Article

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...

View Article


Image may be NSFW.
Clik here to view.

Kuberenetes cluster on Openstack on a google compute engine

In this post we will deploy a kubernetes cluster on Openstack which itself is deployed on one single GCP compute engine. Provisioning the compute engine: Not all compute engines support virtualization...

View Article

Image may be NSFW.
Clik here to view.

Migrate kubernetes embedded etcd to external etcd - easy back and forth switch

Precursor: How easy is it to setup a single master kubernetes cluster? Quite easy. Might take in the range of 5 to 10 minutes - maybe.How about multi-master cluster? We would need to front the API...

View Article


Image may be NSFW.
Clik here to view.

Algorithmic Muscle Excercise - Rain Water Trapping Problem In Rust

 Water trapped along continuous extent of buildings of different heights:                  Source: https://github.com/ratulb/algos_in_rust/blob/master/rain_water_trapping/src/lib.rs

View Article

Image may be NSFW.
Clik here to view.

Algorithmic Muscle Excercise - Word Search In Rust

 Word search in a grid:                                                                                                                      Source:...

View Article


Image may be NSFW.
Clik here to view.

Algorithmic Muscle Excercise - maximum subsequence length in rust

Maximum sub-sequence length of 3 strings - bottom up approach: Source: https://github.com/ratulb/algos_in_rust/blob/master/max_sub_sequence_bottom_up/src/lib.rs  

View Article

Linus Torvalds on rust in linux

 https://www.zdnet.com/article/linus-torvalds-on-where-rust-will-fit-into-linux/

View Article

Format shell script

snap install shfmt  shfmt -i 2 -ci -w ./*.sh

View Article

Image may be NSFW.
Clik here to view.

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.Note: We use latest versions of various...

View Article


VPC native kubernetes cluster in GCP

 VPC native k8s clusters have quite a few advantages:POD IPs are directly routable. This eliminates the need for a load balancer to hop from node to pod. Instead traffic can reach PODs directly...

View Article


scala xml wrapper utility

XDoc is a utility wrapper over scala.xml.Elem. It's simplifies xml processing. Following needs to be considered while using this utility:1) It does not support namespaces. That can easily incorporated...

View Article

Asynch concurrency: In the promised land of scala futures

The basics:The concept of future is not new - java added them in 1.5 -scala actors had futures from the start, lift webframework had its own futures. As more and more libraries and toolkits sprang up...

View Article

Image may be NSFW.
Clik here to view.

Rust counter program and client on solana

  https://github.com/ratulb/solana_counter_program

View Article

Browsing latest articles
Browse All 48 View Live




Latest Images