Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-05-02

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:09 Psyche^ joined #perl6
00:12 tokuhirom joined #perl6
00:18 dalek tablets: 2c73ee9 | (Herbert Breunung)++ | docs/ (3 files):
00:18 dalek tablets: explaining: term, expression and statement
00:18 dalek tablets: review: https://github.com/perl6/tablets/commit/2c73ee9c1d
00:19 pochi joined #perl6
00:23 stepnem joined #perl6
00:32 [Coke] lichtkind: why do you ask?
00:33 [Coke] (if you're trying to answer it for a specific context, that'll help. Someone did, I thought, a pretty good job of answering this question in backscroll, so I'm wondering why that wasn't sufficient.)
00:35 [Coke] http://www.webopedia.com/TERM/E/expression.html is a decent generic answer.
00:41 uvtc joined #perl6
00:42 alester joined #perl6
00:45 dalek tablets: e43e7be | (Herbert Breunung)++ | docs/appendix-g-glossary.txt:
00:45 dalek tablets: explaining context
00:45 dalek tablets: review: https://github.com/perl6/tablets/commit/e43e7be067
00:46 uvtc Logical `and` and `or` are still low-precedence forms of `&&` and `||`, correct?
00:47 eviltwin_b joined #perl6
00:48 lichtkind yes
00:48 lichtkind uvtc: its in the index :)
00:48 uvtc thanks, lichtkind
00:49 lichtkind [Coke]: i looked into wp but wanted get sure get the usage in p6 right
00:49 lichtkind uvtc: not forgetting the xor and ^^ pair and we have // :)
00:50 lichtkind which in contrary to p5 has low precedence equivalent of err
00:51 uvtc Why does 1 .. 4 => 1 2 3 4, but 'a' .. 'd' yields an object (rather than a list)?
00:51 lichtkind good night
00:51 uvtc Wait. Belay that.
00:51 uvtc Sorry. They both seem to return a Range.
00:53 uvtc Ah, you can do eager(1 .. 4) to get the list.
00:53 uvtc If you need it.
00:54 uvtc lichtkind, g'night
00:54 scott_ joined #perl6
00:58 uvtc left #perl6
01:01 sorear good * #perl6
01:17 wolfman2000 joined #perl6
01:21 MContagious joined #perl6
01:26 eternaleye joined #perl6
01:28 geekosaur joined #perl6
01:31 bsb joined #perl6
01:31 fgomez joined #perl6
01:35 eviltwin_b joined #perl6
01:36 alester joined #perl6
01:47 dalek tablets: 55b137a | (Herbert Breunung)++ | / (2 files):
01:47 dalek tablets: report count now also autogenerated header as items
01:47 dalek tablets: review: https://github.com/perl6/tablets/commit/55b137a655
01:51 zhongyi0417 joined #perl6
01:57 scott_ joined #perl6
02:14 allbery_b joined #perl6
02:15 scott___ joined #perl6
02:27 eviltwin_b joined #perl6
02:29 scott___ joined #perl6
02:31 geekosaur joined #perl6
02:47 orafu joined #perl6
02:58 kaleem joined #perl6
02:59 eviltwin_b joined #perl6
03:00 wolong joined #perl6
03:02 scott_ joined #perl6
03:47 geekosaur joined #perl6
03:58 am0c joined #perl6
03:58 geekosaur joined #perl6
04:07 eviltwin_b joined #perl6
04:09 MContagious joined #perl6
04:27 noam joined #perl6
04:27 scott_ joined #perl6
04:30 kaleem joined #perl6
04:37 GlitchMr joined #perl6
04:41 geekosaur joined #perl6
04:52 sisar joined #perl6
04:57 eviltwin_b joined #perl6
04:58 birdwindupbird joined #perl6
05:02 MContagious joined #perl6
05:05 birdwindupbird joined #perl6
05:33 birdwind1pbird joined #perl6
05:41 eviltwin_b joined #perl6
05:49 moritz \o
05:49 kaleem joined #perl6
05:50 lestrrat joined #perl6
05:56 mucker joined #perl6
05:57 wtw joined #perl6
05:58 MContagious joined #perl6
06:11 geekosaur joined #perl6
06:14 fgomez joined #perl6
06:20 sorear o/ moritz
06:27 fgomez joined #perl6
06:35 frettled \o/
06:36 tadzik /o\
06:43 eviltwin_b joined #perl6
06:43 fgomez joined #perl6
06:46 geekosaur joined #perl6
06:48 allbery_b joined #perl6
06:52 allbery_b joined #perl6
07:08 eviltwin_b joined #perl6
07:09 brrt joined #perl6
07:11 fhelmberger joined #perl6
07:19 scott_ joined #perl6
07:21 fglock joined #perl6
07:42 kresike joined #perl6
07:46 mucker joined #perl6
07:47 jnthn oh shark
07:51 tadzik oh shark!
07:52 moritz shouldn't there be a new HPMoR chapter today?
07:52 * moritz looks
07:52 moritz "The next progress update will appear in the Author's Notes on June 1st at 10PM Pacific Time."
07:52 moritz :(
07:54 sorear o/ jnthn
07:54 sorear I actually thought 'oh hai' was a backformation from ohayo
07:55 jnthn hi sorear
08:07 fglock hi all
08:08 arnsholt 'lo
08:09 allbery_b joined #perl6
08:16 geekosaur joined #perl6
08:34 eviltwin_b joined #perl6
08:41 ab5tract joined #perl6
08:43 bbkr joined #perl6
08:45 frettled "oh hai" has jumped the shark
08:55 geekosaur joined #perl6
08:59 dakkar joined #perl6
09:06 moritz in sovjet russia, sharks jump on you!
09:07 * brrt still likes lolcats
09:07 sorear sleep&
09:17 moritz n: say $?LINE
09:17 p6eval niecza v17-2-gb8fcf85: OUTPUT«1␤»
09:17 moritz n: my $?LINE
09:17 p6eval niecza v17-2-gb8fcf85: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Variables with the ? twigil cannot be declared using my; they are created using 'constant'. at /tmp/9Y3aBLaSpj line 1 (EOF):â�¤------> [32mmy $?LINE[33mâ��[31m<EOL>[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/nie…
09:17 moritz n: constant $?LINE = 2; say $?LINE
09:17 p6eval niecza v17-2-gb8fcf85: OUTPUT«1␤»
09:17 moritz thought so :-)
09:19 jnthn moritz: You pondering implementing $?LINE in Rakudo? :)
09:20 dakkar joined #perl6
09:27 moritz jnthn: yes
09:28 jnthn moritz: Nice
09:28 moritz jnthn: currently I just consider a special case in make_variable
09:28 jnthn BTW, I also figured out how to do -M
09:28 moritz \o/
09:29 moritz and I have a local patch for nqp that allows -Ilib without the space
09:29 moritz but not a machine that I currently have access to :/
09:29 moritz so needs to wait until tonight
09:29 jnthn moritz: In comp_unit, before calling <statementlist> but after all the other stuff, just look for M in the options list, and if it's there just do exactly what "use" does (which is a couple of calls on $*W).
09:30 moritz jnthn: nice
09:30 moritz sounds doable
09:30 moritz except we ned to be careful not re-load the modules when inside an eval
09:30 moritz and things like that
09:31 jnthn yeah
09:31 jnthn Well, we already can know if we're in an eval ('cus we have to know not to re-load the setting etc.)
09:33 wamba joined #perl6
09:36 oiig_ joined #perl6
09:37 dakkar joined #perl6
09:42 eviltwin_b joined #perl6
09:43 daxim joined #perl6
09:48 oiig_ joined #perl6
09:53 dalek Perlito: b4f4a35 | (Flavio S. Glock)++ | / (40 files):
09:53 dalek Perlito: Perlito5 - perl5: "use" is compile-time (the emitted code contains all modules used)
09:53 dalek Perlito: review: https://github.com/fglock/Perlito/commit/b4f4a35270
09:53 geekosaur joined #perl6
09:56 dalek rakudo/nom: 7836d2f | moritz++ | / (3 files):
09:56 dalek rakudo/nom: implement $?LINE and $?FILE
09:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7836d2f277
09:58 jnthn \o/
09:59 timotimo is the fedora packaging for rakudo star still maintained? the fedora wiki page says the targeted release is fedora 12, that's a bit old, isn't it?
09:59 moritz that was surprisingly simple, and worked on the frist try.
09:59 moritz ... and of course I screwed up the exception throwing :/
10:07 timotimo apparently the rakudo star i can get in fedora 17 is 0.0.2011.07_3.6.0-4, that's not very current :(
10:07 moritz that's before nom time
10:08 moritz n: say $?FILE
10:08 p6eval niecza v17-2-gb8fcf85: OUTPUT«/tmp/ZVUAGLudlX␤»
10:09 am0c joined #perl6
10:11 eviltwin_b joined #perl6
10:11 dalek rakudo/nom: 97f9756 | moritz++ | src/Perl6/Actions.pm:
10:11 dalek rakudo/nom: fix exception throwing from previous commit
10:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/97f9756d18
10:12 timotimo nom time is good time.
10:19 immortal joined #perl6
10:19 immortal joined #perl6
10:24 am0c joined #perl6
10:37 JimmyZ joined #perl6
10:48 geekosaur joined #perl6
10:50 sisar r: my @a; @a[1] = 42; say @a;
10:50 p6eval rakudo 7836d2: OUTPUT«use of uninitialized value of type Any in string context  in method Str at src/gen/CORE.setting:670␤␤ 42␤»
10:51 sisar moritz: this ^ does not report the line no. Is this bug already filed ?
10:56 sisar moritz: RT #67808 was a similar bug.
11:00 noam joined #perl6
11:05 icwiener joined #perl6
11:09 dakkar joined #perl6
11:15 spider-mario joined #perl6
11:22 geekosaur joined #perl6
11:24 moritz sisar: I'ma aware of it. Not sure if it's in RT
11:27 MContagious can I get location for code fix done to support -I for perl6
11:29 moritz MContagious: https://github.com/rakudo/rakudo/commit/4c241c86e2eec4db70a589f3addca7ea3f84a558
11:30 tadzik MContagious: are you thinking about implementing -M?
11:30 moritz I'm already locally testing a patch for -M
11:31 tadzik great, moritz++
11:31 moritz not working yet :(
11:32 tadzik yay, a failing test! :)
11:41 moritz $ ./perl6 -I lib -M Test -e 'use Test; ok 1; done'     ok 1 -
11:41 moritz 1..1
11:43 moritz erm, I shouldn't 'use Test' inside
11:44 tadzik cool
11:44 moritz if I leave out the inner 'use Test', it doesn't work :/
11:48 JimmyZ r: use Test; use Test;
11:48 p6eval rakudo 97f975: OUTPUT«===SORRY!===␤Cannot import symbol '&plan', since it already exists in the lexpad␤»
11:48 eviltwin_b joined #perl6
11:49 JimmyZ LTA?
11:49 moritz I find it quite awesome
11:49 JimmyZ n: use Test; use Test;
11:49 p6eval niecza v17-2-gb8fcf85: OUTPUT«Unhandled exception: Illegal redeclaration of symbol 'Test' (see line 0)␤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1364 (die @ 3) ␤  at /home/p6eval/niecza/src/NieczaBackendDotnet.pm6 line 173 (ANON @ 8) ␤  at /home/p6eval/niecza/src/NieczaBackend…
11:50 allbery_b joined #perl6
11:52 * JimmyZ doesn't think so, it's not easy to debug...
11:53 moritz well, it could report the name of the module it's currently loading
11:54 JimmyZ aye
11:56 moritz JimmyZ: shouldn't be too hard to fix
11:57 JimmyZ moritz: +1 to fix :P
11:57 moritz JimmyZ: want to do it?
11:57 kresike joined #perl6
12:00 moritz ok, I have a basic test for -M working
12:01 * JimmyZ doesn't know how to fix it
12:01 moritz JimmyZ: I can tell you
12:01 moritz at least I think I can :-)
12:02 JimmyZ I can give it a try, but I'm not sure
12:02 moritz JimmyZ: ok. The first step is to locate the error message
12:02 moritz ack 'Cannot import symbol' src/
12:03 moritz => src/Perl6/World.pm line 228
12:04 moritz now you just have get a handle on the module name
12:04 moritz luckily there's $package in scope
12:04 moritz so you can get at its name with $package.HOW.name($package)
12:04 moritz include that in the error message, be happy
12:05 localhost joined #perl6
12:05 tadzik Good Guide Moritz :)
12:05 moritz :-)
12:05 * moritz always happy to lure^W help new committers
12:05 JimmyZ oh', that's why I can't locate it, my rakudo is too old
12:09 arnsholt moritz: *prod?*
12:10 moritz arnsholt: reprod
12:14 arnsholt Hehe. Did you ever get a chance to check out my new dyncall branch yesterday?
12:14 arnsholt It should either fix your sqlite stuff or give me more bug reports =)
12:16 skids joined #perl6
12:17 moritz arnsholt: no. Will try to it tonight or tomorrow
12:17 moritz *try to do it
12:19 geekosaur joined #perl6
12:20 icwiener joined #perl6
12:25 arnsholt Excellent. I think it should work, but I'm still a bit wary of my NQP/6model skills, so testing would be awesome
12:29 fgomez joined #perl6
12:30 dalek nqp: 42329b4 | moritz++ | src/HLL/CommandLine.pm:
12:30 dalek nqp: remove some debugging output
12:30 dalek nqp: review: https://github.com/perl6/nqp/commit/42329b433c
12:30 dalek nqp: 88f00e1 | moritz++ | / (2 files):
12:30 dalek nqp: fix and test multiple uses of same command line option
12:30 dalek nqp: review: https://github.com/perl6/nqp/commit/88f00e1569
12:32 ponbiki joined #perl6
12:33 uvtc joined #perl6
12:36 uvtc Hi #perl6. Should the following get me 'a' .. 'z'? `.say for 'a' .. *;`
12:36 uvtc On my machine, it just prints "a" and waits.
12:37 moritz it's probably some problem with eagerness
12:37 moritz r: .say for 'a' .. *
12:37 p6eval rakudo 97f975: OUTPUT«(timeout)a␤»
12:38 uvtc r: .say for eager('a' .. *);
12:38 p6eval rakudo 97f975: OUTPUT«(timeout)a␤»
12:38 [Coke] r: .say for 'a'..'z'
12:38 p6eval rakudo 97f975: OUTPUT«a␤b␤c␤d␤e␤f␤g␤h␤i␤j␤k␤l␤m␤n␤o␤p␤q␤r␤s␤t␤u␤v␤w␤x␤y␤z␤»
12:39 uvtc [Coke], right.
12:41 dalek rakudo/nom: 93a44d7 | moritz++ | / (4 files):
12:41 dalek rakudo/nom: Implement -M option
12:41 dalek rakudo/nom:
12:41 dalek rakudo/nom: Currently only works for proper modules, not pragmas like fatal or
12:41 dalek rakudo/nom: MONKEY_TYPING.
12:41 dalek rakudo/nom:
12:41 dalek rakudo/nom: Also bumps NQP revision to get command line parser fixes
12:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/93a44d7422
12:43 MContagious moritz and tadzik:Yeah I am thinking to implement -M, You can provide me if you have already implemented
12:43 sisar moritz: i've reported the missing line no. bug: RT #112724
12:44 moritz MContagious: the patch that I just pushed did it already
12:47 MContagious can you share me that patch ?
12:47 moritz MContagious: dalek reported a review URL
12:47 moritz MContagious: simply follow it
12:48 MContagious thanks
12:56 uvtc Trying to figure out how the "..." operator works...
12:56 uvtc r: for (1, 3 ... *) -> $i { if $i > 10 { last } else { $i.say } }
12:56 p6eval rakudo 97f975: OUTPUT«1␤3␤5␤7␤9␤»
12:56 eviltwin_b joined #perl6
12:56 uvtc How does perl6 know?
12:56 PerlJam uvtc: how does it know what?
12:56 colomon how does perl6 know what?
12:56 PerlJam uvtc: are you asking how ti figures out the sequence?
12:56 flussence_ that $^b - $^a = 2?
12:56 uvtc How does it know how many to skip between values?
12:57 uvtc PerlJam, Yes. How does it figure out the sequence?
12:57 colomon if there are two values, it subtracts the first from the second and uses that as an increment
12:57 colomon that's easy.
12:57 flussence joined #perl6
12:57 uvtc colomon, Oh, Ok. Thanks.
12:57 moritz uvtc: S03 has some details
12:58 uvtc colomon, How do I tell it: "run this single-arg fn on the prev value to get the next one"?
12:58 moritz search for 'sequence operator'
12:58 PacoAir joined #perl6
12:58 moritz $first, &routine ... *;
12:58 colomon what moritz++ said
12:58 uvtc moritz, what do I use as the prev value in the routine? $_?
12:58 uvtc $a?
12:58 colomon r: for (1, *+2 ... *) -> $i { if $i > 10 { last } else { $i.say } }
12:58 p6eval rakudo 97f975: OUTPUT«1␤3␤5␤7␤9␤»
12:59 moritz uvtc: it is passed as an argument to that function
12:59 colomon r: for (1, *+.2 ... *) -> $i { if $i > 10 { last } else { $i.say } }
12:59 p6eval rakudo 97f975: OUTPUT«1␤1.2␤1.4␤1.6␤1.8␤2␤2.2␤2.4␤2.6␤2.8␤3␤3.2␤3.4␤3.6␤3.8␤4␤4.2␤4.4␤4.6␤4.8␤5␤5.2␤5.4␤5.6␤5.8␤6␤6.2␤6.4␤6.6␤6.8␤7␤7.2␤7.4␤7.6␤7.8␤8␤8.2␤8.4␤8.6␤8.8␤9␤9.2␤9.4␤9.6␤9.8␤10␤»
12:59 PerlJam uvtc: S03:1806 or there abouts.  Start reading  :)
12:59 moritz r: sub foo($x) { 2 * $x + 1 }; say (1, &foo ... *)[^5]
12:59 p6eval rakudo 97f975: OUTPUT«1 3 7 15 31␤»
12:59 uvtc r: for (1, {$_ + 2} ... *) -> $i { if $i > 10 {last} else {$i.say}}
12:59 p6eval rakudo 97f975: OUTPUT«1␤3␤5␤7␤9␤»
13:00 colomon r: for (1, -> $x { $x + 2 } ... *) -> $i { if $i > 10 { last } else { $i.say } }
13:00 p6eval rakudo 97f975: OUTPUT«1␤3␤5␤7␤9␤»
13:00 uvtc eeek!
13:00 colomon lots of different ways to specify that.
13:00 uvtc colomon, thanks, I'm seeking the "baby Perl 6 way" at the moment. :)
13:00 dalek tablets: 86215ce | (Herbert Breunung)++ | docs/appendix-g-glossary.txt:
13:00 dalek tablets: explain file handle and add some more terms to explain later
13:00 dalek tablets: review: https://github.com/perl6/tablets/commit/86215ce6d9
13:00 colomon uvtc: I'm not sure anyone knows what that is yet.  :)
13:01 moritz baby Perl 6 is   loop (my $i = i; $i < 21; $i += 2) { ... }
13:01 colomon ick
13:01 uvtc moritz, hm. Well, maybe a little more perlish than that.
13:01 moritz 1, 3 ... *
13:01 moritz erm
13:02 moritz 1, 3 ... 21
13:02 moritz or
13:02 moritz (1, 3 ... *)[^10] # first ten values
13:02 moritz or if you want to be explicit
13:02 PerlJam for 0..10 { my $i = $_ * 2 + 1; ... }  # adolescent perl 6 ?
13:02 moritz (1, * + 2, ... *)[^10]
13:02 uvtc .oO( Dad, can I borrow the hash keys? )
13:03 moritz :-)
13:03 uvtc (And that's on only a half a cup of tea. Wait 'til I get going!)
13:03 * moritz waits
13:04 moritz btw one idiom I really love for cycling through values is
13:04 moritz r: for ^10 { say <red green blue>[$_ % *] }
13:04 p6eval rakudo 97f975: OUTPUT«red␤green␤blue␤red␤green␤blue␤red␤green␤blue␤red␤»
13:09 jnthn oooh :)
13:09 jnthn That's cute.
13:10 mikec__ what does the * do?
13:10 moritz discovered while writing SVG::Plot, some years ago :-)
13:10 moritz mikec__: it creates a closure, with a formal parameter instead of the *
13:10 colomon r: for (<red green blue> X *)[^10] { .say }
13:10 p6eval rakudo 97f975: OUTPUT«red␤*␤green␤*␤blue␤*␤»
13:10 flussence r: say <red green blue>[^10 X% 3]
13:10 p6eval rakudo 97f975: OUTPUT«red green blue red green blue red green blue red␤»
13:10 PerlJam It is timtowtdi day today?  :)
13:11 colomon flussence++
13:11 moritz mikec__: so it's the same { 3 % $_ }
13:11 moritz flussence: yours repeats the number of elements
13:11 colomon moritz: you mean 3 % $_, no?
13:11 moritz r: say <red green blue>[^10 X% *]
13:11 p6eval rakudo 97f975: OUTPUT«Cannot call 'Real'; none of these signatures match:␤:(Mu:U \$v, Mu *%_)␤␤  in method Real at src/gen/CORE.setting:656␤  in sub infix:<%> at src/gen/CORE.setting:2350␤  in block <anon> at src/gen/CORE.setting:10585␤  in sub coro at src/gen/CORE.setting:4926␤  in met…
13:11 colomon moritz: dang it, $_ % 3
13:11 moritz colomon: yes
13:12 uvtc r: say (1, 3 ... 10);
13:12 uvtc hm.
13:12 p6eval rakudo 97f975: OUTPUT«(timeout)»
13:12 moritz r: say (1, 3 ... * > 10 )
13:12 p6eval rakudo 97f975: OUTPUT«1 3 5 7 9 11␤»
13:12 moritz r: say (1, 3 ...^ * > 10 )
13:12 p6eval rakudo 97f975: OUTPUT«1 3 5 7 9␤»
13:13 flussence r: given <red green blue> { $_[^10 X% +$_] }
13:13 p6eval rakudo 97f975:  ( no output )
13:13 flussence r: given <red green blue> { say $_[^10 X% +$_] }
13:13 p6eval rakudo 97f975: OUTPUT«red green blue red green blue red green blue red␤»
13:13 uvtc Ah, ok, thanks, moritz.
13:14 flussence r: say $_[^10 X% +$_] given <red green blue>
13:14 p6eval rakudo 93a44d: OUTPUT«red green blue red green blue red green blue red␤»
13:15 uvtc moritz, ack. Wait. 1, 3 ... * > 10? Greater than? I want all the nums where whatever is less than 10, no?
13:15 moritz uvtc: the RHS of the ... is the stop condition
13:15 uvtc r: my @odds = 1, 3 ... * < 10; say @odds
13:15 p6eval rakudo 93a44d: OUTPUT«1␤»
13:15 moritz uvtc: not the "what I want" condition
13:15 uvtc moritz, Ohhhhhhh.
13:16 uvtc moritz, thanks.
13:16 moritz uvtc: do read the specs when we point you to them :-)
13:18 uvtc moritz, right.
13:18 dima joined #perl6
13:19 allbery_b joined #perl6
13:21 geekosaur joined #perl6
13:29 uvtc If you could take a moment, please let me know if you see any glaring omissions, blatant falsehoods, or run-of-the-mill nonsense in this section of the mostly harmless docs: http://wiki.perl6.org/Mostly%20Harmless%20Docs/Operators . Thanks.
13:30 eviltwin_b joined #perl6
13:31 uvtc Again, it's supposed to be brief, easy, and not scary.
13:31 moritz my-obj-with-a-long-name = my-obj-with-a-long-name.method-call   # you can instead do
13:31 moritz my-obj-with-a-long-name .= method-call
13:31 moritz I'd use a $variable there
13:32 moritz "object with a long name" sounds rather vague and badly defined
13:32 moritz unless you mean a type
13:32 moritz in which case you should say type, not object
13:33 obra joined #perl6
13:33 uvtc moritz, thanks. changed that to $variable-with-a-long-name. I wanted it to be obvious that it saves you from typing out that long name twice.
13:38 birdwind1pbird joined #perl6
13:42 dalek rakudo/nom: 0059aa6 | duff++ | src/Perl6/Grammar.pm:
13:42 dalek rakudo/nom: Fix typo in subrule
13:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0059aa6188
13:42 obra left #perl6
13:42 [Coke] r: for (100, * %% 2 ?? * / 2 !! (* * 3) + 1 ... *<=1 ) { .say }
13:42 p6eval rakudo 93a44d: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in block <anon> at /tmp/QNNmEUKzrv:1␤␤»
13:42 ponbiki joined #perl6
13:43 PerlJam why expected 2?
13:44 jnthn r: say ((* * 3) + 1 ... *<=1).WHAT
13:44 p6eval rakudo 93a44d: OUTPUT«List()␤»
13:44 jnthn Hm, I thought it may be taking the lot as one big WhateverCode
13:46 uvtc Is Perl 6's Nil like Perl 5's undef?
13:48 tadzik std: undef
13:48 p6eval std fab64fc: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unsupported use of undef as a value; in Perl 6 please use something more specific:â�¤  Mu (the "most undefined" type object),â�¤ an undefined type object such as Int,â�¤  :!defined as a matcher,â�¤        Any:U as a type constraint,â�¤    Nil as the absense
13:48 p6eval ..…
13:48 tadzik many things are the Perl 5's undef :)
13:49 PerlJam uvtc: Nil is the absence of a value.
13:49 uvtc Thanks.
13:50 uvtc r: my $x = Nil; say $x
13:50 p6eval rakudo 93a44d: OUTPUT«Nil␤»
13:50 uvtc r: ?Nil
13:50 p6eval rakudo 93a44d:  ( no output )
13:50 uvtc r: (?Nil).say
13:50 p6eval rakudo 93a44d: OUTPUT«False␤»
13:51 PerlJam r: my @a = (Nil, Nil, Nil);  say +@a;
13:51 p6eval rakudo 93a44d: OUTPUT«0␤»
13:52 PerlJam If you fill an empty bucket with Nil, the bucket remains empty  :)
13:52 uvtc Tried to boil it down here: http://wiki.perl6.org/Mostly%20Harmless%20Docs/Truth%20and%20Falsehood
13:53 moritz uvtc: maybe worth mentening that '' is false too
13:54 icwiener joined #perl6
13:54 uvtc moritz++
13:54 moritz as well as type objects
13:54 uvtc "empty objects"?
13:54 moritz type objects.
13:54 uvtc (ooh, forgot to mention, "everything else is true"
13:54 uvtc )
13:54 moritz like, Int
13:55 uvtc r: ?Int
13:55 p6eval rakudo 93a44d:  ( no output )
13:55 uvtc r: (?Int).say
13:55 p6eval rakudo 93a44d: OUTPUT«False␤»
13:56 uvtc moritz, may have to add a types section. Thanks.
13:58 rindolf joined #perl6
14:01 JimmyZ moritz: I gave up, compile rakudo is slow.... and $package.HOW.name($package) outputs DEFAULT
14:02 jnthn Probably because it's pulling stuff out of EXPORT::DEFAULT...
14:04 JimmyZ well, most time is compiling..
14:04 daemon joined #perl6
14:05 jnthn Yes, beefy hardware is useful when working on Rakudo :)
14:13 dakkar joined #perl6
14:23 allbery_b joined #perl6
14:25 moritz r: package A { }; say A.HOW.name(A)
14:25 p6eval rakudo 0059aa: OUTPUT«A␤»
14:25 PerlJam could Coke's example be that  ?? !! is turning into 2 WhateverCodes instead of just 1 ?
14:25 moritz hm
14:38 dakkar joined #perl6
14:41 cogno joined #perl6
14:42 sporous joined #perl6
14:44 szbalint joined #perl6
14:44 mattp_ joined #perl6
14:47 dakkar joined #perl6
14:48 _-`user0 joined #perl6
14:49 _-`user0 Hi, i want to learn perl6 from beginning, can you tell me where can i learn it ?
14:50 TimToady do you know Perl 5?
14:50 _-`user0 TimToady: no
14:50 PerlJam _-`user0: Have a look at http://perl6.org/documentation   for some learning resources
14:50 lestrrat joined #perl6
14:50 TimToady have you programmed in any language before?
14:51 thou joined #perl6
14:52 noam joined #perl6
14:52 BooK joined #perl6
14:53 uvtc _-`user0, just noticed, the link to the [beginner's book](https://github.com/perl6/book) download is out of date. I'll update that now.
14:53 _-`user0 TimToady: html/css,php,sql,bash, a little C
14:53 _-`user0 uvtc: Thank you :)
14:53 TimToady do you like to learn from examples, of from tutorials?
14:54 TimToady if examples, you might visit http://rosettacode.org/wiki/Category:Perl_6
14:55 _-`user0 okay
14:55 TimToady php is similar enough to perl that http://perlgeek.de/en/article/5-to-6 might be useful
14:56 dalek perl6.org: 736c5de | (John Gabriele)++ | source/documentation/index.html:
14:56 dalek perl6.org: updated the github book download link from 2011.01 to 2011.07
14:56 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/736c5dee8c
14:57 geekosaur joined #perl6
14:57 _sri is there a usable perl6 to perl5 compiler yet?
14:58 uvtc _-`user0, y/w. :) May take a few minutes for that page to automatically update.
14:58 _sri it would be interesting to target rakudo and perl5 with the same code base
14:59 PerlJam _sri: perlito
14:59 _sri PerlJam: but is it actually usable?
14:59 ponbiki joined #perl6
14:59 fglock _sri: both 5-to-6 and 6-to-5 development are mostly stopped
14:59 PerlJam I can't comment on its degree of usability.
15:00 PerlJam fglock: why exactly?
15:00 PerlJam fglock: (would a TPF grant help?)
15:02 _sri compiling 6 to 5 is pretty much the best (only?) chance i see for perl6 to ever really take off inside the perl5 community
15:02 cogno joined #perl6
15:02 JimmyZ moose ?
15:03 * moritz thinks that embedding is a better way
15:03 moritz people don't like generated code
15:03 _sri embedding still means wasted resources
15:03 fglock _sri: most development at the moment is focusing on either linking perl6 and perl5 in the same binary, or porting both perl6 and perl5 to a common platform
15:04 _sri embedding helps with the 5 to 6 porting process, but won't make anyone want to develop new code targeting 6
15:04 moritz _sri: compilation also means wasted resources
15:04 * TimToady agrees with moritz, because the semantic models are different enough that cross-compiling results in running an interpreter in an interpreter, which will be very slow
15:05 TimToady the other approach is to hack more P6 primitives into the P5 core
15:05 TimToady like pervasive laziness
15:05 _sri i'm very interested in porting mojolicious to perl6, but i just don't see myself sacrificing resources for it that could be spent making the perl5 version better
15:05 TimToady and a type system
15:05 moritz perverse laziness :-)
15:05 fglock one of the big problems is that perl5 is just not the same without XS
15:05 moritz TimToady: well, adding a type system would be a pretty big departure from current p5
15:06 moritz somehow I don't see that happening any time soon
15:06 TimToady XS is more or less a poor-man's type system...
15:06 TimToady the reason we can do something else in P6 is precisly because we have a type/trait system
15:07 _sri moritz: wasted cpu time yes, but developer time is much more valuable
15:07 TimToady and the whole approach to scalar types is subverted; P5 doesn't really want to know the type of a scalar, and P6 really does
15:08 arnsholt As jnthn++ explained to me, the combination of representation polymorphism and a type system is pretty much what makes zavolaj go
15:08 arnsholt Speaking of XS
15:08 TimToady I kinda keep the rep poly under the "type system" category in my mind
15:08 TimToady it's just low-level rather than high-level
15:09 arnsholt True dat
15:10 moritz arnsholt: fwiw I'd appreciate it if you declared the string argument to explicitly-manage as 'is rw'
15:10 TimToady I think it's much more likely that the real migration path will be to emulate Perl 5 in Perl 6, once our theoretical optimizations and native backends happen
15:10 moritz it's not enforced, but you do modify the argument
15:11 fglock joined #perl6
15:11 moritz _sri: fwiw I considered starting to port the util classes of Mojo (those that don't depend on the runloop) to p6; we should have enough features in rakudo to make that mostly a pleasant experience
15:12 TimToady writing an XS-to-zavolaj translator is probably halting-problem territory though
15:12 moritz like, Mojo::{JSON,DOM,Cookie}
15:12 _sri moritz: i believe almost everything can be ported now
15:12 sjn moritz: I'd love that :)
15:12 phenny sjn: 01 May 18:18Z <uvtc> tell sjn I'm a fan of markdown too. I haven't read S26 too carefully, but it would be nice if I could just do =begin markdown ... =end markdown and write all my docs in markdown.
15:13 fglock (backlogging, I've lost connection for a while)
15:13 moritz _sri: should I do it in the Mojo namespace, or would you rather have me do it with a different name first?
15:13 arnsholt TimToady: We did talk about a header-to-zavolaj utility during the hackathon in Oslo, but I'm not gonna touch XS if at all possible I think
15:13 [Coke] jnthn: (one big whatevercode) is there a way to avoid that?
15:13 [Coke] is it a bug?
15:13 TimToady also, I suspect that most P5 module programmers will choose to learn P6 by porting their modules
15:14 PerlJam Perl 5 is migrating a MOP inward, maybe they can do the same with one of the type systems on CPAN
15:14 TimToady because that's where the motivation is, if there is any
15:14 dalek zavolaj/cstr: a4f37b4 | (Arne Skjærholt)++ | lib/NativeCall.pm6:
15:14 dalek zavolaj/cstr: Make Str parameter of explicitly-manage rw. moritz++
15:14 dalek zavolaj/cstr: review: https://github.com/jnthn/zavolaj/commit/a4f37b4516
15:14 _sri moritz: since there's no CP6AN yet, does it matter?
15:14 * PerlJam doubts that Perl 5 will *ever* get pervasive laziness though
15:15 moritz _sri: there's modules.perl6.org
15:15 TimToady it's just not comprehensive yet
15:15 moritz and it's not an archive either
15:15 moritz more like a tracker
15:16 * _sri shrugs
15:16 [Coke] ah.
15:16 [Coke] r: for (100, {$^a %% 2 ?? $^a / 2 !! ($^a * 3)} + 1 ... *<=1 ) { .say }
15:16 p6eval rakudo 0059aa: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \$v, Mu *%_)␤␤  in method Numeric at src/gen/CORE.setting:648␤  in sub infix:<+> at src/gen/CORE.setting:2329␤  in block <anon> at /tmp/vXGkIbGvCe:1␤␤»
15:17 jnthn [Coke]: Well, I tried to see if it was doing what I thought it may be, and that wasn't the issue...
15:17 [Coke] r: for (100, {$^a %% 2 ?? $^a / 2 !! ($^a * 3) + 1} ... *<=1 ) { .say }
15:17 p6eval rakudo 0059aa: OUTPUT«100␤50␤25␤76␤38␤19␤58␤29␤88␤44␤22␤11␤34␤17␤52␤26␤13␤40␤20␤10␤5␤16␤8␤4␤2␤1␤»
15:17 TimToady why are you adding 1 to a closure?
15:17 [Coke] r: for (1000, {$^a %% 2 ?? $^a / 2 !! ($^a * 3) + 1} ... *<=1 ) { .say }
15:17 p6eval rakudo 0059aa: OUTPUT«1000␤500␤250␤125␤376␤188␤94␤47␤142␤71␤214␤107␤322␤161␤484␤242␤121␤364␤182␤91␤274␤137␤412␤206␤103␤310␤155␤466␤233␤700␤350␤175␤526␤263␤790␤395␤1186␤593␤1780␤890␤445␤1336␤668␤334␤167␤502␤251␤754␤377␤1132␤566␤283␤850␤425␤1276␤638␤319␤958␤479␤1438␤719␤2158␤1079␤3238␤161…
15:17 * jnthn decommutes, bbl
15:17 [Coke] TimToady: misplaced }
15:18 * [Coke] "played" that on his first electronic calculator for hours. ah, my misspent youth.
15:18 PerlJam [Coke]: I think your original was more like :  for (100, { {$^a %% 2 ?? $^b / 2 !! ($^c * 3) +1 } ... *<=1) { .say }
15:18 TimToady and why are you being superstitious about *<=1 ?
15:18 [Coke] PerlJam: mayhap, aye.
15:19 TimToady I'm trying to remember what that's called on RC
15:19 benabik joined #perl6
15:19 [Coke] TimToady: if the sequence doesn't happen to hit one, it'll never stop.
15:19 [Coke] that sequence always does though, I think.
15:20 TimToady http://rosettacode.org/wiki/Hailstone_sequence
15:20 [Coke] r: for (500, {$^a %% 2 ?? $^a / 2 !! ($^a * 3) + 1} ... 1 ) { .say a}
15:20 thou joined #perl6
15:20 p6eval rakudo 0059aa: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2␤»
15:20 [Coke] r: for (500, {$^a %% 2 ?? $^a / 2 !! ($^a * 3) + 1} ... 1 ) { .say }
15:20 p6eval rakudo 0059aa: OUTPUT«500␤250␤125␤376␤188␤94␤47␤142␤71␤214␤107␤322␤161␤484␤242␤121␤364␤182␤91␤274␤137␤412␤206␤103␤310␤155␤466␤233␤700␤350␤175␤526␤263␤790␤395␤1186␤593␤1780␤890␤445␤1336␤668␤334␤167␤502␤251␤754␤377␤1132␤566␤283␤850␤425␤1276␤638␤319␤958␤479␤1438␤719␤2158␤1079␤3238␤1619␤485…
15:20 TimToady r: sub hailstone($n) { $n, { $_ %% 2 ?? $_ div 2 !! $_ * 3 + 1 } ... 1 }; say hailstone(27)
15:20 p6eval rakudo 0059aa: OUTPUT«27 82 41 124 62 31 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858…
15:21 TimToady that's the one on RC
15:21 fglock perlito6 works fine if you use the subset of Perl6 that has semantics like perl5 (or whatever backend it compiles to); once you get into things not supported by the backend, performance suffers and the code gets much bigger and complex
15:21 fglock everything is possible, but some things are not practical
15:22 TimToady fglock: what you say is true of the other implementations too :)
15:22 fglock yes
15:25 fglock perlito5 works fine in node.js, because the semantics are more or less ok, and there is some spare speed to emulate the mismatches (but still no XS)
15:25 ponbiki joined #perl6
15:26 [Coke] TimToady: why "div" instead of "/" ?
15:27 TimToady to keep it in integers rather than rats
15:27 awwaiid hmm... idea! Dependency graph of Perl6 features as a guide to better understand the path of subset implementations
15:28 TimToady I dunno, one person's light post is another person's fog...
15:28 moritz awwaiid: the dependency graph greatly depends on how thorough you do things
15:29 vlixes joined #perl6
15:30 awwaiid well that's the idea though -- you would make two differnt nodes in your graph, one for "simple integer addition" and one for "addition as secretly a method" or something. Then the second one would depend on fancy things and the first wouldn't.
15:30 * awwaiid handwaves details
15:31 noam joined #perl6
15:32 mucker joined #perl6
15:33 * fglock decommutes
15:35 flussence awwaiid: if that ever gets made, it might be a starting point for `make -j`-able core.setting compilation :)
15:37 noam joined #perl6
15:38 apejens joined #perl6
15:38 JimmyZ joined #perl6
15:39 eviltwin_b joined #perl6
15:39 moritz it's certainly doable, but much effort
15:40 moritz or put differently, I can imagine lots of things that provide higher benefit/effort ratios today
15:42 awwaiid probably not very maintainable either
15:43 TimToady Even with "simple integer addition", there are differing kinds of "simple"
15:43 awwaiid true that
15:43 TimToady P6's integer addition is simple *because* it's based on bigints
15:43 dalek ecosystem: a4f859c | tadzik++ | META.list:
15:43 dalek ecosystem: Add Template::Mojo
15:43 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/a4f859c62f
15:43 colomon oooooo
15:43 awwaiid I'm imagining something like a graph of dependencies between test cases
15:44 TimToady it's sorta saying that everyone has to put the circularity saws in the same spot, which P6 doesn't require
15:44 icwiener joined #perl6
15:44 allbery_b joined #perl6
15:45 TimToady the dependencies between test cases can run different directions under different implementations
15:45 awwaiid maybe it could be metadata in the test suite -- if test X test passes then test Y should already have passed
15:45 moritz well, it would have lots of cycles, that graph
15:45 awwaiid sure it would
15:45 awwaiid it would be a delicious mess!
15:46 awwaiid anyway. popped into my head and I thought I'd throw it out there :)
15:46 * moritz throws it back at awwaiid :-)
15:46 mucker joined #perl6
15:46 * awwaiid leaps into the air to catch it in his teeth
15:47 moritz r: :a(1)(2)
15:47 p6eval rakudo 0059aa: OUTPUT«Method 'postcircumfix:<( )>' not found for invocant of class 'Pair'␤  in <anon> at src/gen/BOOTSTRAP.pm:815␤  in any <anon> at src/gen/BOOTSTRAP.pm:811␤  in block <anon> at /tmp/zXiJAaBeOP:1␤␤»
15:47 mucker joined #perl6
15:48 moritz r: :16(3)(4)
15:48 p6eval rakudo 0059aa: OUTPUT«Nominal type check failed for parameter '$str'; expected Str but got Int instead␤  in sub unbase at src/gen/CORE.setting:4144␤  in block <anon> at /tmp/p1PgwPoyPX:1␤␤»
15:48 Psyche^ joined #perl6
15:48 * moritz tries to find out which case PerlJam++ fixed in his last commit
15:49 moritz that colonpair rule has  | (\d+) <identifier>
15:49 moritz ah, that's for 2nd, 3rd
15:50 moritz r: say ( :1st ).perl
15:50 p6eval rakudo 0059aa: OUTPUT«===SORRY!===␤Malformed radix number␤at /tmp/d7UcZXKor6:1␤»
15:50 moritz r: m:1st / . /
15:50 p6eval rakudo 0059aa: OUTPUT«Method 'match' not found for invocant of class 'Any'␤  in block <anon> at /tmp/XvhayZrlFk:1␤␤»
15:50 moritz r: m:1st(3) / . /
15:50 p6eval rakudo 0059aa: OUTPUT«===SORRY!===␤2nd argument not allowed on pair at line 1, near " / . /"␤»
15:50 moritz ah, that's it
15:53 sftp_ joined #perl6
15:53 TimToady std: say ( :1st ).perl
15:53 p6eval std fab64fc: OUTPUT«ok 00:00 41m␤»
15:53 TimToady LTM damage, I guess
15:54 [Coke] ok, that's 10 points of LTM damage. Roll for spot check.
15:54 bbkr rakudo: :2() # LTA message, it should complaint about missing param, not about bad type
15:54 p6eval rakudo 0059aa: OUTPUT«Nominal type check failed for parameter '$str'; expected Str but got Parcel instead␤  in sub unbase at src/gen/CORE.setting:4144␤  in block <anon> at /tmp/OzRQ79NLFt:1␤␤»
15:55 PerlJam moritz: I actually found the typo via ack looking for something else and it took me a few minutes to figure out what case that was for too  :)
15:59 masak lol shark, #perl6
16:00 eviltwin_b joined #perl6
16:00 tadzik lol masak, shark
16:03 TimToady 'same' to you
16:03 geekosaur joined #perl6
16:03 TimToady phenny: ja en "same"?
16:03 phenny TimToady: "same" (ja to en, translate.google.com)
16:04 masak GT doesn't do phonetic Japanese, AFAIK ;0
16:04 masak ;)
16:04 TimToady phenny: ja en "さめ"?
16:04 phenny TimToady: "Shark" (ja to en, translate.google.com)
16:05 allbery_b joined #perl6
16:07 bbkr perl6: say so *
16:07 p6eval rakudo 0059aa: OUTPUT«WhateverCode.new()␤»
16:07 p6eval ..pugs: OUTPUT«1␤»
16:07 p6eval ..niecza v17-2-gb8fcf85: OUTPUT«{ ... }␤»
16:08 bbkr hm
16:08 bbkr "so" should enforce boolean context, right?
16:10 * bbkr reports
16:10 masak notabug.
16:11 tyatpi joined #perl6
16:11 masak phenny: sv en 'same'?
16:11 masak phenny: sv en "same"?
16:11 phenny masak: "Sami" (sv to en, translate.google.com)
16:14 masak phenny: tell lichtkind re https://github.com/perl6/tablets/blob/2c73ee9c1daf2d582711994d91e424d36caef7c2/docs/appendix-g-glossary.txt#L197 -- I believe you meant s/terms and statements/terms and operators/
16:14 phenny masak: I'll pass that on when lichtkind is around.
16:14 daxim reindeers and stuff
16:15 geekosaur joined #perl6
16:16 fglock_ joined #perl6
16:16 uvtc Looks like I can still use curly braces to create a local scope. http://wiki.perl6.org/Mostly%20Harmless%20Docs/Scope But I've read that curlies are for creating code blocks. Is that the same thing here?
16:19 uvtc Hm. That appears to be explained in S04. But that's a rather long read.
16:19 uvtc Will have to get back to this another time I guess.
16:20 uvtc left #perl6
16:24 masak a code block always carries a local lexpad with it, so yes, it defines a scope.
16:25 dakkar joined #perl6
16:26 masak bbkr++ # rejecting his own mistickets ;)
16:28 MContagious joined #perl6
16:29 fglock_ _sri: v6.pm in CPAN allows a module to be used in both p5 and p6; you would be the first user ever, so YMMV
16:33 PerlJam v6.pm allows for a module to be used in p5?  that's ... odd.
16:34 _sri fglock_: is there documentation for which features are supported?
16:35 PerlJam oh.   /me tries it.
16:36 PerlJam fglock_: Have you updated perlito since Oct 2011?
16:36 fglock_ _sri: no, there are the tests only
16:36 _sri fglock_: i see :/
16:36 fglock_ PerlJam: I didn't release new versions to cpan
16:38 fglock_ I mostly stopped development because perlito5 was more interesting, but if you find it useful I could start again
16:39 fglock_ note you can run the same code in the browser, it also passes the tests (except for things that require file i/o)
16:45 geekosaur joined #perl6
16:45 kaleem joined #perl6
16:51 PacoAir joined #perl6
16:51 sisar joined #perl6
16:54 fgomez joined #perl6
16:54 icwiener joined #perl6
17:13 eviltwin_b joined #perl6
17:21 wooden joined #perl6
17:21 wooden joined #perl6
17:22 allbery_b joined #perl6
17:32 masak today's autopun: http://twitter.com/sixthformpoet/status/197710460416565248
17:37 erkan joined #perl6
17:37 erkan joined #perl6
17:43 ponbiki joined #perl6
17:46 sisar joined #perl6
17:48 sisar phenny, tell lichtkind, the navigation links at the top of Appendix A are broken, especially the symbols row. I tried to fix it, but my markdown knowledge is limited.
17:48 phenny sisar: I'll pass that on when lichtkind is around.
17:50 allbery_b joined #perl6
17:50 Chillance joined #perl6
17:59 sisar phenny: tell lichtkind, i meant the navigation links just above the heading "Punctuation"
17:59 phenny sisar: I'll pass that on when lichtkind is around.
18:00 NamelessTee joined #perl6
18:02 am0c joined #perl6
18:05 mucker joined #perl6
18:23 PacoAir joined #perl6
18:27 eviltwin_b joined #perl6
18:30 PacoAir joined #perl6
18:41 birdwindupbird joined #perl6
18:48 allbery_b joined #perl6
18:50 bsb joined #perl6
18:51 alester joined #perl6
18:52 tyatpi joined #perl6
18:57 _sri which perl6 module is the best example for what a good perl6 distribution should look like?
18:57 eviltwin_b joined #perl6
18:59 wolfman2000 joined #perl6
19:00 masak _sri: that's hard to answer. we don't have a CPAN, so we tend to think in modules, not "distributions".
19:00 masak that said, there are certain guidelines that tadzik++/panda likes if you follow.
19:01 _sri well, which module is the best example then? :)
19:01 _sri especially regarding tests and documentation
19:01 constantined joined #perl6
19:02 masak good question. I don't know.
19:02 masak I wish I had more time to study other people's modules. :/
19:03 allbery_b joined #perl6
19:03 _sri i've found a lot of proof-of-concept type code on github, but so far nothing that looked finished
19:05 masak well, there's a page from yesterday's backlog which will tell you which modules build correctly and pass all their tests.
19:05 masak maybe that'll help.
19:06 jnthn https://github.com/jnthn/zavolaj is an OK example. Modules and tests in the right place, docs that cover all but the stuff currently being added, a META.info.
19:07 * _sri looks
19:08 jnthn Arguably it should pod document stuff.
19:08 jnthn There's not really been a cultural push for ubiquitous Pod though...
19:08 _sri oh, say() to emit TAP :S
19:09 jnthn Oh, don't follow that example.
19:09 jnthn There's a good reason.
19:09 jnthn Those tests also call C code
19:09 jnthn Which also emits ok's.
19:09 jnthn Most if not all modules use Test.pm.
19:09 _sri i see
19:10 colomon jnthn: not all, Damian's use his Testing module instead.
19:10 masak using say() to emit TAP is definitely not common practice in the Perl 6 community :)
19:11 masak colomon: is that online?
19:11 colomon yes, and in the ecosystem.
19:11 colomon (though I believe it only works with Rakudo at the moment.)
19:11 _sri one thing i always loved about perl5 was the documentation culture
19:11 jnthn masak: Writing and testing native call interfaces is a fairly minority exercise too :)
19:12 masak nod.
19:16 noam joined #perl6
19:16 jnthn I suspect once modules.perl6.org starts rendering Pod docs in modules, there'll be more uptake.
19:16 noam joined #perl6
19:17 jnthn At least, I'll find it a motivator to do it :)
19:18 masak ooh
19:18 _sri Test does look rather pleasant to use
19:18 masak it's not bad.
19:20 _sri it does not look like a good example itself though
19:20 kaare_ joined #perl6
19:20 masak of what? good test coverage?
19:21 _sri style
19:21 masak keep in mind that Test.pm looks the way it does for many reasons having to do with Rakudo's coming of age.
19:21 _sri https://github.com/rakudo/rakudo/blob/nom/lib/Test.pm#L226 # is that a magical comment?
19:22 masak surely not.
19:22 bluescreen10 joined #perl6
19:22 * _sri has not found documentation on POD and comments in perl6 yet
19:23 masak http://perlcabal.org/syn/S26.html
19:24 _sri thanks
19:24 TimToady http://perlcabal.org/syn/S02.html#Multiline_Comments
19:30 * masak doesn't understand why he hasn't heard of the http://en.wikipedia.org/wiki/Ulam_spiral until now
19:32 [Coke] Did you major in math?
19:34 TimToady you did hear of it, but suppressed the memory :)
19:34 havenn joined #perl6
19:35 masak [Coke]: haven't majored in anything, but math has always held a special place in my heart.
19:36 moritz \o
19:41 moritz arnsholt: fwiw t/07-writebarrier.t fails here with "Cannot locate native library '07-writebarrier.so'"
19:42 [Coke]
19:43 NamelessTee joined #perl6
19:43 moritz arnsholt: ah, needs   is native('./07-writebarrier')
19:44 moritz I can fix that later
19:44 arnsholt moritz: Derp. Must've forgotten to run the test suite before committing
19:44 moritz arnsholt: are you on macos?
19:44 arnsholt Yeah
19:45 moritz arnsholt: that explains it
19:45 geekosaur joined #perl6
19:45 arnsholt Oh?
19:45 moritz arnsholt: that fix is only needed on linux
19:45 moritz arnsholt: different defaults in library paths
19:45 noam joined #perl6
19:46 arnsholt Oh. The ./ in front?
19:46 moritz yes
19:46 arnsholt Right. I'll try to remember that next time. In that case I might've broken a couple of other test file as well, I think
19:46 moritz all other tests pass
19:49 arnsholt Good, good
19:50 moritz arnsholt: \o/ all but on test pass
19:50 moritz and that one is my own fault, I assume
19:53 noam joined #perl6
19:53 moritz (the failing test is  ok $dbh.finish, it fails with SQLITE_BUSY)
19:54 arnsholt Excellent!
19:55 moritz I just wonder how much memory I leak
19:58 arnsholt Let's not think too hard about that ;)
19:59 arnsholt But IIRC, all the structures you create in Perl 6 should be properly freed when the wrapper object is GCed
19:59 arnsholt Stuff returned from C isn't freed though, I think
19:59 moritz I just wonder if my stuff gets GCed :-)
20:00 rindolf joined #perl6
20:00 arnsholt Oh, right. I think Parrot's GC is better than Perl 5's refcounting, so it's pretty hard to leak that way I think
20:01 arnsholt Dunno if you keep references to everything in a cache somewhere or so, though =)
20:01 moritz I leak statement handles :/
20:02 moritz on the C side, that is
20:02 arnsholt Oh?
20:02 moritz well, I need to call $sth.finish each time one is GC'Ed
20:02 moritz but we don't have DESTROY submethods yet
20:03 arnsholt I see
20:03 tadzik istr DESTROYs were quite an easy patch, in fact. It's just that they were very hard to get per spec
20:03 tadzik ordering of them, etc
20:03 moritz well, a partial DESTROY would quite well for me
20:04 tadzik I'll grep the ir clogs for hints once I get some nom
20:07 * masak .oO( let's just hope people haven't said DESTROY DESTROY DESTROY too much in the ir clogs )
20:10 moritz or maybe DESTROYALL
20:12 dalek DBIish: a5f4ae0 | moritz++ | t/10-mysql.t:
20:12 dalek DBIish: fix mysql tests
20:12 dalek DBIish: review: https://github.com/perl6/DBIish/commit/a5f4ae0d90
20:12 dalek DBIish: 9b33943 | moritz++ | lib/DBDish/SQLite.pm6:
20:12 dalek DBIish: [SQlite] use explicit memory management for strings. arnsholt++
20:12 dalek DBIish: review: https://github.com/perl6/DBIish/commit/9b33943240
20:13 tadzik moritz: pointer: http://irclog.perlgeek.de/perl6/2011-12-30#i_4899708
20:14 tadzik I seem to recall making it work somehow, at least I remember it was virtually impossible to test
20:14 mspaulding joined #perl6
20:15 eviltwin_b joined #perl6
20:15 arnsholt Yeah, that's one of those really hard to test things, isn't it. Maybe the Parrot folks have some ideas on how to test it
20:16 moritz tadzik: well, the proper thing to do is to call a method DESTROYALL, which walks all classes and then calls DESTROY on each it if exists
20:16 tadzik yeah
20:16 moritz tadzik: but, that will make *all* object destructions slower
20:16 moritz and we destory a lot of objects
20:17 moritz so I think a better option is to set a flag in the class if there is at least one DESTROY method
20:17 moritz and only then call DESTROYALL
20:18 moritz so that needs some more C hacking
20:18 jnthn It ain't gonna work without more changes than that to Parrot's GC.
20:19 jnthn Imagine we have two objects A and B, where A -ref-> B.
20:19 jnthn There's no promise that A's DESTROYALL will be called before B's.
20:20 jnthn Which isn't in itself an issue apart from there's no "call a finalizer" vs "free memory" distinction right now either.
20:21 jnthn So any solution that says "oh, we just hook the destory v-table method" means you're going to start writing code that can potentially reach into freed memory.
20:23 masak doesn't the Perl 5 runtime have the same set of issues?
20:28 jnthn I'm not saying it's an intractable problem, just that Parrot afaict doesn't tract it at the moment.
20:34 moritz masak: not as much
20:35 geekosaur joined #perl6
20:38 moritz masak: since structures are refcounted, you only free them if they have no more backreferences
20:39 masak moritz: unless it's time to shut down the program, at which point all the things, including things with cycles, get out of the pool.
20:44 moritz ah, the mythical Global Destruction
20:45 moritz eval: use 5.010; sub DESTROY { say "destroying" }; my $x = bless []; push @$x, $x; $x = undef; say "not yet"
20:45 buubot_backup moritz: not yet 1destroying
20:45 PerlJam if you free your structures and they come back to you, it must be love^Wrefcounting
20:53 eviltwin_b joined #perl6
21:02 geekosaur joined #perl6
21:05 NamelessTee joined #perl6
21:07 bluescreen100 joined #perl6
21:08 alester joined #perl6
21:10 dalek DBIish: 4a8d025 | moritz++ | lib/DBDish/SQLite.pm6:
21:10 dalek DBIish: [SQLite] collect and finish off statement handles in the connection class
21:10 dalek DBIish: review: https://github.com/perl6/DBIish/commit/4a8d02502f
21:11 jnthn moritz: Do we now have a pretty much working SQLite driver? :)
21:13 moritz jnthn: yes
21:13 jnthn \o/
21:13 jnthn moritz++ arnsholt++
21:13 moritz arnsholt++ did most of the hard work :-)
21:13 rindolf left #perl6
21:14 xinming_ joined #perl6
21:14 eviltwin_b joined #perl6
21:16 jnthn Wow. The code looks nice. :)
21:17 jnthn It's pretty cool that we can write a SQLite driver in pure Perl 6 in ~250 lines :)
21:17 * jnthn is curious why some of the calls get { * } and some of them get { ... } even though it doesn't matter.
21:18 moritz jnthn: it's quite simple: some were written after our discussion at the hackathon :-)
21:19 moritz fwiw, 40 of these lines are pretty generic, and should be factored out in DBDish::ConnectionHandle
21:19 jnthn Even better :)
21:20 moritz and it misses about 10 lines for column_names, which is currently NYI
21:21 dalek DBIish: 2534dea | moritz++ | t/99-common.pl6:
21:21 dalek DBIish: [t] compare more numbers by number.
21:21 dalek DBIish:
21:21 dalek DBIish: Now all tests pass for SQLite
21:21 dalek DBIish: review: https://github.com/perl6/DBIish/commit/2534dea30a
21:26 moritz ok, 11 lines :-)
21:26 moritz but my patch causes or exposes another problem
21:27 sjohnson joined #perl6
21:27 dalek DBIish/sqlite-column_names: ce8eda8 | moritz++ | lib/DBDish/SQLite.pm6:
21:27 dalek DBIish/sqlite-column_names: [SQLite] implement column_names
21:27 dalek DBIish/sqlite-column_names: review: https://github.com/perl6/DBIish/commit/ce8eda8837
21:28 dalek nqp/toqast: aba8043 | jnthn++ | src/QAST/Node.nqp:
21:28 dalek nqp/toqast: Slots for slurpy and named.
21:28 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/aba8043d6a
21:28 dalek nqp/toqast: 9191efb | jnthn++ | src/QAST/Compiler.nqp:
21:28 dalek nqp/toqast: Start to get support for local parameters in place, including natively typed ones.
21:28 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/9191efba26
21:28 dalek nqp/toqast: 85b021d | jnthn++ | t/qast/qast.t:
21:28 dalek nqp/toqast: A couple of tests for local parameters.
21:28 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/85b021d2d5
21:29 allbery_b joined #perl6
21:31 moritz sqlite++ # being stricter than other DBs, thus uncovering some mistakes in the tests
21:32 moritz it's weird, I've always thought of sqlite as being quite lax, because it has only integers and varchars and somehow manages to wiggle through with that
21:32 skids joined #perl6
21:32 moritz but the C API has helped me discover several small inconsistencies in the tests
21:33 eviltwin_b joined #perl6
21:37 dalek DBIish: ce8eda8 | moritz++ | lib/DBDish/SQLite.pm6:
21:37 dalek DBIish: [SQLite] implement column_names
21:37 dalek DBIish: review: https://github.com/perl6/DBIish/commit/ce8eda8837
21:37 dalek DBIish: 46bff63 | moritz++ | t/99-common.pl6:
21:37 dalek DBIish: commit fetchrow_arrayref tests
21:37 dalek DBIish: review: https://github.com/perl6/DBIish/commit/46bff630f2
21:37 dalek DBIish: 4abaacc | moritz++ | t/10-mysql.t:
21:37 dalek DBIish: [mysql] fix last failing tests. All tests pass now \o/
21:37 dalek DBIish: review: https://github.com/perl6/DBIish/commit/4abaaccb89
21:37 moritz and with that, all tests pass.
21:37 moritz time for sleeping here :-)
21:37 jnthn \o/
21:37 jnthn sleep well :)
21:37 moritz thanks
21:37 moritz tomorrow: add DBIish to ecosystem
21:39 geekosaur joined #perl6
21:39 brrt joined #perl6
21:42 havenn joined #perl6
21:42 eviltwin_b joined #perl6
21:47 geekosaur joined #perl6
21:56 eviltwin_b joined #perl6
22:01 allbery_b joined #perl6
22:03 geekosaur joined #perl6
22:03 bluescreen__ joined #perl6
22:05 wolfman2000 joined #perl6
22:06 eviltwin_b joined #perl6
22:08 allbery_b joined #perl6
22:11 lichtkind joined #perl6
22:11 d4l3k_ joined #perl6
22:13 geekosaur joined #perl6
22:13 geekosaur joined #perl6
22:13 PerlJam joined #perl6
22:15 am0c joined #perl6
22:15 eviltwin_b joined #perl6
22:24 allbery_b joined #perl6
22:27 noam joined #perl6
22:28 noam_ joined #perl6
22:33 noam joined #perl6
22:34 noam joined #perl6
22:35 noam joined #perl6
22:37 eviltwin_b joined #perl6
22:40 libertyprime joined #perl6
22:41 diakopter joined #perl6
22:46 allbery_b joined #perl6
22:47 noam joined #perl6
22:49 dalek tablets: dbb68e9 | (Herbert Breunung)++ | docs/appendix-g-glossary.txt:
22:49 dalek tablets: explain camelia and polish file handle
22:49 dalek tablets: review: https://github.com/perl6/tablets/commit/dbb68e9bfe
22:50 noam joined #perl6
22:54 whiteknight joined #perl6
22:57 noam joined #perl6
22:59 noam joined #perl6
23:00 noam joined #perl6
23:09 noam joined #perl6
23:16 eviltwin_b joined #perl6
23:28 nebuchadnezzar joined #perl6
23:32 noam joined #perl6
23:37 sorear good * #epr6l
23:38 geekosaur joined #perl6
23:39 noam joined #perl6
23:43 colomon good question
23:44 sorear colomon: what question?
23:44 colomon oh, whoops.   must have been backlogged and not realize it.
23:44 colomon jnthn is curious why some of the calls get { * } and some of them get { ... } even though it doesn't matter.
23:45 colomon ^ that question.
23:45 colomon in https://github.com/perl6/DBIish/blob/master/lib/DBDish/SQLite.pm6
23:45 colomon I was just wondering if we could implement the same thing in Niecza using a .NET interface to SQL...
23:47 colomon sorear: how are you doing?
23:47 sorear good
23:48 sorear tuit infusion occured
23:48 colomon \o/
23:48 sorear I should be able to at least deal with the email backlog
23:48 colomon I suffered a tuit free day, except that part of the day required me to get some music processed, so I did a bit of incidental work on ABC.
23:50 noam joined #perl6
23:51 * colomon is listening to a very tired three year old sing "Casey Jones" on the monitor.  :)
23:59 aloha joined #perl6

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

Perl 6 | Reference Documentation | Rakudo