Skip to content

Instantly share code, notes, and snippets.

@Yanrishatum
Yanrishatum / hlc.md
Last active April 8, 2023 15:50
How to compile HL/C

How to compile HL/C

Prepwork/terms

Because I have no trust in people.

  • <hashlink> points to your installation of Hashlink, e.g. folder in which hl.exe (or Unix executable) is, alongside with library binaries (.hdll files), and include folder.
  • <src> points to the folder containing generated HL/C sources. One that contains hlc.json file.
  • <app> refers to your output executable name, including extension.
  • <main> refers to your entry-point file name, including extension (see below).
  • I provide example of doing it on Windows via MSVC cl.exe, but Unix should be more or less same with replacement of argument flags and compiler.
  • I expect that you DO have a compiler installed and can call cl.exe or other compiler from command-line.
@nadako
nadako / Main.hx
Created June 24, 2015 19:36
Haxe + SDL = native love \o/
class Main {
static function main() {
Sdl.init(Sdl.INIT_EVERYTHING);
var win = Sdl.createWindow("Hello", 100, 100, 800, 600, Sdl.WINDOW_OPENGL);
var ren = Sdl.createRenderer(win, -1, Sdl.RENDERER_ACCELERATED);
var bmp = Sdl.loadBMP("test.bmp");
var tex = Sdl.createTextureFromSurface(ren, bmp);
Sdl.freeSurface(bmp);
for (i in 0...3) {
@agibsonsw
agibsonsw / PythonCompletions.py
Created March 14, 2012 22:05
Python completions (efficient)
import sublime, sublime_plugin
py_funcs = [
("abs()\tabs fn", "abs(${1:number})$0"),
("all()\tall fn", "all(${1:iterable})$0"),
("any()\tany fn", "any(${1:iterable})$0"),
("bin()\tbin fn", "bin(${1:integer})$0"),
("bool()\tbool fn", "bool(${1:[value]})$0"),
("bytearray()\tbytearray fn",
"bytearray(${1:${2:source}${3:[, encoding]}${4:[, errors]}})$0"),