»ö« 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:16 Limbic_Region joined
dalek kudo/nom: 81a7e84 | pmichaud++ | src/core/ (7 files):
Refactor operators, add degenerate forms for reductions.
00:49
jnthn morning, #pelr6 01:21
er, #perl6
01:33 [Coke] left
smallfoot- is Parrot fucking awesome? 01:34
01:34 [Coke] joined 01:35 araujo left, whiteknight joined 01:55 Limbic_Region left 01:59 [perlhack] joined
[perlhack] nice to meet you. 02:00
:-)
02:02 araujo joined 02:04 whiteknight left
[perlhack] Enhancing English fluent,and we talk. 02:05
colomon woah, crazy number of nom changes tday. 02:07
*today
[perlhack] :-) You talking to himself ? 02:10
02:17 lichtkind left
jnthn colomon: Some in nqp also :) 02:23
Though I didn't bump NQP_REVISION yet
Maybe after flight :)
phenny: tell moritz in BackTrace you put subname and subtype into the BackTraceLine but not the actual Sub object itself, which would seem more general. Any reason why not? 02:27
phenny jnthn: I'll pass that on when moritz is around.
jnthn phenny: tell moritz_ or maybe consider having those but including the sub too
phenny jnthn: I'll pass that on when moritz_ is around.
02:37 mattp_ left 02:38 bluescreen10 joined 02:46 [Coke] left
jnthn -> airport o/ 02:47
colomon safe flight!
jnthn Thanks!
02:47 mattp_ joined 02:48 zostay joined 02:49 mattp_ left, mattp_ joined 02:52 bluescreen10 left 02:59 natureboy joined, natureboy left 03:08 agentzh joined 03:12 [perlhack] left 03:17 Bzek joined 03:18 [Coke] joined 03:23 Su-Shee_ joined 03:25 Su-Shee left 03:30 jaldhar joined
dalek ast: 493dd60 | pmichaud++ | S32-num/rat.t:
Fudge S32-num/rat.t for infinite rats in nom.
03:34
kudo/nom: c4ca652 | pmichaud++ | src/core/metaops.pm:
Handle assignment metaop on undefined lhs.
03:35
kudo/nom: 25b3ee6 | pmichaud++ | / (2 files):
Rat updates, add another spectest.
thou phenny: tell masak this is confusing: Jun 22 blog post: "Whereas the %d is for integers, the %f is for floating-point values. (It's probably best to avoid confusing oneself by thinking of the non-integers as "decimal numbers" in this case.)"; instead try something like "it's probably best to not think of the non-integer numbers as "decimal numbers" in this case, which would be confusing." 03:43
phenny thou: I'll pass that on when masak is around.
03:49 smallfoot- left 03:58 zostay_ joined 04:01 zostay left
thou phenny, tell masak looks like is_prime() is broken in Jun 23 blog post (always returns true). should be defined as: sub is_prime($n) { return ?($n %% none( 2 .. $n - 1 )); } 04:04
phenny thou: I'll pass that on when masak is around.
04:11 everbrew joined 04:16 everbrew left 04:23 satyavvd joined 04:37 f00li5h left, benabik left, benabik joined
thou phenny: tell masak your connect four board_is_full() has an off-by-one error (doesn't check the first column). it should be defined as: sub board_is_full { pile_is_full(all(^$WIDTH)); } 04:38
phenny thou: I'll pass that on when masak is around.
05:07 koban joined, koban left, soh_cah_toa left 05:12 daniel-s joined 05:13 drbean left 05:31 satyavvd left 05:32 satyavvd joined 05:35 drbean joined 05:36 jaldhar left, _jaldhar joined 05:40 envi joined
pmichaud now passing 4,263 tests. 05:51
afk, sleep
dalek kudo/nom: bf81ce6 | pmichaud++ | src/core/Str.pm:
Add Str.perl.
kudo/nom: 49e19c5 | pmichaud++ | src/core/Numeric.pm:
Add prefix:<-> for non-numeric types.
kudo/nom: 96cb354 | pmichaud++ | NOMMAP.markdown:
NOMMAP update for my ($, $) = ...;
kudo/nom: f7f0c00 | pmichaud++ | / (2 files):
More fixes for Range class, now pass S03-operators/range-basic.t .
05:55 donri left 05:59 Su-Shee_ is now known as Su-Shee 06:00 Chillance joined 06:05 wtw joined 06:23 mj41 joined 06:25 zby_home_ left
moritz_ good morning 06:26
phenny moritz_: 02:27Z <jnthn> tell moritz_ or maybe consider having those but including the sub too
moritz_ in class Rat: + method Int() { self.Num.Int }
wouldn't $!nuemrator div $denominator be better? 06:27
phenny: tell jnthn I was not sure if includiing the sub in the backtrace object might lead to memory leakage somehow - maybe that was overly pessimistic 06:30
phenny moritz_: I'll pass that on when jnthn is around.
moritz_ what I thought just now is that maybe I should create include all the callframes 06:32
and then offer different stringification/filter methods that select only some frames (only Routines, only non-setting) 06:33
06:35 kst left 06:37 noganex_ is now known as noganex 06:40 kst joined 06:44 mj41 left 06:52 fhelmberger joined
pmichaud 06:26 <moritz_> in class Rat: + method Int() { self.Num.Int } 07:04
I just tended to follow master here. I'm certainly okay with changing it to something better. 07:05
moritz_ will investigate 07:19
07:28 f00li5h joined 07:30 wamba joined 07:46 alim joined 07:47 Helios left 07:49 Helios joined 07:51 alim is now known as fingolfin 07:55 fingolfin is now known as fimgolfin
pmichaud phenny: tell jnthn something about commit 9928a0d causes the REPR to fail on second and subsequent lines with "Can only use nqp_get_sc_for_object with a SixModelObject 08:07
phenny pmichaud: I'll pass that on when jnthn is around.
pmichaud phenny: tell jnthn I meant REPL, not REPR. (bad commit found using 'git bisect') 08:17
phenny pmichaud: I'll pass that on when jnthn is around.
08:24 ab5tract joined, wamba left 08:32 ab5tract left, ab5tract joined, Mowah joined 08:33 dakkar joined 08:45 daxim joined
dalek kudo/nom: baaef99 | pmichaud++ | src/core/operators.pm:
Handle reversing sequences (e.g., 'z'...'a').
08:54
kudo/nom: 602c0af | pmichaud++ | src/core/ (4 files):
Some additional Range methods.
daxim mail.pm.org/pipermail/moscow-pm/201...10305.html 08:57
[Moscow.pm] perl 6 vs utf8
tadzik good morning 09:07
09:13 tokuhirom left, thou left 09:30 lichtkind joined 09:31 mls joined
mls src/core/Bool.pm contains "multi infix:<?|>(Mu $x = Bool::False) { $x.Bool }" in the section for "?^". Seems like a copy'n'paste bug. 09:33
Hmm, same with Numeric.pm, "multi infix:<==>($x?) { Bool::True }" in the "!=" section. 09:47
09:53 Trashlord left 09:57 JimmyZ joined 10:06 am0c^ joined 10:08 tzhs joined 10:12 wamba joined 10:13 am0c^ left 10:19 birdwindupbird joined 10:21 whiteknight joined 10:30 Trashlord joined 10:36 JimmyZ_ joined 10:40 JimmyZ left 10:41 JimmyZ_ is now known as JimmyZ 10:44 jimmy1980 left 10:47 fimgolfin left 10:53 jimmy1980 joined 11:00 wamba left
nebuchadnezzar SIGCOFFEA 11:07
11:09 wamba joined 11:15 daniel-s left
colomon nom: say True ?^ True == False 11:20
p6eval nom: OUTPUT«Segmentation fault␤»
colomon mis++
nom: say True ?^ True
p6eval nom: OUTPUT«Method 'gist' not found for invocant of class 'Undef'␤current instr.: 'say' pc 335032 (src/gen/CORE.setting.pir:87419) (src/gen/CORE.setting:2864)␤»
11:22 mtk joined
flussence
.oO( oh dear, I'm reading the awk manpage all of a sudden... )
11:30
11:35 jferrero left 11:36 agentzh left
dalek ast: e693fe6 | (Solomon Foster)++ | S03-operators/boolean-bitwise.t:
Add tests for single and zero argument forms of infix:<?|>, infix:<?&>, and infix:<?^>.
11:41
11:41 [Coke] left 11:42 stephanmg left
dalek kudo/nom: e6f88ff | (Solomon Foster)++ | src/core/Bool.pm:
Fix infix:<?^> copy/paste glitch.
11:42
11:42 stephanmg joined 11:43 stephanmg left, [Coke] joined, jferrero joined 11:51 [Coke] left 11:53 [Coke] joined 11:58 satyavvd left 11:59 [Coke] left 12:01 [Coke] joined 12:05 [Coke] left
dalek ast: 16c3770 | (Solomon Foster)++ | S03-operators/equality.t:
Add tests for single argument versions of infix:<==> and infix:<!=>.

Someone with more time could go through and repeat this process for the other operators tested in this file...
12:06
12:07 [Coke] joined
dalek kudo/nom: 5cd26f6 | (Solomon Foster)++ | src/core/Numeric.pm:
Fix infix:<!=> copy/paste glitch.
12:08
colomon mis++
darn, that felt good 12:09
mls m*l*s actually, but nevermind ;-)
colomon sorry! mls++ mls++ 12:12
[Coke] seems to be disconnecting an awful lot. 12:14
12:19 [Coke] left 12:21 [Coke] joined 12:26 masak joined
masak daxim: utf-8 is the default encoding for Rakudo -- both source and files. 12:27
phenny masak: 03:43Z <thou> tell masak this is confusing: Jun 22 blog post: "Whereas the %d is for integers, the %f is for floating-point values. (It's probably best to avoid confusing oneself by thinking of the non-integers as "decimal numbers" in this case.)"; instead try something like "it's probably best to not think of the non-integer numbers as "decimal numbers" in this case, which would be confusing."
masak: 04:04Z <thou> tell masak looks like is_prime() is broken in Jun 23 blog post (always returns true). should be defined as: sub is_prime($n) { return ?($n %% none( 2 .. $n - 1 )); }
masak: 04:38Z <thou> tell masak your connect four board_is_full() has an off-by-one error (doesn't check the first column). it should be defined as: sub board_is_full { pile_is_full(all(^$WIDTH)); }
masak thou: thanks you very much. will handle those when I get home.
12:28 mls left
masak daxim: what the poster wants to do could be done with something like 'sub MAIN($filename) { open $filename, :w; $filename.say(.flip) for lines("test"); } 12:29
'
(we could do without the MAIN, but then we'd have to manually read from @*ARGS) 12:30
(we could also do without the 'open', by feeding into $filename.IO, but Rakudo doesn't implement that yet. the above should work.)
daxim: also, the poster writes 'use utf8;' at the top of his source code, and then uses nothing but ASCII in the source code. 12:32
hm, oops. I seem to have gotten 'test' and $filename turned around. it's difficult with such uninformative names ;) 12:33
12:34 mj41 joined
masak 'sub MAIN($filename) { given open 'test', :w { .say(.flip) for lines($filename.IO); .close } }' 12:34
TimToady for is also a topicalizer 12:36
12:41 bluescreen10 joined
Util rakudo: my %a; my %b = %a.map({ .say; .key => (.value + 9) }); 12:43
p6eval rakudo 72d158: ( no output )
Util rakudo: my %a; my %b = %a.map({ ( .key => (.value + 9) ) });
p6eval rakudo 72d158: ( no output )
Util rakudo: my %a; my %b = %a.map({ .key => (.value + 9) });
p6eval rakudo 72d158: OUTPUT«Method 'key' not found for invocant of class ''␤ in main program body at line 22:/tmp/5BSo6AP6tJ␤» 12:44
12:44 matthias_ joined
Util What is wrong with that 3rd version? 12:44
JimmyZ bug? 12:45
matthias_ Util: maybe it thinks of the {...} as a Hash?
masak TimToady: g'ah! yes.
'sub MAIN($filename) { given open 'test', :w -> $fh { $fh.say(.flip) for lines($filename.IO); $fh.close } }' 12:46
JimmyZ rakudo: my %a; my %b = %a.map({ .key; (.value + 9) });
p6eval rakudo 72d158: ( no output )
JimmyZ rakudo: my %a; my %b = %a.map({ .key + (.value + 9) }); 12:47
p6eval rakudo 72d158: ( no output )
Util matthias_: Aha! => alone makes the parser think "Hash", but anything like () or another statement pushes it over the edge to Code. Thanks! 12:48
masak Util: yes.
Util: I also fall into that trap more often than I'd like. 12:49
Util: the only real safe recourse is to write map {; ... }, @array
JimmyZ oh, ugly but must 12:50
JimmyZ says to masak :)
masak that's what I tend to do anyway when I discover the blog turned out to be a Hash.
rakudo: say { $_ => 1 }.WHAT 12:51
12:52 M_o_C joined
p6eval rakudo 72d158: OUTPUT«Hash()␤» 12:52
masak that's a case that trips me up often enough.
JimmyZ rakudo: say {; $_ => 1 }.WHAT
p6eval rakudo 72d158: OUTPUT«Block()␤»
matthias_ masak: reading your post about Roles; I wonder if there is a way to check if a class implements a bunch of methods which are also defined in a role (with same signatures) but that class does not need to "does" the role
JimmyZ rakudo: say { $_ => 1; }.WHAT
p6eval rakudo 72d158: OUTPUT«Hash()␤»
matthias_ for example the following returns false: "role R { method foo { say "foo" } }; class A { method foo { say "bar" } }; say A ~~ R" 12:53
masak matthias_: maybe .can and subtypes? 12:55
matthias_: no, the above will fail. the 'does' is required. 12:56
maybe I should add that to the post.
it didn't occur to me that that might be ambiguous :)
matthias_ I got the idea from Go, that google language. It is a nice idea :) 12:57
masak right. feels very duck-typey.
as I said, I would emulate that behavior with .can and subtypes in Perl 6.
matthias_ ok :) 12:58
thanks
12:59 Holy_Cow joined 13:11 whiteknight left 13:12 whiteknight joined, drbean left
tadzik masak: turns out the algorithm for finding cells isn't sufficient :/ That won't do for the whitespace separators, I'll need moritz's bitwise and technique 13:18
dalek ocmess: 25f8af8 | tadzik++ | / (3 files):
Post-process rows instead of trying to parse them with the grammar. Handle multi-line headers properly
13:21 mj41 left 13:22 M_o_C left
masak tadzik: interesting, but not altogether surprising. 13:24
matthias_ hm.. I don't seem to get signature checking to work. This is how I try to do it: 13:27
rakudo: use MONKEY_TYPING; augment class Mu { method acts-like-a($role) { for $role.^methods -> $method { my $own-method = self.can($method); return Bool::False if ! $own-method or $own-method.signature !~~ $method.signature; }; return Bool::True; }; }; role R { method foo { say "foo" }; }; class A { method foo { say "bar" }; }; say A.acts-like-a(R);
p6eval rakudo 72d158: OUTPUT«Method 'signature' not found for invocant of class 'P6Invocation'␤ in <anon> at line 22:/tmp/7xF5Fb44PT␤ in 'Mu::acts-like-a' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in main program body at line 22:/tmp/7xF5Fb44PT␤»
13:30 Su-Shee_ joined, barika_ joined, [Coke]_ joined, dju_ joined, huf_ joined 13:33 kfo joined 13:34 masak left, [Coke] left, Su-Shee left, huf left, Vlavv left, barika left, dju left, dju_ is now known as dju 13:37 kfo_ left
matthias_ I figured it's the can() that doesn't work as I expected, because I cannot call .signature() on it. Anyway, I have to do some housework now, see you 13:39
TimToady rakudo is just wrong about { $_ => 1 }, according to S04:1584
13:39 wamba left, matthias_ left 13:40 Jackneill joined, Jackneill left, Jackneill joined 13:41 Vlavv joined 13:43 daniel-s joined 13:48 everbrew joined 13:49 JimmyZ left 13:54 Holy_Cow left, wamba joined 13:58 daniel-s left
[Coke]_ getting some failings in nom's spectest. 14:02
er, failures.
14:02 [Coke]_ is now known as [Coke]
tadzik chomp? 14:02
[Coke] t/spec/S02-literals/sub-calls.rakudo; t/spec/S03-operators/equality.t ; t/spec/S32-str/chomp.t 14:03
tadzik I got failures in chomp only, some TODO's passed in some other files 14:04
[Coke] hurm. those 2 work fine if you run them individually. 14:05
wonder if something's getting unhappy about TEST_JOBS=5
er, the first one works fine. 14:06
2nd is complaining about infix:<==>
ah, just missing some of the degenerate infixen. 14:07
any docs on how to prototype things outside of the setting? 14:09
14:10 daniel-s joined
[Coke] (argh. behind a few revs) 14:13
tadzik is the default .new already in nom? 14:14
14:14 mkramer joined
dalek ecs: f30cc88 | larry++ | S03-operators.pod:
cmp does not throw exceptions, just fails

Also discuss "mass production" ops that tend to pass failures through rather than throw them. Which ops are so considered is of course a matter for ongoing negotiation.
14:18
ecs: 1a67e98 | larry++ | S02-bits.pod:
nail down return types of colon radix notation
14:19 mkramer left 14:26 wamba left, wamba joined 14:27 mj41 joined 14:28 wtw left 14:31 Su-Shee_ is now known as Su-Shee
TimToady oh, hey! today is 7/6, the day "if you catch my drift" will start drifting into the past finally... 14:32
or 6/7 if you're .eu-ish 14:33
2011-07-06 ftw
14:33 buubot_backup left 14:37 ruz_ joined, ruz_ is now known as ruz
ruz explicitly required close on fhs you write to. is it a know bug? 14:39
TimToady probably, but I'm not a bug knowledge expert 14:41
flussence sounds familiar
TimToady in any case, at the least, an IO should autoclose during global destruction, if not GC'd earlier 14:42
14:42 kaare_ joined
flussence oh, I remember now 14:42
rakudo doesn't *have* destructors yet
that's why
TimToady well, that would do it...
so definitely a "known" but, whether or not it's in the database 14:43
*bug
well, it's a "but" too
in any case, it's not going to do timely destruction by refcount standards
that does imply the need for more explicit close control, however it's expressed, in cases where that matters 14:45
dalek ast: f712dbc | Coke++ | S32-str/lc.t:
untodo passing rakudo test.
14:46
TimToady probably some sugar over: my $fh will leave *.close = open $filename 14:48
[Coke] bah. need to get a separate git-repo for running spectest and for editing spectest. :P 14:52
tadzik suddenly, Null PMC Accesses. Everywhere 14:53
14:55 buubot_backup joined
TimToady thinks Instant should have a .gist but not a .Str, or people will start relying on the conversion 14:58
(they might anyway, even with .gist)
14:59 _jaldhar left 15:00 wamba left 15:10 mattp_ left 15:14 daniel-s left 15:15 daniel-s joined 15:17 mattp_ joined 15:20 tokuhirom joined
flussence .Str could return a TAI64 timestamp, it's a bit obscure but at least it's well-defined and parseable. 15:20
TimToady +1
arnsholt Def'nitely 15:24
TimToady it's def'ed more often than nitely... 15:27
15:30 tzhs left 15:32 daniel-s left 15:34 daniel-s joined
dalek ast: 8d5f971 | Coke++ | S32-num/rat.t:
untodo passing rakudo tests.
15:44
slavik TimToady: do you have an approach to learning a new language?
tadzik oh crap, I commited to nom instead of a branch
git wizards?
slavik language == a human language
rebase it to a commit before yours
stackoverflow.com/questions/373812/...er-version 15:45
tadzik hmm, I can start a new branch out of nom now, and just hardreset nom, right?
slavik git reset --hard SHA1_HASH
yes
tadzik thanks
slavik tadzik: more than always, google will have an answer :)
tadzik probably, yes :) 15:46
maybe I was subconsciously hoping for "go ahead, push it to nom anyway!" :P
dalek ast: 77bbd5b | Coke++ | S02-whitespace_and_comments/minimal-whitespace.t:
untodo a passing rakudo test.
15:47
15:48 barika_ is now known as barika
TimToady slavik: only obsessive commitment to learning it every way possible 15:49
slavik the only thing I don't have :(
TimToady the only other way is to live there 15:50
15:50 JimmyZ joined
JimmyZ Hello, videos of jnthn's talks in beijing are downloadable, vps.syshacker.com:8000/Perl6_Quicke...e_apps.flv and vps.syshacker.com:8000/Rakudo_The_s...mpiler.flv 15:50
tadzik slavik: oh, but won't my new branch now be a parent of a non-existing commit?
slavik tadzik: I would say, get the file, rollback to previous commit, branch there, then commit the file you got to the new branch 15:51
tadzik okay, I got it I think :) 15:52
without recommiting even
15:53 daniel-s left
tadzik or not 15:53
15:56 JimmyZ left
everbrew slavik, same way 2 year olds learn their native language -- 80 hours a week of Sesame Street ;-) 15:57
slavik :( 15:58
everbrew I think Sesame Street is in every major language family now. At least I've seen Mandarin, German, Japanese, and Spanish. 15:59
15:59 donri joined
everbrew Now we just need Elmo to do a weekly podcast on Perl for kids. 15:59
sbp perl... ...six?
perl... ...six?
perl... ...six?
perl... ...six?
perl... ...six?
everbrew heh
sbp perl... ...six?
perl... six!
PERL6! 16:00
they should do a Sesame Street special for programming languages
Bert and Ernie could teach binary
Mr. Snuffleupagus and the Von Neumann Machine 16:01
this could be a thing, you know
dalek kudo/podparser: e258ef5 | tadzik++ | src/Perl6/SymbolTable.pm:
Allow named parameters to new_type in add_constant()
16:02
kudo/podparser: 9d33af3 | tadzik++ | / (2 files):
Import as little Pod classes as needed, less hacky than before due to default .new working again
kudo/podparser: e653b7f | tadzik++ | src/Perl6/ (2 files):
Build (empty so far) $POD variable
tadzik moritz_: fyi, the podparser branch now is not the podparser branch that was there yesterday, I did some mangling around it and you may want to remove & refetch it, sorry for that 16:04
pmichaud good morning, #perl6 16:06
[Coke] speaking of multilingual, I am enjoying my new forkchops immensely. 16:07
16:07 ab5tract left
tadzik good morning pmichaud 16:07
[Coke] pmichaud: o/ 16:09
16:12 Bzek left, Bzek joined
tadzik seen jnthn 16:17
aloha jnthn was last seen in #perl6 13 hours 30 mins ago saying "Thanks!".
16:22 mattp_ left 16:27 whiteknight left, whiteknight joined 16:30 wamba joined
tadzik yay, I tracked down the serializing Pod bug. Unfortunately, it happens to be a SymbolTable bug of some sort :( 16:31
pmichaud: could you take a look at gist.github.com/1067686 ? 16:35
oh, I think I got it :) 16:37
my $cache_key := "$type,$primitive," ~ pir::join(',', @value);
pmichaud :name($name<compile_time_value>), 16:39
....why are you adding a constant PAST back into $*ST ?
that seems... wrong.
well, it's not a constant PAST... but it still looks weird. 16:40
and why the :name() ?
I don't think that .add_constant takes a :name() parameter.
tadzik I'm creating a Pod::Block, as in github.com/rakudo/rakudo/commit/9d33af 16:41
pmichaud: I fixed that, see the url in the gist
but I didn't fix the cache key creation, it still bases on @values only
and $.name is a child of Pod::Block, so it needs to be serialized before, and then the block is referring to it
pmichaud okay, it makes more sense. Yes, both st entries are ending up with a common key, because it only uses @value in the key. 16:42
tadzik yes, I'm fixing that. How do I listify a hash in nqp somehow? 16:43
16:44 cdarroch joined, cdarroch left, cdarroch joined
pmichaud currently with a for loop. 16:44
tadzik okay
pmichaud I'm planning to make list and hash interpolation into nqp:: primitives, but nyi
16:48 pyrimidine joined
tadzik yes, fixed! 16:48
16:50 birdwindupbird left
tadzik phenny: "uwzględniać"? 16:53
phenny tadzik: "include" (pl to en, translate.google.com)
16:55 MayDaniel joined
dalek kudo/podparser: 6a71d46 | tadzik++ | src/Perl6/SymbolTable.pm:
[SymbolTable] Include the %named parameter signature in the cache key creation
16:57
16:59 mj41 left 17:00 daxim left 17:01 whiteknight left, whiteknight joined 17:02 tokuhirom left, dakkar left 17:05 MayDaniel left 17:07 zby_home joined
moritz_ back online 17:08
17:09 bluescreen10 left
tadzik \o/ 17:10
moritz_ driving for more than an hour with a baby can be quite exhausting :-)
pyrimidine moritz_: try flying with one :) 17:11
tadzik pyrimidine: like, being a pilot? :P
pyrimidine tadzik: that would be even more interesting! Nope, as a passenger 17:12
17:13 noganex left 17:14 noganex joined
[Coke] does not miss the days of travelling with young kids. 17:17
17:19 mj41 joined
moritz_ nom: my $name = "sqrt"; say 2."$name" 17:29
p6eval nom: OUTPUT«Quoted method name requires parenthesized arguments at line 1, near ""␤current instr.: 'nqp;HLL;Grammar;panic' pc 23666 (src/stage2/gen/NQPHLL.pir:6380) (src/stage2/gen/NQPHLL.pm:328)␤»
moritz_ nom: my $name = "sqrt"; say 2."$name"()
p6eval nom: OUTPUT«1.4142135623731␤»
17:30 wamba left, jonn joined
moritz_ nom: say True === True 17:31
p6eval nom: OUTPUT«Bool::True␤»
17:31 Mowah left
moritz_ nom: say (1, 2).list eqv (1, 2).list 17:32
17:32 leprevost joined
p6eval nom: OUTPUT«Bool::True␤» 17:32
moritz_ nom: say (1, 2).list eqv (1, 2.0).list
p6eval nom: OUTPUT«Bool::True␤»
moritz_ :(
[Coke] nom: say 2 eqv 2.0 17:39
p6eval nom: OUTPUT«Bool::False␤»
17:40 Mowah joined 17:42 mj41 left 17:43 saaki left
moritz_ nom: say 0.Bool 17:43
p6eval nom: OUTPUT«Bool::False␤»
moritz_ nom: say 0.5.floor
p6eval nom: OUTPUT«0␤»
17:43 Jackneill left
moritz_ nom: say 0.5.Bool 17:43
p6eval nom: OUTPUT«Bool::True␤»
moritz_ wtf? 17:44
nom: say 0.5.floor.WHAT
p6eval nom: OUTPUT«Num()␤»
moritz_ oh
nom: say 0.0.Bool
p6eval nom: OUTPUT«Bool::True␤»
moritz_ nom: say 0.0e0.Bool
p6eval nom: OUTPUT«Bool::True␤»
flussence nom: say (0.0).Bool
p6eval nom: OUTPUT«Bool::True␤»
benabik 0.0.Bool == True?
flussence False.
pmichaud I'm guessing Num.Bool isn't defined. 17:45
nom: say Num.^methods
p6eval nom: OUTPUT«Num Bridge Int Rat atan2 succ pred isNaN abs exp log sqrt rand ceil floor sin asin cos acos tan atan sec asec sinh cosh tanh sech Str abs sqrt sin cos tan sinh cosh tanh floor ceiling unpolar cis log exp Numeric log log10 exp ACCEPTS bytes chars fmt substr uc lc ucfirst lcfi…
pmichaud nom: say Num.^methods(:local)
p6eval nom: OUTPUT«Num Bridge Int Rat atan2 succ pred isNaN abs exp log sqrt rand ceil floor sin asin cos acos tan atan sec asec sinh cosh tanh sech Str␤»
pmichaud nom: say Real.^methods(:local)
p6eval nom: OUTPUT«abs sqrt sin cos tan sinh cosh tanh floor ceiling unpolar cis log exp␤»
pmichaud nom: say Numeric.^methods(:local)
p6eval nom: OUTPUT«Numeric log log10 exp ACCEPTS␤»
pmichaud Since there's no .Bool method defined, it defaults to 0.0.defined
moritz_ fixes 17:46
I guess it should go into Numeric
pmichaud I know that there's an Int.Bool already
but I'm fine with it going into Numeric
(probably worthwhile to have an Int.Bool that is hotpath-optimized)
moritz_ rakudo: say NaN.Bool
p6eval rakudo 72d158: OUTPUT«Bool::True␤»
moritz_ rakudo: say Inf.Bool 17:47
p6eval rakudo 72d158: OUTPUT«Bool::True␤»
17:47 saaki joined
moritz_ background was that I was just testing my newly Pair.ACCEPTS 17:48
so I needed a a method where the result boolified to false
rakudo: say 0.5 ~~ :sqrt
p6eval rakudo 72d158: OUTPUT«Bool::True␤»
moritz_ rakudo: say 0.5 ~~ :floor
p6eval rakudo 72d158: OUTPUT«Bool::False␤»
moritz_ and that was true in my local tests, and I wondered why... :-) 17:49
fix forthcoming
pmichaud probably need a spectest for Num.Bool, also.
moritz_ might already be in S03-operators/context.t or so 17:50
tadzik gist.github.com/1067867 -- I could use some nqp help
moritz_, pmichaud, could you take a look please? 17:53
moritz_ tadzik: say("produced: ", $cheatpast<compile_time_value>);
tadzik: aren't you more interested in $produced<compile_time_value> here?
erm
$content<compile_time_value> I mean 17:54
tadzik oh, sure
yeah, it produces "bacon bacon" 17:55
so it gets duplicated inside add_constant
moritz_ nom: say Array.new('bacon').perl 17:56
p6eval nom: OUTPUT«Array.new("bacon")␤»
tadzik thanks moritz_
moritz_ nom: say List.new('bacon').perl
p6eval nom: OUTPUT«("bacon",).list␤»
moritz_ might be worth checking $name<compile_time_value> 17:58
tadzik that one's ok. It's just "pod" or "otherpod" 17:59
pmichaud one of the problems with using string keys like this is that we'll end up with collisions.
18:00 cooper left, Chillance left
tadzik I think they're expected, so you can look up identical objects in a cache and create them once 18:06
pmichaud no, I mean collisions for things that are definitely different.
$*ST.add_constant('MyType', 'type_new', :xyz(123)) 18:07
and
$*ST.add_constant('MyType', 'type_new', 'xyz,123;')
the first is a named argument, the second is a positional argument, but they both end up with the same cache key. 18:08
tadzik true
that's the same problems with positionals
'xyz,123' and 'xyz', '123'
pmichaud agreed, that's a problem also.
you can potentially fix it by forcing a string onto each value 18:09
18:09 dual left
pmichaud i.e., positionals become 'p:123' and named becomes n:xyz,123 18:09
18:09 Krunch_ is now known as Krunch
pmichaud then 'xyz,123' ends up being p:xyz,123 while 'xyz', '123' becomes 'p:xyz,p:123'. Still some collisions there, though. 18:10
18:11 jonn is now known as someone_else, someone_else is now known as pyrexkidd
dalek kudo/nom: b20c00f | pmichaud++ | src/core/Cool.pm:
Add Cool.rand.
18:17
kudo/nom: 9e91676 | pmichaud++ | src/core/ (3 files):
Add List.pick, Any.pick, and Range.at_pos.
jnthn home 18:20
phenny jnthn: 06:30Z <moritz_> tell jnthn I was not sure if includiing the sub in the backtrace object might lead to memory leakage somehow - maybe that was overly pessimistic
jnthn: 08:07Z <pmichaud> tell jnthn something about commit 9928a0d causes the REPR to fail on second and subsequent lines with "Can only use nqp_get_sc_for_object with a SixModelObject
jnthn: 08:17Z <pmichaud> tell jnthn I meant REPL, not REPR. (bad commit found using 'git bisect')
18:20 dual joined
tadzik oh, jnthn, just when I tracked the SymbolTable bug :) 18:21
jnthn: how was your flight?
pmichaud jnthn: o/
jnthn pmichaud: Thanks for bisecting the REPL bustage...I had noticed it but didn't get to working it out yet. Unfortunatley, looking over the commit doesn't make the reason jump out either...anyway, will find and fix it soon. 18:23
pmichaud yes, I looked over the commit and couldn't quite figure out why either.
jnthn tadzik: Was fine, just long, but that's nothing unexpected. A bit hot at first, but cooled off after a bit. 18:24
tadzik jnthn: could you look at gist.github.com/1067948 in some spare time?
jnthn tadzik: I'm doubtful that it's 748 18:25
tadzik: oh 18:26
wtf
tadzik yeah, that's what I said
I end up having Array.new("bacon", "bacon")
jnthn Does one say after another exhibit this? 18:27
nom: my $x = Array.new("bacon"); say $x; say $x;
tadzik let me see
p6eval nom: OUTPUT«bacon␤bacon bacon␤»
jnthn er.
tadzik oh crap
jnthn It's not the SC.
It's the array constructor
!!!
tadzik O_O
jnthn nom: my $x = List.new("bacon"); say $x; say $x;
p6eval nom: OUTPUT«bacon␤bacon bacon␤»
pmichaud it's not the constructor. 18:28
jnthn nom: my $x = List.new("bacon"); say $x; say $x; say $x;
p6eval nom: OUTPUT«bacon␤bacon bacon␤bacon bacon␤»
jnthn hm, it does max out on bacon after a while...
pmichaud nom: my $x = List.new('bacon'); say $x.perl; say $x.perl;
p6eval nom: OUTPUT«("bacon",).list.item␤("bacon",).list.item␤»
tadzik ah, I almost thought it'd be perpetuum-beconae
pmichaud nom: my $x = List.new('bacon'); say $x.perl; say $x; say $x.perl;
p6eval nom: OUTPUT«("bacon",).list.item␤bacon␤("bacon",).list.item␤»
pmichaud nom: my $x = List.new('bacon'); say $x.perl; say $x; say $x.perl; say $x;
18:28 cooper joined
p6eval nom: OUTPUT«("bacon",).list.item␤bacon␤("bacon",).list.item␤bacon␤» 18:28
pmichaud nom: my $x = List.new('bacon'); say $x.perl; say $x; say $x; 18:29
p6eval nom: OUTPUT«("bacon",).list.item␤bacon␤bacon␤»
jnthn nom: my @a = 'bacon'; say @a; say @a;
p6eval nom: OUTPUT«bacon␤bacon␤»
pmichaud nom: my $x = List.new('bacon'); say $x; say $x;
p6eval nom: OUTPUT«bacon␤bacon bacon␤»
pmichaud nom: my $x = List.new('bacon'); say $x; say $x; say $x.perl; 18:30
p6eval nom: OUTPUT«bacon␤bacon bacon␤("bacon",).list.item␤»
pmichaud nom: my $x = List.new('bacon'); say ~$x; say ~$x;
p6eval nom: OUTPUT«bacon␤bacon bacon␤»
pmichaud nom: my $x = List.new('bacon'); say $x.Str; say $x.Str;
p6eval nom: OUTPUT«bacon␤bacon bacon␤»
pmichaud nom: my $x = List.new('bacon'); print $x.Str; print $x.Str; 18:31
p6eval nom: OUTPUT«baconbacon bacon»
pmichaud nom: my $x = List.new('bacon'); nqp::print($x.Str); nqp::print($x.Str);
p6eval nom: OUTPUT«baconbacon bacon»
pmichaud nom: my $x = List.new('bacon'); my $y := $x.Str; my $z := $x.Str; say $y, $z
p6eval nom: OUTPUT«baconbacon bacon␤»
pmichaud nom: my $x = List.new('bacon'); my $y := $x.Str; my $z := $x.Str; say $y, $z, $x 18:32
p6eval nom: OUTPUT«baconbacon baconbacon bacon␤»
pmichaud that's just.... weird
tadzik I spent like 2 days on that :)
pmichaud nom: my $x = List.new('bacon'); my $y := $x.Str; my $z := $x.Str; say $x.elems 18:33
p6eval nom: OUTPUT«1␤»
pmichaud I'm suspicious of .join
or maybe .shift 18:34
flussence my poking through the source points to .join too, but I've no idea where .join is actually defined :(
pmichaud nom: my $x = List.new('bacon'); my $y = ($x,).flat.eager
p6eval nom: ( no output )
pmichaud nom: my $x = List.new('bacon'); my $y = ($x,).flat.eager; say $y
p6eval nom: OUTPUT«bacon␤»
pmichaud nom: my $x = List.new('bacon'); my $y = ($x,).flat.eager; say $y.shift; say $y.shift; 18:35
p6eval nom: OUTPUT«bacon␤Element shifted from empty list␤current instr.: 'rethrow' pc 384545 (src/gen/CORE.setting.pir:110053) (src/gen/CORE.setting:3369)␤»
pmichaud nom: my $x = List.new('bacon'); my $y = ($x,).flat.eager; say $y.gimme(0);
p6eval nom: OUTPUT«1␤»
pmichaud (testing locally)
jnthn bbiab, need to sort out a few things now I'm home :) 18:36
18:36 donaldh joined
pmichaud reproduced locally with a new 'join' sub 18:37
so now to investigate
moritz_ nom: say 0i.Bool 18:42
p6eval nom: OUTPUT«Bool::True␤»
moritz_ that's especially weird
tadzik nom: say Complex.^methods(:local)
p6eval nom: OUTPUT«re im new BUILD reals isNaN Real Num Int Rat Complex conjugate abs polar sqrt Bool Str perl log exp␤»
18:42 impious joined
tadzik oh 18:42
moritz_ since it has Bool method 18:43
tadzik nom: say 0i.WHAT
p6eval nom: OUTPUT«Complex()␤»
moritz_ multi method Bool(Complex:D:) {
$!re != 0e0 || $!im != 0e0;
}
tadzik nom: say 0i == 0e0
p6eval nom: OUTPUT«Bool::True␤»
18:43 masak joined
masak goood evening, #perl6. 18:43
tadzik good evening masak
pmichaud nom: say 0e0 != 0e0;
p6eval nom: OUTPUT«Bool::False␤» 18:44
benabik nom: 1i.Bool
p6eval nom: ( no output )
benabik nom: 1i.Bool.say
moritz_ I suspect that somehow .Bool doesn't dispatch the way we want it
p6eval nom: OUTPUT«Bool::True␤»
18:44 mj41 joined, alester joined
pmichaud nom: my num $x = 0; say $x != 0e0 18:44
moritz_ nom: say ().Bool
p6eval nom: OUTPUT«Bool::False␤»
nom: OUTPUT«Bool::True␤»
moritz_ nom: say ().Bool 18:45
p6eval nom: OUTPUT«Bool::True␤»
pmichaud Parcel.Bool probably not defined.
TimToady nom: say Nil.Bool
p6eval nom: OUTPUT«Bool::False␤»
moritz_ nom: say ().list.Bool
p6eval nom: OUTPUT«Bool::False␤»
TimToady probably using Mu's def
18:47 donaldh left
moritz_ adding some debug output to Complex.Bool shows that it's never called on 0i.Bool 18:47
moritz_ guess it's something that jnthn++ needs to take a look at 18:48
pmichaud several of the Bool method defs look like they need to be turned into multis 18:50
but that doesn't appear to explain the Complex.Bool case
moritz_: did you add a Bool def to Cool or Real or Numeric?
TimToady what was the nature of the Bool hack mentioned earlier? 18:51
pmichaud which Bool hack? ;)
TimToady just wonder if something could be rewriting .Bool somewhere 18:52
18:52 am0c joined
masak you're probably thinking of that hack, George Boole :P 18:52
pmichaud the one I did rewrites 'Bool::True' into a constant true object
18:52 cdarroch left
dalek kudo/nom: 1f8fe70 | moritz++ | src/core/Pair.pm:
Pair.ACCEPTS
18:53
kudo/nom: 8aa37ff | moritz++ | src/core/Numeric.pm:
add Numeric.Bool -- but it does not seem to get called at all
18:55 Mowah left
pmichaud yeah, feels like a bug with the multidispatch somewhere. 18:56
18:56 envi left
TimToady does .Type get rewritten to Type()? 18:57
pmichaud no 18:58
TimToady wonders why it's a multi
pmichaud because Complex.Bool is false :-) 18:59
while (1i).Bool is true
TimToady when there's only an
invocant
which single dispatch already finds
pmichaud you're saying we should test definedness in Bool?
i.e., method Bool() { self.defined && ... } 19:00
TimToady no, I'm saying single dispatch would already hand off :U to the parents without the multi
or :A rather :) 19:01
pmichaud right now we have it defined as
(in Complex)
multi method Bool(Complex:D:) { $!re != 0e0 || $!im != 0e0 } 19:02
TimToady I'm just saying 'multi' relies on double dispatch, which we don't need if the first dispatch finds the right proto/only
19:02 mj41 left
pmichaud if we eliminate the multi there 19:02
method Bool(Complex:D:) { $!re != 0e0 || $!im != 0e0 }
won't Complex.Bool fail to dispatch?
TimToady it dispatches to Mu 19:03
where it's false
pmichaud so, "method Bool" doesn't hide other instance of .Bool in the parent classes?
TimToady hmm, one could argue it both ways, but I see what you're saing 19:04
*y
pmichaud which one does the spec expect?
TimToady the invocant is a bit vague when it comes to invocant types 19:05
but I'd say it probably leans toward your interpretation, in the sense that the invocant is just an arg at that point
jnthn Multi method dispatch works like this.
It's a completely normal single dispatch which finds the proto
Which then chooses the appropriate multi candidate. 19:06
pmichaud \o/ jnthn is here to save me :)
jnthn There's no handing off anywhere.
Ever.
masak jnthn! \o/
jnthn Unless you explicitly hand off with nextsame/callsame/etc
TimToady so maybe the proto isn't finding the Bool multi
jnthn That may well be the case.
TimToady rakudo: say 0i.Bool
p6eval rakudo 72d158: OUTPUT«Bool::False␤»
[Coke] rakudo, nom: say "what?"
19:06 Mowah joined
TimToady nom: say 0i.bool 19:06
p6eval nom: OUTPUT«Method 'bool' not found for invocant of class 'Complex'␤current instr.: '_block1002' pc 75 ((file unknown):8310176) (/tmp/wH84jfPVDm:1)␤»
TimToady nom: say 0i.Bool 19:07
p6eval nom: OUTPUT«Bool::True␤»
jnthn nom: say Complex.^mro
p6eval nom: OUTPUT«Complex() Numeric() Cool() Any() Mu()␤»
jnthn Numeric?!
Oh, we had it as a class as a hack rather than a role...
pmichaud shouldn't make a difference here, though. 19:08
jnthn yeah, I was just wondering why a role ended up in the MRO :P
pmichaud I need lunch. I'll figure out the "bacon bacon" bug when I get back. It's a Parcel and/or List bug somewhere.
tadzik \o/ 19:12
jnthn moritz_: OK, need to look deeper at what's going on. I don't see why it'd not call the subclass one... 19:13
masak there's a "bacon bacon" bug? :) 19:15
tadzik yeah. It actually made me abandon all monday's work, for I was sure I was doing something fundamentally wrong 19:16
nom: my $x = Array.new("bacon"); say $x; say $x;
p6eval nom: OUTPUT«bacon␤bacon bacon␤»
[Coke] there is nothing fundamentally wrong with bacon.
flussence it shouldn't be undergoing mitosis though 19:17
tadzik turns out self-replicating bacon isn't as good as you thought it'd be :)
flussence (that means you haven't cooked it enough)
TimToady refrains from making a pun on "long bacon"
nom: my $x = List.new("bacon"); say $x.munch(1); say $x 19:19
p6eval nom: OUTPUT«elements() not implemented in class 'Mu'␤current instr.: 'munch' pc 372520 (src/gen/CORE.setting.pir:104365) (src/gen/CORE.setting:2204)␤»
TimToady nom: my $x = Array.new("bacon"); say $x.shift; say $x 19:20
p6eval nom: OUTPUT«bacon␤␤»
19:20 Holy_Cow joined, Holy_Cow left
TimToady nom: my $x = Array.new("bacon"); say $x; $x.shift; say $x 19:20
p6eval nom: OUTPUT«bacon␤bacon␤»
TimToady hmm 19:21
nom: my $x = Array.new("bacon"); say $x; $x.shift; $x.shift; say $x
p6eval nom: OUTPUT«bacon␤␤»
TimToady nom: my $x = Array.new("bacon"); $x.gist; say $x 19:22
p6eval nom: OUTPUT«bacon bacon␤»
TimToady looks to me like .gist is doing it
jnthn nom: my $x := ['bacon']; say $x; say $x;
p6eval nom: OUTPUT«bacon␤bacon bacon␤»
TimToady except .Str was doing it too
nom: my $x = Array.new("bacon"); $x[0].say; say $x 19:23
p6eval nom: OUTPUT«bacon␤bacon␤»
TimToady nom: my $x = Array.new("bacon"); $x[*].say; say $x
p6eval nom: OUTPUT«bacon␤bacon␤»
TimToady nom: my $x = Array.new("bacon"); say @($x); say $x 19:24
p6eval nom: OUTPUT«bacon␤bacon bacon␤»
19:24 wamba joined
TimToady subscripting seems to suppress it 19:24
nom: my $x = Array.new("bacon"); $x[0]; say $x 19:25
p6eval nom: OUTPUT«bacon␤»
TimToady nom: my $x = Array.new("bacon"); $x[0]; say $x; say $x;
p6eval nom: OUTPUT«bacon␤bacon␤»
TimToady you don't have to say the subscript to suppress it
nom: my $x = Array.new("bacon"); $x.elems; say $x; say $x; 19:27
p6eval nom: OUTPUT«bacon␤bacon␤»
TimToady that works too
almost as if the reified bit was leaking into the planned bit 19:28
or vice versa 19:29
benabik It looks like it depends on how it's getting iterated over.
tadzik funny :)
TimToady nom: my $x = List.new("bacon", "bits"); say $x; say $x; 19:30
p6eval nom: OUTPUT«bacon bits␤bacon bits bacon bits␤»
diakopter someone should write a paper on how interactive mostly-synchronous builds (p6eval) affects the language design process
masak +1 19:31
it affects bug reporting and implementations as well.
diakopter or at least a series of blog entries 19:32
TimToady nom: my $x = List.new("bacon", "bits"); say $x.munch; say $x; 19:33
p6eval nom: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤current instr.: 'munch' pc 372520 (src/gen/CORE.setting.pir:104365) (src/gen/CORE.setting:2204)␤»
TimToady nom: my $x = List.new("bacon", "bits"); say $x.munch(1); say $x;
p6eval nom: OUTPUT«elements() not implemented in class 'Mu'␤current instr.: 'munch' pc 372520 (src/gen/CORE.setting.pir:104365) (src/gen/CORE.setting:2204)␤»
TimToady nom: my $x = List.new("bacon", "bits"); say $x.munch(*); say $x;
p6eval nom: OUTPUT«This type cannot unbox to a native integer␤current instr.: 'munch' pc 372636 (src/gen/CORE.setting.pir:104411) (src/gen/CORE.setting:2214)␤»
benabik .munch doesn't seem to work. 19:34
TimToady rakudo: my $x = List.new("bacon", "bits"); say $x.munch(1); say $x; 19:35
p6eval rakudo 72d158: OUTPUT«bacon␤bits␤»
[Coke] I need a bot I can ask what .munch (e.g.) does. 19:46
colomon rakduo: my @a = 1..10; say ~@a.munch(2); say ~@a
rakudo: my @a = 1..10; say ~@a.munch(2); say ~@a 19:47
p6eval rakudo 72d158: OUTPUT«1 2␤3 4 5 6 7 8 9 10␤»
flussence [Coke]: I imagine one of those will be pretty easy to make once tadzik++ has this Pod stuff working :) 19:49
tadzik dreamworld: say Array.munch.WHY # :) 19:50
[Coke] tadzik++
colomon Sometime while I was out at YAPC::NA, my little boy learned to ask "Why?" 19:55
benabik colomon: Do you just respond with NYI? 19:56
colomon No, in the long tradition of semi-patient parents, I response with an explanation, which of course immediately gets me another "Why?"
moritz_ to which you answer "Mu" 19:58
pmichaud back 20:05
colomon rakudo: say True ?^ True
p6eval rakudo 72d158: OUTPUT«Bool::False␤»
colomon rakudo: say True ?^ True == False
p6eval rakudo 72d158: OUTPUT«Bool::True␤»
pmichaud back from lunch 20:06
colomon ooo, fixed! \o/
dalek ast: 649b3a7 | moritz++ | S (2 files):
start to fudge int.t for rakudo; segfaults after 67 tests
kudo/nom: 3763c60 | pmichaud++ | src/core/Any.pm:
Add sub pick().
20:08
jnthn Can somebody pop that Bool multi-dispatch thing in nommap? I'm just too tired after the flight to dare touch any code tonight :)
moritz_ jnthn: will do 20:09
tadzik oh, that's my call! My first Rakudo patch was optimizing Range.pick :)
20:09 mattp_ joined
dalek ast: faefe72 | moritz++ | S32-num/power.t:
fudge power.t for rakudo
20:10
moritz_ nom: say List.Bool 20:11
p6eval nom: OUTPUT«Cannot access attributes in a type object␤current instr.: 'gimme' pc 371914 (src/gen/CORE.setting.pir:104169) (src/gen/CORE.setting:2175)␤»
moritz_ ah, that's why ().list.Bool works - it's not a multi
pmichaud right. 20:12
for now you could define Complex.Bool() as (non-multi) { self.defined && ( $!re || $!im ) } 20:13
TimToady except that doesn't return a Bool... 20:14
but I'm sure moritz++ can locate a 'so' or so to throw in there 20:15
pmichaud change to ?| then :-) 20:16
or a 'so'
found the double-bacon bug 20:17
tadzik yes!
benabik double-bacon is never a bug.
tadzik benabik: it was my blocker for 2 gsoc days :) 20:18
colomon benabik++
pmichaud depends on the state of one's arteries.
TimToady waits for pmichaud to bring home the bacon 20:19
colomon apparently tadzik's arteries have had issues
tadzik well, I hope that bug is my bug. It may be only the beginning :) 20:20
if it is, I may start passing 01-delimited.t in nom quite soon
masak TimToady: to put food on his family? :) 20:24
pmichaud surprisingly, bacon is one of those foods that gives me headaches when I eat it :) 20:25
20:26 impious left
tadzik :) 20:27
20:29 Bzek left 20:30 ab5tract joined
tadzik seems that nom can run Acme::Meow :) 20:31
20:33 wolfman2000 left
dalek osystem: 1b30f90 | tadzik++ | / (4 files):
Remove ingy++'s modules from the SHELTER, they have their META.infos now
20:36
everbrew $tadzik->pet(); 20:37
20:38 am0c left
tadzik "purr" 20:38
flussence
.oO( $tadzik->pet(); $tadzik->pet(); # "purr bacon" )
20:42
benabik flussence++
dalek ast: 1b0fdc4 | pmichaud++ | S02-builtin_data_types/lists.t:
regression test for nom's duplicate-reification bug ("bacon bacon").
20:44
pmichaud > my $x = List.new('bacon'); say $x; say $x; 20:45
bacon
dalek kudo/nom: 9209833 | moritz++ | t/spectest.data:
four more passing test files
20:46
kudo/nom: 537ad6b | moritz++ | NOMMAP.markdown:
note MMD failure in NOMMAP
jnthn pmichaud++ # and looking forward to seeing the patch :) 20:47
pmichaud it was a case of double-reification
pushed. 20:48
dalek kudo/nom: 45465fa | pmichaud++ | src/core/List (2 files):
Fix handling of $!nextiter in lists when a third-party triggers reification.

duplicate the elements of the List.
tadzik now let's see if it fixes my problems :) 20:50
moritz_ tadzik++ # finding bugs
tadzik funny that I had to reach so deep into the guts to see that in action 20:51
masak .oO( reach deep into the guts to fix the "bacon problem"... ) 20:52
tadzik pmichaud++ # thank you
masak: that may be even funnier without the quotation marks :)
masak tadzik: :) 20:53
pmichaud tadzik: you're welcome, and apologies that the bug cost you a lot of hours. But I'm really glad you found it and were able to golf it down so well. tadzik++
made my job a lot easier :)
masak tadzik++, our new Tiger Woods! \o/
tadzik now I have a tough time removing dozens of say()s all around nom :P 20:54
moritz_ that's why most editors have a "search" function
tadzik vim++
moritz_ in vim you just hit * when you're on one say()
then dd
then n
then dd 20:55
etc. :-)
masak that's why git has 'git checkout'.
tadzik I commented the say()s, Justin Case :)
but I strongly hope everything will be fine now
pmichaud oh, NQP is about to have a new debugging facility built-in.
masak I'm never that merciful to debug output.
tadzik masak: I may need that again :(
pmichaud nqp::event(code, str) # sends a debug message if debugging enabled, no-op otherwise
masak if I have to add it more than twice, it probably means I need a more permanent mechanism for debugging anyway. 20:56
tadzik why 'event'?
pmichaud it's for logging multiple types of events, not just debugging :)
tadzik masak: you didn't have to cope with doubled bacon, so shh! :P
jnthn pmichaud: That's what we can build profiler on too?
pmichaud and "log" might mean "logarithm"
masak tadzik: :P
pmichaud jnthn: yes, it's the same stuff as the call profiler
jnthn pmichaud: nice
pmichaud note that if str is more than a constant, though, you pay the cost of constructing the str :) 20:57
masak tadzik: yeah, let's compare rakudobug war stories, see who wins... :P
tadzik yyyes!
pmichaud i.e.: nqp::event(code, $foo ~ $bar ~ $baz); # still does the concatenation :(
I might clean that up a bit at some point... but it's definitely intended to be low-level-ish and not macro-ish at the moment. 20:58
tadzik masak: okay, okay ;)
masak thought so
;)
dalek kudo/nom: 5327931 | moritz++ | t/spectest.data:
another passing integration test
20:59
20:59 tokuhirom joined
jnthn wonders how many tests we're up to now 20:59
moritz_ tadzik: you didn't have to deal with the "recursion and for-loops interact badly" bug that haunted masak++ to no end :-)
TimToady nom: note 'note'
p6eval nom: OUTPUT«note␤»
masak moritz_: do you remember the RT ticket number by heart? :)
pmichaud
.oO(should've been 'do re mi')
moritz_ masak: no
masak moritz_: I think it was 78392.
moritz_ jnthn: about 4.3k last I spectested... might be about 4.5k now
pmichaud masak has finally expunged that number from his memory... like a bad dream. 21:00
tadzik moritz_: sounds terrifying
jnthn masak: You'll be happy to know that man-or-boy already passes in nom :)
moritz_ checks RT #78392
masak apparently I remember it wrong.
tadzik prepares the showoff
masak jnthn: yay!
tadzik da-da-dam!
jnthn moritz_: Wow. Awesome progress 21:01
tadzik $POD showoff: gist.github.com/1064604
jnthn tadzik++ 21:02
moritz_ tadzik++ indeed
jnthn tadzik: And just to check...does it work if you --target=pir the file?
tadzik "from now on, everything should be easy"
moritz_ tadzik: I think it woudl make sense to make that s:g/Array/List/
jnthn And run the output PIR?
tadzik -- famous last words
let's see indeed
masak moritz_: it was rt.perl.org/rt3/Ticket/Display.html?id=58392
moritz_ btw last I looked, nom didn't have @*ARGS
masak that old!
tadzik jnthn: parrot foo.pir gives me "Contextual $*ST not found" 21:03
pmichaud nom doesn't have @*ARGS yet, no.
I need to refactor HLL::Compiler a bit for that.
moritz_ masak: but you remembered all but the first digit correctly
tadzik moritz_: which one?
jnthn tadzik: er, ouch.
moritz_ tadzik: IMHO Pod blocks should contain lists, not arrays
jnthn tadzik: Leave that one with me.
moritz_ jnthn: seems to be a general nom problem
tadzik jnthn: roger
21:04 mj41 joined
jnthn moritz_: grr. We need a regression test for pre-comp really... 21:05
masak moritz_: yes :) it has a certain nice rythm to it, ever since you shouted it out your window :P
21:05 wubo` joined, wubo left
tadzik nom: my $a = List.new([1, 2], [3, 4]); say $a.perl 21:05
p6eval nom: OUTPUT«([1, 2], [3, 4]).list.item␤»
moritz_ jnthn: maybe I can get to that tomorrow
moritz_ notices that reading rt.perl.org/rt3/Ticket/Display.html?id=58392 doesn't properly reflect the pain associated with that issue, and with fixing it 21:06
tadzik moritz_: someone should maybe write a tale to scare children 21:07
moritz_ tadzik: I'd be surprised if that tale wasn't in masak's old blog posts somewhere 21:08
masak tadzik: you jest, sir. I should have you go back and read the logs from that time. the horrors! :P
moritz_ only do that after GSOC finishes :-) 21:09
masak tadzik: imagine not being able to trust the veracity of the compiler you're running. and we were writing web software!
21:11 kaare_ left
masak could easily imagine himself telling scary lexical bug stories to little children 21:11
[Coke] moritz_++ # never knew about * in vi before.
pmichaud "Listen my children for a tale that's true / about the pain of 5 8 3 9 2..."
masak *lol*
pmichaud++
moritz_ [Coke]: and # is the same but searching backwards 21:12
pmichaud++ indeed
masak pmichaud: reminds me of the limerick prime, 2077311001024001207 21:13
(two last comments on www.johndcook.com/blog/2011/03/08/l...ck-primes/ )
dalek kudo/podparser: b20c00f | pmichaud++ | src/core/Cool.pm:
Add Cool.rand.
21:14
kudo/podparser: 9e91676 | pmichaud++ | src/core/ (3 files):
Add List.pick, Any.pick, and Range.at_pos.
kudo/podparser: 1f8fe70 | moritz++ | src/core/Pair.pm:
Pair.ACCEPTS
kudo/podparser: 8aa37ff | moritz++ | src/core/Numeric.pm:
add Numeric.Bool -- but it does not seem to get called at all
kudo/podparser: 3763c60 | pmichaud++ | src/core/Any.pm:
Add sub pick().
kudo/podparser: 9209833 | moritz++ | t/spectest.data:
four more passing test files
kudo/podparser: 537ad6b | moritz++ | NOMMAP.markdown:
note MMD failure in NOMMAP
kudo/podparser: 45465fa | pmichaud++ | src/core/List (2 files):
Fix handling of $!nextiter in lists when a third-party triggers reification.

duplicate the elements of the List.
kudo/podparser: 2780997 | tadzik++ | / (10 files):
Merge branch 'nom' into podparser
kudo/podparser: 728d0f8 | tadzik++ | src/Perl6/ (3 files):
Construct Pod blocks from delimited blocks, use Lists instead of Arrays per moritz++'s suggestion
21:14 am0c^ joined
BinGOs dalek attack! 21:14
masak "Merge branch 'nom' into podparser"? podparser runs on nom now? 21:15
pmichaud other way 'round
podparser merged in the latest nom commits
masak right, I meant that.
tadzik masak: yeah, that's kinda the point :)
masak wow, I'm really not keeping up :)
"carry on, lads."
:P 21:16
tadzik masak: I actually tried to serialize pod nodes in master, that was... inspiring
masak oh?
tadzik it was basically the same stuff: constructing the PAST nodes which would be constructing the pod nodes
pmichaud where "inspiring" should mean "motivating to switch to 'nom' instead" :-P
tadzik truly :)
jnthn Well, master kinda lacks an easy way to share stuff build at compile time with runtime 21:17
Your only choice is to always build the stuff at runtime in master
moritz_ in master you'd have to build the whole PAST thing yourself, and not have it available at compile time
tadzik well, if you look closely enough, nom builds stuff in runtime too 21:18
moritz_ right
pmichaud NO PEEKING!
moritz_ but it's hidden behind a nice-ish API
jnthn It does fixups
Note the PAST that you make for deserialization does not apply unless you're doing pre-compilation.
moritz_ which means that once we have "real" serialization, it can stop do that stuff at run time
pmichaud fixups will always be needed. That's the price of dynamic linking.
jnthn Right.
But if you compile and run code straight away, the Perl 6 Array you built up at compile time really will be the same one that is used at runtime. 21:19
21:19 Mowah left
masak \o/ 21:19
jnthn All that'll happen when we get real serialization is all that deserialization PAST we build will go away.
21:20 Mowah joined
jnthn In favor of a chunk of a serializer. 21:20
Which somebody needs to design and implement after nom is landed and in shape :)
[Coke] ponders rewriting partcl on perl6/nom instead of nqp.
pmichaud [Coke]: not a bad idea, that.
it will help when nom has grammars and regexes, though :) 21:21
(expected sometime in the next few days)
jnthn fwiw, the serialization stuff will live in NQP
It'll be fairly intimately related to 6model
masak what did circumfix:«< >» mean before it meant "quote words"?
jnthn Or may just go in the core
moritz_ masak: not-so-smart quote words 21:22
jnthn is gradually working out what he wants there :)
moritz_ thinks that serializing a Complex shouldn't be all that complex :-)
jnthn OK, conciousness is getting too hard, and it's a sensible sleep time.
masak jnthn: sleep well.
jnthn: see you tomorrow, ready for hacking!
jnthn masak: I should, after however many hours awake ;)
I, er, wait, what? :) 21:23
masak :D
masak waves the magic sleeping wand over jnthn
tadzik nqp: say(subst("foo", /o/, 'b')) 21:25
p6eval nqp: OUTPUT«fbo␤»
21:25 jevin left
moritz_ feels the results many hundreds of kilometers away, and also fades to sleep 21:25
tadzik moritz_: sleep tight 21:26
dalek ast: 9251fc3 | pmichaud++ | S02-builtin_data_types/range.t:
Fudge out Range.from and Range.to tests... do we still need .from/.to ?
21:27
pmichaud We're now at 4,506 spectests. 21:30
tadzik woosh!
dalek kudo/nom: bd3df2f | pmichaud++ | src/core/ (2 files):
Add List.roll, Any.roll, &roll and &join.
kudo/nom: a4a40c0 | pmichaud++ | src/ (2 files):
Make Range smart enough to return Int instead of Num, add temporary opcode
kudo/nom: 91f014c | pmichaud++ | t/spectest.data:
Add S02-builtin_data_types/range.t .
masak I... I'm feeling the effects of the sleeping wand too. I think I should heed it.
no edublog post tonight, I'm afraid. still need to hack a bit more on "crypt", the text adventure game. 21:31
'night, #perl6 21:32
tadzik oh, I must now think of some clever way to test these pod things
'night masak
21:32 masak left 21:34 wubo` left 21:43 amkrankruleuen left 21:44 Patterner left 21:45 amkrankruleuen joined 21:48 Psyche^ joined, Psyche^ is now known as Patterner 21:49 mj41 left
tadzik nqp: my @a; my @b; @b.push(5); @b.push(7); @a.push(@b); say(@a[0]); 21:51
p6eval nqp: OUTPUT«2␤»
tadzik is there any way to make it flatten, in nqp?
oh, |@b. Nevermind :)
nqp: my @a; my @b; @b.push(5); @b.push(7); @a.push(|@b); say(@a[0]);
pmichaud actually, I bet that doesn't work.
p6eval nqp: OUTPUT«too many positional arguments: 3 passed, 2 expected␤current instr.: '_block1000' pc 115 ((file unknown):65) (/tmp/z_jy44a0gG:1)␤»
tadzik oh, no
pmichaud the .push method comes from Parrot's ResizablePMCArray
and it only knows how to push one thing.
but you can splice 21:52
tadzik can I flatten an array in nqp?
pmichaud nqp::splice(@a, @b, nqp::elems(@a), 0)
adds the contents of @b to the end of @a
tadzik at the moment of pushing I don't know whether I push an array or something else
pmichaud nqp doesn't know anything about "flattening"
tadzik damn
21:54 neaer left
pmichaud if you want to flatten something (and |@flat won't do it), then you have to flatten it yourself. 21:55
21:55 wamba left
tadzik I made a dirty if "pir::isa($_.ast, 'ResizablePMCArray')" trick 21:57
pmichaud that works.
well, it maybe works.
normall $_.ast is a PAST node.
*normally
(depending on what you're storing there) 21:58
tadzik in this case it's either a PAST node, or an array of those
mikemol Someone a little more authorative than myself might want to step in here: rosettacode.org/wiki/Talk:Unicode_variable_names 21:59
21:59 am0c^ left 22:01 Mowah left
dalek kudo/nom: 8d597c2 | pmichaud++ | / (3 files):
Add infix:<=:=>, a major cheat for Parcel.Capture(), and three more spectest files.
22:02
tadzik nom: class A {}; class B is A {}; use Test; my $a = B.new; isa_ok $a, A, 'foo'; 22:03
p6eval nom: OUTPUT«not ok 1 - foo␤Use of uninitialized value in string context␤# Actual type: ␤»
tadzik am I missing something? 22:04
22:05 huf_ is now known as huf
pmichaud mikemol: I added a note. 22:06
mikemol ty 22:07
tadzik pmichaud: could you look at my doubt above? 22:09
pmichaud tadzik: I don't see what you're missing, no.
tadzik ok, thanks 22:10
pmichaud nom: my class A {}; my class B is A {}; use Test; my $a = B.new; say $a.WHAT; isa_ok $a, A, 'foo';
p6eval nom: OUTPUT«B()␤not ok 1 - foo␤Use of uninitialized value in string context␤# Actual type: ␤»
pmichaud nom: my class A {}; my class B is A {}; use Test; my $a = B.new; say $a.WHAT; isa_ok $a, B, 'foo';
p6eval nom: OUTPUT«B()␤ok 1 - foo␤»
pmichaud nom: my class A {}; my class B is A {}; use Test; my $a = B.new; say $a.WHAT; isa_ok B, A, 'foo';
p6eval nom: OUTPUT«B()␤not ok 1 - foo␤Use of uninitialized value in string context␤# Actual type: ␤»
pmichaud nom: my class A {}; my class B is A {}; use Test; my $a = B.new; say A; isa_ok B, A, 'foo';
p6eval nom: OUTPUT«A()␤not ok 1 - foo␤Use of uninitialized value in string context␤# Actual type: ␤»
pmichaud nom: my class A {}; my class B is A {}; use Test; my $a = B.new; say A; isa_ok A, A, 'foo';
p6eval nom: OUTPUT«A()␤ok 1 - foo␤»
pmichaud maybe a bug with isa_ok 22:11
tadzik seems so, yes
pmichaud perhaps a decontainerization problem
tadzik nom: class A {}; class B is A {}; my $a = B.new; say $a.isa(B)
p6eval nom: OUTPUT«Bool::True␤»
tadzik hrm
pmichaud nom: class A {}; class B is A {}; my $a = B.new; say $a.isa(A); 22:12
p6eval nom: OUTPUT«Bool::False␤»
pmichaud nom: class A {}; class B is A {}; say nqp::p6bool(B.HOW.isa(B, A)); 22:16
p6eval nom: OUTPUT«Bool::False␤»
pmichaud ...that looks like the fundamental problem.
tadzik it's the second one today :)
pmichaud nom: class A {}; class B is A {}; nqp::say(B.HOW.isa(B, A));
p6eval nom: OUTPUT«0␤»
22:21 dorlamm joined
dalek kudo/podparser: 46bcffa | tadzik++ | src/Perl6/Actions.pm:
Handle paragraphs properly
22:23
kudo/podparser: 959cd2b | tadzik++ | t/pod/01-delimited.t:
Add first Pod tests, not all of them yet, just those working
tadzik another small milestone: pod tests :)
22:25 everbrew left 22:27 thou joined
colomon tadzik++ 22:28
tadzik and I discovered how to lean back in my chair \o/ Great day, after all the tough moments :) 22:31
22:34 ZaphrodZenovka left 22:36 drbean joined
lichtkind thou: around? 22:38
22:39 ZaphrodZenovka joined
thou hi, lichtkind 22:41
tadzik could someone build the podparser branch and see if anything breaks horribly? 22:43
loliblug: ttjjss.wordpress.com/2011/07/07/gso...e-results/ 22:46
lichtkind thou: or i come better tomorrow :) ? 22:49
22:51 ssotka joined 23:01 alester left 23:02 dorlamm left
dalek kudo/podparser: c26b9d5 | tadzik++ | src/Perl6/ (2 files):
Get back to using Arrays instead of Lists. Lists generate some weird Null PMC Access errors
23:19
23:28 orafu left 23:29 orafu joined
lue LHF.markdown talks about an .ords method, but I don't seem to find it in the specs. 23:37
flussence S29:312 23:38
23:39 soh_cah_toa joined
lue thanks. 23:40
23:55 molaf__ joined, Limbic_Region joined 23:56 ab5tract left 23:58 molaf_ left