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 <stdlib.h> | |
#include <string.h> | |
#include <assert.h> | |
#include "list.h" | |
void list_new(list *list, int elementSize, freeFunction freeFn) | |
{ | |
assert(elementSize > 0); | |
list->logicalLength = 0; |
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
#!/bin/sh | |
# run it instead of cabal | |
find . -maxdepth 2 -name package.yaml -exec hpack {} \; | |
exec cabal "$@" |
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
{-# LANGUAGE CPP #-} | |
module TestServer where | |
#ifndef ghcjs_HOST_OS | |
import Network.Wai.Handler.Warp | |
import Network.Wai.Middleware.Static | |
import Network.WebSockets (defaultConnectionOptions) | |
import Language.Javascript.JSaddle.Run (syncPoint) |
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
# ~/.SpaceVim.d/init.toml | |
# All SpaceVim option below [option] section | |
[options] | |
# set spacevim theme. by default colorscheme layer is not loaded, | |
# if you want to use more colorscheme, please load the colorscheme | |
# layer | |
colorscheme = 'one' | |
colorscheme_bg = 'dark' | |
# Disable guicolors in basic mode, many terminal do not support 24bit |
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 ____modules = {} | |
local ____moduleCache = {} | |
local ____originalRequire = require | |
local function require(file) | |
if ____moduleCache[file] then | |
return ____moduleCache[file] | |
end | |
if ____modules[file] then | |
____moduleCache[file] = ____modules[file]() |
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 ____modules = {} | |
local ____moduleCache = {} | |
local ____originalRequire = require | |
local function require(file) | |
if ____moduleCache[file] then | |
return ____moduleCache[file] | |
end | |
if ____modules[file] then | |
____moduleCache[file] = ____modules[file]() |
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
module Babylon.Data.V where | |
import Data.Aeson | |
import GHC.Generics | |
import JS | |
data V2 = V2 { x, y :: Float } deriving (Show, Generic) | |
instance ToJSVal V2 where | |
toJSVal v = newb "Vector2" [v.x, v.y] |
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
#============================================================================= | |
# dark_powered.toml --- dark powered configuration example for SpaceVim | |
# Copyright (c) 2016-2017 Wang Shidong & Contributors | |
# Author: Wang Shidong < wsdjeg at 163.com > | |
# URL: https://spacevim.org | |
# License: GPLv3 | |
#============================================================================= | |
[options] | |
colorscheme = "one" |
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
-- Something like this | |
$(gen "position" ''Mesh ''V3) | |
-- Should generate that | |
getPosition :: Mesh -> JSM V3 | |
getPosition = get "position" | |
setPosition :: V3 -> Mesh -> JSM () | |
setPosition = set "position" |
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
const | |
mkEvent = <ActionType> (action: ActionType) => (dispatch: Dispatch<ActionType>) => () => dispatch (action) | |
, mkEventF = <A, ActionType> (f: (x: A) => ActionType) => (dispatch: Dispatch<ActionType>) => (x: A) => dispatch (f (x)) |
OlderNewer