Skip to content

Instantly share code, notes, and snippets.

View metaleap's full-sized avatar

Phil Schumann metaleap

View GitHub Profile
@metaleap
metaleap / copied.h
Created January 17, 2025 18:42
CWicked wrapup
#pragma once
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/// C-only API:
@metaleap
metaleap / main2.cpp
Created January 16, 2025 11:24
Just adjust paths in L2 and L46-47
// Adjust paths in L2 and L46-47
#include "../../.wi/WickedEngine/WickedEngine.h"
class Render : public wi::RenderPath3D {
public:
};
class App : public wi::Application {
@metaleap
metaleap / main.cpp
Last active January 14, 2025 23:15
NOTE: adjust paths in L1 & L112-113
#include "../../.wi/WickedEngine/WickedEngine.h"
// to repro, change path above AND also L112-113
class Game : public wi::RenderPath3D {
public:
Game() = default;
~Game() = default;
void Load() override;
@metaleap
metaleap / the-log.txt
Created January 8, 2025 18:41
Log of `nim cpp src/demos/CharacterControllerLua/CharacterControllerLua.nim`
reference to `lua_pushvalue'
/usr/bin/ld: wiAudio_BindLua.cpp:(.text._ZN4LunaIN2wi3lua13Sound_BindLuaEE15property_getterEP9lua_State[_ZN4LunaIN2wi3lua13Sound_BindLuaEE15property_getterEP9lua_State]+0x27): undefined reference to `lua_rawget'
/usr/bin/ld: wiAudio_BindLua.cpp:(.text._ZN4LunaIN2wi3lua13Sound_BindLuaEE15property_getterEP9lua_State[_ZN4LunaIN2wi3lua13Sound_BindLuaEE15property_getterEP9lua_State]+0x34): undefined reference to `lua_isnumber'
/usr/bin/ld: wiAudio_BindLua.cpp:(.text._ZN4LunaIN2wi3lua13Sound_BindLuaEE15property_getterEP9lua_State[_ZN4LunaIN2wi3lua13Sound_BindLuaEE15property_getterEP9lua_State]+0x5b): undefined reference to `lua_tonumberx'
/usr/bin/ld: wiAudio_BindLua.cpp:(.text._ZN4LunaIN2wi3lua13Sound_BindLuaEE15property_getterEP9lua_State[_ZN4LunaIN2wi3lua13Sound_BindLuaEE15property_getterEP9lua_State]+0x6c): undefined reference to `lua_touserdata'
/usr/bin/ld: wiAudio_BindLua.cpp:(.text._ZN4LunaIN2wi3lua13Sound_BindLuaEE15property_getterEP9lua_State[_ZN4LunaIN2wi3lua13Sound_BindLuaE
grammar Atmo;
// $antlr-format alignTrailingComments true, columnLimit 180, maxEmptyLinesToKeep 1, reflowComments false, useTab false
// $antlr-format allowShortRulesOnASingleLine true, allowShortBlocksOnASingleLine true, minEmptyLines 0, alignSemicolons ownLine
// $antlr-format alignColons trailing, singleLineOverrulesHangingColon true, alignLexerCommands true, alignLabels true, alignTrailers true
comment : LINE_COMMENT | COMMENT;
expr:
'(' expr ')' # ParensExpr
(import :std/sugar
:std/text/json)
(defsyntax defcls
(syntax-rules ()
((defclas $typename ($fields ...) $ctor-name)
(begin
(defclass $type-name ($fields ...) constructor: $ctor-name)
(defmethod {$ctor-name $type-name}
;;; -*- Gerbil -*-
(import :std/error
:std/sugar
:std/io
(only-in :std/net/httpd/handler read-request-headers read-request-body))
(export main)
(def payload1 "Content-Length: 128\r\n\r\n{\"jsonrpc\":\"2.0\",\"id\":\"g0\",\"result\":[{\"uri\":\"file:///home/_/c/l\",\"name\":\"l\"},{\"uri\":\"file:///home/_/g/gerbil\",\"name\":\"gerbil\"}]}")
(import (only-in :gerbil/gambit pretty-print)
:std/sugar
:std/text/json)
(defsyntax deflsp
(syntax-rules ()
((deflsp $typename ($fields ...) $ctor-name)
(begin
(defclass ($type-name JSON) ($fields ...) constructor: $ctor-name)
;; repro: just `gerbil new` something and paste this into its main.ss
(import :std/io
:std/sugar
:std/format
:std/text/json
:std/net/json-rpc
(only-in :std/net/httpd/handler read-request-headers read-request-body))
(export main)
;; repro: just `gerbil new` something and paste this into its main.ss
(import :std/io
:std/sugar
:std/text/json
:std/net/json-rpc
(only-in :std/net/httpd/handler read-request-headers read-request-body))
(export main)
(include "../manifest.ss")