Skip to content

Instantly share code, notes, and snippets.

@carloscm
carloscm / bgfx-nuklear.cpp
Last active October 15, 2025 22:29
bgfx renderer for nuklear. Bring your own event handling and your own common sense for integration into your project.
#include "../platform/platform.h"
#include <cstdlib>
#include <cstring>
#include <bgfx/bgfx.h>
#include <bgfx/embedded_shader.h>
#include <bx/allocator.h>
#include <bx/math.h>
#define NK_IMPLEMENTATION
(define-mod-export job-logistic-sm (state-machine
(start pre-check)
(args job-giver state-component phase)
(vars
work-ticks 0)
(state basic-info
(vars
state-component-c (ecs-get-component job-giver state-component)
(define recycler-sm (state-machine
(start find-litter)
(args recycler phase)
(vars
pick-ticks 0
work-ticks 0)
(state find-litter
(vars
@carloscm
carloscm / testarrows.scm
Created April 7, 2015 21:49
-> ->> -<> -<>> for S7 Scheme
; -> ->> -<> -<>> for S7 Scheme
; inspired by https://github.com/nightfly19/cl-arrows and https://github.com/rplevy/swiss-arrows
(require stuff.scm)
; using: any? while
; replace those with your favorite scheme alternatives
; direct translation from https://github.com/nightfly19/cl-arrows
(define (arrow-proto handler initial-form forms)
(let ((output-form initial-form)
quant:~/development/minisuit/projects/MiniSuit$ cloc .
425 text files.
421 unique files.
131 files ignored.
http://cloc.sourceforge.net v 1.60 T=3.32 s (89.0 files/s, 30249.7 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
C++ 117 8841 3102 49748