Skip to content

Instantly share code, notes, and snippets.

View metaleap's full-sized avatar

Phil Schumann metaleap

View GitHub Profile
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")
;; 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")
(import :std/error
:std/sugar
:std/io
(only-in :std/net/httpd/handler read-request-headers read-request-body)
./lib)
(export main)
(include "../manifest.ss")
(def +input-buffer-size+ (expt 2 13))
@metaleap
metaleap / main.cpp
Created January 17, 2024 19:04
Simple no-content Wicked Engine prog (just FPS prints etc)
#include <cstdio>
#include <SDL2/SDL.h>
#include <WickedEngine.h>
void mainLoop(wi::Application&);
int main() {
wi::renderer::SetShaderSourcePath("../libdeps/WickedEngine/WickedEngine/shaders/");
CXX = g++
CXXFLAGS = --debug -std=c++20 -march=native
bin/app: bin/app_util_util.o, bin/app_main.o, bin/app_gui_gui.o
$(CXX) $(CXXFLAGS) bin/app_main.o bin/app_gui_gui.o bin/app_util_util.o -o bin/app
bin/app_util_util.o: app/util/util.cpp, app/util/util.h, app/util/util.cpp
$(CXX) -c $(CXXFLAGS) app/util/util.cpp -o bin/app_util_util.o