Skip to content

Instantly share code, notes, and snippets.

View NlightNFotis's full-sized avatar
🤔

Fotis Koutoulakis NlightNFotis

🤔
View GitHub Profile
template<class Left, class Right>
struct Either {
union {
Left leftValue;
Right rightValue;
};
bool isLeft;
};
@NlightNFotis
NlightNFotis / map_filter_reduce.rkt
Created June 28, 2016 20:12
A small naive implementation of map, filter and reduce in racket, implemented by myself.
#lang racket
;; This file departs from the book* a little bit, because, reading the book
;; made some older things I had read in the Simply Scheme book "click in".
;; In particular, I finally understood how I could go around and implement
;; map-filter-reduce on my own, so, this is my stab at it.
;;
;; *where book == The Little Schemer
;; Map works as follows: It takes a function argument and a list of atoms, and
@NlightNFotis
NlightNFotis / go_spec
Created March 9, 2016 13:52
Go First Specification
The Go Annotated Specification
This document supersedes all previous Go spec attempts. The intent is
to make this a reference for syntax and semantics. It is annotated
with additional information not strictly belonging into a language
spec.
Recent design decisions
@NlightNFotis
NlightNFotis / stack_symtab.cc
Last active May 5, 2016 10:48
Symbol table implementation based on a stack.
// Copyright (c) 2015 Fotis Koutoulakis.
// See file w_license for details.
#include "stdafx.h"
#include <iostream>
#include "stack_symtab.h"
// Just return a new empty symbol table.
@NlightNFotis
NlightNFotis / keybase.md
Created January 20, 2015 18:39
keybase.md

Keybase proof

I hereby claim:

  • I am nlightnfotis on github.
  • I am nlightnfotis (https://keybase.io/nlightnfotis) on keybase.
  • I have a public key whose fingerprint is 4BD2 02BA 6F46 D1B9 7B08 27D7 D323 2151 30F6 3A6A

To claim this, I am signing this object:

@NlightNFotis
NlightNFotis / version-check.sh
Created February 26, 2013 18:48
Version check for software in linux.
#!/bin/bash
# Simple script to list the version numbers of critical development tools
export LC_ALL=C
bash --version | head -n1 | cut -d" " -f2-4
echo "bin/sh -> `readlink -f /bin/sh`"
echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-
bison --version | head -n1
if [ -e /usr/bin/yacc ];
then echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`";
traceroute to 216.81.59.173 (216.81.59.173), 100 hops max, 60 byte packets
1 router1-dal.linode.com (67.18.7.161) 0.698 ms 0.685 ms 0.756 ms
2 xe-2-0-0.car03.dllstx2.networklayer.com (67.18.7.89) 0.341 ms 0.326 ms 0.311 ms
3 po101.dsr02.dllstx2.networklayer.com (70.87.254.77) 0.584 ms 0.663 ms 0.665 ms
4 po22.dsr02.dllstx3.networklayer.com (70.87.255.69) 0.809 ms 0.861 ms 0.947 ms
5 ae17.bbr02.eq01.dal03.networklayer.com (173.192.18.230) 0.501 ms 0.478 ms 0.451 ms
6 ae7.bbr01.eq01.dal03.networklayer.com (173.192.18.208) 0.475 ms 0.653 ms 10gigabitethernet3-1.core1.dal1.he.net (206.223.118.37) 6.020 ms
7 10gigabitethernet3-1.core1.dal1.he.net (206.223.118.37) 1.455 ms 1.581 ms 10gigabitethernet5-4.core1.atl1.he.net (184.105.213.114) 21.941 ms
8 10gigabitethernet5-4.core1.atl1.he.net (184.105.213.114) 22.013 ms 216.66.0.26 (216.66.0.26) 20.970 ms 21.238 ms
9 10.26.26.102 (10.26.26.102) 58.340 ms 56.423 ms 216.66.0.26 (216.66.0.26) 20.832 ms