Haxe Code Cookbook
Haxe programming cookbookOther

Other

Overview of Haxe other snippets and tutorials.

  • May 06, 2016 Other /

     static-extension

    Haxe allows you to add static methods to existing classes (eg. Math) via the static extensions feature. The secret sauce is to specify the first parameter of the extension as Class<X> where X is the class you want to add static methods to (eg. Math), and to make the method public.

  • Aug 24, 2017 Other /

    This article shows how to use base64 in Haxe and how to use a custom charset.

  • Oct 21, 2019 Other /

     cpp compiler

    On Windows, the compiler by default expects an installation of Microsoft Visual Studio Community edition when targeting c++.

  • Jul 17, 2018 Other /

     haxelib github travis libraries git

    This tutorial will help you publish your library automatically to lib.haxe.org when you create a release on GitHub.

  • Nov 26, 2018 Other /

     filesystem

    The haxe.zip package allows to zip and unzip files and directories using Haxe. This example shows how to use it.

  • Jan 23, 2024 Other /

     externs hxcpp

    This page covers the differences and use cases of the three main pointer types; cpp.ConstRawPointer and cpp.RawPointer, cpp.ConstPointer and cpp.Pointer, and cpp.Star.

  • Jun 29, 2016 Other /

     arguments

    While there is no named parameter support in Haxe, anonymous structures can be used to obtain the same effect.

  • Jun 16, 2016 Other /

     enum abstract-type pattern-matching type-parameter type-parameter-constraint

    Sometimes you find yourself in the need of passing different types to the same parameter of a function. While there isn't a built-in way of doing this in Haxe, thanks to its flexible type system, we can solve this problem. We will explore two ways to achieve this.

  • Jun 20, 2019 Other /

     server multi-threading hxcpp

    This write-up was inspired by this stack overflow question. While I've worked with sockets before, I wanted to prototype a Haxe HXCPP socket server leveraging secure SSL connections.

  • Oct 11, 2016 Other /

     javascript canvas binary

    This entry came to be after Haxe user anniz shared his experiment which aimed to recreate VGA text rendering in Flash. Soon after, it was proposed and discussed as a potential Code Cookbook entry. You can read more about its history in this repository issue.

  • Oct 14, 2016 Other /

     cppia

    This article is about cppia, a scriptable cpp subtarget for Haxe. A cppia script is a instructions assembly script that can be run inside a cppia host and gives you fast runtime speed at near-zero compilation time. It also lets add performance critical code to the host, wich gives you full cpp runtime speed for those parts.