Skip to content

Instantly share code, notes, and snippets.

@sorear
sorear / gist:5819756
Created June 20, 2013 01:59
class sharing in rakudo eval-server
Stefans-MacBook-Air:nqp-jvm sorear$ time perl tools/jvm/eval-client.pl ../rakudo-jvm/token run -e 'say "Hello world"'
Hello world
real 0m7.141s
user 0m0.050s
sys 0m0.012s
Stefans-MacBook-Air:nqp-jvm sorear$ time perl tools/jvm/eval-client.pl ../rakudo-jvm/token run -e 'say "Hello world"'
Hello world
real 0m1.721s
@sorear
sorear / gist:5818880
Created June 19, 2013 22:59
preliminary eval-server stuff
Stefans-MacBook-Air:nqp-jvm sorear$ perl tools/jvm/eval-client.pl token run -e 'say("hello, world"'
Confused at line 2, near "say(\"hello"
in panic (src/stage2/gen/NQPHLL.nqp:279)
in comp_unit (src/stage2/gen/NQP.nqp:766)
in TOP (src/stage2/gen/NQP.nqp:663)
in parse (src/stage2/gen/QRegex.nqp:1191)
in parse (src/stage2/gen/NQPHLL.nqp:1370)
in (src/stage2/gen/NQPHLL.nqp:1326)
in compile (src/stage2/gen/NQPHLL.nqp:1317)
in eval (src/stage2/gen/NQPHLL.nqp:1075)
@sorear
sorear / test.out
Last active December 18, 2015 15:28
prove -e './perl6 -Ilib' t/00-parrot t/01-sanity t/02-rakudo | tee test.out.2
t/00-parrot/01-literals.t ..........
Dubious, test returned 1 (wstat 256, 0x100)
Failed 15/24 subtests
t/00-parrot/02-op-math.t ...........
All 14 subtests passed
t/00-parrot/03-op-logic.t ..........
Dubious, test returned 1 (wstat 256, 0x100)
No subtests run
t/00-parrot/04-op-cmp.t ............ ok
t/00-parrot/05-var.t ............... ok
@sorear
sorear / design.pod
Created June 10, 2013 07:10
working design of nqp coros as of 2013-06-09

Multiple callers

There are two sensible ways to define the caller of a call frame. Either the frame which caused this frame to exist (henceforth, the static caller) or the frame which caused this frame to be active (henceforth, the dynamic caller). They are the same for most frames, but differ in the case of the top frame of a gather. The static caller of such a frame is the frame containing gather; the dynamic caller is the frame corresponding to GatherIter.reify. We need both: contextuals use the static caller (TimToady has said so quite explicitly), while exceptions and control flow ought to use the dynamic caller

@sorear
sorear / fail.txt
Created June 2, 2013 20:14
nqp jvm test failures
Test Summary Report
-------------------
t/nqp/24-module.t (Wstat: 0 Tests: 3 Failed: 0)
Parse errors: Tests out of sequence. Found (1) but expected (2)
t/nqp/59-nqpop.t (Wstat: 256 Tests: 0 Failed: 0)
Non-zero exit status: 1
Parse errors: No plan found in TAP output
t/qregex/01-qregex.t (Wstat: 0 Tests: 747 Failed: 3)
Failed tests: 271, 349, 355
t/p5regex/01-p5regex.t (Wstat: 0 Tests: 180 Failed: 1)
@sorear
sorear / gist:4146151
Created November 26, 2012 01:38
Current niecza fails
Test Summary Report
-------------------
t/spec/integration/lazy-bentley-generator.t (Wstat: 0 Tests: 0 Failed: 0)
Parse errors: No plan found in TAP output
t/spec/integration/error-reporting.t (Wstat: 0 Tests: 0 Failed: 0)
Parse errors: No plan found in TAP output
t/spec/integration/weird-errors.t (Wstat: 0 Tests: 7 Failed: 0)
TODO passed: 3
t/spec/S02-literals/quoting.t (Wstat: 0 Tests: 118 Failed: 0)
Parse errors: Bad plan. You planned 153 tests but ran 118.
@sorear
sorear / go.pl6
Created June 12, 2012 21:36
Partial Go grammar with correct semicolon insertion
grammar Go {
# this is a funny grammar because we're trying to simulate a separate lexer
# so in the main "grammar" part don't parse characters yourself, use only
# lexeme tokens.
# Normally the 'real' cursor always points after whitespace. If the
# 'logical' cursor is to point to an inserted semicolon, the 'real' cursor
# will be placed ONE CHARACTER BEFORE the next token start (and the
# location will be marked in @*ADDSEMI)
@sorear
sorear / app.js
Created June 1, 2012 06:14
ExtJS and node.js autodidacticism.
var AGELIMIT=120;
Ext.application({
name: 'HelloExt',
launch: function() {
// time vs realTime is a horrible hack. time is what gets displayed,
// it is 0-AGELIMIT always
Ext.define('LoadPoint', {
extend: 'Ext.data.Model',
fields: ['load','time','realTime']
diff --git a/lib/CORE.setting b/lib/CORE.setting
index 896c849..004df61 100644
--- a/lib/CORE.setting
+++ b/lib/CORE.setting
@@ -1458,14 +1458,41 @@ my class IterCursor {
# subclasses must provide .reify, return parcel
}
+my class ListIterator is IterCursor {
+ has $!source; # P6any
@sorear
sorear / futures.txt
Created May 22, 2012 07:28
Brainstorm of possible futures for niecza
"Compiler core" = src/*.pm6 except STD
Choose compiler core language.
Perl 6:
When the setting is being recompiled, how is the current setting
distinguished from the new one?
The compiler does not depend on anything from the setting:
How are compiler references to kernel objects resolved if not via CORE?