»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:09 Psyche^ joined, Psyche^ is now known as Patterner 00:12 tokuhirom joined 00:14 stepnem left
dalek blets: 2c73ee9 | (Herbert Breunung)++ | docs/ (3 files):
explaining: term, expression and statement
00:18
00:19 pochi joined 00:23 stepnem joined
[Coke] lichtkind: why do you ask? 00:32
(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:33
www.webopedia.com/TERM/E/expression.html is a decent generic answer. 00:35
00:41 uvtc joined 00:42 alester joined
dalek blets: e43e7be | (Herbert Breunung)++ | docs/appendix-g-glossary.txt:
explaining context
00:45
uvtc Logical `and` and `or` are still low-precedence forms of `&&` and `||`, correct? 00:46
00:47 eviltwin_b joined
lichtkind yes 00:48
uvtc: its in the index :)
uvtc thanks, lichtkind
lichtkind [Coke]: i looked into wp but wanted get sure get the usage in p6 right 00:49
uvtc: not forgetting the xor and ^^ pair and we have // :)
which in contrary to p5 has low precedence equivalent of err 00:50
uvtc Why does 1 .. 4 => 1 2 3 4, but 'a' .. 'd' yields an object (rather than a list)? 00:51
lichtkind good night
uvtc Wait. Belay that.
Sorry. They both seem to return a Range.
Ah, you can do eager(1 .. 4) to get the list. 00:53
If you need it.
lichtkind, g'night 00:54
00:54 scott_ joined 00:55 scott_ is now known as Guest29557 00:58 uvtc left
sorear good * #perl6 01:01
01:17 wolfman2000 joined 01:21 MContagious joined 01:26 eviltwin_b left, eternaleye joined 01:28 geekosaur joined 01:29 alester left 01:31 bsb joined, fgomez joined 01:35 eviltwin_b joined 01:36 alester joined 01:37 geekosaur left
dalek blets: 55b137a | (Herbert Breunung)++ | / (2 files):
report count now also autogenerated header as items
01:47
01:51 zhongyi0417 joined 01:56 tokuhirom left 01:57 scott_ joined, scott_ is now known as Guest52528 01:58 zhongyi0417 left 01:59 Guest29557 left 02:07 whiteknight left 02:12 alester left 02:14 allbery_b joined 02:15 scott___ joined 02:16 scott___ left 02:17 eviltwin_b left, Guest52528 left 02:27 eviltwin_b joined 02:29 scott___ joined 02:30 allbery_b left 02:31 geekosaur joined 02:35 eviltwin_b left 02:47 orafu joined 02:58 kaleem joined 02:59 kaleem left, eviltwin_b joined 03:00 wolong joined 03:02 MContagious left, geekosaur left, scott_ joined 03:03 scott_ is now known as Guest7085 03:05 scott___ left 03:47 geekosaur joined 03:49 eviltwin_b left 03:58 am0c joined, geekosaur left, fgomez left, geekosaur joined 04:07 eviltwin_b joined 04:09 MContagious joined 04:11 geekosaur left 04:27 noam joined, scott_ joined, Guest7085 left 04:28 scott_ is now known as Guest43982 04:30 kaleem joined 04:37 GlitchMr joined 04:41 geekosaur joined 04:43 eviltwin_b left 04:51 MContagious left 04:52 sisar joined 04:57 eviltwin_b joined 04:58 geekosaur left, birdwindupbird joined 05:02 MContagious joined, birdwindupbird left 05:05 birdwindupbird joined 05:33 birdwind1pbird joined, kaleem left 05:40 eviltwin_b left 05:41 eviltwin_b joined 05:44 am0c left 05:49 birdwind1pbird left
moritz \o 05:49
05:49 kaleem joined 05:50 lestrrat joined 05:56 mucker joined 05:57 wtw joined 05:58 MContagious left, MContagious joined 06:11 eviltwin_b left, geekosaur joined 06:14 fgomez joined
sorear o/ moritz 06:20
06:27 fgomez left, fgomez joined 06:28 fgomez left
frettled \o/ 06:35
tadzik /o\ 06:36
06:43 eviltwin_b joined, fgomez joined 06:45 geekosaur left 06:46 geekosaur joined 06:48 allbery_b joined, eviltwin_b left 06:51 allbery_b left, geekosaur left 06:52 allbery_b joined 07:08 eviltwin_b joined 07:09 allbery_b left, brrt joined 07:11 Guest43982 left, fhelmberger joined 07:19 scott_ joined, mucker left 07:20 scott_ is now known as Guest10204 07:21 fglock joined 07:42 kresike joined 07:46 mucker joined
jnthn oh shark 07:47
tadzik oh shark! 07:51
moritz shouldn't there be a new HPMoR chapter today? 07:52
moritz looks
"The next progress update will appear in the Author's Notes on June 1st at 10PM Pacific Time."
:(
sorear o/ jnthn 07:54
I actually thought 'oh hai' was a backformation from ohayo
jnthn hi sorear 07:55
fglock hi all 08:07
arnsholt 'lo 08:08
08:09 allbery_b joined 08:11 eviltwin_b left 08:16 geekosaur joined 08:19 allbery_b left 08:34 eviltwin_b joined 08:37 geekosaur left 08:41 ab5tract joined 08:43 bbkr joined
frettled "oh hai" has jumped the shark 08:45
08:53 eviltwin_b left 08:55 geekosaur joined 08:59 dakkar joined 09:04 dakkar left
moritz in sovjet russia, sharks jump on you! 09:06
brrt still likes lolcats 09:07
sorear sleep&
moritz n: say $?LINE 09:17
p6eval niecza v17-2-gb8fcf85: OUTPUT«1␤»
moritz n: my $?LINE
p6eval niecza v17-2-gb8fcf85: OUTPUT«===SORRY!===␤␤Variables with the ? twigil cannot be declared using my; they are created using 'constant'. at /tmp/9Y3aBLaSpj line 1 (EOF):␤------> my $?LINE⏏<EOL>␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/nie…
moritz n: constant $?LINE = 2; say $?LINE
p6eval niecza v17-2-gb8fcf85: OUTPUT«1␤»
moritz thought so :-)
jnthn moritz: You pondering implementing $?LINE in Rakudo? :) 09:19
09:20 dakkar joined 09:26 dakkar left
moritz jnthn: yes 09:27
jnthn moritz: Nice 09:28
moritz jnthn: currently I just consider a special case in make_variable
jnthn BTW, I also figured out how to do -M
moritz \o/
and I have a local patch for nqp that allows -Ilib without the space 09:29
but not a machine that I currently have access to :/
so needs to wait until tonight
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).
moritz jnthn: nice 09:30
sounds doable
except we ned to be careful not re-load the modules when inside an eval
and things like that
jnthn yeah 09:31
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 09:36 oiig_ joined 09:37 dakkar joined 09:42 dakkar left, eviltwin_b joined 09:43 daxim joined 09:45 oiig_ left 09:46 geekosaur left 09:47 eviltwin_b left 09:48 oiig_ joined
dalek rlito: b4f4a35 | (Flavio S. Glock)++ | / (40 files):
Perlito5 - perl5: "use" is compile-time (the emitted code contains all modules used)
09:53
09:53 oiig_ left, geekosaur joined
dalek kudo/nom: 7836d2f | moritz++ | / (3 files):
implement $?LINE and $?FILE
09:56
jnthn \o/ 09:58
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.
... and of course I screwed up the exception throwing :/
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
n: say $?FILE 10:08
p6eval niecza v17-2-gb8fcf85: OUTPUT«/tmp/ZVUAGLudlX␤»
10:09 am0c joined 10:11 eviltwin_b joined
dalek kudo/nom: 97f9756 | moritz++ | src/Perl6/Actions.pm:
fix exception throwing from previous commit
10:11
timotimo nom time is good time. 10:12
10:14 geekosaur left 10:19 immortal joined, immortal left, immortal joined 10:24 am0c left, am0c joined 10:32 Guest10204 left 10:37 JimmyZ joined 10:48 geekosaur joined
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␤»
sisar moritz: this ^ does not report the line no. Is this bug already filed ? 10:51
10:51 eviltwin_b left
sisar moritz: RT #67808 was a similar bug. 10:56
10:59 noam left 11:00 noam joined 11:05 icwiener joined 11:09 dakkar joined 11:14 dakkar left, icwiener left 11:15 spider-mario joined 11:22 geekosaur left, geekosaur joined
moritz sisar: I'ma aware of it. Not sure if it's in RT 11:24
MContagious can I get location for code fix done to support -I for perl6 11:27
moritz MContagious: github.com/rakudo/rakudo/commit/4c...ea3f84a558 11:29
tadzik MContagious: are you thinking about implementing -M? 11:30
moritz I'm already locally testing a patch for -M
tadzik great, moritz++ 11:31
moritz not working yet :(
tadzik yay, a failing test! :) 11:32
moritz $ ./perl6 -I lib -M Test -e 'use Test; ok 1; done' ok 1 - 11:41
1..1
11:42 kresike left
moritz erm, I shouldn't 'use Test' inside 11:43
tadzik cool 11:44
moritz if I leave out the inner 'use Test', it doesn't work :/
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
JimmyZ LTA? 11:49
moritz I find it quite awesome
JimmyZ n: use Test; use Test;
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 geekosaur left 11:51 allbery_b joined
JimmyZ doesn't think so, it's not easy to debug... 11:52
moritz well, it could report the name of the module it's currently loading 11:53
11:54 eviltwin_b left
JimmyZ aye 11:54
moritz JimmyZ: shouldn't be too hard to fix 11:56
JimmyZ moritz: +1 to fix :P 11:57
moritz JimmyZ: want to do it?
11:57 kresike joined
moritz ok, I have a basic test for -M working 12:00
JimmyZ doesn't know how to fix it 12:01
moritz JimmyZ: I can tell you
at least I think I can :-)
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
ack 'Cannot import symbol' src/
=> src/Perl6/World.pm line 228 12:03
now you just have get a handle on the module name 12:04
luckily there's $package in scope
so you can get at its name with $package.HOW.name($package)
include that in the error message, be happy
12:05 localhost joined
tadzik Good Guide Moritz :) 12:05
moritz :-)
moritz always happy to lure^W help new committers
JimmyZ oh', that's why I can't locate it, my rakudo is too old
arnsholt moritz: *prod?* 12:09
12:10 clkao left
moritz arnsholt: reprod 12:10
arnsholt Hehe. Did you ever get a chance to check out my new dyncall branch yesterday? 12:14
It should either fix your sqlite stuff or give me more bug reports =)
12:16 skids joined
moritz arnsholt: no. Will try to it tonight or tomorrow 12:17
*try to do it
12:19 geekosaur joined 12:20 icwiener joined 12:21 allbery_b left 12:22 am0c left
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:25
12:29 fgomez left, fgomez joined
dalek p: 42329b4 | moritz++ | src/HLL/CommandLine.pm:
remove some debugging output
12:30
p: 88f00e1 | moritz++ | / (2 files):
fix and test multiple uses of same command line option
12:32 ponbiki joined 12:33 uvtc joined
uvtc Hi #perl6. Should the following get me 'a' .. 'z'? `.say for 'a' .. *;` 12:36
On my machine, it just prints "a" and waits.
moritz it's probably some problem with eagerness 12:37
r: .say for 'a' .. *
p6eval rakudo 97f975: OUTPUT«(timeout)a␤»
uvtc r: .say for eager('a' .. *); 12:38
p6eval rakudo 97f975: OUTPUT«(timeout)a␤»
[Coke] r: .say for 'a'..'z'
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␤»
uvtc [Coke], right. 12:39
dalek kudo/nom: 93a44d7 | moritz++ | / (4 files):
Implement -M option

