Skip to content

Instantly share code, notes, and snippets.

~/src/cabal-install-0.10.2 $ sh bootstrap.sh
Checking installed packages for ghc-7.2.1...
Cabal-1.10.1.0 will be downloaded and installed.
transformers-0.2.2.0 will be downloaded and installed.
mtl-2.0.1.0 will be downloaded and installed.
parsec-3.1.1 will be downloaded and installed.
network-2.3.0.2 will be downloaded and installed.
time is already installed and the version is ok.
HTTP-4000.1.1 will be downloaded and installed.
zlib-0.5.3.1 will be downloaded and installed.
@japhb
japhb / gist:2474657
Created April 23, 2012 23:46
perlito6.js "compiler spins" failure mode
I decided to let perlito6.js take it's own time compiling rc-forest-fire, but it never did stop. So I took a look at the output that was being captured from the compiler. This is what I found (a couple hundred MB of it when I finally stopped it):
Died: Missing value after operator >
Died: missing value after operator '*'
Died: Expected closing delimiter: ) near 352
Died: Unknown token: 'undefined'
Died: Expected closing delimiter: ) near 352
Died: Unknown token: 'undefined'
Died: Expected closing delimiter: ) near 352
Died: Unknown token: 'undefined'
@japhb
japhb / spectest failures with str-numeric branch on 32-bit x86 Linux
Created May 25, 2012 02:13
Spectest failures for Rakudo str-numeric branch
# My current triage:
# * the TODO passes are real improvements
# * S03-operators/overflow.t failures are just unrelated 32-bit issues
# * S32-exceptions/misc.t failure is wrong exception type; Str.Numeric needs to be updated to throw typed exceptions
# * S32-str/numeric.t failures are all successfully handling something expected to fail; the reasons are mixed: some are over-lax behavior, some need further analysis
Test Summary Report
-------------------
t/spec/S03-operators/context-forcers.rakudo (Wstat: 0 Tests: 89 Failed: 0)
TODO passed: 38
@japhb
japhb / perl6-bench.out.txt
Created May 25, 2012 23:32
perl6-bench output
------------------ Perl 5 ------------------- -------- NQP -------- ------------------ Perl 6 -------------------
perl5 perlito5 perlito5 perlito5 nqp rakudo rakudo niecza perlito6 perlito6
TEST perl5 perl5 node.js d8 parrot parrot parrot mono perl5 d8
empty 0.003s 0.135s 0.410s 0.325s 0.078s 0.449s 0.449s 2.033s 0.219s 0.518s
1.000x 40.045x 121.455x 96.245x 23.122x 133.111x 133.160x 602.930x 64.972x 153.506x
zero 0.003s 0.135s 0.411s 0.323s 0.090s 0.472s 0.472s 2.187s 0.221s 0.520s
1.000x 39.597x 120.359x 94.512x 26.458x 138.205x 138.112x 640.079x 64.771x 152.036x
hello 0.003s 0.136s 0.423s 0.325s 0.087s
@japhb
japhb / Two different crash modes
Created October 21, 2012 02:29
Rakudo/Parrot crash using run() in a loop
$ perl6 -e 'for 1..100 -> $i { say $i; run "true"; 1; }'
1
2
3
4
5
6
7
8
9
@japhb
japhb / gist:4132800
Created November 22, 2012 20:23
perl6-bench showing 2011.10 -> 2012.10 Rakudo performance progession
==> perl6-bench version f37c11a-dirty
------------------------------ Perl 6 -------------------------------
2011.09 2011.10 2012.02 2012.06 2012.10 2012.11
rakudo rakudo rakudo rakudo rakudo rakudo
TEST parrot parrot parrot parrot parrot parrot
empty 0.929s 0.902s 1.189s 0.414s 0.452s 0.726s
2.247x 2.182x 2.875x 1.000x 1.093x 1.756x
@japhb
japhb / nqp-rakudo-niecza-current-no-startup.txt
Created November 26, 2012 06:55
NQP, Rakudo, Niecza current release comparison
==> perl6-bench version 361a917-dirty (ignoring startup time)
-- NQP --- -------------------- Perl 6 ---------------------
2012.11.1 2012.11 nom v24 master
nqp rakudo rakudo niecza niecza
TEST parrot parrot parrot mono mono
empty 0.000s 0.000s 0.000s 0.000s 0.004s
1.000x 1.000x 1.000x 1.000x 3.859x
@japhb
japhb / design-outline.txt
Created November 28, 2012 03:56
Ideas for Perl 6 versioned module management
The following specifies a possible design for in-filesystem storage of Perl 6 modules with associated metadata necessary to satisfy the S11 goals as well as hopefully being reasonably efficient for loading modules at runtime, without involving binary databases, and with reasonable capabilities for recovering from corrupted state.
BASIC LAYOUT
------------
* Modules are stored (as now) beneath one of the four roots specified in %*CUSTOM_LIB
* These are searched (as now) for candidates in the order: < home site vendor perl >
* Within each lib root, files are stored in the form: Module/Name/auth/ver.pm
WILDCARD AUTH OR VER
--------------------
@japhb
japhb / gist:4171575
Created November 29, 2012 20:09
Notes on Perl6 module system designs pros and cons
* root/Module/Name/auth/ver.pm + root/Module/Name/Any/Any.pm + root/Module/Name/auth/ver/id.pm + manifest
+ Handles individual modules well
+ Handles broken filesystems
+ Handles auth and ver queries usually in FS, sometimes in manifest
+ Only parses manifests when needed
+ Does not handle PATH at all
+ Does not handle non-lib files
+ Does not handle non-installed files
+ Does not handle binding versioned files together (though to be fair S11 is weak at this too)
* root/auth/package/ver/{bin,lib,share,...} + manifest
@japhb
japhb / new-rakudo.sh
Created December 18, 2012 02:05
Current iteration of "clean, pull, and build a new rakudo, then reinstall modules" script
#!/bin/bash
# Save existing panda state
STATE_DIR=~/git/rakudo-current-lib/site/panda
STATE_FILE=$STATE_DIR/state
SAVE_DIR=~/.perl6
SAVE_FILE=$SAVE_DIR/panda-state.save
[[ -e $STATE_FILE ]] && [[ -e $SAVE_FILE ]] && cp -a $SAVE_FILE $SAVE_FILE.bak