Skip to content

Instantly share code, notes, and snippets.

View profelis's full-sized avatar

Dima Granetchi profelis

View GitHub Profile
@profelis
profelis / Makefile
Last active July 14, 2023 07:06
how to build hashlink on MacBook with M1/arm cpu
LBITS := $(shell getconf LONG_BIT)
MARCH ?= $(LBITS)
PREFIX ?= /usr/local
INSTALL_DIR ?= $(PREFIX)
INSTALL_BIN_DIR ?= $(PREFIX)/bin
INSTALL_LIB_DIR ?= $(PREFIX)/lib
INSTALL_INCLUDE_DIR ?= $(PREFIX)/include
LIBS=fmt sdl ssl openal ui uv mysql
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x18f60584c __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x18f642638 _pthread_cond_wait + 1232
2 BasicWindow-debug 0x104c51b8c HxSemaphore::Wait() + 68 (Thread.h:234)
3 BasicWindow-debug 0x104c49048 hx::DebuggerContext::DoBreak(hx::DebugStatus, int, String const*) + 496 (Debugger.cpp:304)
4 BasicWindow-debug 0x104c5196c hx::DebuggerContext::Break(hx::DebugStatus, int, String const*) + 128 (Debugger.cpp:344)
5 BasicWindow-debug 0x104c48d58 hx::Breakpoints::HandleBreakpoints(hx::StackContext*) + 912 (Debugger.cpp:677)
6 BasicWindow-debug 0x104c4899c __hxcpp_on_line_changed(hx::StackContext*) + 24 (Debugger.cpp:1478)
7 BasicWindow-debug 0x104b3bb4c BasicWindow_obj::main() + 432 (BasicWindow.cpp:38)
8 BasicWindow-debug 0x104c0dec4 __hxcpp_main + 32 (__mai
@profelis
profelis / README.MD
Last active February 29, 2020 15:29
haxe + numba

Haxe + numba sample

$ haxe build.hxml

$ python testhx.py
Test.hx:28: 499999700005.0959
Test.hx:29: first calc, 0.20508950000000015
Test.hx:33: 499999700005.0959
Test.hx:34: second calc, 0.05553469999999994
@profelis
profelis / brew-cask-upgrade.sh
Created June 24, 2016 00:32 — forked from c00kiemon5ter/brew-cask-upgrade.sh
a portable shell script to upgrade cask packages
#!/bin/sh
help=0
latest=0
verbose=0
status=0
usage() {
cat <<-EOF
${0##*/} [options]
@profelis
profelis / ElvisReflect.hx
Last active December 24, 2015 09:38
ElvisReflect.hx
using haxe.macro.ExprTools;
import haxe.macro.Context;
import haxe.macro.Expr;
class ElvisReflect {
@:noUsing macro static public function fast(args:Array<Expr>) {
if (args.length == 0) return macro {};
function map(e:Expr):Expr {
@profelis
profelis / getField.hx
Last active December 19, 2015 17:38
ClassField -> Field
function getField(field:ClassField):Field {
var typedExpr = field.expr();
var expr = typedExpr != null ? Context.getTypedExpr(typedExpr) : null;
var f = {
name: field.name,
doc: field.doc,
pos: field.pos,
meta: field.meta.get(),
kind: null,
@profelis
profelis / ElseMacros.hx
Created May 30, 2013 19:44
while () {} else {} for () {} else {}
package ;
import haxe.macro.Expr;
/**
* ...
* @author deep <system.grand@gmail.com>
*/
class ElseMacros
{
@profelis
profelis / Measure.hx
Created May 30, 2013 13:12
Measure macros (Haxe 3)
package ;
#if macro
import haxe.macro.Context;
import haxe.macro.Expr;
#end
/**
* ...
* @author deep <system.grand@gmail.com>
*/
class Measure
@profelis
profelis / Stats.hx
Created February 3, 2013 11:47
h3d stats based on mrdoob stast.as. show Engine.drawTriangles, Engine.drawCalls and Engine.mem.stats()
/**
* stats.hx
* http://github.com/mrdoob/stats.as
*
* Released under MIT license:
* http://www.opensource.org/licenses/mit-license.php
*
* How to use:
*
* addChild( new Stats(engine) );
From 7ade5f2830bdba1d442859ddb4e0f18cab19b31f Mon Sep 17 00:00:00 2001
From: profelis <system.grand@gmail.com>
Date: Fri, 14 Dec 2012 15:15:48 +0200
Subject: [PATCH] [jeash] Allow override requestHeaders
---
jeash/net/URLLoader.hx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/jeash/net/URLLoader.hx b/jeash/net/URLLoader.hx