This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defclass value () ()) | |
(defclass environment () ()) | |
(defclass continuation () ((k :initarg :k :accessor k))) | |
(defmethod invoke (f v* r k) | |
(error "not a function (f: ~a, r: ~a, k: ~a)" f r k)) | |
(defmethod resume ((k continuation) v) | |
(error "unknown continuation (k: ~a)" k)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'forwardable' | |
class LRUHash | |
# This LRU (Least Recently Used) hash will allow | |
# the cleaning of resources as time goes on. | |
# The goal is to remove the least recently used resources | |
# everytime we set a new resource. A default window of | |
# 5 minutes will allow empty item to stay in the hash | |
# for a maximum of 5 minutes | |
extend Forwardable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"net" | |
"os" | |
"time" | |
) | |
// FIN vs RST Experiment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"math/rand" | |
"os" | |
"time" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Control.Exception | |
import Control.Concurrent | |
import Control.Concurrent.MVar | |
import Control.Monad.Trans.Writer.Strict | |
import Control.Monad.IO.Class | |
import Control.Monad.Trans.Class | |
import Control.Concurrent.Async |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This version of the drive program will only drive on the BLACK lane. | |
* If WHITE turn right, if GREY turn left. | |
* We assume that the only WHITE it encounters will be the inner lane. | |
* This is meant as a working concept so that we have something to present. | |
*/ | |
/* Time taken for 180 degree turn. */ | |
#define time180 1000 |