Skip to content

Instantly share code, notes, and snippets.

View guusw's full-sized avatar

Guus Waals guusw

  • Formabble
  • Singapore
View GitHub Profile
@guusw
guusw / shared.shs.clj
Last active June 27, 2024 09:24
Formabble default rendering code
@define(fbl/init-lighting-shader {
Name: "initLighting"
Stage: ProgrammableGraphicsStage::Fragment
EntryPoint: {
@f3(0.0) | Shader.WriteGlobal("lighting")
}
})
@define(fbl/apply-lighting-shader {
After: ["initLighting"]
[main] Configuring folder: chainblocks3
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=A:\LLVM-14.0.6\bin\clang.exe -DCMAKE_CXX_COMPILER:FILEPATH=A:\LLVM-14.0.6\bin\clang++.exe -Sa:/Projects/chainblocks3 -Ba:/Projects/chainblocks3/build/clang-14.0.6-x86_64-pc-windows-msvc/Debug -G Ninja
[cmake] Not searching for unused variables given on the command line.
[cmake] -- SHARDS_DIR = A:/Projects/chainblocks3
[cmake] -- clang-format found: A:/LLVM-14.0.6/bin/clang-format.exe
[cmake] -- clang-tidy found: A:/LLVM-14.0.6/bin/clang-tidy.exe
[cmake] -- RUST_CARGO_TARGET = x86_64-pc-windows-msvc
[cmake] -- RUST_BUILD_SUBDIR = x86_64-pc-windows-msvc/debug
[cmake] -- External Project cmake args: -DCMAKE_CXX_FLAGS="-D_ITERATOR_DEBUG_LEVEL=1";-DCMAKE_C_COMPILER=A:/LLVM-14.0.6/bin/clang.exe;-DCMAKE_CXX_COMPILER=A:/LLVM-14.0.6/bin/clang++.exe;-DCMAKE_SYSTEM_PROCESSOR=AMD64;-DCMAKE_SYSTEM
@guusw
guusw / luamacros.nim
Created June 21, 2017 08:05
nim module that creates wrapper for simple function to use in lua
import lua52
import macros
import strutils
proc pushstringd*(L: PState, s: cstring) =
## Pushes a string and discards the internal copy
discard lua52.pushstring(L, s)
type FunctionParameter = tuple[name:string, typeNode:NimNode, defs: NimNode]
proc unpackParameters(n: NimNode): seq[FunctionParameter] =