Skip to content

Instantly share code, notes, and snippets.

View AxGord's full-sized avatar
🦄
Pony

Alexander Gordeyko AxGord

🦄
Pony
View GitHub Profile
package;
import pony.Priority;
import haxe.Constraints.Function;
#if (cs||java)
typedef Listener1<T1> = {args:Int, f:T1->Void};
#else
typedef Listener1<T1> = T1->Void;
#end
Neko
Main.hx:27: 224.676000595093
Main.hx:40: 356.434999465942
Cpp (32bit)
Main.hx:27: 20.1340007781982
Main.hx:40: 106.84700012207
C# (64bit)
Main.hx:27: 15.3541984558105
Main.hx:40: 234.727904319763
Java
import pony.net.http.HttpServer;
import pony.net.http.IHttpConnection;
class HttpServerExample {
static function main() {
new HttpServer().request = function(connection:IHttpConnection) {
connection.sendText('Hello world');
};
}
package;
import pony.net.SocketClient;
import pony.net.SocketServer;
class StringSocketExample
{
static function main()
{
@AxGord
AxGord / SlowServer.hx
Last active August 29, 2015 14:14
Haxe/Node.JS simple slow server for testing loaders.
package;
import haxe.Timer;
import js.Node;
/**
* SlowServer
* @author AxGord
*/
class SlowServer {
@AxGord
AxGord / Main.hx
Created October 27, 2014 12:32
Appveyor munit helper
package;
import sys.io.File;
/**
* Appveyor munit helper
* @author AxGord
*/
class Main {
package;
import js.Node;
import pony.math.Matrix;
import pony.midi.devices.Launchpad;
import pony.midi.devices.LaunchpadColor;
import pony.text.TextTools;
import pony.time.Timer;
using pony.Tools;
package ;
import haxe.Log;
import pony.events.Event;
import pony.xr.modules.Object;
import pony.xr.modules.Op;
import pony.xr.modules.V;
import pony.xr.XmlRequest;
using pony.Tools;
@AxGord
AxGord / MySQLExample.hx
Created August 6, 2014 09:57
Pony Async MySQL, ready for nodejs, neko
package ;
import com.dongxiguo.continuation.Continuation;
import haxe.CallStack;
import haxe.Log;
import haxe.PosInfos;
#if nodejs
import js.Node;
#end
import pony.db.mysql.Flags;
cd C:\HaxeToolkit\haxe
rd std /s /q
rd haxe-3.1.3 /s /q
del haxe.exe
del haxelib.exe
del haxe_latest.tar.gz
wget http://hxbuilds.s3-website-us-east-1.amazonaws.com/builds/haxe/windows/haxe_latest.tar.gz
7z e haxe_latest.tar.gz -y
7z x haxe_latest.tar -y
move haxe-3.1.3\std .