GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • All gists
  • Back to GitHub
  • Sign in
  • Sign up
  • All gists 175
  • Forked 1
  • Starred 25
  • Terms
  • Privacy
  • Security
  • Status
  • Community
  • Docs
  • Contact

This view

  • Original page
  • New address

GeezerVison is showing gist.github.com — selfsame’s gists

Instantly share code, notes, and snippets.

View selfsame's full-sized avatar

Joseph Parker selfsame

personal repos are here again i guess
126 followers · 22 following
  • https://selfsame.itch.io
View GitHub Profile
    • Recently created
    • Least recently created
    • Recently updated
    • Least recently updated
  • 1 file
  • 0 forks
  • 0 comments
  • 0 stars
@selfsame
selfsame / tween.fnl
Last active June 1, 2022 02:36
(var _ts {})
(fn lerp [a b r] (+ a (* (- b a) r)))
(fn vlerp [a b r] (v.vadd a (v.vmul (v.vsub b a) r)))
(fn powf [n] (fn [v] (^ v n)))
(fn tween [o p v d _]
(let [_ (or _ {})
t {:o o :p p :v v :d d :s d
:f _.f
  • 1 file
  • 0 forks
  • 0 comments
  • 2 stars
@selfsame
selfsame / snip.md
Last active February 10, 2024 17:32
compute volume of three.js ConvexHull

A bit of js that computes the volume of a ConvexHull (or any mesh if you iterate the faces making tetrahedrons with the centerpoint)

import {Vector3} from 'three'
import {ConvexHull} from 'three/examples/jsm/math/ConvexHull.js'

// via https://stackoverflow.com/questions/9866452/calculate-volume-of-any-tetrahedron-given-4-points
function determinant_3x3(m){
    return (m[0][0] * (m[1][1] * m[2][2] - m[1][2] * m[2][1]) -
            m[1][0] * (m[0][1] * m[2][2] - m[0][2] * m[2][1]) +
  • 1 file
  • 0 forks
  • 0 comments
  • 0 stars
@selfsame
selfsame / reagent.key.error.cljs
Created September 12, 2019 19:45
(defn self-serve-info [state]
(let [items (retail-cart-items)
kitchen-stuff? (< (count items) (count (keys @CART)))]
[:div#checkout.retail
[:div#content
[:h1 "Self Serve Items"]
[:h2 "please pick up the following items from the Fridge or the Retail Shelf:"]
[:div.group
(doall
  • 1 file
  • 0 forks
  • 0 comments
  • 0 stars
@selfsame
selfsame / arcadia.compiler.clj
Created May 4, 2019 16:58
arcadia godot compiler ns
(ns arcadia.compiler
(:use
arcadia.core)
(:require
[clojure.spec.alpha :as s]
clojure.string
[arcadia.internal.spec :as as]
[arcadia.config :as config]))
(defn aot-namespaces [path nss]
  • 1 file
  • 0 forks
  • 0 comments
  • 1 star
@selfsame
selfsame / tween.fnl
Last active June 9, 2021 06:57
(var _ts {})
(fn lerp [a b r] (+ a (* (- b a) r)))
(fn powf [n] (fn [v] (^ v n)))
(fn tween [o p v d _]
(let [_ (or _ {})
t {:o o :p p :v v :d d :s d
:f _.f
:l (or _.l lerp)
:ei (or _.ei _.e)
  • 5 files
  • 0 forks
  • 0 comments
  • 0 stars
@selfsame
selfsame / aoc.apl
Last active December 14, 2018 05:41
#day 1
+/INPUT
{1↑{((⍵⍳⍵)≠⍳⍴⍵)/⍵}+⍀0,1000000⍴⍵}INPUT
#day 2
⍝ part 1 dyalog
  • 2 files
  • 0 forks
  • 0 comments
  • 0 stars
@selfsame
selfsame / demo.pd
Created November 3, 2018 22:59
#N canvas 273 586 450 300 10;
#X obj 49 147 dac~;
#X obj 52 89 equa;
#X obj 193 16 vsl 15 128 0 1 0 0 empty empty volume 0 -9 0 10 -204786
-1 -159808 2700 1;
#X obj 55 14 hsl 128 15 0 127 0 0 empty empty midi_note -2 -8 0 10
-262130 -1 -4160 5400 1;
#X obj 55 45 hsl 128 15 0 1000 0 0 empty empty freq -2 -8 0 10 -261682
-1 -258113 4500 1;
#X obj 52 112 *~ 0.001;
  • 1 file
  • 0 forks
  • 0 comments
  • 0 stars
@selfsame
selfsame / groups.py
Created October 10, 2018 18:08
>>> p = r"rip (?P<thing>.+) from (?P<object>.+)"
>>> re.search(p, "rip sheet from red book")
<_sre.SRE_Match object; span=(0, 23), match='rip sheet from red book'>
>>> res = re.search(p, "rip sheet from red book")
>>> res.groups
<built-in method groups of _sre.SRE_Match object at 0x7fa2c61e2938>
>>> res.groups()
('sheet', 'red book')
  • 1 file
  • 0 forks
  • 0 comments
  • 0 stars
@selfsame
selfsame / selfie-dungeon.ni
Created October 3, 2018 00:09
selfie dungeon inform
"dungeon-planet" by Joseph Parker
Chapter 1 - Rules
Section 1(a) - Substance
  • 1 file
  • 0 forks
  • 0 comments
  • 2 stars
@selfsame
selfsame / computers.ni
Created October 2, 2018 23:55
computers.ni
"dungeon planet" by Joseph Parker
Book 1 - Rules
Chapter 1 - Computers
An operating system is a kind of value. The operating systems are linux.
A computer is a kind of device. Understand "computer" as computer.
A computer has a text called power_up_text.
NewerOlder
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.