Skip to content

Instantly share code, notes, and snippets.


rain1 rain-1

Block or report user

Report or block rain-1

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
This document specifies the DEPENDS.TXT file for a software project.
This is simply a list of the build time and runtime dependencies of the software.
The file is in TSV (tab separated values) format with UTF-8 encoding, so each line is a record describing a single dependency.
Each record is <package-name>\t<type>\t<version>
rain-1 /
Created Apr 17, 2019
gopher markdown specification

My Markdown Spec

This is (yet) another markdown specification. The purpose of this particular markdown spec is to provide a single unambiguous markdown specification. It aims to use formal regular expressions so that implementors can quickly create implementations (given a regex library) and the results will be consistent across platforms. We specify a very small subset of the markdown seen in the wild.

Version 0.1

rain-1 / mytv.vala
Created Apr 7, 2019
bold text in vala
View mytv.vala
using Gtk;
// valac --pkg gtk+-3.0 mytv.vala
public class MarkupTextView : TextView {
public void append_text (string s) {
TextIter end_iter;
buffer.get_end_iter (out end_iter);
buffer.insert_with_tags_by_name (ref end_iter, s, -1, null);
View checksum-colorizer.go
package main
import (
rain-1 / another way
Last active Mar 12, 2019
View another way
#lang racket
(require racket/stream)
(define (make-prefix len)
(lambda (tail)
(append (make-list len '_) (cons 'o tail))))
(define (k-combinations k n)
(cond ((= k 0)
rain-1 / set.rkt
Created Mar 4, 2019
generalized set! in racket - failed idea
View set.rkt
#lang racket
(require (for-syntax racket/syntax))
(define toplevel 'foo)
(define-syntax (set^ stx)
(syntax-case stx ()
[(_ (attr x) y)
(with-syntax ([set-attr! (format-id #'toplevel "set-~a!" (syntax-e #'attr))])
rain-1 / serialize-lisp.rkt
Created Feb 17, 2019
View serialize-lisp.rkt
#lang racket
;; This implements a baby lisp interpreter using closure conversion pass before execution
;; It supports serialization of closures (e.g. for partial evaluation/staging) and reading back and executing those objects
(require data/queue)
;; closure conversion for lambda calculus
;; the input language is:
View closure-conversion.rkt
#lang racket
;; this is a stand alone simple version of the closure conversion part of the hoist pass from the tarot compiler
;; see for more.
(require data/queue)
;; closure conversion for lambda calculus
;; the input language is:
rain-1 / grammar-1.rkt
Last active Feb 7, 2019
parsing with grammars
View grammar-1.rkt
#lang racket
;(start, (ACCEPT))
;(start, (READ #\a, sym))
;(start, (READ #\b, sym))
;(start, (READ #\(, "sexps"), PUSH(#\)))
;(sym, (ACCEPT))
;(sym, (READ #\a, sym))
;(sym, (READ #\b, sym))
rain-1 / minikanren.scm
Created Jan 6, 2019
minikanren.scm - based off orchid-hybrid mirukanren. works in Chez
View minikanren.scm
;; utils
(define (assp p l)
(if (null? l)
(if (p (caar l))
(car l)
(assp p (cdr l)))))
You can’t perform that action at this time.