Skip to content

Instantly share code, notes, and snippets.

View mildred's full-sized avatar

Mildred Ki'Lya mildred

View GitHub Profile
@mildred
mildred / gist:1328468
Created October 31, 2011 18:55
failed compilation
mildred@meryl:Projects/vanilla$ git clean -fdx ~/Projects/vanilla
Removing bin/
Removing gen/
Removing libs/
Removing local.properties
mildred@meryl:Projects/vanilla$ android update project --name VanillaMusic --path . ~/Projects/vanilla
Updated local.properties
Updated file ./build.xml
mildred@meryl:Projects/vanilla$ git st ~/Projects/vanilla
# On branch master
@mildred
mildred / transform_layouts.rb
Created December 13, 2011 15:55
Jekyll plugin to have layouts transformed by Converters as well, taken from https://github.com/mojombo/jekyll/pull/351
module Jekyll
class Layout
alias old_initialize initialize
def initialize(*args)
old_initialize(*args)
self.transform
end
@mildred
mildred / gist:1583164
Created January 9, 2012 14:28
Geometry, escalier
Marches := Object clone do(
face := method(
Polygon clone declarePoints(a, b, c, d)
)
marche1 := method(
face do(
a haveXY(5cm, 2.5cm)
b haveXY(5cm, 0)
c haveXY(80cm, 0)
d haveXY(80cm, 40cm)
@mildred
mildred / gist:1607388
Created January 13, 2012 16:37
Io with views
Let's imagine the object model if we want to implement Io in Parrot.
First, create a PMC IoObject that will represent an Io object. IoObject will contain a list of slots in the
object. There will also be a VTABLE function that will implement the behaviour when the object is activated
(called). Let's call it perform for the moment.
Let's imagine an object can have different set of slots. We call each of them views. We have the
introspection view, containing a perform2 method (different from the perform above which is a VTABLE
function), a isActivable method (true for methods, false for every other objects) and other introspection
related slots. We also have the default view for normal object operation. We can imagine having other
@mildred
mildred / gist:1607820
Created January 13, 2012 18:04
Io Parrot again
#IoObject method(args)
# $1 = VTABLE(IoObject).get(IoObject, "method")
# $2 = VTABLE(IoObject).get($1, "isActivable", "0")
# $3 = $1 0#perform(args) [if $2]
# VTABLE(IoObject).call($1, "perform", args)
# $3 = $2 [otherwise]
IoObject view#method(args)
$1 = VTABLE(IoObject).get(IoObject, "method", "view")
return VTABLE($1).call($1, IoObject, args)
@mildred
mildred / create-rpm
Created January 17, 2012 10:24
Creates a RPM file either from the command-line or from a description file. The rpm contains the files in the directory specified by files variable.
#!/bin/sh
error(){
echo "$@" >&2
exit 1
}
destdir="$(pwd)"
specdir="$(pwd)"
selffile=
@mildred
mildred / lizzy.txt
Created January 24, 2012 11:07
Lizzy Syntax
var ::= exp
assign exp to var. Type of exp is set to var (type inference)
var := exp
var an already existing variable, with a type
set exp to var, check the type is correct statically
var :type := exp
@mildred
mildred / gist:1670054
Created January 24, 2012 12:50
lizzy
#!/usr/bin/env lua
Type = {__index = {}}
function Type.new(self)
return setmetatable({}, self)
end
function Type.__index.declare(self, f)
f()

Message #1729 received at 727708@bugs.debian.org (full text, mbox): From: Russ Allbery rra@debian.org To: 727708@bugs.debian.org Subject: Re: Bug#727708: init system other points, and conclusion Date: Sun, 29 Dec 2013 16:10:10 -0800

We seem to be at the point of the process where at least those of us who did early investigation are stating conclusions. I think I have enough information to state mine, so will attempt to do so here.

@mildred
mildred / break_cpp_encapsulation.cpp
Created March 11, 2014 13:30
Break C++ encapsulation
class A {
template<class T> class B {};
template<class T> friend class C;
int priv;
protected:
int pro;
};
template<typename T, typename U>