Skip to content

Instantly share code, notes, and snippets.

View 5alamander's full-sized avatar

ForgiveMyAwfulEngilsh 5alamander

View GitHub Profile
@erikpukinskis
erikpukinskis / ruby_defm.rb
Created April 18, 2011 20:56
My attempt at Lisp CLOS-style method definitions in Ruby
# By default, Ruby invokes class methods based on the number of parameters, ignoring
# the parameter type. I was curious if I could implement the method invocation pattern
# used in Lisp's CLOS, where you can have multiple methods that each accepts the same
# number of paraemters, but with different types.
#
# Needs Ruby 1.9
class Object
def self.defm(sym, *classes, &block)
@defm_methods ||= {}
@staltz
staltz / introrx.md
Last active November 17, 2024 01:08
The introduction to Reactive Programming you've been missing
@jamiltron
jamiltron / NetworkClient.cs
Created November 23, 2015 00:30
Unity LLAPI networking client/server
using System.Collections;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;
using UnityEngine;
using UnityEngine.Networking;
public class NetworkClient : MonoBehaviour {
public string host = "127.0.0.1";
public int port = 8000;