- Towards a fully-reflective meta-programming language (G. Neverov, P. Roe)
- D-Expressions: Lisp Power, Dylan Style (J. Bachrach, K. Playford)
- The Java Syntactic Extender (J. Bachrach, K. Playford)
- Template Meta-Programming for Haskell (T. Sheard, S.P. Jones)
- First-class macros have types (A. Bawden)
- Macros that work (W. Clinger, J. Rees)
- Macros as multi-stage computations: type-safe, generative, binding macros in MacroML (S.E. Ganz, A. Sabry, W. Taha)
- Hygienic macro expansion (E. Kohlbecker, D. Friedman, M. felleisen, B. Duba)
- Compile-time meta-programming in a dynamically typed OO language (L. Tratt)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
abstract class A { | |
public abstract void hello(); | |
} | |
abstract class B extends A { | |
} | |
class C extends B { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using a sandbox located at /home/ubuntu/Hate/.cabal-sandbox | |
/opt/alex/3.1.3/bin/alex --version | |
/usr/bin/gcc -dumpversion | |
/opt/ghc/7.10.2/bin/haddock --version | |
/opt/happy/1.19.3/bin/happy --version | |
/opt/ghc/7.10.2/bin/hpc version | |
looking for tool hsc2hs near compiler in /opt/ghc/7.10.2/bin | |
found hsc2hs in /opt/ghc/7.10.2/bin/hsc2hs | |
/opt/ghc/7.10.2/bin/hsc2hs --version | |
/opt/ghc/7.10.2/bin/ghc -c /tmp/1804289383846930886.c -o /tmp/16816927771714636915.o |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function WeakMap() { | |
this.keys = []; | |
this.values = []; | |
} | |
WeakMap.prototype.set = function set(k, v) { | |
// look for existing keys first | |
for (var kI = 0; kI < this.keys.length; kI++) { | |
if (this.keys[kI] === k) { | |
this.values[kI] = v; | |
return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//if (hljs) console.log("HLJS OK"); | |
function messageObserverCb(evts) { | |
evts.forEach(function(evt) { | |
for (var i = 0; i < evt.addedNodes.length; i++) { | |
var monologueMsg = evt.addedNodes[i]; | |
if (!monologueMsg) return; | |
// for each added message in a monologue, colour its blocks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- non-lens version (BROKEN) | |
addNativeFunction :: String -> FunctionData -> Context -> Context | |
addNativeFunction name fn ctx = newCtx | |
where | |
newRef :: FunctionRef | |
newRef = (\(FunctionRef i) -> FunctionRef (i+1)) $ fst $ Map.findMax (functions ctx) | |
ctxWithNewRef = ctx { functions = Map.insert newRef fn (functions ctx) } | |
insertNewValue :: TableData -> TableData | |
insertNewValue (TableData td) = TableData $ Map.insert (Str name) (Function newRef) td |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Monad | |
import Control.Monad.ST | |
import Data.STRef | |
imperativeSum :: Num a => [a] -> a | |
imperativeSum xs = runST $ do | |
n <- newSTRef 0 -- Create an STRef (place in memory to store values) | |
forM_ xs $ \x -> do -- For each element of xs .. | |
modifySTRef n (+x) -- add it to what we have in n. |
###Factorio rules
- Don't be a dick
- The player that hosts has to retrieve the most recent save and remember to replace it with the new one when everything has ended
- Destroying of any property requires consent to those that put it down
###Signed players
#Lounge Game Marmalade Rules
- The event takes place on 22 March 2015 between 17:00 and 23:00 UTC.
- Participants may be individuals or teams of two.
- 24 hours before the start of the event, three themes are picked randomly. Each participant has to incorporate two of those themes in their entry.
- Each participant must have their entry published on a publicly available source code repository when the event ends.
- Each entry must be accompanied by a description of its contents, including any build/run/play instructions that might be required.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static const char * const floppy_xpm[] = { | |
"32 32 4 1", | |
". c #FFFFFF", | |
"+ c #4750C8", | |
"@ c #FF0000", | |
"# c #FF00FF", | |
"................................", | |
".++++.@@@@@@@@@@@@@@@@@@@@.++++.", | |
".+..+.@@@@@@@@@@@@@@@@@@@@.++++.", | |
".+..+......................++++.", |