Skip to content

Instantly share code, notes, and snippets.

View erincandescent's full-sized avatar
💭
pondering the existence of this feature

Erin erincandescent

💭
pondering the existence of this feature
View GitHub Profile
@erincandescent
erincandescent / gist:5469240
Last active December 16, 2015 17:19
Package manager schema
BEGIN TRANSACTION;
PRAGMA foreign_keys = OFF;
CREATE TABLE manifest (
key TEXT NOT NULL UNIQUE,
value TEXT
);
CREATE UNIQUE INDEX ix_manifest_key ON manifest (key);
@erincandescent
erincandescent / gcc.yaml
Created April 27, 2013 01:04
Package specification
# Package specifications are all done in YaML
name: gcc
version: 4.7.1
targets: any
license: gpl3
# Depends declarations are evaluated with host and target matching the package.
# E.G, for gcc@i386:arm, gmp below will be evaluated as gmp@i386:arm. The rules
# of deduction for the depends section allow the target property to "coalesce"
@erincandescent
erincandescent / FirstClass.moon
Created April 28, 2013 16:06
FirstClass implementation of the Python class system in MoonScript/Lua
-- Copyright (c) 2012, Owen Shepherd
-- Permission to use, copy, modify, and/or distribute this software for
-- any purpose with or without fee is hereby granted, provided that the
-- above copyright notice and this permission notice appear in all copies.
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
@erincandescent
erincandescent / gist:5478989
Created April 29, 2013 00:15
First successful package build
oshepherd@Asuka /cygdrive/c/Users/oshepherd/Projects/fpkg
$ cat specs/sqlite3.spec
name: sqlite3
version: 3.7.16.2
license: pd
tool_depends:
- cc
provides:
$ python3 fpkg.py inspect sqlite3-3.7.16.2.i686.fpkg
depends: []
host: i686
license: pd
name: sqlite3
provides: {'lib:libsqlite3.a': '${PREFIX}/lib/libsqlite3.so'}
target: null
version: 3.7.16.2
Files:
TypeError: Cannot call method 'getIDs' of undefined
at Function.collection.items (/opt/pump.io/lib/streams.js:131:25)
at next (/opt/pump.io/node_modules/step/lib/step.js:51:23)
at Function.collection.totalItems (/opt/pump.io/lib/streams.js:102:29)
at next (/opt/pump.io/node_modules/step/lib/step.js:51:23)
at DatabankObject.subClass.Cls.get (/opt/pump.io/node_modules/databank/lib/databankobject.js:103:25)
at bank.read (/opt/pump.io/node_modules/databank/node_modules/databank-mongodb/lib/mongodb.js:322:21)
at Collection.findOne (/opt/pump.io/node_modules/databank/node_modules/databank-mongodb/node_modules/mongodb/lib/mongodb/collection.js:1010:5)
at Cursor.nextObject (/opt/pump.io/node_modules/databank/node_modules/databank-mongodb/node_modules/mongodb/lib/mongodb/cursor.js:658:35)
at Cursor.close (/opt/pump.io/node_modules/databank/node_modules/databank-mongodb/node_modules/mongodb/lib/mongodb/cursor.js:939:5)
00000001 b _PDCLIB_serr_ungetbuf
00000001 b _PDCLIB_sin_ungetbuf
00000001 b _PDCLIB_sout_ungetbuf
00000001 b malloc_global_mutex
00000001 b malloc_global_mutex_init_once
00000002 W __aeabi_idiv0
00000002 W __aeabi_ldiv0
00000002 T _PDCLIB_freepages
00000002 T mtx_destroy
00000004 b _PDCLIB_errno
#include "mbconstants.h"
#include "architecture.h"
.extern KMain
.extern BootStackTop
.extern IMAGE_END
.extern BSS_END
#define MB2_FLAGS (MB2_IFLAG_VIDEO | MB2_IFLAG_MBFIELDS)
#define MB2_CHECKSUM ((-(MB2_IMAGE_MAGIC + MB2_FLAGS)) & 0xFFFFFFFF)
# Example C compilation rule
rule Cc {
DEPENDS $(<) : $(>) ;
}
actions Cc {
$(CC) -o $(<) $(>) $(CFLAGS) ;
}
(let (languages (make-eqv-hashtable))
(define add-language (lambda (name func)
(hashtable-set! languages name func)
))
(define object (lambda (src)
(let ((error (lambda () (fatal! "Unknown language src"))))
((hashtable-ref languages name error) src)
)
))