Skip to content

Instantly share code, notes, and snippets.

@xavriley
xavriley / README.md
Created March 23, 2016 19:26
Writing a C extension for Ruby to parse and unparse OSC messages

This is a note for myself more than anything. I've started on a wrapper for the rtosc library https://github.com/fundamental/rtosc

The aim is to make a gem called FastOsc that will have two methods

FastOsc.serialise(["/aa", "foo", "bar"]) #=> "/aa\x00ss\x00\x00foo\x00bar\x00"
FastOsc.deserialise("/aa\x00ss\x00\x00foo\x00bar\x00") #=> ["foo", "bar"]

This followed from the rtosc library author giving me a really helpful response. fundamental/rtosc#28

@smarr
smarr / truffle-material.md
Last active May 9, 2024 08:19
Truffle: Languages and Material
@ahoward
ahoward / caching-https-creds.markdown
Created June 6, 2012 21:42
Fix Username/Password prompting for github repos cloned via https scheme

github recently switched to an https scheme as the default for cloning repos. as a side effect you may suddenly be prompted for a 'Username' and 'Password' when you push where, previously, you were able to do so without typing in credentials. the solution is to cause git to cache https credentials which is easy, since git uses curl under the covers

in your home directory create a file called '.netrc', for example

/Users/ahoward/.netrc

in it put these contents

@hosiawak
hosiawak / irb_session.rb
Created June 12, 2011 12:53
Rubinius AST transform by sublassing Melbourne
# The goal is to not use the regular Symbol#to_proc
# (which is to_proc method in the Symbol class)
# but rather use an Abstract Syntax Tree transformation to
# transform map(&:to_s) into map {|x| x.to_s}
# This can be achieved by using the flexible compiler architecture
# in Rubinius and is presented below.
#
# First we undefine the regular Symbol#to_proc
class Symbol
We couldn’t find that file to show.