Skip to content

Instantly share code, notes, and snippets.

View killerswan's full-sized avatar

Kevin Cantú killerswan

View GitHub Profile
@killerswan
killerswan / demo.rs
Created September 13, 2012 08:17
test for Sam
use std;
use io::*;
struct Point {x:float, y:float}
enum Shape{
Circle(Point, float),
Rectangle(Point, Point)
}
@killerswan
killerswan / gist:3712602
Created September 13, 2012 07:32
&const ?
$ time CFG_DISABLE_VALGRIND=1 make check-stage0-std
cfg: shell host triple x86_64-unknown-linux-gnu
cfg: host for x86_64-unknown-linux-gnu is x86_64
cfg: unix-y environment
cfg: using gcc
cfg: disabling valgrind (CFG_DISABLE_VALGRIND)
cfg: no llnextgen found, omitting grammar-verification
cfg: including dist rules
cfg: including test rules
compile_and_link: x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd.so
@killerswan
killerswan / gist:3711920
Created September 13, 2012 04:49
i don't even...
$ time CFG_DISABLE_VALGRIND=1 make check-stage0-core
cfg: shell host triple x86_64-unknown-linux-gnu
cfg: host for x86_64-unknown-linux-gnu is x86_64
cfg: unix-y environment
cfg: using gcc
cfg: disabling valgrind (CFG_DISABLE_VALGRIND)
cfg: no llnextgen found, omitting grammar-verification
cfg: including dist rules
cfg: including test rules
compile_and_link: x86_64-unknown-linux-gnu/test/coretest.stage0-x86_64-unknown-linux-gnu
@killerswan
killerswan / build.log
Created September 12, 2012 22:56
Auto-ref for ~[] ok, but not for ~str ??
compile_and_link: x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore.so
/code/rust/src/libcore/path.rs:70:12: 70:47 error: failed to find an implementation of trait @cmp::Eq for ~str
/code/rust/src/libcore/path.rs:70 self.components == other.components;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@killerswan
killerswan / eq-operator.log
Created September 12, 2012 02:32
After changing Eq::eq (at commit eacce2ca8fb...)
$ time CFG_DISABLE_VALGRIND=1 make check-stage0-core
cfg: shell host triple x86_64-unknown-linux-gnu
cfg: host for x86_64-unknown-linux-gnu is x86_64
cfg: unix-y environment
cfg: using gcc
cfg: disabling valgrind (CFG_DISABLE_VALGRIND)
cfg: no llnextgen found, omitting grammar-verification
cfg: including dist rules
cfg: including test rules
compile_and_link: x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore.so
@killerswan
killerswan / build.errors.log
Created September 8, 2012 23:07
sqlite3 Rust bindings, with a slight change...
$ rustc --test sqlite.rc
sqlite.rs:605:31: 605:43 error: mismatched types: expected `sqlite_bind_arg` but found `&sqlite_bind_arg` (expected enum sqlite_bind_arg but found &-ptr)
sqlite.rs:605 assert x.get(~"id") == &integer(2);
^~~~~~~~~~~~
sqlite.rs:606:31: 606:43 error: mismatched types: expected `sqlite_bind_arg` but found `&sqlite_bind_arg` (expected enum sqlite_bind_arg but found &-ptr)
sqlite.rs:606 assert x.get(~"k") == &text(~"e");
^~~~~~~~~~~~
sqlite.rs:607:31: 607:45 error: mismatched types: expected `sqlite_bind_arg` but found `&sqlite_bind_arg` (expected enum sqlite_bind_arg but found &-ptr)
sqlite.rs:607 assert x.get(~"v") == &number(2.17);
^~~~~~~~~~~~~~
@killerswan
killerswan / build.errors.log
Created September 8, 2012 22:52
sqlite3 Rust bindings, subtle problem with `&const <T>`
$ git rebase -i to_rust4~4
Successfully rebased and updated refs/heads/to_rust4.
kunix:rustsqlite $ rustc --test sqlite.rc
sqlite.rs:605:31: 605:42 error: mismatched types: expected `&const <V88>` but found `sqlite_bind_arg` (expected &-ptr but found enum sqlite_bind_arg)
sqlite.rs:605 assert x.get(~"id") == integer(2);
^~~~~~~~~~~
sqlite.rs:606:31: 606:42 error: mismatched types: expected `&const <V179>` but found `sqlite_bind_arg` (expected &-ptr but found enum sqlite_bind_arg)
sqlite.rs:606 assert x.get(~"k") == text(~"e");
^~~~~~~~~~~
sqlite.rs:607:31: 607:44 error: mismatched types: expected `&const <V270>` but found `sqlite_bind_arg` (expected &-ptr but found enum sqlite_bind_arg)
@killerswan
killerswan / setup.py
Created September 7, 2012 21:15
scrypt setup script...
#!/usr/bin/env python
from distutils.core import setup, Extension
import sys
import platform
import os
includes = []
library_dirs = []
@killerswan
killerswan / crash.adb.logcat
Created September 7, 2012 05:07
library resolution problem in Kivy on Android
I/GeckoAppShell( 3437): - text = 'Downloading: Triad-0.2-debug-9.apk'
I/GeckoAppShell( 3437): - name = 'download:///mnt/sdcard/Download/Triad-0.2-debug-9.apk'
I/GeckoAppShell( 3437): - name = 'download:///mnt/sdcard/Download/Triad-0.2-debug-9.apk', progress = 0 / 100, text = ''
I/GeckoAppShell( 3437): - name = 'download:///mnt/sdcard/Download/Triad-0.2-debug-9.apk', progress = 1 / 100, text = ''
I/GeckoAppShell( 3437): - name = 'download:///mnt/sdcard/Download/Triad-0.2-debug-9.apk', progress = 2 / 100, text = ''
I/GeckoAppShell( 3437): - name = 'download:///mnt/sdcard/Download/Triad-0.2-debug-9.apk', progress = 4 / 100, text = ''
I/GeckoAppShell( 3437): - name = 'download:///mnt/sdcard/Download/Triad-0.2-debug-9.apk', progress = 6 / 100, text = ''
I/GeckoAppShell( 3437): - name = 'download:///mnt/sdcard/Download/Triad-0.2-debug-9.apk', progress = 7 / 100, text = ''
I/GeckoAppShell( 3437): - name = 'download:///mnt/sdcard/Download/Triad-0.2-debug-9.apk', progress = 9 / 100, text = ''
I/GeckoAppShell( 3437): -
@killerswan
killerswan / build.commands
Created September 7, 2012 03:51
module resolution problem in Kivy on Android
./distribute.sh -f -m "openssl scrypt triad kivy"
cd dist/default
./build.py --sdk 14 --dir ~/code/triad/kivy --package org.kevincantu.triad --name Triad --version 0.2 debug