Currently only works for proper modules, not pragmas like fatal or MONKEY_TYPING.
Also bumps NQP revision to get command line parser fixes
12:41
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
moritz MContagious: the patch that I just pushed did it already 12:44
MContagious can you share me that patch ? 12:47
moritz MContagious: dalek reported a review URL
MContagious: simply follow it
MContagious thanks 12:48
12:52 ponbiki left
uvtc Trying to figure out how the "..." operator works... 12:56
r: for (1, 3 ... *) -> $i { if $i > 10 { last } else { $i.say } }
p6eval rakudo 97f975: OUTPUT«1␤3␤5␤7␤9␤»
12:56 eviltwin_b joined
uvtc How does perl6 know? 12:56
PerlJam uvtc: how does it know what?
colomon how does perl6 know what?
PerlJam uvtc: are you asking how ti figures out the sequence?
flussence_ that $^b - $^a = 2?
uvtc How does it know how many to skip between values?
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
that's easy.
12:57 flussence joined
uvtc colomon, Oh, Ok. Thanks. 12:57
moritz uvtc: S03 has some details
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
moritz $first, &routine ... *; 12:58
colomon what moritz++ said
uvtc moritz, what do I use as the prev value in the routine? $_?
$a?
colomon r: for (1, *+2 ... *) -> $i { if $i > 10 { last } else { $i.say } }
p6eval rakudo 97f975: OUTPUT«1␤3␤5␤7␤9␤»
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 } }
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␤»
PerlJam uvtc: S03:1806 or there abouts. Start reading :)
moritz r: sub foo($x) { 2 * $x + 1 }; say (1, &foo ... *)[^5]
p6eval rakudo 97f975: OUTPUT«1 3 7 15 31␤»
12:59 geekosaur left
uvtc r: for (1, {$_ + 2} ... *) -> $i { if $i > 10 {last} else {$i.say}} 12:59
p6eval rakudo 97f975: OUTPUT«1␤3␤5␤7␤9␤»
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␤»
uvtc eeek!
colomon lots of different ways to specify that.
uvtc colomon, thanks, I'm seeking the "baby Perl 6 way" at the moment. :)
dalek blets: 86215ce | (Herbert Breunung)++ | docs/appendix-g-glossary.txt:
explain file handle and add some more terms to explain later
colomon uvtc: I'm not sure anyone knows what that is yet. :)
moritz baby Perl 6 is loop (my $i = i; $i < 21; $i += 2) { ... } 13:01
colomon ick
uvtc moritz, hm. Well, maybe a little more perlish than that.
moritz 1, 3 ... *
erm
1, 3 ... 21 13:02
or
(1, 3 ... *)[^10] # first ten values
or if you want to be explicit
PerlJam for 0..10 { my $i = $_ * 2 + 1; ... } # adolescent perl 6 ?
moritz (1, * + 2, ... *)[^10]
uvtc
.oO( Dad, can I borrow the hash keys? )
moritz :-) 13:03
uvtc (And that's on only a half a cup of tea. Wait 'til I get going!)
moritz waits
btw one idiom I really love for cycling through values is 13:04
r: for ^10 { say <red green blue>[$_ % *] }
p6eval rakudo 97f975: OUTPUT«red␤green␤blue␤red␤green␤blue␤red␤green␤blue␤red␤»
jnthn oooh :) 13:09
That's cute.
mikec__ what does the * do? 13:10
moritz discovered while writing SVG::Plot, some years ago :-)
mikec__: it creates a closure, with a formal parameter instead of the *
colomon r: for (<red green blue> X *)[^10] { .say }
p6eval rakudo 97f975: OUTPUT«red␤*␤green␤*␤blue␤*␤»
flussence r: say <red green blue>[^10 X% 3]
p6eval rakudo 97f975: OUTPUT«red green blue red green blue red green blue red␤»
PerlJam It is timtowtdi day today? :)
colomon flussence++ 13:11
moritz mikec__: so it's the same { 3 % $_ }
flussence: yours repeats the number of elements
colomon moritz: you mean 3 % $_, no?
moritz r: say <red green blue>[^10 X% *]
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…
colomon moritz: dang it, $_ % 3
moritz colomon: yes
uvtc r: say (1, 3 ... 10); 13:12
hm.
p6eval rakudo 97f975: OUTPUT«(timeout)»
moritz r: say (1, 3 ... * > 10 )
p6eval rakudo 97f975: OUTPUT«1 3 5 7 9 11␤»
moritz r: say (1, 3 ...^ * > 10 )
p6eval rakudo 97f975: OUTPUT«1 3 5 7 9␤»
flussence r: given <red green blue> { $_[^10 X% +$_] } 13:13
p6eval rakudo 97f975: ( no output )
flussence r: given <red green blue> { say $_[^10 X% +$_] }
p6eval rakudo 97f975: OUTPUT«red green blue red green blue red green blue red␤»
uvtc Ah, ok, thanks, moritz.
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␤»
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
uvtc r: my @odds = 1, 3 ... * < 10; say @odds
p6eval rakudo 93a44d: OUTPUT«1␤»
moritz uvtc: not the "what I want" condition
uvtc moritz, Ohhhhhhh.
moritz, thanks. 13:16
moritz uvtc: do read the specs when we point you to them :-)
uvtc moritz, right. 13:18
13:18 dima joined 13:19 dima is now known as ddima, allbery_b joined 13:21 geekosaur joined 13:22 eviltwin_b left 13:24 allbery_b left
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: wiki.perl6.org/Mostly%20Harmless%20.../Operators . Thanks. 13:29
13:30 eviltwin_b joined
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
my-obj-with-a-long-name .= method-call
I'd use a $variable there
"object with a long name" sounds rather vague and badly defined 13:32
unless you mean a type
in which case you should say type, not object
13:33 obra joined
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:33
13:33 geekosaur left 13:38 birdwind1pbird joined
dalek kudo/nom: 0059aa6 | duff++ | src/Perl6/Grammar.pm:
Fix typo in subrule
13:42
13:42 obra left
[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
PerlJam why expected 2? 13:43
jnthn r: say ((* * 3) + 1 ... *<=1).WHAT 13:44
p6eval rakudo 93a44d: OUTPUT«List()␤»
jnthn Hm, I thought it may be taking the lot as one big WhateverCode
uvtc Is Perl 6's Nil like Perl 5's undef? 13:46
tadzik std: undef 13:48
p6eval std fab64fc: OUTPUT«===SORRY!===␤Unsupported use of undef as a value; in Perl 6 please use something more specific:␤ Mu (the "most undefined" type object),␤ an undefined type object such as Int,␤ :!defined as a matcher,␤ Any:U as a type constraint,␤ Nil as the absense
..…
tadzik many things are the Perl 5's undef :)
PerlJam uvtc: Nil is the absence of a value. 13:49
uvtc Thanks.
r: my $x = Nil; say $x 13:50
p6eval rakudo 93a44d: OUTPUT«Nil␤»
uvtc r: ?Nil
p6eval rakudo 93a44d: ( no output )
uvtc r: (?Nil).say
p6eval rakudo 93a44d: OUTPUT«False␤»
PerlJam r: my @a = (Nil, Nil, Nil); say +@a; 13:51
p6eval rakudo 93a44d: OUTPUT«0␤»
PerlJam If you fill an empty bucket with Nil, the bucket remains empty :) 13:52
uvtc Tried to boil it down here: wiki.perl6.org/Mostly%20Harmless%20...0Falsehood
moritz uvtc: maybe worth mentening that '' is false too 13:53
13:53 icwiener left 13:54 icwiener joined
uvtc moritz++ 13:54
moritz as well as type objects
uvtc "empty objects"?
moritz type objects.
uvtc (ooh, forgot to mention, "everything else is true"
)
moritz like, Int
uvtc r: ?Int 13:55
p6eval rakudo 93a44d: ( no output )
uvtc r: (?Int).say
p6eval rakudo 93a44d: OUTPUT«False␤»
uvtc moritz, may have to add a types section. Thanks. 13:56
13:58 rindolf joined, rindolf left 14:01 ponbiki left
JimmyZ moritz: I gave up, compile rakudo is slow.... and $package.HOW.name($package) outputs DEFAULT 14:01
jnthn Probably because it's pulling stuff out of EXPORT::DEFAULT... 14:02
JimmyZ well, most time is compiling.. 14:04
14:04 daemon joined 14:05 birdwind1pbird left
jnthn Yes, beefy hardware is useful when working on Rakudo :) 14:05
14:13 dakkar joined 14:15 kaleem left 14:23 allbery_b joined
moritz r: package A { }; say A.HOW.name(A) 14:25
p6eval rakudo 0059aa: OUTPUT«A␤»
PerlJam could Coke's example be that ?? !! is turning into 2 WhateverCodes instead of just 1 ?
moritz hm
14:26 eviltwin_b left 14:28 sisar left 14:29 wolfman2000 left 14:31 PacoAir left 14:38 dakkar left, dakkar joined 14:41 cogno joined 14:42 sporous joined 14:43 dakkar left 14:44 szbalint joined, mattp_ joined 14:47 dakkar joined 14:48 _-`user0 joined
_-`user0 Hi, i want to learn perl6 from beginning, can you tell me where can i learn it ? 14:49
14:49 lestrrat left
TimToady do you know Perl 5? 14:50
_-`user0 TimToady: no
PerlJam _-`user0: Have a look at perl6.org/documentation for some learning resources
14:50 noam left, lestrrat joined
TimToady have you programmed in any language before? 14:51
14:51 thou joined, cogno left 14:52 noam joined, BooK joined
uvtc _-`user0, just noticed, the link to the [beginner's book](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
uvtc: Thank you :)
14:53 wtw left
TimToady do you like to learn from examples, of from tutorials? 14:53
if examples, you might visit rosettacode.org/wiki/Category:Perl_6 14:54
_-`user0 okay 14:55
TimToady php is similar enough to perl that perlgeek.de/en/article/5-to-6 might be useful
14:56 allbery_b left
dalek href="https://perl6.org:">perl6.org: 736c5de | (John Gabriele)++ | source/documentation/index.html:
updated the github book download link from 2011.01 to 2011.07
14:56
14:57 geekosaur joined
_sri is there a usable perl6 to perl5 compiler yet? 14:57
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
PerlJam _sri: perlito 14:59
_sri PerlJam: but is it actually usable?
14:59 ponbiki joined
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.
fglock: why exactly? 15:00
fglock: (would a TPF grant help?)
15:01 thou left
_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
15:02 cogno joined
JimmyZ moose ? 15:02
moritz thinks that embedding is a better way 15:03
people don't like generated code
_sri embedding still means wasted resources
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:03 birdwindupbird left 15:04 mucker left
_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
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
the other approach is to hack more P6 primitives into the P5 core 15:05
like pervasive laziness
_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
TimToady and a type system
moritz perverse laziness :-)
fglock one of the big problems is that perl5 is just not the same without XS
moritz TimToady: well, adding a type system would be a pretty big departure from current p5
somehow I don't see that happening any time soon 15:06
TimToady XS is more or less a poor-man's type system...
the reason we can do something else in P6 is precisly because we have a type/trait system
15:06 cogno left
_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
arnsholt As jnthn++ explained to me, the combination of representation polymorphism and a type system is pretty much what makes zavolaj go 15:08
Speaking of XS
TimToady I kinda keep the rep poly under the "type system" category in my mind
it's just low-level rather than high-level
arnsholt True dat 15:09
15:10 fglock left
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
moritz it's not enforced, but you do modify the argument
15:11 fglock joined
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:11
TimToady writing an XS-to-zavolaj translator is probably halting-problem territory though 15:12
moritz like, Mojo::{JSON,DOM,Cookie}
_sri moritz: i believe almost everything can be ported now
sjn moritz: I'd love that :)
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.
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?
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
[Coke] jnthn: (one big whatevercode) is there a way to avoid that?
is it a bug?
TimToady also, I suspect that most P5 module programmers will choose to learn P6 by porting their modules
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
dalek volaj/cstr: a4f37b4 | (Arne Skjærholt)++ | lib/NativeCall.pm6:
Make Str parameter of explicitly-manage rw. moritz++
_sri moritz: since there's no CP6AN yet, does it matter?
PerlJam doubts that Perl 5 will *ever* get pervasive laziness though
moritz _sri: there's modules.perl6.org 15:15
TimToady it's just not comprehensive yet
moritz and it's not an archive either
more like a tracker
_sri shrugs 15:16
[Coke] ah.
r: for (100, {$^a %% 2 ?? $^a / 2 !! ($^a * 3)} + 1 ... *<=1 ) { .say }
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␤␤»
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 }
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␤»
TimToady why are you adding 1 to a closure?
[Coke] r: for (1000, {$^a %% 2 ?? $^a / 2 !! ($^a * 3) + 1} ... *<=1 ) { .say }
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…
jnthn decommutes, bbl 15:18
[Coke] TimToady: misplaced }
[Coke] "played" that on his first electronic calculator for hours. ah, my misspent youth.
PerlJam [Coke]: I think your original was more like : for (100, { {$^a %% 2 ?? $^b / 2 !! ($^c * 3) +1 } ... *<=1) { .say }
TimToady and why are you being superstitious about *<=1 ?
[Coke] PerlJam: mayhap, aye.
TimToady I'm trying to remember what that's called on RC 15:19
15:19 benabik joined
[Coke] TimToady: if the sequence doesn't happen to hit one, it'll never stop. 15:19
15:19 ponbiki left
[Coke] that sequence always does though, I think. 15:19
TimToady 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
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 }
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…
TimToady r: sub hailstone($n) { $n, { $_ %% 2 ?? $_ div 2 !! $_ * 3 + 1 } ... 1 }; say hailstone(27)
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…
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 fgomez left
fglock everything is possible, but some things are not practical 15:21
TimToady fglock: what you say is true of the other implementations too :) 15:22
fglock yes
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
15:25 ponbiki joined
[Coke] TimToady: why "div" instead of "/" ? 15:26
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 MContagious left
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:28 kresike left 15:29 vlixes joined
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 left, noam joined 15:32 mucker joined
fglock decommutes 15:33
flussence awwaiid: if that ever gets made, it might be a starting point for `make -j`-able core.setting compilation :) 15:35
15:36 JimmyZ left, noam left 15:37 noam joined 15:38 apejens joined, JimmyZ joined 15:39 eviltwin_b joined
moritz it's certainly doable, but much effort 15:39
or put differently, I can imagine lots of things that provide higher benefit/effort ratios today 15:40
awwaiid probably not very maintainable either 15:42
15:42 geekosaur left
TimToady Even with "simple integer addition", there are differing kinds of "simple" 15:43
awwaiid true that
TimToady P6's integer addition is simple *because* it's based on bigints
dalek osystem: a4f859c | tadzik++ | META.list:
Add Template::Mojo
colomon oooooo
awwaiid I'm imagining something like a graph of dependencies between test cases
15:44 icwiener left
TimToady it's sorta saying that everyone has to put the circularity saws in the same spot, which P6 doesn't require 15:44
15:44 icwiener joined 15:45 allbery_b joined
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
moritz well, it would have lots of cycles, that graph
awwaiid sure it would
it would be a delicious mess!
anyway. popped into my head and I thought I'd throw it out there :) 15:46
15:46 mucker left
moritz throws it back at awwaiid :-) 15:46
15:46 mucker joined
awwaiid leaps into the air to catch it in his teeth 15:46
15:47 mucker left
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
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, eviltwin_b left
moritz tries to find out which case PerlJam++ fixed in his last commit 15:48
that colonpair rule has | (\d+) <identifier> 15:49
15:49 mucker left
moritz ah, that's for 2nd, 3rd 15:49
r: say ( :1st ).perl 15:50
p6eval rakudo 0059aa: OUTPUT«===SORRY!===␤Malformed radix number␤at /tmp/d7UcZXKor6:1␤»
moritz r: m:1st / . /
p6eval rakudo 0059aa: OUTPUT«Method 'match' not found for invocant of class 'Any'␤ in block <anon> at /tmp/XvhayZrlFk:1␤␤»
moritz r: m:1st(3) / . /
p6eval rakudo 0059aa: OUTPUT«===SORRY!===␤2nd argument not allowed on pair at line 1, near " / . /"␤»
moritz ah, that's it
15:52 Patterner left, Psyche^ is now known as Patterner 15:53 JimmyZ left, sftp_ joined
TimToady std: say ( :1st ).perl 15:53
p6eval std fab64fc: OUTPUT«ok 00:00 41m␤»
TimToady LTM damage, I guess
[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
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␤␤»
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:55
masak lol shark, #perl6 15:59
16:00 eviltwin_b joined
tadzik lol masak, shark 16:00
TimToady 'same' to you 16:03
16:03 geekosaur joined
TimToady phenny: ja en "same"? 16:03
16:03 allbery_b left
phenny TimToady: "same" (ja to en, translate.google.com) 16:03
masak GT doesn't do phonetic Japanese, AFAIK ;0 16:04
;)
TimToady phenny: ja en "さめ"?
phenny TimToady: "Shark" (ja to en, translate.google.com)
16:05 allbery_b joined, eviltwin_b left 16:06 brrt left 16:07 geekosaur left
bbkr perl6: say so * 16:07
p6eval rakudo 0059aa: OUTPUT«WhateverCode.new()␤»
..pugs: OUTPUT«1␤»
..niecza v17-2-gb8fcf85: OUTPUT«{ ... }␤»
bbkr hm 16:08
"so" should enforce boolean context, right?
16:09 dakkar left
bbkr reports 16:10
masak notabug.
16:11 tyatpi joined
masak phenny: sv en 'same'? 16:11
phenny: sv en "same"?
phenny masak: "Sami" (sv to en, translate.google.com)
16:11 ponbiki left
masak phenny: tell lichtkind re github.com/perl6/tablets/blob/2c73...y.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.
daxim reindeers and stuff
16:15 allbery_b left, geekosaur joined 16:16 fglock_ joined
uvtc Looks like I can still use curly braces to create a local scope. 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:16
Hm. That appears to be explained in S04. But that's a rather long read. 16:19
Will have to get back to this another time I guess.
16:20 uvtc left 16:24 tyatpi left
masak a code block always carries a local lexpad with it, so yes, it defines a scope. 16:24
16:25 dakkar joined
masak bbkr++ # rejecting his own mistickets ;) 16:26
16:28 MContagious joined
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:30
PerlJam v6.pm allows for a module to be used in p5? that's ... odd. 16:33
_sri fglock_: is there documentation for which features are supported? 16:34
PerlJam oh. /me tries it. 16:35
fglock_: Have you updated perlito since Oct 2011? 16:36
fglock_ _sri: no, there are the tests only
_sri fglock_: i see :/
fglock_ PerlJam: I didn't release new versions to cpan
I mostly stopped development because perlito5 was more interesting, but if you find it useful I could start again 16:38
note you can run the same code in the browser, it also passes the tests (except for things that require file i/o) 16:39
16:45 geekosaur left, geekosaur joined, kaleem joined 16:46 kaleem left 16:50 dakkar left 16:51 PacoAir joined, sisar joined 16:54 icwiener left, wamba left, fgomez joined, icwiener joined 17:02 bbkr left, sisar left 17:13 eviltwin_b joined 17:15 geekosaur left 17:21 wooden joined, wooden left, wooden joined 17:22 allbery_b joined 17:25 eviltwin_b left
masak today's autopun: twitter.com/sixthformpoet/status/19...0416565248 17:32
17:37 immortal left, erkan joined, erkan left, erkan joined 17:43 ponbiki joined 17:46 sisar joined 17:47 allbery_b left
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, Chillance joined
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 18:02 am0c joined 18:05 mucker joined 18:21 PacoAir left 18:23 PacoAir joined 18:25 PacoAir left 18:27 eviltwin_b joined 18:30 PacoAir joined, allbery_b left 18:35 fhelmberger left 18:41 birdwindupbird joined 18:46 bsb left 18:48 allbery_b joined 18:50 bsb joined 18:51 eviltwin_b left, alester joined 18:52 tyatpi joined
_sri which perl6 module is the best example for what a good perl6 distribution should look like? 18:57
18:57 eviltwin_b joined 18:59 wolfman2000 joined, alester left
masak _sri: that's hard to answer. we don't have a CPAN, so we tend to think in modules, not "distributions". 19:00
19:00 allbery_b left
masak that said, there are certain guidelines that tadzik++/panda likes if you follow. 19:00
19:00 NamelessTee left
_sri well, which module is the best example then? :) 19:01
especially regarding tests and documentation
19:01 constantined joined
masak good question. I don't know. 19:02
I wish I had more time to study other people's modules. :/
19:03 allbery_b joined
_sri i've found a lot of proof-of-concept type code on github, but so far nothing that looked finished 19:03
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
maybe that'll help.
19:06 eviltwin_b left
jnthn 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:06
_sri looks 19:07
jnthn Arguably it should pod document stuff. 19:08
There's not really been a cultural push for ubiquitous Pod though...
_sri oh, say() to emit TAP :S
jnthn Oh, don't follow that example. 19:09
There's a good reason.
Those tests also call C code
Which also emits ok's.
Most if not all modules use Test.pm.
_sri i see
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 :)
colomon: is that online? 19:11
colomon yes, and in the ecosystem.
(though I believe it only works with Rakudo at the moment.)
_sri one thing i always loved about perl5 was the documentation culture
jnthn masak: Writing and testing native call interfaces is a fairly minority exercise too :)
masak nod. 19:12
19:15 noam left 19:16 noam joined
jnthn I suspect once modules.perl6.org starts rendering Pod docs in modules, there'll be more uptake. 19:16
19:16 noam left, noam joined 19:17 constantined left
jnthn At least, I'll find it a motivator to do it :) 19:17
masak ooh 19:18
_sri Test does look rather pleasant to use
masak it's not bad.
_sri it does not look like a good example itself though 19:20
19:20 kaare_ joined
masak of what? good test coverage? 19:20
_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.
_sri github.com/rakudo/rakudo/blob/nom/...st.pm#L226 # is that a magical comment?
masak surely not. 19:22
19:22 bluescreen10 joined
_sri has not found documentation on POD and comments in perl6 yet 19:22
masak perlcabal.org/syn/S26.html 19:23
_sri thanks 19:24
TimToady perlcabal.org/syn/S02.html#Multiline_Comments
19:27 mucker left
masak doesn't understand why he hasn't heard of the en.wikipedia.org/wiki/Ulam_spiral until now 19:30
[Coke] Did you major in math? 19:32
19:34 GlitchMr left
TimToady you did hear of it, but suppressed the memory :) 19:34
19:34 havenn joined
masak [Coke]: haven't majored in anything, but math has always held a special place in my heart. 19:35
moritz \o 19:36
arnsholt: fwiw t/07-writebarrier.t fails here with "Cannot locate native library '07-writebarrier.so'" 19:41
[Coke] 19:42
19:43 NamelessTee joined
moritz arnsholt: ah, needs is native('./07-writebarrier') 19:43
I can fix that later 19:44
arnsholt moritz: Derp. Must've forgotten to run the test suite before committing
moritz arnsholt: are you on macos?
arnsholt Yeah
moritz arnsholt: that explains it 19:45
19:45 geekosaur joined
arnsholt Oh? 19:45
moritz arnsholt: that fix is only needed on linux
19:45 noam left
moritz arnsholt: different defaults in library paths 19:45
19:45 noam joined
arnsholt Oh. The ./ in front? 19:46
moritz yes
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
moritz all other tests pass
19:48 allbery_b left
arnsholt Good, good 19:49
moritz arnsholt: \o/ all but on test pass 19:50
and that one is my own fault, I assume
19:52 noam left 19:53 noam joined
moritz (the failing test is ok $dbh.finish, it fails with SQLITE_BUSY) 19:53
arnsholt Excellent! 19:54
19:55 skids left
moritz I just wonder how much memory I leak 19:55
arnsholt Let's not think too hard about that ;) 19:58
But IIRC, all the structures you create in Perl 6 should be properly freed when the wrapper object is GCed 19:59
Stuff returned from C isn't freed though, I think
moritz I just wonder if my stuff gets GCed :-)
20:00 rindolf joined
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:00
Dunno if you keep references to everything in a cache somewhere or so, though =) 20:01
moritz I leak statement handles :/
on the C side, that is 20:02
arnsholt Oh?
moritz well, I need to call $sth.finish each time one is GC'Ed
but we don't have DESTROY submethods yet
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
ordering of them, etc
moritz well, a partial DESTROY would quite well for me
tadzik I'll grep the ir clogs for hints once I get some nom 20:04
20:05 ab5tract left
masak .oO( let's just hope people haven't said DESTROY DESTROY DESTROY too much in the ir clogs ) 20:07
moritz or maybe DESTROYALL 20:10
dalek Iish: a5f4ae0 | moritz++ | t/10-mysql.t:
fix mysql tests
20:12
Iish: 9b33943 | moritz++ | lib/DBDish/SQLite.pm6:
[SQlite] use explicit memory management for strings. arnsholt++
tadzik moritz: pointer: irclog.perlgeek.de/perl6/2011-12-30#i_4899708 20:13
I seem to recall making it work somehow, at least I remember it was virtually impossible to test 20:14
20:14 mspaulding joined 20:15 eviltwin_b joined
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:15
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
moritz tadzik: but, that will make *all* object destructions slower
and we destory a lot of objects
20:17 geekosaur left
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
and only then call DESTROYALL
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 icwiener left
jnthn Imagine we have two objects A and B, where A -ref-> B. 20:19
20:19 eviltwin_b left
jnthn There's no promise that A's DESTROYALL will be called before B's. 20:19
Which isn't in itself an issue apart from there's no "call a finalizer" vs "free memory" distinction right now either. 20:20
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:21
masak doesn't the Perl 5 runtime have the same set of issues? 20:23
jnthn I'm not saying it's an intractable problem, just that Parrot afaict doesn't tract it at the moment. 20:28
20:31 wolfman2000 left 20:33 am0c left
moritz masak: not as much 20:34
20:35 geekosaur joined
moritz masak: since structures are refcounted, you only free them if they have no more backreferences 20:38
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:39
20:40 NamelessTee left
moritz ah, the mythical Global Destruction 20:44
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
PerlJam if you free your structures and they come back to you, it must be love^Wrefcounting
20:48 fglock_ left 20:53 eviltwin_b joined 20:55 geekosaur left 21:02 geekosaur joined 21:05 eviltwin_b left, NamelessTee joined 21:07 bluescreen100 joined 21:08 alester joined
dalek Iish: 4a8d025 | moritz++ | lib/DBDish/SQLite.pm6:
[SQLite] collect and finish off statement handles in the connection class
21:10
jnthn moritz: Do we now have a pretty much working SQLite driver? :) 21:11
moritz jnthn: yes 21:13
jnthn \o/
moritz++ arnsholt++
moritz arnsholt++ did most of the hard work :-)
21:13 rindolf left 21:14 xinming_ joined, eviltwin_b joined
jnthn Wow. The code looks nice. :) 21:16
It's pretty cool that we can write a SQLite driver in pure Perl 6 in ~250 lines :) 21:17
21:17 geekosaur left
jnthn is curious why some of the calls get { * } and some of them get { ... } even though it doesn't matter. 21:17
moritz jnthn: it's quite simple: some were written after our discussion at the hackathon :-) 21:18
fwiw, 40 of these lines are pretty generic, and should be factored out in DBDish::ConnectionHandle 21:19
jnthn Even better :)
moritz and it misses about 10 lines for column_names, which is currently NYI 21:20
dalek Iish: 2534dea | moritz++ | t/99-common.pl6:
[t] compare more numbers by number.

