This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Uno; | |
using Uno.Platform; | |
using Uno.Collections; | |
using Android; | |
using Android.Runtime; | |
using Android.android.os; | |
using Android.android.app; | |
using Android.android.content; | |
using Android.android.location; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//------header file -------// | |
#ifndef __XGC_ANDROID_HEADER__ | |
#define __XGC_ANDROID_HEADER__ | |
#include <${Android.Runtime.JWrapper:Include}> | |
#include <Xli/Mutex.h> | |
#include <Xli.h> | |
class XGC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro hash ((&key (test #'eql) (size 10) | |
(rehash-size 1.5) (rehash-threshold 1) | |
(hash-function nil) (weakness nil) synchronized) | |
&rest keys-vals-plist) | |
(let ((h (gensym "new-hashmap"))) | |
`(let ((,h (make-hash-table :test ,test :size ,size | |
:rehash-size ,rehash-size | |
:rehash-threshold ,rehash-threshold | |
:hash-function ,hash-function | |
:weakness ,weakness |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Playing with reader macros over the weekend. | |
;; Example of reader and writer being mirroring each other beautifully | |
;;So we need a class for IP addresses | |
CL-USER> (defclass ip () ((address :initarg :address) (port :initarg :port))) | |
#<STANDARD-CLASS IP> | |
;; def-hashslash-reader is a macro I wrote to create reader macros. | |
;; In short this code: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(in-package :cepl) | |
(defparameter *array* nil) | |
(defparameter *stream* nil) | |
(defparameter *running* nil) | |
(defstruct-g pos-col () | |
(position :vec3 :accessor pos) | |
(color :vec4 :accessor col)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Goal find any enum in %gl:enum where where the following results in a notably | |
;; different symbol: | |
;; - take the keyword from %gl:enums | |
;; - use cffi:foreign-enum-value to convert it to a value | |
;; - use cffi:foreign-enum-keyword to turn the value back to a keyword | |
;; | |
;; Many enums return the ext version instead so I try to filter for enums that are | |
;; notably different | |
;; There are clearly some false positives here but also plenty I cannot explain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// patterns | |
// (?a ?#) means no space after #a | |
// (?λ) means no space after λ | |
(defvar paredit-dont-add-space-after | |
'((?s ?#) (?a ?#) (?λ) (?- ?#) (?+ ?#) (?c ?#) (?o ?#) (?p ?#) (?r ?#) (?s ?#) (?x ?#))) | |
(add-hook 'paredit-mode-hook | |
(lambda () | |
(setq paredit-space-for-delimiter-predicates | |
(list (lambda (endp delimiter) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VARJO> (glsl-code | |
(defshader test () | |
(let ((a 4) (b 20) (c 5)) | |
(labels ((test ((x :int)) | |
(labels ((moo () (+ c b))) | |
(* x a (moo))))) | |
(+ 1 2 3 4) | |
(test 10))) | |
(v! 1 2 3 4))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defparameter *loop* 0.0) | |
(defun-g frag () | |
(let ((loop *loop*)) | |
(v! (cos loop) (sin loop) 0.4 1.0))) | |
;; Becomes | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Uno; | |
using Uno.Platform; | |
using Uno.Collections; | |
using Android; | |
using Android.Base; | |
using Android.Runtime; | |
using Android.android.os; | |
using Android.android.app; | |
using Android.android.content; | |
using Android.android.location; |
OlderNewer