This file contains 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 qualified IPPrint | |
import qualified Language.Haskell.Colorize as Colorize | |
import qualified Language.Haskell.HsColour as HsColour | |
import qualified Language.Haskell.HsColour.Colourise as HsColour | |
import qualified Language.Haskell.HsColour.Output as HsColour | |
let myColourPrefs = HsColour.defaultColourPrefs { HsColour.conid = [HsColour.Foreground HsColour.Yellow, HsColour.Bold], HsColour.conop = [HsColour.Foreground HsColour.Yellow], HsColour.string = [HsColour.Foreground HsColour.Green], HsColour.char = [HsColour.Foreground HsColour.Cyan], HsColour.number = [HsColour.Foreground HsColour.Red, HsColour.Bold], HsColour.layout = [HsColour.Foreground HsColour.White], HsColour.keyglyph = [HsColour.Foreground HsColour.White] } | |
let myPrint = putStrLn . HsColour.hscolour (HsColour.TTYg HsColour.XTerm256Compatible) myColourPrefs False False "" False . IPPrint.pshow |
This file contains 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
randoms = 20 | |
width = 800 | |
height = 500 | |
function love.load() | |
love.graphics.setMode(width, height, false, false, 0) | |
randomCounts = {} | |
for i=0,randoms do randomCounts[i] = 0 end | |
end |
This file contains 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
width = 640 | |
height = 360 | |
function newWalker() | |
return { x=width/2, y=height/2 } | |
end | |
function love.load() | |
love.graphics.setMode(width, height, false, false, 0) | |
walker = newWalker() |
This file contains 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
xterm*faceName: Source Code Pro:pixelsize=11 | |
xterm*saveLines: 2000 | |
xterm*charClass: 33:48,35:48,37:48,43:48,45-47:48,64:48,95:48,126:48,35:48 | |
xterm*termName: xterm-color | |
xterm*scrollBar: false | |
xterm*internalBorder: 1 | |
xterm*scrollKey: true | |
xterm*dynamicColors: true | |
xterm*utf8: 2 |
This file contains 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 qualified Data.Vector.Unboxed as V | |
-- ... | |
ghci> V.replicate (2^32 :: Int) 0 | |
fromList <interactive>: out of memory (requested 34360786944 bytes) | |
ghci> V.replicate (2^32 :: Int) (2 :: Word32) | |
fromList <interactive>: out of memory (requested 17180917760 bytes) |
This file contains 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
Show hidden characters
[ | |
{ "keys": ["ctrl+shift+r"], "command": "expand_selection_to_paragraph" }, | |
{ "keys": ["ctrl+u"], "command": "scroll_lines", "args": {"amount": 30.0}, "context": [{ "key": "setting.command_mode" }]}, | |
{ "keys": ["ctrl+d"], "command": "scroll_lines", "args": {"amount": -30.0}, "context": [{"key": "setting.command_mode"}]}, | |
{ "keys": ["j", "k"], "command": "exit_insert_mode", | |
"context": | |
[ | |
{ "key": "setting.command_mode", "operand": false }, | |
{ "key": "setting.is_widget", "operand": false } | |
] |
This file contains 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
#include <string> | |
#include <sstream> | |
#include <iostream> | |
class AddExp; | |
class MulExp; | |
class Number; | |
class ExpVisitor { | |
public: |
This file contains 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 makeChar(x, y) | |
local o = {} | |
o.x = x | |
o.y = y | |
o.body = love.physics.newBody(world, x, y, "dynamic") | |
o.body:setMass(5) | |
o.body:setFixedRotation(true) | |
o.shapeLeft = love.physics.newCircleShape(-20, 0, 5) |
This file contains 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
local filePathDialog | |
local filePathInput | |
local filePathButton | |
function love.load() | |
love.graphics.setMode(500, 500, false, false, 0) | |
require("LoveFrames") | |
filePathDialog = loveframes.Create("frame") |
This file contains 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
# typstr "run((fun c -> <(let x = 1 in ~c, let y = 1 in ~c)>) <0>);;";; | |
typ <-- [0] | |
typ --> <fun> | |
typ* <-- | |
env | |
typ* --> <fun> | |
typ** <-- | |
RunE | |
(AppE |