- https://pyra-handheld.com/boards/pyrapics/pyrared.png
- main inspiration
- shoulder buttons as mx keys is what really sells it for me though
- would be neat to have game controls, but not required
- ~46 keys in 4 staggered rows, not including game keys etc
- https://i.ytimg.com/vi/6fZhIYBObWU/maxresdefault.jpg
- 4 row minimalist celphone layout
- could work well as a multi-layer layout?
- 10x4 grid, space is two keys, so 39 buttons
- http://img.weiku.com/a/006/018/New_Qwerty_Keyboard_Java_Wifi_TV_Flip_Cell_Phone_T3000_4188_1.jpg
// Pinout assumes Arduino Micro | |
int verticals[] = { 6, 5, 4, 3, 2 }; | |
int horizontals[] = { 12, 11, 10, 9, 8 }; | |
// State tracker for keyboard events | |
bool state[5][5]; | |
// Define which pin sets are used for what when scanning. | |
#define drains verticals | |
#define inputs horizontals |
(use-modules (srfi srfi-1)) | |
(load "patterns.scm") | |
(define all-drains '()) | |
(define (register-drain! drain) | |
(set! all-drains (cons drain all-drains)) | |
drain) | |
(define (solved?) | |
(every (lambda (drain) (not (null? (drain 'type)))) all-drains)) |
(use-modules (srfi srfi-1)) | |
(define (limit matcher list) | |
(define matched '()) | |
(for-each | |
(lambda (item) (if (matcher item) (set! matched (cons item matched)))) | |
list) | |
matched) |
(use-modules (srfi srfi-1)) | |
;; "record-types" will end up looking something like this: | |
;; | |
;; ((camera (matrix #:mat4)) | |
;; (model (position #:vec3) | |
;; (matrix #:mat4) | |
;; (clip-space (* (camera matrix) (model matrix) (model position))))) | |
(define record-types '()) |
(use-modules (srfi srfi-1)) | |
(define (camera-layout) | |
'((matrix #:mat4))) | |
(define (camera property) | |
(find (lambda (record) (eq? (car record) property)) (camera-layout))) | |
(define (model-layout) | |
'((position #:vec3 #:vertex) |
This is a mockup for a scheme shader DSL. The main idea here is to conceptualize shaders as being a dependency resolution problem instead of a mess of procedural code. So instead, we define some named data structures. These structures can name other structures as “dependencies”. Data members follow the form of a name, an optional value, and zero or more tags to specify type. Type is optional, but if the struct is under-specified, evaluating it will throw an error.
The variant macro can be used to provide polymorphism (maybe the macro should just be “polymorph”).
Lastly, the vertex and fragment shader macros can take any number of structs as dependencies, but in this case, they only need “model”. The rest will be pulled in automatically.
This lets us do a number of things:
- C structs and helper APIs can be easily generated automatically from the struct and variant macros.
function LerpNode(ctx) { | |
"strict"; | |
var node = { | |
"lhs" : ctx.createGain(), | |
"rhs" : ctx.createGain(), | |
"__alpha" : 0.5, | |
}; | |
node.alpha = Object.create(AudioParam.prototype, { |
A web browser that provides reasonably privacy from common tracking employed by for-profit corporations.
A big inspiration is this blog post: https://theperplexingpariah.co.uk/my-firefox.html
Having used things like request block and self destructing cookies in firefox, I have some ideas for some simple changes to how the browser works that would aleviate a lot of the usability problems that those
var camera = this.graph.camera || null; | |
var graph = this.graph; | |
var prog = this.prog; | |
if (graph.__last_framestart < please.time.__framestart) { | |
// note, this.__last_framestart can be null, but | |
// null<positive_number will evaluate to true anyway. | |
graph.tick(); | |
} | |
if (camera) { | |
graph.camera.update_camera(); |