Skip to content

Instantly share code, notes, and snippets.

View meerasndr's full-sized avatar
🔧
Tinkering

Meera Sundar meerasndr

🔧
Tinkering
View GitHub Profile
@meerasndr
meerasndr / clojure-learning-list.md
Created December 2, 2022 15:36 — forked from ssrihari/clojure-learning-list.md
An opinionated list of excellent Clojure learning materials

An opinionated list of excellent Clojure learning materials

These resources (articles, books, and videos) are useful when you're starting to learn the language, or when you're learning a specific part of the language. This an opinionated list, no doubt. I've compiled this list from writing and teaching Clojure over the last 10 years.

  • 🔴 Mandatory (for both beginners and intermediates)
  • 🟩 For beginners
  • 🟨 For intermediates

Table of contents

  1. Getting into the language
@meerasndr
meerasndr / latency.txt
Created January 27, 2022 02:19 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@meerasndr
meerasndr / jessfraz.md
Created January 19, 2022 10:36 — forked from acolyer/jessfraz.md
Containers, operating systems and other fun things from The Morning Paper
@meerasndr
meerasndr / slope_vs_starting.md
Created November 3, 2021 02:19 — forked from gtallen1187/slope_vs_starting.md
A little bit of slope makes up for a lot of y-intercept

"A little bit of slope makes up for a lot of y-intercept"

01/13/2012. From a lecture by Professor John Ousterhout at Stanford, class CS140

Here's today's thought for the weekend. A little bit of slope makes up for a lot of Y-intercept.

[Laughter]

@meerasndr
meerasndr / kernel-dev.md
Created August 13, 2021 03:22 — forked from vegard/kernel-dev.md
Getting started with Linux kernel development

Getting started with Linux kernel development

Prerequisites

The Linux kernel is written in C, so you should have at least a basic understanding of C before diving into kernel work. You don't need expert level C knowledge, since you can always pick some things up underway, but it certainly helps to know the language and to have written some userspace C programs already.

It will also help to be a Linux user. If you have never used Linux before, it's probably a good idea to download a distro and get comfortable with it before you start doing kernel work.

Lastly, knowing git is not actually required, but can really help you (since you can dig through changelogs and search for information you'll need). At a minimum you should probably be able to clone the git repository to a local directory.

*C function*
int fact(int n){
if (n <= 1) return 1;
return n * fact(n-1);
}
--
*NASM code*
default rel
global _main
section .data
//This uses char* pointers. The same thing can be done using character arrays as well.
#include<stdio.h>
#include<stdlib.h>
void mystrcpy(char* first, char* second){
while(*first != '\0'){
*second = *first;
first++;
second++;
}

My notes from attempting to read the Dynamo paper ( Dynamo: Amazon's Highly Available Key-value Store)

  1. Introduction
  2. Background
  3. Related work
  4. System Architecture
  5. Implementation
  6. Experiences and Lessons learned
  7. Conclusions

Buzzwords: Key-Value store, primary key, eventual consistency, CAP theorem, hinted handoff, consistent hashing, virtual nodes.

Foreward

This document was originally written several years ago. At the time I was working as an execution core verification engineer at Arm. The following points are coloured heavily by working in and around the execution cores of various processors. Apply a pinch of salt; points contain varying degrees of opinion.

It is still my opinion that RISC-V could be much better designed; though I will also say that if I was building a 32 or 64-bit CPU today I'd likely implement the architecture to benefit from the existing tooling.

Mostly based upon the RISC-V ISA spec v2.0. Some updates have been made for v2.2

Original Foreword: Some Opinion

The RISC-V ISA has pursued minimalism to a fault. There is a large emphasis on minimizing instruction count, normalizing encoding, etc. This pursuit of minimalism has resulted in false orthogonalities (such as reusing the same instruction for branches, calls and returns) and a requirement for superfluous instructions which impacts code density both in terms of size and

Notes from YDKJS (author: Kyle Simpson) - Book 1 - Up & Going

Values and Types

JS has typed values, not typed variables Built-in types:

  • Strings
  • Number
  • Boolean
  • Null and undefined
  • Object