»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by lichtkind on 5 March 2010.
00:03 ruoso joined 00:06 dalek left, dalek joined
diakopter hrm 00:07
sorear Caught up. 00:09
diakopter dalek: die
sorear jnthn: the getprop/setprop is my least favorite bit too.
jnthn sorear: The namespace that $lsm.get_namespace($mod); returns is actually a clone, IIRC? 00:11
O rnot?
If so, why not just create EXPORT::DEFAULT namespace within it?
Same for any other tags.
And then get_imports can just work "as normal". 00:12
sorear It's not a clone; I'm not quite sure it can be
jnthn Maybe we can still get away with sticking an EXPORT::DEFAULT namespace in there anyway.
diakopter jnthn: would you do a test commit to rakudo plz? I may have broken dalek
jnthn diakopter: I'm spectesting something right now, it's nearly done. :-)
sorear if we did that, then it would be harder to set variables in other HLLs
maybe
jnthn BTW, the other thing is that I added :lang back for eval 00:13
So now we can use Blizkost to eval p5 code too. :-)
sorear TimToady: I see $! at the same semantic level as $self->meta->get_meta_instance->set_slot($self, 'foo') or however you spell that these days
TimToady: which makes me suspect that $! should never be used outside of the the implementations of accessor generators 00:14
TimToady: i.e. within attribute traits
jnthn sorear: Anyway, we don't really need a solution Right Now, but I think the setprop/getprop has to go away.
sorear jnthn: We're in agreement there. 00:15
TimToady submethods need $! access
jnthn sorear: OK, great. :-)
00:16 Spreadsheet_ left
diakopter jnthn: did you commit? 00:20
00:20 meppl left
jnthn 3000 more spectests to go... :-) 00:20
(well, I committed...but not pushed yet ;-)) 00:21
diakopter you and your newfangled abstraction layers
jnthn Sorry for being such a git.
sorear reads the "tweaked" patch 00:22
00:22 lest_away is now known as lestrrat
diakopter "git 'er done" "git on over here". sorry. no puns appear. 00:23
jnthn dalek had better git the push I just did onto the channel! 00:25
diakopter hm.
sigh. 00:27
jnthn Я хочу мою карму! 00:28
:-(
sorear: eval patch pushed too
sorear++ # Blizkost
dalek kudo: a27dfef | jonathan++ | src/cheats/eval.pm:
Re-enable :lang attribute for eval. Now we can eval Perl 5 code using Blizkost.
diakopter O_O 00:29
00:29 dalek left, dalek joined
diakopter ok 00:29
jnthn yay! 00:30
00:33 gruotr joined
diakopter hm. 00:33
I guess it checks every 5 min or something
jnthn It did lose one patch. 00:35
(one before that one)
diakopter hm.
<-- fail
sorear diakopter: How does dalek decide what to announce where? 00:36
diakopter I'm relearning that.
I used to know, since I created it originally, then Infinoid redid it 10x over, 10x better
sorear is mostly wondering why blizkost shows up over in #parrot instead of here 00:37
colomon TimToady: It seemed inconsistent to me that for min and max, we had operator versions, and methods on Range and "list", but for minmax we had only the operator versions and the method on Range. And since I went looking for it for the code I was writing, and it was easily implemented and potentially more efficient than calling min and max individually, I just went ahead and added it.
sorear rakudobuild memory usage seems to have regressed a bit
was 261MB peak immediately after chromatic++'s COW leakhunt 00:38
00:38 envi^home joined
sorear now peaking around 340MB 00:38
diakopter dalek: eat worms 00:40
jnthn Will be interesting to see how the immutable strings stuff helps. 00:42
TimToady colomon: I think minmax should always *return* a Range
the list form of return is a fossil from before Ranges behaved like intervals 00:43
colomon TimToady: oh, I see 00:44
all the different versions of minmax?
TimToady the specs haven't caught up with this view though
yes, probably
and Range.minmax is meaningless in that view
or a no-op 00:45
should probably be renamed to Range.endpoints or some such, if it's to return a list
or just skip it, and make people write Range.min, Range.max if they mean that 00:46
jnthn -> sleep, o/
TimToady ciao
colomon TimToady: here's the code I actually used it in: 00:47
our method bounds() {
my ($u-min, $u-max) = @.points.map({$_[0]}).minmax(&[<=>]);
my ($v-min, $v-max) = @.points.map({$_[1]}).minmax(&[<=>]);
($u-min .. $u-max, $v-min .. $v-max);
}
araujo any pug developer around here?
diakopter sorear: I finally found the stdout logs for dalek
colomon So obviously returning a Range fits vert well with that usage.
araujo pugs*
00:48 dalek left, dalek joined
TimToady .bounds would be better than .endpoints 00:48
colomon :)
so minmax operator and "list".minmax return Ranges, Range.minmax renamed to Range.bounds. 00:49
That sounds pretty reasonable to me.
TimToady and [minmax] returns a range of the minnest min and maxest max of all the ranges in its list, assuming singletons are $n..$n 00:51
00:51 dalek left, dalek joined
diakopter finally. 00:51
colomon TimToady: that's a different variation on [minmax] than I was thinking.
TimToady there's another interpretation of minmax that returns a minimum range plus a maximum range
colomon maybe unify: minmax Range, other returns Range expanded to contain other. minmax Range, Range returns the smallest Range that contains both Ranges. 00:52
(those are meant to be infix operators.) 00:53
TimToady yes, I think of minmax as just finding a single range that encompasses everything
colomon and (infix proper this time) Any minmax Any returns the Range from the min of the two to the max of the two.
TimToady not finding the range of mins pluse the range of maxes
colomon I love that, that would fit very well with the code I was writing. 00:54
Shall I tackle the code / tests and see how that works in practice?
TimToady mostly I think of minmax as just replacing a bunch of parallel min= and max= ops
sure
finding the max minimum and the min maximum sound more like some kind of "outer" thing 00:55
00:56 stephenlb left
TimToady I don't know whether the term 'minmax' will mean that to some large subset of people though 00:57
colomon I do wonder if there might be a better name.
rakudo: say 4 minmax 10
p6eval rakudo a27dfe: OUTPUT«Confused at line 11, near "say 4 minm"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
colomon looks like we never actually implemented the minmax operator.
TimToady well, it's been wandering in and out of spec periodically 00:58
sorear araujo: there are no pugs developers
afaik
colomon I think auderyt++ still pokes away at it now and then. 00:59
but I haven't seen her around here in a while.
sorear auderyt--
diakopter she keeps it updated for the latest ghc & latest hackage
sorear audreyt++
colomon sorear++ 01:00
spinclad though not in the pugs repository now
diakopter right, on github
now that mildew no longer has a pugs dependency, I'm sorely tempted to clean up pugscode...
sorear How so?
dalek meta: r197 | diakopter++ | trunk/Sprixel/Main.cs:
[perlesque] still another test commit. :)
diakopter oh goody 01:01
TimToady someone should write a Haskell emitter for viv :)
spinclad :)
diakopter jabs TimToady with a functor
sorear I'm looking forward to when we can rewrite viv in perl6
spinclad compile grammars into Parsec
colomon TimToady: Hmmm.... should normal min and max also get the enhanced functionality to handle Range arguments? That is, 4 min 2..20 would return 2 01:02
TimToady yes, I suspect you're right
colomon right now it would just be a fatal error, I think.
TimToady [minmax] @list should behave like ([min] @list)..([max] @list), and vice versa, probably 01:04
colomon oh, except how that works wrt Ordering is kind of funky.
TimToady yes, well, we still haven't really defined ordering across differing types... 01:05
sorear rakudo: use Cwd :from<perl5>; say getcwd;
p6eval rakudo a27dfe: OUTPUT«Unable to find module 'Cwd'.␤current instr.: 'perl6;Perl6;Module;Loader;need' pc 35780 (src/gen/role_pm.pir:932)␤»
sorear rakudo: use Cwd:from<perl5>; say getcwd; 01:06
p6eval rakudo a27dfe: OUTPUT«"load_language" couldn't find a compiler module for the language 'perl5'␤current instr.: 'perl6;Perl6;Module;Loader;need_foreign' pc 36574 (src/gen/locator_pm.pir:213)␤»
01:06 rv2733 left
TimToady one could argue that (0..5) <= (3..7) and (0..3) < (5..7); one could also argue that overlapping intervals are not comparable 01:08
dunno how the mathematicians think of it 01:09
there's a lot of any vs all semantics going on there
colomon I think I've implemented a straightforward version of minmax which will do the right thing on "normal" orderings. I'm going to give that a try. 01:10
01:11 Infinoid left
dalek meta: r198 | diakopter++ | trunk/Sprixel/ (2 files):
[perlesque] another fix for "else". sigh.
01:11
diakopter wonder-tonic.com/geocitiesizer/cont....perl6.org
01:12 ash_ joined 01:13 lisppaste3 left, lisppaste3 joined
diakopter TimToady: if a goto LABEL occurs in a block that assigns a new dynamic var where LABEL occurs outside that block, does the value of that dynamic var get "reverted"? 01:16
01:16 wknight8111 left
colomon rakudo: given 10 { when Num { say "Num!"; }; when Int { say "Int!"; }; }; 01:19
p6eval rakudo a27dfe: OUTPUT«Num!␤»
colomon rakudo: given 10 { when Numb { say "Num!"; }; when Int { say "Int!"; }; }; 01:20
p6eval rakudo a27dfe: OUTPUT«Missing block at line 11, near "; when Int"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
colomon I see.
01:21 bradb left
dalek meta: r199 | diakopter++ | trunk/Sprixel/src/Perlesque/ControlFlow.cs:
fix "unless" also.
01:21
colomon just unpacked his copy of Perl 6 Essentials, from 2003. Perhaps they were getting a little ahead of themselves there. :) 01:22
diakopter if anyone wants an explanation of any of the files in src/Perlesque, I would be glad to explain the structure & the API "DSL" I created for it.
01:29 am0c left 01:39 xinming left, xinming joined 01:48 am0c joined 01:58 Psyche^ joined 01:59 takadonet1 joined
takadonet1 hey everyone 01:59
sorear Hello!
02:00 snarkyboojum left
takadonet1 sorear: how are you sir? 02:00
sorear Quite happy 02:01
takadonet1 good to hear!
02:02 Patterner left, Psyche^ is now known as Patterner 02:07 snarkyboojum joined
snarkyboojum g'day #perl6 hackers 02:08
how many perl6-ish gsoc projects were given the green light? 02:09
colomon 2 02:10
plus 5 or 6 parrot projects
02:10 agentzh joined
snarkyboojum colomon: ah - how many perl 6 applications were there roughly? 02:10
colomon I don't know.
I only heard about those two ahead of time. 02:11
agentzh snarkyboojum: we're going to run perl 6 in production *grin*
snarkyboojum agentzh: w00t
agentzh snarkyboojum: once we've got ngx_lua for nginx and a perlito with a lua emitter ;) 02:12
snarkyboojum the mind boggles! :)
agentzh is currently working hard on ngx_lua with his teammates.
sorear snarkyboojum: use :from<perl5> works now. 02:13
snarkyboojum sorear: I saw something in the backlog! sorear++!
sorear: I'm going to have to give it a go today (and work out how to get it going) 02:14
02:14 orafu left 02:15 JimmyZ joined
araujo sorear, ooh i see .. mm 02:16
02:31 orafu joined
JimmyZ rakudo: use Cwd:from<perl5>; say getcwd; 02:35
p6eval rakudo a27dfe: OUTPUT«"load_language" couldn't find a compiler module for the language 'perl5'␤current instr.: 'perl6;Perl6;Module;Loader;need_foreign' pc 36574 (src/gen/locator_pm.pir:213)␤» 02:36
diakopter I think blizkost is not installed on p6eval
JimmyZ Yeah
02:45 patspam joined
colomon rakudo: my @a = 3..10; say min(@a) 02:53
p6eval rakudo a27dfe: OUTPUT«Inf␤»
diakopter pugs: my @a = 3..10; say min(@a) 02:55
p6eval pugs: OUTPUT«3␤»
colomon neither one of those is supposed to work, so far as I know. 02:56
02:58 takadonet1 left
ash_ why not? 02:58
colomon min takes an ordering function as its first argument 02:59
If you don't need the ordering function you can just call [min] @a 03:00
ash_ rakudo: my @a = 3..6; say [min] @a;
p6eval rakudo a27dfe: OUTPUT«3␤»
colomon rakudo: my @a = 3..6; say @a.min 03:01
p6eval rakudo a27dfe: OUTPUT«3␤»
colomon many options.
TimToady diakopter: yes, it gets reverted, as if an exception had been thrown to the outer block, and the goto happened there. 03:02
diakopter k I figured 03:03
TimToady dynamic vars merely pick the current lexpad and its OUTERs
diakopter easy enough to compile-time know how many to pop
for perlesque, at least
since perlesque dynamics will never fall back to..
something or other in the spec; I forget 03:04
sorear TimToady: How does the rule that imports clone the namespace interact with cases where the foreign language modifies its own namespace? 03:07
Most importantly, Perl5 AUTOLOAD
03:14 lestrrat is now known as lest_away, ash_ left 03:15 ash_ joined
snarkyboojum do I need a separately installed parrot to build blizkost? 03:22
03:23 bbkr left
sorear snarkyboojum: probably not, but that configuration is untested 03:23
snarkyboojum I pointed it at a parrot_config that came bundled with --gen-parrot when building rakudo, and it created a makefile ok, but make died
03:25 bbkr joined
snarkyboojum when building with perl 5.12, I get further with perl 5.10 - but different error 03:27
sorear How did make die?
snarkyboojum with 5.10 or 5.12? 03:28
sorear Both, ideally 03:29
snarkyboojum sorear: this is for 5.10 gist.github.com/380285
03:31 bradb joined
snarkyboojum sorear: this is for 5.12 gist.github.com/380288 03:32
sorear snarkyboojum: count yourself lucky
you appear to have compiled Perl 5.10 and Parrot with different C compilers
snarkyboojum yay
for 5.10 quite possible
how about 5.12?
sorear Blizkost uses the union of the compile options in order to keep both perl.h and parrot.h happy
using two different compilers is usually a recipe for segfaults anyway 03:33
snarkyboojum my 5.10 is a mac os x special
sorear that it failed at compile time is a blessing
snarkyboojum 5.12 was compiled by me
sorear I should add a configure-time check for Perl's $Config{cc} being the same as Parrot's
snarkyboojum sorear: how about the 5.12 error? :) 03:34
sorear Looking now
You need to configure Perl with -Dusemultiplicity for blizkost to work properly 03:35
snarkyboojum oic
sorear that allows multiple Perl interpreters in one process
eventually, there's going to be some kind of logic to make P5Interpreter sometimes a singleton 03:36
-Dusethreads implies -Dusemultiplicity, so most generic system perls (which don't disable any feature, let alone one as ooh-ahh as multithreading) will have it
snarkyboojum I tend not to compile with -Dusethreads 03:37
(or is that on by default :))
sorear It's off by default. 03:38
snarkyboojum right
sorear In 5.12, -Duseshrplib is also off by default
snarkyboojum will have bash at rebuilding with usemultiplicity
sorear This could be a problem :p
well 03:39
it may work
snarkyboojum so run with useshrplib as well?
sorear depending on your OS
yes
snarkyboojum okydoke
sorear useshrplib enables the generation of libperl.so
03:39 molaf joined
sorear /dyld/dll 03:39
by default 5.12 perls are statically linked
Blizkost must be built as a dynamic library 03:40
using static libraries to build dynamic libraries is problematic, since on many systems code going into dynamic libraries needs special compile flags
snarkyboojum goodie - will see how it goes 03:41
sorear on linux/i386 trying to use non-dynamic-library objects in a dynamic library will cost you a significant amount of load time and runtime memory usage
there's probably at least one platform where it won't work at all
03:41 charsbar left, charsbar joined 03:56 lue joined
lue hello! 03:56
ash_ hi 03:58
snarkyboojum lue o/
sorear snarkyboojum: Have you installed the new 5.12 yet? 04:01
snarkyboojum sorear: having several goes
sorear what do you mean by that?
snarkyboojum well I've built it several times, but not convinced I've managed to get it configured correctly :) 04:02
sorear could you hold off for a moment on the install, I mean
snarkyboojum already installed it, but no cigar 04:04
sorear ah
well
that's as well 04:05
04:10 meppl joined 04:11 snarkyboojum left 04:24 snarkyboojum joined
JimmyZ Could somebody install Bliskost on p6eval? 04:25
sorear snarkyboojum: Could you test the latest blizkost patch? 04:29
I've added some fail-earlier code to the config system 04:30
snarkyboojum sorear: cool - will give it a run
sorear to catch the two errors you found, and one that bit me earlier
04:32 ash_ left
snarkyboojum sorear: catches that fact that my perl isn't configured to allow the runtime creation of new intepreters.. 04:33
s/that fact/the fact/
cognominal rakudo: sub a { say "hi" } if 0; a() 04:38
p6eval rakudo a27dfe: OUTPUT«hi␤»
sorear std: sub a {say "hi" } if 0
p6eval std 30480: OUTPUT«ok 00:01 109m␤»
sorear phenny: tell TimToady : Should sub foo { } accept statement modifiers? std accepts it 04:39
phenny sorear: I'll pass that on when TimToady is around.
eternaleye std: my $foo if 0
p6eval std 30480: OUTPUT«ok 00:01 107m␤»
eternaleye ... I thought that was ruled illegal
04:42 lest_away is now known as lestrrat
sorear my $foo if 0 has a clearly defined parse and semantics 04:44
it does nothing at runtime and is equivalent in every way to my $foo
old versions of perl5 got this wrong and produced what is now 'state' behavior as a bug 04:45
eternaleye sorear: There was a discussion about it being banned in p6, I'll see if I can dig it up 04:51
A good long while ago
dalek meta: r200 | diakopter++ | trunk/Sprixel/ (50 files):
compilation of stage1 to disk! :) the emitted perlesque.exe is the new way to

