CouchDB is a NoSQL database for storing JSON documents. It comes with a REST API out of the box so your client applications can persist data while requiring you to write little or no server-side code. CouchDB's killer feature is its ability to easily replicate, which allows for horizontal scaling, easy backup, and for client adapters to synchronize documents. This is perfect if you want to write an application that is offline-first. It's become my go-to database when creating new
In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.
For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.
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
(* | |
ParserLibrary.fsx | |
Final version of a parser library. | |
Related blog post: http://fsharpforfunandprofit.com/posts/understanding-parser-combinators-3/ | |
*) | |
module TextInput = | |
open System |
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
abstract Fixed16(Int) { | |
inline function new(x:Int) this = x; | |
inline function raw() return this; | |
inline static function RAW(x:Int) return new Fixed16(x); | |
public static var MAX_VALUE:Fixed16 = RAW(0x7fffffff); | |
public static var MIN_VALUE:Fixed16 = RAW(1); | |
@:from public static inline function fromf(x:Float) { | |
#if debug |
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
$ mkdir haxe-droid && cd haxe-droid | |
$ git clone https://github.com/vouillon/ocaml-android.git | |
$ git clone https://github.com/HaxeFoundation/haxe.git | |
$ http://dl.google.com/android/ndk/android-ndk-r9b-darwin-x86.tar.bz2 | |
$ tar -vjxf android-ndk-r9b-darwin-x86.tar.bz2 && rm android-ndk-r9b-darwin-x86.tar.bz2 && mv android-ndk-r9b android-ndk | |
$ wget http://caml.inria.fr/pub/distrib/ocaml-4.01/ocaml-4.01.0.tar.gz | |
$ tar -xzf ocaml-4.01.0.tar.gz && rm ocaml-4.01.0.tar.gz && mv ocaml-4.01.0 ocaml-src |
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
class Main { | |
static function main() { | |
Sdl.init(Sdl.INIT_EVERYTHING); | |
var win = Sdl.createWindow("Hello", 100, 100, 800, 600, Sdl.WINDOW_OPENGL); | |
var ren = Sdl.createRenderer(win, -1, Sdl.RENDERER_ACCELERATED); | |
var bmp = Sdl.loadBMP("test.bmp"); | |
var tex = Sdl.createTextureFromSurface(ren, bmp); | |
Sdl.freeSurface(bmp); | |
for (i in 0...3) { |
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 precog.macro.ValueClass; | |
class ABC implements ValueClass { | |
var a: Int; | |
var b: Bool; | |
var c: String; | |
} | |
/* | |
class ABC extends ValueClass { |
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 sys.FileSystem; | |
import sys.io.File; | |
/** | |
Haxe port of nekoboot.neko for creating executables from neko bytecode. | |
Original version: https://github.com/HaxeFoundation/neko/blob/master/src/tools/nekoboot.neko | |
Usage : nekoboot <file.n> | |
*/ |
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
-- data NamedColor = Red | Green | Blue | |
-- data CustomColor = CustomColor | |
-- { r :: Int | |
-- , g :: Int | |
-- , b :: Int | |
-- } | |
-- data Color = NamedColor | CustomColor | |
create type custom_color as (r int, g int, b int); |
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
package precog.macro; | |
import haxe.macro.Expr; | |
import haxe.macro.Context; | |
class Catamorphism { | |
#if macro | |
public static function build(classes: Array<String>) { | |
var fields = Context.getBuildFields(); | |
fields.push(cataMethod(classes, null)); |
NewerOlder