Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-09-01

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 clkaoud_ joined #perl6
00:01 xfix_ joined #perl6
00:01 isacloud_____ joined #perl6
00:01 grondilu I won't put it in the ecosystem because it is awefully slow right now, but here is what I've been trying to do today:  https://github.com/grondilu/clifford  (geometric algebra in Perl 6)
00:02 Rounin_ joined #perl6
00:02 haroldwu_ joined #perl6
00:02 moritz_ joined #perl6
00:02 japhb_ joined #perl6
00:02 nwc10_ joined #perl6
00:02 hoelzro_ joined #perl6
00:02 rhr joined #perl6
00:02 sjn_ joined #perl6
00:02 ashleydev joined #perl6
00:03 BinGOs_ joined #perl6
00:03 integral joined #perl6
00:03 mst_ joined #perl6
00:03 integral joined #perl6
00:03 sivoais_ joined #perl6
00:05 djanatyn1 joined #perl6
00:06 nbrown__ joined #perl6
00:06 BinGOs joined #perl6
00:08 bjz joined #perl6
00:09 geekosaur joined #perl6
00:09 Alina-malina joined #perl6
00:10 raiph joined #perl6
00:17 nbrown__ joined #perl6
00:30 nbrown__ joined #perl6
00:36 nbrown__ joined #perl6
00:38 araujo joined #perl6
00:42 nbrown__ joined #perl6
00:45 avuserow joined #perl6
00:53 galledallegator joined #perl6
00:56 nbrown__ joined #perl6
01:06 FROGGS_ joined #perl6
01:08 ivan`` joined #perl6
01:19 rindolf joined #perl6
01:21 araujo joined #perl6
01:23 ivan`` joined #perl6
01:23 nbrown__ joined #perl6
01:23 colomon hmmm, no, openssl does have a Build.pm
01:29 dayangkun joined #perl6
01:30 PZt joined #perl6
01:45 Sqirrel joined #perl6
01:46 colomon Ah, I think the problem is that changing %*ENV<PERL6LIB> doesn't change @*INC in the currently running process.
01:53 colomon got it!
02:03 erkan joined #perl6
02:03 erkan joined #perl6
02:08 colomon now just need to figure out how to clean up an older git commit so I can push my fix to emmentaler.
02:09 TimToady m:  my $p1 = (my $x = 42,1); my $p2 = (my $y = 42,1); say $p1 === $p2; say VAR($x).WHICH; say VAR($y).WHICH
02:09 camelia rakudo-moar ebccb2: OUTPUT«True␤Int|47556464␤Int|47556464␤»
02:09 TimToady this is incorrect, since $x and $y are supposed to be different variables
02:10 TimToady why VAR is not giving different WHICHes is perhaps the root of the problem; these are different objects
02:10 TimToady lizmat: ^^
02:11 TimToady in any case, the expression should be False, not true, since the identity of a container is its "location"
02:12 TimToady m: my $x = 42; my $y = 43; say VAR($x).WHICH; say VAR($y).WHICH
02:12 camelia rakudo-moar ebccb2: OUTPUT«Int|55125480␤Int|55125560␤»
02:13 TimToady m: my $x = 42; my $y = 42; say VAR($x).WHICH; say VAR($y).WHICH
02:13 camelia rakudo-moar ebccb2: OUTPUT«Int|60179944␤Int|60179944␤»
02:13 TimToady yes, that's bogus
02:16 chenryn joined #perl6
02:24 aborazmeh joined #perl6
02:26 TimToady m:  my $p1 := (my $x = 42,1); my $p2 := (my $y = 42,1); say $p1 === $p2;
02:26 camelia rakudo-moar ebccb2: OUTPUT«True␤»
02:27 TimToady m:  my $p1 := (my $x = 42,1); my $p2 := (my $y = 42,1); say $p1 === $p2; say $p1.WHICH; say $p2.WHICH
02:27 camelia rakudo-moar ebccb2: OUTPUT«True␤Parcel|(47195968)(Int|1)␤Parcel|(47195968)(Int|1)␤»
02:28 TimToady the problem seems to be tha that variables are dereffing on WHICH when they shouldn't
02:28 TimToady so it's ending up with the location of 42, or some such
02:29 TimToady rather than the location of the variable
02:32 noganex_ joined #perl6
02:35 TimToady m: my $x; say VAR($x).WHICH
02:35 camelia rakudo-moar ebccb2: OUTPUT«Any|17527800␤»
02:35 TimToady the type of the variable should be Scalar
02:35 TimToady m: my $x; say VAR($x).WHAT
02:35 camelia rakudo-moar ebccb2: OUTPUT«(Scalar)␤»
02:36 TimToady WHAT has it right, it's WHICH that is dereffing wrongly
02:43 xenoterracide joined #perl6
02:44 dalek emmentaler: 4fe033f | (Solomon Foster)++ | smoker:
02:44 dalek emmentaler: Make exception handling more robust.
02:44 dalek emmentaler: review: https://github.com/tadzik/emmentaler/commit/4fe033fad0
02:44 dalek emmentaler: a5eb593 | (Solomon Foster)++ | smoker:
02:44 dalek emmentaler: Custom Build.pm modules need path.
02:44 dalek emmentaler: review: https://github.com/tadzik/emmentaler/commit/a5eb593bbf
03:04 pyrimidine joined #perl6
03:05 pyrimidine any reason that unbase only takes a Str?  Seems odd
03:05 pyrimidine m: :4(0123)
03:05 camelia rakudo-moar ebccb2: OUTPUT«Potential difficulties:â�¤    Leading 0 does not indicate octal in Perl 6; please use 0o123 if you mean thatâ�¤    at /tmp/0pZ67KXJXx:1â�¤    ------> [32m:4(0123[33mâ��[31m)[0mâ�¤Type check failed in binding $str; expected 'Str' but got 'Int'â�¤  in su…»
03:05 pyrimidine m: :4(‘0123’)
03:05 camelia rakudo-moar ebccb2: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/YXrCp1RM1yâ�¤Bogus statementâ�¤at /tmp/YXrCp1RM1y:1â�¤------> [32m:4([33mâ��[31m‘0123’)[0mâ�¤    expecting any of:â�¤        lol composerâ�¤        prefix or termâ�¤        prefix or meta-pr…»
03:06 TimToady because :4(123) makes no sense
03:06 TimToady and you've got smartquotes on
03:06 pyrimidine ah
03:07 TimToady it's not so apparent there, but what about :16(deadbeef)?
03:09 pyrimidine where is unbase specced?
03:10 TimToady S02:3375
03:10 synopsebot Link: http://perlcabal.org/syn/S02.html#line_3375
03:17 pyrimidine I think I need to re-read that spec :)
03:19 raiph joined #perl6
03:21 TimToady I think I need to rewrite it :)
03:23 ingy TimToady: Perl?
03:24 * ingy hasn't read the scrollback :)
03:24 ingy "I think I need to rewrite it :)" — Larry Wall
03:25 TimToady '"I think I need to rewrite it :)" — Larry Wall' -- Ingy Döt Net
03:25 ingy "I think I need to make a language that can rewrite it!" — Ingy döt Net
03:26 TimToady s/D/d/
03:26 ingy don't shout that 'd' man...
03:26 ingy b00m!
03:26 TimToady I unshouted it first
03:26 ingy JYNX
03:28 * ingy is camping out at a Perl monger's house in SLC this week. I guess I wouldn't be here sans TimToady. :)
03:28 ingy thanks!!
03:29 TimToady trying to get a jump on YAPC::NA 2015?
03:29 ingy aye!
03:29 TimToady yer a little early for the hackathon...
03:29 ingy well Perl 7 might take that long ;)
03:32 TimToady .oO(There is no Perl 7, and Ingy is not its prophet.)
03:34 ingy .oO(A prophet is not without honor except in his HOME directory.)
04:01 kaare_ joined #perl6
04:14 akaseki joined #perl6
04:16 sivoais joined #perl6
04:18 Salai joined #perl6
04:20 akaseki joined #perl6
04:23 JL235 joined #perl6
04:25 Salai joined #perl6
04:29 cooper joined #perl6
04:29 cooper joined #perl6
04:33 akaseki joined #perl6
04:41 akaseki joined #perl6
05:10 chenryn joined #perl6
05:18 kaare_ joined #perl6
05:22 SamuraiJack joined #perl6
05:27 ecocode joined #perl6
05:36 kaleem joined #perl6
05:40 Zhi joined #perl6
05:45 Akagi201 joined #perl6
06:01 ecocode joined #perl6
06:01 mj41_nb joined #perl6
06:06 gfldex joined #perl6
06:16 denis_boyun joined #perl6
06:22 cognome r:   ' { a b c } } ' ~~ m/ $<block> = [ '{' ~ '}' [ .+? <before '}'>  ]  ] /; say $<block>;
06:23 camelia rakudo-jvm ebccb2: OUTPUT«(timeout)»
06:23 camelia ..rakudo-{parrot,moar} ebccb2: OUTPUT«「{ a b c }」␤␤»
06:23 cognome I thought the <before '}'>   would be implicit with the '{' ~ '}'
06:24 cognome r:   ' { a b c } } ' ~~ m/ $<block> = '{' ~ '}' [ .+? <before '}'>    ] /; say $<block>;
06:24 camelia rakudo-{parrot,jvm,moar} ebccb2: OUTPUT«「{」␤␤»
06:24 cognome Also I thought the capture would include the whole span
06:25 cognome r:   ' { a b c } } ' ~~ m/ $<block> = [ '{' ] ~ '}' [ .+? <before '}'>    ] /; say $<block>;
06:25 camelia rakudo-{parrot,jvm,moar} ebccb2: OUTPUT«「{」␤␤»
06:25 sergot hi o/
06:25 cognome And if I has wanted the opening construct, I would have explicetely grouped it.
06:26 TimToady = only works on atoms, and ~ does not create an atom
06:26 cognome I think one can go either way for both but that should be said
06:28 cognome Well '{' ~ '}' ... creates something pretty tight,  I could have construed that as an atom :)
06:28 chenryn joined #perl6
06:29 cognome People are usually interested on the whole thing, not the opening construct :)
06:29 TimToady it expresses the relationship of 3 atoms, and it's not really a pattern matcher but shorthand for an error check
06:29 TimToady the purpose of it is to panic if you don't end up at }
06:30 TimToady you can't simultaneously do that and also have it participate in backtracking
06:30 cognome Well, I find it so  convenient that I wanted to do more than it does :)
06:30 TimToady well, but we can't define it to do contradictory things, alas :)
06:31 cognome Anyway, the "work around" were easy enough.
06:35 cognome TimToady++ for the feedback
06:37 darutoko joined #perl6
06:38 [Sno] joined #perl6
06:43 dayangkun joined #perl6
06:48 mr-foobar joined #perl6
06:49 chenryn joined #perl6
06:58 zakharyas joined #perl6
07:11 danaj In rakudo from github, if I modify a file in nqp/MoarVM/src/..., what is the best way to get it incorporated into perl6-m at the top level?  Even if I do make in nqp/MoarVM and nqp, I can't seem to get perl6 to include it.
07:12 TimToady you have to do make install in MoarVM
07:12 TimToady and in nqp if you changed anything there
07:12 danaj tyvm, that's what I was missing.
07:20 domidumont joined #perl6
07:22 moritz_ \o
07:25 fhelmberger joined #perl6
07:34 FROGGS o/
07:35 dalek Inline-Perl5: 6bc9619 | nine++ | README.md:
07:35 dalek Inline-Perl5: Fix typo in README.md
07:35 dalek Inline-Perl5:
07:35 dalek Inline-Perl5: s/Inline::Perl6/Inline::Perl5/
07:35 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/6bc9619659
07:36 bjz joined #perl6
08:00 xinming joined #perl6
08:10 nine FROGGS: I just realized that v5 might become the basis of a P5->P6 translator...
08:11 FROGGS nine: when we can generate P6 code from AST, perhaps yes
08:13 nwc10 I'm not sure how useful a translator is, in the general case. Even if it gets to 100% of the syntax (which it can't) it won't cover semantics of the Perl 5 runtime that poke through
08:13 nwc10 Python's 2to3 didn't exactly help set the world on fire.
08:13 nwc10 so I don't think it's useful as a primary goal.
08:14 nwc10 other people's opinions may vary, and please don't let me stop anyone having fun trying things.
08:14 nine nwc10: not as a primary goal, no. 2to3 failed because one would have to use it on the entire code base including all used libraries to make the transition.
08:15 nine But being able to migrate an application one piece at a time and being able to start with an automatic direct translation might help a lot.
08:16 nwc10 might. I'm still of the opinion that rewriting of working code from Perl 5 to Perl 6 is unlikely.
08:16 nwc10 it's subsystem rewrites that we need to "capture"
08:16 nwc10 which is why Inline::Perl5 is awesome
08:17 nwc10 but, I repeat, these are my opinions.
08:19 nine Nobody's gonna rewrite working code just for the sake of it. Especially when with v5 we'll be able to execute P5 code faster. But if I have to do substantial changes to existing code anyway, I'll want to port it to Perl 6 first to be able to use the new features. That's when a translator might come in handy.
08:19 nine Even if it doesn't produce 100 % working code.
08:20 telex joined #perl6
08:20 dakkar joined #perl6
08:20 nine That's how we got rid of 1000s of lines of Python code anyway. There's still ~ 5000 LOC left, but it used to be twice that.
08:33 kjs_ joined #perl6
08:49 brrt joined #perl6
08:49 domidumont joined #perl6
08:51 mr-foobar joined #perl6
08:56 jerrycheung joined #perl6
09:03 kjs_ joined #perl6
09:05 brrt left #perl6
09:13 dalek rakudo/nom: fc79953 | (Elizabeth Mattijsen)++ | src/core/Scalar.pm:
09:13 dalek rakudo/nom: Fix $.VAR.WHICH
09:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fc79953485
09:31 dalek rakudo/nom: 329adf8 | (Elizabeth Mattijsen)++ | src/core/Scalar.pm:
09:31 dalek rakudo/nom: Properly fix $.VAR.WHICH
09:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/329adf8c23
09:31 dalek rakudo/nom: 4a6dbf5 | (Elizabeth Mattijsen)++ | src/core/Parcel.pm:
09:31 dalek rakudo/nom: Fix Parcel.WHICH, as reported by TimToady++
09:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4a6dbf5bc6
09:37 daxim joined #perl6
09:40 dalek roast: 993eb27 | (Elizabeth Mattijsen)++ | integration/advent2013-day07.t:
09:40 dalek roast: Fix <a b c> === <a b c> test, with explanation
09:40 dalek roast: review: https://github.com/perl6/roast/commit/993eb27391
09:42 donaldh joined #perl6
09:44 dalek roast: 33818a0 | (Elizabeth Mattijsen)++ | integration/advent2013-day07.t:
09:44 dalek roast: Add some descriptions
09:44 dalek roast: review: https://github.com/perl6/roast/commit/33818a0d71
09:45 spider-mario joined #perl6
09:48 domidumont joined #perl6
09:48 dalek roast: 5dfd323 | (Elizabeth Mattijsen)++ | S02-literals/quoting.t:
09:48 dalek roast: Unfudge now passing test
09:48 dalek roast: review: https://github.com/perl6/roast/commit/5dfd3233f2
09:52 xfix joined #perl6
09:53 mr-foobar joined #perl6
09:54 moritz m: say <a b c>.WHICH
09:54 camelia rakudo-moar ebccb2: OUTPUT«Parcel|(Str|a)(Str|b)(Str|c)␤»
09:55 moritz m: say ('a', 'b)(Str|c)').WHICH
09:55 camelia rakudo-moar ebccb2: OUTPUT«Parcel|(Str|a)(Str|b)(Str|c))␤»
09:55 moritz m: say ('a', 'b)(Str|c') === <a b c>
09:55 camelia rakudo-moar ebccb2: OUTPUT«True␤»
09:55 moritz bug (but not new)
09:57 domidumont joined #perl6
10:00 zoosha joined #perl6
10:03 dalek ecosystem: 701b9d8 | (Filip Sergot)++ | META.list:
10:03 dalek ecosystem: a newline removed
10:03 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/701b9d8b7b
10:04 sergot "Sprockets" doesn't work on modules.perl6.org
10:05 sergot I mean, it is printed wrongly
10:21 dalek roast: 83761ab | (Elizabeth Mattijsen)++ | S02-types/parcel.t:
10:21 dalek roast: Add some Parcel === tests
10:21 dalek roast: review: https://github.com/perl6/roast/commit/83761aba06
10:23 lizmat moritz: aware of that problem
10:23 lizmat but I don't see a solution apart from creating a WHICH object to be used everywhere
10:23 lizmat that has === overloaded as eqv
10:23 pmurias joined #perl6
10:24 lizmat any string representation has the potential of false positives
10:24 pmurias re perl5 -> perl6 translator, wouldn't translating test suits when porting modules be really usefull?
10:25 lizmat afk for most of the rest of the day&
10:27 mst joined #perl6
10:27 FROGGS pmurias: probably, yes
10:33 cosimo joined #perl6
10:50 chenryn joined #perl6
10:51 donaldh porting test suites is probably more useful than the actual module.
10:51 dalek rakudo/nom: ed10d58 | (Elizabeth Mattijsen)++ | src/core/Scalar.pm:
10:51 dalek rakudo/nom: Fix Scalar.WHICH for type values
10:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ed10d58d3f
10:52 donaldh I'd want to refactor a module to make it idiomatic Perl 6 but i'd probably not care about the tests so much.
10:57 lizmat donaldh: those two statement seem contradictory
10:57 donaldh oh
10:58 lizmat .oO( seems we had a change of plan, I won't be afk for most of the day)
10:58 donaldh I don't care about the tests being good idiomatic Perl6. I care about the tests testing my module.
10:58 donaldh Does that make more sense?
10:59 lizmat ah, yes, much more
10:59 donaldh It's how we try to work in $dayjob. If we're planning a refactor or rewrite, for whatever reason, try really hard to automatically salvage the tests.
11:00 donaldh minimize test re-spend. minimized repeated mistake making.
11:02 nwc10 how does running the spectest differ from running a test individually? In that t/spec/S32-array/delete-adverb-native.t fails for me in the spectest (and I can get a coredump) but not if I run it by hand
11:02 nwc10 coredump is in malloc (I suspect malloc corruption) called from
11:02 nwc10 #3  0x00003fffab6a5e78 in MVM_string_utf8_decode (tc=0x1002a9b0690, result_type=0x1002a9bd590, utf8=0x3fffcf13f841 "LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01"..., bytes=1314) at src/strings/utf8.c:198
11:02 nwc10 however running under valgrind spots no problem
11:19 chenryn joined #perl6
11:29 * colomon does a happy dance because OpenSSL (and at least five other modules that had been failing) passed overnight in the smoke test.
11:33 dalek rakudo/nom: 5a21173 | (Elizabeth Mattijsen)++ | src/core/ (5 files):
11:33 dalek rakudo/nom: Fix many .WHICH related issues:
11:33 dalek rakudo/nom:
11:33 dalek rakudo/nom: - some cases typeobject.WHICH would fail
11:33 dalek rakudo/nom: - other cases WHICH method could be simplified
11:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5a21173d45
11:36 JL235 left #perl6
11:43 lizmat m: EVAL "Int".WHAT.say  # there must be a better way to change a string into a typeobject
11:43 camelia rakudo-moar ed10d5: OUTPUT«(Str)␤»
11:44 lizmat m: (EVAL "Int").WHAT.say
11:44 camelia rakudo-moar ed10d5: OUTPUT«(Int)␤»
11:45 lizmat (not better but corrector  :-)
11:46 moritz m: say ::('Int').perl
11:46 camelia rakudo-moar ed10d5: OUTPUT«Int␤»
11:46 moritz lizmat: ^^
11:47 lizmat moritz++
11:58 mr-foobar joined #perl6
11:59 araujo joined #perl6
12:02 chenryn joined #perl6
12:03 sergot m: grammar H { token TOP { <a>* }; token a { <a>* }}; say H.new.parse('');
12:04 camelia rakudo-moar ed10d5: OUTPUT«(timeout)»
12:04 sergot m: grammar H { token TOP { <a>* }; token a { <a>* }};
12:04 camelia rakudo-moar ed10d5: ( no output )
12:08 lizmat is there any reason why src/core/IO/Spec/QNX is not included in building the setting ?
12:09 lizmat seems like labster was the one working on that ~ 1 year ago
12:10 rindolf joined #perl6
12:12 dalek rakudo/nom: abd4fed | (Elizabeth Mattijsen)++ | src/core/Deprecations.pm:
12:12 dalek rakudo/nom: Fix one more typeobject.WHICH error
12:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/abd4fedb0b
12:13 raiph joined #perl6
12:15 * lizmat adds IO/Spec/QNX: it's a subclass of IO::Spec::Unix, so hardly any extra code
12:20 lizmat hmmm... in parrot, it was already added
12:20 lizmat now added to JVM
12:20 lizmat but where is the list of modules for moar gone???
12:20 lizmat ah, moar_core_sources
12:21 moritz a necessary hack for working around the mac os X make bug
12:22 lizmat ah, ok, moritz++  :-)
12:26 FROGGS m: grammar H { token TOP { <a>+ }; token a { <a>* }}; say H.new.parse(''); # you shouldn't quantify nothing very often :o)
12:26 camelia rakudo-moar ed10d5: OUTPUT«(timeout)»
12:26 FROGGS eww
12:26 FROGGS ohh!
12:27 FROGGS token a calls itself?!
12:27 dalek rakudo/nom: dd4baad | (Elizabeth Mattijsen)++ | tools/build/ (2 files):
12:27 dalek rakudo/nom: Add IO::Spec::QNX to JVM/MoarVM build
12:27 dalek rakudo/nom:
12:27 dalek rakudo/nom: It was already on Parrot, for some reason
12:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/dd4baadbe8
12:28 dalek roast: e063ed7 | (Elizabeth Mattijsen)++ | S02-types/WHICH.t:
12:28 dalek roast: Add tests for typeobject.WHICH
12:28 dalek roast: review: https://github.com/perl6/roast/commit/e063ed764b
12:29 lizmat FROGGS: seems like a reasonable assumption ?
12:32 moritz only if it consumes a non-empty string before doing so
13:03 slavik joined #perl6
13:05 sergot FROGGS: yeah, I was just curious what can happen then :)
13:06 sergot it could be a secret sequence to launch something :)
13:08 carlin how often does the projects.json that panda downloads get updated?
13:09 FROGGS carlin: hourly AFAIK
13:09 slavik left #perl6
13:12 carlin It's missing projects that were added 18+ hours ago, something probably needs to be prodded somewhere
13:13 carlin ohh the HTTP headers say Last-Modified: Wed, 27 Aug 2014 17:01:14 GMT
13:14 guru joined #perl6
13:16 timotimo o/
13:20 raiph carlin: iirc the cronjobs on several feather hosts were stopped around then
13:21 raiph (because of hard drive failures)
13:25 aborazmeh joined #perl6
13:26 dalek rakudo/nom: 7e61510 | (Elizabeth Mattijsen)++ | t/spectest.data:
13:26 dalek rakudo/nom: Add type.WHICH tests to spectest
13:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7e6151000b
13:34 jnthn evening, #perl6
13:34 jerrycheung joined #perl6
13:36 FROGGS hi jnthn
13:36 bjz_ joined #perl6
13:36 FROGGS jnthn: you are better today?
13:37 jnthn FROGGS: Yes, in the relative rather than the absolute sense.
13:38 FROGGS jnthn: that's a start :o)
13:38 jnthn Anything anybody is blocking on that I might be able to address in the next 60-90 mins?
13:39 FROGGS jnthn: review carlins PR? I don't know about anything else
13:40 nwc10 jnthn: PPC Linux works with SPESH disabled apart from 1 test that fails when run from make spectest, but not by hand
13:40 nwc10 and I can't work out why
13:40 nwc10 so, seems problem was mostly between keyboard and chair
13:41 nwc10 seems that valgrind exists on PPC, but it's not telling me anything
13:42 raiph jnthn: nine said http://irclog.perlgeek.de/moarvm/2014-08-30#i_9270066
13:44 jnthn nwc10: Hm, so we know the PPC-argh is in spesh...
13:44 jnthn FROGGS: Which PR, in particular?
13:45 nwc10 we know most of it is, and it seems to be mostly in the spectsts for trigonmetric functions
13:45 jnthn That sounds like someting I cna do...
13:45 haroldwu joined #perl6
13:45 jnthn nwc10: How far do we get on PPC with spesh enabled?
13:45 raiph jnthn: Q from Mouq: http://irclog.perlgeek.de/perl6/2014-08-31#i_9276802
13:45 nine raiph: that one is already fixed :)
13:46 nwc10 jnthn: we have spectest failures. implication -> build builds, sanity tests pass, most spectests pass
13:46 jnthn raiph: Well, the answer to the nine question is "you leaked an exception from a C callback", usually... :)
13:46 jnthn nwc10: Ah, OK. Hmmm...that almost certainly means it's something to do with flaots...
13:46 raiph heh, you guys move way too fast
13:46 nwc10 jnthn: however, NQP nativecall test fails. I think it's confusion about 32 vs 64 bit. I've not dug into that one at all
13:46 nine that's exactly what I found out...and that getting refcounts in P5 XS code right is really hard.
13:47 nwc10 jnthn: might be. Seems to blow up with a NULL pointer in stringification. I'm not asking you to worry about this - I assume that I can figure it out
13:47 nwc10 jnthn: actually, only question is "is there an easy way to disable spesh, "thing" by "thing", so that I can identify which one it is?"
13:48 FROGGS[mobile] joined #perl6
13:48 jnthn nwc10: Stringification? Hmm. Try disabling optimize_smart_coerce.
13:48 jnthn (You'll have to hack the code)
13:48 nwc10 I assumed that I was hacking the code.
13:48 jnthn (But should be just commenitn gout the call to it in optimize.c)
13:49 charsbar__ joined #perl6
13:49 tadzik joined #perl6
13:49 dirtyob joined #perl6
13:50 nwc10 jnthn: anyway, it's in a lot better shape than I assumed
13:50 nwc10 jnthn: and gives some hopes that we might be able to build on more debian platforms than the 2 usual suspects
13:50 jnthn .tell Mouq there are two operations you can do regarding the current routine's MVMCallCapture: usecapture and savecapture. The first populates a per-thread singleton and so is not reentrant. The latter saves a copy.
13:50 yoleaux jnthn: I'll pass your message to Mouq.
13:51 jnthn .tell Mouq both are worth avodiing on hot paths; savecapture has to allocate a GC-able, so it's the more expensive of the two.
13:51 yoleaux jnthn: I'll pass your message to Mouq.
13:51 jnthn raiph: Thanks for the pointers. :)
13:52 jnthn nwc10: Sounds good :)
13:55 nwc10 jnthn: I'd like mberends to return so that I can pass on the good news.
13:57 jnthn nwc10: I'm not sure making folks magically appear on IRC is within my capabilities, sorry. :)
13:59 nbrown__ joined #perl6
14:00 pdcawley joined #perl6
14:01 moritz nwc10: I'm pretty sure mberends has an email address that he still uses :-)
14:04 * masak .oO( "this magical wand makes people appear on IRC. now, *this* one makes it so that they can't actually leave. use with caution." )
14:05 timotimo that sounds like a pretty terrible fate
14:05 nwc10 jnthn: commenting that out changes the SEGV from a NULL pointer to a garbage pointer
14:05 nwc10 jnthn: so it's part of the problem.
14:05 nwc10 I can dig further at some point
14:06 timotimo that is optimize_smart_coerce?
14:06 nwc10 timotimo: yes. commenting that out changes the error
14:06 timotimo it may need to check for VMNull on top of a null pointer in the facts->type slot
14:07 timotimo i had to put that into optimize_can_op to make it robust enough to pass almost all spec tests
14:09 jnthn Not sure why thatd make us a PPC-specific issue though.
14:10 timotimo oh
14:10 timotimo i forgot about that part
14:11 nwc10 Big Endian
14:11 timotimo maybe it's a problem with the way i'm assigning operands?
14:11 timotimo they are unions; i'm just assigning them straight with =
14:11 timotimo i think that generates the proper code, but i can't know for sure ...
14:13 timotimo hm. i'm assigning to a .lit_i16; perhaps i'm not nulling out the value beforehand?
14:13 Timbus m: class A {}; my $test = (my $x = A.new(:a), A.new(:b), my $y = A.new(:c), A.new(:d)); say $test.perl
14:13 camelia rakudo-moar dd4baa: OUTPUT«$(A.new(), A.new(), $(A.new(), A.new()))␤»
14:13 timotimo nah, that comes from MVM_spesh_alloc, which nulls out everything properly
14:14 Timbus whys that parcelify the last two..
14:15 timotimo it also parcelifys "all" of it
14:15 timotimo not sure if that's because of the my $x in there
14:15 jnthn I guess 'cus you end up with list assignment precedence there
14:15 jnthn (for the second assignment)
14:16 timotimo m: class A {}; my $test = (A.new(:a), A.new(:b), my $y = A.new(:c), A.new(:d)); say $test.perl
14:16 camelia rakudo-moar dd4baa: OUTPUT«$(A.new(), A.new(), $(A.new(), A.new()))␤»
14:16 timotimo ah, ok, the $ in front probably comes from assigning to $test
14:16 timotimo m: class A {}; my $test = (A.new(:a), my $x = A.new(:b), my $y = A.new(:c), A.new(:d)); say $test.perl
14:16 camelia rakudo-moar dd4baa: OUTPUT«$(A.new(), $(A.new(), $(A.new(), A.new())))␤»
14:16 timotimo m: class A {}; my $test = (A.new(:a), my $x = A.new(:b), my $y = A.new(:c), A.new(:d)); say $test.perl; say $x.perl
14:16 camelia rakudo-moar dd4baa: OUTPUT«$(A.new(), $(A.new(), $(A.new(), A.new())))␤$(A.new(), $(A.new(), A.new()))␤»
14:16 timotimo does this make it clearer?
14:17 timotimo (see also: why you have to write { my ($a, $b) } rather than { my $a, $b })
14:17 Timbus yeah i guess. makes gtk::simple a little less.. cool
14:17 timotimo have i been doing that wrong in the example code?
14:17 Timbus no, it will work as long as you avoid making parcels
14:18 timotimo ah, you mean inside an argument list it'll work fine?
14:19 timotimo m: say(my $a = "hello", my $b = "world"); say $a.perl; say $b.perl;
14:19 camelia rakudo-moar dd4baa: OUTPUT«helloworld␤"hello"␤"world"␤»
14:19 timotimo apparently. phew :)
14:20 Timbus as long as you assign everything to a var, or only the first thing.. otherwise youll need to break out the ()'s
14:24 dalek nqp: 12ac42b | jonathan++ | src/QRegex/Cursor.nqp:
14:24 dalek nqp: Avoid a bunch of str boxing in !cursor_pass.
14:24 dalek nqp:
14:24 dalek nqp: When we have a conditional in non-void context, it needs to produce a
14:24 dalek nqp: single kind of result; since a method call cannot be known to unbox to
14:24 dalek nqp: a native string, then this caused us to perform a boxing operation.
14:24 dalek nqp: This gets rid of a boxing operation on every !cursor_pass.
14:24 dalek nqp: review: https://github.com/perl6/nqp/commit/12ac42b8b6
14:24 timotimo neat!
14:25 jnthn profiler++
14:26 lizmat NQP_REVISION bump?
14:26 jnthn Who says I'm done yet? :P
14:26 lizmat ah, ok
14:26 timotimo :D
14:26 colomon woah, that sounds like a handy optimization
14:26 * lizmat awaits do for { start { @jnthn_fixes } }   # to make things faster in wallclock
14:29 dalek nqp: b40622d | jonathan++ | src/QRegex/Cursor.nqp:
14:29 dalek nqp: Save an integer boxing in every !reduce.
14:29 dalek nqp:
14:29 dalek nqp: Similar trick to the previous commit; again, saves an allocation on
14:29 dalek nqp: every Cursor that passes.
14:29 dalek nqp: review: https://github.com/perl6/nqp/commit/b40622d1b4
14:29 moritz await Promise.allof(@jnthn_fixes)
14:31 jnthn Those two between them cut two GC runs off the benchmark nqp-m parse-json projects.json 10
14:31 timotimo that's amazing
14:31 moritz two out of how many?
14:31 jnthn moritz: From 31 down to 29
14:32 moritz so about 6%. Not bad.
14:32 moritz m: say 29 / 31 * 100
14:32 camelia rakudo-moar dd4baa: OUTPUT«93.548387␤»
14:32 moritz m: say (31 - 29) / 31 * 100
14:32 camelia rakudo-moar dd4baa: OUTPUT«6.451613␤»
14:33 moritz it's a poor testament for my math skills that I don'T get a simple percent calculation right on the first attempt
14:34 masak it's these bloody abacus machines.
14:34 masak they have ruined real understanding of the underlying numbers.
14:34 moritz :-)
14:34 jnthn That or studying advanced enough math you forget what a number is... :P
14:35 masak my math only contains arrows these days. and knots.
14:35 colomon moritz++ # I do the same thing at least 50% of the time I try to calculate a percentage
14:35 masak I haven't seen a number in months.
14:36 nam_ joined #perl6
14:36 jnthn Such abstract...
14:36 tadzik computer, messages
14:36 tadzik hmm
14:37 jnthn Well, that was disappointing :P
14:37 moritz I know understand why many of my friends were so bad at math
14:37 moritz they made the same stupid mistakes that I do
14:38 tadzik weechat says there was something
14:38 moritz but I think "93%? that can't be right", and look further
14:38 moritz whereas they often say "yay, a result! We can play soccer now!"
14:38 moritz well, put that in past sense
14:39 tadzik oh, a rakudobrew.ad :)
14:39 jnthn .ad?
14:41 * masak .oO( much .ad about nothing )
14:42 moritz rakudobrew sells ads now?
14:43 nam_ Code: 'my @a = abcadae ~~ m:g/a/' I would have exspected that @a contains 3 a's as it would in perl5. what am I doing wrong?
14:44 moritz m: 'abcadae' ~~ m:g/a/; my @a = $/.list; say @a.elems
14:44 camelia rakudo-moar 7e6151: OUTPUT«0␤»
14:45 moritz nam_: there's some only recently resolved spec issue around ~~ m:g// that's not yet implemented in rakudo
14:45 moritz m: $_ = 'abcadae'; m:g/a/; say $/.list.elems
14:45 camelia rakudo-moar 7e6151: OUTPUT«0␤»
14:46 moritz m: $_ = 'abcadae'; say (m:g/a/).elems
14:46 camelia rakudo-moar 7e6151: OUTPUT«3␤»
14:46 TimToady m: ('abcadae' ~~ m:g/a/).WHAT.say
14:46 camelia rakudo-moar 7e6151: OUTPUT«(Bool)␤»
14:46 TimToady that's wrong
14:46 TimToady so not yet resolved
14:46 moritz TimToady: yes, m:g/a/ still returns a list in rakudo
14:46 jnthn m: say 'abcadae'.match(/a/, :g)
14:46 camelia rakudo-moar 7e6151: OUTPUT«「a」␤ 「a」␤ 「a」␤␤»
14:46 moritz TimToady: the spec issue is resolved, iirc
14:46 TimToady no, it's returning Bool ^^
14:46 jnthn Use ^^, which has been reliable for ages...
14:46 xenoterracide joined #perl6
14:47 moritz TimToady: no, $rhs ~~ m:g/a/ returns Bool
14:47 colomon tadzik: can you please look at my two patches to emmentaler?  the more recent I'm pretty confident about, but the exception handling stuff from before that might be better expressed in other ways.  (I sort of only committed it by accident.)
14:47 moritz TimToady: it's the ~~ that turns the List into Bool
14:48 TimToady m: $_ = 'abcadae'; say m:g/a/.WHAT
14:48 camelia rakudo-moar 7e6151: OUTPUT«(List)␤»
14:48 TimToady okay, NYI
14:49 mr-foobar joined #perl6
14:49 TimToady and it's 0 because it's redispatching to List.ACCCEPTS
14:50 PotatoGim^Home joined #perl6
14:51 TimToady nam_: we'll get it close to working as you'd expect soonish, though I believe it still requries a .list because Match doesn't quite act like a Parcel
14:52 nam_ hm this seems to work: say 'abcadae'.match(/a/, :g) a little confusing
14:52 moritz yes, it is. It must be fixed.
14:55 TimToady m: $_ = 'abcadae'; m:g/a/; say @$/.elems
14:55 camelia rakudo-moar 7e6151: OUTPUT«0␤»
14:55 spider-mario http://perl6.org/compilers/features
14:55 spider-mario what are “delayed declarations”?
14:55 TimToady m: $_ = 'abcadae'; m:g/a/; say $/.elems
14:55 camelia rakudo-moar 7e6151: OUTPUT«0␤»
14:55 TimToady m: $_ = 'abcadae'; m:g/a/; say $/.list.elems
14:55 camelia rakudo-moar 7e6151: OUTPUT«0␤»
14:55 TimToady m: $_ = 'abcadae'; m:g/a/; say $/[0].elems
14:55 camelia rakudo-moar 7e6151: OUTPUT«0␤»
14:55 moritz spider-mario: declaring stuff in a macro
14:55 spider-mario oh, ok
14:56 moritz spider-mario: (more specifically, inside an unquote)
14:56 TimToady uh, in my coffeeless state I'd guess more like in a quasi
14:56 masak spider-mario: see D4 of http://news.perlfoundation.org/2011/09/hague-grant-application-implem.html
14:57 spider-mario thanks
14:57 masak briefly, if you do `class C {}` in normal code, it registers with the package scope and you can use it directly.
14:58 masak if you do the same in a quasi, you don't expect to get a class C (or whatever) to play with. not until you install the quasi in some actual code.
14:58 TimToady it's the problem of generic code
14:58 masak yes.
14:58 TimToady so there needs to be a "compose" somewhere
14:58 moritz TimToady: yes, in a quasi
14:58 TimToady otherwise known as instantiation
14:59 TimToady not to be confused with instantiation :)
14:59 masak it's a bit of functions:invocations :: quasis:splicings.
14:59 moritz well, one could also argue it's a problem of scope
14:59 moritz if all declarations were lexical, it would be much less of an issue
15:00 masak that's not the language I have to implement this thing in, though :)
15:00 TimToady in some ways it's easier with textual macros, because you know you have to reparse, and it's clear at what level the declarations happen
15:01 TimToady when "reparsing" must happen at a deeper level, it's a little more abstract
15:01 TimToady "what would the text that would have produced this AST have done besides producing this AST?"
15:01 masak right. AST macros are semi-digested already. the trick is keeping track of all the semi-digested information (tree, scopes, world-style declarations)
15:02 masak D4 is tempered a little bit for me by the fact that we now know that the foundation on which it rests needs to be rethought.
15:03 moritz you mean the macro part? or World?
15:03 masak the macro part.
15:03 TimToady or the grammar part?
15:03 masak oh, the grant is/was fully aware of Worlds, thank blog.
15:03 moritz or the rest? :-)
15:03 masak yes, the grammar part is part of what needs to be worked into it all.
15:04 TimToady he's already had the rest :P
15:04 moritz the World is not enough..
15:04 lizmat m: my $p1 := (my $x = 42,1); my $p2 := (my $y = 42,1); say $p1 === $p2; say $p1.WHICH; say $p2.WHICH   # TimToady: is that better ?
15:04 camelia rakudo-moar 7e6151: OUTPUT«False␤Parcel|(Scalar|71759448)(Int|1)␤Parcel|(Scalar|71759520)(Int|1)␤»
15:04 masak I have a number of use cases mulling/mulching around in my head.
15:04 masak but what I really need to do is sit down and collect everything that's happened in the past year or so, and try to find a kind of synthesis.
15:07 TimToady lizmat: yes, that looks better
15:08 TimToady m: my $x; say VAR($x).WHICH
15:08 camelia rakudo-moar 7e6151: OUTPUT«Scalar|67054336␤»
15:08 TimToady \o/
15:09 lizmat TimToady: any suggestions as to the point that moritz raised at http://irclog.perlgeek.de/perl6/2014-09-01#i_9278769
15:09 lizmat ?
15:10 jnthn m: say 963420 / 1867062
15:10 camelia rakudo-moar 7e6151: OUTPUT«0.5160086␤»
15:11 Ulti m: say (1,2,3;4,5,6).perl
15:11 camelia rakudo-moar 7e6151: OUTPUT«(1, 2, 3; 4, 5, 6)␤»
15:11 moritz lizmat: to me, the solution is pretty clear
15:11 dalek nqp: 1058b96 | jonathan++ | src/QRegex/Cursor.nqp:
15:11 dalek nqp: Various micro-optimizations to MATCH.
15:11 dalek nqp:
15:11 dalek nqp: These avoid various bits of boxing. In fact, all of the boxing that
15:11 dalek nqp: we accidentally did in MATCH. In a parse-heavy benchmark such as the
15:11 dalek nqp: NQP JSON parser, this cuts the number of object allocations roughly
15:11 dalek nqp: in half by number (though since it cuts down on boxing, and boxes are
15:11 dalek nqp: comparatively small, it's a much smaller decrease on GC runs needed,
15:11 dalek nqp: from 29 to 25).
15:11 dalek nqp: review: https://github.com/perl6/nqp/commit/1058b96c3c
15:12 moritz lizmat: Parcel.WHICH needs to escape the characters ( and ) in the .WHICH strings from its elements
15:12 TimToady lizmat: yes, our current implementation of WHICH is subject to injection attacks
15:13 TimToady and as we know, escaping is only a partial solution
15:13 TimToady and bug prone
15:13 jnthn All todays patches guided by pfoiler++
15:13 jnthn uh
15:13 jnthn profiler++
15:13 lizmat hence my reluctance to go down that path
15:13 lizmat I see .WHICH being used in 2 ways in the setting:
15:14 lizmat 1. as a string, for typed hashes and sets/bags/mixes
15:14 TimToady identity is a sequence of assertions, any one of which can falsify
15:14 lizmat 2. for comparisons
15:14 TimToady but these assertions could be integer comparisons
15:14 lizmat for the typed hashes etc, we need a string
15:14 TimToady and integers are possibly easier to hash than chars
15:15 FROGGS tadzik: there is a message for tadzik2 from me :o)
15:15 lizmat but for comparisons, I would argue, I would argue we need some === overload that would do a sort of eqv on whatever the objects are
15:16 lizmat maybe an "eqw" operator ?
15:16 moritz or maybe we just need a single routine that can collapse a tree of ObjAt objects into a single one
15:16 lizmat moritz: how would that help value based objects?
15:17 moritz lizmat: what would be the difference between eqw and === ?
15:17 TimToady if your cryptohash is good enough, you can do the git trick, yes
15:17 * TimToady thinks the string notion of identity is a bit misguided in the first place
15:17 lizmat === checks the stringification of the .WHICH object
15:17 lizmat eqw would do an eqv on the .WHICH of the object tree
15:18 lizmat eqw could be cheaper, as most === are not true
15:18 jnthn Let's be clear *why* ObjAt is currenlty a string. It's because the existing portable hash support we have over different backends, that was to hand when getting object arrays in there in the first place, was string keys.
15:18 TimToady you should be able to ask an object for a hash of its identity
15:18 lizmat and could therefore fail on the first mismatch
15:19 moritz lizmat: as long as that's something internal, and not another user-exposed equivalence operator, I'm all fine with that
15:19 jnthn That does not mean we should keep it that way; it was done that way so we could actually have object hashe at all, 'cus too many things blocked on them, and a passable-for-now implementation "now" beat a perfect one "later"
15:20 * TimToady gets the feeling eqw is a bandaid over a suboptimal design, yes
15:20 TimToady we should fix the notion of identity to be composable
15:21 TimToady if you later have to serialize *that* in order to hash, so be it
15:21 lizmat quite likely so: but needing to build a string of a Set of 1M entrues for an ===, when you know the Set you're comparing with is most likely not the same
15:21 lizmat seems less optimal to say the least
15:21 TimToady but I was thinking of the precise phrase "injection attack" several days ago with respect to this problem
15:22 TimToady and that's exactly what moritz++ did
15:22 TimToady thankfully he did it with good intentions :)
15:22 lizmat (and has done before, I know, it wasn't forgotten moritz++)
15:23 TimToady but this really is a security issue, or governments would not issue us identity cards
15:23 lizmat how about we create a WHICH class, and that all .WHICH methods return an object of that type
15:24 moritz lizmat: we have that part already. It's called ObjAt
15:24 TimToady though the At is a misnomer
15:24 lizmat and then handle the comparison code (the "eqw" thing) in there
15:24 TimToady and the internal algorithm can remain hidden and optimizable
15:25 TimToady you do need to be able to ask it for a .hashval or so
15:25 nbrown__ joined #perl6
15:25 TimToady which it might or might not cache
15:25 masak hashing is a typical domain where not looking at how other big languages do things would be almost criminally stupid.
15:25 TimToady it's sort of a smart ID card :)
15:26 TimToady well, python has a way to ask objects what their hash is
15:26 masak I think you can get pretty far by doing `$hash = 31 * $hash + hash($part);` over all parts. 31 is prime and has nice optimization properties.
15:27 tadzik FROGGS: oh! :)
15:27 masak that's what I tend to see in Java. I'm by no means an expert, but that trick alone seems to carry pretty far.
15:27 tadzik2 computer, messages
15:27 TimToady well, modulo having a non-randomized hash algo is also a potential dos hole
15:27 tadzik2 FROGGS: :(
15:27 FROGGS or tadzik3 *g*
15:28 FROGGS I thought I told you something
15:28 tadzik2 :D
15:28 TimToady time travel?
15:28 TimToady parallel worlds?
15:28 masak TimToady: I'll let others weigh in on that. I don't know enough about the DOS aspects of hashing. (although I find them fascinating.)
15:28 TimToady ESP?
15:28 tadzik colomon: okay, I'll take a look
15:28 FROGGS tadzik: maybe I just pinged you
15:29 colomon tadzik: thanks
15:29 FROGGS (was about the PR colomon++ merged)
15:29 TimToady tachyons?
15:29 TimToady transactional QM?
15:29 moritz "now will rollbacks!"
15:30 masak :P
15:30 * TimToady forgets what we were talking about
15:30 masak today's mini-challenge: (been a while since we had one)
15:30 masak you're given the text "The quick brown fox jumps over the lazy dog."
15:31 FROGGS shall we dance it?
15:31 masak and two operations: italic($from, $len) and bold($from, $len), where $from and $len work like in substr.
15:33 masak given an input of N such italic/bold operations, emit the most sensible properly nested markup of <i>...</i> and <b>...</b> tags on the text.
15:34 masak the task is interesting because (a) one has to decide what an operation on a "mixed" piece of text does, and (b) the operations are allowed to mis-nest, but the tags in the markup aren't.
15:35 moritz masak: what about mutliple-times bolding and italicing?
15:35 FROGGS right, operating on .words
15:35 moritz ie, what shoudl bold(0, 20); bold (0, 10); yield?
15:35 TimToady Really Really Bold
15:35 jnthn Well, I'm done with the Cursor allocation opts now. If somebody fancies bumping NQP_REVISION, go for it :)
15:36 TimToady maybe translate to Double Struck
15:36 FROGGS jnthn: let me test it first :P
15:36 moritz TimToady: well, "good" fonts support 5 or more font weights
15:36 grondilu joined #perl6
15:36 masak moritz: same as in Office Suites: if it's completely unbold when you bold it, it becomes bold -- otherwise, it becomes unbold.
15:37 grondilu p6: my $a = (1, 2); $a ,= 3
15:37 masak moritz: that, incidentally, is also the same semantics that empty/intermediate/checked checkboxes have.
15:37 camelia rakudo-jvm 7e6151: OUTPUT«(timeout)»
15:37 camelia ..rakudo-{parrot,moar} 7e6151, niecza v24-109-g48a8de3: ( no output )
15:37 moritz masak: ok
15:37 grondilu m: my $a = (1, 2); say $a ,= 3
15:38 camelia rakudo-moar 7e6151: OUTPUT«(signal )»
15:38 grondilu my $a = (1, 2); $a ,= 3   # this hangs in the REPL
15:38 lizmat confirmed locally
15:39 molaf joined #perl6
15:39 lizmat m: my $a = (); say $a ,= 3  # more golfed down
15:39 camelia rakudo-moar 7e6151: OUTPUT«(signal )»
15:40 moritz m: (my $a = ()) ,= 3
15:40 camelia rakudo-moar 7e6151: ( no output )
15:40 lizmat the signal is probably from using too much memory
15:40 masak once you start adding threes, it's really hard to stop.
15:40 lizmat i very quickly grew to 1G on my machine
15:40 lizmat *it  :-)
15:40 jnthn At least we're fast at allocating these days... :P
15:40 grondilu m: (my $ = ()) ,= 1 # I win the golfing contest ;)
15:40 camelia rakudo-moar 7e6151: ( no output )
15:41 FROGGS m: say (my $ = ()) ,= 1
15:41 TimToady m: $ = () ,= 1
15:41 dalek rakudo/nom: af0fa9f | (Elizabeth Mattijsen)++ | src/core/CompUnitRepo/Locally.pm:
15:41 dalek rakudo/nom: Fix one more type-object.WHICH failure
15:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/af0fa9f14f
15:41 camelia rakudo-moar 7e6151: OUTPUT«(timeout)»
15:41 camelia rakudo-moar 7e6151: ( no output )
15:42 TimToady m: ($=()),=1
15:42 camelia rakudo-moar 7e6151: ( no output )
15:42 TimToady hmm
15:42 TimToady m: @,=1
15:42 camelia rakudo-moar 7e6151: ( no output )
15:42 dalek roast: 3bd9a0b | (Elizabeth Mattijsen)++ | S02-types/WHICH.t:
15:42 dalek roast: Check for ObjAtness of .WHICH
15:42 dalek roast: review: https://github.com/perl6/roast/commit/3bd9a0b52d
15:43 moritz masak: pity we don't have a Set::IntSpan implementation in Perl 6
15:43 TimToady m: say @,=1
15:43 camelia rakudo-moar 7e6151: OUTPUT«1␤»
15:43 TimToady m: say $,=1
15:43 camelia rakudo-moar 7e6151: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/dS9vvtxoFX�Unsupported use of $, variable; in Perl 6 please use $*OUT.output_field_separator()�at /tmp/dS9vvtxoFX:1�------> [32msay $,[33m�[31m=1[0m�»
15:43 TimToady heh
15:43 moritz masak: would come in handy for this problem
15:43 TimToady m: say $ ,=1
15:43 camelia rakudo-moar 7e6151: OUTPUT« 1␤»
15:44 TimToady I guess it has to be a my
15:44 dalek rakudo/nom: df2245d | (Tobias Leich)++ | tools/build/NQP_REVISION:
15:44 dalek rakudo/nom: bump nqp rev for MATCH/!reduce opts by jnthn++
15:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/df2245d1ce
15:45 masak moritz: I should add that I haven't thought enough about the problem (in this form) to have formed an elegant model of it myself.
15:45 masak but yes, IntSpan seems to be vaguely in the right direction.
15:46 TimToady not to me; seems more like hyper XOR on a slice
15:46 masak hm, interesting.
15:46 kaare_ joined #perl6
15:46 masak I was thinking of boundaries, not individual characters.
15:47 TimToady doubtless there are problem sets where one or the other approach will do better
15:47 noganex joined #perl6
15:48 moritz TimToady: I thought about bit fields too
15:48 TimToady depending on how much boundary simplification transformations you're forced to do, vs the single final boundary pass of the xor approach
15:48 moritz TimToady: but in the end, you have to extract ranges again, and skiplists can also XOR
15:49 * TimToady goes for conceptually simpler in that case :)
15:49 tadzik colomon: both patches look good to me
15:49 tadzik one of them hints at panda throwing wrong exceptions somewhere
15:49 TimToady elegant does not always mean impenetrable :)
15:51 masak I think my solution leans towards the boundaries solution: I would try to keep a tree of objects corresponding to the final XML structure, and then have each line of input percolate down the tree, making the necessary transformations.
15:51 TimToady and, actually, in the xor approach, you never actually have to locate the boundaries at all, since deciding the font is done on each character anyway
15:51 TimToady masak: as I said, impenetrable :P
15:52 masak heh :)
15:52 TimToady er, my previous point was in how your wysiwyg editor, not xml
15:52 TimToady s/editor/editor works/
15:52 TimToady obviously xml is boundary oriented
15:53 TimToady unless you wrap each xml character individually :)
15:53 masak well, my solution would certainly make serialization easy by the end. dunno how elegant the tree transformation logic could be made, though.
15:53 TimToady which makes the boundaries Someone Else's Problem :)
15:53 masak feels like it could be interesting if approached from a Haskell/pattern matching angle.
15:53 TimToady .oO(impenetrable)
15:54 * TimToady doesn't actually like his Red-Black solution on RC much...
15:54 masak TimToady: well, "most sensible" in the requirements was meant to forbid things like "each characters is marked up individually"
15:55 masak character*
15:55 kaleem joined #perl6
15:55 nuggs joined #perl6
15:56 TimToady well, it's not like detecting runs isn't about the 9th problem of the 99 problems
15:57 khisanth_ joined #perl6
15:57 TimToady so it's very FP, which must mean it's elegant :)
15:57 masak :P
15:57 * masak is reminded that he never did create a lagging-variable module
16:00 * TimToady averts his gaze from the shiny squirrel and looks back upon the log
16:00 nuggs Dense me can't find the list of supported platforms for Rakudo.  I failed to build on Arm, and wonder if that's expected.
16:01 lizmat nuggs: nwc10 is currently unbitrotting on ARM
16:01 nuggs lizmat: thanks.
16:01 TimToady we could use more continuous testers to do more continuous testing :)
16:02 jnthn Well, really it depends on backend. Rakudo on JVM will run anywhere that's resourceful enough and can run a JVM. Rakudo on MoarVM...what lizmat said. It certainly *has* worked on ARM, but bitrot...
16:02 jnthn Anyways, sleep o/
16:02 TimToady o/
16:04 masak m: sub forl(@vals, &block) { for @vals[1..*] Z @vals[0..*-1] -> $current, $last { &block($current, $last) } }; forl 24..77, -> $c, $l { if $c div 10 > $l div 10 { say "Passed from {$l div 10}0s to {$c div 10}0s" } }
16:04 camelia rakudo-moar 7e6151: OUTPUT«Passed from 20s to 30s␤Passed from 30s to 40s␤Passed from 40s to 50s␤Passed from 50s to 60s␤Passed from 60s to 70s␤»
16:05 masak in fact, lagging variables are a lot about boundaries.
16:05 * masak wants to think about this issue more, but needs sleep
16:05 masak 'night, #perl6
16:06 lizmat night masak
16:06 TimToady \o
16:06 colomon tadzik: thanks
16:06 colomon o/
16:06 colomon is masak in China too?
16:07 lizmat colomon: yes
16:07 colomon lizmat: thanks
16:08 lizmat he's +0800 GMT
16:08 lizmat or was it +0900 because of summetime?
16:09 colomon I'm just used to him going to bed at dinner time rather than lunch time.  :)
16:14 timotimo should i expect many spec test failures?
16:15 timotimo lock.rakudo.moar is probably flappy, but there's also a whole bunch of io-spec-* tests failing
16:15 timotimo uniq and split are failing, too :(
16:15 colomon :(
16:16 lizmat timotimo: apart the known segfault in t/spec/integration/99problems-51-to-60.t , my spectests have been clean?
16:18 timotimo OK, it seems like my addition of bindattrs_* to the jit has caused failures
16:19 timotimo ooooh
16:19 timotimo haha :)
16:19 timotimo copy-paste programming strikes again
16:25 jack_rabbit joined #perl6
16:25 timotimo back to only known spectest failures. great! :)
16:28 cxreg planeteria still down? :/
16:29 timotimo .tell brrt if we could see "beginning of inlined frame for function $foobar" in the jit log, that'd be interesting
16:29 yoleaux timotimo: I'll pass your message to brrt.
16:30 timotimo .tell brrt for example, i see !cursor_pass only jitted like 50% of the time, spesh'd the other 50%, but in the jit log i can only see successful jittings of that frame, so it's probably in-lined versions of that otherwise?
16:30 yoleaux timotimo: I'll pass your message to brrt.
16:36 jdv79 its not like planet perl 6 has fresh content more than once a week anyway
16:37 jdv79 but it was nice when it was up
16:38 timotimo nothing's wrong with planetaria itself; the domain has been "stolen", though
16:39 mberends joined #perl6
16:50 gfldex joined #perl6
16:50 mberends joined #perl6
16:58 bjz joined #perl6
17:00 xenoterracide joined #perl6
17:00 Ven_ joined #perl6
17:06 slavik joined #perl6
17:08 vendethiel joined #perl6
17:09 xenoterracide joined #perl6
17:10 kurahaupo joined #perl6
17:13 grondilu if %h{$a} :exists { my $b = %h{$a}; ... }  # how can I write this but avoiding calling %h{$a} twice?
17:14 * grondilu notices he can't write (my $b = %h{$a}) :exists
17:14 vendethiel grondilu: the :exists would apply to the my
17:15 vendethiel m: my $v = 'a'; my %h = b => 1; given %h{$v} { .say if .defined }
17:15 camelia rakudo-moar df2245: ( no output )
17:15 vendethiel m: my $v = 'a'; my %h = a => 1; given %h{$v} { .say if .defined }
17:15 camelia rakudo-moar df2245: OUTPUT«1␤»
17:15 vendethiel grondilu: something like that? Won't work if you hold `Nil`s; tho
17:15 grondilu .defined is equivalent to :exists?  If so I'll use that.
17:16 vendethiel no, not exactly
17:16 vendethiel m: say Nil.defined
17:16 camelia rakudo-moar df2245: OUTPUT«False␤»
17:16 vendethiel which is why you don't want what I wrote if you might have non-`defined` values in your hash.
17:16 grondilu I don't think there will so it will do.
17:23 jdv79 wanted to do some simple testing with p6 which leads to rakudobrew and then perlbrew.  i guess centos 5 is "old" now.
17:24 TimToady .oO(First make it work, then make it fast, then make it work everywhere, then make it work everywhen...)
17:27 vendethiel ... then debug it everywhere
17:28 TimToady nah, that's what downstream is for
17:29 * TimToady is attempting to remove from roast the assumption that parcels autoflatten under elems and .[]
17:30 TimToady so that parcels being used a tuples behave more as expected
17:30 telex joined #perl6
17:31 bjz joined #perl6
17:34 vendethiel TimToady: I'm afraid "which-method-flatten-which-don't" is gonna be like learning which method takes a LIST or a scalar in p5
17:34 vendethiel is it a macro or a function in lisp. Is it a ...
17:38 MilkmanDan joined #perl6
17:39 japhb_ Looking at today's commits ... what was the total effect of jnthn++'s MATCH optimizations?
17:49 TimToady vendethiel: yes, I'm thinking about that problem, but I also don't want to force everyone to write .flat everywhere either
17:49 brrt joined #perl6
17:50 dwarring joined #perl6
17:51 TimToady japhb_: compile looked maybe 3-4% faster, but might've just been a cold CPU :)
17:52 rindolf Hi all.
17:52 rindolf TimToady: hi, happy labour day.
17:56 vendethiel TimToady: I don't have a lot of my brain focused on that, but it'd seem *very* natural to me to have EVERY method flatten EXCEPT methods that change said flattening (.item, .tree, .flat ... wait no not flat :P)
17:57 vendethiel "does it flatten ? Well, the answer is easy. If it needs not to (because it's going to change the structure), then no, else yes"
17:57 vendethiel as I said, I'm only considering this with a VERY naive approach.
17:59 TimToady What is this "labour" of which you speak?
18:00 vendethiel TimToady: question would be: can we make this seem "natural" *and* "logical" to people? You're certainly the best placed to answer that
18:01 labster joined #perl6
18:03 vendethiel ("best placed" looks pretty terrible to me now, english-wise)
18:05 Ven_ joined #perl6
18:09 jdv79 wow, compiling p6 drove my under-mem'd box into swap
18:09 jdv79 i think i'll look tomorrow to see if its done
18:11 bjz joined #perl6
18:11 molaf_ joined #perl6
18:13 bjz joined #perl6
18:14 firefish5000 joined #perl6
18:14 bjz joined #perl6
18:16 bjz joined #perl6
18:21 dalek nqp: 3d14d41 | (David Warring david.warring@gmail.com)++ | examples/rubyish/rubyish.nqp:
18:21 dalek nqp: Add custom Rubyish::Compiler eval method. Work around for #177.
18:21 dalek nqp: review: https://github.com/perl6/nqp/commit/3d14d41edb
18:22 firefish5000 m: say "{$_}" for (1, 2, 3);
18:22 camelia rakudo-moar df2245: OUTPUT«␤␤␤»
18:22 firefish5000 m: say "$_" for (1, 2, 3);
18:22 camelia rakudo-moar df2245: OUTPUT«1␤2␤3␤»
18:22 Ven_ m: say "$($_)" for (1, 2, 3);
18:22 camelia rakudo-moar df2245: OUTPUT«1␤2␤3␤»
18:23 firefish5000 m: for (1, 2, 3) { say "{$_}" ; }
18:23 camelia rakudo-moar df2245: OUTPUT«1␤2␤3␤»
18:24 Ven_ Don't ask me.
18:25 jdv79 joined #perl6
18:25 rindolf TimToady: labour is the British spelling of "labor".
18:25 jdv79 well, i guess one can't compile p6 on a box with 512M ram and 1G swap
18:26 jdv79 that sucks
18:26 jdv79 the thing just OOM'ed out i guess
18:27 firefish5000 ask "are these supose to interpoliate differently?" unless ($User.name eq 'Ven_');
18:27 Ven_ answer: I don't interpoliate a lot :P
18:30 firefish5000 Ven_: Neither do I, and I don't seem to be very good at either.
18:35 labster lizmat: QNX was a platform that was trivially easy to support its minor differences (unlike VMS), so I went ahead and ported that from p5 File::Spec
18:35 labster of course no one actually uses it, so no one knows it's missing
18:39 Ven_ jnthn: for async, WRT cancellation - do you want a separate class for this?
18:39 Ven_ Or do you want to do it the .net way, with CancellationTokens?
18:39 Ven_ (and TryCancellable)
18:47 dalek nqp: 883e264 | (David Warring david.warring@gmail.com)++ | examples/rubyish/ (4 files):
18:47 dalek nqp: drop @@package vars misfeature
18:47 dalek nqp: review: https://github.com/perl6/nqp/commit/883e264b2f
18:58 firefish5000 m: $_=q<cat>; say "{$_}" for (1,2);
18:58 camelia rakudo-moar df2245: OUTPUT«cat␤cat␤»
18:58 firefish5000 m: $_=q<cat>; say "{$_}$_" for (1,2);
18:58 camelia rakudo-moar df2245: OUTPUT«cat1␤cat2␤»
18:58 firefish5000 ...
19:00 firefish5000 m: $_=q<cat>; { say "{$_}$_"; } for (1,2);
19:00 camelia rakudo-moar df2245: OUTPUT«11␤22␤»
19:00 colomon m: qx/ls/
19:00 camelia rakudo-moar df2245: OUTPUT«qx, qqx is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:1␤  in sub QX at src/RESTRICTED.setting:9␤  in block <unit> at /tmp/E48VaiZgUV:1␤␤»
19:03 firefish5000 m: $_=q<cat>; say "<$_>$_"; for (1,2);
19:03 camelia rakudo-moar df2245: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/P06_FzMmg0â�¤Missing blockâ�¤at /tmp/P06_FzMmg0:1â�¤------> [32m$_=q<cat>; say "<$_>$_"; for (1,2)[33mâ��[31m;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        parameterized blockâ�¤Â»
19:03 firefish5000 m: $_=q<cat>; say "{$_}$_"; for (1,2);
19:03 camelia rakudo-moar df2245: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/c61fSiDwGUâ�¤Missing blockâ�¤at /tmp/c61fSiDwGU:1â�¤------> [32m$_=q<cat>; say "{$_}$_"; for (1,2)[33mâ��[31m;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        parameterized blockâ�¤Â»
19:04 firefish5000 m: $_=q<cat>; say "{$_}$_" for (1,2);
19:04 camelia rakudo-moar df2245: OUTPUT«cat1␤cat2␤»
19:04 firefish5000 m: $_=q<cat>; say "<$_>$_" for (1,2);
19:04 camelia rakudo-moar df2245: OUTPUT«<1>1␤<2>2␤»
19:05 firefish5000 m: $_=q<cat>; say "{$_}OUTER::<$_>" for (1,2);
19:05 camelia rakudo-moar df2245: OUTPUT«catOUTER::<1>␤catOUTER::<2>␤»
19:05 firefish5000 m: $_=q<cat>; say "{$_},OUTER::<$_> for (1,2);
19:05 camelia rakudo-moar df2245: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/KJ58qI8MKRâ�¤Unable to parse expression in double quotes; couldn't find final '"' â�¤at /tmp/KJ58qI8MKR:1â�¤------> [32mq<cat>; say "{$_},OUTER::<$_> for (1,2);[33mâ��[31m<EOL>[0mâ�¤    expectin…»
19:05 FROGGS firefish5000: the {$_} is a code block where the $_ default to OUTER... and it seems to miss the correct outer
19:07 firefish5000 alright, that makes since.. Is this an inteded effect though, or a bug?
19:08 FROGGS firefish5000: I think it is a but, but I'm not sure
19:11 firefish5000 FROGGS: alright, Thanks. (It took me an hour to figure  out what was wrong with my grammar, so I got a little fixated on it once I found out)
19:14 brrt left #perl6
19:22 [Sno] joined #perl6
19:24 bjz joined #perl6
19:31 dalek rakudo-star-daily: beebbed | coke++ | log/ (14 files):
19:31 dalek rakudo-star-daily: today (automated commit)
19:31 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/beebbed7eb
19:31 dalek rakudo-star-daily: 3a48b48 | coke++ | log/ (15 files):
19:31 dalek rakudo-star-daily: today (automated commit)
19:31 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/3a48b48448
19:31 dalek rakudo-star-daily: a4e1771 | coke++ | log/ (13 files):
19:31 dalek rakudo-star-daily: today (automated commit)
19:31 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/a4e1771e70
19:31 dalek perl6-roast-data: df1102b | coke++ | / (6 files):
19:31 dalek perl6-roast-data: today (automated commit)
19:31 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/df1102bbe2
19:31 dalek perl6-roast-data: 0867c6d | coke++ | / (6 files):
19:31 dalek perl6-roast-data: today (automated commit)
19:31 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/0867c6def0
19:31 dalek perl6-roast-data: 3e242db | coke++ | / (6 files):
19:31 dalek perl6-roast-data: today (automated commit)
19:31 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/3e242dbec3
19:31 denis_boyun joined #perl6
19:33 Ven_ joined #perl6
19:34 virtualsue joined #perl6
19:38 denis_boyun_ joined #perl6
19:39 Ven_ joined #perl6
19:43 grondilu m: say ([0, 1] => 1, [0, 1] => 2).classify(*.key);
19:43 camelia rakudo-moar df2245: OUTPUT«"0 1" => [[0, 1] => 1, [0, 1] => 2]␤»
19:43 grondilu it would be nice if classify could return a typed array when relevant.
19:44 grondilu so that ([0, 1] => 1, [0, 1] => 2).classify(*.key) returns [0, 1] => [[0, 1] => 1, [0, 1] => 2]
19:44 * grondilu probably meant "typed Hash"
19:45 denis_boyun joined #perl6
19:45 TimToady indeed, I'd call that a bug
19:45 Ven_ .tell masak you might think my "Map[K, V]" naming is unfortunate, but we can't type hashes.
19:45 yoleaux Ven_: I'll pass your message to masak.
19:45 Ven_ (or we'd look like go: terrible)
19:46 japhb_ .tell brrt Sorry I missed you, please ping me again when you're back
19:46 yoleaux japhb_: I'll pass your message to brrt.
19:46 grondilu it may only be possible when the closure argument given to classify has a clearly identified return type, though.
19:47 TimToady nah, just declare it @hash{Any}
19:47 cognome I don't care with Python, but that will be fun to do it in Perl 6.   https://www.coursera.org/course/automata
19:47 TimToady inheritance has to be good for something
19:48 grondilu ok, then it should be easy to implement.  Nice.
19:48 FROGGS perl6 -e 'use NativeCall; sub xmlParserVersion is cglobal("libxml2") returns Str { * }; say xmlParserVersion;'
19:48 FROGGS 20901
19:48 FROGGS \o/
19:48 FROGGS I'd like to have that as a variable instead of a sub though :/
19:51 DarthGandalf joined #perl6
19:54 denis_boyun joined #perl6
19:56 lizmat FROGGS: Proxy FETCH ?
19:56 FROGGS lizmat: does not work sadly
19:57 FROGGS my $foo is cglobal # <--- that trait is called by Perl6::Actions directly, and I cannot bind anything into that variable at that time
19:58 lizmat but you can "say" it?  then surely you must be able to put the value into a variable
19:58 lizmat if that's possible, shouldn't you be able to wrap that in a Proxy ?
19:58 FROGGS I... don't understand...
19:59 FROGGS ahh
19:59 FROGGS lizmat: I'd like to have variables (with a trait), that fetch C globals
20:00 FROGGS like in: my int $errno is cglobal; say $errno # 2
20:00 FROGGS but that would mean that $errno is a Proxy
20:00 FROGGS and that is something I can't do
20:01 lizmat feels like it should be possible to create a Variable trait that would wrap the variable in question in a Proxy that would fetch the right value on demand
20:01 FROGGS the question is: how
20:02 FROGGS m: multi trait_mod:<is>(Variable $v, :$cglobal!) { $v := Proxy.new( FETCH => -> | { 42 }, STORE => -> | { } ) }; my int $errno is cglobal
20:02 camelia rakudo-moar df2245: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/pdWetpELY1�Type check failed in binding; expected 'Variable' but got 'Int'�at /tmp/pdWetpELY1:1�------> �»
20:02 FROGGS that's my problem
20:03 lizmat I see
20:03 FROGGS I think it explodes in the actions somewhere
20:05 vendethiel FROGGS: can't you ::T that :P ?
20:05 vendethiel for some use
20:05 FROGGS then I thought I might have to fiddle with the container descriptor, like 'is rw' and 'is default' does it... perhaps with a bind constraint
20:06 FROGGS m: multi trait_mod:<is>(::T $v, :$cglobal!) { $v := Proxy.new( FETCH => -> | { 42 }, STORE => -> | { } ) }; my int $errno is cglobal
20:06 camelia rakudo-moar df2245: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/16wfmcWY3xâ�¤Cannot use bind operator with this left-hand sideâ�¤at /tmp/16wfmcWY3x:1â�¤------> [32mTCH => -> | { 42 }, STORE => -> | { } ) [33mâ��[31m}; my int $errno is cglobal[0mâ�¤    expect…»
20:06 FROGGS vendethiel: like this?
20:07 lizmat da bin ich ueberfragt
20:07 vendethiel I see
20:08 lizmat I guess we need jnthn to shed some light on this...
20:08 FROGGS I hope he has his deluminator with him :o)
20:10 lizmat hehe
20:10 lizmat TimToady: re http://irclog.perlgeek.de/perl6/2014-09-01#i_9280131 and S02:642
20:10 synopsebot Link: http://perlcabal.org/syn/S02.html#line_642
20:11 lizmat I would almost say: why don't we do s/ObjAt/WHICH/ in bothe the spec and the code ?
20:11 lizmat *both
20:11 lizmat at S02:652 it even says: "So C<WHICH> still returns a value rather than another object, but that value must be of a special C<ObjAt> type...
20:11 synopsebot Link: http://perlcabal.org/syn/S02.html#line_652
20:12 lizmat so why would be call the object to be returned by WHICH an ObjAt?
20:13 lizmat if we would follow the lead of the .Set coercer, one could even think of .WHICH as a coercer to the identity of the object
20:13 lizmat .Set returns a Set object, .WHICH returns a WHICH object
20:14 lizmat and possibly in the spec only mention that a memory address *could* be part of an identitty, but would not need to be
20:16 nine .tell raiph I'd say it's really made possible by NativeCall. As NativeCall does conversion of char* and int to Perl 6 types for me and converts all other pointers to OpaquePointer types, I didn't have to figure out how to create such objects on MoarVM. The parts where I had to create such objects for Perl 5 I took directly from Inline::Python's source and conerted it to Perl 6.
20:16 yoleaux nine: I'll pass your message to raiph.
20:18 jack_rabbit I have these lines, class HTTPParser::Request::Actions {...}; class HTTPParser::Request::Actions { [definitions and stuff] };
20:18 jack_rabbit But I'm still getting: The following packages were stubbed but not defined:    HTTPParser::Request::Actions
20:19 lizmat do you refer to HTTPParser::R::A between the stub and the class definition?
20:20 jack_rabbit Yes.
20:20 jack_rabbit Here's the full file: http://lpaste.net/110359
20:20 denis_boyun joined #perl6
20:22 * lizmat is looking
20:22 BenGoldberg joined #perl6
20:25 jack_rabbit Weirdly, if I define class HTTPParser { };, it works.
20:26 vendethiel nice, nice, nice; R*!
20:27 jack_rabbit Or if I remove module HTTPParser::Request;
20:29 lizmat why *did* you want to put module in there ?
20:29 lizmat I mean, it's all class oriented
20:29 bjz_ joined #perl6
20:30 lizmat s/class/object/
20:30 jack_rabbit Hmm. I'm probably just confused. What is the purpose of the module keyword anyway?
20:30 TimToady for when you want to export but don't want a class
20:31 TimToady but a class can export too
20:31 jack_rabbit Is there a S** I can read?
20:31 TimToady now, now, watch your language :)
20:31 jack_rabbit heh.
20:31 TimToady S11 and S12, maybe start with S10
20:32 jack_rabbit Also, how would I construct a class hierarchy, where I could just do something like user HTTPParser, and have access to HTTPParser::Request, HTTPParser::Response, etc.
20:32 jack_rabbit s/user/use/
20:32 TimToady those are all in the global namespace once the worlds are merged
20:32 jack_rabbit :/ over my head. I guess I'll read those docs.
20:33 TimToady m: class Foo { class Foo::Bar {} }; say Foo::Bar.new.WHAT
20:33 camelia rakudo-moar df2245: OUTPUT«(Foo::Bar)␤»
20:34 TimToady no need to export the inner class, it's already visible as a global name
20:34 TimToady otoh...
20:34 TimToady m: class Foo { my class Foo::Bar {} }; say Foo::Bar.new.WHAT
20:34 camelia rakudo-moar df2245: OUTPUT«(Foo::Bar)␤»
20:34 lizmat m: module Foo; class Foo::Bar { ... }; class Foo::Bar { }  # golfed down version of the problem
20:34 camelia rakudo-moar df2245: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/eaTcKAzkbXâ�¤The following packages were stubbed but not defined:â�¤    Foo::Barâ�¤at /tmp/eaTcKAzkbX:1â�¤------> [32m }  # golfed down version of the problem[33mâ��[31m<EOL>[0mâ�¤    expecting …»
20:34 TimToady now that's interesting
20:34 TimToady m: class Foo { my class Bar {} }; say Foo::Bar.new.WHAT
20:34 camelia rakudo-moar df2245: OUTPUT«Could not find symbol '&Bar'␤  in method <anon> at src/gen/m-CORE.setting:13290␤  in any find_method_fallback at src/gen/m-Metamodel.nqp:2632␤  in any find_method at src/gen/m-Metamodel.nqp:946␤  in block <unit> at /tmp/Iiy1HQyiHg:1␤␤»
20:35 lizmat TimToady: classes in rakudo do not know their parents
20:36 lizmat m: class Foo::Bar { ... }; class Foo::Bar { }  # this works, the "module Foo" is the interferer
20:36 camelia rakudo-moar df2245: ( no output )
20:36 TimToady was just a little surprised that the inner my class didn't end up being Foo::Foo::Bar or so
20:37 TimToady m: class Foo; class Foo::Bar { ... }; class Foo::Bar { }
20:37 camelia rakudo-moar df2245: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/BTk6YsEQzjâ�¤The following packages were stubbed but not defined:â�¤    Foo::Barâ�¤at /tmp/BTk6YsEQzj:1â�¤------> [32mass Foo::Bar { ... }; class Foo::Bar { }[33mâ��[31m<EOL>[0mâ�¤    expecting …»
20:37 FROGGS TimToady: it is smart about the names :o)
20:37 TimToady m: package Foo { class Foo::Bar { ... }; class Foo::Bar { } }
20:37 camelia rakudo-moar df2245: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/H9KjCQtVF8â�¤The following packages were stubbed but not defined:â�¤    Foo::Barâ�¤at /tmp/H9KjCQtVF8:1â�¤------> [32ms Foo::Bar { ... }; class Foo::Bar { } }[33mâ��[31m<EOL>[0mâ�¤    expecting …»
20:38 TimToady m: package Foo { class GLOBAL::Foo::Bar { ... }; class GLOBAL::Foo::Bar { } }
20:38 camelia rakudo-moar df2245: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Fo3Ze8XCvYâ�¤The following packages were stubbed but not defined:â�¤    Foo::Barâ�¤at /tmp/Fo3Ze8XCvY:1â�¤------> [32mar { ... }; class GLOBAL::Foo::Bar { } }[33mâ��[31m<EOL>[0mâ�¤    expecting …»
20:39 TimToady so not a difference in name interpretation, probably
20:39 lizmat m: class Foo { my class Bar {}; method new { Bar.new } }; say Foo.new.WHAT  # TimToady: even if the class leaks outside, it still is a "Bar"
20:39 camelia rakudo-moar df2245: OUTPUT«(Bar)␤»
20:39 lizmat not a Foo:Bar
20:40 TimToady I know, but .gist isn't trying to give a complete identity in any case
20:42 lizmat m: class Foo {class Bar {}; method new {Bar.new}}; class Bar { }; my $f=Foo.new; my $b=Bar.new; say $f.WHAT, $b.WHAT, $f ~~ $b, $f === $b
20:42 camelia rakudo-moar df2245: OUTPUT«(Bar)(Bar)FalseFalse␤»
20:42 lizmat somehow rakudo knows that the two Bar's are not the same
20:43 TimToady m: class Foo { my class Bar is export {} }; say Foo::Bar.new.WHAT
20:43 camelia rakudo-moar df2245: OUTPUT«Could not find symbol '&Bar'␤  in method <anon> at src/gen/m-CORE.setting:13290␤  in any find_method_fallback at src/gen/m-Metamodel.nqp:2632␤  in any find_method at src/gen/m-Metamodel.nqp:946␤  in block <unit> at /tmp/Dds_yqHEOa:1␤␤»
20:43 bjz joined #perl6
20:43 TimToady m: class Foo { my class Bar is export {} }; import Foo; say Foo::Bar.new.WHAT
20:43 camelia rakudo-moar df2245: OUTPUT«Could not find symbol '&Bar'␤  in method <anon> at src/gen/m-CORE.setting:13290␤  in any find_method_fallback at src/gen/m-Metamodel.nqp:2632␤  in any find_method at src/gen/m-Metamodel.nqp:946␤  in block <unit> at /tmp/6MfI7Pr6DL:1␤␤»
20:43 TimToady m: class Foo { my class Bar is export {} }; import Foo; say Bar.new.WHAT
20:43 camelia rakudo-moar df2245: OUTPUT«(Bar)␤»
20:45 bjz joined #perl6
20:45 kjs_ joined #perl6
20:46 * grondilu wonders how to turn an Array into a Parcel:
20:46 grondilu m: my @a = ^3; say @a.Parcel.WHICH;
20:46 camelia rakudo-moar df2245: OUTPUT«Parcel|(Scalar|84525024)(Scalar|84525024)(Scalar|84525024)␤»
20:47 grondilu ^the scalar is repeated
20:47 TimToady that seems wrongish
20:47 * TimToady is guessing the WHICH is not deconting a loop var
20:47 TimToady lizmat: ^^
20:47 grondilu any workaround?
20:48 TimToady m: my @a = ^3; say @a.list.Parcel.WHICH;
20:48 camelia rakudo-moar df2245: OUTPUT«Parcel|(Scalar|78778384)(Scalar|78778384)(Scalar|78778384)␤»
20:48 TimToady m: my @a = ^3; say @a.eager.Parcel.WHICH;
20:48 camelia rakudo-moar df2245: OUTPUT«Parcel|(Scalar|61785808)(Scalar|61785808)(Scalar|61785808)␤»
20:49 TimToady I think the bug is in .Parcel
20:49 colomon m: my @a = ^3; say @a.list.WHICH;
20:49 camelia rakudo-moar df2245: OUTPUT«Array|69899344␤»
20:49 TimToady er, or Parcel's WHICH
20:49 TimToady list is a noop, likely
20:50 grondilu m: my @a = ^3; say (map +*, @a).Parcel.WHICH;'  # found this workaround
20:50 camelia rakudo-moar df2245: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/TXRfkYIMXsâ�¤Unable to parse expression in single quotes; couldn't find final "'" â�¤at /tmp/TXRfkYIMXs:1â�¤------> [32m.Parcel.WHICH;'  # found this workaround[33mâ��[31m<EOL>[0mâ�¤    expectin…»
20:50 grondilu m: my @a = ^3; say (map +*, @a).Parcel.WHICH;  # found this workaround
20:50 camelia rakudo-moar df2245: OUTPUT«Parcel|(Int|0)(Int|1)(Int|2)␤»
20:50 jack_rabbit How does perl6 look for modules? How should my file containing HTTPParser::Request be named?
20:50 colomon self.^name ~ '|' ~ @(self).map( {'(' ~ .VAR.WHICH ~ ')'} ).join;  # doesn't seem insane….
20:51 TimToady m: my @a = ^3; say @a.Parcel.WHICH; say @a[$_].VAR.WHICH for ^3;
20:51 camelia rakudo-moar df2245: OUTPUT«Parcel|(Scalar|76500888)(Scalar|76500888)(Scalar|76500888)␤Scalar|76500888␤Scalar|76500888␤Scalar|76500888␤»
20:51 TimToady that's interesting
20:51 * TimToady expected the last 3 to be different
20:52 TimToady so maybe the bug is not where I thought
20:52 jack_rabbit HTTPParser.p6 just contains 'use HTTPParser::Request;', but perl6 -I . HTTPParser.p6 gives: Could not find HTTPParser::Request in any of: (...)
20:52 colomon TimToady: what you did is just a restatement of what Parcel.WHICH is doing (my last comment)
20:52 colomon So yeah, bug is in VAR.WHICH somehow?
20:54 TimToady dunno, brane is frazzled right now, probably coming down with something, so should take a nap
20:54 * colomon has no idea what VAR is
20:54 TimToady zzz &
20:55 timotimo hm. now i implemented findcclass and findnotcclass, but many of the "expensive" frames in json parsing are still only spesh'd
20:59 lizmat TimToady: I guess I got caught cheating  :-(
21:00 colomon lizmat: do you understand what's going wrong?
21:01 lizmat I think the problem is deeper, actually:
21:01 lizmat m: my @a = ^3; say @a.Parcel.perl  # not right!
21:01 camelia rakudo-moar df2245: OUTPUT«(ListIter.new(),)␤»
21:01 vendethiel https://www.dropbox.com/s/7h2g8eu3i84nl68/Screenshot%202014-09-01%2015.10.58.png?dl=0 <- whoaw, clojure is getting rails-like debug tools :P I'm jealous
21:02 donaldh joined #perl6
21:05 lizmat colomon: also seems we're missing some coercers:
21:05 lizmat m: say (^3).Parcel
21:05 camelia rakudo-moar df2245: OUTPUT«No such method 'Parcel' for invocant of type 'Range'␤  in block <unit> at /tmp/cQZwNd0A6k:1␤␤»
21:08 colomon lizmat: do we know for sure what Range.Parcel should do?
21:08 lizmat Range.list.Parcel I would think
21:08 colomon m: say 1.Parcel
21:08 camelia rakudo-moar df2245: OUTPUT«No such method 'Parcel' for invocant of type 'Int'␤  in block <unit> at /tmp/jsTLO1Eh8r:1␤␤»
21:09 lizmat Any is missing a method Parcel { self.list.Parcel }
21:09 lizmat adding that now
21:10 dalek rakudo/nom: 556ae70 | (Elizabeth Mattijsen)++ | src/core/Any.pm:
21:10 dalek rakudo/nom: Make sure we can .Parcel anything
21:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/556ae70bda
21:10 * colomon is sure he understands Parcel well enough to be confident that's the right thing to do...
21:10 colomon *isn't
21:10 colomon sigh
21:10 colomon lizmat++
21:10 lizmat look at all the other methods in Any:
21:11 lizmat method elems { self.list.elems }
21:11 lizmat all they do is first coerce to list, then call the method on that
21:11 colomon true
21:12 * colomon is browsing rakudo on github.com
21:16 lizmat I realize what the problem is now
21:17 lizmat basically, it is using the Array's descriptor's address, which is the same for each element
21:17 denis_boyun_ joined #perl6
21:17 * [Coke] yawns.
21:18 colomon lizmat: I thought it might be something like that.  but had no idea how to track it down.
21:18 bjz joined #perl6
21:18 lizmat src/core/Scalar.pm
21:18 raiph joined #perl6
21:23 denis_boyun joined #perl6
21:26 timotimo i've noticed i'm not terribly good at using the profiler yet
21:27 [Coke] r: use Test; is d('2014-03-14').earlier(weeks => 2), d('2014-02-28'), "parrot?"
21:27 camelia rakudo-{parrot,jvm,moar} df2245: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared routine:â�¤    d used at line 1â�¤â�¤Â»
21:27 [Coke] r: use Test; sub d($x) { Date.new($x); }; is d('2014-03-14').earlier(weeks => 2), d('2014-02-28'), "parrot?"
21:27 camelia rakudo-{jvm,moar} df2245: OUTPUT«ok 1 - parrot?␤»
21:27 camelia ..rakudo-parrot df2245: OUTPUT«not ok 1 - parrot?␤␤# Failed test 'parrot?'␤# at /tmp/tmpfile line 1␤# expected: '2014-02-28'␤#      got: '4014-23996-29'␤»
21:27 lizmat m: my @a = (1,1,1); my $b = @a.Parcel; $b[0] = 42 # this should bomb
21:27 camelia rakudo-moar df2245: ( no output )
21:27 [Coke] ^^ lots of recent parrot failures.
21:28 lizmat m: my $b = (1,1,1); $b[0] = 42 # this bombs
21:28 camelia rakudo-moar df2245: OUTPUT«Cannot modify an immutable Int␤  in method assign_pos at src/gen/m-CORE.setting:1867␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2566␤  in block <unit> at /tmp/kjfUqh4xZm:1␤␤»
21:28 lizmat so the List.Parcel is faulty
21:28 [Coke] in fact, that may be all of the recent parrot failures.
21:29 augustus joined #perl6
21:29 itz_ what is $?DISTRO and $?KERNEL supposed to return on non linux UNIX systems?
21:30 augustus quick question all, is there a replacement for plaeteria? where are we supposed to go to read all the p6 blogging?
21:30 lizmat $?DISTRO and $?KERNEL are still NYI afaik
21:30 timotimo augustus: raiph quite dilligently posts interesting stuff on reddit in r/perl6
21:30 lizmat $*DISTRO and $*KERNEL are
21:31 lizmat suggestions on what they should say, are welcome  :-)
21:31 timotimo sadly, the planeteria domain has been taken directly after the current payment stopped
21:31 lizmat yuck
21:31 [Coke] timotimo: where are you getting your intel on that?
21:31 lizmat is there no time between taking it out of DNS and releasing the domain??
21:31 itz_ probably $?DISTRO.name I meant .. and I guess most of the time they are the same
21:32 augustus i thought planeteria was deliberatey shut down, are you saying it was just an oversight?
21:32 grondilu lizmat: after update and recompilation I still get identical scalars with (my @ = ^3).Parcel.WHICH;
21:32 raiph I typically post stuff to /r/perl6 stuff that isn't on planeteria. could we make /r/perl6 our new planeteria?
21:32 yoleaux 20:16Z <nine> raiph: I'd say it's really made possible by NativeCall. As NativeCall does conversion of char* and int to Perl 6 types for me and converts all other pointers to OpaquePointer types, I didn't have to figure out how to create such objects on MoarVM. The parts where I had to create such objects for Perl 5 I took directly from Inline::Python's source and conerted it to Perl 6.
21:32 [Coke] Yes, it was an oversight, the lead tech guy is working on restoring the domain and the service.
21:32 lizmat itz_: src/core/Distro and src/core/Kernel may contain non-linux specific code  :-)
21:33 [Coke] raiph: I thought the point of something like planeteria was that you didn't have to repost.
21:34 augustus coke: ok thanks, good to know. i'll check back periodically and in the meantime check out reddit. does anybody have any idea what kind of readership it had? I know I check it compulsively, but the blogs never got many comments so I always wondered.
21:36 denis_boyun joined #perl6
21:36 [Coke] sorry, no aggregated stats, as far as I know
21:36 timotimo [Coke]: because planeteria is now owned by someone who is "parking" that domain
21:36 [Coke] I have a feedly subscription to r/perl6 which hasn't been updated in 90+ days. :(
21:37 [Coke] timotimo: I have spoken to the tech lead for planeteria, who is working to restore service.
21:37 augustus do we have any stats on rakudo downloads etc? anything to tell us how many ppl are at least trying perl6?
21:37 [Coke] I suspect that a payment was inadvertently missed, but it sounded like he still had the opportunity to renew.
21:38 timotimo [Coke]: good to know, thanks
21:41 [Coke] (weird. feedly's guess at what the URL was was apparently wrong. putting in the manual RSS to /r/perl6 is just fine)
21:41 ggoebel1111112 joined #perl6
21:43 augustus hmm, looks like reddit has a lot more stuff on it than planeteria anyway
21:46 colomon [Coke]: what is the manual RSS to /r/perl6?
21:51 lizmat m: my @a = 1; my $p = @a.Parcel; $p[0] = 42; say @a   # something *REALLY* screwy with List.Parcel
21:51 camelia rakudo-moar df2245: OUTPUT«42␤»
21:51 lizmat ^^^  that should die and at least not change @a
21:52 lizmat if that gets fixed, the Parcel.WHICH problem is also history
21:52 colomon lizmat: isn't that behavior necessary to make array slices work?
21:53 colomon m: my @a = 1; my $p = @a[0..*]; $p[0] = 42; say @a
21:53 camelia rakudo-moar df2245: OUTPUT«42␤»
21:54 dalek rakudo/nom: 0a4af1c | (Elizabeth Mattijsen)++ | src/core/List.pm:
21:54 dalek rakudo/nom: Slight opt for infix:<xx> (more code esthetics)
21:54 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0a4af1c842
21:56 lizmat colomon: indeed, that seems to be the case
21:56 colomon lizmat: when I spectest'ed 556ae70bdabe60c69ca4fdf8a836f84ce6db9701 (your previous, I thknk) I got errors in S32-list/permutations.t, S32-list/uniq.rakudo.t, and integration/99problems-51-to-60.t
21:56 lizmat but then that should probably be called Parcel-rw
21:57 denis_boyun joined #perl6
21:57 colomon hmmm
21:57 kjs_ joined #perl6
22:02 lizmat colomon: integration/99problems-51-to-60.t is a known issue: it segfaults
22:03 lizmat colomon: the other two are fine when I run them
22:04 denis_boyun_ joined #perl6
22:04 lizmat TimToady: looks like the current implementation of .Parcel is more an internal function, *not* a coercer
22:04 Ben_Goldberg joined #perl6
22:06 bjz joined #perl6
22:10 [Coke] perl6.rss
22:10 [Coke] colomon: ^^
22:11 [Coke] Is there anything better than smolder for reporting on TAP results?
22:12 denis_boyun joined #perl6
22:15 [Coke] ah. better path is to probably port TAP::Harness::Junit
22:21 timotimo http://p6weekly.wordpress.com/?p=224&amp;shareadraft=5404f15ed3e76 - can has feedback for the latest weekly?
22:22 flussence ooh neat, never knew wp had a feedback thingy...
22:23 [Coke] ... whee, no need to port since we're still using prove5
22:23 timotimo it's a very necessary thing
22:25 * lizmat gives up on the @a.Parcel.WHICH issues
22:25 lizmat a night of sleep will bring inspiration (I hope)
22:25 lizmat gnight #perl6!
22:25 timotimo gnite lizmat!
22:26 flussence wait, is implementing DESTROY actually happening? that demo I wrote for advent2010 will finally work properly!
22:26 timotimo going to happen soon-ish
22:27 flussence (or at least, I *hope* it'll work properly... though it's been working through 4 years of changes :)
22:27 timotimo what thing did you write in advent2010?
22:27 flussence http://perl6advent.wordpress.com/2010/12/15/day-15-calling-native-libraries-from-perl-6/
22:28 flussence it's survived a zavolaj rewrite and at least one major rakudo refactor. :)
22:33 timotimo d'oh. with MVM_SPESH_DISABLE=1, on my shared host, it gets to "stage mast" and then gets killed
22:33 timotimo that's much further than getting to the middle of stage parse
22:34 timotimo we can obviously still get the memory usage during compilation down further
22:37 timotimo stage parse is now done in 26.680 on my desktop. not sure if it's ever been this low before
22:38 timotimo nothing more in the way of feedback for the weekly?
22:38 flussence one sec...
22:41 [Coke] timotimo: looks good
22:41 [Coke] Did you mention the compiler release last week?
22:41 timotimo i think so, let me double-check
22:41 [Coke] I think you did, now thqt I ask out loud. nevermind.
22:42 timotimo yup, i did mention
22:42 * [Coke] arglebargles, as TAP::Foramtter::JUnit doesn't build on my mac.
22:42 timotimo ;(
22:43 * [Coke] calls SQUIRREL and looks at something else.
22:43 BenGoldberg joined #perl6
22:44 timotimo %)
22:47 flussence if anyone else is proofreading that article preview, throw this in the browser console to make it highlight funny-looking words: «jQuery('.entry-content').attr('contenteditable', true).attr('spellcheck', true);»
22:50 flussence dunno if you saw, timotimo, but I *did* send a bunch of nitpicks through the form on that page :)
22:55 jepeway joined #perl6
22:55 timotimo oh
22:56 timotimo that didn't reach me ;(
22:57 flussence not at all? bleh.
22:58 flussence s/carbin/carlin/; .ucfirst for <youtube rakudo tuesday>;
22:58 flussence not major stuff
23:01 timotimo now i don't know what to work on next in perl6land ... again :P
23:03 xragnar joined #perl6
23:10 [Coke] timotimo: my "LHF" are : make sure every fudge has an RT (or is NYI, or unspecced)
23:10 [Coke] make sure all the spectest runs are clean. If not, fudge them.
23:10 [Coke] Find any tickets that are marked testneeded and test them.
23:10 timotimo hmm, that doesn't seem to inspire me right now
23:11 [Coke] I am currently bisected to find the cause of the giant rakudo-parrot failures.
23:11 [Coke] timotimo: yah, it's boring as f***.
23:11 * timotimo does a benchmark run of nqp with/without jit for 2014.08 and the current nqp head
23:11 timotimo oh
23:11 timotimo actually
23:11 timotimo derp.
23:11 timotimo i built the 2014.08 nqp's with moar/master >_<
23:14 timotimo well, i can still run the master/master benchmarks and then just rebuild the nqp to be proper
23:15 timotimo i still want a proper mechanism for supplying things like "use the most up-to-date moarvm version" vs "use the MOAR_REVISION" on the commandline
23:16 timotimo currently i really update the components.json by hand >_<
23:16 [Coke] for Configure, or for bench?
23:16 [Coke] ah, that sounds like a bench thing
23:21 jepeway ola, peeps.
23:27 itz joined #perl6
23:27 colomon \o
23:29 jepeway o/
23:29 jepeway i'm looking @ RT #122319 , and I have some basic questions unrelated to that RT, more like "can somebody help me with <this-thing-basic-p6-thing-here>"
23:29 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=122319
23:31 jepeway m: DateTime.new(now).local.Str.substr(*-5).say # get the offset for camelia's server's current time (I hope)
23:31 camelia rakudo-moar 0a4af1: OUTPUT«1:30Z␤»
23:31 jepeway m: Date.time(now).local.say # get current time
23:31 camelia rakudo-moar 0a4af1: OUTPUT«No such method 'time' for invocant of type 'Date'␤  in block <unit> at /tmp/EANMnlijqz:1␤␤»
23:32 jepeway ...urk, no.
23:32 jepeway m: DateTime(now).local.say
23:32 camelia rakudo-moar 0a4af1: OUTPUT«Cannot find method 'DateTime'␤  in block <unit> at /tmp/uYs72zdDbC:1␤␤»
23:33 jepeway bleah...not quite.
23:33 jepeway m: DateTime.new(now).say
23:33 camelia rakudo-moar 0a4af1: OUTPUT«2014-09-01T23:33:56Z␤»
23:34 * jepeway catches up...maybe.
23:35 jepeway m: $*TZ = 60*60 ; DateTime(now).local.say
23:35 camelia rakudo-moar 0a4af1: OUTPUT«Cannot find method 'DateTime'␤  in block <unit> at /tmp/RB1Ylyj0ye:1␤␤»
23:36 jepeway m: DateTime(now).in-timezone(60*60).say
23:36 camelia rakudo-moar 0a4af1: OUTPUT«Cannot find method 'DateTime'␤  in block <unit> at /tmp/DJFjcSKvOS:1␤␤»
23:36 jepeway m: DateTime.new(now).in-timezone(60*60).say
23:36 camelia rakudo-moar 0a4af1: OUTPUT«2014-09-02T00:36:30+0100␤»
23:37 * jepeway apologizes for the spam, promises this goes to a question prolly anybody grokking perl6 can answer
23:37 jepeway m: DateTime.new(now).in-timezone(60*60).substr(*-5).say
23:37 camelia rakudo-moar 0a4af1: OUTPUT«No such method 'substr' for invocant of type 'DateTime'␤  in block <unit> at /tmp/UayAZ0LPUB:1␤␤»
23:37 jepeway m: DateTime.new(now).in-timezone(60*60).subst(*-5).say
23:37 camelia rakudo-moar 0a4af1: OUTPUT«No such method 'subst' for invocant of type 'DateTime'␤  in block <unit> at /tmp/29eQ_R0j7b:1␤␤»
23:38 timotimo .Str.substr?
23:38 jepeway m: DateTime.new(now).in-timezone(60*60).Str.subst(*-5).say
23:38 camelia rakudo-moar 0a4af1: OUTPUT«Cannot call 'subst'; none of these signatures match:␤:(Cool: Any $matcher, Any $replacement, *%adverbs)␤:(Str: Any $matcher, Any $replacement, Any :ii(:samecase($samecase)), Any :ss(:samespace($samespace)), Any :SET_CALLER_DOLLAR_SLASH($SET_CALLER_DOLL…»
23:38 jepeway m: DateTime.new(now).in-timezone(60*60).Str.substr(*-5).say
23:38 camelia rakudo-moar 0a4af1: OUTPUT«+0100␤»
23:38 timotimo ah, you know that already
23:38 timotimo subst is for "substitute"
23:38 jepeway timotimo: ty
23:38 timotimo jepeway: if you're worried about posting too much stuff, you can also talk to camelia in a query
23:40 xenoterracide joined #perl6
23:41 jepeway timotimo: mostly have this worked out with locally compiled rakudo, just too...er...non-proficient to present it well enough.
23:41 jepeway m: DateTime.new(now + $_ * 60 * 60 * 24).in-timezone(60*60).Str.substr(*-5).say for ^3
23:41 camelia rakudo-moar 0a4af1: OUTPUT«+0100␤+0100␤+0100␤»
23:41 timotimo that's fine, we're a patient bunch ;)
23:42 jepeway so...how do I change that ^3 to a ^365 and stick it all in a set and print all the set elts?
23:42 timotimo elts?
23:42 jepeway elements, sorry.
23:43 timotimo you can ^365.map({ DateTime.new...substr(*-5) }).Set.say
23:43 timotimo otherwise you can have the same code you had up there and put a ( at the beginning and a ).Set.say after the "for ^356"
23:43 jepeway omg...hrm...trying to grok
23:43 timotimo hehe
23:44 TimToady well, except say gives up after 100 elements now
23:44 timotimo oh
23:44 timotimo in that case you probably want .fmt("%s")?
23:44 timotimo or .print?
23:44 timotimo or .Str.say
23:44 TimToady well, just stringify and say
23:44 timotimo .Str.say should be the most elegant, yeah
23:44 jepeway should only be 2 elements in the set, problem is there's just one.
23:44 * jepeway trying the ().Set.say locally.
23:44 timotimo oh, a *set*, derp :)
23:44 TimToady oh, right,
23:44 TimToady derp too.
23:45 timotimo i'm not 100% sure why that ought to give two different values?
23:45 TimToady standard vs daylight savings
23:45 jepeway TimToday: yuppers.
23:45 timotimo does "in-timezone" give you that, actually?
23:46 timotimo (ugh, dates)
23:47 TimToady of course, in +0100 it's more likely "summer time" :)
23:49 jepeway m: "summer time".subst("sum", "ha") # worky?
23:49 camelia rakudo-moar 0a4af1: ( no output )
23:49 jepeway m: "summer time".subst("sum", "ha").say # worky?
23:49 camelia rakudo-moar 0a4af1: OUTPUT«hamer time␤»
23:49 jepeway heh.
23:49 jepeway m: (DateTime.new(now + $_ * 60 * 60 * 24).local.Str.substr(*-5) for ^365).Set.say # should be 2 elts: -0400 & -0500
23:50 camelia rakudo-moar 0a4af1: OUTPUT«set(9:59Z, 0:00Z, 0:01Z, 0:02Z, 0:03Z, 0:04Z, 0:05Z)␤»
23:50 jepeway oh, sorry, .local is a bust when $*TZ is 0.
23:50 timotimo aaah
23:50 timotimo camelia ought to CTCP Time the person that sends an evaluation request and set the time zone accordingly :P
23:51 kst joined #perl6
23:52 jepeway m: (DateTime.new(now + $_ * 60 * 60 * 24).in-timezone(-60*60*4).Str.substr(*-5) for ^365).Set.say # might like this to be 2 elts (-0400 & -0500) in US/Eastern timezone
23:52 camelia rakudo-moar 0a4af1: OUTPUT«set(-0400)␤»
23:52 timotimo it's definitely nice that you're torturing our datetime implementation :)
23:53 jepeway but DateTime isn't sensitive to timezone rules, just current timezone offset
23:53 jepeway timotimo: blame/praise FROGGS++, he put me onto this RT
23:53 jack_rabbit IO::Socket::INET is not available through panda?
23:57 jepeway and since offsets don't map back to rules, then you can't determine localtime for any time other than "now"...well, so I'm thinking/guessing atm.

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

Perl 6 | Reference Documentation | Rakudo