Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
| ; ModuleID = 'struct1' | |
| ; Object = struct | |
| ; foo = 1 | |
| %ObjectT = type <{ i64 }> ; foo | |
| @ObjectS = private unnamed_addr constant %ObjectT <{ i64 1 }> | |
| ; Shape = struct Object | |
| ; color = 0xff0000 | |
| ; area = func () 0 | |
| ; fillColor = func () @color / @area! |
| (function() { | |
| "use strict"; | |
| Object.defineProperty(HTMLLinkElement.prototype, 'template', { | |
| get: function() { | |
| if(!/template/i.test(this.rel)) { | |
| return ""; | |
| } | |
| var req = new XMLHttpRequest(); |
| (defn distincto | |
| "s is a sequence of sequence of vars. | |
| ensure that vars in each particular sequence | |
| take on distinct values." | |
| [s] | |
| (if (seq s) | |
| (let [vars (first s)] | |
| (all | |
| (distinctfd vars) | |
| (distincto (next s)))) |
| Memoization is fundamentally a top-down computation and dynamic | |
| programming is fundamentally bottom-up. In memoization, we observe | |
| that a computational *tree* can actually be represented as a | |
| computational *DAG* (the single most underrated data structure in | |
| computer science); we then use a black-box to turn the tree into a | |
| DAG. But it allows the top-down description of the problem to remain | |
| unchanged. | |
| In dynamic programming, we make the same observation, but construct | |
| the DAG from the bottom-up. That means we have to rewrite the |
| #lang racket | |
| ;; OO-machine | |
| ;; A heady mixture of TNG-R4, | |
| ;; Jay&Kesner's Pure Pattern Calculus, and | |
| ;; Cardelli&Abadi's ς calculus. | |
| (require redex) | |
| (require rackunit) | |
| (define-language oc |
| function go() { | |
| var userId = prompt('Username?', 'Guest'); | |
| // Consider adding '/<unique id>' if you have multiple games. | |
| var gameRef = new Firebase(GAME_LOCATION); | |
| assignPlayerNumberAndPlayGame(userId, gameRef); | |
| }; | |
| // The maximum number of players. If there are already | |
| // NUM_PLAYERS assigned, users won't be able to join the game. | |
| var NUM_PLAYERS = 4; |
| @font-face { | |
| font-family: 'EntypoRegular'; | |
| src: url('font/entypo.eot'); | |
| src: url('font/entypo.eot?#iefix') format('embedded-opentype'), | |
| url('font/entypo.woff') format('woff'), | |
| url('font/entypo.ttf') format('truetype'), | |
| url('font/entypo.svg#EntypoRegular') format('svg'); | |
| font-weight: normal; | |
| font-style: normal; | |
| } |
| data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> |
| # Description: | |
| # Keep a variaty of logs | |
| # | |
| # Dependencies: | |
| # | |
| # Configuration: | |
| # | |
| # Commands: | |
| # hubot logs - shows all logs stored | |
| # hubot <name>log last <number> - show last number of logs |
Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007