- OS X Mountain Lion (10.8.1)
- XCode 4.5.1 with "Command Line Tools" installed in Preferences > Downloads > Components
- MacPorts Mountain Lion installer.
Install dependencies: (you might want a grab a coffee)
sudo port install boehmgc pcre mysql5 ocaml| mkdir ~/source | |
| # dependencies | |
| sudo apt-get update | |
| sudo apt-get install libgc-dev bzip2 git-core make gcc g++ gnuplot glade imagemagick libusb-dev python-usb python-lxml python-wxgtk2.8 speech-dispatcher libgnomecanvas2-dev m4 libsdl1.2-dev | |
| # neko | |
| git clone https://github.com/HaxeFoundation/neko.git ~/source/neko | |
| cd ~/source/neko | |
| make |
| class Test | |
| { | |
| public static var instance(default, null):Test = new Test(); | |
| public static var lazy(get, null):Test; | |
| static function get_lazy() return lazy == null ? lazy = new Test() : lazy; | |
| static function main() | |
| { | |
| trace(instance); |
| class Test | |
| { | |
| static function main() | |
| { | |
| draw(0xFF); | |
| draw(function(x,y){ return 0xFF0000; }); | |
| // draw(function(x,y){ return "foo"; }); // compile error, not color | |
| } | |
| static function draw(color:Color) |
| From 045276ae065567ca2610ef4976c823c54473fa89 Mon Sep 17 00:00:00 2001 | |
| From: David Peek <david.peek@me.com> | |
| Date: Tue, 11 Jun 2013 11:13:18 +1000 | |
| Subject: [PATCH] Patch required by homebrew formula - no static, paths | |
| --- | |
| Makefile | 7 ++++--- | |
| src/tools/install.neko | 2 +- | |
| 2 files changed, 5 insertions(+), 4 deletions(-) |
| class Main | |
| { | |
| public static function main() | |
| { | |
| trace(haxe.Json.stringify({a:1,b:2,c:3}, function(k,v){ | |
| return k == "" ? v : v + 10; | |
| })); | |
| } | |
| } |
| class Test | |
| { | |
| public static function main() | |
| { | |
| var test = new Test(); | |
| trace(test.style); | |
| } | |
| public function new() | |
| { |
| package js; | |
| import js.TypedArray; | |
| import js.Canvas; | |
| import js.type.DOMType; | |
| import js.type.GLType; | |
| import js.type.Core; | |
| import js.type.Event; | |
| import js.type.Object; |
| #if macro | |
| using haxe.macro.Tools; | |
| using haxe.macro.Expr; | |
| #end | |
| enum Foo | |
| { | |
| bar; | |
| } |
| // Test.hx | |
| @:build(Builder.build()) class Test | |
| { | |
| /** | |
| Docs! | |
| */ | |
| public static function main() {} | |
| } |
Install dependencies: (you might want a grab a coffee)
sudo port install boehmgc pcre mysql5 ocaml