Skip to content

Instantly share code, notes, and snippets.

@graninas
graninas / What_killed_Haskell_could_kill_Rust.md
Last active September 3, 2025 08:23
What killed Haskell, could kill Rust, too

At the beginning of 2030, I found this essay in my archives. From what I know today, I think it was very insightful at the moment of writing. And I feel it should be published because it can teach us, Rust developers, how to prevent that sad story from happening again.


What killed Haskell, could kill Rust, too

What killed Haskell, could kill Rust, too. Why would I even mention Haskell in this context? Well, Haskell and Rust are deeply related. Not because Rust is Haskell without HKTs. (Some of you know what that means, and the rest of you will wonder for a very long time). Much of the style of Rust is similar in many ways to the style of Haskell. In some sense Rust is a reincarnation of Haskell, with a little bit of C-ish like syntax, a very small amount.

Is Haskell dead?

@cellularmitosis
cellularmitosis / README.md
Last active July 10, 2024 03:56
Trivial performance comparison of some Scheme interpreters

Blog 2019/11/2

<- previous | index | next ->

Trivial performance comparison of some Scheme interpreters

Let's use a trivial (recursive) Fibonacci benchmark to compare the performance of a few Scheme interpreters.

@rain-1
rain-1 / dcs.rkt
Last active September 22, 2023 21:13
Dotted Canonical S-expressions - DCSexps
#lang racket
;; printing s-exps as DCS and TDCS, plus examples of what DCS and TDCS look like
(define (dcs l)
(cond ((pair? l)
(begin
(display ".")
(dcs (car l))
(dcs (cdr l))))
@jdh30
jdh30 / MiniML.ml
Created March 4, 2018 16:02
LLVM-based compiler written in ~100 lines of OCaml
(* See https://groups.google.com/forum/#!msg/fa.caml/i6IgSFX8XkY/4khF8z1V7loJ *)
type expr =
| Int of int
| Var of string
| BinOp of [ `Add | `Sub | `Leq ] * expr * expr
| If of expr * expr * expr
| Apply of expr * expr
type defn = LetRec of string * string * expr
@grav
grav / medley.md
Last active December 4, 2020 04:20
Getting Interlisp-D running with Medley on Debian 3.1

Install VirtualBox (eg on Mac: brew cask install virtualbox)

Download Debian 3.1 from here: https://virtualboxes.org/images/debian/

Create a new VM in VirtualBox and select the vdi file from the above archive as a disk. Check the VM settings:

  • Make sure the disk is mounted as an IDE device, SATA errors out on boot (in the Storage tab)
  • Also, make sure the pointing device is set to PS/2 Mouse (in the General tab)
@teknoraver
teknoraver / unixhttpc.go
Last active September 30, 2025 08:41
HTTP over Unix domain sockets in golang
package main
import (
"context"
"flag"
"fmt"
"io"
"net"
"net/http"
"os"
@Integralist
Integralist / Python3 HTTP Server.py
Last active May 2, 2024 12:35
Python3 HTTP Server.py
import time
from http.server import BaseHTTPRequestHandler, HTTPServer
HOST_NAME = 'localhost'
PORT_NUMBER = 9000
class MyHandler(BaseHTTPRequestHandler):
def do_HEAD(self):
self.send_response(200)
@vinhkhuc
vinhkhuc / simple_mlp_tensorflow.py
Last active June 9, 2025 19:00
Simple Feedforward Neural Network using TensorFlow
# Implementation of a simple MLP network with one hidden layer. Tested on the iris data set.
# Requires: numpy, sklearn>=0.18.1, tensorflow>=1.0
# NOTE: In order to make the code simple, we rewrite x * W_1 + b_1 = x' * W_1'
# where x' = [x | 1] and W_1' is the matrix W_1 appended with a new row with elements b_1's.
# Similarly, for h * W_2 + b_2
import tensorflow as tf
import numpy as np
from sklearn import datasets
from sklearn.model_selection import train_test_split
@Rubentxu
Rubentxu / maybe.go
Created September 24, 2015 23:34
Implementing the Maybe monad in Golang
package main
import (
"fmt"
"errors"
)
type Maybe interface {
Return(value interface{}) Maybe
Bind(func(interface{}) Maybe) Maybe
@josephglanville
josephglanville / ruby_image.sh
Created October 21, 2014 11:26
Create bare Ruby docker image
#!/bin/bash
TARGET=$1
mkdir -p $TARGET
files=$(
dpkg -L ruby | grep '/usr/bin/'
dpkg -L ruby1.9.1 | grep '/usr/bin/'
echo '/usr/lib/ruby'
)