»ö« 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.
lichtkind karma: jnthn 01:27
dalek: karma
sorear karma jnthn 01:32
aloha jnthn has karma of 2584.
sorear lichtkind: dalek has *no* functions other than announcements
lichtkind thank you
karma lichtkind
aloha lichtkind has karma of 10.
lichtkind karma Herbert Breunung 01:33
aloha Herbert Breunung has karma of 296.
pmichaud karma pmichaud
aloha pmichaud has karma of 1445.
sorear karma sorear
aloha sorear has karma of 2135.
sorear what.
pmichaud jnthn++ and sorear++
sorear oh
lichtkind cant believe that pm has less
pmichaud oh, I can.
sorear pmichaud's cancer situation coincides with the switch from purl to aloha
pmichaud (not for log readers: pmichaud doesn't have cancer, one of his close relatives does) 01:34
sorear pmichaud, are you p6-old enough to remember lambdabot? :>
pmichaud *note for log readers
lichtkind but i would not believe to have 300
pmichaud yes, I remember lambdabot. I had issues with lambdabot, although not nearly as many as purl-- 01:34
lichtkind good night all the brave knights 01:47
sorear good night lichtkind
lichtkind :)
nif --help 04:44
srry :( mistake 04:45
moritz good morning 05:17
sorear o/ 05:24
tadzik good morning #perl6 06:49
sorear good morning tadzik
moritz happy Easter everybody! 07:07
moritz got a Kubb spel for Easter
sorear o/
moritz masak, tadzik: and we've got two more games by the makers of "Zoff im Zoo" :-) 07:26
pmichaud good morning, #perl6 08:02
moritz good am, pm
pmichaud: isn't it a bit early for you?
pmichaud well, late, yes. I'm about to head to bed :)
moritz :-) 08:03
pmichaud I just sent off a message to p6c and to pkg-parrot-devel@debian that is likely to stir up some hornets, so thought I'd check in on the channel before heading off :)
(about Rakudo and "1.0 release") 08:04
moritz oh, fun :-)
sorear what. 08:05
Debian has a parrot packagers' list?
how important does Debian think Parrot is?
moritz Debian has a packager's mailing list for almost every package that is maintained by m,more than one developer 08:06
sorear ah 08:07
pmichaud much of the discussion on parrot-dev, p6c, and other lists over the past couple of days has been because of difficulties in packaging Parrot + Rakudo for Debian.
sorear pmichaud: has travis-ci stopped posting to parrot-dev every ten minutes yet?>
moritz sorear: it has 08:08
pmichaud the early messages in the threads were very unflattering (and imo unfair) to Rakudo -- basically repeating the notions that the problems are all Rakudo's fault for not following Parrot APIs properly.
(the quote was "pokes indiscriminantely into Parrot's internals" (sigh) ) 08:12
anyway, comments, thoughts, refinements, criticisms of my post are welcomed. I'm off to sleep 08:13
bbl 08:14
moritz pmichaud++ # mail
grondilu Is there a formatter for Pod v6 yet? 08:17
moritz I'm pretty sure there's a HTML emitter somewhere 08:18
and a plain text emitter is shipped with rakudo
github.com/perl6/Pod-To-HTML/
sorear there is "grok" 08:19
there is also Pod::PseudoPod::Latex, which is sort of a formatter
moritz Pseudopod and Pod6 aren't the same
sorear (PseudoPod is an O'Reilly specific book format, which has more in common with pod6 than pod5 but is not the same as either)
grondilu runs find /usr/local/src/rakudo -name grok and finds nothing :/ 08:20
oh indeed there is a lib/Pod/To/Text. My bad 08:21
moritz r: enum A < b c d> is export; 08:22
p6eval rakudo 4373f0: OUTPUT«===SORRY!===␤Confused␤at /tmp/b84meTrQrp:1␤»
moritz r: enum A is export < b c d>;
p6eval rakudo 4373f0: ( no output )
grondilu Say I have a 'Foo' module in my @INC. I want to name 'Foo' a package in an other, non-related module Bar. The Bar module would also use the Foo module. How do I call the "outer" Foo module instead of the local 'Foo' package? 08:24
you see what I mean?
moritz rakudo: class Foo { method who { 1 } }; class Bar { class Foo { mthod who { 2 } }; method lookup { say PROCESS::Foo.who } } ; Bar.lookup 08:25
p6eval rakudo 4373f0: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&who' called (line 1)␤Undefined routine '&mthod' called (line 1)␤»
moritz rakudo: class Foo { method who { 1 } }; class Bar { class Foo { method who { 2 } }; method lookup { say PROCESS::Foo.who } } ; Bar.lookup 08:26
p6eval rakudo 4373f0: OUTPUT«Could not find symbol 'PROCESS::&Foo'␤ in method lookup at /tmp/_fAh0PwI8r:1␤ in block <anon> at /tmp/_fAh0PwI8r:1␤␤»
moritz rakudo: class Foo { method who { 1 } }; class Bar { class Foo { method who { 2 } }; method lookup { say GLOBAL::Foo.who } } ; Bar.lookup
p6eval rakudo 4373f0: OUTPUT«Could not find symbol 'GLOBAL::&Foo'␤ in method lookup at /tmp/Md_TgtmF3C:1␤ in block <anon> at /tmp/Md_TgtmF3C:1␤␤»
moritz rakudo: class Foo { method who { 1 } }; class Bar { class Foo { method who { 2 } }; method lookup { say GLOBAL.WHO<Foo>.who } } ; Bar.lookup
p6eval rakudo 4373f0: OUTPUT«1␤»
moritz grondilu: that works, though I admit it's ugly
grondilu: you should be able to write OUTER::Foo, but that's NYI 08:27
grondilu Oh I didn't know about OUTER::. It's fine, I can wait.
sorear grondilu: App::grok on CPAN, iirc 08:29
grondilu checks this out 08:30
Ok that will do. Thanks. 08:40
fsergot hi o/ 09:15
sorear o/ 09:22
jnthn mornin' 10:15
Happy Easter :)
nom: class Foo { }; say GLOBAL::Foo
p6eval rakudo 4373f0: OUTPUT«Could not find symbol 'GLOBAL::&Foo'␤ in block <anon> at /tmp/X4FY867xoU:1␤␤»
jnthn p6: class Foo { }; say GLOBAL::Foo
p6eval niecza v15-6-gefda208: OUTPUT«Foo()␤»
..rakudo 4373f0: OUTPUT«Could not find symbol 'GLOBAL::&Foo'␤ in block <anon> at /tmp/W3aOmWp0Ih:1␤␤»
..pugs: OUTPUT«*** No such subroutine: "&GLOBAL::Foo"␤ at /tmp/k6NJl3dmp2 line 1, column 20 - line 2, column 1␤»
jnthn was sure that worked...
tadzik hello, happy easter to you as well :) 10:16
arnsholt jnthn: Is there any documentation beyond comments and code on how 6model fits in with NQP/Parrot? 10:48
tadzik are there any circumstances under which adding an additional 'use' statement would result in "Could not find symbol Bla&Bla"? 10:54
jnthn tadzik: Maybe a circumstance in which the import mechanism does the wrong thing... 10:56
tadzik jnthn: if I stick 'use Bailador' on topp of github.com/tadzik/Bailador/blob/ma...or/Test.pm then it dies with Could not find symbol 'Bailador::&Request' 10:57
(in runtime)
ftr, both Bailador and Bailador::App use Bailador::Request 10:58
jnthn arnsholt: Depends what you mean exactly by "how it fits in". At a high level, not sure there's much...only some diagram I did a while back trying to show its place. 11:00
tadzik: Before or after the module declaration? Does it make a difference? 11:01
tadzik: Sounds like something is wrong there, though.
tadzik jnthn: always after
well, Bailador::App does it before 11:02
does not change anything when I move stuff before in Bailador.,pm
I'll figure out some test case 11:03
jnthn OK
tadzik jnthn: ge.tt/8hkzh2G/v/0 11:08
6 files, I know :)
jnthn tadzik: Thanks, will try and look at it soon. 11:32
tadzik thank you 11:34
arnsholt jnthn: Well, it'd probably help if I had a better idea as well =) 11:51
But I figured one thing I could look into was making the CStruct repr support CArray/CPointer members 11:52
I figure it'll require adding a branch to allocate space for a void* in the struct, and some kind of interaction with GC so that the child objects are marked when the parent is 11:53
jnthn arnsholt: And a diddle in the attribute handling too.
arnsholt: But yes, your analysis is correct. 11:54
jnthn arnsholt: You'll probably only need to change CStruct.[ch] to implement what you're after, I think. 11:54
So it's quite a contained change. 11:55
arnsholt: The thing that makes it a little trickier is that you have two cases. 11:56
1) The case where the struct is returned
2) The case where the struct is being built up by the user
In the first csae you'll have no object with the CPointer repr handy to use for attribute lookups. 11:57
In the second case, you will because they'll have assigned it.
Well, though there's a choice there too...you can always box the void* into the appropriate type with CPointer on demand, e.g. when it's looked up. Then you skip GC worries. 11:59
Maybe try it that way first.
arnsholt Hmm. Right 12:11
I'll go for a walk and think about it and then look at the code a bit 12:12
lichtkind tell raiph the topics of tablets 2 can be made in the same wash :) 13:17
phenny: tell raiph the topics of tablets 2 can be made in the same wash :) 13:18
phenny lichtkind: I'll pass that on when raiph is around.
arnsholt is starting to get some kind of overview of Reprs 13:28
spider-mario this fails with the latest rakudo but I can’t understand why: 13:59
> sub id(Any ::T $x) returns T {$x}
sub id(Any $x) { ... }
> id 42
Type check failed for return value
is it a problem
with my code or a bug in rakudo?
(sorry for the split between “problem” and “with”, it was accidental)
(I hate it when it happens :() 14:00
arnsholt Premature carriage return syndrome =) 14:01
felher If i have a class 'Date' in some package 'X::Y' and i do 'use X::Y::Date;', does X::Y::Date get used when i write 'Date.new()', or is the 'normal' Date used? 14:15
felher Hmm... nom seems to use the standard Date. 14:21
jnthn arnsholt: a repr just implements a way of allocating, accessing and managing memory. It's orthogonal to the notion of type. That's about it. :) 14:44
spider-mario: That generic return thing does indeed look like a bug.
jnthn spider-mario: Well, most likely just a NYI case. But anyway, please do file a ticket. 14:45
arnsholt jnthn: Yeah. Also, the *_initialize functions at the end of the files were useful indicators of what functionality a repr exposes and how 14:46
arnsholt Right now I'm fiddling a bit with getting a simple test file going 14:47
felher Oh, no, nom doesn't is just did not import it properly :) 14:48
s/t is/t. I/ 14:49
spider-mario I’ve just sent the report 15:03
not sure if it matches the expected format
woah, my bug number is pretty. :D 15:04
#112344
jnthn spider-mario: Nice
spider-mario: Well, bug reports should always be: what I did, what happened, what I expected to happen. :)
spider-mario hm, I think I forgot the “what I expected to happen” part 15:05
I hope it will be obvious enough
jnthn Yeah, probably :) 15:08
moritz \o 15:11
jnthn hi moritz
spider-mario o/ moritz
pmichaud good morning, #perl6 15:23
jnthn hi, pmichaud 15:25
stevieb_ Good morning all :) 15:33
jnthn o/ stevieb_
jnthn -> dinner, bbl
felher 'constant' is compile time, right? So if i'd write something like 'constant SOME_OBJECT = lengthy-calculation()' and i precompile that to .pir, i don't have to wait lengthy-compuation-time each time i start the script. Is that about right? 16:17
moritz yes 16:18
pmichaud ooc, what if I do constant SOMETHING = rand(); ? 16:19
moritz then you get a random number per compilation
felher looks up 'ooc'
pmichaud "out of curiosity" 16:20
felher pmichaud: ah, thanks :)
felher If i have a 'module X:Foo;' in which a 'constant PI = 3' is defined, how do i export/import it? 16:52
jnthn constant PI is export = 3; # if it's implemented, but I ain't sure it is 16:55
felher jnthn: that's what i tried first. So it seems it's NYI. :) 16:56
jnthn: thanks :) 16:57
felher i just wrap it in a sub for now. :) 16:57
jnthn pmichaud: re 16:58
"We'll work on removing the libtomath and dyncall sources from NQP
> tarballs, or make it very easy for NQP to ignore those sources.
"
pmichaud: Think it'll have to be the second one.
BUT we statically link these things in. 16:59
moritz aye. Bundling is way too convenient for non-distributor distribution
jnthn I don't see why distributions should care.
I mean, wow, the executables are a couple of hundred KB more big. :) Disk is cheap. :)
Time to resolve dependency is issues is more costly. 17:00
s/is//
Plus I think we have at least one custom patch to dyncall... 17:01
lichtkind jnthn: o/ 17:11
jnthn hi lichtkind 17:13
lichtkind jnthn: may i talk to you about rakudo
pmichaud why are we statically linking? 17:15
simply to improve startup time? 17:16
jnthn pmichaud: Less things to install, easier to set up (particularly on Windows where it frees you from worrying about export stuff, though maybe both libraries get that out of the box, but I ain't sure they do)
spider-mario is there anything that does the same as slurp but for writing? 17:17
jnthn pmichaud: Also because I'm just far happier with things being self-contained rather than having complex dependency chains.
spider-mario something like Haskell’s writeFile
jnthn lichtkind: Sure
pmichaud could we do dyanmic link on *nix and static link on Windows? 17:18
jnthn Probably, with effort. 17:19
pmichaud I just know that we're going to get a *lot* of pushback/resistance from debian packagers if we try to include the sources in the nqp tarball.
jnthn :(
But...they're shipping built binaries, no?
pmichaud it has to do with licensing and build requirements, not shipping ones
jnthn Ah 17:20
jnthn comes from Windows land and probably has a completely different set of values/interests inherited from that culture when it comes to these issues 17:21
pmichaud yeah, there are difficult cultural constraints at work here. debian is very very concerned with license and source purity 17:22
(it's one of their "core values")
s/difficult/different/
jnthn OK, this probably explans why I'm finding this so curious. :) 17:23
pmichaud so, although it's possible to get exceptions, there has to be a really strong justification for it, and my guess is that Rakudo is not (yet) big enough to warrant them
arnsholt jnthn: Should NQP complain about something along the lines of: class Test is repr('CStruct') { has SomethingElse $!member; } ?
jnthn pmichaud: I'm doubtful our justification is really strong either. :) 17:24
Even if we were yet big enough :)
pmichaud :)
jnthn arnsholt: What's the "something else"?
arnsholt: It has to be something CStruct knows what to do with.
arnsholt Just a plain class SomethingElse (non-native)
jnthn That won't work out. 17:25
Yes, it should complain loudly.
arnsholt Yeah, that's what I was aiming for (to make sure I hadn't screwed things up =)
arnsholt Hmm. Doesn't here 17:28
spider-mario what do you think would be an idiomatic way of getting all the elements of a list but the last one?
currently, I do: @x .= [^ (@x - 1)] 17:29
arnsholt nqp: class Foo {}; class Test is repr('CStruct') { has Foo $!foo; } my $x := Test.new; say('alive');
p6eval nqp: OUTPUT«Confused at line 1, near "class Test"␤current instr.: 'nqp;HLL;Grammar;panic' pc 22008 (src/stage2/gen/NQPHLL.pir:7047) (src/stage2/gen/NQPHLL.pm:329)␤»
spider-mario oh, pop does it.
arnsholt Durr? 17:30
jnthn arnsholt: Missing semi
After the class decl
arnsholt nqp: class Foo {}; class Test is repr('CStruct') { has Foo $!foo; }; my $x := Test.new; say('alive'); 17:31
p6eval nqp: OUTPUT«alive␤»
arnsholt Thanks! I keep doing that
jnthn Hm. I'm surprised that doesn't expode.
*explode
arnsholt Yeah, me too
jnthn oh wait... 17:32
nqp: class Foo is repr('IDoNotExist') { } 17:33
p6eval nqp: ( no output )
jnthn Right.
nqp: class Foo is repr('IDoNotExist') { }; say(Foo.REPR)
p6eval nqp: OUTPUT«KnowHOWREPR␤»
arnsholt Oh, right. That goes some way to explain it
jnthn Hm, that should really be an error.
Anyway, in NQP the dyncall ops lib ain't loaded by default. 17:34
arnsholt That's not a problem at this point, really
jnthn rakudo: class Foo {}; class Test is repr('CStruct') { has Foo $!foo; }; my $x := Test.new; say('alive');
p6eval rakudo 4373f0: OUTPUT«CStruct representation only implements native int and float members so far␤ in method bless at src/gen/CORE.setting:567␤ in method new at src/gen/CORE.setting:554␤ in block <anon> at /tmp/8MUEYk34rn:1␤␤»
jnthn There you go
arnsholt: It is because the repr lives inside that ops lib :)
arnsholt Oh, right!
So I should just recompile Rakudo and use that to test it? 17:35
jnthn arnsholt: That's the easiest way. Though if you only change the dynops, you can actually just copy nqp_dyncall_ops.so or whatever it is on your system from the nqp dynext directory into where it land sin the install directory 17:38
then you need not build Rakudo.
er, only change the repr I meant
arnsholt Kewl. Not recompiling Rakudo all the time would be nice =) 17:39
jnthn Very. :) 17:40
jnthn heads home, bbi 45m or so 17:55
felher Why does 17:57
nom: a(3); sub a($x) { $x.say; }
p6eval rakudo 4373f0: OUTPUT«3␤»
felher work, but
nom: OPERATOR 3; sub prefix:<OPERATOR>($x) { $x.say; } 17:58
p6eval rakudo 4373f0: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&OPERATOR' called (line 1)␤»
felher doesn't?
tadzik nom: sub prefix:<OPERATOR>($x) { $x.say; }; OPERATOR 3
p6eval rakudo 4373f0: OUTPUT«3␤»
tadzik well ;)
moritz felher: only normal subroutines can be post-declared 17:59
felher: if the compiler sees an unknown identifier at parse time, it assumes its a subroutine call. If it turns out that is not the case, it complains loudly
felher moritz: ah, i see. Is there a way to make it know to the compiler but supply its body later? Something like 'sub somefix:<OPERATOR>($a, $b); some code that uses OPERATOR ...; sub somefix:<OPERATOR>($a, $b) { actual defintion ... }' 18:08
Oh, maybe the yada-thing? *testing* 18:11
Nope, it isn't that simple :) 18:12
moritz felher: sure: sub PREFIX:<myop>($x) { function_that_implements_myop($x) } 18:29
felher: and implement function_that_implements_myop later
felher moritz: ah, yes, i din't think of that workaround, thnx! :) 18:31
sorear good * #perl6 18:32
felher moritz: but i wonder: why doesn't 'sub somefix:<OPERATOR> { ... }' work? I thougt it might after reading a bit of S06 (But maybe i'm just thinking to much in terms of operators are subroutines with funny names and funny syntax :) 18:33
moritz felher: erm, you can't just stub subs like that. Because you can post-declare them 18:34
felher: what you can do is write a proto first
proto sub somefix:<OP>(|$) { {*} }
and then you can install the multis later 18:35
and the proto re-dispatches to the multis
felher moritz: so i misunderstood the S06, "To predeclare a subroutine without actually defining it, use a "stub block": sub foo {...} # Yes, those three dots are part of the actual syntax" ?
moritz felher: or maybe I'm just wrong :-)
felher moritz: maybe it's a fossil or something like that. I already borrowed the proto,multi-trick from your JSON code :D 18:37
masak evenin', #perl6 18:47
sorear o/ masak
cognominal_ o/ 18:49
sorear, what does niecza use for regex? 18:50
sorear cognominal_: a nameless thing mostly of my own creation, with heavy inspiration from TimToady's regex engine, and the lessons I learned when I tried to implement Prolog in 2007 18:54
lichtkind just wrote his first rakudo patch :) 18:56
cognominal_ sorrear, written in which language? 18:58
masak \o/
lichtkind masak: was that for me? 19:01
sorear cognominal_: It's not really separable from the rest of niecza
the regex parsing and semantic analysis is done in Perl 6, the runtime primitives like ScanCClass are all C#
cognominal_ ok
jnthn back 19:03
sorear yay, jnthn 19:04
masak lichtkind: sure! keep 'em coming! 19:08
lichtkind i hope to expand kephr ato automate lot of these tasks 19:09
masak x 19:15
heh -- I wish I had a one-year-old to blame when I accidentally type random things into the channel :P 19:16
tadzik ;) 19:17
cognominal I can't do that either when I type here stuff intended for #perlfr 19:18
moritz is careful not blame his one-year-old for his own mistakes 19:45
lichtkind raiph: hai 20:20
lichtkind anybody here? 21:47
sorear yes 21:48
lichtkind im bit pissd that my rakudo patch dosnt work 21:51
jnthn: i see that in terms.pm are other acurances of the symbol OS, might that the reason why it breaks? 21:52
jnthn lichtkind: It'd help to see your patch 21:53
lichtkind mom
jnthn just gist the diff
lichtkind github.com/lichtkind/rakudo/commit...2d743b80a7
github.com/lichtkind/rakudo/commit...78d532fc41 21:54
the first i did after we spoke
jnthn lichtkind: If you remove $OS and other things later in the code use it then sure, it'll be a problem. 21:55
Don't see where that's happening though. 21:56
lichtkind: So, how does it fail? 21:57
lichtkind like said 21:59
github.com/lichtkind/rakudo/commit...78d532fc41
sorry
Missing or wrong version of dependency 'src/stage2/NQPCORE.setting'
jnthn That error is nothing to do with your change, it means something isn't built properly. 22:00
jnthn You just did "make" after your changes? 22:00
Did you rebuild NQP in the meantime?
Are you in the build directory? 22:01
lichtkind yes i had no problem with the build
it came just runtime 22:02
lichtkind i knowits bit frustrating buts its bit new to me 22:03
jnthn Do you get the error when you do "./perl6", or only when you actually run some code? 22:06
Anyway, it's almost certainly an odd build issue. I suggest just a "make clean && make"
lichtkind i called locale perl6 -e '...' 22:07
i put os back into it now i cant compile it
colomon n: (-> *%a { }).count 22:13
p6eval niecza v15-6-gefda208: OUTPUT«Potential difficulties:␤ %a is declared but not used at /tmp/uXO2iYHLPP line 1:␤------> (-> *⏏%a { }).count␤␤»
colomon n: say (-> *%a { }).count
p6eval niecza v15-6-gefda208: OUTPUT«Potential difficulties:␤ %a is declared but not used at /tmp/0UXVmTTJQA line 1:␤------> say (-> *⏏%a { }).count␤␤1␤»
sorear o/ colomon 22:15
colomon \o
colomon sorear: a new spectest says that last .count call should return 1. Any feelings on fix versus fudge? 22:15
should return 0, sorry
is (-> *%a { }).count, 0, 'slurpy named causes no count change'; 22:16
sorear n: say (-> *% {}).count
p6eval niecza v15-6-gefda208: OUTPUT«1␤»
sorear n: say (-> *%a {}).count #OK
p6eval niecza v15-6-gefda208: OUTPUT«1␤»
sorear two ways to make the output easier to read
alternatively, we could disable warnings in p6eval
comments?
re. your real question - let's at least try to fix it 22:17
colomon I think the warnings are pretty frequently useful, even in p6eval. Though that particular one might be worth suppressing, if we can still get other warnings. 22:18
would that be SLURPY_NAM 22:21
?
sorear yes
colomon if ((fl & Parameter.SLURPY_NAM) != 0) continue; 22:23
? That's in sig_count. (er, that's my suggested and completely untested fix.)
niecza> say (-> *%a {}).count 22:25
0
arity.t passes with it. 22:27
sorear colomon: I think that's reasonable 22:29
colomon spectesting 22:30
pass, patch coming along in a sec 22:37
dalek ecza: 87bc0df | (Solomon Foster)++ | lib/Builtins.cs:
A slurpy hash parameter is just putting a name on the normal named arguments, so it does not affect arity.
22:38
colomon sorear: how have you been? 22:51
sorear fine 22:56
colomon things have been going pretty well here, except for a near-complete lack of p6 tuits. 22:58
lichtkind quasi blocks are compiled to AST at runtime right? 23:00
TimToady: allright from your comemtns i excerpted new explanation of $*ON_DIE and $*ON_ERROR but wth is $*COMPILING and $*DEBUGGING for? 23:11