Skip to content

Instantly share code, notes, and snippets.

View rocketnia's full-sized avatar

Ross Angle rocketnia

View GitHub Profile
@rocketnia
rocketnia / gist:99882fad116e29f54fa2
Last active August 29, 2015 14:07
Linear bunched calculus of structures
rules combined from
https://minerva-access.unimelb.edu.au/bitstream/handle/11343/39480/72729_00002633_01_horsfall-mcs.pdf?sequence=1 ("The Logic of Bunched Implications: A Memoir")
http://www.lix.polytechnique.fr/~lutz/papers/lls.pdf ("A Local System for Linear Logic")
commutative, associative, unit, dual (@ @) [@ @] ; bunched multiplicative implication
C_ (@ @) ---> C_ [@ a, -a @]
C_ (@ A, [@ B, C @] @) ---> C_ [@ B, (@ A, C @) @]
commutative, associative, unit, dual (* *) [* *] ; bunched additive implication, linear multiplicative pair
C_ (* *) ---> C_ (* a, -a *)
C_ (* A, [* B, C *] *) ---> C_ [* B, (* A, C *) *]
@rocketnia
rocketnia / gist:f6585be411b652fa802c
Created March 22, 2015 09:14
Tenerezza paradox with (swap-continuation ...)
; The problem with this isn't the paradox but the fact that the
; paradox is possible to create fully inside a single Tenerezza
; operation.
(swap-continuation original
; We could do the same thing as we do on the other side, but we do
; something simpler. We just send the back-and-forth continuation
; back to itself. This also demonstrates that we don't need
; `original` to be in scope here to produce the paradox (though it
; would be trivial to surround this whole thing with two more
@rocketnia
rocketnia / gist:2bad8c0a3e7eefbb8dae
Last active August 29, 2015 14:22
Nameko Rhythm song lengths
Two of the achievements in Nameko Rhythm are awarded when you've seen
at least 50 and at least 100 King Nameko. To optimize my grinding for
these, I recorded the song lengths:
00:01:44.618 okurahomamikisaa
00:01:43.981 kurobuchika
00:01:50.064 chairo no kobin
00:02:12.087 za entaateinaa
00:02:07.895 yorokobi no uta
00:02:11.999 nameko no uta
@rocketnia
rocketnia / average-lengths.txt
Last active August 29, 2015 14:24
Wouldja Gofer code (@wouldjagofer)
TODO: Fill in the average lengths marked by ???.
{
"origin": ??? [
119+,
???,
???
],
"tweetHomage": 119+ [
@rocketnia
rocketnia / gist:c6ecdc727f0cfbee35a2
Created July 30, 2015 01:20
Limited-memory computation model
An entity can be a pair of entities, with the first being in command of the second's content and execution. For instance, the first can be an imperative computation that only invokes the second computation when (and if!) it finishes. As another example, the first entity can be an interpreter, manually walking over the second entity and updating it. The first entity has exclusive control over the second, except inasmuch as some other entity has control over it. The second cannot even refer to the first except by doing open-ended communication side effects.
All working memory in the system is partitioned into an infinite binary tree, where at each level, the first branch is in command of the second's content and execution. For instance, the first branch can be an imperative computation that only invokes the second computation when (and if!) it finishes. As another example, the first branch can be an interpreter, manually walking over the second branch and simulating it. The first entity has exclusive control o
@rocketnia
rocketnia / arc.bat
Last active September 23, 2015 15:37
@echo off
rem 2010, 2013 Ross Angle. Released under the CC0 license.
rem Lines beginning with "rem", like this one, are comments.
rem The "@echo off" line above stops the following commands,
rem including these comments, from being displayed to the terminal
rem window. For a more transparent view of what this batch file is
@rocketnia
rocketnia / curry.arc
Created October 25, 2010 06:32
A short, comprehensive curry operator for Arc.
; curry.arc
; Copyright 2010 Ross Angle
;
; This code is released under the
; Perl Foundation's Artistic License 2.0.
; This code is an example for a forum post at
; <http://arclanguage.org/item?id=12599>.
@rocketnia
rocketnia / place.arc
Created January 10, 2011 02:59
A reader macro abstraction over Arc's 'setforms.
; place.arc
;
; This software is copyright (c) Ross Angle 2011.
;
; Permission to use this software is granted under the
; Perl Foundation's Artistic License 2.0.
; This is an exploration of using the character = as a reader macro
; such that =(a b c) is interpreted as (place (a b c)), where 'place
@rocketnia
rocketnia / kernelish.arc
Created January 13, 2011 20:05
An Arc fexpr example.
; kernelish.arc
;
; Copyright 2011 Ross Angle. However, you can use this for whatever
; you want. Don't bother giving me credit.
;
;
; This is an example used in reply to
; <http://arclanguage.org/reply?id=13317>. I originally posted an
; untested version with lots of bugs, but I went through and corrected
; them until it actually seemed to work. This should be a pretty
@rocketnia
rocketnia / example-fleetdb-dsl.arc
Created February 2, 2011 20:24
An example FleetDB syntax sugar DSL.
; example-fleetdb-dsl.arc
;
; Copyright 2011 Ross Angle. However, you can use this for whatever
; you want. Don't bother giving me credit.
;
;
; This is an example of an extensible syntax sugar DSL for a
; hypothetical combinator library, together with a couple of
; definitions specifically for thaddeus's FleetDB interface. This was
; posted as an example in a comment at