Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-02-20

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:00 wayland I don't see why not
00:00 User757 hi!
00:00 s1n1 jnthn: i have a question or two about the setting
00:00 TimToady see S09:208
00:00 TimToady er
00:00 wayland multi prefix:<~>(...) or something :)
00:00 TimToady S13:208 rather
00:01 wayland User757: hi! :)
00:02 User757 I really don't know what I'm doing here
00:02 User757 I
00:02 User757 I'm looking for a tf2 pug and got here somehow
00:03 s1n1 TimToady: question: infix<~> uses the ACCEPTS method for Ranges, correct?
00:04 wayland User757: One implementation of perl6 is called "pugs".  That's probably how you ended up here.  I'm assuming that TF2 is "Team Fortress 2", but I don't know what a pug is in this context
00:04 TimToady s1n1: I have no idea what you're asking...
00:05 TimToady are you speaking of infix:<~~>?
00:05 s1n1 TimToady: yes
00:05 s1n1 you beat me to the punch, sorry, infix<~~> use ACCEPTS...
00:05 TimToady except for special syntactic forms, ~~ always uses .ACCEPTS on whatever the righthand type is
00:06 s1n1 so $a ~~ $b is the same as $a.ACCEPTS($b)?
00:06 TimToady no
00:06 TimToady $b.ACCEPTS($a)
00:06 s1n1 oh, okay
00:06 TimToady it's a backwards single dispatch, basically
00:07 TimToady the match depends primarily on the right side's type
00:07 s1n1 so (1..20) ~~ 4 is the same as 4.ACCEPTS(1..20)?
00:07 TimToady $b may or may not choose to pay attention to the type of $a
00:07 TimToady yes, which I would expect to be false
00:08 TimToady because in general a pattern should be more general than what it matches
00:08 s1n1 for Range, (1..5).ACCEPTS(1..5) is true though
00:08 s1n1 i'm not sure i followed that last statement
00:09 TimToady matching two Ranges is not defined currently
00:10 TimToady it would try to match under the Any ~~ Range line, and I'm not sure what would happen
00:10 s1n1 hmmm
00:11 TimToady the spec is your friend, except where it's not...
00:11 s1n1 heh the spec definitely does not like me, well either that or my brain is incapable of navigating it
00:12 s1n1 was it intentionally left out of the spec?
00:12 TimToady it might work out, since it's defined as [!after] $b.min, $a.min..$a.max, $b.max
00:13 TimToady so what it would tell you if the range on the left was a subset of the range on the right
00:14 s1n1 or if $b is not a range, it would be nice to know if it (ie Num) is in the range
00:14 TimToady I don't recall if we ever explictly thought about Range ~~ Range
00:14 TimToady no, we don't do it that way on purpose
00:15 s1n1 or Range ~~ Num
00:15 TimToady otherwise you can't optimize a numeric switch to a jump table
00:15 s1n1 that would be neat though :) maybe Num ~~ Range
00:16 Caelum joined #perl6
00:16 TimToady we don't autoreverse any .ACCEPTS semantics like the original smartmatching did (and which p5 unfortunately copied)
00:17 TimToady if you want a reversed match, you can write one explicitly with "when { 4 ~~ $_ }"
00:17 s1n1 rakudo: (1..10) when { 4 ~~ $_ }
00:18 p6eval rakudo 00e9db: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
00:18 s1n1 uhoh, well, was that the right idea?
00:19 TimToady rakudo: given 1..10 { say "yes" when { 4 ~~ $_ } }
00:19 p6eval rakudo 00e9db: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
00:19 TimToady pugs: given 1..10 { say "yes" when { 4 ~~ $_ } }
00:19 p6eval pugs: OUTPUT«*** ␤    Unexpected "when"␤    expecting operator, ":", "," or "}"␤    at /tmp/xkAJjLZoFf line 1, column 25␤»
00:19 TimToady std: given 1..10 { say "yes" when { 4 ~~ $_ } }
00:19 s1n1 wow, that's a crap ton of work to do what you mean by Range ~~ Num (or vice versa)
00:19 p6eval std 25451: OUTPUT«ok 00:04 34m␤»
00:20 TimToady if you want reversed smartmatching it probably means you need to refactor it
00:21 s1n1 well, i'd be cool to do something like (2..$max :by(2)) ~~ $odd
00:21 Avada joined #perl6
00:21 s1n1 without having to refactor, that seems dwim to me
00:22 shinobi-cl joined #perl6
00:22 TimToady if you want to put such a test into a switch statement it means you're unclear on what is generic and what is specific in your program
00:23 TimToady it makes it impossible to optimize
00:23 s1n1 why would i put that in a switch?
00:23 s1n1 if i did that, maybe i just wanted to be lazy and not optimize
00:23 TimToady $value ~~ $pattern isn't long otherwise
00:24 s1n1 (btw, i'm too dense to understand why that's not optimizable)
00:24 s1n1 by $pattern, what do you mean?
00:24 TimToady if you're that lazy then you should write your own operator :)
00:24 s1n1 i didn't want to write my own, just abuse smartmatching :)
00:24 TimToady something that defines a set of values
00:24 TimToady then smartmatching will outsmart you :)
00:25 TimToady re otimizable, suppose you have when 1 {...}; when 2 {...}; when 3 {...} like an ordinary C switch statement
00:26 TimToady C can just jump straight to the right bit of code without testing $_ == 1 || $_ == 2 || $_ == 3
00:26 TimToady but that only works if 4 always does a numeric comparison to something forced into numeric context
00:26 TimToady and +(1..5) is not going to return a range
00:27 TimToady if we have to wait to see what type of the thing on the left is, we don't know that till run time
00:28 TimToady instead, we promise Num.ACCEPTS that it can assume $b == +$a
00:28 s1n1 what does +(1..5) return, a List?
00:28 TimToady no, a number
00:28 TimToady that can be compared to $b
00:28 TimToady with ==
00:28 s1n1 oh, hmm
00:29 TimToady +(@numbers) == 4 will tell you if there are 4 elements in the list
00:29 s1n1 car is ready, going home&
00:31 shinobi-cl pugs: say [~] [+] (1..5);
00:31 p6eval pugs: OUTPUT«15␤»
00:32 shinobi-cl pugs: say [+] (1..5);
00:32 p6eval pugs: OUTPUT«15␤»
00:32 TimToady stacking two reduce operators makes little sense
00:32 shinobi-cl but its nice to know that can be done :)
00:33 TimToady indeed
00:33 TimToady btw, you don't need those parens
00:33 shinobi-cl pugs: say [\+] (1..5);
00:33 p6eval pugs: OUTPUT«1361015␤»
00:35 shinobi-cl pugs: say [\+] [\-] (1..5);
00:35 p6eval pugs: OUTPUT«10-4-12-25␤»
00:36 TimToady O_o
00:38 shinobi-cl pugs: ([\+] [\-] (1..5)).perl.say;
00:38 p6eval pugs: OUTPUT«(1, 0, -4, -12, -25)␤»
00:38 skids joined #perl6
00:39 shinobi-cl pugs: [X] (1..5);
00:40 p6eval pugs: RESULT«((1, 2, 3, 4, 5),)»
00:43 wayland rakudo: multi Str sub foo(Str $string) { print "hi $string"; } foo('everyone')
00:43 p6eval rakudo 00e9db: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
00:43 wayland STD: multi Str sub foo(Str $string) { print "hi $string"; } foo('everyone')
00:43 wayland perl6: multi Str sub foo(Str $string) { print "hi $string"; } foo('everyone')
00:43 p6eval rakudo 00e9db: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
00:43 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "sub"␤    expecting "handles", "is", bare trait, subroutine parameters, trait or block␤    at /tmp/pBPuAQnTME line 1, column 11␤»
00:43 p6eval ..elf 25451: OUTPUT«Parse error in: /tmp/5VqOmmed8v␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: multi Str sub foo(Str $string)␤WHERE:/\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:76:in `scan_unitstopper'␤  STD_red/std.rb:224:in `comp_unit'␤
00:43 p6eval ..STD_r...
00:46 meppl joined #perl6
00:52 shinobi-cl pugs: [&] [^] [4,3,2,1],[1,3]
00:52 p6eval pugs: RESULT«(((1, 3) ^ (4, 3, 2, 1)))»
00:52 shinobi-cl pugs: [X] [^] [4,3,2,1],[1,3]
00:52 p6eval pugs: RESULT«(((1,), (3,)) ^ ((4,), (3,), (2,), (1,)))»
00:53 shinobi-cl pugs: [^] [X] [4,3,2,1],[1,3]
00:53 p6eval pugs: RESULT«((1, 1) ^ ␤ (1, 3) ^ ␤ (2, 1) ^ ␤ (2, 3) ^ ␤ (3, 1) ^ ␤ (3, 3) ^ ␤ (4, 1) ^ ␤ (4, 3))»
00:55 shinobi-cl pugs: [^] [X] [4,3,2,1]X[1,3]
00:55 p6eval pugs: RESULT«(((1, 1), (1, 3)) ^ ␤ ((2, 1), (2, 3)) ^ ␤ ((3, 1), (3, 3)) ^ ␤ ((4, 1), (4, 3)))»
00:55 shinobi-cl pugs: [^] [X] [1,2,3,4]X[1,3]
00:55 p6eval pugs: RESULT«(((1, 1), (1, 3)) ^ ␤ ((2, 1), (2, 3)) ^ ␤ ((3, 1), (3, 3)) ^ ␤ ((4, 1), (4, 3)))»
00:56 shinobi-cl pugs: [^] [X] [1,2,3,4]X[3,1]
00:56 p6eval pugs: RESULT«(((1, 3), (1, 1)) ^ ␤ ((2, 3), (2, 1)) ^ ␤ ((3, 3), (3, 1)) ^ ␤ ((4, 3), (4, 1)))»
00:58 TimToady std: multi Str sub foo(Str $string) { print "hi $string"; } foo('everyone')
00:58 p6eval std 25451: OUTPUT«############# PARSE FAILED #############␤Malformed "multi" definition␤Malformed routine definition at /tmp/DsSowuGGAx line 1:␤------> [32mmulti Str [31msub foo(Str $string) { print "hi $string[0m␤    expecting any of:␤  routine_def␤      trait␤FAILED 00:02 33m␤»
01:01 TimToady std: my Str multi sub foo(Str $string) { print "hi $string"; } foo('everyone')
01:01 p6eval std 25451: OUTPUT«############# PARSE FAILED #############␤Malformed "my" declaration␤Malformed "multi" definition␤Malformed routine definition␤Malformed routine definition at /tmp/4z0ZsucSXs line 1:␤------> [32mmy Str multi sub[31m foo(Str $string) { print "hi $string"; [0m␤FAILED 00:02 33m␤»
01:02 TimToady std: my Str multi foo(Str $string) { print "hi $string"; } foo('everyone')
01:02 p6eval std 25451: OUTPUT«############# PARSE FAILED #############␤Malformed "my" declaration␤Malformed "multi" definition␤Malformed routine definition at /tmp/bQI0WGqFU5 line 1:␤------> [32mmy Str multi [31mfoo(Str $string) { print "hi $string"; }[0m␤    expecting declarator␤FAILED 00:02 33m␤»
01:02 TimToady std: my Str multi foo(Str $string) { print "hi $string"; }; foo('everyone')
01:03 p6eval std 25451: OUTPUT«############# PARSE FAILED #############␤Malformed "my" declaration␤Malformed "multi" definition␤Malformed routine definition at /tmp/oc2D26DyA6 line 1:␤------> [32mmy Str multi [31mfoo(Str $string) { print "hi $string"; }[0m␤    expecting declarator␤FAILED 00:02 33m␤»
01:03 TimToady hmm
01:04 alc joined #perl6
01:04 TimToady lex damage, I suspect
01:06 TimToady decommuting &
01:10 shinobi-cl pugs: [^] [X] [1,2,3,4]X[3,1].reverse
01:10 p6eval pugs: RESULT«(((1, 1), (1, 3)) ^ ␤ ((2, 1), (2, 3)) ^ ␤ ((3, 1), (3, 3)) ^ ␤ ((4, 1), (4, 3)))»
01:15 eternaleye joined #perl6
01:22 wayland @tell Matt-W Form.pm is also documented in Exegesis 7, as I presume you know :)
01:22 lambdabot Consider it noted.
01:22 shinobi-cl pugs: my @a=(1,2,3,4); my @b=(5,6,7,8); say @a Z @b;
01:22 p6eval pugs: OUTPUT«1234␤»
01:23 shinobi-cl pugs: my @a=(1,2,3,4); my @b=(5,6,7,8); @a Z @b;
01:23 p6eval pugs: RESULT«((1, 5), (2, 6), (3, 7), (4, 8))»
01:23 shinobi-cl rakudo: my @a=(1,2,3,4); my @b=(5,6,7,8); say @a Z @b;
01:23 p6eval rakudo 00e9db: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
01:36 wayland @tell Matt-W Am I right in presuming that you're going to use a grammar for Form.pm?
01:36 lambdabot Consider it noted.
01:38 wayland Question for the people with perlcabal power; is there some way we can get the new S32 drafts to appear at http://perlcabal.org/syn/ ?
01:42 pugs_svn r25452 | wayland++ | Minor syntax fix
01:49 wayland karma lambdabot
01:56 Lord-Harlot joined #perl6
01:57 skids Hrm... should %h<k1 k2>.delete dwim or not... ?
01:59 avar say "SXX - Format\n\nDon't pull a Larry, put that crazy shit on CPAN yo.\n" > SXX.pod
01:59 avar :)
02:02 gravity joined #perl6
02:12 shinobi-cl left #perl6
02:14 FurnaceBoy joined #perl6
02:41 dalek rakudo: 0691afa | (Patrick R. Michaud)++ | docs/spectest-progress.csv:
02:41 dalek rakudo: More partial spectest-progress.csv update.
02:41 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​691afafb13d75e392493e71d87526a703ac2cc2
02:57 shinobi-cl joined #perl6
03:11 meppuru joined #perl6
03:12 alester pmichaud: I do love the parrot pulling automagicness.  ++
03:27 r0bby joined #perl6
03:35 diakopter wayland: where are the drafts
03:39 diakopter wayland: nm; sorry for the stupid question. :)
03:47 pugs_svn r25453 | putter++ | [elfparse] Minor additional optimization sketching.
03:53 diakopter wayland: those pages are generated by http://perlcabal.org/svn/pu​gs/view/util/smartlinks.pl
03:57 diakopter wayland: the index page is stored here: http://perlcabal.org/svn/pugs/browse/docs/feather
03:57 r0bby joined #perl6
03:57 diakopter wayland: by those links, I intend you to find the actual locations in pugs svn... (not the SVN::Web views of them) ;)
03:58 alester diakopter: They're by the open window.
04:00 Entonian joined #perl6
04:00 diakopter alester: :)  ...or www.sss.gov
04:00 alester I'm 41, I don't worry about that any more.
04:09 wayland diakopter: Thanks.  I'll fix them, then :).
04:11 eternaleye joined #perl6
04:18 diakopter wayland: there's a cron job on feather that auto-updates that stuff
04:18 diakopter I think every 30 minutes?
04:19 diakopter If I Recall Correctly
04:19 diakopter s/keyword/keylingo/
04:31 Tene joined #perl6
04:45 eternaleye joined #perl6
04:52 cj did not
05:00 s1n pmichaud: so is anyone going to see my pull requests on github?
05:06 eternaleye joined #perl6
05:06 dalek rakudo: 5423d30 | (Patrick R. Michaud)++ | docs/spectest-progress.csv:
05:06 dalek rakudo: spectest-progress.csv update: 6843 passing, 1 failing
05:06 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​423d30e76f346a05f6705736b88c4d69a6d8d09
05:19 FurnaceBoy joined #perl6
05:32 dukeleto joined #perl6
05:32 dukeleto perl6: say 42
05:32 p6eval rakudo 00e9db: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
05:32 p6eval ..elf 25453, pugs: OUTPUT«42␤»
05:36 spooneybarger joined #perl6
05:39 masak joined #perl6
05:46 bacek__ joined #perl6
06:00 alester joined #perl6
06:08 wayland Question about the spec-updating cron job -- I can't find any generated files for the S32 stuff.  Is there a way we can get this incorporated into the spec rebuild process?
06:10 pugs_svn r25454 | wayland++ | Added links to the S32 documents, and did some little table fixups :).
06:38 DemoFreak joined #perl6
06:45 masak http://blog.ianbicking.org/20​09/01/16/woonerf-and-python/
06:45 masak the principles raised in that post hold for Perl as well, to a large extent.
06:46 masak Perl 6 has public/private, but Perl 5 in effect doesn't, and there are other parallel examples of the same thing in both languages.
06:48 Tene Perl 5 can if you want to.
06:50 masak I realise that.
06:50 justatheory joined #perl6
06:50 masak I still like the point made in the post. :)
06:50 * Tene finally reads link
06:51 masak Tene: btw, nice to see you. I expect to start doing some Web work in the next week.
06:51 masak mostly just planning, I guess.
06:52 * Tene nods
06:53 masak I keep finding, and being captivated by, minimal Ruby web frameworks lately.
06:53 masak http://blade.nagaokaut.ac.jp/cgi-​bin/scat.rb/ruby/ruby-talk/325255
06:53 masak like that one.
06:53 masak it'd be fun to see if it were possible to write a similar Perl 6 five-liner.
06:53 Tene You ever get around to looking at jifty in depth like you planned?
06:54 masak not in depth. but I've been reading the other talks you suggested.
06:54 masak and I still think it's a very good idea to steal liberally from Jifty.
06:54 Tene I plan to.
06:54 masak great.
06:54 Tene That would be a fun little framework to try building.
06:54 masak do coordinate things with ihrd, because I believe he thinks of this as mostly his turf.
06:55 masak I'm sure he wont mind assistance, though.
06:55 Tene I don't plan to do anything official myself.
06:55 Tene Experimenting on my own, sure.
06:55 Tene I'll follow plans and process and whatever for official Web stuff.
06:56 masak heh, surely, if you write a Jifty Perl 6 port of your own, it'd be nice if at least the feedback from that project trickled back into the "official Web stuff". :)
06:57 masak we need all the wisdom-from-experince we can get our hands on.
06:57 masak our own as well as others'.
07:00 masak I think I'll just hijack the November mailing list for Web discussion. ideally, the Web project will impact November a lot anyway.
07:01 Tene I guess I should subscribe to it soon, then.
07:01 masak aye.
07:02 masak http://groups.google.com/group/november-wiki
07:18 parduncia joined #perl6
08:10 Matt-W Morning
08:10 lambdabot Matt-W: You have 2 new messages. '/msg lambdabot @messages' to read them.
08:11 Matt-W Wow messges from lambdabot
08:11 Matt-W Now I really feel like a participant :)
08:11 masak Matt-W: morning, participant!
08:11 * Matt-W checks that they aren't insults
08:12 masak :)
08:15 Matt-W ahah
08:15 Matt-W wayland says that Form.pm is documented in Exegesis 7
08:15 Matt-W which
08:15 Matt-W umm
08:15 Matt-W doesn't exist?
08:16 masak it does.
08:16 Matt-W isn't on perlcabal.org/syn
08:16 moritz_ look at dev.perl.org/perl6/
08:16 Matt-W only 2 through 6 there
08:16 pugs_svn r25455 | moritz++ | [t/spec] clean up capture.t, simplifications and unfudges for rakudo
08:17 pugs_svn r25456 | moritz++ | [t/spec] some unfudges found by autounfudge
08:17 masak by rights, it should be on perlcabal.org as well...
08:17 Matt-W it hasn't been touched since 2006
08:17 Matt-W what fun
08:17 dalek joined #perl6
08:17 moritz_ exegesis documents are of historical interest only (in theory)
08:19 pugs_svn r25457 | moritz++ | [t/spec] many small test improvements
08:19 masak moritz_: not to someone who wants to have all information available when porting the Perl6::Form module. :)
08:19 masak since there's only the exigesis, and no apocalypse.
08:20 Matt-W From the looks of it, Perl6::Form's POD section contains virtually all of this stuff anyway
08:20 masak aye.
08:20 moritz_ that's where the "in theorie" comes in ;-)
08:20 Matt-W but it's good to have the document that module was based on
08:20 Matt-W one does wonder though
08:20 Matt-W was this originally written before {} became significant in double quoted strings
08:20 Matt-W because most of these examples would blow up the compiler now
08:20 masak moritz_: in the Perl 6 world, we only stick to theory when it's convenient. :)
08:21 masak Matt-W: then don't use double quoted strings when you write {}
08:21 masak :)
08:21 Matt-W yes I know
08:21 masak there are lots of other quoting forms.
08:21 Matt-W but the examples here use them, so I found that curious
08:22 moritz_ lots of things have changed
08:22 ejs joined #perl6
08:22 Matt-W I've noticed :)
08:22 Matt-W hurrah
08:23 Matt-W E7 provides a Perl 6 type for the form function
08:23 masak maybe it's possible to get a hold of Damian and ask what he thinks about {} and double quotes.
08:23 masak I have a feeling he's a busy guy, though.
08:23 Matt-W std: type FormArgs ::= Str|Array|Pair;
08:23 p6eval std 25457: OUTPUT«Undeclared name:␤      FormArgs used at 1 ␤Undeclared routine:␤    type used at 1 ␤ok 00:02 33m␤»
08:23 Matt-W hah
08:23 Matt-W that's changed then
08:24 masak yes, 'type' looks funny.
08:24 moritz_ Matcher is a similar composed type
08:24 moritz_ see S29
08:24 Matt-W using subset
08:24 Matt-W interesting
08:24 Matt-W std: subset FormArgs of Str|Array|Pair
08:25 p6eval std 25457: OUTPUT«ok 00:02 33m␤»
08:25 Matt-W ah well, I'll look at it properly when I'm at home
08:25 Matt-W I've been going through Perl6::Form trying to understand how it works
08:26 Matt-W it's incredibly clever and completely devoid of comments
08:26 moritz_ subset FormArgs of Any where Str|Array|Pair
08:26 moritz_ that's how I'd formulate it
08:27 Matt-W that reads a lot better
08:29 Matt-W E7 also says
08:29 Matt-W sub form (FormArgs *@args is context(Scalar))
08:30 moritz_ huh?
08:30 moritz_ I'd ignore that for now...
08:30 Matt-W which, it says, is to enforce Scalar context on each parameter rather than flattening lists
08:30 Matt-W I have no idea how that squares up against the current state of argument lists
08:32 eternaleye joined #perl6
08:32 moritz_ I don't think such a thing is possible right now
08:41 dalek rakudo: 6c7a7a9 | (Moritz Lenz)++ | t/00-parrot/05-var-array.t:
08:41 dalek rakudo: Fixe test as reported in RT #63346
08:41 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​c7a7a9df60e80ea941a7766ed0576b0a4d4a38f
08:41 dalek rakudo: 2e438ab | (Moritz Lenz)++ | t/00-parrot/05-var-array.t:
08:41 dalek rakudo: Use == for numeric comparison in 05-var-array.t
08:41 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/2​e438aba0d486ec1f9b85879280ba8ae889120d9
08:47 iblechbot joined #perl6
08:50 * Matt-W speculates tentatively that it's possible to have form's arguments work if you stick all your Array arguments in [], but hasn't tested that
08:53 moritz_ rakudo passes 6966 tests now
08:53 Matt-W nice
08:54 Matt-W unless it was 8000 yesterday :P
08:54 moritz_ "2009-02-19 00:00",444a4c8,6843,1,301,1985,9130,14861,306
08:54 alexn_org joined #perl6
09:06 masak the spectest suite is one of the most persistently impressive things produced in the Silver Age of Perl 6. moritz_++
09:07 masak and lots of others++, I'm sure, but mostly moritz_++
09:10 moritz_ masak: I did some statistics the other day, and my number of commit only beats those from audreyt++ by a small number
09:10 masak :)
09:10 masak sounds about right to me.
09:10 masak note also that I specifically didn't refer to the Golden Age. :)
09:11 Matt-W the golden age hasn't happened yet
09:11 masak Matt-W: you must be new here.
09:11 masak :P
09:12 moritz_ http://nopaste.snit.ch/15680
09:12 Matt-W I would have thought the golden age involves Perl 6.0.0...
09:12 moritz_ 442 audreyt + 474 autrijus
09:12 moritz_ rakudo: say 442 + 474
09:12 p6eval rakudo 00e9db: OUTPUT«Parrot VM: Can't stat languages/rakudo/perl6.pbc, code 2.␤main: Packfile loading failed␤»
09:12 moritz_ meh
09:12 moritz_ elf: say 442 + 474
09:12 p6eval elf 25457: OUTPUT«916␤»
09:13 masak elf++
09:13 masak rakudo--
09:13 Matt-W (not rebuilding when you want to ask it something)++
09:14 moritz_ it segfaulted during build
09:14 moritz_ now trying again with clean + reconfigure
09:14 Matt-W segfaults--
09:14 Matt-W right
09:14 * Matt-W wrenches his brain back to Perl 5 mode
09:17 moritz_ /bin/sh: line 1: 29937 Segmentation fault      /home/evalenv/parrot/parrot perl6_s1.pbc --target=pir src/gen_setting.pm > src/gen_setting.pir
09:17 moritz_ make: *** [perl6.pbc] Error 139
09:18 moritz_ time to real-clean parrot again
09:20 masak that isn't done by default?
09:20 moritz_ it is
09:20 moritz_ but... who knows
09:25 moritz_ still persists
09:27 masak Parrot builds here.
09:28 moritz_ it builds on timtowtdi.org as well
09:28 moritz_ but rakudo build segfaults
09:28 bacek__ good evening
09:33 elmex joined #perl6
09:33 masak bacek: marnin'
09:33 masak moritz_: oh.
09:35 moritz_ did I break the build somehow?
09:36 moritz_ it works in a clean checkout in the parrot-under-rakudo layout
09:36 moritz_ I think I prefer that anyway, in the long run
09:40 masak I'm running r-under-p.
09:40 moritz_ masak: and do you also get the segfault?
09:41 masak no.
09:43 masak uuh, the discussions on trees and datetime objects on p6l are affecting my blood pressure in ways I'm not used to... :/
09:43 elmex joined #perl6
09:48 pugs_svn r25458 | moritz++ | [evalbot] favour parrot-under-rakudo layout, because it works
09:49 p6eval joined #perl6
09:49 masak moritz_: did you mean "rakudo-under-parrot"?
09:49 moritz_ no
09:49 moritz_ I re-organized the build layout on the server
09:49 moritz_ rakudo: say "alive"
09:49 p6eval rakudo : OUTPUT«alive␤»
09:50 moritz_ rakudo: say "alive"
09:50 p6eval rakudo 2e438a: OUTPUT«alive␤»
09:50 moritz_ it now only rebuilds parrot when needed
09:51 moritz_ and only does a 'make clean' if parrot was rebuilt
09:52 bacek moritz_++
09:55 Matt-W that should make it faster too :)
09:56 moritz_ aye
09:56 moritz_ but also less robust when a 'make clean' is really required
10:01 masak less robust is just what we don't need more of :/
10:02 moritz_ masak: I know
10:02 moritz_ masak: maybe I should just add a cron job that does a 'make clean' twice a day
10:02 masak maybe.
10:03 moritz_ the long term solution is of course to build a more robust system that keeps a working copy around while it rebuilds the other
10:03 bacek rakudo: sub foo($f) { say $f }; foo 10;
10:03 p6eval rakudo 2e438a: OUTPUT«10␤»
10:03 moritz_ but that will take some planning and time, both of which I rather invest in other stuff these days
10:03 bacek rakudo: multi sub foo($f) is export() { say $f }; foo 10;
10:03 p6eval rakudo 2e438a: OUTPUT«10␤»
10:03 masak know the feeling.
10:07 bacek rakudo: package Test { our $tests = 0; multi sub plan(Whatever $w) is export() {}; multi sub plan($n) { say $n }; sub ok() { $tests++; say "ok " ~ $tests; } }; plan 5; ok();
10:07 p6eval rakudo 2e438a: OUTPUT«Could not find non-existent sub plan␤current instr.: '_block14' pc 60 (EVAL_21:40)␤»
10:08 bacek rakudo: package Test { our $tests = 0; multi sub plan(Whatever $w) is export() {}; multi sub plan($n) is export() { say $n }; sub ok() { $tests++; say "ok " ~ $tests; } }; plan 5; ok();
10:08 p6eval rakudo 2e438a: OUTPUT«Could not find non-existent sub plan␤current instr.: '_block14' pc 60 (EVAL_21:40)␤»
10:09 moritz_ you have to export it by default
10:11 moritz_ rakudo: package Test { our $tests = 0; multi sub plan(Whatever $w) is export(:DEFAULT) { }; multi sub plan($n) is export(:DEFAULT) { say $n }; sub ok() is export(:DEFAULT) { $tests++; say "ok " ~ $tests; } }; plan 5; ok(); say $Test::tests;
10:11 p6eval rakudo 2e438a: OUTPUT«Could not find non-existent sub plan␤current instr.: '_block14' pc 60 (EVAL_22:40)␤»
10:11 moritz_ rakudo: package Test { our $tests = 0; multi sub plan(Whatever $w) is export(:DEFAULT) { }; multi sub plan($n) is export(:DEFAULT) { say $n }; sub ok() is export(:DEFAULT) { $tests++; say "ok " ~ $tests; } }; use Test; plan 5; ok(); say $Test::tests;
10:11 moritz_ I think it can't be tested yet from within a single file
10:11 p6eval rakudo 2e438a: No output (you need to produce output to STDOUT)
10:16 ejs joined #perl6
10:16 moritz_ wayland: you have perlcabal.org power... the HTML documents of the synopsis are generated by util/smartlinks.pl
10:16 moritz_ wayland: and the index page lives in docs/feather/syn_index.html
10:17 moritz_ wayland: so you're very welcome (and encouraged) to DIY
10:18 bacek_ joined #perl6
10:19 * bacek_ 's ISP sucks...
10:19 bacek_ perl6: sub foo { 1;; }; say foo
10:19 p6eval rakudo 2e438a: OUTPUT«Null PMC access in isa()␤current instr.: 'parrot;List;!flatten' pc 5830 (src/classes/List.pir:253)␤»
10:19 p6eval ..elf 25458, pugs: OUTPUT«1␤»
10:20 Matt-W naughty rakudo!
10:20 bacek_ PCT bug
10:21 * bacek_ summon masak :)
10:21 masak bacek_: that one's already in there, I believe.
10:21 bacek_ But this bug probably should go into parrot's trac
10:22 bacek_ masak: yes
10:22 masak bacek_: if Rakudo suffers from the error, I usually send it to rakudobug.
10:22 bacek_ masak: *
10:22 bacek_ ;)
10:23 masak :)
10:23 * Matt-W summon a doughnut
10:23 bacek_ Doh!
10:23 Matt-W doesn't work :(
10:24 bacek_ std: sub 'infix:<;)>' { ... }; * ;) *
10:24 p6eval std 25458: OUTPUT«############# PARSE FAILED #############␤Malformed routine definition at /tmp/XhavhOnd7r line 1:␤------> [32msub [31m'infix:<;)>' { ... }; * ;) *[0m␤    expecting any of:␤       name␤   routine_def␤        trait␤FAILED 00:02 33m␤»
10:24 bacek_ std: sub infix:<;)> { ... }; * ;) *
10:24 p6eval std 25458: OUTPUT«############# PARSE FAILED #############␤Can't understand next input--giving up at /tmp/r0SvRaGEOx line 1:␤------> [32msub infix:<;)> { ... }; * ;[31m) *[0m␤FAILED 00:02 33m␤»
10:25 bacek_ std: sub infix:<Y> { ... }; * Y *
10:25 p6eval std 25458: OUTPUT«ok 00:05 37m␤»
10:25 moritz_ I've just delete the lex cache
10:25 moritz_ std: sub infix:<;)> { ... }; * ;) *
10:26 p6eval std 25458: OUTPUT«############# PARSE FAILED #############␤Can't understand next input--giving up at /tmp/bM2C2PPLTu line 1:␤------> [32msub infix:<;)> { ... }; * ;[31m) *[0m␤FAILED 00:02 33m␤»
10:26 rindolf joined #perl6
10:26 bacek_ moritz_: Is this allowed?
10:27 bacek_ (add infix:<;)>)
10:27 moritz_ bacek_: I think so
10:27 bacek_ std: sub infix:<(:> { ... }; * (: *
10:28 p6eval std 25458: OUTPUT«ok 00:03 34m␤»
10:28 masak so you just found a STD bug, then?
10:29 moritz_ it probably gets in the way of the end-of-statement recognition
10:29 bacek_ masak: I can find bugs too! :)
10:29 bacek std: sub infix:<:)> { ... }; * ;) *
10:29 masak bacek: report it to stdbug :)
10:29 p6eval std 25458: OUTPUT«############# PARSE FAILED #############␤Can't understand next input--giving up at /tmp/0G9rOrS1h2 line 1:␤------> [32msub infix:<:)> { ... }; * ;[31m) *[0m␤FAILED 00:02 33m␤»
10:30 bacek std: sub infix:<^_^> { ... }; *^_^*
10:30 p6eval std 25458: OUTPUT«ok 00:03 34m␤»
10:30 bacek OH SHI...
10:31 moritz_ lol
10:31 bacek Looks like we giving people to shout foot with nuclear bomb
10:33 masak Perl 6, the ultimate smiley language.
10:37 wayland moritz_: Someone clued me in on the cabal power, so I've done the edits
10:37 wayland But I don't know how to get it to generate HTML from the POD :)
10:38 moritz_ wayland: you have to hack util/smartlinks.pl to do that
10:38 masak std: sub infix:<☺> { ... }; *☺*
10:38 p6eval std 25458: OUTPUT«can't create CORE.pad.store: Permission denied at Cursor.pm line 194␤FAILED 00:02 32m␤»
10:39 masak
10:42 bacek std: class BF {}; sub postfix:<< < >> {}; sub postfix:<< > >> { };
10:42 p6eval std 25458: OUTPUT«can't create CORE.pad.store: Permission denied at Cursor.pm line 194␤FAILED 00:02 32m␤»
10:42 bacek ouch
10:42 bacek std: sub infix:<^_^> { ... }; *^_^*
10:42 p6eval std 25458: OUTPUT«can't create CORE.pad.store: Permission denied at Cursor.pm line 194␤FAILED 00:02 32m␤»
10:44 bacek std: sub ff {}; *^ff^ff^*
10:44 p6eval std 25458: OUTPUT«can't create CORE.pad.store: Permission denied at Cursor.pm line 194␤FAILED 00:02 32m␤»
10:46 Matt-W you broke std!
10:47 * Matt-W points and laughs
10:47 bacek It's all masak's fault!!!
10:50 p6eval joined #perl6
10:51 * masak likes breaking things
10:51 moritz_ std: say "alive"
10:51 p6eval std 25458: OUTPUT«ok 00:03 33m␤»
10:52 moritz_ I gave up my paranoia
10:52 moritz_ and made evalbot run as the user who also own the environment
10:54 bacek std: sub ff {}; *^ff^ff^*
10:54 p6eval std 25458: OUTPUT«ok 00:02 33m␤»
10:55 bacek std: sub infix:<☺> { ... }; *☺*
10:55 p6eval std 25458: OUTPUT«ok 00:03 34m␤»
10:55 bacek hooray!
10:56 bacek sub ☺ {}; sub ☹ {}; ☺;
10:56 bacek std: sub ☺ {}; sub ☹ {}; ☺;
10:56 p6eval std 25458: OUTPUT«############# PARSE FAILED #############␤Malformed routine definition at /tmp/FbYj9gVSQy line 1:␤------> [32msub [31m☺ {}; sub ☹ {}; ☺;[0m␤    expecting any of:␤       name␤   routine_def␤      trait␤FAILED 00:02 33m␤»
10:56 bacek second bug for std in a raw???
10:58 bacek std: multi sub чё ($cond, &then, &else) {}; чё 1 { say "O HI" }
10:58 p6eval std 25458: OUTPUT«############# PARSE FAILED #############␤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/25bhhWk3NS line 1:␤------> [32mi sub чё ($cond, &then, &else) {}; чё 1 [31m{ say "O HI" }[0m␤    expecting any of:␤        infix or
10:58 p6eval ..meta-...
10:59 bacek std: multi sub IF ($cond, &then, &else) {}; IF 1 { say "O HI" }
10:59 p6eval std 25458: OUTPUT«############# PARSE FAILED #############␤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/agXvLhk6UH line 1:␤------> [32mi sub IF ($cond, &then, &else) {}; IF 1 [31m{ say "O HI" }[0m␤    expecting any of:␤    infix or
10:59 p6eval ..meta-...
10:59 bacek std: multi sub IF ($cond, &then, &else) {}; IF 1, { say "O HI" }
10:59 p6eval std 25458: OUTPUT«ok 00:04 36m␤»
10:59 bacek std: multi sub чё ($cond, &then, &else) {}; чё 1, { say "O HI" }
11:00 p6eval std 25458: OUTPUT«############# PARSE FAILED #############␤Malformed "multi" definition␤Malformed routine definition␤Malformed routine definition at /tmp/6of5GX5YeJ line 1:␤------> [32mmulti sub чё ($[31mcond, &then, &else) {}; чё 1, { say "O H[0m␤    expecting twigil␤FAILED 00:02 33m␤»
11:00 bacek no unicode for me...
11:02 masak question is whether it depends on STD or on p6eval.
11:02 moritz_ perl6: sub möp { say "tröööt" }; möp()
11:02 p6eval elf 25458, pugs, rakudo 2e438a: OUTPUT«tröööt␤»
11:03 masak bah, iso-8859-1.
11:03 masak that's nothing. :)
11:05 bacek pugs: sub infix:<^_^> {}
11:05 p6eval pugs: RESULT«\sub :(@_) "$_" := "Scalar" #<Scalar:0xb7b50b65>␤          "@_" := "Array" #<Array:0xb7b50b6d>␤          "&?ROUTINE" := "Sub" #<Sub:0xb728483d>␤          "&?BLOCK" := "Sub" #<Sub:0xb728483d> {"&infix:^_^" := "Sub" #<Sub:0xb6670a55>, "$_" := "Scalar" #<Scalar:0xb7b6fb0d>␤         ...
11:06 bacek pugs: sub infix:<^_^>($a,$b) { $a.perl ~ '^_^' ~ $b.perl }; say *^_^*
11:06 p6eval pugs: OUTPUT«\Inf^_^\Inf␤»
11:08 bacek pugs: sub infix:<^_^>($a,$b) { ($a ~~ * ?? '*' !! $a.perl)  ~ '^_^' ~ ($b ~~ * ?? '*' !! $b.perl) }; say *^_^*
11:08 p6eval pugs: OUTPUT«*^_^*␤»
11:08 bacek Nya :)
11:09 bacek pugs: sub infix:<^_^>($a,$b) { ($a ~~ * ?? '*' !! $a.perl)  ~ '^_^' ~ ($b ~~ * ?? '*' !! $b.perl) }; say 0^_^0
11:09 p6eval pugs: OUTPUT«\0^_^\0␤»
11:22 SamB joined #perl6
11:23 ejs1 joined #perl6
11:35 wayland moritz_: Shouldn't I rather add another run of smartlinks.pl to feather/script/update-syn ?
11:35 wayland with different --syn-dir and --out-dir options?
12:02 wayland moritz_: And one more thing; does the rename of the S32 documents need to be done in some special fashion?  At the moment, I'd be happy with String.pod => Str.pod and Tree.pod => Plex.pod.
12:08 masak IMNSHO, renaming it Plex does not make the problem that role is trying to solve any more worth solving.
12:08 masak an XML hierarchy is very different from a directory structure.
12:09 masak making Perl 6 treat them as the same thing will not help anyone, and will make Perl 6 less useful.
12:14 masak wayland: if you want, I can put this into mail form as well. currently I'm staying away from writing anything about discussions about DateTime and Tree/Plex, since even reading about it makes me break out into a cold sweat.
12:14 masak s/discussions about//
12:19 Nom- Anyone heard anything abour O'Reilly firing most of their perl staff?  I was wondering if there's a news article about it somewhere
12:19 elmex_ joined #perl6
12:20 simcop2387 joined #perl6
12:23 moritz_ Nom-: I just read a blog post by chromatic who said he wasn't an editor anymore
12:24 moritz_ wayland: I don't care how its done, as long as it appears on the index page
12:24 moritz_ wayland: one more thing I'd like to see is a short way to smartlink to these files....
12:24 moritz_ for example with S32/Str/foo isntead of S32-very-long-name/Str/foo
12:42 masak oh, wait.
12:42 masak moritz_: yes, I get the segfault, as well.
12:43 jnthn hi all
12:43 ispy_ joined #perl6
12:43 masak jnthn: dobru rano.
12:45 jnthn masak: s/dobru/dobre/ :-)
12:45 jnthn masak: dobru does with "noc" :-)
12:45 masak oh!
12:45 moritz_ http://www.perlmonks.org/?node_id=290607 what a cool yaph
12:45 jnthn Apparently you just state the morning is good, but you wish people a good night. ;-)
12:45 masak ah.
12:45 masak so, nominative vs accusative?
12:46 jnthn Ye
12:46 jnthn s
12:46 masak gotcha.
12:46 * jnthn backlogs to see how wanted/talked about him
12:47 jnthn s1n: Feel free to ask. ;-)
12:51 Southen_ joined #perl6
13:16 WootKit joined #perl6
14:23 pugs_svn r25459 | autarch++ | method Str returns Str seems rather redundant and repetitive
14:27 icwiener joined #perl6
14:42 skids joined #perl6
14:54 moritz_ now I also got the weird segfault in rakudo
14:58 moritz_ I rewinded parrot to this morning's state, and rakudo to the state of some time of yesterday, and still get the same error
15:00 moritz_ that *is* weird
15:11 dalek rakudo: f23eda2 | (Moritz Lenz)++ | build/Makefile.in:
15:11 dalek rakudo: [build] remove perl6_s1.pbc during 'make clean'
15:11 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f​23eda2c5251db5a90f5fdd3b587d4c234ee70e4
15:15 FurnaceBoy joined #perl6
15:16 alester joined #perl6
15:17 hercynium joined #perl6
15:18 M_o_C joined #perl6
15:18 nihiliad joined #perl6
15:19 aindilis joined #perl6
15:40 alester TA DA
15:40 alester My first bug fixin' commit!  Whoo!
15:40 alester Well, not fixing.  Uncovering.
15:42 ejs2 joined #perl6
15:49 alester come on, someone gimme a high five
15:58 skids alester++
15:58 cj huh?  what'd he do?
15:58 cj alester: I never recognize your nick
15:58 skids Just asked for it.  Though maybe a high five would be +=5 ?
15:59 cj wow, autarch is contributing, too?  this seems like the who's who of perl :)
16:00 skids Can't be, I'm here and I'm nobody :-)
16:07 alester You say "who's who" like you're not part of that "who's who".
16:08 fridim_ joined #perl6
16:09 alester Right now I'm just trying to grok the ops.
16:09 alester Need to understand diff between @x[-1] and @x[*-1].
16:12 Tene_ joined #perl6
16:15 eternaleye joined #perl6
16:21 justatheory joined #perl6
16:35 TimToady bacek: note that sub ☺ {} is illegal because ☺ is not alphabetic
16:37 frew_ joined #perl6
16:38 ejs joined #perl6
17:08 pmurias joined #perl6
17:13 jnthn moritz_: Did you solve your issue with Rakudo segv'ing when building the setting?
17:13 jnthn Since someone else just reported similar on the mailing list/RT.
17:14 pmurias joined #perl6
17:20 pugs_svn r25460 | pmurias++ | [mildew] fixed Prelude to CORE renaming, --no-prelude is renamed to --empty-setting
17:24 * araujo wonders what is that character typed by TimToady
17:27 TimToady it's a smiley, which should show up if your client knows utf-8
17:27 araujo yeah
17:27 araujo just that I barely can see it
17:27 araujo TimToady, that is the smiley operator?
17:27 araujo :D
17:39 pjcj joined #perl6
17:52 parduncia joined #perl6
17:53 f00li5h joined #perl6
17:59 IllvilJa joined #perl6
18:24 Psyche^ joined #perl6
18:29 barney joined #perl6
18:48 ruoso joined #perl6
18:52 alester ok, so what's the diff between @x[-1] and @x[*-1]
18:56 TimToady @x[-1] is almost certainly illegal
18:56 lambdabot Unknown command, try @list
18:56 TimToady see, lambdabot agrees
18:56 alester well, it returns an uninitialized value right now.
18:56 alester A Rakudo test was doing      say 'ok ' ~ @x[-1];
18:56 TimToady because arrays start at 0
18:56 TimToady and there are no negative elements
18:57 alester ok.
18:57 alester So * means "end of"?
18:57 TimToady here's what actually happens
18:57 TimToady * means Whatever
18:57 TimToady different operators overload that to mean various things
18:57 cj TimToady: looks like I still don't have irssi set up right for UTF-8.  wah.
18:58 cj TimToady: did diakopter invite you to the lang.net symposium yet?
18:58 TimToady normal subtraction overloads * - 1 to return { $^a - 1 }
18:58 TimToady the subscript is smart enough to know that if it s passed a unary function
18:58 TimToady it feeds it the dimension length as the argument
18:58 timbunce joined #perl6
18:58 alester Jeepers, Mr. Wall, that's keen.
18:58 alester and head-hurting.
18:58 alester but OK.
18:59 alester hey mr. bunce
18:59 TimToady you can just cargo cult it
18:59 TimToady just write *-1 to index from the end
18:59 timbunce alester: hi
19:00 TimToady but other operators will interpret * other ways
19:00 TimToady like 1..* means 1 to whatever
19:00 frew_ so * is kinda like the DWIM operator
19:00 frew_ ?
19:00 TimToady and 42 xx * means an arbitrary number of 42's
19:01 TimToady except it's a DWIM term rather than operator
19:01 TimToady and it's got its own special type Whatever so that it's easy to write multis for
19:01 frew_ interesting
19:01 frew_ so * makes other ops DWIM
19:01 TimToady it doesn't make them without their cooperation
19:02 frew_ well yeah, but conceptually that's what it does, right?
19:02 TimToady somebody has to define multi infix:<-> (Whatever, Num) {...}
19:02 PerlJam timbunce: whyfor do you grace us with your presence? Will we be seeing some DBI (or DBDI) goodness for perl6 from you soon?
19:02 frew_ right
19:02 timbunce PerlJam: nah, my irc client autojoins a bunch of channels when I start it :)
19:03 TimToady it politely requests the operator to be smart :)
19:03 frew_ nice
19:03 TimToady and it depends entirely on the operator what that means
19:03 frew_ right
19:03 frew_ of course
19:03 TimToady @foo[*-1] depends on the - operator
19:03 lambdabot Unknown command, try @list
19:03 TimToady but @foo[*] depends on the subscript operator
19:03 frew_ because putting that inforation in the * would be silly
19:04 * PerlJam wonders what @foo[*+1] does.
19:04 frew_ rakudo: *-1
19:04 p6eval rakudo f23eda: OUTPUT«Use of uninitialized value␤»
19:04 TimToady tries to index the 2nd undefined element
19:05 PerlJam hmm.
19:05 TimToady I don't think rakudo has generalized the meaning of *-1 to a closure yet
19:05 TimToady but I could be wrong
19:05 TimToady rakudo: (*-1).WHAT
19:05 p6eval rakudo f23eda: OUTPUT«Use of uninitialized value␤»
19:05 PerlJam so  @foo[*-0] and @foo[*+0] could be different from @foo[*] ?
19:05 frew_ pugs: *-1
19:05 p6eval pugs: RESULT«Inf»
19:05 frew_ pugs: *+1
19:05 p6eval pugs: RESULT«Inf»
19:05 frew_ hm
19:05 TimToady indeed, @foo[*] is all the elements
19:06 TimToady while @foo[*+0] is the first undef one
19:06 frew_ so it would find (1, undef, 2)
19:06 frew_ weird
19:06 TimToady pugs thinks * means Inf
19:06 TimToady since it was first used in 1..*
19:06 frew_ right
19:07 PerlJam push @foo, "blah"  same same    @foo[*+0] = "blah"   ?
19:07 TimToady @foo[*+0] = "foo" is equivalent to push @foo, "foo"
19:07 lambdabot Unknown command, try @list
19:08 PerlJam gosh, I hope that's an idiom that doesn't catch on.
19:08 PerlJam I'm sorry I even mentioned it now.
19:08 PerlJam :-)
19:08 frew_ wait, is that how perl5 push works?  If I have (1,undef,2) and push onto it it will do (1,"foo",2)?
19:08 TimToady yes, we'll use @foo ,= "blah" instead
19:08 TimToady :)
19:08 frew_ oh that's awesome
19:09 frew_ you are such a linguust
19:09 TimToady no, when I say the first undef, I mean the first one off the end
19:09 frew_ ok
19:09 TimToady in p5, $foo[@foo] = "blah"
19:09 PerlJam so, @foo[*-0] could be one end and @foo[*+0] could be the other?   ;->
19:09 frew_ so if I have @a = (1,2,3,undef,undef) and push onto it I get (1,2,3,"foo",undef)
19:10 PerlJam frew_: er, no.
19:10 TimToady PerlJam: It could, but it won't :P
19:10 frew_ why not?
19:10 frew_ it was the first undef...
19:10 TimToady no, when I say the first undef, I mean the first one off the end
19:10 TimToady no, when I say the first undef, I mean the first one off the end
19:10 frew_ then why not just say the last one?
19:11 frew_ or something like that?
19:11 PerlJam frew_: TimToady is talking about  the invisible undef  that's not there past the end of the array
19:11 PerlJam frew_: because that would be wrong too :)
19:11 * frew_ is confused
19:11 frew_ I'll just accept it
19:11 TimToady the length of an array has nothing to do with its contents
19:11 frew_ it does what I know push to do
19:12 TimToady and push only pays attention to the length of the array, not whether there are any undefs in it
19:12 frew_ I'll have to play with it to really see what you mean
19:12 TimToady I was using "first undef" to refer to the undefs that result if you index off the end of the array
19:12 TimToady admittedly imprecise
19:12 frew_ so like the null character in c strings
19:13 frew_ kinda
19:13 TimToady which Perl also ignores
19:13 frew_ but still
19:13 frew_ kinda like that
19:13 frew_ right?
19:13 TimToady yes, just the same
19:13 frew_ k
19:13 TimToady the length has nothing to do with the contents
19:13 TimToady and concatenation only looks at the length
19:13 frew_ hm
19:13 frew_ can you show me that in code?
19:13 frew_ like
19:14 frew_ rakudo: (1,2,3) + (2)
19:14 p6eval rakudo f23eda: RESULT«5»
19:14 TimToady $a = "a\0c" . "d\0f" has a length of 6 in Perl 6
19:14 TimToady 5
19:14 frew_ oh, well that's strings
19:14 TimToady ~ for perl 6
19:14 frew_ I udnerstand that fully
19:14 frew_ what about with arrays though?
19:14 TimToady arrays are just the same
19:14 TimToady only they contain scalars instead of chars
19:14 frew_ how can something not be a single item in a list?
19:15 PerlJam frew_: analogize string to array and character to array element.
19:15 frew_ I can't think of an analogy for that; UTF makes it clear for strings, but that just tells me that we had what we thought of as a character wrong in the first place
19:16 TimToady an array is more like a byte string
19:16 TimToady fixed-size elements
19:16 frew_ ok
19:16 TimToady (as far as the array is concerned)
19:16 frew_ so the length of ("f",
19:16 frew_ er
19:17 frew_ so the length of ("f", "re", "w") is 4?
19:17 TimToady we don't use the term length in P6
19:17 frew_ haha
19:17 TimToady the list has 3 elements
19:17 TimToady and it has 4 chars
19:17 frew_ ok
19:17 TimToady you have to keep your units straight
19:17 frew_ so could you say push adds an element to a list after the last element?
19:17 TimToady yes
19:18 TimToady except that lists are immutable
19:18 TimToady you can only push on an array, which is mutable
19:18 frew_ hence the ,= ?
19:18 frew_ oh
19:18 frew_ hm
19:18 TimToady ,= still requires something mutable on the left
19:19 frew_ so a list is something not in perl5
19:19 frew_ correct?
19:19 PerlJam no, perl 5 has lists.
19:19 frew_ that are immutable?
19:19 PerlJam ('this','is','a','list','of','values')
19:19 frew_ in perl5 a list is an array right?
19:20 PerlJam no.
19:20 TimToady no
19:20 PerlJam the list I just wrote is immutable.
19:20 frew_ k
19:20 TimToady in @a = (1,2,3), there's no way to add an element to the (1,2,3)
19:20 TimToady only to the @a
19:20 frew_ rakudo: ('foo', 'bar', 'baz').push('fail')
19:21 p6eval rakudo f23eda: OUTPUT«argument doesn't array␤current instr.: 'parrot;P6metaclass;dispatch' pc 302 (src/classes/ClassHOW.pir:154)␤»
19:21 TimToady Perl 5 doesn't expose a List type, though Perl 6 does
19:21 frew_ oh
19:21 frew_ hm
19:21 TimToady pugs: ('foo', 'bar', 'baz').push('fail')
19:21 p6eval pugs: OUTPUT«*** Can't modify constant item: VUndef␤    at /tmp/usj20sVMDT line 1, column 1 - line 2, column 1␤»
19:21 frew_ rakudo: ['foo', 'bar', 'baz'].push('fail')
19:21 p6eval rakudo f23eda: RESULT«4»
19:22 frew_ pugs: ['foo', 'bar', 'baz'].push('fail')
19:22 p6eval pugs: RESULT«4»
19:22 TimToady you may certainly push a value onto an anonymous array
19:22 TimToady because the array is mutable
19:22 frew_ so [] is an array and () is a list...?
19:22 TimToady in general, yes
19:22 frew_ hmmm
19:22 TimToady currently () promotes to [] in item context, but we may relax that slightly
19:23 frew_ that explains why (...).perl always gives [...]
19:23 frew_ because a variable is an array, not a list
19:23 frew_ right?
19:24 ruoso TimToady, we don't need to relax that... one can use binding if wanting to keep the read-onlyness
19:24 * PerlJam can see why mathematicians eschew english for more precise language.
19:24 ruoso pugs: my $a := (1,2,3); $a.push(4);
19:24 PerlJam (though mathematicians have a hard time expressing nuance too  :)
19:24 p6eval pugs: OUTPUT«*** Can't modify constant item: VUndef␤    at /tmp/0k895tloeW line 1, column 19-29␤»
19:24 TimToady well, I'll have to explain all this in a book someday, so it's good practice :)
19:25 frew_ TimToady: Programming Perl 6?
19:25 frew_ that would be excellent
19:25 PerlJam TimToady: sign me up for technical review.  I'm sure I'll be just as confused as frew_ about some things  :)
19:26 diakopter Not Implementing Perl 6 :P
19:26 frew_ hah
19:27 PerlJam I'm still struggling with why I would ever want the $obj.*meth forms.  But maybe that's just because I've never had such direct access to the dispatcher before.
19:28 TimToady you don't want .* unless your methods are written to all want to run
19:28 TimToady so it would be more for calling a bunch of submethods
19:29 TimToady where each parent type has its own bit that it wants to contribute
19:29 PerlJam yes, but why?  I feel I'm missing something fundamental.
19:29 TimToady much like BUILD runs potentially many times for each new()
19:29 PerlJam wait ... not the *same* BUILD?
19:29 frew_ could .* maybe be great for OO stuff in general?
19:29 ruoso PerlJam, eventually the same BUILD
19:29 PerlJam or is that something else I misunderstand?
19:29 ruoso BUILD in Object is a method
19:30 ruoso but in subclasses are a submethod
19:30 pmurias ruoso: hi
19:30 ruoso hi pmurias
19:30 pmurias ruoso: do you think renaming Prelude to CORE makes sense?
19:30 ruoso so you can override the BUILD for everyone that doesn't define their all BUILD
19:30 ruoso s/their all/their own/
19:30 PerlJam pmurias: you could go with "setting" like rakudo  :)
19:30 ruoso pmurias, it would probably make even more sense to rename Prelude to Setting...
19:31 ruoso actually
19:31 ruoso wait
19:31 ruoso no... it should be CORE
19:31 TimToady there are potentially many settings, but only one CORE
19:31 ruoso yes...
19:31 ruoso that is *the* CORE
19:31 TimToady but it only has to appear as CORE:: to the user, it doesn't have to be defined in a file named CORE
19:34 TimToady lunch &
19:37 ruoso but in the absense of any better idea, CORE.pm looks absolutely OK ;)
19:37 fridim_ joined #perl6
19:38 viklund joined #perl6
19:38 viklund @seen masak
19:38 lambdabot I saw masak leaving #perl6 6h 2m 48s ago, and .
19:39 viklund ", and ."??
19:39 viklund oh, well...
19:39 pmurias ruoso: how should the method to get the string form of VAST::signature be called?
19:40 * pmurias has problems making up apropriate names...
19:45 * ruoso really pissed off by the way freedesktop.org people is handling the .desktop security issue (see http://bugs.debian.org/cgi-b​in/bugreport.cgi?bug=515104)
19:45 ruoso pmurias, VAST::signature->string_form ? :P
19:46 * ruoso later &
19:49 rob joined #perl6
19:51 [particle]1 joined #perl6
19:59 Avada joined #perl6
20:02 autarch joined #perl6
20:02 autarch is there a synopsis which describes (or even lists) the built-in data types for P6?
20:03 icwiener joined #perl6
20:07 autarch bueller?
20:12 diakopter autarch: have you browsed the [headings of the] synopses at http://perlcabal.org/syn/
20:14 autarch yep
20:14 autarch I'd expect it here - http://perlcabal.org/syn/S09.html - but it's not
20:19 TimToady try S02
20:21 TimToady spack: Complex
20:22 TimToady I guess spack is down...
20:22 autarch TimToady: thanks!
20:23 autarch uh, can someon explain to a mathtard like myself the difference between Num & Rat?
20:23 autarch (keeping in mind my last math class was about 18 years ago)
20:26 TimToady Num basically means floating point, and Rat means the ratio of two integers
20:26 TimToady there is some provision in the Num type's spec for lazily doing division though
20:26 TimToady so it could store a Rat internally until forced to do the division
20:26 autarch so for seconds in the Temporal stuff, do we want Num?
20:27 autarch cause you were opposed to a separate attosecond attribute
20:27 TimToady yes, I'd like Num, though Rat would do in a pinch, since it can also represent integers
20:28 autarch well, you're in charge ;)
20:28 TimToady and if Num uses Rat to optimize, that's okay too
20:28 autarch and _I_ certainly have no preference here
20:28 TimToady my feeling is that by the time we care about yoctoseconds we'll have extended floaters to 128 bit by default anyway :)
20:29 Tene joined #perl6
20:29 autarch as I wrote in the doc, attosecond is the smallest thing measured to date
20:29 autarch I'm not too worried about precision at that level or below
20:29 autarch if that _really_ matters to you, you're going to code your own stuff to handle it, and probably store as an integer number of something-seconds
20:30 TimToady and 64-bit floats are good enough for that, unless you're trying to calculate the difference between attoseconds a millenium from now :)
20:30 pugs_svn r25461 | autarch++ | Make the Temporal::Time $.second attribute a Num, per TimToady, and do
20:30 pugs_svn r25461 | autarch++ | away with attoseconds entirely.
20:30 TimToady autarch: agreed, which is why I said what I said about time mavins :)
20:31 TimToady they'll do their own thing regardless...
20:33 pugs_svn r25462 | autarch++ | Some formatting tweaks - also remove returns from overloading methods like Str & Num
20:40 meppl good night
21:12 PZt joined #perl6
21:40 autarch left #perl6
21:40 mberends joined #perl6
21:44 alester Are we opposed to vim modelines?
21:46 jnthn alester: Where? In Rakudo?
21:46 alester y
21:46 jnthn alester: I don't care.
21:46 jnthn I don't use vim.
21:46 jnthn If they are there to help those who do, I won't mind their presence.
21:46 wage joined #perl6
21:53 alester also, I keep getting this file called "-" in my directory
21:53 alester anyone else getting this or is it just me?
21:54 alester Yes, I know "-" is STDIN, so clearly something is not right.
21:55 jnthn alester: In the root of your Rakudo build dir?
21:55 alester yup
21:55 jnthn I don't see it on Win32...
21:55 jnthn I can't think off-hand what in the makefile might be to blame...
21:55 jnthn Oh, check the open lines in Configure.pl maybe?
21:56 jnthn Or see if it is created during running Configure.pl...
21:57 pugs_svn r25463 | pmurias++ | [mildew]
21:57 pugs_svn r25463 | pmurias++ | &infix:<+>:(int,int) looks up in the lexical pad correctly
21:57 pugs_svn r25463 | pmurias++ | added a t/single_variant.t to test for it
21:59 pugs_svn r25464 | lwall++ | define Instant and Duration as core types representing atomic time
22:02 pugs_svn r25465 | lwall++ | typo
22:03 Entonian joined #perl6
22:09 wknight8111 joined #perl6
22:20 shinobi-cl joined #perl6
22:37 timbunce joined #perl6
22:40 pmurias perl6: my &foo;
22:40 p6eval elf 25465: OUTPUT«/home/evalenv/pugs/m​isc/STD_red/match.rb:141:in `block in to_dump0': undefined method `to_dump0' for true:TrueClass (NoMethodError)␤   from /home/evalenv/pugs/misc/STD_red/match.rb:140:in `each'␤      from /home/evalenv/pugs/misc/STD_red/match.rb:140:in `map'␤       from
22:40 p6eval ../home/evalenv/pugs/mi...
22:40 p6eval ..rakudo f23eda: RESULT«undef»
22:40 p6eval ..pugs: RESULT«\:() {}{Prim ([Pugs.AST.Internals.Val] -> Pugs.AST.Eval.Eval Pugs.AST.Internals.Val)}»
22:40 pmurias perl6: my &infix:<+>(int,int);
22:40 p6eval rakudo f23eda: OUTPUT«Statement not terminated properly at line 1, near ":<+>(int,i"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
22:40 p6eval ..pugs: OUTPUT«*** ␤    Unexpected ","␤    at /tmp/YfoSguiXG7 line 1, column 18␤»
22:40 p6eval ..elf 25465: OUTPUT«/home/evalenv/pugs/m​isc/STD_red/match.rb:141:in `block in to_dump0': undefined method `to_dump0' for true:TrueClass (NoMethodError)␤   from /home/evalenv/pugs/misc/STD_red/match.rb:140:in `each'␤      from /home/evalenv/pugs/misc/STD_red/match.rb:140:in `map'␤       from
22:40 p6eval ../home/evalenv/pugs/mi...
22:52 dominiko joined #perl6
22:58 pmurias mildew: say "hi"
22:58 p6eval mildew: OUTPUT«can't create lex/STD/statementlist_01.store: Permission denied at ../../src/perl6/Cursor.pm line 551␤»
22:58 pugs_svn r25466 | pmurias++ | [mildew] my &infix:<+>:(int,int); works
23:02 pugs_svn r25467 | lwall++ | [CORE] add Instant and Duration
23:11 justatheory_ joined #perl6
23:12 aindilis` joined #perl6
23:14 mikehh joined #perl6
23:20 Dalyor joined #perl6
23:20 Dalyor Bonsoir tout le monde !
23:21 skids joined #perl6
23:25 Dalyor Comment puis-je faire pour exploiter les donn�es d'un fichier ? Je m'explique : je lance un programme avec recup dans un fichier ..toto.exe >>recup.txt.  Le souci c'est que les donn�e apparaissent sous forme de tableau (1er ligne : Nom, prenom, etc.. Deuxieme ligne; martin robert..3eme ligne: david bernard ..Etc)
23:27 Tene_ joined #perl6
23:27 Dalyor Je voudrais pouvoir liste r�cup�rer les donn�es de chaque colonne a part. Est-ce possible svp ? Auriez vous une URL ? me donner . Merci pour l'aide :)
23:28 diakopter Dalyor: maybe see #perlfr on irc.perl.org
23:29 Dalyor oh sorry .. thx :)
23:36 M_o_C joined #perl6
23:39 shinobi-cl left #perl6
23:40 pugs_svn r25468 | lwall++ | [Cursor] allow term:<x> declarations
23:44 TimToady std: sub sigil:<☺> {...}; ☺foo
23:45 p6eval std 25468: OUTPUT«Potential difficulties:␤  Variable ☺foo is not predeclared at /tmp/erxvWGgy72 line 1:␤------> [32msub sigil:<☺> {...}; [31m☺foo[0m␤ok 00:04 40m␤»
23:45 TimToady std: sub sigil:<☺> {...}; my ☺foo
23:45 p6eval std 25468: OUTPUT«ok 00:04 40m␤»
23:45 TimToady std: sub term:<☺> {...}; ☺
23:45 p6eval std 25468: OUTPUT«ok 00:03 37m␤»
23:46 TimToady std: sub term:<☺> {...}; ☺ + ☺
23:46 p6eval std 25468: OUTPUT«ok 00:03 37m␤»
23:47 jnthn TimToady: Are those actual question marks or some unicode char I can't see?
23:47 TimToady those are plain old smileys
23:47 jnthn OK. :-)
23:47 jnthn I guessed so.
23:47 * jnthn should try and fix his Whatever some day...
23:48 TimToady std: sub infix_prefix_meta_operator:<☺> {...}; 42 ☺+ 1
23:48 p6eval std 25468: OUTPUT«Use of uninitialized value $dba in concatenation (.) or string at STD.pm line 38148.␤############# PARSE FAILED #############␤Syntax error (two terms in a row?) at /tmp/LyCkHeaELF line 1:␤------> [32mnfix_prefix_meta_operator:<☺> {...}; 42 [31m☺+ 1[0m␤    expecting any of:␤
23:48 p6eval .. in...
23:50 Dalyor left #perl6

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

Perl 6 | Reference Documentation | Rakudo