read


read
or learn more

Linkage 2007.01.15

Jan 15, 2008

Toka<br/> Inferno on the OLPC<br/>

include <iostream>

include <typeinfo>

template<class X> class Reduced { public:         typedef X value; };

template<class X,class Y> class cons         : public Reduced<cons<typename X::value,Y> > { };

class K         : public Reduced<K> { }; class S         : public Reduced<S> { };

template<class X,class Y> class cons<cons<K,X>,Y>         : public Reduced<X> { };

template<class X,class Y,class Z> class cons<cons<cons<S,X>,Y>,Z>         : public Reduced<cons<cons<X,Z>,cons<Y,Z> > > { };

template<class X,class Y = typename X::value> class FixedPoint         : public Reduced<typename FixedPoint<Y,typename Y::value>::value> { };

template<class X> class FixedPoint<X,X>         : public Reduced<X> { };

using std::cout; using std::endl;

int main() {         //         // Run SSSK. Should output SK(SK)         //         cout << typeid(FixedPoint<cons<cons<cons<S,S>,S>,K> >::value).name() << endl << endl;

        return 0; } (link)<br/>

Rails Caching<br/>

Loading up a cached webpage can not only save us from having to do ANY database queries, it can even allow us to serve up websites without touching our Ruby on Rails Server. Sounds kinda magical doesn’t it? Keep on reading for the good stuff.

Small Lisp<br/>

The S-expression is the only data type of Small Lisp, so how do we represent truth values? Using the symbolic atoms T and F for true and false, respectively! (Common Lisp users, note that NIL does not represent false in Small Lisp.)

Aces and Eights RPG<br/>

XP on a USB stick<br/>

Closures in Ruby<br/>

-m

No Comments, Comment or Ping

Reply to “Linkage 2007.01.15”