Skip to content

Instantly share code, notes, and snippets.

@rougier
rougier / clean.el
Created May 10, 2020 02:43
A very minimal but elegant emacs configuration file
(require 'org)
(setq-default indent-tabs-mode nil)
(setq org-display-inline-images t)
(setq org-redisplay-inline-images t)
(setq org-startup-with-inline-images "inlineimages")
(setq default-frame-alist
(append (list '(width . 72) '(height . 40))))
@techtheriac
techtheriac / lambdajs.md
Last active December 28, 2020 20:19
A subtle introduction to Lambda Calculus for the JavaScript Developer

Lambda (λ) Calculus For Javascript Developers

This article aims at explaining lambda calculus in a more approachable less 'mathy' manner.

Terms That Are Good To Know

  • Memoization: Memoization is an optimization technique used primarily to speed up computer programs by caching the result of expensive function calls and returning the cached result when fed with the same input.

  • Pure Function: A pure function is a function whose computation does not depend on globally declared variables, it does no I/O or mutations. All it does is return a value after doing a bunch of computations on the arguments it recieves. For a given set of arguments, a pure function will always return the same value. Thus, a pure function is one that is memoizable.

@lunacookies
lunacookies / syntax_ideas.md
Last active May 7, 2020 01:37
Some Syntax Ideas

What is this?

I’m working on a new language (Fjord) for a shell (fj). Although I have some ideas of my own for syntax, I’m not sure if they’re a really bad idea or if they’re fine, so I’ve decided to conduct a ‘sanity check’ of sorts by writing some preliminary ideas down here. Please respond down in the comments with any thoughts you have!

General philosophy

Note: throughout this document I’ll refer to functions, which are what I’m calling commands.

As this is a language for a shell,

@alinarezrangel
alinarezrangel / class.js
Created October 12, 2016 23:11
Fake JavaScript classes (ES5 or ES6)
function Extends(base, child)
{
'use strict';
if((typeof base !== 'object') || (typeof child !== 'object'))
{
throw new TypeError('Error at Extend(base, child): the base or the child arent objects');
}
child._super = {};
for(let i in base)
{
@staltz
staltz / introrx.md
Last active October 26, 2025 03:06
The introduction to Reactive Programming you've been missing
@jboner
jboner / latency.txt
Last active November 1, 2025 21:13
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