Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-03-21

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:02 literal http://search.cpan.org/perldoc?once
00:02 literal Perl 6 doesn't have ONCE {}, does it?
00:02 literal if not, should it? or shouldn't it?
00:09 TimToady what do you mean by ONCE?
00:10 TimToady you might be looking for START {}
00:10 literal like that Perl 5 module does it
00:10 literal hm, yes, could be
00:10 TimToady it's what state vars use the first time through to init
00:10 literal but a START would be run before the "my $self = shift;" there, wouldn't it?
00:12 TimToady no, and ENTER would
00:12 literal ok
00:12 TimToady START isn't quite the same as p5's ONCE
00:12 TimToady if you clone a closure, START will run again
00:13 TimToady since it's logically a different sub
00:13 TimToady p5's definition is a bit too static, actually
00:13 literal yeah
00:16 NoirSoldats joined #perl6
00:26 pugs_svn r25958 | lwall++ | [STD] reattach accidentally severed PREs and POSTs
00:26 pugs_svn r25958 | lwall++ | [Cursor] interally attach ast as _ast rather than _
00:26 pugs_svn r25958 | lwall++ | [viv] print STDERR instead of warn to suppress perl -d confessions
00:26 pugs_svn r25958 | lwall++ | [gimme5] didn't translate @*FOO correctly to localizable @::FOO global
00:38 bacek_ joined #perl6
00:42 mikehh rakudo (e38edf9) builds on parrot r37613 - make test/make spectest PASS - Kubuntu Intrepid i386
00:48 dalek rakudo: a67ef98 | (Stephen Weeks)++ | Test.pm:
00:48 dalek rakudo: Put Test into the Test namespace
00:48 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a​67ef98a983208c2fbc7e47e077982076d336e4c
01:00 nnunley joined #perl6
01:15 amoc joined #perl6
01:34 literal re the above rakudo commit: so exporting works now?
01:34 dukeleto joined #perl6
01:35 literal I see it uses C<package> rather than C<module> though
01:37 TimToady yes, that looks kinda bogus, given it's specced to switch to Perl 5 when it sees that...
01:38 eternaleye joined #perl6
01:42 skids joined #perl6
01:51 Tene Oh, right.
01:51 * Tene fail. ><
01:54 dalek rakudo: 6a4058a | (Stephen Weeks)++ | Test.pm:
01:54 dalek rakudo: Use 'module' instead of 'package'.  literal++
01:54 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​a4058a276e1882eb3a11a1ba605d5838fd6c646
01:55 Tene literal: yes, exporting works to some degree
01:55 Tene literal: only the :DEFAULT tag works, though.
01:57 literal ok
02:11 gothos joined #perl6
02:11 dalek rakudo: 627b6d6 | pmichaud++ | docs/spectest-progress.csv:
02:11 dalek rakudo: spectest-progress.csv update: 325 files, 7271 passing, 0 failing
02:11 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​27b6d63a6b0de881911eaefa3f1fbb18b30ecb2
02:58 justatheory joined #perl6
02:58 bp0 left #perl6
03:13 s1n1 joined #perl6
03:14 s1n1 frooh: ping
03:14 frooh 1 sec, phone
03:20 kimtaro_ joined #perl6
03:30 dukeleto joined #perl6
03:33 s1n1 frooh: i just sent you an email, i have to get up early tomorrow
03:34 frooh wait
03:34 frooh I'm back
03:34 s1n1 read the email real fast then
03:34 frooh is there anything you'd want to realtime talk about?
03:34 frooh k
03:34 frooh one sec
03:35 frooh I agree on all counts of the email
03:35 frooh especially (imho) the last and most important part
03:35 frooh I look forward to those links
03:35 frooh and I have a bunch that wayland has sent me so I'll maybe read them tonight
03:35 s1n1 they're _long_, so i'm still reading them
03:36 frooh right
03:37 frooh well, you get rest etc.  I think I am totally free tomorrow, which will probably mean a lot of destressing, but I can talk about stuff, but probably not code
03:37 frooh it was a very hectic work week :-)
03:39 s1n1 i know the feeling
03:39 frooh yeah, in general I don't let work get to me, but I am kinda in charge of the project and it's behind my schedule, so yeah
03:43 s1n1 i'll be home around noon, have to do some studying, but i'll be around to talk
03:44 frooh joined #perl6
03:44 frooh s1n1: sorry, ubunut crashed...
04:00 tarbo2 joined #perl6
04:03 meppl good night
04:03 s1n1 frooh: tis fine, i was just saying i'll be home after noonish tomorrow
04:07 frooh k, I'll talk to you then for sure
04:11 s1n1 left #perl6
04:27 frooh does the autothreading in junctions do any short circuiting?
04:31 TimToady yes
04:32 TimToady at least, it's allowed to short circuit in any order
04:32 TimToady so it can do what it thinks are the cheap tests first, or the ones likeliest to falsify
04:33 TimToady even one() can short-circuit as soon as it finds two
04:36 frooh and am I correct that 1|2|3|4 autothreads, but my @a = 1,2,3,4; any(@a) doesnt?
04:37 frooh theoretically because @a could be arbirarily large?
04:44 TimToady I don't understand your question.  any(@a) is exactly equivalent to 1|2|3|4
04:44 frooh ok, then I don't understand this:
04:44 frooh reenode.net/faq.shtml#nicksetup
04:44 frooh 23:03 < meppl> good night
04:44 frooh er
04:45 frooh Junctions pass as part of a container do not cause autothreading
04:45 frooh unless individually pulled out and used as a scalar
04:45 frooh what does that mean?
04:45 OuLouFu joined #perl6
04:46 TimToady @a there doesn't contain a junction
04:46 lambdabot Maybe you meant: activity activity-full admin all-dicts arr ask . ? @ v
04:46 TimToady so that doesn't apply
04:46 frooh so did I mean:
04:46 frooh and am I correct that 1|2|3|4 autothreads, but my @a = 1,1|2,5|3,4; any(@a) doesnt?
04:47 TimToady to the first approximation, that means if you pass junctions as part of the list context part of the arguments, they're just scalars
04:47 TimToady so you end up with 2-deep anys there
04:48 TimToady but it also means if you pass in @a as a scalar argument it doesn't matter that it contains junctions
04:48 frooh hmmm
04:50 frooh is there anyway you could explain with code?
04:50 frooh becasue I don't really follow
04:51 TimToady my @a = 1, 1|2, 3|4; sub foo(@x) { for @x { .bar } }; foo(@a)
04:51 TimToady no autothreading happens until $_.bar
04:51 frooh oh
04:51 frooh ok
04:53 frooh ok, how about this: is there a way we can use junctions to autothread maps and stuff?
04:54 frooh I am guessing not....
04:57 TimToady if you declare the parameter to the block as Any, it'll autothread
04:57 TimToady map -> Any $x { $x.say }, @a
04:57 TimToady but blocks default to Object now
04:58 frooh that's really cool
04:58 frooh so is the basic idea behind junctions, as of now, to provide a lingustically cheap threading?  or is it for nice things like $f = 1|2?
04:58 TimToady it's supposed to just all fall out of whether the dispatch fails to Object, which delegates to junction
04:59 TimToady it's secondarily about threading, and mostly about distributing an operator over data values linguistically just like English
04:59 frooh ok
04:59 TimToady if $f equals 1 or 2 is good English
04:59 frooh right
05:00 frooh and I remember when I learned perl years ago trying to do if ($f == 1|2|3)
05:00 TimToady and it works very well where the comparison is implict, like with when statements
05:00 frooh right, which is when I have used them so far
05:01 amoc rakudo: say #{ comment} "hi"
05:01 p6eval rakudo 627b6d: OUTPUT«say requires an argument at line 1, near " #{ commen"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
05:01 frooh so could I do this: given ($body) {when(.hasfeet&.hashands&.hashead) { say "doing well"} }
05:02 frooh that's all I can really imagine for &
05:02 TimToady std: given ($body) {when(.hasfeet&.hashands&.hashead) { say "doing well"} }
05:02 p6eval std 25958: OUTPUT«##### PARSE FAILED #####␤Malformed block␤when() interpreted as function call at line 1 ; please use whitespace instead of parens␤Unexpected block in infix position (two terms in a row) at /tmp/K8eNnYaIts line 1:␤------> [32mody) {when(.hasfeet&.hashands&.hashead) [31m{ say
05:02 p6eval .."doi...
05:02 frooh oh yeah
05:02 frooh std: given $body {when .hasfeet&.hashands&.hashead { say "doing well"} }
05:02 p6eval std 25958: OUTPUT«Potential difficulties:␤  Variable $body is not predeclared at /tmp/J2r953xkyb line 1:␤------> [32mgiven $body[31m {when .hasfeet&.hashands&.hashead { say[0m␤ok 00:04 36m␤»
05:03 TimToady basically, it likes the syntax
05:03 frooh but other than that it works...
05:03 frooh very cool
05:03 TimToady but usually you want whitespace around your binary ops
05:03 TimToady since if it gets out of sync, it could parse &.foo as a function call
05:04 TimToady er, method call
05:04 frooh ok
05:04 frooh so preferably
05:04 frooh std: my $body; given $body {when .hasfeet & .hashands & .hashead { say "doing well"} }
05:04 p6eval std 25958: OUTPUT«ok 00:04 36m␤»
05:04 frooh looks better anyway
05:04 TimToady std: given "body" { when .hasfeet & .hashands & .hashead { say "doing well"} }
05:05 p6eval std 25958: OUTPUT«ok 00:04 35m␤»
05:05 frooh but that would give a runtime error right?
05:05 frooh because Str doesn't have those methods?
05:05 TimToady well, someone might have monkey patched it :)
05:05 frooh hahaha
05:05 frooh ok
05:05 * frooh wonders...
05:06 amoc there is any tickets about 'perl6 comment' in rakudobug, commentation is not dealt with?
05:06 frooh rakudo: given "frew" { when /^fr/ & /ew$/ { say "hello frew!" } }
05:06 amoc ...yet?
05:06 p6eval rakudo 627b6d: OUTPUT«hello frew!␤»
05:06 frooh rakudo: given "fre" { when /^fr/ & /ew$/ { say "hello frew!" } }
05:06 p6eval rakudo 627b6d: RESULT«Bool::False»
05:07 TimToady well, it should probably be returning Nil, not False
05:07 frooh but still, the case that matters to me works
05:08 frooh so how do you feel linguistically about people using junctions for autothreading?
05:08 TimToady amoc: dunno, I don't track that
05:08 frooh you don't think that should be a separate deal?
05:08 TimToady depends on what you mean by that
05:09 TimToady there's no guarantee all the threads will run
05:09 frooh so I could do something like map -> Threadable $f { $f.foo }
05:09 TimToady if you want guarantees you should be using hypers instead
05:09 frooh so if I want a threaded map I use what, >> ?
05:09 amoc okay, thank you.
05:10 TimToady hyper map {...}, list
05:10 frooh what if I want OO syntax?
05:10 TimToady you'll still get the results in the same order, however
05:10 frooh list.hyper map { } ?
05:10 TimToady list».map
05:10 frooh well, for a maa we want them in the same order, right?
05:10 frooh map*
05:10 frooh haha, nice
05:11 TimToady rakudo: [1,2,3]>>.map: { .say }
05:11 p6eval rakudo 627b6d: OUTPUT«Statement not terminated properly at line 1, near ">>.map: { "␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
05:11 TimToady pugs: [1,2,3]>>.map: { .say }
05:11 p6eval pugs: RESULT«((*** Cannot cast from VList [] to Pugs.AST.Types.VCode (VCode)␤    at /tmp/jV7wtIcbG7 line 1, column 10 - line 2, column 0, *** Cannot cast from VList [] to Pugs.AST.Types.VCode (VCode)␤    at /tmp/jV7wtIcbG7 line 1, column 10 - line 2, column 0, *** Cannot cast from VList [] to...
05:12 TimToady std: [1,2,3]>>.map: { .say }
05:12 p6eval std 25958: OUTPUT«ok 00:02 36m␤»
05:12 TimToady std: [1,2,3]».map: { .say }
05:12 p6eval std 25958: OUTPUT«ok 00:02 36m␤»
05:12 frooh speaking of
05:12 frooh I still don't understand the diff between (..) and [..]
05:12 frooh [] makes an array and () makes a List?
05:13 TimToady () doesn't make anything
05:13 TimToady it's only for grouping
05:13 frooh ok
05:13 frooh so 1,2,3,4 makes a list
05:13 frooh () groups it (for . ops etc)
05:13 frooh and [] gives me an array from that list?
05:13 frooh and arrays are mutable
05:13 frooh where lists aren't
06:00 amoc i think it is.
06:05 Tene hmm... wonder if jnthn is waking up soon...
06:05 Tene I have a weird problem.
06:19 ejs joined #perl6
06:44 amoc hello,
06:44 amoc is, my Int $n, and, my $n of Int, is different?
06:46 amoc perl6: my Int $n = "str";
06:46 p6eval rakudo 627b6d: OUTPUT«Type mismatch in assignment.␤current instr.: 'die' pc 15868 (src/builtins/control.pir:204)␤»
06:46 p6eval ..pugs: RESULT«\"str"»
06:46 p6eval ..elf 25958: RESULT«"str"␤»
06:46 amoc perl6: my $n of Int = "str"; say $n.WHAT
06:46 p6eval rakudo 627b6d: OUTPUT«Str␤»
06:46 p6eval ..elf 25958: OUTPUT«Unknown rule: trait_verb:fulltypename␤It needs to be added to ast_handlers.␤ at ./elf_h line 2841␤»
06:46 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "of"␤    expecting "?", "!", trait, "=", infix assignment or operator␤    at /tmp/doIHnnZoul line 1, column 7␤»
06:52 amoc perl6: my $n is Int = "str"; say $n.WHAT
06:52 p6eval elf 25958, pugs, rakudo 627b6d: OUTPUT«Str␤»
06:54 amoc Errr. opps.. Int is not implementation type.
06:56 amoc perl6: my Int $foo; my $bar of Int; say ~($foo.WHAT, $bar.WHAT)
06:56 p6eval rakudo 627b6d: OUTPUT«Int Failure␤»
06:56 p6eval ..elf 25958: OUTPUT«Unknown rule: trait_verb:fulltypename␤It needs to be added to ast_handlers.␤ at ./elf_h line 2841␤»
06:56 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "of"␤    expecting "?", "!", trait, "=", infix assignment or operator␤    at /tmp/Z2tZhR7VAG line 1, column 22␤»
06:57 amoc pugs: my $foo of Int;
06:57 p6eval pugs: OUTPUT«*** ␤    Unexpected "of"␤    expecting "?", "!", trait, "=", infix assignment or operator␤    at /tmp/GKeMxMMkFN line 1, column 9␤»
07:07 mtve- joined #perl6
07:25 DemoFreak joined #perl6
07:38 amoc rakudo: sub foo as Int {...}
07:38 p6eval rakudo 627b6d: OUTPUT«Malformed routine definition at line 1, near "foo as Int"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
07:42 dukeleto joined #perl6
07:46 meteorjay joined #perl6
08:06 schmalbe joined #perl6
08:10 Tene_ joined #perl6
08:18 mberends joined #perl6
08:22 disismt1 joined #perl6
08:27 grwi joined #perl6
08:27 grwi left #perl6
08:29 disismt joined #perl6
08:31 disismt joined #perl6
08:33 disismt joined #perl6
08:47 disismt joined #perl6
08:48 disismt joined #perl6
08:53 icwiener joined #perl6
09:04 kimtaro joined #perl6
09:36 masak joined #perl6
09:37 gothos left #perl6
09:37 mberends masak: yo!
09:37 masak mberends: ahoj!
09:38 masak It's weekend, which means Perl 6 hacking galore!
09:38 mberends just concentrating on http://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=63878
09:39 mberends there's a related report and workaround about to be submitted
09:39 masak nice.
09:39 masak I have a question to the Rakudo devs; just going to pull first.
09:50 mberends I liked your enum Context usage in Pod::Parser, but took it a bit further. http://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=64046
09:50 masak my usage? ISTR the enum was there from the beginning...
09:51 mberends it was on ice because of inability to smartmatch in given ... when
09:51 masak ah, yes.
09:52 mberends given ... when int E::member { ... } works around it using the 'int' cast
09:53 mberends dumbs down the match, as it were
09:53 masak ok, here goes. pmichaud, jnthn: why is this happening> http://gist.github.com/82795
09:54 masak s/>/?/
09:56 mberends masak: why lines instead of slurp ?
09:56 masak mberends: I discovered lines today at breakfast.
09:56 masak it's slurp + split("\n")
09:56 masak very convenient.
09:56 mberends ok
09:57 masak but it comes in two flavours: a fh one and a Str one, only the former being implemented yet.
09:57 masak so I thought adding the latter would be a simple patch.
09:57 masak it was, except that it doesn't work. and now I'm stumped, and wondering how to proceed.
09:58 masak up until now, I have nothing but praise for the way this setting thing works. it makes Rakudo programming a hundred times more accessible for non-Parroters.
09:58 mberends would it help to type the $filename parameter ?
09:59 masak I'll try, but we don't really want that.
10:00 masak ...didn't affect the outcome.
10:01 mberends gah, but you did write so in the TODO :(
10:01 masak ah, I thought you meant 'Str $filename'.
10:01 masak sorry.
10:01 kimtaro_ joined #perl6
10:02 masak no, '$filename as Str' is what we want, but since we can't have that yet, it can't be part of the solution.
10:02 masak also, given that I pass a Str, it shouldn't be part of the problem.
10:03 mberends well, I thought 'Str $filename' and '$filename as Str' were equivalent, but that may my C# and VB.NET Kool-Aid kicking in.
10:04 mberends s/may my/may be my/
10:06 masak mberends: S02:1092.
10:06 Cybera joined #perl6
10:06 Cybera left #perl6
10:06 Cybera joined #perl6
10:06 Cybera left #perl6
10:06 Cybera joined #perl6
10:07 masak Cybera: welcome, goodbye, welcome, goodbye, and welcome.
10:07 Cybera perl6: "hello world".say
10:07 p6eval elf 25958, pugs, rakudo 627b6d: OUTPUT«hello world␤»
10:07 masak consensus++
10:10 * mberends gets as/of now. has masak++ tried
10:10 masak no, but I don't believe 'as' is implemented. I'll try, though.
10:10 masak and, as I said, that can't be the issue.
10:10 mberends multi sub lines(Str $filename) { ...
10:11 pmurias joined #perl6
10:11 masak aye, tried that. same error.
10:11 mberends ughk
10:12 masak in the best case, I've misunderstood something, and jnthn will say 'duh' and fix it.
10:12 masak in the worst case, I get to submit another rakudobug :)
10:13 bacek good evening
10:13 masak bacek: salutations to you, sir.
10:13 bacek masak: how things?
10:14 masak bacek: good, good. it's the weekend! :)
10:14 masak bacek: a ty?
10:14 bacek masak: almost good :)
10:14 masak oh, right. I promised to write in Cyrillic. hold on... :)
10:15 masak а ты? :)
10:15 bacek masak: отлично! :)
10:15 amoc bacek: good morning !
10:15 masak yes, isn't it? :P
10:16 bacek masak: "отлично" translates as "excellent" :)
10:16 * masak knows
10:16 bacek amoc: it's evening!
10:17 * amoc must be tired to read 'evening' as 'morning'
10:17 amoc bacek: evening!
10:18 mberends masak: if your BSD port allows it, you may be able to rebuild netcat to enable -c and -e though �DGAPING_SECURITY_HOLE ;) See also: http://sectools.org/netcats.html
10:19 masak mberends: sorry to react this way, but... meh. :P
10:19 masak if you introduce platform-specific solutions into your code, why should I have to do extra work?
10:20 bacek masak: (problem with "lines") You can workaround it by creating setting/IO.pm with single "multi sub lines" and remove !EXPORT(lines) from classes/IO.pir
10:20 masak bacek: thanks!
10:20 masak that makes a weird kind of sense, I guess.
10:20 bacek but anyway, it deserves own bug report :)
10:21 * masak submits
10:21 mberends I really would like you to drive podserver over your own docs :) A: because rakudo does not (yet) implement the platform-independent solution.
10:22 * bacek start thinking about poke into Parrot guts to resurrect "socket" opcode.
10:22 masak mberends: I may actually need to do this anyway, during the experiments with Web.pm
10:22 masak mberends: I'll try to get a round tuit.
10:23 mberends jnthn++ seems to be warming to the required IO updates to give us socket()
10:24 masak \o/
10:26 mberends Sockets will open the floodgates of Perl 6 networking :) I can't wait...
10:29 masak soon, Perl 6 will be the duct tape of the 'Net!
10:30 * amoc cheers *
10:30 mberends it sure will. there will be an explosion of Perl 6 code when it can network.
10:31 * masak wants that online interactive Perl 6 shell that we had in 2005
10:31 masak maybe that would be a good GSoC task? :)
10:31 mberends masak: not tried here, but is socat available in ports for OSX?
10:31 * masak checks
10:33 masak mberends: yep.
10:34 * mberends will try socat instead of netcat
10:34 kidd joined #perl6
10:37 pmurias mberends: why can't you use the socket functions using FFI?
10:38 mberends sorry, what is FFI?
10:39 pmurias i think it's called NCI in parrot
10:40 bacek pmichaud: there is old implementation of socket API in Parrot.
10:40 pmurias foreign function interface
10:40 mberends ah, thanks. then because I don't know how to. it would be better that running netcat or socat.
10:40 mberends listen() and accept() in-process would be miles faster
10:41 pugs_svn r25959 | masak++ | [t/TASKS] added need for tests for lines()
10:43 meteorjay joined #perl6
10:47 mberends pmurias: I would be enormously grateful if anyone could come up with NCI or FFI to replace line 167 in http://github.com/eric256/perl6-exam​ples/tree/master/lib/HTTP/Daemon.pm
10:50 mberends that webserver is usually available at http://autoexec.demon.nl:8888/
10:51 kate21de joined #perl6
10:52 mberends cycling() &
11:12 dalek rakudo: 836900e | (Carl Masak)++ | src/ (3 files):
11:12 dalek rakudo: [setting/Any-str.pm] implemented lines($filename)
11:12 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/8​36900e534d92c33f69373658708f61f1ada6760
11:13 masak bacek++ for explaining what needed fixing.
11:32 bacek masak: you are very welcome :)
11:35 rindolf joined #perl6
11:38 M_o_C joined #perl6
11:45 bacek masak: according to spec "multi lines (Str $filename,...". Why don't put named args in signature even if they are not handled yet?
11:45 masak bacek: I believe that should be '$filename as Str'.
11:45 masak if the spec says 'Str $filename', it's because it's wrong.
11:46 bacek masak: may be. But I'm talking about "Bool :bin" and so on :)
11:46 masak oh.
11:47 * masak fixes
11:47 bacek :)
11:50 pugs_svn r25960 | masak++ | Merge branch 'typo'
11:56 masak it surprises me somewhat that $enc has the default 'Unicode'. in the eyes of some people, Unicode and UTF-8 may be synonyms, but they really aren't.
12:00 riffraff joined #perl6
12:02 masak also, $nl is a slightly misleading name, given the discussion we had about input-record-separator et al.
12:02 masak (hm, perhaps not. the sub is called 'lines', after all)
12:17 rindolf joined #perl6
12:17 diakopter eee
12:18 Whiteknight joined #perl6
12:19 diakopter eee
12:19 masak diakopter: can I help you, sir? :)
12:20 Matt-W Morning
12:20 masak Matt-W: OH HAI
12:20 amoc morning!
12:20 diakopter 13hr round tuit today
12:21 Matt-W masak: if you get a few minutes, could you pull form and try to run the tests? I'd love to know if you also see an infinite loop in 03-textformatting
12:21 masak Matt-W: gladly, sir.
12:21 Matt-W cheers
12:21 masak I'm doing other things, but I can multitask. :)
12:21 Matt-W :)
12:21 Matt-W I have to do some things now that I can't multitask as they involve the bathroom and copious quantities of hot water
12:21 Matt-W something laptops aren't fond of
12:21 * masak does './proto update form'
12:22 Matt-W but I shall be back later
12:22 * diakopter is a Matt W
12:23 * amoc feels guilty that he bug-reported even before reading test script.
12:24 amoc sorry, but may i ask what 'dispatch' generally mean? I really cannot guess exactly.
12:25 diakopter decide where to redirect and redirect
12:25 amoc er..
12:25 diakopter decide where to redirect, and then redirect there
12:25 masak amoc: in the context of methods and subs, decide which one to call.
12:26 masak Matt-W: aye, loopty-loop.
12:26 masak Matt-W: 'course, Alan Turing says I can't know whether it will eventually terminate... :P
12:26 * diakopter remembers the days of IRCers #perl6 while showering
12:27 * amoc read docs again
12:30 amoc masak: diakopter: thanks for your kindness !
12:32 dalek rakudo: d448f91 | (Carl Masak)++ | src/setting/Any-str.pm:
12:32 dalek rakudo: expanded signature of lines multi
12:32 dalek rakudo: Suggested by bacek++.
12:32 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d​448f91871e8c9c805eafe212d52d3c807b54be9
12:35 NordQ joined #perl6
12:36 bacek masak: You;ve put this checks into wrong file... They should be in IO.pm.
12:37 masak bacek: right. fixing. :)
12:39 mberends Matt-W: (when dry) prove on debian stable (5.0 Lenny) does not support -e :(
12:41 * mberends suggests http://github.com/eric256/perl6​-examples/blob/master/bin/prove
12:41 masak gosh, we have substitutes for everything nowadays, don't we? :)
12:42 bacek mberends: it does
12:43 bacek mberends: aptitude install libtest-harness-perl
12:45 mberends bacek: apt said  selecting perl-modules instead of libtest-harness-perl, perl-modules is already the newest version :(
12:46 * mberends considers switching to 'testing' or 'unstable'
12:46 bacek mberends: apt-cache policy  libtest-harness-perl?
12:48 mberends bacek: lib-test-harness: (none) perl-modules: 5.10.0-19
12:49 bacek mberends: strange...
12:49 bacek apt-cache policy libtest-harness-perl
12:49 bacek libtest-harness-perl:
12:49 bacek Installed: 3.12-1
12:49 bacek Candidate: 3.12-1
12:50 bacek mberends: can you try apt-get instead of aptitude?
12:51 mberends bacek: less `perldoc -l Test::Harness` shows 2.64. Yep, tried apt-get.
12:51 * masak takes a walk in the sunshine
12:51 dalek rakudo: 79bc4f3 | (Carl Masak)++ | src/setting/ (2 files):
12:51 dalek rakudo: moved param checks in lines from delegator to delegatee
12:51 dalek rakudo: Suggested by bacek++.
12:51 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/7​9bc4f3156b3d6a9cd061a428d0e250ac1e15fa6
12:52 pguillaum joined #perl6
12:52 pguillaum left #perl6
12:52 pguillaum joined #perl6
12:54 mberends bacek: this laptop should stay with debian lenny, but I shall try squeeze or sid on the eeePC shortly.
12:55 bacek mberends: hmm.. 2.64 is from default perl 5.10. I don't understand why apt refuses to install libtest-harness-perl
12:55 mberends probably perl-modules is a bundle that specifies 2.64
12:56 bacek mberends: I uses Lenny. without "testing", "sid" or "experimental"
12:56 bacek mberends: correct. But you should able to install newver version...
12:57 Matt-W masak: Good it's not just me
12:57 Matt-W mberends: Booooooooooooooo
12:57 mberends booohooo
12:58 jnthn hhi all
12:58 mberends bacek: let me try removing perl-modules and then install lib-test-harness-perl instead
12:59 mberends jnthn: hhi
12:59 bacek mberends: removing perl-modules is bad idea :)
12:59 bacek jnthn: OH HI
12:59 mberends oh, glad you told me Just In Time
13:00 jnthn ooh, someone moved lines to the setting?
13:00 jnthn Did they manage to do it without breaking a spectest that wanted it exported? :-)
13:01 * jnthn failed to move it for that reason...which distracted him into working on import...
13:02 bacek jnthn: I proposed a "cheat" for this :)
13:05 masak jnthn: I didn't move anything, I just put the sub part in the setting.
13:05 masak but yes, all spectests pass, even after the change.
13:05 jnthn masak: aha, OK
13:05 jnthn I'm hoping we can avoid such cheats soon.
13:05 masak I filed a rakudobug about it. :)
13:06 jnthn I started working on import last night. We have a first cut, but it's wrong.
13:06 jnthn masak++ - good, we'll not forget to come back and clean it up
13:06 bacek afk & # sleep
13:06 masak bacek: 'night
13:06 xinming joined #perl6
13:06 jnthn Though we're not going to do it right until two more pieces are in place at least.
13:06 bacek masak: g'night
13:06 mberends bacek: thanks
13:07 masak jnthn: I saw you and pmichaud speaking about seen-to-be-features in the logs the other day. among other things Buf. pmichaud prognosticized that someone might need it before the summer.
13:07 masak I think I'm that someone. I will have a go at implementing it.
13:08 masak will do it fairly TDD. at present, there is only one spectest for Buf. it checks that it is an already-defined type.
13:08 jnthn s/seen/soon/ # ?
13:08 masak I suspect that even fleshing out will require some clarifications in the spec.
13:08 masak jnthn: oh. aye.
13:09 jnthn Tests and demand would certainly help get us towards an implementation.
13:09 masak for example, how much is a Bug Str-like?
13:09 masak can I do .subst on a Buf?
13:09 masak jnthn: the demand is that I need to be able to escape URLs in Web.pm.
13:09 jnthn I don't know, and I don't know what the spec says on those issues either, if anything.
13:10 jnthn Aha, OK.
13:10 masak jnthn: I collected all mentions on Buf in the spec. let me nopaste it for you.
13:10 jnthn OK, nice.
13:11 masak http://gist.github.com/82837
13:11 jnthn (BTW, to fill anyone in on wondering what needs to happen to get import right, we need to import to the lexpad rather than the namespace by default. However, that won't fly at the moment because (1) the class boundary/lexical issue and (2) lack of lexical routines and (harder...ugh) lexical multi subs)
13:11 Woody4286 joined #perl6
13:13 Whiteknight joined #perl6
13:15 jnthn masak: quite a few "may be" in there ;-)
13:15 masak it's a liberal type :)
13:17 diakopter does Conjectural
13:17 masak ;)
13:17 hercynium joined #perl6
13:17 diakopter also, does Conjection
13:18 * jnthn thinks
13:19 jnthn y'know, a lot of what we need to do the underlying buf8, buf16 and buf32 is exactly what we need for compact arrays.
13:19 masak right.
13:19 jnthn The spec says as much.
13:20 jnthn I figured we'd write a CompactStore PMC or something.
13:21 jnthn Then we can use it to provide the actual storage for buf8, buf16 and buf32, as well as my int8 @array etc.
13:22 jnthn And yes, looks like Buf wants to be a parametric role.
13:22 diakopter parameterized
13:23 * diakopter hit enter little late
13:23 jnthn Yes, Array needs to be one of those too. I'm working towards that, but it's...painful.
13:24 diakopter jnthn: steal the .net msil implementations - just convert 'em to to pbc :P
13:25 diakopter kidding, sort of.
13:25 jnthn ;-)
13:25 jnthn Perl 6's idea of parametric poly could be interesting to map to .Net's one. :-)
13:26 jnthn (Not impossible, mind.)
13:26 jnthn The main issue is that you can parameterized on values rather than just type-ish things in Perl 6.
13:27 Schnueff joined #perl6
13:35 kimtaro joined #perl6
13:37 diakopter yeah. considering the practical limitations on creating runtime types.. gotta create/load a new assembly with all its overhead.  hmm. what about a generic type that's "instantiated" by a runtime type manager that creates tuples/permutations of bunch of filler types... lightweight runtime types.  hmmm
13:38 diakopter obviously /unsafe
13:43 jnthn OK, I need some exercise and fresh air
13:44 * jnthn afk - walking to Austria
13:45 masak o_O
13:47 diakopter (and back?)
13:56 clintongormley joined #perl6
13:57 mberends Matt-W: form t/03-textformatting.t takes all available RAM, CPU and time by design, right? ;)
13:57 clintongormley heya - i've just been looking at szabgab's P6 tricks and treats : http://szabgab.com/blog/2009/03/1237284490.html
13:57 justatheory joined #perl6
13:57 clintongormley specifcally how substr fails on a junction
13:58 clintongormley and i was interested to look at another function which has been built to operate on junctions
13:58 clintongormley he writes: "In any case this is an open issue and the Rakudo team will love to see someone who wants to implement  substr() in Perl 6 that will handle junctions correctly. "
13:59 clintongormley i was wondering where this junction-enabled substr would fit into the src/
13:59 clintongormley as a method on class Junction?
13:59 clintongormley or under settings?
13:59 clintongormley any pointers?
14:00 * clintongormley whistles nonchalantly
14:01 clintongormley .oO(I am not alone I am not alone I am not talking to myself like a crazy person )
14:01 mberends we were just being polite in not answering back ;)
14:02 clintongormley :D
14:02 clintongormley i've GOT YOU NOW!
14:02 mberends eek!
14:02 clintongormley any ideas on my questions above?
14:02 mberends er, still reading the P6 page
14:03 clintongormley go down to the bit on "Functions on Junctions"
14:03 clintongormley and it says it fails because substr doesn't know how to handle junctions yet
14:03 clintongormley so i was thinking of trying to make it work
14:04 clintongormley but, not being familiar with the internals AT ALL, i'm desperately grep'ing the code to see where a junction-enabled substr would fit in
14:04 mberends ok, there was #perl6 mention of that less than 2 days ago.
14:05 mberends in a similar scenario the Junction evaluated to 'J'
14:05 clintongormley yep
14:07 clintongormley oooh: TimToady
14:07 clintongormley PLEASE DO NOT USE JUNCTIONS AS SETS!!!!!!!!!!!!
14:08 clintongormley oh dear, that blows my understanding
14:08 masak clintongormley: Junctions are sets, with some additional behaviours.
14:09 masak and yes, I think it blows everyone's understanding at times.
14:09 clintongormley i'm just reading the IRC logs to see why TimToady was so adamant about not using junctions as sets
14:09 mberends yeah, we need to scroll back more than 2 days
14:10 clintongormley btw, .eigenstates?
14:10 clintongormley what does that do?
14:10 clintongormley (apologies to barge in and ask questions like: "what does print mean?")
14:10 masak clintongormley: it looks inside the junction.
14:11 nihiliad joined #perl6
14:11 mberends clintongormley: fwiw, http://irclog.perlgeek.de/​perl6/2009-03-17#i_992109
14:11 clintongormley ta
14:11 masak clintongormley: generally, the S32 documents answer questions like 'what does method/sub X do?'
14:12 clintongormley ok thanks
14:12 * clintongormley is apparently going to have to sit down with S[1..n] and $n bottles of wine
14:13 * mberends ditto
14:14 * masak has done that a few times, but will soon need to do it again
14:14 clintongormley damn when will be seeing the idiots guide?
14:14 * clintongormley looks at masak .oO( u4x? )
14:14 masak clintongormley: we're writing user documentation this summer.
14:14 masak clintongormley: aye.
14:15 masak hopefully we'll get the help of some eager GSoC fellow.
14:15 clintongormley yeah
14:15 skids so maybe we just should implement Set and Bag :-)
14:15 clintongormley do you have the docs planned out yet?
14:16 clintongormley set and bag?
14:16 pmurias clintongormley: junctions don't make a good data structure, they autothread so you have to be carefull when passing them around
14:16 skids They are listed as types.
14:16 masak clintongormley: I have plans, but I'm currently not pouring tuits on them.
14:16 clintongormley pmurias they don't make a good structure because the end user has to be careful?
14:16 pmurias and they are more intended to be used like '$foo & $bar < 8'
14:17 clintongormley and they can only autothread if they have no external impact
14:17 pmurias external impact = ?
14:18 clintongormley ie, they can't change anything other than themselves, or rely on any value other than themselves
14:18 clintongormley otherwise it's not safe to autothread
14:18 * clintongormley is guessing
14:18 skids Since when does Perl keep one from shooting themselves in the foot? :-)
14:19 pmurias you are not supposed to depend on the order of autothreading
14:19 masak junctions are made of pure shoot-in-the-foot matter.
14:20 clintongormley is there any example of junction aware functions yet?
14:20 clintongormley not any/none etc
14:20 skids In perl there are "many ways to do it", but junctions are definitely a prime foot shooting tool.
14:22 masak junctions, in themselves, are "many ways to do it".
14:22 skids clintongormley: if you mean one that does not autothread, yes.  Junction.perl
14:22 clintongormley i was thinking about ones that DO autothread
14:22 skids anything
14:22 pmurias that expects Any
14:22 skids Yeah well OK point taken.
14:23 clintongormley interested to see how one would write substr to work on junctions without doing : for $junction.elements
14:23 clintongormley </pseudocode>
14:23 skids rakudo: my sub foo ($a) { say "#" ~ $a }; my $j = any(1,2,3); foo($j);
14:23 p6eval rakudo 79bc4f: OUTPUT«#1␤#2␤#3␤»
14:25 szabgab wow, someone is reading my blog!
14:25 clintongormley loyal subscriber!
14:25 * gravity really enjoyed szabgab's last perl6 tip entry
14:26 szabgab clintongormley, Just yesterday I added a few tests to t/spec/S03-junctions/misc.t
14:26 clintongormley yes szabgab, i saw that
14:26 szabgab especially for the substr() and juctions things
14:26 clintongormley i was keen to give it a go
14:26 clintongormley but then the word «authothreading» looms, and i throw up my hands
14:26 szabgab gravity, I am happy to hear that
14:30 skids OK, I'll bite, where is this blog?
14:30 clintongormley http://www.szabgab.com/blog/szabgab.rss
14:30 clintongormley http://szabgab.com/
14:33 szabgab looking at the reddit number I wonder why is it going down, do people really downvote the post?
14:33 szabgab if so why ? is that because the post is bad or because they don't want to hear about Perl 6 ?
14:33 clintongormley you can't hope to understand the mentality of everybody on the internet
14:34 clintongormley on http://announce.jpress.co.uk we regularly get people leaving lots of stupid messages with no purpose
14:34 clintongormley "spaghetti monster"
14:34 clintongormley huh?
14:35 clintongormley there are lots of bored people out there
14:35 szabgab have to go now, child pickup service
14:36 disismt joined #perl6
14:41 sri_kraih_ joined #perl6
14:42 sri_kraih_ joined #perl6
14:43 Cybera Have a problem about raduko installing. I got the file using Git in the Program Files , then perl Configure.pl --gen-parrot  , and got error for " cant open " for "Program" , masak said 'Program' is not quoted so not interpreted correctly , and i sent bug report etc. Then I created the folder as C:\git\bin\raduko  , and now i got error as :
14:43 Cybera Can't locate Test/Harness.pm in @INC (@INC contains: lib config /usr/lib/perl5/5.8.8/msys /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/msys /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl .) at lib/Parrot/Configure/Options/Test.pm line 7.
14:43 Cybera BEGIN failed--compilation aborted at lib/Parrot/Configure/Options/Test.pm line 7
14:43 masak Cybera: ah, now I see what it is.
14:44 masak Cybera: you need to install Test::Harness.
14:44 masak Cybera: something like 'sudo cpan Test::Harness'
14:44 masak sorry, I missed that when you /msg'd before.
14:45 Cybera k thx , i will report back about final result :)
14:46 masak ...or the next hurdle. :)
14:46 pmichaud good morning #perl6
14:46 masak pmichaud: greetings.
14:56 FurnaceBoy joined #perl6
14:56 Cybera Use of uninitialized value $dist_id in hash element at C:\Perl\site\lib/CPAN/SQLite/Search.pm line 177.
14:56 Cybera Use of uninitialized value $dist_id in hash element at C:\Perl\site\lib/CPAN/SQLite/Search.pm line 186.
14:57 Cybera Use of uninitialized value in concatenation (.) or string at C:\Perl\site\lib/CPAN/SQLite/DBI/Search.pm line 204.
14:57 Cybera DBD::SQLite::db prepare failed: near ")": syntax error(1) at dbdimp.c line 271 at C:\Perl\site\lib/CPAN/SQLite/DBI/Search.pm line 89
14:58 szabgab Cybera, are you using cygwin ?
14:58 Cybera no
14:58 szabgab you seem to report both about a unixish perl and a windows perl
14:59 szabgab The Can't locate Test/Harness.pm in @INC (@INC contains: lib config /usr/lib/perl5/5.8.8/m  ...
14:59 Cybera i talked about  the errors with jnthn , we also got confused
14:59 szabgab is from unx
15:00 szabgab unix
15:03 Schnueff hi, i guess the link "you will naturally want _documentation_" on rakudo.org should point to /documentation, rather than /how-to-get-rakudo, if sb wants to fix that
15:04 masak rakudo: regex Foo { \d }; 5 ~~ /<Foo>/; my Int $bar = $/ - 1 # am I having unreasonable expectations on type coercion?
15:04 p6eval rakudo 79bc4f: OUTPUT«Type mismatch in assignment.␤current instr.: 'die' pc 15868 (src/builtins/control.pir:204)␤»
15:07 masak perhaps more importantly, how do I work around that? :/
15:07 masak ah, int(...) works.
15:11 mberends masak: what does int( Match ) mean?
15:12 masak mberends: well, I guess it'd numify first.
15:12 masak mberends: in my example, it already had.
15:12 masak (due to the minus op)
15:12 sri_kraih joined #perl6
15:12 mberends yes, but why not Boolify instead for example?
15:15 Cybera this time parrot downloaded without error , it passed to configure part but then                inter::progs -        Determine what C compiler and linker to use...Compilation
15:15 Cybera failed with 'gcc'
15:15 Cybera Use of uninitialized value $make in system at build/gen_parrot.pl line 68.
15:15 Cybera i already have gcc
15:18 pmichaud mberends: rakudo thinks that $/ - 1  is a Num
15:18 Cybera died at Configure.pl line 88
15:18 pmichaud er.... s/mberends/masak
15:18 pmichaud it then complains about assigning a Num to an Int
15:19 masak pmichaud: I'm with you so far.
15:19 mberends masak: http://irclog.perlgeek.de/​perl6/2009-01-07#i_812342
15:19 masak mberends: yeees? :)
15:20 kimtaro_ joined #perl6
15:20 pmichaud afk # meeting
15:21 masak mberends: I read but do not understand. 看不董
15:22 mberends masak: sorry, I was asking first off in what scenario casting from $/ to an int would be used?
15:23 masak mberends: I don't know.
15:23 masak it's not what I want to do in my code right now.
15:23 mberends why did you write '$/ - 1' in the first place?
15:24 masak mberends: in the real code, I extract a column number out of a move syntax using a regex.
15:24 masak due to zero-based arrays, I subtract 1.
15:25 masak the result is a Num in Rakudo, but I want to store it in an Int variable.
15:25 mberends hmm, column number. I think it won't do what you want. Regex ! === Match.
15:25 masak mberends: it's been doing what I want for months.
15:25 masak only today when I introduced types does it fail.
15:26 mberends oh dear
15:26 masak ah, well the int(...) solution worked.
15:26 mberends ok then, back to the grindstone ;)
15:26 masak mberends: and I don't understand your 'Regex !=== Match' objection. it's perfectly reasonable to numify a Match if it's a string containing a number.
15:28 TimToady clintongormley: you shouldn't ever have to write a function to "do autothreading" if it uses a correct multi dispatcher; the problem with substr is likely that it's using a parrot builtin directly
15:28 mberends masak: agreed
15:28 clintongormley hiya TimToady
15:29 amoc joined #perl6
15:29 clintongormley hmm ok - so implementing substr for Junctions, naively, would be to call substr on each of the elements in the junction
15:29 clintongormley but that would be serial
15:30 clintongormley i just can't imagine how one would write that to be in parallel
15:30 mberends clintongormley: do you expect the result to be a Junction of substrings?
15:30 clintongormley yes
15:31 clintongormley much like incrementing a junction returns a junction with each element incremented
15:31 clintongormley EP6NEWBIE
15:35 mberends clintongormley: I don't really know, but you seem to need: Junction -> array -> map substr -> new Junction
15:35 mberends map should autothread
15:36 clintongormley ah right! that was the missing link
15:36 clintongormley ok - so where would this junction aware substring go in the rakudo source?
15:36 clintongormley would it be a method on class junction?
15:36 clintongormley a builtin? setting?
15:37 mberends clintongormley: I don't really know. Really.
15:37 clintongormley i'm assuming that substr($junction) is the same as $junction.substring()
15:38 mberends yes, methinks so too
15:38 clintongormley which would make it a method in class Junction
15:39 skids $i <== 1..$a  # Is $a evaluated when the range is defined, or checked every iteration/slice?
15:39 clintongormley thanks mberends
15:40 mberends clintongormley: good luck in your quest!
15:40 clintongormley heh - it's a rare saturday that i have time to play :)
15:40 clintongormley my quest to get at least a line of code in Rakudo 1.0 may be in vain :(
15:41 mberends there's plenty of time (and space)
15:42 sri_kraih_ joined #perl6
15:51 Tene joined #perl6
15:52 diakopter joined #perl6
15:54 TimToady joined #perl6
15:56 szabgab Cybera, so what is your setup? are you using Windows ? and strawberry perl ?
15:58 Cybera windows , activestate
15:59 TimToady clintongormley: you should not have to worry about junctions in the implementation of substr *at all*
15:59 TimToady autothreading is a function of the dispatcher, not of the individual function
15:59 Cybera yesterday i also downloaded a zip called portable
15:59 TimToady all you have to do is declare a correct signature, and it happens automatically
16:00 clintongormley ok - i brought it up because of a blog by szabgab, where substr($junction,0,3) returns 'Jun'
16:00 TimToady if rakudo isn't autothreading, it's probably because substr is hardwired to a low-level parrot routine that bypasses the normal multi dispatch
16:01 TimToady rakudo: substr("foo"|"bar", 0,2)
16:01 clintongormley so i was thinking of adding a substr method in setting/Junction.pm
16:01 p6eval rakudo 79bc4f: RESULT«"Ju"»
16:01 clintongormley our Junction multi method substr ($junction: ) is export {
16:01 TimToady no, no, no, no
16:02 clintongormley and doing as mberend suggested : $junction->array->map->new junction
16:02 TimToady you never have to worry about Junctions, period
16:02 clintongormley ok
16:02 TimToady if the types are declared correctly
16:02 clintongormley damn - i thought this was something i could try adding :)
16:02 TimToady (and if it's not hardwired wrong)
16:03 TimToady but it sounds like substr is accepting an Object rather than an Any
16:03 TimToady (or it's hardwired)
16:03 TimToady rakudo: &substr.signature
16:04 p6eval rakudo 79bc4f: OUTPUT«Null PMC access in find_method()␤current instr.: '!dispatch_method' pc 17101 (src/builtins/guts.pir:107)␤»
16:04 * skids thought someone (moritz?) was already working on moving substr to setting.
16:05 clintongormley anybody want to point me to something simple that needs to be implemented in setting so that i can give it a bash?
16:06 skids Is it the intent that Set will also autothread, or does that behavior start at Junction?
16:06 TimToady anything under Any autothreads
16:07 TimToady or are you asking if Sets behave like juncitons?
16:07 frooh clintongormley: http://wiki.github.com/rakud​o/rakudo/setting-candidates
16:07 clintongormley ah thanks
16:07 TimToady you have to say any(@$set) or some such
16:07 TimToady or maybe any(%set), if it's bound to a Hash interface
16:08 schmalbe joined #perl6
16:08 sri_kraih joined #perl6
16:10 TimToady well, $set.any probably works too
16:10 rindolf joined #perl6
16:25 TimToady but the basic point is that you can turn any list into a junction using any(), all(), none(), or one()
16:25 TimToady junction is not a role that other types take on
16:26 skids Yeah, I was just wondering where the line was drawn in the sand.  And I guess it's at Junction.  Which makes sense because I understand that somehow the boolean reduce and the autothreading are related.
16:27 skids MMD-wise
16:27 mberends ok, so the fact  substr("foo"|"bar", 0,2) incorrectly returned 'Ju' is due to implementation of substr()
16:27 skids Junctions beget junctions, IIRC.
16:28 skids Oh, I see, yes, something's up there :-)
16:29 skids rakudo:  substr("foo"|"bar", 0,2)
16:29 p6eval rakudo 79bc4f: RESULT«"Ju"»
16:29 skids rakudo:  $a = any("one"|"two"); substr($a, 0,2)
16:29 p6eval rakudo 79bc4f: OUTPUT«Scope not found for PAST::Var '$a' in ␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
16:29 skids rakudo:  my $a = any("one"|"two"); substr($a, 0,2)
16:30 p6eval rakudo 79bc4f: RESULT«"Ju"»
16:30 mberends the first two characters of 'Junction'. we hope to see ("fo"|"ba")
16:30 diakopter someone on wikipedia might update the "license" for PGE appropriately on Comparison_of_parser_generators
16:32 mberends clintongormley: you do pick 'em ;)
16:33 clintongormley :)
16:33 clintongormley yaknow, i thought i'd start with something simple
16:33 clintongormley perhaps rewriting the garbage collector
16:33 clintongormley in lisp
16:33 mberends lol!
16:34 skids I have that problem too.  Always tend to bite the rotten apple in the bag.
16:34 clintongormley i don't know what that pmichaud bloke has been DOING all this time
16:34 clintongormley honestly
16:34 mberends reading our drivel, unfortunately
16:34 * clintongormley starts the p6-on-php project
16:34 szabgab Cybera, so on what os are you trying to install Rakudo ?
16:35 Cybera windows XP
16:35 szabgab and what perl have you installed ?
16:35 szabgab what perl 5 I mean, of course
16:35 Cybera activestate
16:35 szabgab Then maybe tray to switch to Strawberry
16:36 Cybera ok
16:36 S3v3N joined #perl6
16:36 skids Well, moving the PIR into setting and wrapping it should "fix" but then all the Parrot internals would be using a different proto, too.  Betcha that breaks something.
16:36 szabgab remove the ActivePerl and install Strawberry Perl
16:36 S3v3N left #perl6
16:36 mberends remove the Windows XP and install Linux
16:37 skids rakudo:  my $a = any(1|2); substr("foo", 0,$a)
16:37 szabgab you might need to use mingw32-make instead of dmake - I am not sure
16:37 p6eval rakudo 79bc4f: OUTPUT«get_integer() not implemented in class 'Junction'␤current instr.: 'parrot;Any;substr' pc 12766 (src/builtins/any-str.pir:370)␤»
16:37 clintongormley ok, i'm now looking at implementing capitalize()
16:38 Cybera for linux , i will try it later on open suse.
16:38 clintongormley which i'd think of doing by splitting a string on whitespace (which i capture), before uc'ing the first character of each non-whitespace string
16:39 clintongormley so how do i write (p5) @strings = split($string,/(\s+)/,1)
16:41 clintongormley s/1/-1/
16:42 skids you mean  @strings = split(/(\s+)/,$string,-1) of course
16:43 clintongormley sorry yes :)
16:43 clintongormley ah - getting this
16:46 dalek rakudo: de786f3 | pmichaud++ | docs/spectest-progress.csv:
16:46 dalek rakudo: spectest-progress.csv update: 325 files, 7280 passing, 0 failing
16:46 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d​e786f360f93d0f1c37bacd1ced59a94d95d4d28
16:49 mberends Cybera: that was half joking. But if your hard drive has space, dual boot is useful.
16:51 TimToady don't use split, use comb
16:51 TimToady which even defaults to words
16:52 * amoc sighs
16:52 Cybera btw , it is working now with strawberry i guess.
16:53 Psyche^ joined #perl6
16:53 mberends Cybera: nice
16:58 TimToady @strings = $string.comb
16:58 lambdabot Unknown command, try @list
16:59 Cybera if there are other people had this problem with activestate, I would be a good idea to note about using strawberry in the installing instructions.
17:00 TimToady rakudo: .say for "foo  bar  baz".comb
17:00 p6eval rakudo de786f: OUTPUT«foo␤bar␤baz␤»
17:00 TimToady oh, but capitalize wants to preserve whitespace, so nevermind
17:01 mberends Cybera: could you write up a mini-howto and mail it to rakudobug@perl.org ?
17:01 TimToady really wants to be $string.subst(/(\S+)/, ucfirst($0), :g) or some such
17:04 Cybera ok . I also sent a bug about the case if git is installed in program files and raduko downloaded inside. not quoting Program makes configure.pl not interpreting the path correctly.
17:04 mberends Cybera: thanks!
17:04 masak TimToady: so .subst _does_ create an invisible closure around its second argument?
17:04 Cybera np
17:06 TimToady no, but it does modify its callers $/ to that $0 means the right thing
17:06 masak TimToady: but... isn't the second argument evaluated before the call?
17:06 TimToady ordinary comma args can never assume a closure unless you have a macro
17:07 masak I just don't see how this would work without it having a closure around it.
17:07 TimToady oh, yeah, you should always write an explicit closure there
17:07 TimToady my bad
17:07 masak np.
17:07 TimToady sorry, distracted...
17:07 masak just checking.
17:08 masak TimToady: pmichaud and I have been discussing whether .subst should special-case the second arg, that's why I was asking.
17:09 TimToady I don't think it should special case it
17:09 TimToady s/// is already the special case
17:09 masak right.
17:10 TimToady and commas should generally mean normal arguments
17:10 masak aye.
17:12 NordQ joined #perl6
17:20 frooh_ joined #perl6
17:21 frue joined #perl6
17:21 mberends phrugh: hi
17:23 pugs_svn r25961 | masak++ | [u4x/P2T1A] switched to .subst as the example method
17:24 frue haha, hi
17:25 * mberends likes that game
17:25 masak throoix: hello
17:26 * frue wonders how that one works
17:26 masak frue: 'frue' means 'early' in Esperanto.
17:27 frue really?  Did not know that.
17:27 baest and Mrs in Danish :)
17:27 frue hahahaha
17:28 mberends moritz_ would confirm it's also 'early' in German, with umlaut-u
17:29 Schnueff and an h
17:29 Schnueff frueh
17:29 mberends ja
17:30 masak the German word is probably a loan from Esperanto. :P
17:30 skids Just when I had finally started to "always remember the ;" along comes PIR :-)
17:30 Cybera fr�h
17:30 mberends bestimmt
17:31 masak skids: it might comfory you to know that you don't have to remember the ';' when a '}' ends a line.
17:31 masak s/fory/fort/
17:31 skids Yeah but I generally use them anyway where I might add lines.
17:32 frue http://svn.pugscode.org/pug​s/t/spec/S32-str/samecase.t
17:32 frue see there for what frue mean's to me :-)
17:33 mberends self-referential tioux!
17:34 frue haha, indeed
17:39 clintongormley hmm, i've just found capitalize in src/builting/any-str.pir
17:39 clintongormley and yet it's supposed to be a candidate for setting/Any-str.pm
17:40 frue clintongormley: the idea is to pit the PIR in the setting
17:40 clintongormley ahhh right, AS the PIR
17:40 frue clintongormley: let me find a link of an example of that for you
17:40 clintongormley not reimplemented in perl6
17:40 skids right, the old PIR implementations need to be replaced.
17:40 clintongormley replaced with p6? or moved?
17:41 frue clintongormley: more or less moved I think
17:41 skids If it can be replaced with pure p6, do so, or move them to inline PIR otherwise.
17:41 clintongormley ok - wouldn't the PIR be more efficient?
17:42 skids Oh, right yeah naturally it should end up in setting/Any-str.pm
17:42 frue no, pmichaud said we should use PIR
17:42 frue I made a bunch of stuff in pure perl6 and it got rejected for efficiency reasons
17:42 clintongormley ok
17:42 clintongormley </sigh>
17:42 clintongormley and i was so proud
17:42 frue yeah
17:42 frue me too :-)
17:43 frue http://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=64020
17:43 skids Hrm, well, he makes the calls.
17:43 clintongormley so a question - does split not return captures?
17:43 frue clintongormley: that patch does almost exactly what you want
17:43 frue except other functions of course
17:44 clintongormley eg split(/(\s+)/,$string) in p5 returns the whitespace as well
17:44 clintongormley but doesn't in p6
17:44 frue rakudo: 'f r e w'.split(' ').join
17:44 p6eval rakudo de786f: RESULT«"f r e w"»
17:44 frue rakudo: 'f r e w'.split(' ')
17:44 p6eval rakudo de786f: RESULT«["f", "r", "e", "w"]»
17:45 frue indeed
17:45 clintongormley is that a bug? or by design?
17:45 frue probably by design, but I don't know
17:46 TimToady there's still a place for pure-Perl implementations, but probably in a generic setting with circularities that defines semantics
17:46 TimToady which implementations (like rakudo) are allowed to override for efficiency
17:47 frue yeah, but clintongormley still needs to know not to spend time on that if he wants to get stuff in rakudo at this time
17:47 TimToady if people want to write a generic CORE.stg in src/perl6 in the pugs repo. that'd be fine
17:47 clintongormley .stg?
17:47 TimToady setting?
17:47 clintongormley ah
17:47 TimToady whatever, just seemed like .set was wrongish
17:48 clintongormley so TimToady, should split return captures? or not?
17:48 TimToady anyway there's already a CORE.pad there that in the long run wants to derived from a CORE.setting
17:49 TimToady probably not
17:50 frue 'f r e w'.comb(/\w+\s+/)
17:50 frue rakudo: 'f r e w'.comb(/\w+\s+/)
17:50 p6eval rakudo de786f: RESULT«["f ", "r ", "e "]»
17:50 frue that might be what you want clintongormley
17:51 clintongormley i can't find any docs for .comb
17:51 frue http://svn.pugscode.org/pugs/docs/Pe​rl6/Spec/S32-setting-library/Str.pod
17:51 frue search for comb
17:52 masak buubot: spack comb
17:52 buubot masak: S02-bits.pod:2 S03-operators.pod:2 S04-control.pod:1 S05-regex.pod:9 S06-routines.pod:1 S09-data.pod:4 S11-modules.pod:1 S22-package-format.pod:2 S26-documentation.pod:1 S29-functions.pod:14
17:52 clintongormley ah tricks!
17:52 clintongormley i used google :)
17:52 masak buu: buubot doesn't seem to reach into S32-setting-library.
17:52 clintongormley and what it returned wasn't any of those
17:53 clintongormley ah i think buubot is finding "comb" as in "combined"
17:53 frue hair tools instead?
17:53 masak buubot: spack \bcomb\b
17:53 buubot masak: S29-functions.pod:8
17:54 skids Anyway it's in http://svn.pugscode.org/pugs/docs/Pe​rl6/Spec/S32-setting-library/Str.pod
17:54 * jnthn is back from his walk
17:54 masak jnthn: how was Austria?
17:54 clintongormley thanks skids
17:56 clintongormley hmm, according to that doc: As with Perl 5's C<split>, if there is a capture in the pattern it is returned in alternation with the split values.
17:56 clintongormley so it looks like that's a bug
17:56 ejs joined #perl6
17:56 jnthn masak: Not so much different from Slovakia, apart from I understood even less of the words. ;-)
17:56 masak clintongormley: I haven't followed 100% what it is you're doing, but if you suspect a bug, please submit a rakudobug.
17:56 masak jnthn: :)
17:57 * masak is heading home for the evening
17:57 szabgab joined #perl6
17:57 masak see you folks around!
17:57 clintongormley rakudo: 'a b c'.split(/(\s+)/)
17:57 p6eval rakudo de786f: RESULT«["a", "b", "c"]»
17:58 mberends rakudo: ' a b c '.split(/(\s+)/)
17:58 p6eval rakudo de786f: RESULT«["", "a", "b", "c", ""]»
17:58 mberends clintongormley: that's why TimToady warns against (mis)using split
17:58 TimToady oh, you mean that kind of capture :)
17:58 TimToady yes, it should return those in alternation
17:59 clintongormley ok, so it is a bug
17:59 frue rakudo: ' a b c '.comb(/\w+/)
17:59 p6eval rakudo de786f: RESULT«["a", "b", "c"]»
17:59 TimToady but comb doesn't return the whitespace at all, so it's no good for capitalize
17:59 jnthn (note on substr handling junctions) in case it wasn't clear, substr will not explicitly handle a junction, the answer will just fall out of auto-threading.
17:59 TimToady that's why I switch to a .subst
17:59 TimToady *switched
18:01 * frue loves girl scout cookes....Somoas!
18:01 nacho joined #perl6
18:02 TimToady "Are those cookies made out of real girl scouts?"  --Wednesday
18:02 frue hahaha
18:02 frue that is disgusting, but these cookies are delicious, so I will overlook it
18:02 frue ;-)
18:02 clintongormley ok - well, that's the end of my playing time for the next 3 months
18:03 clintongormley thanks for the input all
18:03 TimToady you need more playing time :)
18:03 frue hope you had fun :-)
18:03 clintongormley i SO do!
18:03 clintongormley damn work
18:03 mberends clintongormley: come back soon
18:03 clintongormley mberends i hope to
18:03 clintongormley but rakudo needs a good few weeks of concentrated reading and digging to figure out where everything is
18:04 clintongormley :(
18:04 clintongormley ah well
18:08 dukeleto how do I call a method in the root namespace from within another namespace that defines a function with the same name? I am trying :multi but failing
18:08 frue ::method
18:09 dukeleto frue: yes, I have that. But inside my function that is a :method I am trying to call the non :method version in another package and I can't seem to get it to work
18:10 frue what do you mean by non :method version?
18:10 frue you have something like package Bar { sub foo { ::bar }; sub bar { } } ?
18:13 skids golfing challenge:
18:13 skids <== gather while 1 { take shift(@a) };
18:14 skids gather { take shift(@a) } x Inf  # I guess
18:15 frue why do you want to do that?
18:15 skids Well, to put some context on it:
18:15 frue couldn't you just do <== @a?
18:15 skids $it <== my_coro() <== gather while 1 { take shift(@a) };
18:16 skids say "First result: " ~ =$it;
18:16 skids @a.push("Hello World");
18:16 skids say "Second result: " ~ =$it;
18:16 frue ooh
18:16 frue very cool
18:16 skids ruoso helped me.
18:17 frue does it work in rakudo right now?
18:17 skids Feeds/iterators no.  Maybe pugs.
18:18 frue ah, k
18:18 skids pugs: $it <== (1,2,3); =$it;
18:18 p6eval pugs: OUTPUT«*** ␤    Unexpected " <=="␤    expecting "::"␤    Variable "$it" requires predeclaration or explicit package name␤    at /tmp/ZIMBMbTVrC line 1, column 4␤»
18:18 skids pugs: my $it <== (1,2,3); =$it;
18:18 p6eval pugs: OUTPUT«*** Unsafe function '=' called under safe mode␤    at /tmp/AxmMlcddch line 1, column 1-19␤»
18:18 * clintongormley is still beating his head over capitalize
18:18 clintongormley frue - looked at your patch for (eg) lc
18:19 frue yeah
18:19 clintongormley and you changed things like .local string tmps etc to $S01 = self
18:19 frue no, that wasn'tmine
18:19 frue I didn't write it
18:19 frue so I can't explain it :-)
18:19 clintongormley damn :)
18:19 frue I don't know PIR at all
18:19 clintongormley <bash> <bash> <bash>
18:19 frue sorry :-)
18:20 clintongormley hmm, it's in the patch you linked to earlier
18:20 clintongormley did i misunderstand?
18:20 clintongormley or was that just an example
18:20 skids When inlining PIR you have to clip off the parts of the PIR that make it a PIR sub.
18:20 clintongormley which is just .sub and .end?
18:20 clintongormley or more than that
18:20 skids .params I think
18:20 clintongormley i took off those two lines, recompiled, and it worked
18:21 skids I dunno I've just been poking it with a stick and seeing when it twitches in a convenient direction.
18:21 clintongormley but there must have been a reason that they changed the other stuff to eg $S01 = self
18:21 clintongormley great confidence you inspire :)
18:21 skids What was self before, a Str, or an Any?
18:22 skids S registers are strings, assigning to them coerces.
18:22 clintongormley well, it's in class Any and returns a Str
18:22 clintongormley ok
18:22 clintongormley maybe that's the reason for the change
18:22 clintongormley thanks
18:22 dukeleto frue: roots() is defined in the root namespace, but is also defined on Numbers
18:23 clintongormley and the '%r = box $S0' ?
18:23 skids It's why you'll see stuff like $I0 = $P0 and then never use $P0 again, or $P0 = box $S0
18:23 frue k, so to call the root one you should be able to do ::roots, and for the numbers one, 5.roots
18:23 skids The result has to be a perl6 variable.
18:23 clintongormley which is what box does?
18:23 skids S registers are not up to snuff for that -- so they wrap it in a PMC.
18:24 clintongormley sorry for all the basic questions
18:24 skids I'm not clear on EXACTLY what box does, but I bet it's in the docs somewhere.  It's something along those lines.
18:24 clintongormley it reminds me of (Carl Sagan?) saying "to make an apple pie from scratch, first: create the universe"
18:25 clintongormley yep: box(out PMC, in STR) : Create a HLL-mapped PMC containing the provided primitive.
18:25 skids Hey, at least you got here AFTER us PIR-disabled people found "find_lex".
18:26 * clintongormley can only wonder
18:26 skids Nobody could figure out how to do anything that didn't use just self :-)
18:26 clintongormley heh ok
18:28 dukeleto frue: thanks, will try
18:28 ejs1 joined #perl6
18:28 jnthn Note that if you're curious what PIR a bit of Perl 6 compiles down to, perl6 --target=pir can be useful.
18:28 dukeleto frue: the :function syntax is valid PIR or only Rakudo?
18:29 clintongormley thanks jnthn
18:29 frue dukeleto: I have no idea about PIR
18:30 dukeleto frue: :(
18:30 frue haha, sorry
18:30 frue jnthn might know though :-)
18:30 jnthn dukeleto: Can you give me an example of what you are referring to?
18:30 frue or maybe as in #parrot
18:31 jnthn The idea of Q:PIR so far as I understand it is that it sticks the PIR you write in there straight into the compiled output
18:31 jnthn Though it recognizes %r as the thing to hold the result.
18:32 clintongormley well, curiously, making no change except for removing the sub/end just worked
18:32 clintongormley but there must be a reason they're changing the other bit
18:32 clintongormley so i will follow blindly
18:32 clintongormley AND IT WORKS!
18:32 jnthn Probably _the_ most useful things to know are to use the find_lex op to get at lexicals, to call 'infix:='(target, source) to do assignments to stuff you find_lex'd.
18:32 clintongormley w00t
18:33 dukeleto jnthn: yep, I will get you a github link in one sec
18:33 jnthn Yes, .sub ... .end you don't want to be using insie Q:PIR
18:33 jnthn Since the code gets stuck straignt into the output which is already contained in one of those.
18:33 skids jnthn: how do we handle the exception cases/tail calls on some of those?
18:33 skids pop_eh and all.
18:34 clintongormley oh damn - i wasn't testing this correctly
18:34 clintongormley after making a change, i just need to 'make' again, no?
18:34 jnthn make should do it.
18:34 dukeleto jnthn: http://github.com/leto/rakudo/commit/e5​ae093564be2d0571df1753a9f6364ca3e7165f
18:35 frue yeah, and you should probably run the actual test for that function too
18:35 jnthn skids: You can use push_eh LABEL if you wish.
18:35 jnthn You can call 'return'(...) and 'fail'(...)
18:35 clintongormley hmm, cos i tried swapping it so capitalize would dO tHE rEVERSE
18:35 clintongormley and it didn't make any difference
18:35 jnthn As well as 'die'
18:35 skids I find it easier to develop under a different sub name in a separate file till it works.
18:35 clintongormley oops
18:35 dukeleto jnthn: i have defined a roots() function on Numbers, but I can't seem to call the roots() in the root namespace from within the roots() method of Numbers
18:36 clintongormley need to Configure.pl again?
18:36 skids That being a perl label?
18:37 jnthn skids: No, it's a PIR label...we didn't do Perl 6-level labels yet.
18:37 skids thanks.
18:37 jnthn dukeleto: Aha.
18:37 jnthn dukeleto: Yes, it'd need to be exported.
18:37 dukeleto jnthn: ok, I think I know how to do that
18:38 jnthn We don't have anything in Num for exporting functions on Num yet though. Hmm.
18:38 jnthn Are you sure it's meant to be exported, per the spec?
18:39 dukeleto jnthn: $P0 = get_hll_namespace [ '' ] then '!EXPORT'('roots', from => $P0)   ??
18:39 * clintongormley notes that he had been carefully editing lcfirst instead of capitalize, and whistles. a little less nonchalantly
18:39 dukeleto jnthn: roots() in Numbers shouldn't be exported, but I need to be able to call the roots() defined in math.pir from any-num.pir, that is all
18:40 dukeleto jnthn: i have lots of passing tests and mostly it is just the glue between roots(x,n) <=> x.roots(n) that I have to solve
18:40 jnthn Oh, you want to call the one in the root namespace?
18:40 jnthn $P0 = get_hll_global 'roots'
18:41 jnthn $P0(x, n)
18:41 jnthn No, exporting would put your multi in the root namespace, which is I suspect not what you're wanting here.
18:41 jnthn But the above should do it (looks up the roots in the namespace and stores it in register $P0, and the we call it.)
18:42 jnthn Note that in Parrot callable things are just PMCs. You can look them up, pass them around etc just like anything else. :-)
18:43 dukeleto jnthn: sweet
18:43 ejs1 left #perl6
18:45 dukeleto jnthn: gonna try that
18:47 jnthn Thing is if you just write 'roots' it calls the one in the current namespace...which is the one you're currently in...so I fear what you already had may recurse infinitely.
18:47 dukeleto jnthn: I didn't know that I could call registers with function arguments, nice!
18:47 jnthn You can also wirte
18:47 jnthn .local pmc foo
18:47 jnthn And use foo like you'd use $P0
18:47 dukeleto jnthn: yeah, I was going into deep recursion or just not finding it
18:47 jnthn It really depends on usage.
18:48 jnthn If I'm going to refer to it in any more than a couple of places I prefer to introduce a meaningful name.
18:48 dukeleto jnthn: another thing I noticed is that the spec does not say anything about 1i.roots(2), but my code can find the root of any number, real or complex
18:48 dukeleto jnthn: but 1i.roots(2) blows up hard in the parser, which is way beyond my current knowledge
18:49 jnthn rakudo: 1i.roots(2)
18:49 dukeleto rakudo: say 1i.roots(2)
18:49 p6eval rakudo de786f: OUTPUT«Statement not terminated properly at line 1, near ".roots(2)"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
18:49 p6eval rakudo de786f: OUTPUT«Statement not terminated properly at line 1, near ".roots(2)"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
18:49 jnthn rakudo: 1i
18:49 p6eval rakudo de786f: RESULT«0+1i»
18:49 jnthn rakudo: (1i).roots(2)
18:49 p6eval rakudo de786f: OUTPUT«Method 'roots' not found for invocant of class 'Complex'␤current instr.: 'parrot;P6metaclass;dispatch' pc 637 (src/classes/ClassHOW.pir:161)␤»
18:49 jnthn std: 1i.roots(2)
18:49 dukeleto jnthn: ooh, that seems to work
18:49 p6eval std 25961: OUTPUT«ok 00:02 34m␤»
18:49 jnthn Hmm. STD seems to allow it.
18:50 dukeleto jnthn: i guess I can write my tests with (1i).roots(n) now and worry about parsing 1i.roots(n) later
18:50 clintongormley jnthn are $S0 and .local string tmps equivalent?
18:55 jnthn clintongormley: well, after the second then you may use tmps like you would use $S0 yes
18:55 clintongormley so $S0 is just a bit shorter to write?
18:55 jnthn Yeah
18:55 clintongormley ta
18:56 clintongormley ok, i've completed my first contribution to P6!
18:56 jnthn But it's also less obvious if you are using it in a lot of places. So .local lets you write easier to follow code.
18:56 clintongormley ok
18:57 pasteling Someone at 89.131.29.12 pasted "Moved capitalize to setting/Any-str.pm" (105 lines, 2.8K) at http://sial.org/pbot/35637
18:58 clintongormley would somebody mind looking at that diff to see if it all looks ok?
18:58 clintongormley i've moved the capitalize PIR to Any-str.pm
18:59 dukeleto clintongormley: I find that registers are useful for intermediate values, but .locals are good for longer-term variables
18:59 clintongormley ok
18:59 clintongormley dukeleto i was just following the example changes of eg lcfirst
18:59 clintongormley i just moved the PIR, changed tmps to $S0
19:00 clintongormley and deleted one line which was redundant : it was rechecking the string length all the time
19:00 clintongormley rather than just using the stored value
19:00 dukeleto clintongormley: cool, I was just throwing my 0.02 in
19:01 dukeleto is there a way to get better info other than "No applicable methods." ?
19:01 clintongormley hmm, how do i run just one file from the test suite?
19:02 frue make t/spec/...filename.t
19:02 clintongormley ta
19:02 frue maybe do make spectest first, just so that it downloads the spec
19:02 clintongormley yeah - done that
19:02 frue and then kill it before it takes forever
19:02 frue k
19:02 clintongormley :=
19:02 jnthn clintongormley: Looks sane. :-)
19:03 clintongormley thanks
19:03 clintongormley if i want to add a test for something, where do i do it: in t/ or in t/spec/ ?
19:03 frue to add spec tests you need to do that in the pugs repository
19:04 clintongormley ok
19:06 clintongormley how on earth do i get git to NOT use the pager?
19:09 Tene jnthn: foo(|@args) works, but foo(|%named-args) doesn't, right?
19:09 jnthn Tene: 'fraid so.
19:09 Tene aw. :(
19:09 Tene Want a weird bug?
19:09 jnthn I came up with a way to solve it on a minibus once. But then forgot it later on.
19:09 jnthn :|
19:09 jnthn How weird?
19:09 jnthn ;-)
19:10 Tene a for loop in a module {} doesn't compile
19:10 Tene pasted in #parrot
19:12 jnthn rakudo: module Foo { for @a { } }
19:12 p6eval rakudo de786f: OUTPUT«Scope not found for PAST::Var '@a' in ␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
19:12 jnthn rakudo: module Foo { for <foo bar baz> { } }
19:12 p6eval rakudo de786f: OUTPUT«Null PMC access in get_pmc_keyed()␤current instr.: 'parrot;Foo;_block31' pc 220 (EVAL_19:100)␤»
19:13 jnthn rakudo: module Foo { for <foo bar baz> { .say } }
19:13 p6eval rakudo de786f: OUTPUT«Null PMC access in get_pmc_keyed()␤current instr.: 'parrot;Foo;_block31' pc 220 (EVAL_19:100)␤»
19:13 jnthn Tene: It fails like this?
19:13 Tene Yes.
19:13 jnthn I think that's runtime rather than parse time...but yes, still, odd
19:13 jnthn rakudo: module Foo { say 42 }
19:13 p6eval rakudo de786f: OUTPUT«42␤»
19:14 Tene The other less weird bug I got was that I need to explicitly define a module Foo::EXPORT::DEFAULT {} before I can put anything in that namespace.
19:14 Tene if i try, it crashes with null pmc access.
19:14 jnthn auto-viv fail, perhaps
19:14 Tene Something like that
19:15 Tene Possibly use make_namespace method of hll root namespace or something.
19:15 Schnueff clintongormley: "To disable pagination for all commands, set `core.pager` or `GIT_PAGER` to `cat`."
19:15 Tene I have a workaround, so not a big deal for me.
19:15 clintongormley Schnueff thanks
19:16 jnthn Tene: OK. That is a weird bug though (other one).
19:16 Tene nodnod
19:16 jnthn rakudo: module Foo { if 1 { say 42 } }
19:16 Tene I didn't look into it at all.
19:16 p6eval rakudo de786f: OUTPUT«Null PMC access in get_pmc_keyed()␤current instr.: 'parrot;Foo;_block26' pc 129 (EVAL_20:71)␤»
19:16 jnthn rakudo: module Foo { { say 42 } }
19:16 p6eval rakudo de786f: OUTPUT«Null PMC access in get_pmc_keyed()␤current instr.: 'parrot;Foo;_block23' pc 119 (EVAL_19:66)␤»
19:16 jnthn rakudo: module Foo { { say 42 }; 1 }
19:16 p6eval rakudo de786f: OUTPUT«Null PMC access in get_pmc_keyed()␤current instr.: 'parrot;Foo;_block23' pc 124 (EVAL_19:68)␤»
19:17 Tene oh, hey, I know how to cheat with wanting |%n-a
19:17 Tene :)
19:28 * jnthn afk for a little - dinner
19:43 justatheory joined #perl6
19:45 clintongormley if i want to add tests which currently fail, do i add them as normal tests? or do i skip them?
19:46 frue if they should pass but fail because of bugs, add them and put a #?rakudo skip line before them
19:46 frue there are examples of that all over the palce
19:47 clintongormley ok thanks
19:47 frue np
19:47 PacoLinux joined #perl6
19:56 clintongormley ho hum - any ideas how to reset my pugs commit bit password?
19:56 frue uh, the web thing...
19:57 frue http://commitbit.pugscode.org:6666/
19:57 clintongormley it doesn't have an I've forgotten my password link
19:57 frue indeed
19:57 frue sorry
20:01 pmurias_ joined #perl6
20:02 clintongormley ok all - it's been a pleasure - many thanks for the patience
20:02 clintongormley i'll see you around
20:03 frue see ya
20:06 pmurias__ joined #perl6
20:12 mberends all: is .sort able to ignore case? how?
20:21 bacek good morning
20:22 mberends bacek: HAI
20:22 bacek rakudo: my @a=<foo FOO bar>; say @a.sort; say @a.sort: { ls $^a cmp lc $^b }
20:22 p6eval rakudo de786f: OUTPUT«FOObarfoo␤Could not find non-existent sub ls␤current instr.: '_block28' pc 225 (EVAL_18:82)␤»
20:22 bacek rakudo: my @a=<foo FOO bar>; say @a.sort; say @a.sort: { lc $^a cmp lc $^b }
20:22 p6eval rakudo de786f: OUTPUT«FOObarfoo␤barfooFOO␤»
20:23 mberends cool, just what I need!
20:23 bacek mberends: indeed :)
20:28 Cybera joined #perl6
20:45 mberends bacek: the sort does not always work, cannot understand why. Are you able to try out this code? http://github.com/eric256/perl6-exa​mples/blob/master/lib/Pod/Server.pm
20:49 bacek mberends: lines 122-123?
20:49 mberends exactly
20:50 bacek mberends: and how it sorts?
20:50 bacek rakudo: my @a=<foo FOO bar>; say @a.sort; say @a.sort: { lc $^a leg lc $^b }
20:50 p6eval rakudo de786f: OUTPUT«FOObarfoo␤barfooFOO␤»
20:51 bacek mberends: can you try "leg" instead of "cmp"?
20:52 mberends ok, will try now...
20:57 mberends bacek: same strange order. for example, the pugs/docs/ directory comes out as Perl6/ AES/ articles/ blog/
20:57 mberends actually, the lowercase names are all in order
20:58 bacek rakudo: my @a=< articles/ blog/ Perl6/ AES/ >; say @a.sort
20:58 p6eval rakudo de786f: OUTPUT«AES/Perl6/articles/blog/␤»
20:58 bacek rakudo: my @a=< articles/ blog/ Perl6/ AES/ >; say @a.sort: { $^a leg $^b }
20:58 p6eval rakudo de786f: OUTPUT«AES/Perl6/articles/blog/␤»
20:59 bacek rakudo: say 'articles' leg 'AES'
20:59 p6eval rakudo de786f: OUTPUT«1␤»
20:59 mberends so case sensitive works. the lc may be the hitch.
20:59 bacek rakudo: say 'articles' leg 'aes'
20:59 p6eval rakudo de786f: OUTPUT«1␤»
20:59 bacek heh. No it doesn't.
20:59 bacek rakudo: say 'articles' cmp 'AES'
20:59 p6eval rakudo de786f: OUTPUT«1␤»
20:59 bacek rakudo: say 'articles' cmp 'aes'
20:59 p6eval rakudo de786f: OUTPUT«1␤»
20:59 mberends oh NOES
20:59 Schnueff heh
21:00 Schnueff rakudo: say 'art' cmp 'aes'
21:00 p6eval rakudo de786f: OUTPUT«1␤»
21:00 Schnueff rakudo: say 'art' cmp 'ass'
21:00 p6eval rakudo de786f: OUTPUT«-1␤»
21:00 Schnueff aeh sorry, unintended language
21:00 mberends nm
21:01 mberends rakudo: say 'aes' cmp 'art'
21:01 bacek rakudo: say 'a' cmp 'A'
21:01 p6eval rakudo de786f: OUTPUT«-1␤»
21:01 p6eval rakudo de786f: OUTPUT«1␤»
21:01 bacek rakudo: say 'my ', 'a' cmp 'b'
21:01 p6eval rakudo de786f: OUTPUT«my -1␤»
21:02 bacek rakudo: say 'my ', 'a' cmp 'A'
21:02 p6eval rakudo de786f: OUTPUT«my 1␤»
21:02 bacek rakudo: say 'my ', 'a' cmp 'a'
21:02 p6eval rakudo de786f: OUTPUT«my 0␤»
21:02 bacek rakudo: say 'my ', 'e' cmp 'r'
21:02 p6eval rakudo de786f: OUTPUT«my -1␤»
21:02 bacek rakudo: say 'my ', 'ae' cmp 'ar'
21:02 p6eval rakudo de786f: OUTPUT«my -1␤»
21:02 mberends rakudo: 'A'.lc
21:02 p6eval rakudo de786f: RESULT«"a"»
21:03 bacek rakudo: say 'my ', 'aec' cmp 'ara'
21:03 p6eval rakudo de786f: OUTPUT«my -1␤»
21:04 bacek rakudo: say 'my ', 'perl6' leg 'articles'
21:04 p6eval rakudo de786f: OUTPUT«my 1␤»
21:04 bacek rakudo: my @a=< articles/ blog/ Perl6/ AES/ >; say @a.sort: { lc $^a leg lc $^b }
21:05 p6eval rakudo de786f: OUTPUT«AES/articles/blog/Perl6/␤»
21:05 bacek mberends: it works...
21:05 mberends bacek++: that looks good. will try here soon...
21:06 bacek rakudo: my @a=< articles/ blog/ Perl6/ AES/ >; say @a.sort: { lc $^a cmp lc $^b }
21:06 p6eval rakudo de786f: OUTPUT«AES/articles/blog/Perl6/␤»
21:06 bacek even with cmp
21:06 mberends yes , just doing cmp here and it works.
21:06 jnthn rakudo: my @a=< articles/ blog/ Perl6/ AES/ >; say @a.sort: { .lc }
21:07 p6eval rakudo de786f: OUTPUT«AES/articles/blog/Perl6/␤»
21:07 jnthn golf win
21:07 jnthn ;-)
21:07 bacek jnthn: :)
21:08 mberends oooh! jnthn++
21:09 jnthn pmichaud++ for implementing it ;-)
21:11 mberends git pushed, thanks!
21:13 mberends forgot to remove BUG comment :(
21:15 hudnix joined #perl6
21:29 bacek jnthn: hey! I implemented first version of "List.sort"! :)
21:30 jnthn bacek: Aye, but I think pmichaud added the version taking a closure of arity 1, no? :-)
21:30 jnthn I may remember wrong.
21:31 bacek jnthn: I can't remember either...
21:32 jnthn Well, it works, whoever wrote it. :-)
21:36 bacek jnthn: do you have any ideas why socket API is dead in Parrot?
21:36 jnthn bacek: Yes.
21:37 jnthn IIRC, because allison ripped it out while refactoring IO...and then didn't put it back. :-|
21:37 jnthn I tried to talk at least one person into working on it already.
21:37 frooh that's one way to refactor.
21:37 bacek jnthn: ah. So it worth trying to resurrect it!
21:37 jnthn frooh: The IO that survived the refactor is in much better shape. ;-)
21:37 jnthn But yes, it kinda sucked to lose it.
21:37 frooh I am sure it is
21:38 jnthn Especially as it would be relatively trivial to give Rakudo the socket I/O many people now want if Parrot provided it.
21:38 frooh how can they claim 1.0 without socket io?
21:39 jnthn I'm not really the best person to stick it back into Parrot, though. I've got little experience of that level of network programming.
21:39 frooh just curious
21:39 jnthn Well, 1.0 was defined as the "come and write your Parrot-targetting compilers" release more than the "we have everything 100% sorted out" release.
21:39 * bacek can reimplement unix-part of scokets
21:39 jnthn But yes, I found it a curious ommision.
21:39 frooh ah, got it
21:39 bacek sockets
21:40 jnthn bacek: Patches welcome! ;-)
21:40 bacek jnthn: of cause :)
21:40 jnthn bacek: Actually you may find that the various platform specific bits still exist.
21:40 jnthn And it's just the PMCs are missing...
21:41 jnthn I don't know.
21:41 bacek jnthn: no actually... But I can fix it :)
21:41 jnthn You'd make plenty of people happy by doing so.
21:42 mberends most platforms link the same BSD library in similar ways, afaik.
21:42 jnthn I did already make a start on refactoring Rakudo's IO to meet the spec more.
21:42 mberends yes, that must help bring the goal closer.
21:43 jnthn A while into it, I realized import needed somewhat sorting out.
21:54 * mberends nods off. good night!
21:55 dukeleto if I want to get a function in the root level namespace of Rakudo, I do $P0 = get_hll_global [''], "function_name"  , correct ?
21:56 dukeleto or perhaps it is get_hll_global ['rakudo'], "function_name"
21:57 jnthn $P0 = get_hll_global "function_name" should do it
21:57 jnthn iirc
21:57 dukeleto ooh, I just found get_root_global
21:57 jnthn yeah
21:57 jnthn that will not do what you want
21:57 dukeleto jnthn: I am trying that but it doesn't seem to work
21:58 jnthn oh, hmm
21:58 jnthn $P0 = new 'ResizablePMCArray'
21:58 jnthn $P0 = get_hll_global $P0, "function_name"
21:59 jnthn Try that, just out of curiosity.
21:59 jnthn (I think you can't write an empty key...)
21:59 jnthn But I thought get_hll_global "foo" looked in hll namepsace which should get it. :-|
22:00 dukeleto jnthn: trying that now
22:10 hudnix joined #perl6
22:12 justatheory joined #perl6
22:14 frooh joined #perl6
22:31 dukeleto jnthn: $P0 = new 'ResizablePMCArray'; $P0 = get_hll_global $P0, 'roots'; $P1 = $P0[0] and then calling $P1(x,n) did the trick, thanks!
22:32 jnthn Erm. :-S
22:32 jnthn $P1 = $P0[0] ?
22:32 jnthn That looks like you're grabbing one candidate from a multi.
22:32 jnthn Does $P0(x,n) not do it?
22:33 DemoFreak joined #perl6
22:34 dukeleto jnthn: $P0(x,n) was not working, say $P0 printed 2, which was confusing me. It *is* a multi and I was getting "no applicable methods found" before, and now I am not
22:36 dukeleto jnthn: I have 10 passing tests for roots(), but I still need to correct my algorithm for negative numbers and write another 20/30 tests to be confident about it. But it is getting really close
22:40 jnthn The 2 is telling you it has 2 candidates.
22:40 jnthn No applicable methods? Hmm.
22:40 jnthn Check the signatures (what's in the :multi(...)) are sane.
22:41 jnthn But really even better is to move them into a file in setting so they get Perl 6 signatures and are subject to Perl 6 multi-dispatch semantics. But anyway, feel free to focus on the algorithm and tests first, I cna help with those other bits. :-)
22:53 SamB joined #perl6
23:28 kate21de joined #perl6
23:50 dukeleto jnthn: that sounds great, I need to learn a bit more about Setting

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo