Skip to content

Instantly share code, notes, and snippets.

@lsparrish
lsparrish / 1c.py
Last active December 19, 2015 18:19
Onecredit -- The hacker's currency!
# Onecredit -- The hacker's currency!
'''
1c is an experiment in digital economy, loosely inspired by
bitcoin. The code is simpler, and the terminology is geekier
(credits, tokens, units etc). We also have some new features
planned.
* One "Coin" which divides as many times as you want.
* Units represent savings-style investment.
@lsparrish
lsparrish / gist:5940731
Last active December 19, 2015 10:29
RetroShare Cert
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: OpenPGP:SDK v0.9
xsBNBFHYcAkBCAD1qQZIw/FsDZITwXnMJiVIw2fQXOYmVXT9pmyPoteqUqnC6La+
83CKEl693zOlJSZ1mL2dgzsakrdt4gd8iRyTYJoRNYNt3drrEdWQ8lc+EN9SUyRU
5/N8I7dw6DJv+fCv0mkH7S8335UhTSQ5b2v/UzzI/Zmtm8Brg2MmDbvAn6mS+bJ9
r8th1T9EL1dDJSMM+Rrc7G3WwhMMU7xKkvFNZCVaUxx632i1juUZLHmGnu4SOx5v
EhfRVLhokK47sdEzeYvAftpdEdyV8cYV620CLai1PJG/9k8pBiSTbTueXQaT9JcW
nW94E0oHfRVodp0WGGPTePq/q+D+2yTI3Gh5ABEBAAHNREx1a2UgUGFycmlzaCAo
R2VuZXJhdGVkIGJ5IFJldHJvU2hhcmUpIDxsc3BhcnJpc2hAcmF0aW9uYWxzaXRl

Proto: Demand-Flexible Bitcoin Units

What they are...

Swarms of small bitcoin transactions directed into semi-public addresses that require proof of work to claim.

Less literally, they are a form of e-currency (synthetic commodity with cryptographically enforced scarcity) that is supply elastic, but can be easily traded for or converted to bitcoins with no centralized exchange.

Throughout this document, I will refer to "proto" as the money-like substance and Proto as the protocol or client. Note: This will not alter the existing bitcoin in any way, it is just a new client that leverages its cryptographic capabilities in new ways. Proto does not yet exist.

@lsparrish
lsparrish / bitbrick.py
Last active December 15, 2015 09:59
simple, vaguely bitcoin-like program
#==========Bitbrick: a somewhat bitcoin-like program.==========#
# The goal is secure published transactions. Not yet completed.
# So far we have the ability to ensure that a given address has
# enough funds to send based on the sum of past transactions.
# Install Notes:
# Uses dbdict, a recipe from: http://code.activestate.com/recipes/576642-persistent-dict-with-multiple-standard-file-format/
# On Ubuntu the Crypto library can be installed with "sudo apt-get install python-crypto"
# Details:
# Addresses are first 16 chars of a hash of the public key.
# Transaction IDs are first 16 chars of the buyer's signature.
@lsparrish
lsparrish / nthdeclaration.mkd
Last active December 12, 2015 03:09
New Transhumanist Declaration

We are Transhumanists. This means not only advocating the well being of humans, it means also anticipating the many changes that we will collectively undergo in the future. It means advocating for science, understanding, and clever new technology. It also means not making special exceptions for human suffering, death, and cognitive shortcomings and pretending to like them just because they are 'natural'. The desire to overcome these problems is completely natural for humans, even if the only plausible means for doing are artificial and technological.

Humanity has transcended the natural ever since the development of tools and fire. We have continued that trend through writing, agriculture, and the wheel. We even followed that up with literacy, science, and industry. We can and will take this much further, through computers, biotechnology, chemistry, nanotechnology, and many other transformative technologies. In light of this, we make the following declarations:

  1. The future is coming. Technology is becomin
chain: keymap'
{{
( useful things: )
( internal -- ignore the vector on a word )
: internal getToken find [ @d->xt ] ifTrue 2 + , ; compile-only
( latest -- use the last defined version of a word with a given name )
: latest getToken keepString 1 , , [ find [ @d->xt ] ifTrue ] , ; compile-only
: isPrefix dup latest keymap:PREFIX @ == ;
: mkey internal getc dup putc latest keymap:TABLE + ;
---reveal---
@lsparrish
lsparrish / more.rx
Created October 19, 2012 05:19 — forked from crcx/more.rx
yet another approach
( useful things )
: dictionary.find/xt ( string:name - xt ) find [ @d->xt ] [ drop #0 ] if ;
: getc:internal ( -c ) &getc 2 + @ do ;
: __$ keepString 1 , , &dictionary.find/xt , ; parsing
( keymap )
9 variable: prefix:CHAR
create prefix:TABLE 256 allot
( We will lookup the keymap by name, to allow for per-application maps )
@lsparrish
lsparrish / more.rx
Created October 18, 2012 17:32 — forked from crcx/more.rx
yet another approach
9 variable: prefix:CHAR
create prefix:TABLE
256 allot
: getc:internal ( -c ) &getc 2 + @ do ;
[ dup @prefix:CHAR ==
[ drop getc:internal
"prefix:TABLE" find drop @d->xt + @ dup 0 <>
@lsparrish
lsparrish / gist:3895813
Created October 15, 2012 21:54
prefix-based keybindings in retro
needs struct'
with struct'
chain: binding'
{
1 field .link
1 field .label
1 field .xt
} bind
variables| prefix lastbinding |
: getc:internal ( -c ) &getc 2 + @ do ;
: header' here @last' , !last' &.word , here 2 + , , ;
: :' getc dup putc header' 0 , 0 , ]] ;
variable c
: find' ( c-af ) !c last' repeat @ dup 0; 3 + @ @c = dup if; drop again ;
: d'' ( "-a) getc dup putc find' drop ;
: pair ( h-aa ) dup @d->xt swap @d->class ;
: start -1 repeat getc dup putc find' [ pair do ] ifTrue 0; again ;
:' a 1 putn ;
:' b 2 putn ;
:' c drop 0 ;