Skip to content

Instantly share code, notes, and snippets.

View cotto's full-sized avatar

Charis Otto cotto

  • Seattle
  • 03:23 (UTC -07:00)
View GitHub Profile
C:\src\parrot-msvc>prove -v t/dynpmc/os.t
t/dynpmc/os.t ..
1..33
"my" variable $IN masks earlier declaration in same scope at t/dynpmc/os.t line 386.
ok 1 - Test cwd
# Failed test 'Test bad cwd'
not ok 2 - Test bad cwd# at t/dynpmc/os.t line 76.
# 'Permission denied
cotto@feather:/usr/src/parrot/parrot-git-m0spec @m0-spec 0 $ git pull
You asked me to pull without telling me which branch you
want to merge with, and 'branch.m0-spec.merge' in
your configuration file does not tell me, either. Please
specify which branch you want to use on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details.
If you often merge with the same branch, you may want to
use something like the following in your configuration file:
OUTPUT«5,9,18,13,7,6,23,8,24,22,12,15,4,10,11,20,14,16,17,21,19␤»
Hi all,
This is a status report on my progress on the M0 specification and prototype.
dukeleto, atrodo and I have been working on the spec in the "m0-spec" branch on
github and I've started prototyping it in dynops in dukeleto's "lorito" branch
as a way to shake out bugs and holes and to get some executable code.
The spec is largely complete but still has a few significant holes that would
block an implementation. The op set and basic layout of the interpreter seem
to be workable. FFI looks good (apart from callbacks) thanks to plobsing's
=head2 Continuation-Passing Style in M0
=head3 CPS Basics
CPS, in the simplest possible terms, means that no function ever returns to its
caller. Instead of returning, a function invokes a continuation passed to it
as one of its arguments.
better intro: L<http://matt.might.net/articles/by-example-continuation-passing-style/>
@cotto
cotto / gist:972649
Created May 14, 2011 21:17
M0 Status for Parrot Developer Summit May '04
Dukeleto and I have been working together to build what we expect to be the
final prototype of M0 . I say "final prototype" because we expect this to be
the last implementation needed to shake out holes in the specification. We're
prototyping an M0 assembler and M0 bytecode interpreter, using Perl 5 as the
implementation language. The interpreter is at the stage where it can load and
run bytecode, though no non-trivial ops have been implemented or tested. The
assembler is a couple weeks from producing valid bytecode. Once the
assembler is producing valid bytecode, we'll have a solid platform for M0
experimentation.
@cotto
cotto / gist:995467
Created May 27, 2011 15:21
cps questions
list of questions about CPS and how it relates to M0
* goals *
implement cps fib in M0
* notes from the meeting *
@cotto
cotto / deref and set_imm
Created May 31, 2011 03:39
m0 examples
I propose the following ops:
* set_imm
Treat $2 and $3 as immediate values. Set *$1 to $2 * 256 + $3.
* deref
Treat *$3 as index and *$2 as a register set. Set *$1 to $2[*$3], assuming register-sized units.
@cotto
cotto / announce.txt.readme.html.aspxy.rb.pl.txt
Created June 2, 2011 20:02
Parrot 3.5.0 release announcement
"Instruct me how to lie in wait for the old god, lest he foreseeing or foreknowing may escape. Hard is a god for mortal man to master."
- Menelaus, The Odyssey, by Homer
On behalf of the Parrot team, I'm proud to announce Parrot 3.5.0, also known
as "Menelaus". Parrot (http://parrot.org/) is a virtual machine aimed
at running all dynamic languages.
Parrot 3.5.0 is available on Parrot's FTP site
(ftp://ftp.parrot.org/pub/parrot/releases/devel/3.5.0/), or by following the
download instructions at http://parrot.org/download. For those who would like
@cotto
cotto / goto_value.m0
Created June 9, 2011 15:59
m0 gotos as values
.version 0
.chunk "hello"
.constants
0 "at start"
1 "at end: goto worked!"
2 "at end: goto failed :("
.metadata
.bytecode
set_imm I0, 0, 0
set_imm S0, 0, 0