With the recent rise of alternative social media platforms, the Haxe community will get splintered. This is a compilation of users of the Haxe language who has a presence on these platforms.
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
/** | |
* ObjectPool is a type building macro to create array-of-structure or structure-of-array pools. | |
* With the intention being to improve access performance, both in CPU cache coherence and by avoiding the GC | |
* | |
* This implementation is a minimal working proof of concept | |
* | |
* Improvements you may want to make | |
* - Support deallocation of instances and space reclaiming | |
* - Replace haxe.io.Bytes because field access has overhead | |
* |
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
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
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
https://github.com/HaxeFoundation/hashlink/tree/master/other/benchs | |
[Benchmark] | |
└─ [target] [buildtime] : [runtime] | |
--- | |
OS: Arch Linux x86_64 | |
Kernel: 4.17.2-1-ARCH |
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.macro.Context; | |
import haxe.macro.Expr; | |
import haxe.macro.TypeTools; | |
#if !macro | |
@:genericBuild(PartialMacro.build()) | |
#end | |
class Partial<T> {} | |
class PartialMacro { |
Note! Created a repo to replace this gist: https://github.com/cambiata/Haxe-Cppia-Basics Easier to testrun, fork and pr! Thanks, @PDeveloper!
This is a simple testproject created for the single purpose of learning how to use cppia, the scripable "cpp subtarget" for Haxe, created by Hugh Sanderson.
Info about cppia can be found in Hugh's WWX2015 talk (cppia part starts around 15:45).
Please note that this is WORK IN PROGRESS, and that I haven't yet found out to create a working cppia host..! Please step in with discussion and contributions!
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.macro.Context; | |
import haxe.macro.Expr; | |
class Macros { | |
macro public static function autoInt():Array<Field> { | |
var fields = Context.getBuildFields(); | |
var t = switch(Context.getLocalClass().get().kind) { | |
case KAbstractImpl(c): |
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
// In a build system, I like to pass typed compile-time constants to my code | |
// via compiler defines. For example, a host String and a port Int. The | |
// following macros provide functionality to either parse or eval a compiler | |
// define as Haxe code. Since they operate at compile time and inject the | |
// resulting expressions into your code, this retains all type features -- | |
// from type inference to type checking. | |
// | |
// Note that $type prints the type at compile time, while trace prints | |
// the value at runtime. Neko is called simply to demonstrate the latter. | |
import haxe.macro.Context; |
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; | |
abstract OneOf<A, B>(Either<A, B>) from Either<A, B> to Either<A, B> { | |
@:from inline static function fromA<A, B>(a:A) : OneOf<A, B> return Left(a); | |
@:from inline static function fromB<A, B>(b:B) : OneOf<A, B> return Right(b); | |
@:to inline function toA():Null<A> return switch(this) {case Left(a): a; default: null;} | |
@:to inline function toB():Null<B> return switch(this) {case Right(b): b; default: null;} | |
} |
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
# Require some other modules | |
require "openfl/display/Sprite" | |
require "openfl/events/Event" | |
require "openfl/Lib" | |
# Set type of this module to class and extend it by OpenFL sprite | |
module class extends Sprite | |
# Module variables | |
def static appname = "My Application" |
NewerOlder