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 lua.Lua; | |
import lua.Ffi; | |
class Main { | |
static function main() { | |
var d = Clock.realtime64(); | |
var d2 = Clock.realtime64(); | |
trace(d2 - d + " is the value for d2 - d"); | |
trace(d2 - 1 + " is the value for d2 - 1"); | |
} |
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 haxe.ds.Either; | |
class Main { | |
static function main() { | |
trace("HI"); | |
var t : WildMap = ["a" => 1, "b"=> 2]; | |
var f = function(x : Map<Int,String>){ | |
trace(x); | |
for (k in x.keys()){ | |
trace(k); | |
} |
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 haxe.Timer; | |
class Main { | |
static function main() { | |
var num = 10000000; | |
var indexcnt =10000 ; | |
var k = []; | |
var junk : Array<Dynamic> = []; | |
var start = Timer.stamp(); | |
walltime(function(){ | |
for (i in 0...num){ |
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
"["B001B8FXOS","B00TQEZAHO","B00ZV9PXP2","B01EHSMOOK","B00OQVZDJM","B01ILWWG1Y","B01CJ4LJ68","B00MSOND8C","B01C83BE6U","B00KJGY3TO","B00ZFFN656","B00HALPPM0","B015QJ4762","B00E0IWGFA","B01LZF12AY","B000J03ATO","B00O27WXYS","B01CS4RSBE","B01NAAHIAY","B0036AWTDM","B014X2264S","B01KUD6DM0","B0149YVCDQ","B00NIN4SDQ","B00NIMYVJ8","B013AW9LXQ","B012I499WK","B013RZREA8","B01KUD70MC","B01KUD5K3S","B01KUD5RBS","B016K2OH6O","B0193RWAEO","B01ABQBIQW","B01MTQVRUG","B000INOXN4","B006SFUD44","B004813L0S","B0043RSSHI","B01BFIBRIE","B006E7I7MG","B00FLYWNYQ","B01LYGZMMB","B0073GIN08","B01N65TIDD","B00E3R3VRK","B00HMC0LJY","B00M77US74","B01J1MFH3M","B00063T0CA","B0157Z4IS2","B00PC4YR62","B015CD6NVE","B01GHN88HU","B01CL57LF8","B01HA72TB8","B01CV7X448","B016ULRGPE","B01FU98R1E","B01LWU8IWH","B01MQ03ELX","B01LVV0SW7","B01C2PA0KK","B01GIKGUAY","B00JP9ALW4","B01K63R7HY","B01KBPD5Z0","B01LZYA452","B01LYGCK1M","B00SBXBQDS","B01IFJBQ1E","B00N3RFC4G","B014PDFP9S","B00TD4RTEE","B019HHXKQM","B00QGHFW4K","B00TGZRCVA","1499351119","B01CVGV |
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
using haxe.Int64; | |
import haxe.Int64.*; | |
class Main { | |
static function main(){ | |
var a:Int64 = 0; | |
eq( Std.string( a ), "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
class Main { | |
static function main() { | |
var us = new Unsafe("<b>hi!</b>"); | |
foo(us); | |
} | |
static function foo(s:String){ | |
trace(s); | |
} | |
} |
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
" Vim syntax file | |
" Language: Haxe | |
" Maintainer: Luca Deltodesco <[email protected]> | |
" Last Change: 2013 August 26 | |
if exists("b:current_syntax") | |
finish | |
endif | |
command! -nargs=+ HaxeHiLink hi def link <args> |
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 ; | |
using TestX.Eqs; | |
// consider the following interfaces | |
interface Compare<T> { | |
public function compare(b:T):Int; | |
} | |
interface Eq<T> { |
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 | |
# installhaxe.sh | |
# | |
# Build the haxe compiler | |
# ===================== | |
# - download 'install.ml' and execute it (compiles the haxe compiler) | |
# - copy the executables and modify the evironment variables | |
cd tmp | |
if [ ! -d haxesrc ] | |
then mkdir haxesrc |
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
export OLDPATH=$PATH | |
export HAXE_NIGHTLY=$HOME/bin/haxe_nightly | |
hxn(){ | |
if [ -z "$USE_HAXE_NIGHTLY" ] || $USE_HAXE_NIGHTLY; then | |
echo "Changing to Haxe stable version" | |
export HAXE_STD_PATH=$OLD_HAXE_STD | |
export PATH=$OLDPATH | |
export USE_HAXE_NIGHTLY=false | |
else | |
echo "Changing to Haxe nightly at: $HAXE_NIGHTLY" |