Skip to content

Instantly share code, notes, and snippets.

View rocketnia's full-sized avatar

Ross Angle rocketnia

View GitHub Profile
@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
@rocketnia
rocketnia / lava.html
Created February 23, 2011 17:51
Try LavaScript
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Try LavaScript</title>
<!--
Copyright 2011 Ross Angle (rocketnia). This file is released under
the Perl Foundation's Artistic License 2.0.
Not covered by the license are Underscore, jQuery, jQuery-console,
@rocketnia
rocketnia / gist:890090
Created March 28, 2011 06:46
Anarki and Lathe global variables.
This is a list of global variables and global-variable-like things in
the source of Anarki (https://github.com/nex3/arc) and Lathe
(https://github.com/rocketnia/lathe), excluding functions and macros,
but re-including those which are reassigned or are designed to be
reassigned or extended during load time. It may also exclude some
global-like things which are held inside other globals (like tables)
if they're non-functions or if they're designed to be load-time
reassigned or extended. Furthermore, the list excludes most kinds of
externally established Racket/Rainbow/Jarc parameters and global
state.
@rocketnia
rocketnia / gist:981963
Created May 19, 2011 22:35
An Arc-like sketch of an s-expression Esterel.
http://en.wikipedia.org/wiki/Esterel
(nothing)
(pause)
(do p q ...)
(par p q ...)
(forever p)
(let s p)
(emit s)
(ifelse s p q)
; colon-pipes.arc
;
; Copyright 2011 Ross Angle. However, you can use this for whatever
; you want. Don't bother giving me credit.
;
;
; This was made based on an idea expressed at
; <http://arclanguage.org/item?id=13450> and again at
; <http://arclanguage.org/item?id=14870>. Instead of writing this:
;
@rocketnia
rocketnia / gist:4559120
Last active December 11, 2015 06:28
Meaning-preserving modularity in a propositions-as-types style.
// Meaning-preserving modularity in a propositions-as-types style.
// I've now posted about this code sample on my blog, and I'll leave
// this Gist the way it is (har har).
//
// This Gist: https://gist.github.com/4559120
//
// The blog post:
// http://rocketnia.wordpress.com/2013/01/29/an-extensible-type-system-for-meaning-preserving-modularity/