»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
TimToady with count of 1 00:00
jlaire I see
00:00 Trashlord left
TimToady probably just not implemented on coercions yet 00:00
rakudo: say (1,2,3).map: *.sqrt 00:01
p6eval rakudo 72d158: OUTPUT«11.41421356237311.73205080756888␤»
TimToady works on ordinary methods though
coercers are special
jlaire rakudo: say (1,2,3).map: { $^a.Str.What } 00:02
p6eval rakudo 72d158: ( no output )
jlaire rakudo: say (1,2,3).map: { $^a.Str.WHAT } 00:03
p6eval rakudo 72d158: OUTPUT«Str()Str()Str()␤»
jlaire wfm
jnthn nom: say (*.Str).WHAT 00:04
p6eval nom: OUTPUT«Str()␤»
jnthn hmm
nom: say (*.perl).WHAT 00:05
p6eval nom: OUTPUT«Str()␤»
jnthn nom: say (*.foo).WHAT
p6eval nom: OUTPUT«Method 'foo' not found for invocant of class 'Whatever'␤current instr.: '_block1002' pc 83 ((file unknown):57853675) (/tmp/M2y4KnGEGz:1)␤»
TimToady looks like it's coercing * to Str
jnthn I think the *.foo form you ain't implemented.
s/you/just/
00:06 dorlamm left
TimToady oh, I did it on rakudo, duh 00:06
nom: say (1,2,3).map: *.sqrt
p6eval nom: OUTPUT«Method 'sqrt' not found for invocant of class 'Whatever'␤current instr.: '_block1002' pc 108 ((file unknown):68060911) (/tmp/C3BLzsPzm_:1)␤»
TimToady yep, nyi
jnthn forgets how that's meant to work 00:09
I have this memory of it fiddling with method dispatch or something :)
TimToady it needs to be macro-y like other affixes, or *.foo(args()) evaluates args too soon 00:11
jnthn ah
jnthn wonders if master gets that right 00:12
TimToady has to rewrite to { .foo(args) }
jnthn Think it dod
*did
yeah
makes sense.
OK, good. That's better than fiddling dispatch. :)
Now junctions, OTOH... :)
TimToady have to be dispatchy
jnthn yeah
Didn't do that bit of auto-threading yet
TimToady since the whole point is to subvert the type system :)
jnthn gets curious
nom: my @a = 1,2,3,4; say @a[1|2] 00:13
p6eval nom: OUTPUT«any(2, 3)␤»
jnthn \o/
rakudo: my @a = 1,2,3,4; say @a[1|2]
p6eval rakudo 72d158: OUTPUT«any(2, 3)␤»
jnthn oh, it did work before
Nice that it still does, then :)
jlaire rakudo: say +(().map: *.foo(die())) 00:14
p6eval rakudo 72d158: OUTPUT«0␤»
sorear nom: my %a = :a, :b, :c; say ?( %a{any 'b', 'd'}:exists )
p6eval nom: OUTPUT«Unsupported use of ?: for the conditional operator; in Perl 6 please use ??!! at line 1, near "( %a{any '"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23533 (src/stage2/gen/NQPHLL.pir:6314) (src/stage2/gen/NQPHLL.pm:328)␤»
sorear wha?
jnthn It's a good guess for a parser that doesn't do operator advergs :) 00:15
jlaire nom: my %a = :a, :b, :c; say (?( %a{any 'b', 'd'}:exists ))
p6eval nom: OUTPUT«Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 1␤current instr.: 'nqp;Regex;Cursor;FAILGOAL' pc 3851 (src/Regex/Cursor.pir:239)␤»
tadzik std: my %a = :a, :b, :c; say ?( %a{any 'b', 'd'}:exists )
p6eval std 37a0cdd: OUTPUT«ok 00:01 123m␤»
sorear jnthn: does it do ? at all?
TimToady but it should not be expecting an infix there
jlaire nom: say ?0
TimToady so must be inadvertent backtracking
p6eval nom: OUTPUT«Bool::False␤»
jnthn TimToady: No, something curious is up there 00:16
dalek ecza: bcc1cf3 | sorear++ | / (2 files):
Optimize $*foo to a direct fetch if $*foo is declared in the current frame or inline caller
00:17
TimToady it's gotta be the check for ?: is firing as if there are no args to say
it's probably looking for ?\N*: or some such, and ignoring parens 00:18
but it should commit to ? being prefix
jnthn yeah, probably
dalek kudo/nom: 4677323 | jonathan++ | LHF.markdown:
A few more bits of LHF.
kudo/nom: e42b089 | jonathan++ | src/Perl6/Actions.pm:
Fix a few compile-os. Of note, this gets default { ... } to work again.
TimToady hence, a backtracking problem, likley
nice work, likley...
jnthn :P 00:19
OK, enough for today
mix-ins tomorrow...and maybe BEGIN
TimToady o/ 00:20
jnthn night o/
00:31 cooper left 00:39 GodFather left
jlaire rakudo: class C { has $.a }; sub f { C.new }; my $c = f(); $c.a = 1; say 'alive' 00:47
p6eval rakudo 72d158: OUTPUT«Cannot modify readonly value␤ in '&infix:<=>' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in main program body at line 22:/tmp/wGhepu1eqI␤»
jlaire rakudo: class C { has $.a }; sub f { C.new }; my $c = C.new; $c.a = 1; say 'alive'
p6eval rakudo 72d158: OUTPUT«Cannot modify readonly value␤ in '&infix:<=>' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in main program body at line 22:/tmp/JPxh0IW40q␤»
jlaire rakudo: class C { has $.a is rw }; sub f { C.new }; my $c = f(); $c.a = 1; say $c.a 00:48
p6eval rakudo 72d158: OUTPUT«1␤»
jlaire oic
ciphertext \reload 00:50
tadzik perl6: say &infix:<%%>(5) 00:51
p6eval niecza v7-21-gbcc1cf3: OUTPUT«Unhandled exception: No value for parameter $y in CORE infix:<%%>␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (CORE infix:<%%> @ 0) ␤ at /tmp/n0UDRdbjj1 line 1 (MAIN mainline @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1891 (CORE C887_ANON @ …
..rakudo 72d158: OUTPUT«No applicable candidates found to dispatch to for 'infix:<%%>'. Available candidates are:␤:(Any $a, Any $b)␤␤ in main program body at line 22:/tmp/XBbtxBiEOx␤»
..pugs: OUTPUT«*** No such subroutine: "&infix:%%"␤ at /tmp/C7epqlg7sN line 1, column 5 - line 2, column 1␤»
00:58 george_z0rwell is now known as Haskelletor 01:00 noganex joined 01:04 noganex_ left
dalek kudo/nom: f83f8ce | tadzik++ | / (3 files):
Implement infix:<%%>, run tests
01:12
01:28 [Coke] left 01:30 [Coke] joined
jlaire perl6: sub f(Int $x) { $x }; say (1,2,3).map: f(*) 01:33
p6eval rakudo 72d158: OUTPUT«Nominal type check failed for parameter '$x'; expected Int but got Whatever instead␤ in 'f' at line 1:/tmp/WnmHo4vGB8␤ in main program body at line 22:/tmp/WnmHo4vGB8␤»
..niecza v7-21-gbcc1cf3: OUTPUT«Unhandled exception: Nominal type check failed in binding Int $x in MAIN f; got Whatever, needed Int␤ at /tmp/71jzxXbX8r line 0 (MAIN f @ 0) ␤ at /tmp/71jzxXbX8r line 1 (MAIN mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1891 (CORE C887_AN…
..pugs: OUTPUT«*** Cannot cast from VList [VNum Infinity] to Pugs.AST.Types.VCode (VCode)␤ at /tmp/zsiXiaK1zO line 1, column 27 - line 2, column 1␤»
jlaire perl6: sub f(Int $x) { $x }; say (1,2,3).map: { f($^a) }
p6eval pugs, rakudo 72d158, niecza v7-21-gbcc1cf3: OUTPUT«123␤»
jlaire funny
perl6: sub f(Int $x) { $x }; say (1,2,3).map: &f 01:35
p6eval pugs, rakudo 72d158, niecza v7-21-gbcc1cf3: OUTPUT«123␤»
jlaire ah
KISS
01:42 jevin left 01:43 colomon joined 01:47 kst joined 01:57 whiteknight joined 02:00 wknight8111 joined 02:13 wknight8111 left 02:46 cognominal left 02:48 cognominal joined 02:49 whiteknight left 02:57 cooper joined, Chillance left 03:12 jack-ji joined, ymasory joined 03:22 Quadrescence joined 03:24 Su-Shee left 03:27 Quadrescence left 03:28 Su-Shee joined 03:31 ymasory left 03:51 tokuhir__ joined 03:56 donri left 04:17 mberends left 04:26 donri joined
daniel-s rakudo: (1,2,3).WHAT.say; 04:34
p6eval rakudo 72d158: OUTPUT«Parcel()␤»
daniel-s rakudo: [1,2,3].WHAT.say;
p6eval rakudo 72d158: OUTPUT«Array()␤»
05:01 daniel-s left 05:02 daniel-s joined 05:10 daniel-s left
soh_cah_toa rakudo: Bool::False // say "Foo" 05:15
p6eval rakudo 72d158: ( no output )
soh_cah_toa rakudo: Bool::False || say "Foo"
p6eval rakudo 72d158: OUTPUT«Foo␤»
soh_cah_toa rakudo: my $a = undef; $a // say "\$a is undefined"; 05:17
p6eval rakudo 72d158: OUTPUT«===SORRY!===␤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,␤ !*.defined as a matcher or method,␤ Any:U as a type constraint␤ or…
soh_cah_toa that can't be right :\ 05:18
nom: my $a = undef; $a // say "\$a is undefined";
p6eval nom: 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,␤ !*.defined as a matcher or method,␤ Any:U as a type constraint␤ or fail() as a failure re…
benabik rakudo: * // say "* is undef" 05:19
p6eval rakudo 72d158: ( no output )
TimToady you probably want Nil for uniniting something
nom: my $a = Nil; $a // say "\$a is undefined";
p6eval nom: OUTPUT«$a is undefined␤»
soh_cah_toa interesting
TimToady nom: my $a = 42; $a = Nil; $a // say "\$a is undefined";
p6eval nom: OUTPUT«$a is undefined␤»
pmichaud there's also undefine($a) 05:20
benabik TimToady: Why Nil (empty list) instead of Undef?
soh_cah_toa i thought $a // $b was shorthand for defined $a ?? $a !! $b
TimToady becuase undef is an overload concept, and means too many completely different things in P5
soh_cah_toa: it is 05:21
my $a = Int; $a // say "\$a is undefined";
nom: my $a = Int; $a // say "\$a is undefined";
p6eval nom: OUTPUT«$a is undefined␤»
TimToady our undefs are typed
my Int $x; say $x.WHAT 05:22
nom: my Int $x; say $x.WHAT
p6eval nom: OUTPUT«Int()␤»
pmichaud nom: my Int $x; say $x; # curious 05:23
p6eval nom: OUTPUT«Int()␤»
pmichaud :-D
TimToady but Nil represents the concept of 'not enough arguments'
soh_cah_toa when you say undef's are typed, you mean I can do: my Undef $a; ? 05:24
TimToady so it's not really an object, like Int or Mu
only if you were to define an Undef type
soh_cah_toa right
TimToady Mu is the closest thing you can assign as the type of an object
since it's the top of the type hierarchy (like Object in Java), it's the least defined 05:25
it's actually something outside of an object, in a sense
soh_cah_toa i see
TimToady Mu is more of a concept
Any is really the first type that is a real object 05:26
Mu also contains things like Junction, which is more like a linguistic construct
soh_cah_toa what does Mu stand for?
TimToady it's overloaded 05:27
"Most Undefined"
the Zen concept of nonthingness
and, of course, what a cow says
benabik µ
soh_cah_toa yeah, it is very zen. i was just thinking that
rakudo: my $a = 1; $a = undef; say $a.WHAT;
p6eval rakudo 72d158: OUTPUT«===SORRY!===␤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,␤ !*.defined as a matcher or method,␤ Any:U as a type constraint␤ or… 05:28
offby1 claps one hand
soh_cah_toa right, good
benabik What's an `is rw` routine? Returns an lvalue?
05:28 daniel-s joined
pmichaud benabik: yes 05:28
TimToady Perl 6 has many kinds of nothing, just as it has interesting values of failure
soh_cah_toa indeed 05:29
TimToady but the type objects like Int or Any are so that you can reason linguistically about generic objects without actually having one
"Socrates is a Man" 05:30
in P6 is more like $socrates ~~ Man
so P6 doesn't really have class objects like other OO languages 05:31
since the "class" objects are the same type, just uninstantiated
rakudo: my Any $x; say $x.defined; $x .= new; say $x.defined 05:32
p6eval rakudo 72d158: OUTPUT«Bool::False␤Bool::True␤»
benabik Watching nom's progress is really teaching me a lot about P6 syntax.
soh_cah_toa wow, i've never heard of any object system like that before 05:33
TimToady have you looked at Haskell?
it's kinda like Just vs Maybe types
soh_cah_toa no. why is it's oo-system similar? 05:34
benabik What is HOW.instantiate_generic in nom?
benabik is trying to catch up on a few days of nom and getting lost.
TimToady it has some similar concepts
though Haskell chooses a different default; P6's types are more like Maybe types, or Error types 05:35
soh_cah_toa ok
TimToady and Just types are constrained to be defined with :D, which makes them happy types
soh_cah_toa ha!
benabik P6 is very punny 05:36
TimToady but P6 doesn't officialy care whether an object of a particular type is defined or not
type objects are like color charge gluons in a nucleus
05:36 cooper left
TimToady they just carry a type "charge" without actually having to act like real particles 05:36
05:37 cooper joined
soh_cah_toa that's actually a good analogy 05:37
TimToady you can think of them as typed (void*) from a Cish perspective
that doesn't work as well, I suppose 05:38
more like typed pointers, except the type is officially at the same distance as the object would be if it were there :)
so they function as generic objects 05:39
so more like turning Pinocchio into a real boy :)
benabik Kinda like mock objects? They look right, but don't do anything?
TimToady kinda like platonic ideals 05:40
soh_cah_toa :) alright, that's not too hard to understand
TimToady they're the stunt doubles that can't die because they were never born. :)
anyway, it's one of the experiments that P6 is making 05:41
05:41 drbean left
TimToady so far it seems to work pretty well, though there's been some discussion lately that invocants should default to the :D subtype that requires a defined object 05:41
benabik masak++'s blog on Classes discusses the philosophical nature of type objects. 05:42
soh_cah_toa benabik: do you have the link?
TimToady it's either a Grand Idea, or a Grand Illusion, or maybe both :)
soh_cah_toa indeed, there is a "philosophical nature" to them 05:43
benabik soh_cah_toa: I closed it right after mentioning it. Not smart. Fortunately, browsers are smart enough to come with "Unclose" these days.
soh_cah_toa: strangelyconsistent.org/blog/june-2...11-classes
soh_cah_toa well, i'm heading off to bed now 05:46
take care guys
05:46 soh_cah_toa left
TimToady 2 05:47
zzz &
06:03 Bzek joined 06:04 Mowah joined, [particle] left 06:06 [particle] joined 06:10 donri left 06:29 Mowah left 06:33 Mowah joined 06:36 colomon left 06:54 masak joined
masak <benabik> masak++'s blog on Classes discusses the philosophical nature of type objects. 06:54
it does? :)
maybe it should, though.
benabik masak: "This is where I wax a bit philosophical"
masak oh, that's about classes and objects in general, not so much about type objects. 06:55
06:57 masak left 06:58 masak joined
masak turns back to his crypt 07:00
07:02 am0c joined
masak rakudo: my $a; sub bar { say $a ~~ Foo; }; role Foo {}; $a = Foo.new; bar 07:10
p6eval rakudo 72d158: OUTPUT«Could not find sub &Foo␤ in 'bar' at line 22:/tmp/mWQ8S7CUcM␤ in main program body at line 22:/tmp/mWQ8S7CUcM␤»
masak std: my $a; sub bar { say $a ~~ Foo; }; role Foo {}; $a = Foo.new; bar
p6eval std 37a0cdd: OUTPUT«===SORRY!===␤Illegally post-declared type:␤ 'Foo' used at line 1␤Check failed␤FAILED 00:01 122m␤»
masak ah, that's much better.
masak submits rakudobug
nom: my $a; sub bar { say $a ~~ Foo; }; role Foo {}; $a = Foo.new; bar
p6eval nom: OUTPUT«Could not find sub &Foo␤current instr.: 'bar' pc 569 ((file unknown):32851333) (/tmp/hvv03D3Gon:1)␤»
masak moritz: oh, and I don't know what 'my ::T $x' means. :) you'll note that diakopter found that NPMCA, which means it's high on the insanity scale. 07:15
er, meant diakopter++
07:22 drbean joined
masak method on_open { say "Opening the $.name reveals a {join " and a ", @.contents}."; } 07:23
this is fun :)
a text adventure game is a perfect way to explain event handling, too. 07:28
"you make an event handler for an object when you want that object to express some behavior as a response to a regular event."
the above on_open method sits on a role called Container. 07:29
with the current factoring, Room does Container. I didn't plan or expect that :)
but it does make sense.
07:32 odrm joined 07:41 wamba joined
mathw :) 07:41
Text adventures are fun. I used to have loads of happy hours mucking about with Inform. The idea of a language designed for writing interactive fiction is very interesting. 07:42
masak I am currently hammering out the semantics of whether things can be noticed or seen when they are inside something else.
mathw: though I've never used Inform, it seems to be an excessive (and at least partially successful) experiment in a direction I'd prefer not to go :) 07:43
it has the same dangerous "look, it's so much like natural language" quality as does COBOL and Ruby DSLs. 07:44
07:47 jack-ji left 07:48 jack-ji joined
jnthn morning, #perl6 07:49
masak jnthn! \o/ morning!
jnthn: how's the weather down there? here it's nice and cool. 07:51
jnthn Didn't go outside yet today...looks sunny but it's probably not too hot.
masak ok.
masak has to go to a teacher's planning meeting 07:52
bbl
07:52 masak left, Hansy_ joined
jnthn benabik: (HOW.instantiate_generic) that's part of the MOP that deals with specializing type-parametric things into concrete things. 07:53
07:55 Hansy_ left 07:57 Su-Shee left 07:59 _jaldhar left 08:00 _jaldhar joined 08:04 snkcld joined
snkcld are there any good sites on perl 6 / rakudo internals? 08:09
i would love to contribute to the perl compiler
08:10 Su-Shee joined
moritz welcome snkcld 08:11
snkcld thank you
moritz there's perlgeek.de/blog-en/perl-6/rakudo-overview.html for an overview, but it's slightly out of date
snkcld hmm 08:12
moritz jnthn has blogged a lot about the new internals at 6guts.wordpress.com/
snkcld oh man
moritz I recommend going through the posts in the order they were written
snkcld this is good stuff
thank you so much
moritz snkcld: you're welcome, if you have any questions, don't hesitate to ask 08:13
snkcld well, this is distro specific, probably... but i might as well give it a shot
moritz I won't be available for most of the day, but others will be
snkcld i was attempting to compile rakudo, and i did Configure --gen-parrot
or 08:14
perl Configure.pl --gen-parrot
and it said it could not find libpcre
though i do have it installed....
moritz that's a known parrot issue
a workaround is perl Configure --gen-parrot --gen-parrot-option=--without-pcre 08:15
snkcld ohhh
so, my perl code can not use regex then?
if i did that?
moritz it's been reported on gentoo and macos so far
snkcld yea, im on gentoo
moritz snkcld: no, Rakudo comes with its own grammar engine 08:16
snkcld ohh
i dont really understand what 'parrot' is, and what 'rakudo' is...
the way i see it,
moritz snkcld: parrot is a virtual machine, much like the JVM or the CLR
and Rakudo is a Perl 6 compiler that uses parrot
snkcld ok ok
so rakudo creates the bytecode that parrot executes 08:17
moritz correct
snkcld so,
moritz (though it doesn't directly create bytecode, but an intermediate assembler)
snkcld when i run: perl blah.pl, it invokes rakudo to assemble, then passes that assembly to parrot?
are parrot and rakudo help in the same binary?
or does it fork and exec 08:18
moritz the 'perl6' binary links to parrot
snkcld hmm.. that doesnt seem to be the case on my system, but i understand what you are saying 08:19
they are essentially synonymous?
links as in symlink?
moritz as in "linking object files, as the C compiler/linker does"
snkcld OH 08:20
haha ok of course
yea, so perl6 loads rakudo libraries
i mean
parrot
ok, so does it also have rakudo loaded in, to do the compilation
moritz correct 08:21
snkcld haha, that makes perfect sense
out of curiousity, what is the command to see what libraries a binary will load/
ldd or something?
moritz yep
sorear ldd. sort of.
snkcld ok i do see libparrot as a library 08:22
sorear ldd actually works by running the binary with a special environment variable that tells ld.so to dump load paths
snkcld i imagine that thats where the code resides to convert bytecode -> real code to exec
sorear DO NOT USE ON UNTRUSTED BINARIES
snkcld oh word haha ok
sorear snkcld: parrot runs bytecode directly
snkcld directly? as opposed to... ?
sorear it doesn't convert bytecode into anything 08:23
snkcld oh
ok ok
so, libparrot.so.3.3.0 contains the code to run the bytecode
sorear yes
snkcld and, the actual perl6 binary itself is effectively 'rakudo'
sorear however most of it is runtime support stuff 08:24
dalek kudo/nom: 4050741 | moritz++ | / (2 files):
Parcel.values, tests
snkcld so, in perl5 and what not, did this seperation of VM & compiler not exist?
sorear snkcld: I don't know if you've heard yet, but there are other Perl 6 implementations that try to compete with Rakudo
snkcld i have not heard, but i can imagine 08:25
did perl 5 not have the seperation that rak & par have
sorear snkcld: in Perl5 there was an internal separation between "the parser" (toke.c et al) and "the runtime" (pp.c et al)
snkcld oh
ok ok this makes sense.
so now, to change the run time, you simply link the library to a different file
sorear Perl6 takes this further by having separate repositories, indeed separate legal entities holding copyright
moritz but in perl 5 you can't (easily) dump the compiled bytecode and run it again, for example
sorear toke.c and pp.c are both owned by the Perl Foundation 08:26
snkcld ah
on gentoo, is libpcre located at a different place than other systems?
moritz no, the problem is something else 08:27
iirc that the .so file is a linker script (?), not the actual object file
and parrot can't handle that
sorear snkcld: fwiw, I'm #1 on the #2 implementation 08:28
moritz trac.parrot.org/parrot/attachment/t...7/pcre-bug
snkcld sorear, i dont understand
sorear snkcld: so if I talk a bit detachedly about Rakudo, that's why
moritz trac.parrot.org/parrot/ticket/2107
sorear github.com/sorear/niecza # this is mine
moritz snkcld: sorear leads the development of niecza, which is another Perl 6 compiler
and it's worth trying out 08:29
snkcld OH
haha
thats awesome
the underdog eh
moritz not at all
niecza does some very interesting things that rakudo doesn't
also it's a very friendly competition (at least in my eyes :-), and we do "steal" code back and forth
snkcld man 08:30
i would _love_ to help out
moritz then do :-)
sorear snkcld: competetion between implementations, a no-holds-barred race, is a poisonous meme
snkcld haha, indeed.
jnthn Also worth noting that the active Rakudo development at the moment is in the "nom" branch, not the master branch.
sorear snkcld: I've caught myself being happy over Rakudo's setbacks. And I feel so guilty afterward.
moritz bad sorear, no cookie :-) 08:31
dalek ast: a9de2f6 | moritz++ | S (5 files):
various rakudo fudges and unfudges
ast: e982a79 | moritz++ | S04-declarations/my.t:
unfudge another test for rakudo
08:31 cooper left
jnthn moritz: We regressed on the .pick/:replace one with the *%_ patch I guess 08:33
moritz jnthn: that's what I thought too
snkcld localhost ~ # cat /usr/lib64/libpcre.so | tr -d '\n' | sed 's/\/\*.*\*\///g' 08:34
OUTPUT_FORMAT ( elf64-x86-64 )GROUP ( /lib64/libpcre.so.0 )
jnthn moritz: So it was kinda a false pass before.
moritz jnthn: and I kinda think the test can go now, because the spec change is old enough
jnthn moritz: That'w what I was also going to mention...do we need this test any more :)
sorear snkcld: man strings 08:35
08:35 drbean left
snkcld haha, sorear thank you 08:35
well, the file is plain text
sorear ow
snkcld i was just sedding out everything between /* and */
sorear that's your problem!!
snkcld yea yea haha i was just reaffirming what moritz had said
moritz no, it's parrot's problem
snkcld as much as i love gentoo...
sorear yeah 08:36
snkcld X_X
sorear dlopen is a mess on Linux
snkcld so, if i was writing a compiler, i would dlopen() the library of the vm i want, then dlsym() for a function to run the code...? 08:37
then run run_the_code(my_code)
where run_the_code is in the library>
jnthn rakudo: class A { }; role R { }; my $x = A.new; $x does R; say $x.WHAT 08:38
p6eval rakudo 72d158: OUTPUT«()␤»
jnthn niecza: class A { }; role R { }; my $x = A.new; $x does R; say $x.WHAT
p6eval niecza v7-21-gbcc1cf3: OUTPUT«Unhandled exception: Retyping NYI␤ at /home/p6eval/niecza/lib/CORE.setting line 663 (CORE die @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1746 (CORE infix:<does> @ 2) ␤ at /tmp/wZmvSLcsKq line 1 (MAIN mainline @ 4) ␤ at /home/p6eval/niecza/lib/C…
jnthn pugs: class A { }; role R { }; my $x = A.new; $x does R; say $x.WHAT
p6eval pugs: OUTPUT«*** Unknown syntactic construct: Syn "does" [Var "$x",Val (VType (mkType "R"))]␤ at /tmp/VLuZBfg4yS line 1, column 41-50␤»
jnthn heh :)
sorear niecza: class A { }; role R { }; say (A but R)
p6eval niecza v7-21-gbcc1cf3: OUTPUT«A but R()␤»
jnthn aha
sorear the *only* thing you can do with roles in Niecza is mix them into type objects
jnthn yeah, I was wondering what to make the type object name look like.
sorear I guessed 08:39
jnthn Your guess was at least better than Rakudo's... :)
sorear (not coincidentally, this is exactly what STD needed)
jnthn Yeah, I figured you'd have enough for STD.
08:40 wamba left
sorear I still have a lot of confusion about how roles work in the context of $?CLASS 08:40
let me know when you have something worth stealing in nom :)
or if you want to clarify things otherwise, like what A.^does(R[2]) means 08:41
jnthn I'm getting there...still some hard problems to go.
snkcld where should i go to begin contributing to perl? what is the process? 08:42
do i prove myself, then i have the ability to push my code?
sorear haha 08:43
no
08:43 envi joined
sorear what repository(s) do you want push access to? 08:43
in #perl6-land we treat our repositories like wikis 08:44
common decency dictates that if you're unsure about a change, you should ask for input before pushing
08:44 apex_zone joined, apex_zone left 08:45 apex_zone joined, nymacro joined
sorear (sure, we can revert, but we don't like breaking the continuous integration if we can help it) 08:45
apex_zone are perl6 binary installer for windows available?
sorear They used to be 08:47
I think github was having availability issues during the time of the last release(?)
wait, you said binary
no
(not for Rakudo... hehehehe)
Parrot expects to know its install path at compile time 08:48
wait, I think we had an installer that provided that
someone else answer :/
08:50 mj41 joined
apex_zone i have tried parrot but it still error on my PC.. so, i quit learn perl, and start learn java again 08:50
:(
sorear apex_zone: try niecza :D
it has a binary Windows-compatible package :D
also, wait for moritz. ey would know if there's a current Rakudo package. 08:51
apex_zone Ok, i will try later 08:52
sorear why wait? github.com/downloads/sorear/niecza/niecza-7.zip
apex_zone Thanks for the information
yupz.. i have downloaded it 08:54
then what should i do now after it? 08:56
08:57 mj41 left
sorear run run\Niecza.exe, wait 15 seconds or so, then try say 1..5 08:57
snkcld err 08:58
is rakudo written in perl???
Tene yes, primarily
snkcld wow i had no idea 08:59
and parrot? is that in c or perl?
Tene C
apex_zone cant run niecza, there is window pop up say "the plication failed to initialize properly (0xc0000135) 09:00
snkcld so rakudo is written in perl 5 then?
Tene snkcld: Rakudo is written in Perl 6
09:00 wamba joined
snkcld i dont understand... how do you run rakudo if you dont have a p6 compiler already 09:00
Tene snkcld: we do have a Perl 6 compiler: rakudo :) 09:01
snkcld: I'll elaborate...
snkcld haha
my mind has just been blown
sorear rakudo is written in a subset-ish of Perl 6 called NQP "Not Quite Perl6"
snkcld ok ok...
sorear NQP has its own compiler
Tene snkcld: Rakudo is primarily compiled by a core written in a restricted subset of Perl 6 called NQP, Not Quite Perl. NQP is written in NQP and uses a bootstrapping precompiled stage to compile itself.
sorear NQP is written in NQP; the NQP you see is compiled using an older version of NQP 09:02
snkcld ...
sorear this regresses back maybe 50 loops
snkcld i...
this is insane
sorear then you get to an ancient version of NQP, which was written using other tools
Tene snkcld: there's a precompiled version checked into the source repository
snkcld: it's pretty standard compiler bootstrapping, actually.
sorear Parrot Grammar Engine and Tree Grammar Engine, both shipped with Parrot
Tene snkcld: GCC is largely written in C, for example. 09:03
snkcld hahaha
omg, it is
i didnt think of that
ok ok so umm
Tene sorear: nothing has used TGE in ages, afaik
snkcld when rak is being compiled,
sorear The standard joke with new programming languages is: Have you written anything large in it other than its own compiler?
snkcld NQP is used to compile the p6 code?
and NQP is a binary
Tene snkcld: nqp is used to compile the core, and the core is used to compile the rest.
sorear snkcld: half of it.
snkcld at some point
yea
but, the very first stage of NQP is binary yes? 09:04
sorear snkcld: NQP is shipped as Parrot assembly language
.pir files
snkcld OH
haha that makes alot of sense
ok so parrot executes the compiler
sorear ext/nqp-rx/src/stage0 in your Parrot copy
if you want to look at them
Tene snkcld: exactly 09:05
snkcld so stage0 is ran on parrot... at this point, we have a NQP compiler 09:06
we can now compiler p6 code?
*compile
Tene snkcld: with nqp, you can compile NQP code. NQP is a restricted subset of Perl 6. 09:07
snkcld ahhh haha
i love this
this is incredible
Tene That's enough to compile and run the core of the Rakudo compiler, though
snkcld so rakudo is written in NQP? 09:08
jnthn Yes and no
Rakudo's grammar, actions, meta-objects and so on (in nom branch at least) are written in NQP
We then use this core to build the built-ins, which are written in Perl 6.
In the master branch chunks of Rakudo are written in Parrot assembly too. In the "nom" branch, it's all NQP, Perl 6 and just a few bits of C here and there. 09:09
snkcld ok so... to execute "perl6 blah.pl"... 1)perl6 binary links in parrot 2) parrot runs stage 0 3) each next stage is ran by the previous stage 4) on the last stage, we can compile rakudo into parrot assembly 5) rakudo is executed and runs the blah.pl file? 09:13
Tene snkcld: no; compiling rakudo generates parrot bytecode.
jnthn snkcld: As an exmaple, github.com/rakudo/rakudo/blob/nom/...Grammar.pm is the parser, written in NQP. github.com/rakudo/rakudo/blob/nom/...lassHOW.pm is the bit of code that determines how a class works, written in NQP. github.com/rakudo/rakudo/blob/nom/...ore/Str.pm is a big chunk of the Str (string) built-in class, written in Perl 6.
Tene so 'perl6 blah.pl' is more like the following:
parrot loads perl6.pbc, which reads and compiles the file, and then runs the generated program 09:14
so, the bootstrapping steps are only involved when compiling rakudo itself
snkcld OH
of course, of course haha
Tene :)
snkcld haha
09:14 nothingmuch left
snkcld rakudo in the end is parrot bytecode then 09:15
09:15 jferrero left 09:16 jferrero joined
snkcld rather, rakudo is perl6.pbc? 09:16
jnthn Yes, that contains the results of compiling Rakudo 09:18
It's what gets run
perl6 executable just embeds that PBC file
snkcld so given only a C compiler, we can generate rakudo and parrot
because we compile, _from_ C, a stage-0 09:19
which steps us up towards per
l
09:19 kaare_ joined
Tene snkcld: rather, given a c compiler, we can compile parrot (and the C-only parts of rakudo), which can run perl6.pbc 09:22
09:23 colomon joined, colomon left
snkcld interesting 09:24
perl6.pbc is stage 0?
map { $_ ** 2 } ? 09:30
OH
nevermind, i assume ** is raise to power of
apex_zone someone know where to download rakudo like compiler
09:31 apex_zone left
tadzik good morning #perl6 09:34
09:35 Trashlord joined
jnthn on nom bacon 09:42
o/ tadzik
09:47 snkcld left 09:48 am0c left 09:51 colomon joined
tadzik two new people the same night, how exciting :) 09:52
09:55 colomon left
sorear out 10:07
10:22 Chillance joined 10:32 Mowah left 10:34 takesako_ joined 10:46 takesako_ left 10:47 nymacro left 10:48 im2ee joined 10:57 takesako_ joined
dalek p: dbc9e77 | jonathan++ | src/ops/nqp.ops:
Add repr_change_type op, for asking the repr to do a type change on the object.
11:04
p: 6ace072 | jonathan++ | src/6model/reprs/P6opaque.c:
Implement change_type for P6opaque.
kudo/nom: ec206d6 | jonathan++ | tools/build/NQP_REVISION:
Bump NQP_REVISION to get repr_change_type support.
11:08
kudo/nom: 6503f6b | jonathan++ | / (3 files):
First sketch of mixin support.
kudo/nom: 5349d59 | jonathan++ | src/core/operators.pm:
First, though basically working, implementation of does and but operators. Undertested so far - there will be bugs.
11:11 takesako_ left, takesako joined 11:14 Kivutarrr joined
dalek odel: e849201 | (Martin Berends)++ | c/ (4 files):
odel/c] start Configure.bat and MSVC support - incomplete
11:16
11:26 _jaldhar left 11:27 _jaldhar joined 11:43 wamba left 11:51 drbean joined 11:53 Moukeddar joined 11:55 MayDaniel joined 11:57 masak joined
masak rehi #perl6. 11:57
11:57 _jaldhar left
tadzik cześć masak 11:57
masak cz 11:58
11:58 _jaldhar joined
masak nice to see someone new (snkcdl) find #perl6. 11:58
er, snkcld.
I have a newbie question: have Array, want List. what do I do nowadays?
rakudo: say [1, 2, 3].perl; say [1, 2, 3].WHAT 11:59
p6eval rakudo 72d158: OUTPUT«[1, 2, 3]␤Array()␤»
12:03 birdwindupbird joined
tadzik masak: any idea how can I do proper split(/regex/) in nqp, without reimplementing split? 12:04
in nqp, aka in Actions.pm
masak a while loop and /regex/? 12:05
something like that.
tadzik yeah, probably
masak the "without reimplementing split" is a tricky clause, if what you want is split semantics :P
tadzik :)
masak tadzik: any idea how to turn an Array into a List?
tadzik handling tables in nqp is madness
masak: sorry, I can't really distinguish these two :P 12:06
not Array.list at a chance?
masak List is the one with soft parentheses, Array is the one with hard brackets.
rakudo: say [1, 2, 3].list.perl
p6eval rakudo 72d158: OUTPUT«[1, 2, 3]␤»
tadzik yeah, the visual difference is ok :)
masak rakudo: say [1, 2, 3].list.WHAT
p6eval rakudo 72d158: OUTPUT«Array()␤»
tadzik :P
masak that used to work, I'm sure.
nom: say [1, 2, 3].list.perl; say [1, 2, 3].list.WHAT 12:07
p6eval nom: OUTPUT«Array.new(1, 2, 3)␤Array()␤»
masak this is such a blatant regression that I'm thinking I might have missed the latest fashion in List/Array semantics.
hence my newbie question.
jnthn masak: Why are you worrying, ooc?
masak: If you're asking "I want type X" then I guess you must have in mind something specific about List as opposed to Array. 12:08
masak jnthn: is the question equivalent to "why do you even want to make a List from an Array?"?
jnthn masak: right
masak: Like, are you after flattening, for example?
.list is a contextualizer rather than a coercer
masak jnthn: yes, I have an any() call, and I want to flatten the arguments, some of which are arrays. 12:09
jnthn nom: for [1,2,3] { say "loop" }
p6eval nom: OUTPUT«loop␤»
jnthn nom: for [1,2,3].list { say "loop" }
p6eval nom: OUTPUT«loop␤loop␤loop␤»
Moukeddar masak, Da MAN!
masak the only thing I found so far that works is .map({$_})
Moukeddar: hello, person of vigorous greetings.
jnthn nom: say 1 == any([1,2,3].list)
p6eval nom: OUTPUT«any(Bool::True, Bool::False, Bool::False)␤»
jnthn Looks like .list works fine
nom: say 1 == any([1,2,3].flat)
Moukeddar my Specialty :) 12:10
p6eval nom: OUTPUT«any(Bool::True, Bool::False, Bool::False)␤»
masak nom: say 1 == any([1,2,3])
Moukeddar how are you doing?
p6eval nom: OUTPUT«any(Bool::False)␤»
jnthn Flattening is orthogonal to type, afaiu.
masak jnthn: ok, so it flattens but there's no exterior sign of it?
Moukeddar: I'm ok. I fled southern Sweden because it was too hot. up here it's cooler.
jnthn "exterior sign"? :)
masak Moukeddar: how're you? 12:11
jnthn But if you want a type change, then no...
masak jnthn: yes, I do .list or .flat, and it's still an Array.
jnthn Right.
Moukeddar lazy and out-of-focus
masak jnthn: and .perl still looks the same.
tadzik $row ~~ /\s+/; my $n := $/.to; -- how do I do something like this in nqp? nqp doesn't set $/ it seems
oh, there's a bug too, but nvm :)
jnthn masak: Maybe the .perl looking the same is dubious.
tadzik: my $match := $row ~~ /\s+/; 12:12
masak tadzik: just bind the match to a variable?
jnthn $match.to ...
tadzik oh, ok
jnthn No, we don't do implicit $/ setting in NQP
masak jnthn: I was surprised by it.
jnthn Not sure we will.
nom: [1,2,3].perl
p6eval nom: ( no output )
tadzik seems that we don't, "$/ not predeclared bla bla"
jnthn nom: [1,2,3].perl.say
p6eval nom: OUTPUT«[1, 2, 3]␤»
jnthn nom: [1,2,3].flat.perl.say
p6eval nom: OUTPUT«Array.new(1, 2, 3)␤»
jnthn nom: [1,2,3].list.perl.say
p6eval nom: OUTPUT«Array.new(1, 2, 3)␤»
jnthn masak: huh, looks rather different to me :)
masak jnthn: in nom, yes. 12:13
jnthn masak: oh
12:13 Mowah joined
masak out here in the *real world*... 12:13
:P
jnthn You weren't talking about nom
Right
:)
OK, then I don't know. :)
But..."fixed in nom!" :)
masak you people and your ivory tower branch... :P
jnthn :P
masak: You'll be happy to know it does proto auto-gen now for multis :) 12:14
12:14 wamba joined
masak wow, cool! 12:14
jnthn masak: So you don't have to pollute your multi code with protos ;)
masak jnthn++, I s'pose.
yay
jnthn nom: multi fac(0) { 1 }; multi fac($n) { $n * fac($n - 1) }; say fac(5)
p6eval nom: OUTPUT«120␤»
jnthn nom: multi fac(0) { 1 }; multi fac($n) { $n * fac($n - 1) }; say &fac.signature 12:15
p6eval nom: OUTPUT«:(Mu)␤»
jnthn oh, Signature.perl doesn't really work yet...
masak how is .signature computed?
jnthn masak: It's always |$
masak ah, convenient.
jnthn masak: If you want a more specific one, we leave you to nail it down yourself. 12:16
masak that's on the level of detail saying "lol, I'm a signature" :)
Moukeddar: have you tried my adventure game yet?
jnthn nom: multi fac(0) { 1 }; multi fac($n) { $n * fac($n - 1) }; say &fac.is_dispatcher 12:17
p6eval nom: OUTPUT«Bool::True␤»
masak Moukeddar: perfect for a lazy, out-of-focus day in the heat ;)
jnthn: ah, so a routine knows if it's a proto. nice.
Moukeddar i've been busy lately, putting myself together
masak I see.
12:18 daniel-s left
Moukeddar rough week, 12:18
12:19 MayDaniel left
tadzik does nqp have something like .__dump now? 12:20
istr there was something like this
masak tadzik: github.com/perl6/nqp/commit/855763...4b33da4db3 12:22
12:22 Mowah left
tadzik int eresting; masak++ 12:23
12:26 frettled left 12:27 frettled joined 12:28 Mowah joined 12:37 wamba left
masak nom: for [1, 2, 3] { say "!" } 12:41
p6eval nom: OUTPUT«!␤»
masak nom: for [1, 2, 3].flat { say "!" }
p6eval nom: OUTPUT«!␤!␤!␤»
masak rakudo: for [1, 2, 3].flat { say "!" }
p6eval rakudo 72d158: OUTPUT«!␤!␤!␤»
masak rakudo: my @a = "foo", ["foo"], [["foo"]]; my %h = "foo" => 42; say %h{@a}.perl 12:46
p6eval rakudo 72d158: OUTPUT«(42, (42, ), ((42, ), ))␤»
masak interesting new behavior. 12:47
jnthn o.O
jnthn wonders if nom does that too
masak nom: my @a = "foo", ["foo"], [["foo"]]; my %h = "foo" => 42; say %h{@a}.perl
jnthn nom: my @a = "foo", ["foo"], [["foo"]]; my %h = "foo" => 42; say %h{@a}.perl
12:47 tokuhir__ left
p6eval nom: OUTPUT«(42, (42,), ((42,),))␤» 12:47
jnthn cute :) 12:48
masak I can't tell if it's right or wrong, because I don't grok lols and slices well enough.
jnthn Let's...call it a feature. :D
masak nom: my @a = "foo", ["foo"], [["foo"]]; my %h = "foo" => 42; say %h{@a}.flat.perl
p6eval nom: OUTPUT«(42, 42, 42).list␤»
masak ah, .flat smoothes things over. :) 12:49
tadzik nqp: my $str := "foo bar asd zebra"; my $match := $str ~~ / (\w+) ** \h+ /; for $match[0] { say($_) }; # poor man's split() :) 12:50
p6eval nqp: OUTPUT«foo␤bar␤asd␤zebra␤»
masak tadzik++
tadzik I don't know thy it's $match[0] though 12:51
why
masak tadzik: what about the corner cases? empty string, string with just whitespace, whitespace at the beginning, whitespace at the end?
jnthn tadzik: Becuase (...) is the zeroth capture
masak tadzik: it's $match[0] because that's where (\w+) ends up.
12:51 tokuhir__ joined
tadzik oh, ok 12:51
masak now, what about the corner cases? :) 12:52
tadzik masak: all about leading whitespace is covered before
let's see that one
nqp: my $str := " foo bar asd zebra"; my $match := $str ~~ / (\w+) ** \h+ /; for $match[0] { say($_) }; # poor man's split() :)
p6eval nqp: OUTPUT«foo␤bar␤asd␤zebra␤»
tadzik win :)
masak \o/
jnthn Sure, it's not anchored at the start of the string, nor the end :)
masak oh, troo
tadzik encountered with a problem, I used regexes. Now what? :P 12:53
masak it's essentially a ratchet, not an eager.
tadzik: make it ratchet, and save some memory :P
tadzik :ratchet?
masak think so. 12:54
tadzik nqp: my $str := " foo bar asd zebra"; my $match := $str ~~ / :ratchet (\w+) ** \h+ /; for $match[0] { say($_) }; # poor man's split() :)
p6eval nqp: OUTPUT«foo␤bar␤asd␤zebra␤»
tadzik wfm
masak the difference, internally, is that an eager quant builds up a list of failpoints.
which are then used when things start to backtrack.
but your thing never backtracks.
tadzik yeah, I read about that in Mastering Regexes
I still have this on my shelf, I hope the librarian won't kill me 12:55
masak I haven't read that book, but I think I got an equivalent dosage by implementing GGE :)
tadzik :)
probly
masak still haven't blogged about PGE. it was a fun project, though.
tadzik PGE, GGE?
masak time to implement an inventory in crypt! :)
jnthn Do you have to invent it first? 12:56
tadzik I wan't to blog about "look how fun Pod is" in the near future
masak tadzik: PGE: pmichaud++'s old grammar engine.
tadzik I see
masak tadzik: GGE: masak's port of it to Perl 6.
(PGE was in PIR)
jnthn: invent? O RY?
tadzik yeah, I just wondered if you made a typo or just changed the topic :)
alias :w='echo vim is on another window' 12:57
how would I survive without this :)
masak tadzik: the 'P' stands, as always, for "pmichaud's". the 'G' stands for "glacial" :P
tadzik :)
or maybe for masag :) 12:58
masak acronyns, your doin it rong.
acronyms*, even
tadzik ronk?
okay, I still see no conclusion about formattingcodes!
any better way than pod_string { [ . || <formattingcode> ]+ }?
this looks ugly, but maybe it's the best we can do 12:59
masak what's wrong with that?
huh, wait.
tadzik I just don't like this
masak rhs of || will never match, right?
tadzik wouldn't it be just grossly inneficient? I mean, for ...
of course, another way around, sorry
masak "the other way around" :)
tadzik so, for every character in pod documentation a lookahed, bleh
not the first one probably 13:00
masak tadzik: I think it's either that or post-processing.
tadzik: did you take a look at STD's nibbler?
tadzik post-processing is not an option
and would result in exactly the same thing, but in different moment :)
masak: no, what's that?
masak tadzik: TimToady mentioned it in yesterday's backlog.
have a look, I implore you.
tadzik looks 13:01
masak because you are fundamentally solving the same problem: that of escaped things in a delimited piece of code.
tadzik working on rakudo, and doing even only 'make perl6' from time to time gives me so much free time :)
"just like the quote nibbler does" that's the only thing I see 13:02
what is that thing?
masak it's the thing in STD that eats text until it finds a real terminating... whatever. 13:03
tadzik a tokenizer?
masak no, not really.
an... eater. :)
the thing you're trying to do just now.
nibble away at text until you find something interesting.
tadzik oh, ok
masak just look at the code, grok it, and see if there's something to take away from it. 13:04
tadzik wo, a big thingy
I'll finish tables first, the hardest case is still before me
masak :)
interesting. the verb 'take' is an operation on the thing's container, not on the thing itself. 13:05
that... complicates matters somewhat.
tadzik to nom, or to hack 13:06
looking at my 60 kgs of weight, I can sell what's the usual decision :( 13:07
masak o.O
tadzik: eat! we need more of you than that! :) 13:08
tadzik :)
bad metabolism, be more lazy
13:10 REPLeffect left
pmichaud good morning, #perl6 13:10
masak good morning, pm. 13:11
tadzik good morning pmichaud
13:11 icwiener joined 13:19 daniel-s joined 13:23 REPLeffect joined
masak besides the method returning something non-Nil, is there a good way to know whether $o.?foo actually called a .foo ? 13:31
13:31 Moukeddar left, mberends joined
masak I'm asking because I have a case where it would be good to know, but I don't want to institute a policy where all such methods return something non-Nil. 13:31
so far I've settled on 'try { $o.foo; $found = True }', but I can't say I like the solution much. 13:32
jnthn masak: .can
masak ooh :)
jnthn++ masak-- # obvious, really
mberends good *, *
tadzik good afternoon Martin :)
masak mberends! \o/ 13:33
jnthn hi mberends :)
See you've been hacking on 6model/c :)
masak unless $thing.can($verb) { # jnthn++ 13:34
13:34 Moukeddar joined
mberends :-) programming for MSVC is a dubious pleasure, or maybe it's just that I'm re-become a Windows n00b 13:34
masak I'm told that IDE is quite polished, though.
jnthn mberends: It's a bit of a C89 zealot, that's all. :) 13:35
masak rakudo: say "OH"; return; say "HAI"
p6eval rakudo 72d158: OUTPUT«OH␤»
masak can I ticket this?
tadzik niecza: say "OH"; return; say "HAI"
p6eval niecza v7-21-gbcc1cf3: OUTPUT«OH␤Unhandled exception: Illegal control operator: return␤ at /tmp/N2x5JTt4aS line 1 (MAIN mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1891 (CORE C887_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1892 (CORE module-CORE @ 54) ␤…
masak "works in nom", yes :) 13:36
tadzik then don't bother :P
masak disobeys and submits rakudobug
tadzik masak: tag it with 'workswithnom' or something
jnthn nom: say "OH"; return; say "HAI" 13:37
p6eval nom: OUTPUT«OH␤Attempt to return outside of any Routine␤current instr.: 'die' pc 375291 (src/gen/CORE.setting.pir:91463) (src/gen/CORE.setting:204)␤»
masak oh!
that wasn't nom above, was it? :)
jnthn :P
tadzik you said you know that it works with nom
tadzik confused
masak I guess I didn't know. :)
sorear: something that doesn't start with "n" :P 13:38
(as in, new name suggestion for nom)
for niecza! dammit!
tadzik miecza!
phenny: "miecza"?
phenny tadzik: "sword" (pl to en, translate.google.com)
tadzik well, it's rather "sword's" 13:39
mberends jnthn: did you know there was an ICU for Windoze? It was news to me. site.icu-project.org/download/48#ICU4C-Download
masak *and* it's much easier to remember than "niecza". oh wait. :P
13:39 wamba joined
jnthn mberends: ooh :) 13:39
pmichaud masak/mberends: jnthn and I have been discussing timing of star releases 13:40
we could use your opinions
masak ooh
mberends jnthn: I'm going to try to integrate it with 6model/c in both Win and Unix versions
pmichaud we'd like to have a nom-based star release before yapc::eu
mberends pmichaud: ah
pmichaud but it's unlikly (and perhaps unwise) to do that for the july release 13:41
masak pmichaud: oh, so it's still "Star"?
pmichaud doesn't have to be "Star", no.
a distribution release, though.
masak right.
I kinda figgered, if nom isn't "next boosting step", what is?
hence, new name.
pmichaud i.e., when we get to yapc::eu, we'd like to tell people "if you want to play with the latest Perl 6 goodness, download <insert nom-based thingy here>" 13:42
mberends I'd prefer to put the brakes on inventing more new names
pmichaud mberends: I'm wondering if putting the brakes on names is a premature stabilization 13:43
it's still "Rakudo", after all.
masak right. 13:44
mberends but we should not re-use the Star name if what we're releasing is not at least as well supported by modules.
masak people liked "Rakudo Star". maybe they'll perk up when they hear "Rakudo <next great thing>"
pmichaud the upside of a new name is it gives us ability to "break" somewhat with the Star ecosystem. the (big) downside of a new name is that we have to explain the difference. :)
mberends there is too little time now to port y 13:45
* the modules from earlier Stars
pmichaud oh, I should mention that we were thinking that the new distribution release (named "Star" or other) would be second week of august, not last week of July.
i.e., right before yapc::eu
masak right. 13:46
pmichaud that gives a little more time for module portage and the like.
(which might still not be enough time :)
mberends from a contributor perspective Star was an almost year long process, with a roadmap.
13:47 drbean left
jnthn Also important is making sure panda and pes work on nom. 13:47
tadzik I'll handle that
mberends and Zavolaj 13:48
tadzik yes
pmichaud anyone have a time estimate for how long it might make for modules to work with a nom-based system?
*might take
are we talking weeks, months, ... ?
masak I actually have the impression that breakage won't be so bad. 13:49
tadzik pmichaud: depends on the nom state
masak oh! true.
pmichaud tadzik: well, I'm assuming that nom has become master by the July release.
masak right, depends on where we regress.
tadzik if it'll be as-complet-as-master, that's a matter of hours, maybe days
pmichaud and that it's in the same order of capabilities as nom.
masak seems that regressions will be hard to predict. 13:50
tadzik writing panda from scratch would be a matter of hours, I don't think porting will be harder :)
masak pmichaud: what tadzik said. a concerted effort might ensure everything works in the span of a weekend.
tadzik mumbles something about a hackathon
pmichaud It wouldn't bother me too much if we did that concerted effort at the yapc::eu hackathon. 13:51
(if we had to.)
tadzik not the during-yapc one, I think before, even on irc
to have everything tip-top til yapc
pmichaud then release the new distribution on Sunday before yapc::eu
jnthn The main thing I'm seeing in panda is that it really wants IO/exteranl calling stuff to work (which shouldn't be too hard to get back) and it also uses deferral quite a bit (which is harder)
pmichaud I think IO isn't a difficult blocker.
tadzik deferral?
jnthn nextsame, etc 13:52
pmichaud tadzik: yes, a hackathon before then could be made to work also, if we can figure out a time for it.
tadzik oh, right
pmichaud oh, I susepct we need nextsame to work before nom->master
tadzik that can be worked around though, methinks
mberends I personally expect to have time for hacking around yapc:eu, but will probably not go to Riga. I'll see whether moritz might be in the same situation and go to Erlangen.
pmichaud nextsame is pretty core.
masak +1 13:53
jnthn Yeah, difficult too :)
pmichaud not having nextsame would be too big a regression, I think -- especially since that's the canonical answer to "how do I call my parent's method?" 13:54
jnthn *nod*
I'll try and sort it out before $vacation.
pmichaud okay.
the other question is the timing of the July Star release. 13:55
jnthn Mostly it's tricky because I can't do it anything like I did last time around.
So need to completely redesign it.
pmichaud There will unboutedly be a Star release in July based on the 2011.06 release of Rakudo.
There's no reason it has to take place the last week of July -- we could push it a little early this month, to give more time/space before whatever nom-based distribution we create in August. 13:56
also we might be able to identify important changes and/or deprecations that people might want to be aware of
s/unboutedly/undoubtedly/ # boy did I mistype that one :) 13:57
13:58 pmurias joined
pmichaud opinions on this would be welcome also 13:58
jnthn things giving people deprecation warnings is useful
pmichaud I'm worried we might not know what to warn about until nom->master :)
(which implies a late-July release, which is fine)
jnthn Of note, we do know about a lot of the non-regression deprecations. 13:59
Like, .new behaving differently
Attribute changes
and so forth
pmichaud we need to collect those tidbits somewhere
jnthn indeed 14:00
14:00 Mowah left 14:01 Chillance left
pmichaud anyway, if anyone has any more thoughts/ideas on the subject, please send me a message (phenny, email, backlog notes, whatever) 14:05
mberends ok (bit afk atm)
pmichaud I completely agree with mberends that if we continue to use the Star name there should not be any significant regress 14:06
14:06 birdwindupbird left
pmichaud I also think a bring-modules-up-to-speed hackathon could be really worthwhile. 14:06
masak agreed. 14:07
mberends +1
masak (but I also think we should look for a name that's not Star)
mberends Nova 14:09
masak it's cute, but hard to follow up on. "Interstellar Dust"? :P
jnthn "Doesn't go" - nah. It goes!
pmichaud I'm tentatively thinking module hackathon can be either the weekend of Jul 30 (preferred) or Aug 6 (if we're not able to do the 30th) 14:10
mberends wfm, maybe even with a trip to .de or .se 14:11
pmichaud since the "Star" also meant "Whatever", we're free to move outside of the celestial realm for names if we wish :) 14:12
naming ideas always welcomed 14:13
I need to get back to hacking for a while -- bbl
masak mberends: you're welcome to .se -- would be great!
14:14 wamba left, buubot_backup left
mberends masak: \o/ 14:14
14:14 wamba joined
masak "Rakudo Hyper" -- it's not so lazy anymore. :P 14:14
flussence Rakudo Guillemot? :)
masak point taken. 14:15
flussence
.oO( this would be much easier if we had a time machine; release with a crap name, then go back and rename it to whatever the most "They should've named it $x" complaints say :)
14:16
pmichaud
.oO( Perl 6 would be much easier with a time machine... release it with most of the features missing.... :)
14:17
masak flussence: but wouldn't that create an unstable loop in the continuum?
mberends lue++ has been to the future a couple of times, maybe he can remember what people are going to say ;)
flussence can't say for sure, it's pretty hard to apply TDD to a time machine... 14:18
14:18 Chillance joined
TimToady if loops go unstable they just bifurcate the universe so we never see 'em :) 14:18
masak flussence: "Test First... but not necessarily in that order." :)
jnthn mberends: You're welcome to crash here in .se also
masak mberends: yes, crash at jnthn's place. his apartment has several rooms. :) 14:19
jnthn Yes, but the kitchen and bathroom aren't very crashable :P
tadzik :) 14:20
jnthn My place in BA was *awesome* in terms of space :)
masak ooh! $inventory is a Container! :) nice!
mberends jnthn: cool. I was thinking about hacking 6model, but that can wait until after yapc::eu
tadzik mberends: what about popolnik?
jnthn mberends: I'm sure we can discuss that some too :)
mberends tadzik: (blush) almost totally forgotten 14:21
tadzik (:
mberends (my London host is porting biggishint.c to... Excel !?) 14:22
masak o.O 14:23
tadzik wut
jnthn O.O
14:24 MayDaniel joined
pmurias what's biggishint.c? 14:27
14:27 Moukeddar left
mberends pmurias: a fairly high precision integer math library, see github.com/jnthn/zavolaj/tree/master/examples 14:28
14:30 Moukeddar joined
masak nom: sub foo($ = 0) { say "OH HAI" }; foo; foo(5) 14:34
p6eval nom: OUTPUT«OH HAI␤OH HAI␤»
masak just checking :) 14:35
14:37 buubot_backup joined
masak text adventure games are complicated. ;) 14:37
14:37 mberends left 14:39 mberends joined
pmurias masak: are you writing one? 14:41
masak pmurias: yes, for the June 29 and June 30 posts on my blog.
(yes, I'm slightly late)
14:46 mberends left 14:52 van7hu joined
van7hu hi 14:52
masak hi, van7hu
flussence Is there any way to get nom to work when I'm not running it from `./perl6`? I get «"load_bytecode" couldn't find file 'Perl6/Grammar.pbc'» if I'm not in the same directory. 14:54
jnthn flussence: Only if make install works
14:55 wamba left
flussence doesn't seem to be an error there... I'm using --gen-parrot if that makes a difference, neither the perl6 in the top level dir or the one in install/bin works. 14:56
tadzik I found my attempts to make it work in my git stash recently
masak flussence: you need to 'make install' in order to run from anywhere. 14:57
flussence yeah, but I've tried that :( 14:58
15:02 MayDaniel left
masak flussence: seems there is some known problem with 'make install' on nom. I don't know more about it, though. 15:04
15:04 shinobicl joined 15:05 Moukeddar left, Moukeddar_ joined 15:06 [perlhack] joined 15:07 wamba joined
tadzik flussence: I was working on that, and brought to it to a state when you could either have nom working with in then nom directory or outside it, not by any chance in both :( 15:07
15:11 mberends joined, wamba left 15:19 mberends left 15:20 Moukeddar_ left
masak the adventure game just crept over 400 lines of code. 15:26
it's getting marginally fun to play, too :)
tadzik (: 15:28
15:29 JimmyZ joined, shinobicl left
JimmyZ good evening, #perl6 15:29
tadzik does |@foo flatten @foo by any chance? 15:33
masak tadzik: yes...? :)
tadzik ...crap :)
15:34 mberends joined
tadzik my $insides := $*ST.add_constant('Array', 'type_new', |@content);, @content is array of arrays. How do I keep it this way? 15:34
nom: my $a = Array.new([1, 2], [3, 4], [5, 6]); say $a.perl
p6eval nom: OUTPUT«[[1, 2], [3, 4], [5, 6]]␤»
tadzik nom: my @a = 1, 2; my @b = 3, 4; my $c = Array.new(|@a, |@b); say $c.perl 15:35
p6eval nom: OUTPUT«[1, 2, 3, 4]␤»
tadzik yeah, that's the thing
nom: my @a = 1, 2; my @b = 3, 4; my $c = List.new(|@a, |@b); say $c.perl
p6eval nom: OUTPUT«(1, 2, 3, 4).list.item␤»
tadzik nom: my $a = 1, 2; my $b = 3, 4; my $c = Array.new(|@a, |@b); say $c.perl 15:36
p6eval nom: OUTPUT«Symbol '@a' not predeclared in <anonymous> (/tmp/ihC6i7FTY7:1)␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (compilers/pct/src/PCT/HLLCompiler.pir:107)␤»
tadzik nom: my $a = 1, 2; my $b = 3, 4; my $c = Array.new(|$a, |$b); say $c.perl
p6eval nom: OUTPUT«Method 'ARGLIST_FLATTENABLE' not found for invocant of class 'Int'␤current instr.: '_block1002' pc 131 ((file unknown):39995992) (/tmp/KE75cB4y0d:1)␤»
tadzik :)
jnthn?
masak nice YAPC::NA post. babyl.dyndns.org/techblog/entry/ash...le-part-II
contents: TimToady's huggable talk, Abigail making a talk that sounds over-the-top but is sincere. 15:37
15:37 man joined
masak man! 15:37
man: am I tired today :P
man take a nap 15:38
=D
masak yeah :)
man I'm looking for introductory material on perl 6 15:39
masak man: you're in the right place!
man interested in OO features it has
masak man: there's the advent calendar, which contains lots of examples. 15:40
man: the end of my blogging month at strangelyconsistent.org/ talks about OO.
man nice, I gonna take a look at it
masak man: beyond that, I think I'd need to know what level you're at and what your expectations are.
perl6advent.wordpress.com/ 15:41
man I'm new to perl at all, just started reading something about, I saw perl 6 is even better then 5 is
masak ok. that's true from some angles and not from others. :) 15:42
just so you know.
here, let me show you some OO:
man but I'm not sure if it will be better to start learning perl 5 and then lern perl 6
or go straight to perl 6
masak rakudo: class A { has $.x }; my $a = A.new(:x(42)); say $a.x
p6eval rakudo 72d158: OUTPUT«42␤»
masak man: either path is possible. I learned Perl 5 first and then Perl 6, basically. but learning one often helps in learning the other, because they are similar in some ways. 15:43
man good to know 15:44
masak rakudo: role Foo { method foo { say "foo!" } }; role Bar { method bar { say "bar!" } }; class C does Foo does Bar {}; my $c = C.new; $c.foo; $c.bar
p6eval rakudo 72d158: OUTPUT«foo!␤bar!␤»
man but, one question, perl 6 is at development stage yet?
jnthn tadzik: my $a = 1, 2 parses as (my $a = 1), 2
masak man: yes, it's definitely at development stage.
man when it will come to the wild? 15:45
masak man: what you see me running above is an actual Perl 6 implementation.
man: it's in the wild, man!
mberends man: p6 has much more OO in the core, p5 had OO kinda bolted on. but for production, p5 already has 10000's of modules, p6 only a handful.
masak man: the URL to my blog that I gave you -- that blog is running Perl 6.
man I saw, perl 6 is much better on OO
tadzik jnthn: okay, but how do I make an array of arrays with add_constant? 15:46
masak man: well, Moose (for Perl 5) is pretty cool too. but it's not built in.
in Perl 6, OO runs all the way down.
man advent calendar seems nice 15:48
masak keep in mind that there are two years' worth of material.
man \o/ 15:49
masak I mean, so you don't miss the 2009 stuff. it's often about more basic features.
man I liked perl, because it feels like programming language itself, kind of strange, but seems productive 15:50
masak I know what you mean :)
man with some strange stuff that is different from other languages
masak there's a list of 2009 posts, but it's way over at the start of the blog: perl6advent.wordpress.com/2009/12/0...-calendar/ 15:51
man you know, something that only programmers understand :)
tadzik isn't that typical for programming languages?
masak yeah :)
Day 11 is about classes.
man not a language that other people can understand but makes programmers life harder
masak tadzik: you mean that Perl isn't the only programming language for programmers? heresy! :P 15:52
man like shell script, very strange, but nice when you know it
tadzik man: harder?
jnthn tadzik: Add each array, then call add_constant for array with a |@arrays. Note that NQP *@foo is really like Perl 6 **@foo 15:53
tadzik jnthn: that's what I did. Will paste the code
jnthn tadzik: oh, did they end up getting up flattened? :) 15:54
masak ooh -- 'take X' is just a special case of 'put X in inventory' :)
tadzik jnthn: gist.github.com/1074641
yep
masak and 'drop X' is just a special case of 'put X in the current room'...
jnthn tadzik: heh, splat.
masak unifications++ \o/
tadzik jnthn: hm? 15:55
jnthn tadzik: Thinking how best so solve it.
tadzik ok
jnthn tadzik: I mean, the easy way is to just call .item on every one of the arrays before the final .add_constnat call 15:56
tadzik: but...darn, that won't work
tadzik: All itemization is, is wrapping things in a Scalar 15:57
tadzik: It's like you want to write $*ST.itemize or $*ST.scalar_wrap or some such.
tadzik mhm
jnthn I think that's gonna be your best bet. 15:59
15:59 cooper joined, shinobicl joined
tadzik so I need to write something like this? 15:59
jnthn tadzik: yeah 16:00
tadzik oh gosh.
jnthn It should find_symbol(['Scalar']), repr_instance_of it and then bind the $!value to the thing you pass it to itemize
Then the deserialization code for doing that 16:01
tadzik piece of cake
16:01 man left, kaare_ left
tadzik ok, let's try 16:02
jnthn tadzik: gist.github.com/1074649 # totally untested 16:03
16:04 _jaldhar left 16:05 _jaldhar joined
tadzik and now .add_event(:deserialize_past()), or something? 16:06
hmm. It just worked
tests pass, and everything
16:07 daniel-s left
tadzik jnthn: what do I need this deserialization stuff for? 16:09
16:11 mberends left 16:13 thou joined
shinobicl hi, is there a way to use the perl5 "prove" with perl6? 16:14
tadzik sure, we use it all the time
just make it prove -e perl6
masak shinobicl: yes, with a sufficiently new version of Test::Harness.
3.16 or something.
16:15 zby_home_ joined 16:17 MayDaniel joined
jnthn tadzik: pre-compilation 16:18
tadzik: So you could always leave it for now
shinobicl mmm. i got an "open3: exec of perl6 failed" error 16:19
masak shinobicl: do you have perl6 in your $PATH? 16:20
shinobicl no, just an alias.... thanks masak :)
masak that's probably it, then :)
16:22 van7hu left 16:25 JimmyZ left 16:26 mberends joined 16:27 am0c joined 16:29 whiteknight joined 16:30 MayDaniel left
masak rakudo: class A { method foo { self.?bar(42) }; method bar(Num) { say "never binds" } }; A.new.foo 16:33
p6eval rakudo 72d158: OUTPUT«Nominal type check failed for parameter ''; expected Num but got Int instead␤ in 'A::foo' at line 22:/tmp/cwVHizvWvX␤ in main program body at line 22:/tmp/cwVHizvWvX␤»
masak jnthn: bug?
jnthn no 16:34
masak note the ?
jnthn noted
masak I'm missing something, then.
jnthn you didn't fail to dispatch
you failed to bind to what the dispatcher found 16:35
masak oh.
noted.
will remember that :)
moritz so with a 'multi method' it should just return Nil?
masak rakudo: class A { method foo { self.?bar(42) }; multi method bar(Num) { say "never binds" } }; A.new.foo 16:36
p6eval rakudo 72d158: ( no output )
moritz \o/
masak \o/
jnthn I'm, er
Not convinced that's going to work with the new multi semantics.
masak :)
why not?
jnthn So far as the method dispatcher cares, it dispatched just fine to a proto.
It's the multi-dispatcher that the proto delegated to that then failed.
masak .oO( it shouldn't be called "whenn't", it should be called "wunless"! ) 16:37
jnthn We went the way of separate dispatchers.
This is one of the negatives.
masak jnthn: agree.
jnthn Though the positives generally make it worth doing.
16:37 wamba joined
masak it's probably saner in the long run. 16:37
jnthn yeah
.?foo is really useful if you may have a method to call based on something being mixed in or not mixed in. 16:38
I don't think we want to go down the route of .?foo suppressing exceptions that happen to the thing that was dispatched to though.
Especially then "try" is available in blockless form.
masak nodnod
I've already worked around it. :) it's better this way. :) 16:39
when Car { say "Great. Now your car is full of leaves." }
:P
masak plays the game and tries to stuff his car full of leaves
it worked :P 16:42
tadzik I could play the cars and leaves game, but I have to hack on tables instead :( 16:43
masak I'm sure there'll be a break somewhere. :) 16:44
and the game will only get more implemented the more you wait. :)
tadzik if I finish those tables today it'd be great
jnthn tadzik++
tadzik I've added like 100 LOC to Actions.pm and I'm like in 3/4 of the problem
jnthn is currently trying to figure out how on earth to implement nextsame etc
tadzik with the most complex one still ahead :)
masak jnthn: bet you wish you could just delegate the problem? :P 16:45
jnthn masak: Well volunteered! :P
masak well misunderstood! :P
jnthn Dang! :P
masak Phew! :P 16:46
dalek ast: a4c379f | Coke++ | S32- (2 files):
track nom regressions.
tadzik :D
jnthn The problem isn't so much doing it, it's doing it without making nom a bunch slower when the majority of the time we don't defer.
master makes *every* method dispatch pay a GC-able object allocation for the few that actually use nextsame et al. 16:47
dalek kudo/nom: 850e5c6 | Coke++ | t/spectest.data:
track more nom test status.
16:47 jevin joined
jnthn And I'd really rather we didn't do that in nom. 16:47
tadzik ouch 16:49
16:50 satyavvd joined
jnthn Then it's trying to make this work when we have a method cache and multi-dispatch cache around 16:52
Plus still trying to unify all of these different dispatchers.
16:53 Bzek left
masak begins to see why it might be a tad difficult 16:56
16:57 mberends left
jnthn walk & 16:59
masak I'm getting a better appreciation for why text adventure games are sometimes very contrained in their language. :) 17:01
tadzik (:
masak I will pass 500 LoC later this evening. but that's enough hacking for now. 17:04
17:11 dual left 17:12 satyavvd left 17:16 shinobicl left 17:22 Instil joined 17:27 Instil left 17:29 Instil joined 17:33 mberends joined 17:39 [perlhack] left 17:40 MayDaniel joined, MayDaniel left 17:54 dual joined 17:56 simcop2387 left 17:58 simcop2387 joined 17:59 jimmy1980 left 18:01 colomon joined 18:02 jedai_ joined, jimmy1980 joined, jedai left 18:08 jack-ji left
tadzik \o/ 18:08
masak: want to look at my magical cell splitting algorithm? :)
pmurias masak: have you heard of dependency parsing? 18:11
18:12 mberends left 18:15 mberends joined 18:20 wamba left 18:22 REPLeffect left
tadzik okay, I want a walk too :) 18:32
18:34 bluescreen10 left 18:35 wamba joined
sorear good * #perl6 18:36
18:38 donri joined
tadzik hello sorear 18:48
18:48 mberends left
pmurias sorear: hi 18:51
18:54 Kivutarrr left
thou i am seeing the weirdest bug w/ rakudo 18:57
tadzik: you around?
moritz show it 18:58
thou it is the Digest::MD5 project from github
if use ufo and 'make', the 'make test' fails on t/perl5-compat.t
but if i change the text of the comment at the top, it works 18:59
i'll try to actually show it
18:59 Kivutarrr joined
thou # 18:59
# Test compability with Perl5 Digest::MD5
#
use Test;use Digest::MD5;
^ This is the original. it fails with:
tim@lakshmi:~/g/code/p6/perl6-digest-md5$ env PERL6LIB=/Users/tim/g/code/p6/perl6-digest-md5/blib/lib:/Users/tim/g/code/p6/perl6-digest-md5/lib:. perl6 t/01-basic.t 19:00
===SORRY!===
Confused at line 6, near "\n\nok(1, 'M"
19:00 jimmy1980 left
thou (i renamed the test to 01-basic.t to see if that was the problem) 19:00
now if i fix the spelling of compatibility, it works. I change that one word only: # Test compatibility with Perl5 Digest::MD5
save, and re-run:
tadzik thou: oui
thou im@lakshmi:~/g/code/p6/perl6-digest-md5$ env PERL6LIB=/Users/tim/g/code/p6/perl6-digest-md5/blib/lib:/Users/tim/g/code/p6/perl6-digest-md5/lib:. perl6 t/01-basic.t 19:01
ok 1 - Module loaded
ok 2 - MD5 hex of 'Hello World' must be 'b10a8db164e0754105b7a99be72e3fe5' (static method)
... ok all the rest
*so* weird
moritz that's... very weird indeed
thou: please try find -name \*.pir
thou I re-typed that line w/o any copy/paste in case there were some weird chars that vim wasn't showing me
tim@lakshmi:~/g/code/p6/perl6-digest-md5$ find . -name \*pir 19:02
./blib/lib/Digest/MD5.pir
moritz it could be an out-of-date .pir version of the test file, where writing to the file forced recompilation
thou tadzik: you were able to repeat that bug, right?
moritz hm
tadzik thou: si
moritz needs to compile a rakudo/master first
thou tadzik: can you repeat the fix?
tadzik thou: in a sec 19:03
thou to confirm i'm not just crazy....
i'm not really going to complain if rakudo doesn't like misspellings in comments
but i would prefer a more helpful error message
;-)
moritz :-)
tadzik perl Configure.pl --buzz-off-aspell 19:04
thou moritz: it's not out-of-date pir for the test; there's no pir for the test at all; plus i've flip-flopped this test many times back and forth, with consistent results 19:05
works if i remove several letters from that word, too
tadzik wat
thou seems to be that *exact* num of chars 19:06
if i remove several other chars in the comment, but fix the spelling of compatibility, it has same error
one more or one fewer chars, and it passes
hmmm, i can add a single char to a different line of the comment, and it fails 19:07
so it's the total chars in that set of lines that make up the comment
tadzik ok, looking on that
moritz I reproduced the error
thou e.g., this fails: # # Test compatibility h Perl5 Digest::MD5 # 19:08
19:08 jimmy1980 joined
thou ^ only comment line, no spaces after last # 19:08
19:08 cipherte1t joined
moritz curious enough, it goes away if I remove the .pir version of the module 19:08
thou moritz: yes, that was the original symptom i complained to tadzik about; i thought it was a panda bug
but it was just that panda was building it, and i had been testing w/o building it 19:09
soooo strange :-)
moritz after an rm -rf blib; git checkout .; make test # passes again
thou i'm glad it's not just on my machine, or i'd be really scared
tadzik :)
solar rays!
moritz git clean -xdf; ufo; make # there's the error again 19:10
I'll bring Ronja to bed and then see if I can provide any more diagnostics afterwards
19:10 ciphertext left
thou ok 19:11
masak ooh, a weird bug! :> 19:18
thou++
thou has to be 47 chars before "use Test; 19:19
masak pmurias: no, I don't believe I've heard of dependency parsing.
tadzik :O
thou and if i put "use Test;" (two spaces), it goes away, too
masak very weird indeed.
thou or a space after "use Test; "
tadzik the double bacon bug is nothing compared to this :)
thou: just put the space there and let's pretend this never happened :D 19:20
masak please let's summarize it a bit.
thou space before "Digest::" avoids bug, too
masak it's a parsing bug, yes?
tadzik yes
masak what else?
tadzik relates to the number of whitespace/comment characters
thou space after Digest avoids it, but space after ; does not avoid it
masak what's the shortest program that exhibits the bug? preferably on one line.
tadzik we need a genetic algorithm to generate it :) 19:21
masak as few dependencies as possible.
thou ok, i can replace "use Test;" with spaces and the bug remains
masak tadzik: humans are perfectly good generic algorithms, most of the time :P
tadzik (: 19:22
thou #23456789 123456789 123456789 123456789 123456789 123456
use Digest::MD5;
^ That reproduces it
but only if Digest::MD5 is compiled to pir
masak that's a big clue.
(the "but only" part)
tadzik how about any other module compiled to pir?
thou btw if i remove one char from the comment, and add a space e.g., before or after "Digest", it still happens. 19:24
masak thou: wfm. I put those two lines in foo.pm, and did 'perl6 --target=pir foo.pm' -- it works fine. 19:25
I may not have the very latest Rakudo, though. hold on and I'll rebuild.
thou env PERL6LIB=/Users/tim/g/code/p6/perl6-digest-md5/blib/lib:/Users/tim/g/code/p6/perl6-digest-md5/lib:. perl6 t/01-basic.t
masak no, I was on latest master. 19:26
thou those two lines are in 01-basic.t
masak thou: hm, blib...
thou i didn't try compiling to pir
masak ok, so there are no existing pir files involved?
thou blib/lib/Digest/MD5.pir
exists
no other pir 19:27
masak try removing it?
thou then bug goes away
masak ah.
right, you said above.
that's the step I'm missing right now, then.
19:27 shinobicl joined, benabik left 19:28 benabik joined
masak nope, works even after I compile a Digest/MD5.pm to PIR. 19:29
but I'll try the right one.
thou ok, can repeat without ufo; i copied Digest::MD5.pm to /tmp/Digest-MD5.pm, and moved my test script there ("use" line and adding a char to the comment as appropriate) 19:31
19:31 [Coke] left
thou 2101 perl6 --target=pir --output=Digest-MD5.pir Digest-MD5.pm 19:32
2102 PERL6LIB=. perl6 buggy.pl6
jnthn so...pre-compiled breaks parsing?
thou yeah
masak the PERL6LIB=. should be unnecessary by now.
jnthn Bugs. We make EXCELLENT ones. :/
masak at least if you clear the one in %ENV.
thou i just wanted to avoid anything in env, yeah 19:33
jnthn My only guess is that the MARKED state is somehow too shared.
19:34 [Coke] joined
jnthn github.com/perl6/nqp/blob/master/s...ar.pm#L817 mebbe... 19:35
19:39 jevin left
thou sorry to stir the pot and then run, but i have to leave for a bit. will bbl i hope. 19:40
19:43 jevin joined 19:49 Jackneill joined, Jackneill left, Jackneill joined 19:50 Jackneill left
moritz rakudo: say ords(Any).perl 19:53
p6eval rakudo 72d158: OUTPUT«Method 'ords' not found for invocant of class ''␤ in 'ords' at line 2788:src/gen/core.pm␤ in main program body at line 22:/tmp/1dQJaw9rVB␤»
moritz rakudo: say ords(Cool).perl
p6eval rakudo 72d158: OUTPUT«(67, 111, 111, 108, 40, 41)␤»
tadzik rakudo: say ~Cool 19:54
p6eval rakudo 72d158: OUTPUT«Cool()␤»
19:55 [Coke] left
jnthn heh :) 19:56
nom doesn't ~ type objects like that.
moritz I know :-)
jnthn Which in this case seems an improvement :)
tadzik I have a feeling I made Actions.pm compilations hell slower
jnthn tadzik: OH NOES 19:57
:)
moritz tadzik: can't think like table construction go into a separate (nqp) module?
19:57 [Coke] joined
tadzik moritz: may be a sane way, yes 19:57
I'll also care less for namespace pollution :) 19:58
19:58 Limbic_Region joined
tadzik moritz: your magical cell splitting algorithm is around 70 lines alone 19:58
but it seems to work just fine :)
so something like use Pod::Table; Pod::Table::process_rows()? 19:59
moritz yes (except that "process" is probably a too generic verb)
tadzik I'll think about it
moritz more like extract_columns
tadzik git diff is 419 lines long 20:00
that's like 10% of Actions.pm :)
so maybe the whole Pod processing should go into a separate module?
20:01 icwiener left
moritz +1 20:01
tadzik oookye 20:02
20:02 icwiener joined
jnthn maybe collect the Pod related stuff in Perl6::PodParser or some such 20:02
moritz rakudo: say ords(42).perl
p6eval rakudo 72d158: OUTPUT«(52, 50)␤»
moritz PodActions more likely 20:03
jnthn I'd put it under the Perl6 namespace like Actions, SymbolTable, etc.
tadzik maybe just Perl6::Pod
sounds saneish
20:03 Kivutarrr left
tadzik and I have a feeling that 'make perl6' is a few minutes now, as 'make' used to be.. 20:03
but well, I finished HPatMoR, I have time for that now :) 20:04
moritz still waits for a new chapter
colomon is it done, or. ... guess not
tadzik I very liked the 60-something ones, when suddenly it all becomes a Big Deal 20:05
colomon I actually gave up on it early on... weird mixture of irresistible (so I was reading when I shouldn't be) and frustrating. 20:07
20:07 molaf left
moritz tadzik: aye. The last few read like a collection of clichees and side plots 20:07
tadzik: I hope he'll recover :-)
tadzik (: 20:08
dalek ast: 5eaae4f | moritz++ | S32-str/ords.t:
test for ords()
20:09
kudo/nom: cb99254 | moritz++ | / (3 files):
implement and test .ords, &ords()
tadzik does nqp have 'module' in place? 20:11
Perl6::Pod doesn't need to be a class really
moritz ack -w module nqp/t
looks like 'yes'
tadzik :)
20:24 Mowah joined 20:31 wamba left 20:33 mj41 joined 20:34 Mowah left, im2ee left
tadzik I like how 2 smaller files compile faster than 1 bigger file 20:38
dalek kudo/nom: cd4801e | moritz++ | LHF.markdown:
remove ords() from LHF
20:42
20:46 shinobicl left
felher jnthn++: just saw your talks from bejing, great stuff, thnx. :) 20:53
20:55 [Sec] left
jnthn felher: Glad you enjoyed them :) 20:59
21:00 soh_cah_toa joined, odrm left 21:02 lichtkind joined
tadzik # Looks like you failed 1 tests of 52 21:03
one failing test! in 07-tables.t!
well, that's due to tests being crap... :)
but still, almost there :) 21:05
21:09 wamba joined
lichtkind thou: cheers 21:09
21:14 cooper left
jnthn tadzik: yay :) 21:16
tadzik when I saw "King arthur's singing shovel singing shovel" it reminded me of the bacon bug 21:17
but this time it's just my fault :)
jnthn lol
tadzik I chose some other words when I saw this, but ok :) 21:18
21:23 PacoLinux left
tadzik t/pod/07-tables.t ....... ok 21:23
woooo
what am I going to do with all the free time now? :) 21:24
besides refactoring this beast
21:24 zby_home_ left
jnthn refactor that beast! 21:25
And beer!
;)
flussence
.oO( a string like "failed 1 tests" should be a fail in itself... )
sorear die, plurals 21:26
jnthn hah, no, resurrect duals! 21:28
21:28 Limbic_Region left
tadzik g diff | wc -l 21:29
705
I'm even afraid to look inside
jnthn make backups! :) 21:30
tadzik before commiting :)
dalek kudo/podparser: 076e348 | tadzik++ | / (3 files):
Move pod related metod from Actions.pm to Pod.pm
21:32
kudo/podparser: 8787be2 | tadzik++ | / (6 files):
Parse tables, import 07-tables.t
tadzik please do not review, this needs some mad refactoring :)
oh, I accidentally commited the SymbolTable patch with everything else, it was supposed to be a separate commit 21:33
soh_cah_toa what does the "make" function do? i usually see it in grammar/actions files 21:34
flussence make is sort of like return 21:35
benabik soh_cah_toa: It attaches an object to the current match object's .ast property
And I don't think it acts like return. I think it continues executing afterwards. (But I'm less sure of that.)
flussence or take then :) 21:36
soh_cah_toa ok
benabik soh_cah_toa: If you look through Actions, there's usually something like `$<statement>.ast`. That evaluates to the object passed to make. 21:37
21:37 mj41 left
benabik in the statement action. 21:37
soh_cah_toa hmm...ok 21:38
tadzik benabik: your newPOST work seems hell exciting. I'd love to see that :)
benabik tadzik: It's in the nqp_pct branch of Parrot. Only real advantage right now is that PAST is now written in NQP so it's far easier to tell what's going on.
Of course it's written in really _funny_ NQP since I was converting it from PIR. I have some notes of NQP-isms I should really be using.
tadzik benabik: I mainly mean direct past -> pbc compilation 21:39
or is it post->pbc
benabik tadzik: It's PAST->POST->PBC
tadzik whatever, skipping the pir layer is worth the work
benabik Yes yes.
Not sure if NQP or Rakudo will be able to use it near term... Not sure how I'm going to handle Q:PIR blocks.
tadzik okay, I need a walk :) bbs 21:40
21:42 Haskelletor left, Psyche^ joined
jnthn benabik: Mostly, we try to avoid Q:PIR 21:45
benabik: But we do have some.
21:46 Patterner left, Psyche^ is now known as Patterner 21:47 Chillance left
benabik jnthn: The real sad thing is that PAST and POST still have Q:PIR so they can't direct compile themselves to PBC. If I have time by end of summer I'm going to try to hook up PIRate to deal with them. 21:50
masak .oO( "King Arthur's singing shovel singing shovel" sounds like the more catchy part of a musical number ) 21:54
tadzik :) 21:57
jnthn grrrrr....what on earth is wrong with this deferral thingy...
tadzik . o O ( If you're happy and you know it syntax error! – Syntax error! ) 21:58
masak tadzik: ===SORRY=== 22:00
tadzik :) 22:01
masak I have a heartfelt recommendation: if you want to experience the fun part of Perl 6, write a text adventure game. it's an experience. :) 22:02
jnthn If not, implement deferal. 22:03
22:04 wolfman2000 left
masak .oO( the next version wasn't the same... ) 22:04
'night, #perl6 22:06
22:06 masak left 22:09 wamba left 22:17 envi left 22:26 meteorjay left 22:36 drbean joined 22:39 cipherte1t is now known as ciphertext 22:51 [Sec] joined
dalek kudo/nom: 62c04ce | jonathan++ | / (3 files):
Start to sketch out how dispatchers could look for supporting nextsame et al.
22:57
kudo/nom: b02654b | jonathan++ | src/ops/perl6.ops:
Some ops related to dispatchers.
kudo/nom: 0cd9e67 | jonathan++ | src/Perl6/Actions.pm:
multis and methods get a slot for a dispatcher, which just contains a type object; we'll vivify it on demand to create a real dispatcher if nextsame et al are used.
kudo/nom: 0ecf393 | jonathan++ | src/ops/perl6.ops:
Toss some dead code.
kudo/nom: 0373976 | jonathan++ | src/ops/perl6.ops:
First cut of op for finding a dispatcher (doesn't try to consider exhaustedness or any such stuff yet, though).
kudo/nom: db2ce31 | jonathan++ | src/ops/perl6.ops:
Couple of corrections to find_dispatcher op.
kudo/nom: 3209cd1 | jonathan++ | src/Perl6/Metamodel/Dispatchers.pm:
Refactor dispatchers; introduce a common case to factor out a bunch of stuff they'll probably all share.
kudo/nom: 4bc1ac3 | jonathan++ | src/core/ (2 files):
First cut implementation of callwith. Probably not perfect, but essentially works.
23:00 wamba joined
jnthn Gotta $dayjob in the morning, so should get some rest. Now I've got the primitives in place, it shouldn't be too bad to get the other deferal bits in place, plus it's the basis for getting .wrap back too. 23:01
23:07 Yume joined 23:09 pmurias left 23:29 orafu left, orafu joined 23:34 wolfman2000 joined 23:35 wamba left 23:37 Yume left, _jaldhar left 23:39 _jaldhar joined 23:54 ymasory joined