Now all tests pass for SQLite
21:21
moritz ok, 11 lines :-) 21:26
21:26 birdwindupbird left
moritz but my patch causes or exposes another problem 21:26
21:27 sjohnson joined
dalek Iish/sqlite-column_names: ce8eda8 | moritz++ | lib/DBDish/SQLite.pm6:
[SQLite] implement column_names
21:27
p/toqast: aba8043 | jnthn++ | src/QAST/Node.nqp:
Slots for slurpy and named.
21:28
p/toqast: 9191efb | jnthn++ | src/QAST/Compiler.nqp:
Start to get support for local parameters in place, including natively typed ones.
p/toqast: 85b021d | jnthn++ | t/qast/qast.t:
A couple of tests for local parameters.
21:29 allbery_b joined 21:30 alester left 21:31 eviltwin_b left
moritz sqlite++ # being stricter than other DBs, thus uncovering some mistakes in the tests 21:31
21:31 havenn left
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
21:32 skids joined
moritz but the C API has helped me discover several small inconsistencies in the tests 21:32
21:33 eviltwin_b joined 21:36 allbery_b left
dalek Iish: ce8eda8 | moritz++ | lib/DBDish/SQLite.pm6:
[SQLite] implement column_names
21:37
Iish: 46bff63 | moritz++ | t/99-common.pl6:
commit fetchrow_arrayref tests
Iish: 4abaacc | moritz++ | t/10-mysql.t:
[mysql] fix last failing tests. All tests pass now \o/
moritz and with that, all tests pass.
time for sleeping here :-)
jnthn \o/
sleep well :)
moritz thanks
tomorrow: add DBIish to ecosystem
21:39 geekosaur joined, brrt joined 21:40 eviltwin_b left 21:41 noam left 21:42 havenn joined, havenn left, eviltwin_b joined 21:44 geekosaur left 21:47 geekosaur joined 21:50 eviltwin_b left 21:56 eviltwin_b joined 21:58 kaare_ left 21:59 geekosaur left 22:01 allbery_b joined 22:02 allbery_b left 22:03 geekosaur joined 22:04 bluescreen__ joined 22:05 eviltwin_b left, wolfman2000 joined 22:06 bluescreen10 left, bluescreen__ left, bluescreen100 left, eviltwin_b joined 22:07 benabik left 22:08 NamelessTee left, allbery_b joined 22:10 geekosaur left 22:11 eviltwin_b left, lichtkind joined, d4l3k_ joined 22:12 d4l3k_ is now known as dalek 22:13 geekosaur joined, PerlJam left, geekosaur left, geekosaur joined, PerlJam joined, brrt left 22:15 am0c joined, allbery_b left, eviltwin_b joined 22:18 geekosaur left 22:21 PacoAir left 22:24 allbery_b joined 22:26 eviltwin_b left 22:27 noam joined 22:28 noam left, noam_ joined 22:32 noam_ left 22:33 noam joined 22:34 noam left, noam joined 22:35 noam left, noam joined 22:37 eviltwin_b joined 22:38 sisar left, allbery_b left 22:40 libertyprime joined 22:41 diakopter joined 22:46 allbery_b joined 22:47 noam left, noam joined 22:48 eviltwin_b left
dalek blets: dbb68e9 | (Herbert Breunung)++ | docs/appendix-g-glossary.txt:
explain camelia and polish file handle
22:49
22:50 noam left, noam joined 22:54 whiteknight joined 22:56 noam left 22:57 noam joined 22:58 noam left 22:59 noam joined 23:00 noam left, noam joined 23:08 noam left 23:09 Chillance left, noam joined 23:10 mspaulding left 23:16 eviltwin_b joined 23:19 allbery_b left 23:28 nebuchadnezzar joined 23:32 noam left 23:33 noam joined
sorear good * #epr6l 23:37
23:38 geekosaur joined 23:39 noam left, noam joined 23:41 eviltwin_b left 23:42 thou left
colomon good question 23:43
sorear colomon: what question? 23:44
colomon oh, whoops. must have been backlogged and not realize it.
jnthn is curious why some of the calls get { * } and some of them get { ... } even though it doesn't matter.
^ that question. 23:45
in github.com/perl6/DBIish/blob/maste...SQLite.pm6
I was just wondering if we could implement the same thing in Niecza using a .NET interface to SQL...
sorear: how are you doing? 23:47
sorear good
tuit infusion occured 23:48
colomon \o/
sorear I should be able to at least deal with the email backlog
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 left, noam joined
colomon is listening to a very tired three year old sing "Casey Jones" on the monitor. :) 23:51
23:59 aloha joined