RunSharp public. :)
04:57
sorear .exe or @exe@? 04:58
04:59 yakeworld joined, molaf left 05:00 chhxu joined
diakopter .exe 05:01
05:01 ReiniUrban joined
diakopter sigh. 05:01
it's lightning fast to load/run in .NET
sorear .exe is a universal in the CLR?
diakopter (windows)
yeah, but the extension actually doesn't matter 05:02
it can be anything
on linux, I mean
mono <filename>
... but slow to load/run in mono
eternaleye sorear: nvm, I was misremembering 05:03
05:03 rurban left, ReiniUrban is now known as rurban
eternaleye sorear: I seem to be going senile in my advanced age </deadpan> 05:04
eternaleye is 19
sorear so I'm not the only one.
diakopter sigh. 05:05
diakopter is 29
05:05 chhxu left
eternaleye What I was remembering turned out to be a specific mention of C<my $foo if 0>'s old behavior in the synopses back in '06 05:06
diakopter apparently, mono JITting a routine that's 120,000 CIL instructions long takes a long time.
sorear Can't break it up? 05:07
diakopter and in fact, trying to mono --aot it (ahead of time compile to machine code) causes yet another SIGABRT in mono.
dalek meta: r201 | diakopter++ | trunk/Sprixel/Main.cs:
remove debug
sorear mono crashes? ick 05:08
diakopter it crashes on the aot
not on the normal JIT run
05:08 gruotr left
diakopter sigh. 05:09
05:09 gruotr joined
diakopter ah well, it's still very fast to run the code that *perlesque* compiles 05:09
that's all that really matters for bootstrapping
sorear Who generated the oversize function? 05:10
diakopter meeeeee
it's the parser/compiler. all in one routine.
:|||||
'nite 'afk
sorear 'nite
lue afk as well
05:11 kaare joined 05:12 kaare is now known as Guest16851
sorear rakudo: class A { }; ::A.new 05:14
p6eval rakudo a27dfe: ( no output )
sorear I wonder if that's supposed to be legal.
And, if so, why ::A and A are completely different. 05:15
Moreover 05:17
05:17 plobsing left
sorear The PDD-21 namespace interface is specced in terms of *methods* 05:17
which is... problematic to reconcile 05:18
spinclad ::A means some class that we're giving the name A to; no idea where rakudo thinks it shows up from. so yes, legal syntactically i'd say, and of liminal semantic at best.
sub-liminal even 05:19
(*marginal may be a more current term) 05:20
TimToady a leading :: means to presume the type exists; if it doesn't, it'll fail at run time 05:21
phenny TimToady: 04:39Z <sorear> tell TimToady : Should sub foo { } accept statement modifiers? std accepts it
TimToady in a declaration, it has the added meaning of capturing a new type 'en passant'
so ::A is much the same as ::("A") as a symbolic reference 05:22
(when used on an rvalue)
spinclad so... find 'A' (just to the left, here), and call it 'A' ?
TimToady and sure, 'sub foo { }' is just a term, though it doesn't make a lot of sense to put a statement modifier on something that has no run-time effect 05:23
sorear Ah, I thought sub foo { } was a non-expression statement
TimToady "assume A is a valid type name even though you may not know it at compile time"
no, that's C, and p5 in spots 05:24
spinclad rakudo: class A { }; ::A.new; say 'alive'
p6eval rakudo a27dfe: OUTPUT«alive␤»
TimToady rakudo: ::A.new; class A { }; say 'alive'
p6eval rakudo a27dfe: OUTPUT«alive␤»
sorear So, if A exists in the package or is in lexical scope at compile time, A and ::A are exactly the same?
spinclad rakudo: ::A.new; say 'alive'
TimToady a forward declaration of sorts
p6eval rakudo a27dfe: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected␤current instr.: 'perl6;Failure;new' pc 15013 (src/builtins/Seq.pir:115)␤»
spinclad rakudo: ::A.new; say 'alive'; class A 05:25
p6eval rakudo a27dfe: OUTPUT«Malformed package declaration at line 11, near ""␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
spinclad rakudo: ::A.new; say 'alive'; class A {}
p6eval rakudo a27dfe: OUTPUT«alive␤»
spinclad ic 05:26
TimToady rakudo: say ::A.new.WHAT; class A { }; say 'alive'
p6eval rakudo a27dfe: OUTPUT«A()␤alive␤»
sorear TimToady: Is the conflict between ::A as a namespace with a meta API and ::A as a class protoobject with methods real or an artefact of the Parrot embedding?
TimToady std: my $x = sub foo { };
p6eval std 30480: OUTPUT«ok 00:01 110m␤»
TimToady seems like an artifact to me 05:27
sorear rakudo: module A { }; ::A.add_sub('&foo', sub() { say "hi" }); A::foo
p6eval rakudo a27dfe: OUTPUT«Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1664 (ext/nqp-rx/src/stage0/Regex-s0.pir:907)␤»
TimToady the namespace/package is actually A::, not A
JimmyZ rakudo: my $x = sub { say 'hi'} if 0; $x();
p6eval rakudo a27dfe: OUTPUT«invoke() not implemented in class 'Any'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
sorear rakudo: module A { }; ::A.add_sub('&foo', sub() { say "hi" };); A::foo
p6eval rakudo a27dfe: OUTPUT«Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1664 (ext/nqp-rx/src/stage0/Regex-s0.pir:907)␤» 05:28
sorear what
JimmyZ rakudo: my $x = -> { say 'hi'} if 0; $x();
p6eval rakudo a27dfe: OUTPUT«invoke() not implemented in class 'Any'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
sorear I put a ; after }
what else do I need to do?
JimmyZ rakudo: my $x = -> { say 'hi'}; $x();
p6eval rakudo a27dfe: OUTPUT«hi␤»
sorear TimToady: Do namespaces have a meta API in Perl 6?
TimToady no, they're just packages/hashes 05:29
parrot has historically confused those concepts because of p5 history
araujo q:x{ls ~/}.say # is this supposed to work yet in rakudo?
TimToady and we're still trying to detangle code from packages
araujo I get it working without the ':' 05:30
sorear what was the syntax error in my last rakudo line?
spinclad sorear: no ; after } there, those are arguments... no idea of why earlier
sorear rakudo: class Foo { our $x = 2; }; say ::Foo::<$x>; 05:31
p6eval rakudo a27dfe: OUTPUT«Method 'postcircumfix:<{ }>' not found for invocant of class ''␤current instr.: '!postcircumfix:<{ }>' pc 13978 (src/builtins/Code.pir:39)␤»
spinclad sub () ?
sorear rakudo: class Foo { our $x = 2; }; say ::Foo<$x>;
p6eval rakudo a27dfe: OUTPUT«Method 'postcircumfix:<{ }>' not found for invocant of class ''␤current instr.: '!postcircumfix:<{ }>' pc 13978 (src/builtins/Code.pir:39)␤»
spinclad sub() calls the sub 'sub'
sorear rakudo: class Foo { our $x = 2; }; say (Foo)<$x>;
p6eval rakudo a27dfe: OUTPUT«Method 'postcircumfix:<{ }>' not found for invocant of class ''␤current instr.: '!postcircumfix:<{ }>' pc 13978 (src/builtins/Code.pir:39)␤»
spinclad rakudo: module A { }; ::A.add_sub('&foo', sub () { say "hi" }); A::foo
p6eval rakudo a27dfe: OUTPUT«Invalid type 84 in add_sub()␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
sorear rakudo: class Foo { our $x = 2; }; say Foo::<$x>;
p6eval rakudo a27dfe: OUTPUT«Could not find sub &Foo␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
TimToady subs don't really belong in packages mostly, since we're doing almost everything with lexical scopes or metaclasses now 05:32
all function dispatches look only in the lexical scopes, unless the name is package qualified 05:33
in p5 both functions and methods go in the package; in p6 *neither* of them do, by default 05:34
globals are bad for concurrency and magical action at a distance
sorear: rakduo doesn't really understand Foo:: notation yet 05:35
rakudo even
sorear my $x = 'CALLER'; say $::($x)::foo; # Does this work?
sorear leans towards no 05:36
TimToady std: my $x = 'CALLER'; say $::($x)::foo; # Does this work?
p6eval std 30480: OUTPUT«ok 00:01 110m␤»
TimToady well, it parses :)
sorear yes
TimToady why shouldn't it work?
sorear but it could be accessing an outer dynamic scope
spinclad rakudo: my $x = 'CALLER'; say $::($x)::foo; # Does this work?
sorear or it could be accessing a package
p6eval rakudo a27dfe: OUTPUT«Indirect name lookups not yet implemented at line 11, near "::foo; # "␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
sorear I lean towards "a package"
TimToady yes, but we have no clue what we'll get in $x, so we have to be prepared to deal with it 05:37
sorear the magic $CALLER::x notation feels like it should be static to me
a grammatical feature
TimToady well, it can't be bound at compile time in any case
sorear not a function of name lookup
TimToady why can't we do name lookups at run time?
if you write something pessimal, then it runs slow, is all
probably disables tail-call optimization to use ::() too 05:38
or explicit CALLER 05:39
or DYNAMIC::
well, maybe that's okay
sorear Exactly
Why should ::() disable TCO
TimToady because it's like eval, and you shouldn't use it :)
eval might call CALLER too... 05:40
or CALLER::CALLER::...
generally you shouldn't be using symbolic links when hard links would do 05:41
sorear What about say($argument)?
TimToady what about it?
sorear $argument might have overloaded stringification which uses CALLER::CALLER::
wait, ignore me, I just reversed my rhetorical direction in mid-argument 05:42
TimToady :)
spinclad ( night, all o/ ) & 05:43
TimToady \o
meppl good night, spinclad 05:44
05:46 am0c__ joined 05:48 am0c left 05:49 am0c__ is now known as am0c 05:53 quester_ joined 05:56 jonasbn joined
araujo rakudo: my @arr = 1, 3, 4, 5; q:a{element: @arr[2]}.say 06:00
p6eval rakudo a27dfe: OUTPUT«Colons may not be used to delimit quoting constructs at line 11, near ":a{element"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
TimToady araujo: rakudo's quoting constructs are hardwired and don't have the flexibility that is specced 06:01
std: my @arr = 1, 3, 4, 5; q:a{element: @arr[2]}.say
p6eval std 30480: OUTPUT«ok 00:01 111m␤»
araujo TimToady, I see.. 06:02
TimToady std goes as far as to generate a new slang and parse with that
rakudo doesn't yet
std: my @arr = 1, 3, 4, 5; q:a{element: $nonesuch @arr[2]}.say
p6eval std 30480: OUTPUT«ok 00:01 109m␤»
TimToady std: my @arr = 1, 3, 4, 5; q:a{element: @arr[$nonesuch]}.say
p6eval std 30480: OUTPUT«===SORRY!===␤Variable $nonesuch is not predeclared at /tmp/Xcqi1INzMw line 1:␤------> 1, 3, 4, 5; q:a{element: @arr[$nonesuch⏏]}.say␤Check failed␤FAILED 00:01 109m␤»
TimToady std: my @arr = 1, 3, 4, 5; q:a:s{element: $nonesuch @arr[2]}.say 06:03
p6eval std 30480: OUTPUT«===SORRY!===␤Variable $nonesuch is not predeclared at /tmp/y1f2710HS4 line 1:␤------> r = 1, 3, 4, 5; q:a:s{element: $nonesuch⏏ @arr[2]}.say␤Check failed␤FAILED 00:01 109m␤»
TimToady but there are a very large number of possible slangs involved 06:04
araujo I see now :P
TimToady so we generate them lazily on demand
06:07 uniejo joined 06:08 REPLeffect left
sorear TimToady: Is it possible to quote a package name component and put weird characters in it? Can package name components contain :: if quoted? 06:09
TimToady ::($x) will reparse $x for embedded ::, but PACKAGE::{$x} will not, and just use $x as a lookup key 06:10
sorear I see.
TimToady different abstraction layers, again
06:10 REPLeffect joined
sorear TimToady: Are there any plans to support general grammar mangling from user code? e.g. ingy's { use Inline 'C'; int x = 10; int y = 1; while (x--) { y *= x } } 06:11
TimToady certainly, that's why STD parses using slangs
all languages are just dialects of Perl 6 06:12
:)
sorear Has the mechanism for doing so been specced yet, or is it a complier-specific thing? 06:13
TimToady STD has a couple ways of switching languages at the grammar or p6 levels, but doesn't implement 'augment slang' at a user-level yet 06:14
nor does it have true macros yet 06:15
since that would involve executing code
and STD still just fakes it
so we don't do anything with an "is parsed" trait yet
but when we get it, "is parsed" doesn't care whether it's switching to a different subrule in the same grammar, or to an entirely different grammar 06:16
it's not even clear what "same grammar" means anymore, since even STD is a braid of many different slangs 06:17
the exact language you're parsing at any point depends on the exact pedigree of declarations before that
which (hopefully) we've kept entirely lexically scoped 06:18
and sane
sorear There seems to be little in the spec on the notion of exporting slangs.
TimToady well, any time you export a macro, you're kinda doing that
sorear The spec explains how to change the grammar to C for a lexical block, but not how to reuse that between many blocks
06:19 hercynium left
TimToady well, in essence, it's the same process as using the same slang for parsing, say, all double-quoted strings 06:19
you just have to have a named slang, and way of calling :lang($dialect) at some point in the match
it's just the common ones that are kept in %*LANG, like MAIN, Regex, 06:20
Q, etc.
sorear What's the relationship between %*LANG and %?LANG ?
TimToady in fact, STD derives Q:qq every time you use double quotes 06:21
one is the compiler's view, and the other is the user's view
dynamic variables in the parse look lexically scoped to the user
sorear To a very loose approximation, then, $?FOO === BEGIN { $*FOO } 06:22
TimToady something that's contextual in the parser, if it's remembered till run-time, becomes a constant
06:22 riffraff joined
TimToady yes 06:22
and I think there's even some code in there to look for $*FOO in the compiler if $?FOO is unrecognized
so, as a bad example, you might have the current line number stored in $*LINE, but $?LINE is the actual line number snapshotted 06:23
since that can't change at run time
(we don't actually do it with a $*LINE variable) 06:24
as a real example, $*CURPKG is the pointer the currently-being-parsed package, which is dynamic in the recursive descent parser 06:26
but
std: $?CURPKG
p6eval std 30480: OUTPUT«ok 00:01 107m␤»
TimToady std: $?CURFOO
p6eval std 30480: OUTPUT«Potential difficulties:␤ Unrecognized variable: $?CURFOO at /tmp/FZsvImWd0s line 1:␤------> $?CURFOO⏏<EOL>␤ok 00:01 107m␤»
TimToady that one might be hardwired though 06:27
std: $?SCOPE
p6eval std 30480: OUTPUT«ok 00:01 107m␤»
TimToady pretty sure that one is just copying the current value of $*SCOPE
06:28 viklund joined
sorear rakudo: my %x = :a(2); say Q:PIR { $P234 = find_lex "%x"; %r = $P234["a"] } 06:29
p6eval rakudo a27dfe: OUTPUT«error:imcc:syntax error, unexpected ';', expecting '\n' (';')␤ in file 'EVAL_1' line 73␤Null PMC access in type()␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
sorear rakudo: my %x = :a(2); say Q:PIR { $P234 = find_lex "%x"␤ %r = $P234["a"] } 06:30
p6eval rakudo a27dfe: OUTPUT«get_pmc_keyed() not implemented in class ''␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
TimToady hmm, actually it's $?PACKAGE that is currently hardwired to be the same as $?CURPKG 06:31
sorear rakudo: $A::x = 0; say pir::typeof__SP(A::) 06:32
p6eval rakudo a27dfe: OUTPUT«Null PMC access in getprop()␤current instr.: '&infix:<=>' pc 17050 (src/builtins/Junction.pir:224)␤»
sorear rakudo: $A::x := 0; say pir::typeof__SP(A::)
p6eval rakudo a27dfe: OUTPUT«Null PMC access in can()␤current instr.: 'parrot;P6protoobject;ACCEPTS' pc -1 ((unknown file):-1)␤»
sorear rakudo: module A { our $x = 0; }; say pir::typeof__SP(A::) 06:33
p6eval rakudo a27dfe: OUTPUT«Could not find sub &A␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
sorear rakudo: module A { our $x = 0; }; say pir::typeof__SP(::A)
p6eval rakudo a27dfe: OUTPUT«NameSpace␤»
TimToady don't think rakudo knows the postfix :: to translate type name to name space yet
sorear so in real Perl 6, A (the protoobject) and A:: (the hash) are non-identified? 06:34
TimToady rakudo: module A { our $x = 0; }; say pir::typeof__SP(A)
p6eval rakudo a27dfe: OUTPUT«NameSpace␤»
TimToady correct
for one thing, the hash is defined
and the type object isn't 06:35
rakudo: module A { our $x = 0; }; say pir::typeof__SP(%A::)
p6eval rakudo a27dfe: OUTPUT«Null PMC access in name()␤current instr.: '_block14' pc 29 (EVAL_1:0)␤» 06:36
TimToady rakudo: module A { our $x = 0; }; say pir::typeof__SP(%A)
p6eval rakudo a27dfe: OUTPUT«Symbol '%A' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
TimToady yeah, don't think they've got any way of detangling those yet 06:37
moritz_ good morning
TimToady rakudo: module A { our $x = 0; }; say A.defined
p6eval rakudo a27dfe: OUTPUT«Method 'defined' not found for non-object␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
JimmyZ \o
viklund good morning
06:39 XaeroOne joined 06:41 justatheory left
sorear If I'm writing PIR code for Rakudo, how do I decide whether it goes in builtins/, glue/, or cheats/ ? 06:41
moritz_ is it a builtin?
sorear what's a builtin?
it has special syntax, does that qualify it? 06:42
moritz_ a function that's called at run time
(indepenent of syntax)
bbl
sorear All of our pir code is functions called at run time
TimToady moritz_: (still backlogging to Saturday) there's no p5=> anymore; it can be added by the p5-to-p6 translator if wanted
as a macro 06:43
sorear specifically, I'm implementing a super magic tied namespace 06:45
that will be visible as FOREIGN
so you can do FOREIGN::perl5::MainWindow.new 06:46
06:47 XaeroOne left
TimToady use p5:from<perl5 ::> or some such should just alias p5:: to be the top of p5's global space, methinks 06:49
sorear nice trick, but I think it only works with foreign languages that use hierarchal modules? 06:50
TimToady well, every use can do an alias
:from<> contains the foreign name
sorear 3 things happen in the foreign binding process 06:51
the module $name is loaded
the alias $aname is installed to package $name
the imports occur
there's a trap here though
modules and packages have a slight difference 06:52
what if I want to access a package for which no corresponding module exists?
06:52 XaeroOne joined
sorear when more than one package is defined in a file 06:52
CPAN.pm and Tk do this :/
TimToady well, that's part of why we split out need vs import 06:53
need fetches the file, import imports from already loaded packages
sorear the alias is installed at need time
TimToady or from modules already defined in the current file
sorear not import
TimToady well, we can have more aliases if we need 'em 06:54
TimToady waves hands vaguely
at some point it's all BEGINish code and we can set whatever conventions we like 06:55
sorear Where do we get the aliases, though? 06:56
Do we split need apart into need and alias?
Also, it feels a bit odd that normal modules can be accessed anywhere, anytime
While foreign ones require the moral equivalent of an 'our
'
TimToady well, we have a hierarchical namespace, and as you say, the foreign code might not 06:57
but pretty much all module names get aliases, even our own 06:58
since the full name of a module includes version and auth
so if you say Foo::Bar there's still an alias from Foo to Foo:ver<1.2>:auth<SOMEONE> 06:59
and in a different lexical scope, Foo:: might be aliased to a different longname
06:59 scottamatot joined
TimToady so it's not as hypocritical as you might think :) 06:59
sorear in Real Perl 6, is it an error to say Foo without getting an our for it first?
TimToady std: Foo; class Foo {} 07:00
p6eval std 30480: OUTPUT«===SORRY!===␤Illegally post-declared type:␤ 'Foo' used at line 1␤Check failed␤FAILED 00:01 109m␤»
sorear std: { our class Foo {} }; Foo 07:01
p6eval std 30480: OUTPUT«ok 00:01 107m␤»
TimToady and "our" has very little to do with it, since imports are lexical by default
std: { my class Foo {} }; Foo
p6eval std 30480: OUTPUT«===SORRY!===␤Undeclared name:␤ 'Foo' used at line 1␤Check failed␤FAILED 00:01 107m␤»
sorear std: { our class Foo:ver<1> {}; our class Foo:ver<2> {} }; Foo 07:02
p6eval std 30480: OUTPUT«===SORRY!===␤Illegal redeclaration of symbol 'GLOBAL::<Foo>' (from line 1) at /tmp/0l0Mcc9XsA line 1:␤------> lass Foo:ver<1> {}; our class Foo:ver<2>⏏ {} }; Foo␤Check failed␤FAILED 00:01 107m␤»
TimToady std currently punts on versions
sorear supposing that it didn't, what would that last Foo do?
TimToady std: { use Foo; }; Foo
sorear arbitrarily pick a Foo from the universe?
p6eval std 30480: OUTPUT«===SORRY!===␤Undeclared name:␤ 'Foo' used at line 1␤Potential difficulties:␤ Can't locate module Foo at /tmp/QuxdJBRP0Q line 1:␤------> { use Foo⏏; }; Foo␤Check failed␤FAILED 00:01 107m␤»
TimToady std: use Foo;; Foo
p6eval std 30480: OUTPUT«Potential difficulties:␤ Can't locate module Foo at /tmp/YOyPawiAw3 line 1:␤------> use Foo⏏;; Foo␤ok 00:01 107m␤»
TimToady you see the Foo alias is 'my', not 'our' 07:03
yes, an unqualified name will wildcard
presumably much like p5 does today
default latest installed version
this is all spelled out in S11, except when it isn't 07:04
sorear the action-at-a-distanciness of this disturbs me. slightly.
what would a good syntax be, then, for generating an alias to a foreign namespace without importing or 'require'ing? 07:05
TimToady all is fair if you predeclare, and this includes declaring generic code that is in a slightly indeterminate language
on the p6 end, that's just a binding, but what returns something bindable may vary from language to language 07:06
sorear perhaps a bit more concreteness is in order
I'm trying to get Tk working from Perl 6 07:07
TimToady but presumably Foo:from<language module version auth> can be a specific foreign name that you can :=
sorear when Tk.pm is loaded, it installs a MainWindow package
use Tk:from<perl5>;
07:07 orafu left
TimToady it's not necessary that only use/need know about :from 07:07
sorear # What do I do here to make MainWindow accessible?
...
my $mw = MainWindow.new;
07:08 orafu joined
TimToady if Tk exports MainWindow by default, seems like it should happen automatically somehow 07:08
sorear there's no concept of exporting packages in Perl5, though
they just land in the global namespace
TimToady if it uses the standard Exporter, we could jimmy that, maybe 07:09
sorear Exporter doesn't export packages, only stuff in packages
the perl 5 namespace is flat
one global namespace contains packages, which contain everything else
TimToady maybe we need a hook in at the typeglob assignment level 07:10
07:10 REPLeffect left
sorear *except that the global namespace is identified with main:: for some reason 07:10
TimToady yes, well, main:: is just a link back to the top, so main::main::main::main:: also works
sorear heh, never knew that 07:11
TimToady package walkers have to be careful of that :)
sorear if Tk is loaded, MainWindow exists and is visible in every scope
'use Tk' doesn't export MainWindow because it's already visible everywhere 07:12
07:12 bbkr_ joined
TimToady yes, p6 is much more circumspect about creating globals 07:12
core Perl will have virtually nothing in GLOBAL:: 07:13
sorear and it all comes back to this. a philosophy mismatch.
if perl5 treats something as global, I initially thought I should expose the p5 global namespace somehow
TimToady well, I suppose a slow approach would be to do a diff of the p5 packages before and after the use...
07:14 iblechbot joined
TimToady or somehow we need to link any new packages made in p5's main:: into GLOBAL:: 07:14
07:14 quester_ left
TimToady or make lexical links like a p6 package would expect 07:15
07:15 quester_ joined
sorear or expose p5's main:: somehow. a GLOBAL:from<perl5>. which is where I first came to FOREIGN 07:15
TimToady those couldn't go any higher than UNIT::
sorear lexical links? so 'need' automatically aliases *every* p5 package? 07:16
TimToady yeah, but I'd make something shorter like p5::
I don't think need would alias everything
but at some point we need to let the p5 exporter run and think it's exporting to p5, then steal some of the links 07:17
if we alias anything extra, that is
sorear that's what I'm doing right now
but it only works for things p5 exports
TimToady we don't use main:: in p6, so we could even alias that
sorear (there is a small technical problem here in that rakudo doesn't handle lexical namespaces particularly well) 07:18
TimToady or we could add to the search algorithm, if it doesn't find a name in lexical scopes, or GLOBAL, or PROCESS, then look in @*FOREIGN packages somehow
as long as the list is declared at BEGIN time, we can add more searching to package lookups 07:19
as far as I know, rakudo doesn't handle lexical namespaces at all yet... 07:20
but I'm talking about how it should end up
sorear ah
TimToady it's almost a CANDO from another language
sorear I like it 07:21
that reminds me
TimToady perhaps GLOBAL::CANDO is an oracle that tracks what other language's globals are available
sorear S11 specs that namespaces are cloned 07:22
doesn't that break CANDO?
if an imported module defines a CANDO, which installs symbols for caching
07:22 REPLeffect joined
sorear but they aren't visible in the namespace clones? 07:22
TimToady well, CANDO was actually written before we moved everything to lexical scopes, so it nees some rethinking
*needs
which I can't do right now because my branes are leaking out my ears 07:24
at least I got my backlog caught up to Sat morning; more catching up tomorrow 07:26
zzz &
sorear sleep well
07:27 bbkr_ left 07:36 snarkyboojum left 07:38 bradb left 07:43 hejki left, hejki joined 07:44 diakopter joined 07:57 scottamatot left
Guest16851 Can someone tell me (or give a pointer) what's the state of DB integration in rakudo / parrot? 08:05
sorear you can use the Perl 5 DBI
Guest16851 OK? I see references to DBDI and some to DBI2. But no definitve guide. 08:06
sorear 1. There are a few "DBI but better" projects floating around (DBDI, DBI2, etc). None is mature.
2. You can use the Perl 5 DBI, which is mature, but the binding layer is definitely NOT (it only reached sufficient functionality yesterday) 08:07
3. You can use $YOUR_RDBMS's API directly through the Parrot NCI
4. Parrot has a MySQL binding; alpha had support for using Parrot bindings (this is essentially an older, worse version of #2) 08:08
references: various, me, jnthn, Tene respectively 08:09
nqp: sub k($x) { sub() { $x } } my $a := k(1); my $b := k(2); say($a()) 08:10
p6eval nqp: OUTPUT«Confused at line 1, near "sub k($x) "␤current instr.: 'parrot;HLL;Grammar;panic' pc 500 (src/cheats/hll-grammar.pir:197)␤»
sorear nqp: sub k($x) { sub() { $x } }; my $a := k(1); my $b := k(2); say($a())
p6eval nqp: OUTPUT«2␤»
sorear Does this qualify as a bug?
Juerd nqp: sub k($x) { sub() { $x } }; my $a := k(21); my $b := k(42); say($a()) 08:11
p6eval nqp: OUTPUT«42␤»
Juerd Wanted to know if that 2 had anything to do with $b. Apparently it does.
I've never read any nqp docs but it does look wrong :) 08:12
08:13 patspam left
sorear NQP is leaving out a step, accidentally or deliberately I know not 08:14
nqp: sub k($x) { pir::newclosure__PP(sub() { $x }) }; my $a := k(1); my $b := k(2); say($a())
p6eval nqp: OUTPUT«1␤»
dalek meta: r202 | anteus4++ | trunk/Sprixel/t/operators.t:
this test fails too
08:15
08:28 dakkar joined
Guest16851 sorear: OK, thanks for the update 08:35
dalek meta: r203 | anteus4++ | trunk/Sprixel/t/ (2 files):
controlflow test, fails currently
Guest16851 Not sure I trust anything with MySQL in the guts though ;-)
08:36 snarkyboojum joined 08:39 fridim joined 08:52 pmurias joined
pmurias diakopter: the mono abort error disappeared 08:54
09:02 Juerd left 09:06 yakeworld left
sorear welp. It looks like, and #parrot agrees, that the only way to implement a synthetic namespace is in C 09:16
sorear goes off into Rakudo's src/pmc/
moritz_ one might think it could be as easy as inheriting from NameSpace and overriding the *keyed* vtables... 09:22
09:24 masak joined
masak oh hai, #perl6! 09:24
moritz_ \o/ it's masak in his community bonding period!
jnthn yayitsmasakwhoisbonding!
masak starts bonding immediately 09:25
hey, buddies.
JimmyZ hello
colomon o/
masak 你好
frettled Hiho!
JimmyZ 您好 09:26
masak 不是"您" :) 09:27
sorear moritz_: That's what I tried first.
I have a newfound hatred of PMCProxy. 09:28
JimmyZ 为什么呢?
moritz_ sorear: I think "all core PMCs should be inheritable" is a milestone for... uhm... parrot 3.0 or 3.5 or so
sorear Also, whatever build system bug is causing src/pmc/* to be built WITH NO SYMBOLS.
Which makes debugging these problems /slightly/ harder.
jnthn A platform specific one I'd guess.
(Given, certainly until recently, I could debug them just fine.) 09:29
moritz_ chromatic complained about that too
masak JimmyZ: 我不知道... :)
sorear Parrot 3.5. Heh.
JimmyZ :0
sorear That's like what, Perl 9?
masak "There's not going to be a Perl 9" -- Gloria Wall 09:30
moritz_ it's like, expected in one year
sorear gives up on implementing pseudo namespaces
JimmyZ PMCProxy will be killed, IIRC
moritz_ overridable in PIR, that is
09:32 lestrrat is now known as lest_away
jnthn sorear: fwiw, I hadn't expected to do pseudo namespaces by writing a custom NameSpace PMC, but rather by spotting the interesting prefixes and doing some different code generation. 09:32
sorear jnthn: I talked to TimToady on this, he says that psuedo namespaces are late bound 09:33
if you generate a fully qualified name and it starts with CALLER::, you get caller stuff
etc
09:33 clintongormley joined
jnthn "late bound"? 09:34
dalek meta: r204 | anteus4++ | trunk/Sprixel/t/literalstring.t:
more tests
sorear also, I have no clue how to do interesting hackery with code generation
jnthn I mean, I know we have to do the lookup at runtime
That doesn't mean we can't generate something different at compile time.
(that does a lookup using the call stack, for example)
moritz_ $::($foo) # or however namespace interpolation is specced today 09:35
sorear We don't know at compile time if ::($x) is going to be contextual, global, lexical, or what
moritz_ but we can make the interpolation do the same magic as the compiler does
sorear I suppose
isn't the compiler magic pretty diffuse though?
jnthn sorear: That's a different issue to pseudopackages though.
Plus we don't support that syntax just yet. :-) 09:36
sorear quite a few productions in the grammar refer to <name>, <longname>, <deflongname>, etc 09:38
I would hate to add psuedopackage handling in so many places
jnthn I'm not sure if we'd need it in all of them.
And if so, we can factor it out somewhat. 09:39
09:41 Juerd joined
jnthn longname parses a name anyway 09:42
and deflongname parses a longname
So in that case you may only need it in name
sorear yes
it's well factored in the grammar
but the actions code mostly just passes off names to PAST
moritz_ hey, maybe we can add name manging support to to PAST 09:43
jnthn Yes, that's certainly the case at the moment.
jnthn needs to worry about some late-bound talk writing for a bit.
sorear can someone with more advertising skill than me find some shiny, small examples of code using Perl5 libraries with pure OO or functional interfaces (I'm currently focusing on POSIX, CGI, DBI, and Tk) for translation and testing in Perl6? 09:45
moritz_ will try to think of something 09:47
JimmyZ hopes can use blizkost on p6eval 09:48
sorear rakudo: use CGI:from<perl5>; say ::CGI.new.header; 09:50
p6eval rakudo a27dfe: OUTPUT«"load_language" couldn't find a compiler module for the language 'perl5'␤current instr.: 'perl6;Perl6;Module;Loader;need_foreign' pc 36574 (src/gen/locator_pm.pir:213)␤»
sorear someone with feather access will need to install it
moritz_ well, it comes with some security implications 09:51
y'know, most perl 6 implementations eithere were not user friendly enough to pose a real risk, or came with a safe mode
I don't know how to sandbox perl 5 sufficiently
sorear so p6eval *is* sandboxed? 09:52
moritz_ pugs: open('README')
p6eval pugs: OUTPUT«*** Unsafe function 'Pugs::Internals::openFile' called under safe mode␤ at Prelude.pm line 308, column 13-61␤» 09:53
JimmyZ by using chroot, I think.
moritz_ sorear: not properly... it tries to run safe mode when possible, and it's in a chroot under a low-priv user
sorear: but it's by no means really secure
sorear for a bot in a channel that's probably good enough 09:54
moritz_ maybe I should disable /msg'ing to it
sorear anyone who feels like writing a spam daemon in perl 6... well there are lots of people here with 'kill' access
moritz_ current p6eval is also in channels where I'm not in 09:55
sorear I presume it's running heavily niced and with a disk quota / ram ulimit
moritz_ it has all the limits that BSD::Resource can muster
moritz_ can't git pull - github.com doesn't respond :( 09:56
Juerd "not user friendly enough to pose a real risk" - hee hee :)
moritz_ I think mildew also offers some perl 5 interaction - but nobody reallys knows, except pmurias++ and ruoso++ :-) 09:57
09:57 dakkar left
Juerd feather3 is available too of course 09:58
It is a big sandbox for all kinds of potentially evil/eval code
We have 6 backups per day in case things go bad. 09:59
Er, 4
colomon rakudo: say (1..8)[*-1]
p6eval rakudo a27dfe: OUTPUT«Method 'postcircumfix:<[ ]>' not found for invocant of class 'Range'␤current instr.: '!postcircumfix:<[ ]>' pc 10885 (src/builtins/Role.pir:73)␤»
10:01 dakkar joined
pugssvn r30481 | colomon++ | [t/spec] Eliminate Range.reverse tests. Rename Range.minmax to Range.bounds. Tests for Any.minmax now expect to get a Range returned rather than a list. 10:01
dalek kudo: 0a04ef3 | (Solomon Foster)++ | src/ (4 files):
Rename Range.minmax to Range.bounds. Change Any.minmax to return a Range, and take Ranges as arguments, too. (Though note that in many conditions the Range is expanded to a list going in, which muddles things.) Add minmax operator which uses Any.minmax internally.
10:03
ruoso moritz_, you are right... mildew does support "use CGI:from<perl5>" and interacts with the perl5 runloop in a cooperative way (it handles p5 continuations via Coro::State) 10:04
so both perl5 can call mildew code and vice-versa 10:05
hopefully, pmurias' gsoc project this year will make that feature more visible... 10:07
dalek meta: r205 | anteus4++ | trunk/Sprixel/t/types.t:
added test of types
10:13
10:13 lest_away is now known as lestrrat
pmurias ruoso: hi 10:14
ruoso hi pmurias 10:15
pmurias STD nowdays doesn't accept EXTERNAL::eval_perl5 10:17
colomon std: 1 min 2 max 3 10:20
p6eval std 30480: OUTPUT«===SORRY!===␤"min" and "max" are non-associative and require parens at /tmp/fgb27ISF9G line 1:␤------> 1 min 2 max ⏏3␤Check failed␤FAILED 00:01 109m␤»
pmurias std: EXTERNAL::eval_perl5("print 'hi'"); 10:21
p6eval std 30480: OUTPUT«===SORRY!===␤Undeclared name:␤ 'EXTERNAL::eval_perl5' used at line 1␤Check failed␤FAILED 00:01 107m␤»
ruoso pmurias, I think we need a way to inject symbols in STD
10:23 yinyin left
ruoso pmurias, maybe simply having a setting that wraps the code... 10:27
std: { module EXTERNAL; sub eval_perl5 {}}; EXTERNAL::eval_perl5("print 'hi'") 10:28
p6eval std 30480: OUTPUT«===SORRY!===␤Undeclared name:␤ 'EXTERNAL::eval_perl5' used at line 1␤Check failed␤FAILED 00:01 107m␤»
ruoso std: { module EXTERNAL { sub eval_perl5 {}} }; EXTERNAL::eval_perl5("print 'hi'")
p6eval std 30480: OUTPUT«ok 00:01 107m␤»
ruoso maybe STD even provide a hook to load the setting... (does it?) 10:31
pmurias checking...
10:33 JimmyZ left
pmurias ruoso: we could make STD use our CORE instead of the dummy setting 10:35
10:35 orafu left
pmurias walk& 10:35
ruoso pmurias, that'd be awesome
10:36 orafu joined 10:49 quester_ left 10:52 iblechbot left 10:58 M_o_C joined, Trizen joined 11:00 ruoso left 11:03 M_o_C left 11:07 am0c left 11:23 agentzh left
colomon apparently just seriously broke his local Rakudo build. 11:25
oh, I think I somehow made cmp stop working for numbers. how awkward. 11:28
rakudo: say 4 after 36 11:29
p6eval rakudo 0a04ef: OUTPUT«0␤»
11:30 XaeroOne left, XaeroOne joined
colomon Huh. Now I don't understand how that ever worked. 11:32
11:34 Xaero joined, XaeroOne left
colomon jnthn: ping? 11:34
jnthn colomon: omnonm...pong 11:36
jnthn can IRC and lunch at the same time.
colomon I added cmp overloads that take Inf as an argument, to give Inf its proper magical properties. 11:37
somehow that seems to have broken Int cmp Int
mathw o/ 11:38
colomon I'm thinking either dispatch issue I don't understand, or I need a wiser head to think about the problem.
also, I don't understand how Int cmp Int works in the current build (as opposed to my personal one) 11:39
we've overloaded comparisons for Num and Rat, but not Int.
that should have stopped working recently... 11:40
rakudo: say 1 ~~ Num
p6eval rakudo 0a04ef: OUTPUT«1␤»
moritz_ that's how it works
colomon oh, that nonsense is still in there.
moritz_ and it's wrong, by current spec
11:41 orafu left
jnthn Well 11:41
mathw doesn't Int cmp Int do ~$a cmp ~$b?
colomon okay, that's how it works "normally"
jnthn Int current ~~ Num
11:41 orafu joined
jnthn *currently 11:41
We need to break (fix ;-)) that at some point.
11:41 |Jedai| joined
jnthn colomon: In what way has it broken in? 11:41
That is, do you get some error? 11:42
lisppaste3 colomon pasted "The infix:<cmp> multis which break Int cmp Int when uncommented." at paste.lisp.org/display/98429
colomon jnthn: as in
> say 4 cmp 36
1
ie it appears to be doing string comparison rather than Numeric comparison
moritz_ which is the fallback for cmp if at least one is non-numeric 11:43
colomon moritz_: which one of 4 and 36 are you suggesting is non-numeric? ;)
moritz_ both, more or less :-)
in a broken type system, that is 11:44
11:44 Jedai left
frettled heh 11:44
jnthn rakudo: multi foo(+Inf, +Inf) { say 1 }; multi foo($a, $b) { say 0 }; foo(+Inf, +Inf); foo(42, 1);
p6eval rakudo 0a04ef: OUTPUT«1␤0␤»
jnthn colomon: Do a: 11:45
&infix:<cmp>('oh', 'no', '3 args')
colomon: To dump a list of all the candidates.
colomon jnthn: will do after rebuild with the multis back in.
jnthn (it's actually the error message that includes them, but...)
One thing people may not know about that error message is that it doesn't just dump the candidates in any order, but in the order that they will get considered in. 11:47
colomon jnthn++
jnthn So it can be quite a useful debugging aid. :)
moritz_ jnthn++ # really awesome error message 11:48
takadonet morning all
colomon rakudo: &infix:<cmp>('oh', 'no', '3 args');
p6eval rakudo 0a04ef: OUTPUT«No applicable candidates found to dispatch to for 'infix:<cmp>'. Available candidates are:␤:(Num $a, Num $b)␤:(Rat $a, Rat $b)␤:(Date $a, Date $b)␤:(Rat $a, Any $b)␤:(Any $a, Rat $b)␤:(Any $a, Any $b)␤␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
colomon will probably get rid of the Rat ones soon in a Real patch. 11:49
moritz_ there should really be a (Numeric, Numeric)
or Real, Real, right
colomon moritz_: TimToady and I have a scheme for Numeric, Numeric, too. :)
moritz_ tries to stop himself from commenting 11:50
frettled Om Num Num?
lisppaste3 colomon pasted "&infix:<cmp>('oh', 'no', '3 args'" at paste.lisp.org/display/98430
11:51 gruotr left 11:52 gruotr joined
moritz_ reminds people that there's a #rs meeting tonight 11:54
11:54 c9s joined
colomon moritz_++ # had forgotten, as usual 11:54
jnthn That's...a really good point.
moritz_: In our timezone it's...9:00?
as in 2100?
moritz_ jnthn: I think so... unless its 20:30 11:55
jnthn I think it's ended up being 21:00
OK, I *should* be home by then.
11:55 c9s left
colomon and I won't be gone to the pub yet. 11:55
jnthn (Going to Malmo to give a Perl talk, but it's at 5pm, so even with dinner afterwards, that's still lots of time to be back.)
colomon: That ordering looks correct to me. 11:56
snarkyboojum masak: a SIC target for yapsi would be cool :)
jnthn rakudo: 3 ~~ +Inf
p6eval rakudo 0a04ef: ( no output )
jnthn rakudo: say 3 ~~ +Inf
p6eval rakudo 0a04ef: OUTPUT«0␤» 11:57
jnthn rakudo: say 3 ~~ -Inf
p6eval rakudo 0a04ef: OUTPUT«0␤»
jnthn Hmm.
What fails again?
ah, 4 cmp 36
11:57 fridim left
moritz_ rakudo: Int ~~ Real 11:58
p6eval rakudo 0a04ef: ( no output )
moritz_ rakudo: say Int ~~ Real
p6eval rakudo 0a04ef: OUTPUT«1␤»
masak snarkyboojum: o/
snarkyboojum: how do you mean, 'a SIC target'? 11:59
snarkyboojum yapsi --target=SIC and it dumps the SIC to stdout :)
masak ooh!
colomon jnthn: wondering if it's something nasty, like comparing 4 to Inf turns it into an Integer rather than an Int...
snarkyboojum or --target=sic perhaps :)
masak snarkyboojum: both :)
snarkyboojum: great idea.
snarkyboojum: by the way, I've merged now.
11:59 bluescreen joined
snarkyboojum masak: yeah - would save me hacking yapsi to do @sic.join("\n").say :) 12:00
masak: noticed - looks cool
jnthn paste.lisp.org/display/98431
12:00 bluescreen is now known as Guest69093
jnthn colomon: That (above) works as expected 12:00
colomon: No, that shouldn't happen.
masak snarkyboojum: if you don't beat me to it, I'll add a SIC target later today.
jnthn colomon: I suspect something weird is going on. :-/
snarkyboojum masak: sweet! 12:01
masak snarkyboojum: we'll need a ChangeLog for this release :P
colomon jnthn: agree 100% on the weird
masak still hopes to be able to add if statements before Saturday
snarkyboojum you-can-do-it :)
moritz_ colomon: does the dispatch work if you use the Int type object? 12:02
Int cmp Int
colomon just like that?
jnthn colomon: I'm afraid I need to work on the presentation I need to leave here to go and give in ~2 hours at the moment.
moritz_ just like that
colomon jnthn: understood
jnthn colomon: So I can't dig more right now, sorry.
colomon > say Int cmp Int
0
jnthn Try adding some print statements to the candidates perhaps, to see which one you actually end up in. 12:03
colomon jnthn: good idea.
masak snarkyboojum: the tricky work for this release is basically done already; mostly downhill from here.
colomon moritz_: Int cmp Int should equal 0, and does.
masak snarkyboojum: I'm sure a few bugs must have crept in here and there, though. 12:04
moritz_ colomon: that doesn't tell us if it uses a numeric or a string multi :(
snarkyboojum I have a question about the stack
colomon > say Int cmp 0
1
rakudo: say Int cmp 0
p6eval rakudo 0a04ef: OUTPUT«0␤»
colomon looks like string probably 12:05
snarkyboojum if only pops the stack when the program completes by the looks of it :)
or am I reading that incorrectly
rather than popping at the end of each block 12:06
masak snarkyboojum: if you believe it's wrong, please provide a case where it fails :) 12:07
snarkyboojum masak: yapsi -e 'my $a = 5; { say $a }; say $a;' # never gets back to the final say $a
masak tries
snarkyboojum i.e. only one 5 is printed
moritz_ snarkyboojum++ # submitting yapsibugs 12:08
snarkyboojum hehe
masak snarkyboojum: works here.
snarkyboojum: sure you have the latest PIR?
snarkyboojum maybe not :|
false alarm perhaps
masak snarkyboojum: it should now have a Makefile, so be sure to do 'make' regularly. 12:09
snarkyboojum masak: cool - I haven't setup my env for the Makefile to work properly
will do
masak snarkyboojum: there's already a test for exactly that, by the way :)
snarkyboojum oh :|
moritz_ masak++ # testing
masak and it's true that yesterday it didn't return properly from blocks.
but I fixed that. 12:10
snarkyboojum yeah - I looked into it last night and thought "we just need a stack" :)
moritz_ what does YAPSI emit? some kind of intermediate format?
snarkyboojum v. cool to see it magically appear overnight
masak moritz_: that's SIC.
moritz_ masak: and then you have SIC interpreter written in Perl 6?
masak aye. 12:11
snarkyboojum tries to resist the temptation to call it fully SIC
masak compiler + runtime weigh in at 417 lines, right now.
snarkyboojum: did you see that a SIC output now self-identifies with 'This is SIC v2010.05'? :) 12:12
snarkyboojum masak: yeah - and does some sort of validation too?
masak the runtime dies if it doesn't get the right version. 12:13
snarkyboojum masak: yeah - pretty cool :)
masak that's for when we implement saving and loading of SIC files.
colomon adding say "Any, Any" to infix:<cmp>(Any, Any) seems to completely break Rakudo
moritz_ colomon: try DEBUG instead of say()
colomon rakudo: DEBUG("Any, Any") 12:14
p6eval rakudo 0a04ef: OUTPUT«Could not find sub &DEBUG␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
colomon like that, or?
moritz_ uhm
I thought we had something like that for debugging the setting
jnthn pir::say works easiest.
12:15 cosimo left
snarkyboojum masak: try running this:- yapsi -e '{}; my $a = 5; { say $a };' 12:16
masak snarkyboojum: ah, yes. that won't work :/
snarkyboojum oh
masak snarkyboojum: still need to uncheat at that particular spot :)
colomon is ecstatic because he just discovered the old Emile Benoit music video is on Youtube in a much higher quality than he has ever seen before. 12:17
masak snarkyboojum: it appends _1 to nested blocks. it should do _2 etc until the next unoccupied name.
colomon moritz_: I think that might be for nqp?
masak snarkyboojum++ # bugfinder
moritz_ masak: do you think Perl 6 is a good language to write a compiler in?
masak snarkyboojum: please add that as a test.
moritz_ colomon: maybe
masak moritz_: so far, it's pretty nice.
snarkyboojum masak: yep - noticed that re block names. Re test will do 12:18
colomon afk # getting ready for storytime this morning.
12:26 SmokeMachine joined 12:27 Trizen left 12:32 ash__ joined, ash__ left
takadonet is ':g' implemented for smartmatching? 12:33
moritz_ no
masak it's implemented for .subst 12:34
takadonet nuts 12:35
moritz_ has pondered adding support for s:g/foo/bar/
masak ++moritz_ 12:36
moritz_: what would it take?
it'd be a schweet addition to Rakudo Star.
takadonet here is my problem: I need to break up a long string of character into blocks of 80 characters with new line between them
masak takadonet: .comb 12:37
takadonet masak: could work :)
takadonet ponders....
moritz_ masak: 1) parsing 2) adding it to the constructor Substitution.new() in the action methods 3) an attribute in Substitution 4) add the attributes to the subst() call
masak didn't know about Substitution :)
moritz_ rakudo: say 'abcdefghijklm'.comb( /. ** 1..4/).join("\n") 12:38
p6eval rakudo 0a04ef: OUTPUT«abcd␤efgh␤ijkl␤m␤»
moritz_ (example for 4 instead of 80)
takadonet !!!
moritz_: Sometime I feel that I'm not really programming at all but just redirecting all my questions towards you 12:39
moritz_ it's a classic use case for unpack() actually
:-)
takadonet moritz_: In perl5 ya
mathw takadonet: you're actually programming moritz_ to solve all your problems for you 12:40
moritz_ unpack '(A80)*', $string
takadonet mathw: Seems to be working :)
12:40 ruoso joined
moritz_ that's called meta programming :-) 12:40
12:42 GinoMan joined 12:43 Trizen joined, Guest69093 left
masak rakudo: my $a = "a"; $a ~~ / $a /; say $/.chars 12:51
p6eval rakudo 0a04ef: OUTPUT«-4␤»
12:52 iblechbot joined, TPF|Coke is now known as CokeFloats
jnthn Erm. :-) 12:52
12:52 CokeFloats is now known as CokeBot9000
masak I'm slightly uncomfortable with .chars ever returning something negatice. 12:52
12:53 CokeBot9000 is now known as CokeInatorInator
masak tempted to submit that as a rakudobug. 12:53
12:53 CokeInatorInator is now known as Coke
jnthn It has unlength. 12:53
moritz_ yawns. Another manifestation of $/ not being a proper Match object
masak "that's the shortest string I've ever seen!"
moritz_ rakudo: my $a = "a"; $a ~~ / $a /; say ?$/
p6eval rakudo 0a04ef: OUTPUT«0␤»
snarkyboojum length with direction :)
moritz_ so, a failed match
masak I know.
moritz_ which has .from > .to 12:54
12:54 Coke is now known as |
masak I know. 12:54
PGE and GGE do the same.
moritz_ masak: just submit it; one more ticket I can close when I get proper Match objects running in Perl 6
12:54 | is now known as Guest79471
masak alpha: "foo" ~~ /bar/; say $/.chars 12:54
p6eval alpha 30e0ed: OUTPUT«0␤»
12:54 Guest79471 is now known as [Coke]
masak moritz_: still doesn't manifest that bug. 12:54
12:54 uniejo left
masak submits rakudobug 12:54
bbkr rakudo: my @t = (1, undef, 3); @t>>// "not defined"; # is this valid usage of // operator on every array element? 12:55
p6eval rakudo 0a04ef: OUTPUT«Unsupported use of undef as a value; in Perl 6 please use something more specific:␤ Mu (the "most undefined" type object),␤ an undefined type object such as Int,␤ Nil as an empty list,␤ *.notdef as a matcher or method,␤ Any:U as a type constraint␤ or
..fail() as a failure return␤ …
moritz_ bbkr: >> only works for methods 12:56
12:56 uniejo joined
moritz_ maybe you want a magic @t <<//>> "not defined' 12:56
rakudo: say ((1, 2, Any, 3) <<//>> "n.d.").perl 12:57
p6eval rakudo 0a04ef: OUTPUT«[1, 2, "n.d.", 3]␤»
bbkr yay! this is awesome :)
thanks 12:58
12:58 Guest69093 joined
[Coke] skims the last several hours. Chatty. 12:58
jaffa4 hi 12:59
what does this mean?
masak woo, [particle] and [Coke] -- two #perl6 people that chose to live in a box :)
jaffa4 <?before '['>
masak jaffa4: it's a lookahead.
jaffa4: they are explained in S05.
jaffa4 no ? 13:00
questionmark
masak yes.
jaffa4 what is the questionmark?
masak hm. it makes it zero-width.
moritz_ 14:59 < masak> jaffa4: it's a lookahead.
masak but a 'before' lookahead already is zero-width.
[Coke] masak: someone ``stole'' our nicks! 13:01
moritz_ and you didn't register with freenode before?
13:01 ReiniUrban joined
[Coke] thinks he might just pick some random CokeFu nick. 13:01
jaffa4 Coke: are the maker of Coke?
[Coke] moritz_: you mean, 15 years ago? no.
jaffa4: no, merely a one-time reseller. 13:02
masak is the maker of Coke
jaffa4 Coke language
not the drink
masak oh. I meant the drink.
never mind. :)
[Coke] never heard of a language called Coke.
13:03 rurban left
masak piumarta.com/pepsi/coke.html 13:03
13:03 ReiniUrban is now known as rurban
[Coke] oh, it's related to Cola. 13:05
not entirely unsurprising.
masak "Artificial Sweeteners" :)
frettled Good thing you didn't mean the drug. 13:06
masak production of the drug isn't restricted to one entity.
13:07 iblechbot left, cosimo joined
jaffa4 what is the difference between | and || in grammar? 13:07
masak jaffa4: that's also in S05.
jaffa4: but essentially, the first does 'parallel' matching with LTM.
jaffa4: and the second one does serial matching, like in p5. 13:08
13:08 cosimo left
masak jaffa4: at least with PGE, they both meant '||' in practice. 13:08
jaffa4 LTM?
masak don't know what the state is with nqp-rx.
[Coke] LTM is longest token matching
I don't think nqp does LTM yet either. 13:09
masak jaffa4: LTM is also explained in S05. you should read it someday :)
[Coke] (to compensate - order your elements longest first manually.)
moritz_ jaffa4: stop throwing words with question marks in the channel - start to actually read the synopsis
jaffa4 I read it
and I forgot it
masak read it again.
moritz_ then you must read it again.
13:10 cosimo joined
jaffa4 Must I? 13:10
masak jaffa4: you'll find that people are very tolerant on this channel, except perhaps on the point of trying to get others to do your learning for you.
jaffa4: no, of course you mustn't. but it seems that it'd benefit you. 13:11
jaffa4 There are many ways of learning. 13:12
One of them is to ask somebody.
13:12 lrnperl6 joined
moritz_ jaffa4: sure. But please don't continue to ask stuff here that's explained in the docs 13:13
masak jaffa4: honestly, you do have the potential to become a productive member of the #perl6 community. but you need to gain some independence to get there.
moritz_ jaffa4: I find it annoying, and I'm sure others feel the same
snarkyboojum masak: ok 13 - same-level blocks :)
masak jaffa4: catb.org/~esr/faqs/smart-questions.html
moritz_ jaffa4: and asking people to write things that are written elsewhere isn't productive for anybody
masak snarkyboojum: you did it? cool! snarkyboojum++
pmurias moritz_: to be fare ack LTM doesn't find anything in the spec
jaffa4 almost all questions are written down somewhere. 13:14
pmurias * fair
masak pmurias: that's not very fair. we spelled it out too in our explanations.
13:14 viklund left
moritz_ pmurias: the IRC logs explain it if you mouse-over 13:14
snarkyboojum masak: yapsi -e '{}; my $a = 42; { say $a }' # returns 42 now instead of Any()\n42 ;)
moritz_ at least mention the full name, which can then be found in the specs
snarkyboojum masak: but I fear you'll want your lovely numbering to be better than what I've done :P
moritz_ pmurias: and google for Perl 6 LTM give also good results 13:15
masak jaffa4: now you're not only lazy, but obstinate, too. please try harder to empathise.
snarkyboojum: I'll look at the commit tonight.
[Coke] I find this search helpful: perlcabal.org/ - search box at the top with a custom, narrowed, google search. 13:18
snarkyboojum masak: haven't committed, this is what it does gist.github.com/380720 - so can hold off if you want to do it differently
[Coke] (except when trying to find things like "WHAT" =-)
snarkyboojum masak: fun to hack around regardless 13:19
masak looks
13:19 Trizen left
masak snarkyboojum: wow! just seeing that makes me happy :) 13:19
snarkyboojum masak: heh - I didn't even write it and I'm finding it fun :) 13:20
masak snarkyboojum: please commit that. it's not the desired numbering, but it's an improvement on what we have. can be further improved later.
snarkyboojum masak: cool - will do
masak snarkyboojum++ 13:21
snarkyboojum masak o/ :)
masak \o 13:22
we really could use a p6eval yapsi target :) will try to arrange that for the May release. 13:25
it's getting slower, but it's still not horribly slow. 13:26
takadonet rakudo: my $w=5;say 'abcdefghijklm'.comb( /. ** 1..$w/.join("\n");
p6eval rakudo 0a04ef: OUTPUT«Only integers or '*' allowed as range quantifier endpoint at line 11, near "$w/.join(\""␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
takadonet my Int $w=5;say 'abcdefghijklm'.comb( /. ** 1..$w/.join("\n"); 13:27
masak takadonet: no variable interpolation yet, methinks.
takadonet nuts...
masak takadonet: the workaround is &eval
moritz_ or to use substr()
and a loop
boring, I know
takadonet well when it's implemented, the code above should work correct?
masak std: my $w=5;say 'abcdefghijklm'.comb( /. ** 1..$w/.join("\n"); 13:30
p6eval std 30481: OUTPUT«===SORRY!===␤Malformed range at /tmp/hPg8wP2qFq line 1:␤------> $w=5;say 'abcdefghijklm'.comb( /. ** 1..⏏$w/.join("\n");␤ expecting quantifier__S_577StarStar␤Parse failed␤FAILED 00:01 112m␤»
masak takadonet: I think you need {} around the range.
only ranges with literals as endpoints can do without {}
takadonet masak: k 13:34
jnthn rakudo: role Drinking { method go-to-bar() { } }; role Gymnastics { method go-to-bar() { } }; class DrunkGymnast does Gymnastics does Drinking { }
p6eval rakudo 0a04ef: OUTPUT«Method 'go-to-bar' collides and a resolution must be provided by the class␤current instr.: 'perl6;Perl6;Metamodel;RoleToClassApplier;_block132' pc 9253 (src/gen/RoleToClassApplier.pir:306)␤»
jnthn \o/
rakudo: role Drinking { method go-to-bar() { } }; role Gymnastics { method go-to-bar() { } }; class DrunkGymnast does Gymnastics does Drinking { method go-to-bar() { } }; say "alive" 13:35
p6eval rakudo 0a04ef: OUTPUT«alive␤»
takadonet !!
masak: thanks
masak (drunk gymnast examples)++ 13:37
13:39 pmurias left
moritz_ fun fact while browsing through my apache log file summaries: 36 people found my website via google searching for skip perl 5 learn perl 6 13:39
and just about as many searching for 'rakudo performance' 13:40
jnthn rakudo: role Drinking { method go-to-bar() { say "glug" } }; role Gymnastics { method go-to-bar() { say "ouch" } }; class DrunkGymnast does Gymnastics does Drinking { method go-to-bar() { self.Gymnastics::go-to-bar() } }; DrunkGymnast.new.go-to-bar 13:41
p6eval rakudo 0a04ef: OUTPUT«Method '!select' not found for invocant of class 'DrunkGymnast'␤current instr.: 'perl6;Perl6Role;!pun_helper' pc 10469 (src/gen/RoleToInstanceApplier.pir:112)␤»
jnthn oh, damm
That's the bit that doesn't work.
:-/
masak odd error. 13:45
IllvilJa rakudo: role DrunkRakudoDeveloper; 13:50
p6eval rakudo 0a04ef: ( no output )
IllvilJa (could not resist...) 13:51
masak foo-to-bar()
jnthn masak: file rakudobug 13:52
It should work.
masak submits rakudobug
jnthn We don'tahve a ticket for it, and I'm not sure if it ever worked on alpha either.
13:53 Lorn joined, plobsing joined 13:54 Guest16851 left
jnthn oooh, oops, my train 13:54
o/
masak \o 13:55
[Coke] jnthn: RUN
13:56 JimmyZ joined 13:58 gruotr left
masak alpha: role Drinking { method go-to-bar() { say "glug" } }; role Gymnastics { method go-to-bar() { say "ouch" } }; class DrunkGymnast does Gymnastics does Drinking { method go-to-bar() { self.Gymnastics::go-to-bar() } }; DrunkGymnast.new.go-to-bar 14:02
p6eval alpha 30e0ed: OUTPUT«Method '!select' not found for invocant of class 'DrunkGymnast'␤in Main (file src/gen_setting.pm, line 324)␤»
masak it didn't.
14:07 _jaldhar left 14:17 rv2733 joined 14:21 lrnperl6 left 14:24 alester joined
jaffa4 where can I find the definition of Regex::P6Regex::Grammar? 14:29
moritz_ github.com/perl6/nqp-rx/blob/master...Grammar.pm 14:30
jaffa4 I cannot see it in my local copy 14:32
14:32 molaf joined
masak of nqp-rx? 14:33
jaffa4 yes
there is no such directory
moritz_ then your local copy is either very old or incomplete
or you're looking for a wrong directory
masak can see it in his local copy just fine 14:34
jaffa4 I used git clone github.com/rakudo/rakudo.git rakudo
masak that's not nqp-rx.
that's rakudo.
those are in two different repositories.
jaffa4 Rakudo parses regular expressions 14:35
and uses nqp-rx?
does it use the grammar of nqp-rx?
masak thinks so 14:37
[Coke] but rakudo's copy of nqp-rx comes from parrot.
masak right.
[Coke] which in turn is a snapshot of the nqp-rx repo. 14:38
masak often a quite recent one, since rakudo is its main consumer.
14:40 ruoso left, gruotr joined 14:41 ruoso joined 14:43 ruoso left 14:45 jonasbn left
pugssvn r30482 | colomon++ | [t/spec] Change minmax tests to match new behavior, refudge minmax.t a bit. 14:46
dalek kudo: f8987e4 | (Solomon Foster)++ | src/Perl6/Grammar.pm:
Make minmax have list_infix precedence.
14:51
kudo: cb8446c | (Solomon Foster)++ | src/core/Cool-str.pm:
Add special cases to infix:<cmp> involving +Inf and -Inf (so they can be compared against any type).
kudo: 083e3ea | (Solomon Foster)++ | t/spectest.data:
Turn on S03-operators/minmax.t.
kudo: 1cdbc19 | (Solomon Foster)++ | src/core/Cool-str.pm:
Revert "Add special cases to infix:<cmp> involving +Inf and -Inf (so they can be compared against any type)."

Revert patch because it broke infix:<cmp> pretty badly.
14:55 k23z__ joined
jaffa4 rakudo: /x/g; 14:58
p6eval rakudo 0a04ef: OUTPUT«Unsupported use of /g; in Perl 6 please use :g at line 11, near ";"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
jaffa4 rakudo: :g/x/;
p6eval rakudo 0a04ef: OUTPUT«Confused at line 11, near ":g/x/;"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
colomon jaffa4: I don't think :g is implemented in Rakudo yet. 15:00
moritz_ std: :g/x/
p6eval std 30482: OUTPUT«===SORRY!===␤Bogus term at /tmp/kgMsgngoUJ line 1 (EOF):␤------> :g/x/⏏<EOL>␤Undeclared routine:␤ 'x' used at line 1␤Parse failed␤FAILED 00:01 110m␤» 15:01
jaffa4 it is not even in the grammar definiton
I think
Is it possible that I am right?
moritz_ jaffa4: read S05 - it contains examples of how to use it correctly
jaffa4 rakudo: m:g// 15:02
p6eval rakudo 0a04ef: OUTPUT«Confused at line 11, near "m:g//"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
moritz_ std: m:g//
p6eval std 30482: OUTPUT«===SORRY!===␤Null pattern not allowed at /tmp/MbqBEFnAIy line 1:␤------> m:g/⏏/␤Null pattern not allowed at /tmp/MbqBEFnAIy line 1:␤------> m:g/⏏/␤Null pattern not allowed at /tmp/MbqBEFnAIy line 1:␤------> 15:03
..m:g/⏏[31…
jaffa4 It is not in defined
in the grammar
masak std: m:g/you must have something inside the regex for it to work/
p6eval std 30482: OUTPUT«ok 00:01 108m␤»
masak std: m:g/please look at the error messages before concluding that you are right/ 15:04
p6eval std 30482: OUTPUT«ok 00:01 108m␤»
jaffa4 it is not defined in the Rakudo grammar file rakudo\src\Perl6\Grammar.pm
masak jaffa4: that's because it's not implemented yet.
JimmyZ std: m:g//
p6eval std 30482: OUTPUT«===SORRY!===␤Null pattern not allowed at /tmp/7Si0GVm6H0 line 1:␤------> m:g/⏏/␤Null pattern not allowed at /tmp/7Si0GVm6H0 line 1:␤------> m:g/⏏/␤Null pattern not allowed at /tmp/7Si0GVm6H0 line 1:␤------>
..m:g/⏏[31…
masak jaffa4: and you know that, since people have said it to you 100 times by now. 15:05
JimmyZ rakudo: m:g//
p6eval rakudo 0a04ef: OUTPUT«Confused at line 11, near "m:g//"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
jaffa4 Yes
I know
masak and I wish 100 was an exaggeration.
jaffa4 5 times is closer to the truth
masak jaffa4: all the energy you've expended on asking this question. imagine if you'd actually contributed something instead... :)
moritz_ if you even remember the count, why bother asking?
jaffa4 Did I ask? 15:06
15:06 ruoso joined
moritz_ yes 15:06
jaffa4 Where?
moritz_ 17:01 < jaffa4> Is it possible that I am right?
15:06 jaffa4 was kicked by moritz_ (go play somewhere else))
[Coke] wonders why jaffa4 is getting under people's skin. 15:06
masak [Coke]: he doesn't the first four times. 15:07
[Coke] thought this was #perl5 for a second and had to double chek.
masak [Coke]: maybe you know something about how to treat a person asking the same question at regular intervals that moritz_ and I don't. if so, please share. 15:10
for some reason that I still fail to fully grok, jaffa4 really wants the :g modifier on regexes. 15:14
and he has a number of un-constructive ways of letting the channel know. 15:16
IllvilJa contemplates how 'DRY' would be appropriate here... 15:19
15:20 uniejo left
masak well, it's ok for a newcomer not to understand something the first time. 15:20
15:20 iblechbot joined
moritz_ IllvilJa: DRY would be to submit a ticket with a feature request 15:20
masak but this is not a newcomer, and it's not a question of forgetting once and needing to be reminded.
IllvilJa I understand. Hope it works out in the long run though. I really would like to see the general friendliness on this IRC channel prevail. 15:22
moritz_ IllvilJa: me too. 15:23
IllvilJa: it's just that in some rare cases, being friendly is detriminal to being good
and in these cases, we try to be good, not friendly
15:25 nihiliad joined
masak I have nothing against jaffa4, and would love to see him functioning constructively in #perl6. so far, he hasn't. 15:25
IllvilJa An exercise in balancing different needs, and an exercise in diplomacy. But I agree those exercises are distracting. They consume both time and effort.
Well, I'll keep my fingers crossed. Me, on my part, have not contributed much either (just one niche perl 6 module which I have not maintained since I created it). 15:27
(But I say 'howdy folks' from time to time)
masak IllvilJa: in a channel where development, newbie questions and frivolous OT conversation is signal, one person's persistent beating of one dead horse is noise.
moritz_ masak: don't forget botsnack :-) 15:28
masak :)
moritz_ phenny: tell pmichaud that I pushed 082caee15e26038b615204b27034563706a16253 without asking you first - hope you like it, if not feel free to revert 15:29
phenny moritz_: I'll pass that on when pmichaud is around.
dalek kudo: 8d99ca2 | moritz++ | CREDITS:
update my CREDITS entry
15:32
kudo: c868fc1 | moritz++ | tools/contributors.pl:
[tools] new script contributors.pl

announcements
kudo: 082caee | moritz++ | docs/release_guide.pod:
[docs] instruct release manager to include a list of contributors in the announcement
masak moritz_++ 15:33
15:36 TimToady sets mode: +vvvv buubot dalek hugme iblechbot, TimToady sets mode: +vv ilogger2 IRSeekBot, TimToady sets mode: +vvv lisppaste3 p6eval phenny
masak TimToady: oh hai. what should `for ^3 { my $a; BEGIN { say "!"; $a = 42 }; say $a }` output in Perl 6? in Perl 5, it gives "!\n42\n[warn]\n[warn]\n". 15:39
15:43 gurjeet joined 15:45 tewk left, gurjeet left 15:50 M_o_C joined 15:51 plobsing left
TimToady perhaps the sane thing to do is, rather than initializing 'my $a' to Any always, initialize it to its final value in the compiled lexpad's block, which is *usually* Any 15:51
but not in this case 15:52
masak hm, seems we're at least using the same primitives in thinking about this :) 15:53
specifically, "the compiled lexpad's block".
TimToady so somehow the above turns into 'for ^3 { my $a = 42; say $a }'
masak so, "!\n42\n42\n42\n", then. 15:54
TimToady the only other sane thing is to throw the 42 out entirely, and that's going to be Less Expected
masak what Perl 5 does is also reasonably sane, but still a bit surprising, I guess. 15:55
TimToady p5 is sane there only because some blocks are not closures
masak right. so that's not even an option in Perl 6. 15:56
TimToady so the first time through, it just uses the compile-time value, and the lexpad resets at the end
the also shows up in the infamous 'will not stay shared' message for real closures 15:57
*this also
masak I think much of the runtime environment needs to already exist at compile time, for BEGIN to run in. after compilation, the runtime just keeps running on the same environment.
TimToady but it's kinda like testing your loops at the wrong end
15:58 riffraff left
TimToady so this is a fossil of the pre-closure days of Perl; in the p6 model of everything being a closure, we need to be more consistent 15:59
masak aye.
I'm thinking something like the following happens: (*) compilation starts (*) BEGIN block runs and sets $a in some lexpad (*) compilation ends and runtime starts (*) for each iteration, the lexpad from the compilation phase is cloned and used. 16:02
TimToady for some definition of cloning, yes.
16:03 justatheory joined
TimToady it's a funny kind of genericity 16:03
documenting it that way might help understanding 16:05
masak aye.
TimToady though next thing you know someone will want a hook that runs at cloning time... 16:06
16:06 JimmyZ left
masak :) 16:06
TimToady ENTER is probably close enough for that
masak was just going to suggest that :) 16:07
TimToady though I think cloning happens before ENTER, or we don't have a lexpad that ENTER can see
masak probably close enough for most people. 16:08
TimToady and probably too close for other people :)
16:09 lichtkind joined
masak looks forward to playing around with phasers 16:09
lichtkind masak: did kirk allow you that? 16:10
masak lichtkind: I'll be making my own, outside of his jurisdiction.
TimToady we probably need to not use the word "cloned", since closure cloning is a rarer thing than mere activation 16:12
this is just initializing an activation record
masak ok. 16:13
TimToady in the for loop, the closure is cloned once, but activated 3 times
masak there's one variable, but it refers to three different locations. 16:14
16:14 Xaero left
masak is it the activation that assigns the name to a location? 16:14
TimToady no, it reuses the same location
masak that only works if there's no external reference to that closure. 16:15
or maybe I'm confused here.
snarkyboojum rakudo: my @a = <1 2 3>; for @a -> $a, $b { say $a; say $b } 16:16
p6eval rakudo 082cae: OUTPUT«1␤2␤StopIteration␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
TimToady for ^3 { state $x++ } will use the same location of $x each time because it's only one closure clone, when the {} is evaluated and passed to the 'for' 16:17
masak *nod*
TimToady for ^3 { my $x = { state $x++ } } will end up with three different state variables 16:18
sorry, confusing example
16:18 bradb joined
TimToady so, unless we put state variables somewhere special outside the active lexpad, we *must* reuse the same lexpad for re-invocation 16:19
(and then you have to worry about recursion) 16:20
16:20 cdarroch joined, cdarroch left, cdarroch joined
masak I can see how this gets tricky. 16:20
16:20 gurjeet joined
gurjeet moritz_: It seems tha on line 118, ilbot2.pl does not get the nick that was kicked: irclog.perlgeek.de/perl6/2010-04-27#i_2269531 16:22
moritz_ gurjeet: thanks, I'll have a look
gurjeet The concat operator raises the warning: irclog.perlgeek.de/perl6/2010-04-27#i_2269531 16:23
sorry: Use of uninitialized value in concatenation (.) or string at ./ilbot2.pl line 118.
TimToady actually, I don't think we've properly specced what state vars do on recursion
16:24 am0c joined
moritz_ in perl 5, all call frames of the same routine share their state vars 16:26
pugssvn r30483 | colomon++ | [Spec] Note that the various minmax methods, subs, and operators return a Range. 16:36
r30484 | colomon++ | [Spec] Range.minmax is now Range.bounds. 16:38
TimToady moritz_: for some definition of "routine"; different clones of a closure do not share 16:42
moritz_ TimToady: ok; I meant things like sub a { state $x; a() if $cond; ... } 16:43
TimToady yes
but for (1..3) { my $x = sub { state $s++; say $s }; $x->(); } will print 1 1 1
perl6: for ^3 { my $x = { state $s++; say $s }; $x() } 16:44
p6eval pugs: OUTPUT«1␤1␤1␤»
..elf 30484: OUTPUT«Unknown rule: scope_declarator:state␤It needs to be added to ast_handlers.␤ at ./elf_h line 2850␤»
..rakudo 082cae: OUTPUT«Symbol '$s' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
moritz_ alpha: for (1..3) { my $x = sub { state $s++; say $s }; $x() }
p6eval alpha 30e0ed: OUTPUT«1␤1␤1␤»
TimToady perl6: my $x = { state $s++; say $s; $x() if $s < 10; }; $x(); 16:45
p6eval elf 30484: OUTPUT«Unknown rule: scope_declarator:state␤It needs to be added to ast_handlers.␤ at ./elf_h line 2850␤»
..rakudo 082cae: OUTPUT«Symbol '$s' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
..pugs: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»
TimToady alpha: my $x = { state $s++; say $s; $x() if $s < 10; }; $x();
p6eval alpha 30e0ed: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»
TimToady at least everyone is agreed :)
well, everyone that implements it 16:46
pugssvn r30485 | moritz++ | [t/spec] turn an example of state variables by TimToady++ into a test 16:49
TimToady is thinking about state $s; BEGIN { $s = 42; } and how state vars are perhaps just an indirection from the generic activation pad so everyone who copies that pad for activation gets the same state var 16:52
(closure clones would have to clone the generic pad and create new state vars though) 16:53
pugs: state $s; BEGIN { $s = 42; }; say ++$s; 16:54
p6eval pugs: OUTPUT«43␤»
TimToady alpha: state $s; BEGIN { $s = 42; }; say ++$s;
p6eval alpha 30e0ed: OUTPUT«Symbol '$s' not predeclared in <anonymous> (/tmp/2h36ug4oOY:10)␤in Main (file <unknown>, line <unknown>)␤»
diakopter tries to understand the last 10 msgs from TimToady
TimToady too 16:55
diakopter thinks named subs aren't cloned, so they have just one of each state 16:56
but each clone keeps its state across recursions of it
16:57 isBEKaml joined
TimToady I would rather say that named subs are generally only cloned once 16:57
diakopter yes, that.
that's what I meant :)
16:59 riffraff joined
diakopter named-only subs, that is 17:01
TimToady there is some argument that 'sub foo {...}; my $ref = &foo;' should clone as well
diakopter yes
I'm reading 'clone' as 'take a closure of the surrounding lexical scopes'. 17:02
TimToady though an interesting question is what to do when the 'sub foo' and the '&foo' are in different scopes
diakopter as in sub a($x) { return sub { state $s++; say $s + $x }; say a(4)() 17:03
every time a() is invoked, that inner sub is cloned
TimToady: plz no nonlocal closuring :D 17:04
TimToady obviously the &foo's scope doesn't really matter, in the sense that there's no variable refs in the current lexical scope 17:05
the only lexical scope sub foo has is, well, its own lexical scope
diakopter <whew>
TimToady but that could be most anywhere 17:06
17:06 bradb left
TimToady so you can be take a closure over variables you can't see :) 17:06
*taking
diakopter so in that sense, &foo becomes sortof a BEGIN block-ish
well, I take that back 17:07
17:07 bradb joined
diakopter the surrounding code (around the foo declaration) will already have run 17:07
by the time &foo is created 17:08
at least once.
so &foo could mean 'take a closure of the deepest invocation of foo's scope that's also still activ' 17:09
bleh
17:10 bradb left
colomon rakudo: say "inner" ~~ "inner" 17:11
p6eval rakudo 082cae: OUTPUT«1␤»
diakopter TimToady: ok, I revise my recommendation such that &foo always everywhere refers to the same closure (and thus state) of foo. 17:15
TimToady in fact, I think pugs desugars inner named subs into closures and bindings; we had a long discussion one hackathon (Toronto?) about when that binding to &foo happens, at ENTER time or when the 'sub' is 'executed' 17:19
I believe we settled on ENTER time
otherwise post-declared subs don't work 17:20
17:20 envi^home left
diakopter 'splain more? 17:20
17:21 dakkar left
masak [Coke], IllvilJa: just so you know, I've privmsg'd a bit with jaffa4 and asked his forgiveness for giving him impatient and hubristic answers earlier today. :/ he was graciously understanding. 17:23
17:24 literal left, avar left
masak afk & 17:26
17:27 avar joined
TimToady in pugs, { sub foo {...} } desugars to something like { ENTER my &foo := {...} } 17:30
so inner subs are cloned every time their outer scope is entered
17:31 stephenlb joined
TimToady (this can be optimized away if it's provable that &foo does escape) 17:31
*doesn't 17:32
my n't key is busted again
diakopter ah, yes. but what about our subs 17:33
[Coke] masak: I would like to point out the irony in my world of me being a force for diplomacy. 17:34
and masak++
TimToady well, our thingies officially live in the package, and the lexical name is only an alias
moritz_ TimToady: can you tell where in STD.pm6 s/// is parsed? I have no idea what to search for :/
TimToady I do :)
you want sibble 17:35
moritz_ thanks
TimToady that's the 's' nibbler
moritz_ and babble parses the modifiers, right? 17:36
rakudo: say q:x/echo hello/ 17:37
p6eval rakudo 082cae: OUTPUT«Colons may not be used to delimit quoting constructs at line 11, near ":x/echo he"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
moritz_ alpha: say q:x/echo hello/
p6eval alpha 30e0ed: OUTPUT«operation not permitted in safe mode␤in Main (file /tmp/PoajZwm4nd, line 1)␤» 17:38
17:38 k23z__ left
TimToady yes, babble tweaks the current slang according to the modifiers 17:39
[Coke] colomon: Range.bound or Range.bounds ?
colomon bounds, [Coke]++ 17:40
moritz_ std: s :g / foo / 17:41
p6eval std 30485: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter (must be quoted to match literally) at /tmp/LuO4o2gXZo line 1 (EOF):␤------> s :g / foo /⏏<EOL>␤Unrecognized regex metacharacter (must be quoted to match literally) at /tmp/LuO4o2gXZo line 1
..(EOF):␤-…
moritz_ std: s :g/ foo /
p6eval std 30485: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter (must be quoted to match literally) at /tmp/nf2MHuQHU2 line 1 (EOF):␤------> s :g/ foo /⏏<EOL>␤Unrecognized regex metacharacter (must be quoted to match literally) at /tmp/nf2MHuQHU2 line 1
..(EOF):␤--…
moritz_ std: s:g/ foo /
TimToady missing final /
moritz_ oh, right
p6eval std 30485: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter (must be quoted to match literally) at /tmp/JaK1TVshnJ line 1 (EOF):␤------> s:g/ foo /⏏<EOL>␤Unrecognized regex metacharacter (must be quoted to match literally) at /tmp/JaK1TVshnJ line 1
..(EOF):␤---…
pugssvn r30486 | colomon++ | [Spec] .bound should have been .bounds.
TimToady channels MJD
moritz_ hides
TimToady #11919 No. You must believe the ERROR MESSAGE. You MUST believe the error message. 17:42
mind you, the ERROR MESSAGE was not exactly AWESOME 17:43
but it did point to the problem
moritz_ aye
TimToady in fact, I'd go as far as to say that the message is WRONG 17:44
since it's no longer in the regex part... 17:45
moritz_ so I must believe the wrong error message? :-)
TimToady well, if I change it, you must still believe it :)
moritz_ there's something to be said for being dictator :-) 17:47
TimToady std: s:g /x/ 17:48
p6eval std 30485: OUTPUT«===SORRY!===␤Undeclared routine:␤ 's:g' used at line 1␤Check failed␤FAILED 00:01 108m␤»
TimToady overzealous backtracking...
bbl &
17:50 nihiliad left, nihiliad joined
TimToady std: s :g /foo/ 17:58
p6eval std 30486: OUTPUT«===SORRY!===␤Bogus term at /tmp/gKfoPrAUOX line 1 (EOF):␤------> s :g /foo/⏏<EOL>␤Undeclared routine:␤ 'foo' used at line 1␤Parse failed␤FAILED 00:01 111m␤»
TimToady that's parsed as s( :g / foo 17:59
and then it doesn't know why you put a / there
again, caused by unwarranted backtracking
17:59 bradb joined 18:01 am0c left
TimToady sibble is missing an ||panic 18:01
slavik TimToady: this is why we need STAR ;) 18:02
lichtkind moritz_: whats the difference between rx as routine trait and rw parameter trait? 18:03
s/rx/rw/
moritz_ lichtkind: as a routine trait it's an lvalue routine 18:04
the kind of accessor you get for has $.attrib is rw; 18:05
lichtkind ah yes i remember thanks 18:06
moritz_: but whyt actually does that? 18:07
moritz_ lichtkind: return an object you can assign to
lichtkind moritz_: superb so wiki.perl-community.de/Wissensbasis...enschaften is already correct :) 18:08
lisppaste3 gurjeet pasted "'kicked' patch for ilbot" at paste.lisp.org/display/98450 18:10
gurjeet moritz_: ^^^
moritz_ gurjeet: thanks, pushed 18:12
lichtkind: yes
pugssvn r30487 | lwall++ | [STD] panic on missing replacement parts for s/// and tr/// 18:22
TimToady oh, and a moritz_++ 18:23
diakopter std: s|a|a|
p6eval std 30486: OUTPUT«ok 00:01 107m␤» 18:24
TimToady stoppers generally take precedence over infixes
diakopter is the ENTER thing specd? it'd be naiss 18:25
TimToady which ENTER thing
diakopter sub bound
inner subs bound at ENTER time 18:26
TimToady not sure
S04:1617 or thereabouts 18:31
jnthn back 18:32
The Perl 6 talks went well. \o/
*talk
masak \o/
jnthn Got good feedback too. 18:33
masak anything in particular? 18:34
jnthn When going through feedback forms with your boss, if he notes the only slightly negative comment written was, "sometimes a little deep and fast", then it turns out further discussion of the point ends very quickly if you come out with "that's what she said!"
18:35 gruotr left
pugssvn r30488 | lwall++ | [S04] clarify that state is shared by recursion to the same clone 18:35
r30488 | remove some ::= fossils
18:35 chitragupt joined
jnthn masak: Overall the interest was high, I think people were surprised both by how alive Perl 5 is and how coll Perl 6 is. 18:35
*cool
diakopter TimToady: thnx; that's very helpful :)
S04++ 18:36
masak jnthn: that seems to be a common reaction of outsiders :)
jnthn One of them was inside enough to know to ask how Perl 6 interop with Perl 5 played out with XS though. :-) 18:37
moritz_ tried to make s:g/// parse - adding a ':g'? to the quote:sym<s> rule caused a weird parse failure in the setting
jnthn Anyway, I think it was very well received. :-)
TimToady moritz_: LTM issue perhaps 18:38
colomon jnthn++
moritz_ TimToady: maybe 18:39
[Coke] LTM is also Less Than Mawsome.
jnthn
.oO( Less Than Moresome )
18:40
#rs in 17 18:41
colomon thank you for reminding me! I've got my nose in a tricky $work problem... 18:43
masak I'm thankful to be reminded, too.
TimToady std: s :g /foo/ 18:44
p6eval std 30487: OUTPUT«===SORRY!===␤Bogus term at /tmp/cujS0LGqzO line 1 (EOF):␤------> s :g /foo/⏏<EOL>␤Undeclared routine:␤ 'foo' used at line 1␤Parse failed␤FAILED 00:02 109m␤»
TimToady ENOTYET
18:44 bradb left, cls_bsd joined
TimToady I still love it how the version number lies :/ 18:44
18:45 cls_bsd left
moritz_ TimToady: does 'make snap' record the correct version number anywhere? 18:45
18:46 SmokeMachine left
[Coke] jnthn: hey, have chromatic's line number fixes helped at all, or are we still stuck on the NS/method issue? 18:47
TimToady moritz_: I doubt it
jnthn [Coke]: I didn't get us building on latest yest. 18:49
[Coke] jnthn: ok. I'll mention it again in #ps today.
18:49 cls_bsd joined
jnthn *yet...though "yest" sounds like the Slovak word for "yet" :-) 18:49
[Coke]: I think it's something needing fixing in p6object now that :nsentry works rather than a Parrot bug fwiw. 18:50
18:50 cls_bsd left 18:52 am0c joined 18:54 cls_bsd joined 18:55 cls_bsd left 18:58 ShaneC joined 18:59 cls_bsd joined
jnthn #rs 19:00
pmichaud: Rakudo Sketch now, if you happen to be about.
19:02 uniejo joined
TimToady std: s :g /foo/ 19:03
p6eval std 30488: OUTPUT«===SORRY!===␤Malformed replacement part; couldn't find final / at /tmp/yyo5NSmUWg line 1:␤------> s :g /foo/⏏<EOL>␤ expecting escape␤Parse failed␤FAILED 00:01 110m␤»
19:14 SmokeMachine joined 19:18 smash__ joined
smash__ hello everyone 19:18
masak smash__: \o 19:20
19:28 alester left
masak finds dev.perl.org/perl6/talks/2002/topaz-v2.pdf an archeologically interesting read 19:29
19:30 bradb joined
masak chip left a comment on my blog the other day, to the effect that he called Topaz Topaz precisely so that it shouldn't taint the name 'Perl 6' with bad PR. 19:31
19:31 riffraff left, alester joined
masak what happened to Topaz? 19:31
TimToady reimplementing insanity is insane 19:32
masak perlfaq1: '[...] Topaz provided valuable insights to the next version of Perl and its implementation, but was ultimately abandoned.' 19:33
[Coke] TimToady: ... what does that make you? =-) 19:34
masak Ponie has a nice post-mortem document. www.nntp.perl.org/group/perl.ponie....sg487.html
I guess Topaz never had one of those.
19:36 meppl left
masak "Sapphire was another early prototype that influenced the shape of Perl 6 internals. It was a one-week project in September 2000. The brainchild of Simon Cozens, Sapphire was another rewrite of Perl 5 internals. It was never intended for release, only as an experiment to see how far the idea could go in a week, and what lessons could be learned." 19:37
wow, I'd never heard of Sapphire.
it's from this article: www.developer.com/lang/perl/article...roject.htm 19:39
19:43 eternaleye left 19:45 GinoMan left 19:50 clintongormley left 19:52 alester left
diakopter '[...] provided valuable insights to the next version[s] of Perl and its implementation[s], but was ultimately abandoned.' 20:00
20:03 eternaleye joined 20:09 dark_soul joined 20:10 dark_soul left 20:12 drewk joined 20:13 drewk left 20:14 sbp- joined
dalek meta: r206 | diakopter++ | trunk/Sprixel/ (3 files):
[perlesque] fix bug found by jaffa4; thanks!
20:21
20:24 Guest69093 left, molaf left 20:26 literal joined 20:33 rhr joined 20:36 Guest69093 joined
masak snarkyboojum: just added a --target argument to the yapsi script. 20:40
dalek meta: r207 | diakopter++ | trunk/Sprixel/src/Perlesque/Operators.cs:
[perlesque] remove ++/--; too tricky at this layer (and easy enough to codegen
20:45
20:49 uniejo left
dalek meta: r208 | anteus4++ | trunk/Sprixel/t/controlflow.t:
more tests
20:50
moritz_ ++ and -- really just desugar to .succ and .pred anyway, no?
20:50 eternaleye left
colomon no 20:52
.succ and .pred don't modify in place. (I think)
rakudo: my $a = 1; say $a.succ; say $a
p6eval rakudo 082cae: OUTPUT«2␤1␤»
colomon well, okay, for some definition of desugar, I supposed. :) 20:53
rakudo: my $a = 1; say $a .= succ; say $a
p6eval rakudo 082cae: OUTPUT«2␤2␤»
jnthn ++ should be implemetned in terms of .succ, iirc. 20:56
it's like self = self.succ
modulo returning the "what I used to be"
for postfix.
jnthn reading for a bit 20:57
21:01 rurban left, rurban joined
masak both of them return an lvalue, though, don't they? 21:01
alpha: my $a; ++$a = 4; say $a; $a++ = 42; say $a 21:02
p6eval alpha 30e0ed: OUTPUT«4␤5␤»
21:02 sbp- is now known as sbp
masak hm, maybe not. 21:02
moritz_ I don't think so
21:02 eternaleye joined
masak I'm a bit surprised that $a++ = 42 doesn't blow up :) 21:02
colomon rakudo: my $a; ++$a = 4; say $a; $a++ = 42; say $a
p6eval rakudo 082cae: OUTPUT«4␤Cannot assign to readonly value␤current instr.: '&die' pc 17354 (src/builtins/Junction.pir:393)␤»
colomon std: my $a; ++$a = 4; say $a; $a++ = 42; say $a 21:03
p6eval std 30488: OUTPUT«ok 00:01 111m␤»
masak ah; fixed in master :)
well, it should parse OK.
moritz_ masak: alpha was never really strict about lvalueness
masak *nod*
moritz_ objects are allowed to return lvalues from any operators, really
jnthn Yes, we switched to "readonly by default" in master. :-)
Which works out...rather better. :-)
moritz_ good default 21:04
jnthn Yes, pmichaud++ for that call.
masak time to go home. 'night, #perl6 21:06
21:06 masak left
moritz_ 'night masak 21:06
colomon o/
how do you return an lvalue?
21:07 rgrau_ joined 21:08 gurjeet left, bradb left
moritz_ with 'is rw' on the routine 21:08
colomon ah, sensible. 21:09
moritz_ just read #rs backlog...
21:09 chitragupt left
moritz_ one things that's really broken with meta operators is slice context (and always has been) 21:09
colomon eh?
moritz_ things like Z, 21:10
can't return somethiing sensible in current rakudo
colomon oh, yes.
I think that's just list / iterator issues again.
moritz_ aye
colomon but maybe there's something subtle there I don't understand.
moritz_ I think we can put that into list+slice corner, and mark meta ops as done
21:13 wknight8111 joined
colomon It's hard for me to judge -- my feeling is we've probably done 90% of the 10% needed to make 90% of the people happy. 21:14
If you know what I mean.
21:15 bradb joined
moritz_ well, can you think of some examples of the 10% we haven't done of the first 10%? :-) 21:15
21:17 TiMBuS joined 21:18 SmokeMachine left 21:19 plobsing joined 21:22 rgrau_ left
colomon sorry, was ordering noms 21:23
hypers on hashes
handling multiple Zopzs or Xops in an expression
like @a Z @b Z @c 21:24
probably can't next them because of the gather/take bug
*nest 21:25
21:26 nihiliad left, nihiliad joined
Tene is that still an issue. argh. 21:28
><
dalek meta: r209 | anteus4++ | trunk/Sprixel/ (3 files):
more operator tests
21:30
colomon we allow !op on all sort of operators that shouldn't have it, don't know how much I worry about that. :)
do we know if they work on user defined operators at the moment? 21:32
smash__ can't run rakudo's 'perl6' !? fresh checkout&compile
"dyld: lazy symbol binding failed: Symbol not found: _tgetent" 21:33
colomon rakudo: sub infix:<∂>($a, $b) { ($a + $b) / 2 }; say 4 ∂ 7;
p6eval rakudo 082cae: OUTPUT«5.5␤»
colomon rakudo: sub infix:<∂>($a, $b) { ($a + $b) / 2 }; my @a = 1..4; say (@a >>∂>> 9).perl 21:34
p6eval rakudo 082cae: OUTPUT«Could not find sub &infix:<∂>␤current instr.: '' pc -1 ((unknown file):-1)␤»
colomon rakudo: our sub infix:<∂>($a, $b) { ($a + $b) / 2 }; my @a = 1..4; say (@a >>∂>> 9).perl
p6eval rakudo 082cae: OUTPUT«[5/1, 11/2, 6/1, 13/2]␤»
colomon Ah, so they work with our. That would be okay for R* IMO.
gotta go fetch noms.
dalek meta: r210 | diakopter++ | trunk/Sprixel/ (4 files):
[perlesque] fixed yet another bug found/reported by jaffa4 (and his writing of
21:39
21:46 Guest69093 left 21:53 iblechbot left 22:04 ruoso left 22:06 nihiliad left, nihiliad joined
isBEKaml hello #perl6! 22:09
say doesn't work on lists?
rakudo: my @lists=(1,2,3); say @lists; print @lists;
p6eval rakudo 082cae: OUTPUT«123␤123»
isBEKaml that's odd, I don't see it on my perl6 interpreter... 22:10
dalek meta: r211 | diakopter++ | trunk/Sprixel/src/Perlesque/TopLevel.cs:
[perlesque] separate perlesque building from perlesque executing; use the
22:14
lichtkind moritz_: ping?
22:20 Woody2143 left 22:30 supernovus joined
jnthn Ah, I think I've managed to golf the problem on latest Parrot down to 12 lines of PIR. 22:31
ah, 11 22:32
and pure PIR example with no Perl 6 deps.
Seems it may well be a Parrot bug after all.
isBEKaml rakudo: my @lists=('b','a','c'); say "lists: @lists" 22:35
p6eval rakudo 082cae: OUTPUT«lists: @lists␤»
isBEKaml uhh, interpolation?
rakudo: my @lists=('b','a','c'); say "lists: ",@lists; 22:36
Tene rakudo: my @lists=('b','a','c'); say "lists: @lists[]"
p6eval rakudo 082cae: OUTPUT«lists: bac␤»
rakudo 082cae: OUTPUT«lists: b a c␤»
isBEKaml :) 22:37
Tene You need the trailing [] to interpolate arrays in Perl 6.
22:38 kensanata joined
isBEKaml I see... thanks. 22:38
cj mumle 22:40
mumble
sorry, I mumbled that.
if I wanted a regular expression test suite, where might I look? 22:41
I'm trying to grok pcre's, but I am with the fail currently.
«I am so happy I can type this... now why can't I read it?» 22:42
22:52 k23z__ joined 23:01 bradb left 23:07 _jaldhar joined
isBEKaml I'm reading through the perl6book, currently on page 10, is there a typo there in the line: [max] @scores.key.chars ? 23:08
when I try that out on my p6 interpreter, I get this: Method 'key' not found for invocant of class 'Array'
jnthn I think it wants to me .keys
isBEKaml I changed the key to keys.
yes, I was thinking exactly that. :) 23:09
jnthn: how do I get to know the native type of variables? I saw .WHAT, but that seems to apply to objects. 23:10
23:11 kensanata left
jnthn isBEKaml: .WHAT is meant to be macro-ish and can thus apply to anything. 23:11
isBEKaml jnthn: working through that example in p6book, after replacing .key with .keys, I get this: Method 'Num' not found for invocant of class 'Pair'
jnthn isBEKaml: Note that we don't implement in Rakudo yet the native (lowercase) types though.
oh
isBEKaml jnthn: apparently, it seems to be some number format error. 23:12
jnthn er, calling .chars in what .keys returns is...huh.
jnthn is confused
23:12 M_o_C left
jnthn isBEKaml: I'll have to go look at the example, but i'm sorta tied up with something else ATM. 23:12
isBEKaml jnthn: okay. I'll work it out and let you know if I find anything. Can you tell me what that error means? 23:13
as I said, it appears to be a number format error, occurs when doing arith operations.
jnthn isBEKaml: Something is trying to numify a pair object
isBEKaml: Perhaps wrongly. 23:14
It kinda doesn't make sense to do so.
isBEKaml: Which chapter in the book? 23:15
isBEKaml jnthn: chapter 3, first page.
23:16 supernovus left
isBEKaml jnthn: does [max] @array return a Pair object? 23:17
rakudo: my @array = a => 1, b => 2, c=> 33; my $ss = [max] @array; say $ss.WHAT; 23:18
p6eval rakudo 082cae: OUTPUT«Pair()␤»
jnthn oh!! 23:19
github.com/perl6/book/raw/master/sr...rators.pod
isBEKaml: bookbug
isBEKaml: The PDF misses out some characters that are...very important! :-)
isBEKaml jnthn: hmm, that's exactly what happened. :)
jnthn: gee, I hit this on the second day of my initiation to p6! :D
jnthn Thanks for finding and reporting the bug. Unfortunately, I'm not quite sure how to fix the PDF generation. 23:20
23:21 gurjeet joined, chitragupt joined
jnthn phenny: tell moritz_ if you're in the know at all on the book PDF gen, the operators.pod example loses its » in the PDF, which makes the example have a FAIL. Maybe we could fix it, or even just use the ASCII >> instead, since it's a bit easier for people to type. ;-) 23:21
phenny jnthn: I'll pass that on when moritz_ is around.
jnthn phenny++ 23:22
isBEKaml jnthn: one more minor formatting thing I found in the p6book, chapter 2 last page. Bold text shown as <B somethings>
jnthn Eww, yes, good catch too. 23:24
isBEKaml jnthn: Can you tell me what that 􏿽xBB character mean there? 23:36
jnthn It's another way to write >> 23:37
Essentially >>. or ». means "call this method on everything in the list"
for example
rakudo: my @a = -2, -5, -8; my @b = @a>>.abs; say @b.perl;
p6eval rakudo 082cae: OUTPUT«[2, 5, 8]␤»
jnthn So it calls .abs on each thing in the list and makes a new list out of the return values. 23:38
isBEKaml jnthn: ah, i see..
PerlJam isBEKaml: It also has no guaranteed order of execution for potential parallelism 23:39
isBEKaml PerlJam: I don't understand you. Explain further?
PerlJam: Do you mean to say concurrency takes a hit? 23:40
eternaleye isBEKaml: It doesn't guarantee what order they happen in, so as to allow parallelizing them
PerlJam isBEKaml: in jnthn's example, it could have computed -8.abs first or -2.abs first, or done all three at once
23:41 nihiliad left
TimToady careful, -8.abs is -8 :) 23:41
PerlJam TimToady++ :)
isBEKaml PerlJam: thanks. :)
TimToady: :)
PerlJam TimToady: can't you see those invisible parens that were in my brain? 23:42
TimToady occasionally I wonder if there's a way to fix that
crops up all the time with ^$n as well 23:43
like some unaries would prefer to be tighter than methods
isBEKaml PerlJam: invisible parens? does abs only work on lists? I mean, if () is in list context? 23:46
PerlJam isBEKaml: no, () are for grouping, not listing
TimToady he means (-8).abs
isBEKaml TimToady: I got that when I tried it out on rakudo shell. :)
TimToady rakudo: say ^10.Str.say 23:47
p6eval rakudo 082cae: OUTPUT«10␤0␤»
isBEKaml TimToady: I think I'm going to lose it, looking at too many contexts. :D
TimToady rakudo: say (^10).Str.say
p6eval rakudo 082cae: OUTPUT«0 1 2 3 4 5 6 7 8 9␤1␤»
PerlJam TimToady: just make some unicode versions of a different precedence :) 23:49
TimToady uh-huh
PerlJam contemplates a more verbose solution ... negative.8.abs hat.10.Str.say 23:51
;-)
I suddenly feel like coding in ruby
TimToady 10.times.Str.say 23:52
jnthn takes an early (for some defintion) night 23:55
o/
(ohbtw...there is a Parrot bug keeping us from running on latest Parrot rather than just something I need to tweak.) 23:56
(filed it...hard to guess at how long a fix will take, given opinions on the bug vary between very hard and not so hard...)
jnthn really gone
23:57 ruoso joined