Skip to content

Instantly share code, notes, and snippets.

Franco Ponticelli fponticelli

Block or report user

Report or block fponticelli

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View stream.js
import Timer from 'ui/timer';
let _listeners = Symbol();
class Source {
constructor(callback) {
this[_listeners] = [];
let sink = (value) => {
Timer.immediate(() => {
this[_listeners].map=> ƒ(value));
fponticelli / CommentBox.hx
Created Jun 1, 2014
react.hx first attempt
View CommentBox.hx
import react.React;
class CommentBox extends React {
static function main() {
@dom '<CommentBox url="comments.json" pollInterval={2000} />',
View Sample.axe
class Sample<T>(value : T) {
def toString = value
View DemoObject.hx
import sui.Sui;
class DemoObject {
public static function main() {
var o = new DemoObject(),
sui = new Sui();
View MapList.hx
package thx.core;
import haxe.Constraints.IMap;
abstract MapList<K, V>(MapListImpl<K, V>) {
public function new();
public inline function set(key:K, value:V) this.set(key, value);
public inline function insert(index : Int, k : K, v : V) : Void this.insert(index, k, v);
@:arrayAccess public inline function get(key:K) return this.get(key);
fponticelli / Main.hx
Created Feb 15, 2015
Minimalistic Webserver with NodeJS + Express + Haxe (with Macros) and an experimental library called restx
View Main.hx
import restx.App;
class Main implements restx.IRoute {
function index()
response.send("Hello World!");
public static function main() {
var app = new App(9998);
app.router.register(new Main());
fponticelli / Auth.hx
Created Feb 24, 2015
sample Auth with abe
View Auth.hx
class Auth implements abe.IRoute {
function login(user : String, password : String) {
fponticelli / Router.hx
Last active Aug 29, 2015
extern issue
View Router.hx
import express.Request;
import express.Response;
import express.Next;
import express.Middleware;
import express.Express;
import abe.Router;
class Main {
public static function main() {
var router = new abe.Router(null);
fponticelli / Main.hx
Created Mar 11, 2015
small js.Promise test
View Main.hx
import js.Promise;
class Main {
static function main() {
var p1 = new Promise(function(resolve, reject) {
p1.then(function(v) trace(v), function(e) trace('NOOO!! $e'));
var p2 = new Promise(function(resolve, reject) {
fponticelli / Lazy.hx
Created Sep 16, 2015
Lazy evaluation of remote files
View Lazy.hx
import js.node.vm.Script;
using thx.promise.Promise;
class Lazy {
static var map : Map<String, Script> = new Map();
public static function load(path : String) : Promise<{} -> String> {
var script = map.get(path);
if(null != script) {
return Promise.value(loadScript(script));
You can’t perform that action at this time.