Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-05-17

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:30 AlexDaniel joined #perl6
00:54 telex joined #perl6
01:03 quester left #perl6
01:13 skids joined #perl6
01:18 AlexDaniel joined #perl6
01:42 aborazmeh joined #perl6
01:47 aborazmeh joined #perl6
01:49 ilbot3 joined #perl6
01:49 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
01:58 aborazmeh joined #perl6
01:58 aborazmeh joined #perl6
02:02 noganex joined #perl6
02:29 rmgk_ joined #perl6
02:59 noganex_ joined #perl6
02:59 * raydiak looks around and doesn't see hugme
03:35 zacts joined #perl6
03:45 kurahaupo1 joined #perl6
03:46 jack_rabbit joined #perl6
03:57 zostay FROGGS: life insanity has begun, but been trying out the cunion branches... i think your code dealing with unions is very close to working
03:59 zostay this might be a more general issue, but nativesize is not quite calculating what sizeof does when i write a similar C program for my structs, so i suspect some of the internal address offsets are off which is still leading to segfaults here and there
04:05 Sqirrel joined #perl6
04:56 jepeway joined #perl6
05:13 kaare_ joined #perl6
05:24 dolmen joined #perl6
05:26 quester joined #perl6
05:45 Patterner joined #perl6
06:17 dalek roast: 9a8babf | usev6++ | S12-class/basic.t:
06:17 dalek roast: Fix test for inline use of class trait 'is'
06:17 dalek roast: This requires the 'also' declarator -- see commit e2dc809a2a
06:17 dalek roast: to the synopsis
06:17 dalek roast: review: https://github.com/perl6/roast/commit/9a8babf191
07:03 chenryn joined #perl6
07:07 xfix joined #perl6
07:07 xfix joined #perl6
07:16 FROGGS joined #perl6
07:16 FROGGS zostay: can you provide examples?
07:17 rindolf joined #perl6
07:17 FROGGS zostay: is the difference eight bytes by any chance? than it is most likely the vtable pointer
07:18 FROGGS zostay: you need to add that manually atm
07:22 FROGGS TimToady: the unit keyword warning somehow breaks a precomp test in Inline::Perl5
07:23 FROGGS TimToady: https://gist.github.com/FR​OGGS/f200d30c9cdaa58b8853
07:27 [Sno] joined #perl6
07:32 dolmen joined #perl6
07:32 FROGGS ohh!
07:33 FROGGS TimToady: CompUnit.precomp (in rakudo) spawn a child process with 2>&1, so everything on stderr breaks it (and so does RAKUDO_MODULE_DEBUG=1)
07:38 * FROGGS tests a fix
07:41 dayangkun joined #perl6
07:41 koo6 joined #perl6
07:43 dalek rakudo/nom: a25bf49 | FROGGS++ | src/core/CompUnit.pm:
07:43 dalek rakudo/nom: let CompUnit.precomp not chocke on msgs on STDERR
07:43 dalek rakudo/nom:
07:43 dalek rakudo/nom: Warnings like about missing unit keyword or just using RAKUDO_MODULE_DEBUG=1
07:43 dalek rakudo/nom: were able to let it fail.
07:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a25bf49197
07:43 FROGGS that fixes Inline::Perl5 ^^
07:43 FROGGS [Tux]: ^^
07:43 FROGGS choke*
07:57 lizmat FROGGS++
08:08 diana_olhovik_ joined #perl6
08:10 RabidGravy joined #perl6
08:21 espadrine joined #perl6
08:23 gfldex joined #perl6
08:45 berekuk joined #perl6
08:59 rindolf joined #perl6
08:59 darutoko joined #perl6
09:04 FROGGS joined #perl6
09:07 lizmat TimToady: re introduction of "unit", that takes me back: http://en.wikipedia.org/wiki/TUTOR_(program​ming_language)#Structure_of_a_TUTOR_lesson
09:09 berekuk joined #perl6
09:17 eli-se joined #perl6
09:18 jnthn There is nothing new under the sun... :)
09:20 araujo joined #perl6
09:21 berekuk joined #perl6
09:23 [Tux] FROGGS, https://gist.github.com/Tux/f155efad071d66080e22
09:24 domidumont joined #perl6
09:29 domidumont joined #perl6
09:46 FROGGS joined #perl6
09:49 FROGGS [Tux]: what does that paste mean? all looks good
09:50 FROGGS [Tux]: is that a confirmation that I::P5 works?
09:51 FROGGS jnthn: you already had a cuppa? (wanna talk about inlined structs/unions)
09:52 FROGGS lizmat: you can review the curly branch in rakudo and panda if you want... I'm pretty happy with it
09:53 FROGGS lizmat: TL
09:53 FROGGS hmpf
09:54 FROGGS lizmat: TL;DR we use CompUnits now where we mixed CompUnits and hashes, and it moves towards a 'master index'
09:55 FROGGS lizmat: and a very important thing to make panda work: %*CUSTOM_LIB contains CURs again...
09:55 jnthn FROGGS: I'd like to, but unfortunately must head off to the airport right now
09:55 masak good noon, #perl6
09:56 lizmat FROGGS: haven't looked yet
09:56 lizmat but having %CUSTOM_LIB contain CUR objects, feels wrong
09:56 FROGGS jnthn: k
09:56 lizmat it should contain CUR specifications
09:57 FROGGS lizmat: why ooc?
09:57 lizmat to be looked up / instantiated when they are needed
09:57 FROGGS lizmat: to increase performance?
09:57 lizmat because you may not need any of them
09:57 lizmat indeed
09:57 FROGGS lizmat: we have like *no* slowdown when we create CURs today
09:58 FROGGS because there is no json and we lazily deserialize the MANIFEST file (a moarvm blob)
09:59 lizmat still it feels like overkill to me when you're doing e.g. the REPL of -e
09:59 * jnthn bbl &
09:59 lizmat *or
09:59 lizmat CompUnitRepo.new($spec) should be quick as well  :-)
10:00 lizmat also: fwiw, I think CUSTOM_LIB should never contain any "file#..." specs (in the future)
10:00 FROGGS lizmat: ahh, this is how we do it? dang, I did use INCLUDE-SPEC2CUR directly :o)
10:00 lizmat well, that's ok for internal use
10:00 FROGGS lizmat: yes, it only contains inst# right now
10:00 FROGGS yeah, thought so...
10:00 lizmat cool
10:01 FROGGS np, I can put inst# string in CUSTOM_LIB, and panda calls CUR.new on these...
10:01 lizmat in the future, by default, @?INC should not contain any "file#" specs either
10:01 lizmat but we need one now for the pragma-like modules such as Test / NativeCall etc
10:02 lizmat (which I had fixed, until I found out about the way how module loading is precomped  :-(  )
10:02 FROGGS I see
10:03 lizmat make install in the future should use CURLI.install
10:03 lizmat rather than moving files in place
10:03 lizmat but that's for later, I would think
10:03 FROGGS lizmat: make install calls CURLI.install for ages now
10:03 lizmat huh?
10:04 FROGGS ahh, you are talking about the rakudo makefile
10:04 lizmat /usr/local/bin/perl -MExtUtils::Command -e cp lib/NativeCall.pm lib/Test.pm lib/lib.pm6 /Users/liz/Github/rakudo.mo​ar/install/share/perl6/lib
10:04 lizmat doesn't look like 'CURLI.install' to me  :-)
10:04 lizmat yes
10:05 dalek roast: 1aa6326 | usev6++ | S32-list/rotor.t:
10:05 dalek roast: Fudge dying tests for rakudo.jvm
10:05 dalek roast:
10:05 dalek roast: UnwindException, see RT #124279
10:05 dalek roast: review: https://github.com/perl6/roast/commit/1aa632669d
10:05 [Tux] FROGGS, yes, confirm
10:06 mr-foobar joined #perl6
10:06 FROGGS lizmat: sorry, was thinking panda
10:06 lizmat ah, ok  :-)
10:07 spider-mario joined #perl6
10:07 FROGGS but yeah, I want to make CURLF.install also work in near future
10:07 lizmat FROGGS: why?
10:07 lizmat why treat Test.pm different from any other installed module ?
10:07 FROGGS lizmat: to then the Panda::Installer.install is a single line method
10:07 FROGGS s/to//
10:08 lizmat I'm not saying Test should be installed using panda, it should be installed with CURLI.install
10:08 FROGGS I dont want to treat Test.pm differently...
10:08 FROGGS yes, correct
10:08 lizmat ok,  :-)
10:08 FROGGS we install compiler stuff via CURLI to 'perl', but also extend CURLF
10:09 lizmat I would almost be against having CURLF.install work
10:09 lizmat it is intended for dev work, in my book
10:09 lizmat it is for hysterical reasons that we use it for installed modules at all
10:09 FROGGS I don't mind to have an alternative # TIMTOWTDI
10:10 FROGGS like, if CURLI is unable to cope with C libs or other resources, one might want to use a CURLF instead
10:10 lizmat If you install a module A in a CURLF, you're effectively hiding *all* module A's in CURLI's following it
10:10 FROGGS depends on the order of the CURs clearly
10:11 lizmat true, but CURLF's usually appear in -I
10:11 lizmat so are at the front
10:11 FROGGS well, the defaults are up to us
10:12 FROGGS panda for example prefers site, which is a CURLI
10:12 lizmat well, my feeling is that if you're trying to install something with a CURLF, you're doing it wrong  :-)
10:12 lizmat CURLF functionality in my vision, is for development only and never for production
10:12 FROGGS providing only one way is wrong :o)
10:12 lizmat install implies production to me
10:13 FROGGS and what if the CURLI does not work for you application? switch to python?
10:13 lizmat when would CURLI not work for your application?   Maybe we need to fix CURLI then
10:13 lizmat ?
10:13 FROGGS atm C libs are a problem
10:13 lizmat agree, and that should be fixed
10:14 FROGGS which is quite hard
10:14 lizmat that to me is not a reason to use CURLF's (other than to now work around that problem)
10:14 lizmat It was never going to be easy, I'm told  :-)
10:15 FROGGS I am just saying that I cannot predict what problems will occour in future, so I'm saying we shall not restrict the usage of anything, just we think one thing is better than the other
10:15 FROGGS that's not perlish
10:16 lizmat true, but I don't want to make it easy to descend into Perl5 dependency hell either
10:16 lizmat which I think is what CURLF + install in the end is
10:17 FROGGS then CURLF should not be a default installation target
10:17 lizmat agree  :-)
10:17 FROGGS m: say %*CUSTOM_LIB<site>
10:17 camelia rakudo-moar a25bf4: OUTPUT«/home/camelia/rakudo​-inst-2/share/perl6/site␤»
10:17 FROGGS that should have 'inst#' at front me thinks...
10:17 lizmat that should probably have an "inst#" prefixed
10:18 lizmat yup
10:18 FROGGS I'll make it so in the curly branch
10:18 lizmat cool!
10:18 FROGGS m: say CompUnitRepo.new('inst#/tmp')
10:18 camelia rakudo-moar a25bf4: OUTPUT«inst:/tmp␤»
10:18 FROGGS why do we have that colon there? that's wrong, right?
10:19 lizmat yeah,
10:19 lizmat fixing
10:20 dalek rakudo/nom: f1a21af | lizmat++ | src/core/CompUnitRepo/Locally.pm:
10:20 dalek rakudo/nom: Fix gist, spotted by FROGGS++
10:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f1a21afb39
10:21 FROGGS why do we have 'inst#.../site' in @*INC at all?
10:21 FROGGS err, 'file#...site'
10:22 lizmat I don't know
10:22 lizmat hysterical raisings
10:22 FROGGS k
10:23 lizmat in the work I did, that was stopped by the precomping use issue, it had only none
10:23 lizmat and Test.pm and friends were loaded directly as if they were pragmas
10:23 moritz http://journal.stuffwithstuff.com/201​0/10/29/bootstrapping-a-type-system/ # some fun read for those who like bootstrapping chainsaws
10:23 lizmat alas, I can't push that as it will break e.g. Inline::Perl5
10:24 lizmat or any other module that has a 'use' in a precomped file  :-(
10:24 lizmat specifically for NativeCall
10:26 lizmat :-(
10:26 FROGGS lizmat: I can look at that in the next days
10:26 lizmat cool, am looking at it as well, apart frok
10:27 lizmat from backlogging and some other stuff I need to do  :-)
10:36 dalek rakudo/curly: dff8eca | FROGGS++ | src/core/Inc.pm:
10:36 dalek rakudo/curly: let %*CUSTOM_LIB only contain cur-specs (strings)
10:36 dalek rakudo/curly: review: https://github.com/rakudo/rakudo/commit/dff8eca8ba
10:37 FROGGS panda works with this now too
10:40 lizmat FROGGS++
10:43 FROGGS now I need stuff to jvm :o(
10:43 FROGGS need to port*
10:45 lizmat :-(
10:48 dalek perl6-examples: 8a0f35b | paultcochrane++ | t/categories/cookbook/03dates-and-times.t:
10:48 dalek perl6-examples: [cookbook] match today's date output more generally
10:48 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/8a0f35b575
10:48 dalek perl6-examples: b5db17c | paultcochrane++ | lib/Benchmark.pm:
10:48 dalek perl6-examples: Remove Benchmark.pm
10:48 dalek perl6-examples:
10:48 dalek perl6-examples: It's not used by any of the code in the examples project anymore.
10:48 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/b5db17c7a5
10:48 dalek perl6-examples: 554f0c2 | paultcochrane++ | lib/ (4 files):
10:48 dalek perl6-examples: Remove old configuration-related files
10:48 dalek perl6-examples:
10:48 dalek perl6-examples: These are no longer required in the examples project in its current form.
10:48 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/554f0c285f
10:48 dalek perl6-examples: 2c5122d | paultcochrane++ | lib/P (3 files):
10:48 dalek perl6-examples: Add unit keyword to module definitions
10:48 dalek perl6-examples:
10:48 dalek perl6-examples: This is now required when defining a module whose scope is only within the
10:48 dalek perl6-examples: current unit.
10:48 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/2c5122d797
10:48 dalek perl6-examples: 2766d32 | paultcochrane++ | t/categories/cookbook/03dates-and-times.t:
10:48 dalek perl6-examples: [cookbook] handle hires time check better
10:48 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/2766d3262f
10:50 ssqq joined #perl6
10:53 ssqq m: grammar G { our token foo is export { foo } }; import G; if 'foo' ~~ / <foo> / { say ~$/ }
10:53 camelia rakudo-moar f1a21a: OUTPUT«Type check failed in binding <anon>; expected 'G' but got 'Cursor'␤  in regex foo at /tmp/ALsRyTT5pH:1␤  in block <unit> at /tmp/ALsRyTT5pH:1␤␤»
10:53 FROGGS ssqq: yes, that's not fixed yet
10:53 FROGGS m: grammar G { our token foo(Mu:) is export { foo } }; import G; if 'foo' ~~ / <foo> / { say ~$/ }
10:53 camelia rakudo-moar f1a21a: OUTPUT«foo␤»
10:54 FROGGS I guess the fix is about a single line in our actions
10:54 lizmat afk for a bit&
10:55 ssqq FROGGS: I think irc interpreter have been use newest version.
10:56 FROGGS ssqq: yes, camelia here rebuilds rakudo every hour
10:56 vendethiel joined #perl6
10:57 ssqq FROGGS: not at all, It's a bug, then next version would fix it.
10:57 FROGGS ssqq: I don't get what you are saying
10:59 ssqq FROGGS: pls ignore it.
11:00 FROGGS ó.ò
11:13 BizarreCake joined #perl6
11:13 BizarreCake left #perl6
11:20 araujo joined #perl6
11:20 araujo joined #perl6
11:25 dalek doc: 0a73e46 | paultcochrane++ | lib/Language/regexes.pod:
11:25 dalek doc: Add examples to general quantifier discussion
11:25 dalek doc: review: https://github.com/perl6/doc/commit/0a73e46edf
11:29 dalek doc: 17222ff | paultcochrane++ | lib/Pod/ (2 files):
11:29 dalek doc: Add 'unit' declarator to module definitions
11:29 dalek doc: review: https://github.com/perl6/doc/commit/17222ff347
11:31 diana_olhovik joined #perl6
11:48 rindolf joined #perl6
11:49 eli-se joined #perl6
11:50 dalek perl6-examples: a6f5d56 | paultcochrane++ | categories/shootout/revcomp-v2.p6:
11:50 dalek perl6-examples: [shootout] replace Nil with Empty
11:50 dalek perl6-examples:
11:50 dalek perl6-examples: The meaning of Nil has been changed and it is appropriate in some cases to
11:50 dalek perl6-examples: use Empty instead.
11:50 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/a6f5d569bd
11:59 lolisa joined #perl6
12:01 [Tux] m: my@x=(1..3).map({{c3=>3}});@x.perl.say
12:01 camelia rakudo-moar f1a21a: OUTPUT«[{:c3(3)}, {:c3(3)}, {:c3(3)}]<>␤»
12:01 [Tux] my@x=(1..3).map({{c3=>~(10*$_+3)}});@x.perl.say
12:01 [Tux] m: my@x=(1..3).map({{c3=>~(10*$_+3)}});@x.perl.say
12:01 camelia rakudo-moar f1a21a: OUTPUT«[:c3("13"), :c3("23"), :c3("33")]<>␤»
12:02 [Tux] isn't that extremely inconsistent?
12:02 [Tux] I for sure expected a list of hashes the second time too
12:03 bjz joined #perl6
12:06 [Tux] should I RT that? lizmat ?
12:11 spider-mario joined #perl6
12:19 cognominal joined #perl6
12:20 AlexDaniel joined #perl6
12:26 sue_ joined #perl6
12:31 FROGGS [Tux]: can't you make use of whitespace? just a little?
12:35 [Tux] i can, but I removed all of the whitespace to be sure not to conflict with Slang::Tuxic
12:35 [Tux] this was golfing down from a larger example
12:35 [Tux] m: my @x = (1..3).map({ { c3 => 3 } }); @x.perl.say
12:35 camelia rakudo-moar f1a21a: OUTPUT«[{:c3(3)}, {:c3(3)}, {:c3(3)}]<>␤»
12:36 [Tux] m: my @x = (1..3).map({ { c3 => ~(10 * $_ + 3) } }); @x.perl.say
12:36 camelia rakudo-moar f1a21a: OUTPUT«[:c3("13"), :c3("23"), :c3("33")]<>␤»
12:36 [Tux] m: my $x = 1; my @x = (1..3).map({ { c3 => $x } }); @x.perl.say
12:36 camelia rakudo-moar f1a21a: OUTPUT«[{:c3(1)}, {:c3(1)}, {:c3(1)}]<>␤»
12:36 * DrForr scratches his head over select().
12:37 DrForr More accurately, the replacement(s).
12:39 FROGGS [Tux]: it is not inconstant btw
12:39 FROGGS { c3 => 3 } is a hash
12:40 FROGGS { c3 => ~(10 * $_ + 3) } is a closure generating a pair
12:40 FROGGS m: say { c3 => 3 }.perl
12:40 camelia rakudo-moar f1a21a: OUTPUT«{:c3(3)}␤»
12:40 FROGGS m: say { c3 => ~(10 * $_ + 3) }
12:40 camelia rakudo-moar f1a21a: OUTPUT«-> ($_? is parcel) { #`(Block|60593520) ... }␤»
12:40 FROGGS m: say { c3 => ~(10 * $_ + 3) }(1)
12:40 camelia rakudo-moar f1a21a: OUTPUT«c3 => 13␤»
12:40 [Tux] how frustrating
12:41 FROGGS that happens when we use curlies for both hashes and codes
12:41 FROGGS err, blocks
12:41 [Tux] what would be the correct syntax for returning a hash?
12:41 * [Tux] tried an extra pair of {} but to no avail
12:42 RabidGravy joined #perl6
12:43 FROGGS m: my @x = (1..3).map({ :c3(~(10 * $_ + 3)).hash.item }); @x.perl.say
12:43 camelia rakudo-moar f1a21a: OUTPUT«[{:c3("13")}, {:c3("23")}, {:c3("33")}]<>␤»
12:43 FROGGS m: my @x = (1..3).map({ $%(:c3(~(10 * $_ + 3))) }); @x.perl.say # linenoisify al the things /o/
12:43 camelia rakudo-moar f1a21a: OUTPUT«[{:c3("13")}, {:c3("23")}, {:c3("33")}]<>␤»
12:45 koo6 joined #perl6
12:47 dalek nqp/curly: 22827fa | FROGGS++ | src/vm/jvm/ (3 files):
12:47 dalek nqp/curly: first stab at implementing scdisclaim for jvm
12:47 dalek nqp/curly: review: https://github.com/perl6/nqp/commit/22827fac04
12:49 [Tux] hmm, so a for-loop it is :P
12:51 FROGGS [Tux]: the scdislaim stuff, or your .map?
12:51 [Tux] the map
12:51 [Tux] for (1..9) -> $x { @rx.push: { c3 => ~(10 * $x + 3) }};
12:52 FROGGS yes
12:53 BenGoldberg joined #perl6
12:53 * FROGGS wants to play with post-GLR stuff
13:05 dolmen joined #perl6
13:15 raiph joined #perl6
13:19 FROGGS nqp: my $l := nqp::list_s(); say(nqp::join('', $l)) # :o(
13:19 FROGGS ups
13:20 camelia joined #perl6
13:22 FROGGS nqp-m: my $l := nqp::list_s(); say(nqp::join('', $l)) # :o)
13:22 camelia nqp-moarvm: OUTPUT«␤»
13:22 FROGGS nqp-j: my $l := nqp::list_s(); say(nqp::join('', $l)) # :o(
13:22 camelia nqp-jvm: OUTPUT«(signal ABRT)*** Error in `java': free(): invalid pointer: 0x00007fe28401d740 ***␤#␤»
13:22 FROGGS how do I join a list_s?
13:25 diana_olhovik_ joined #perl6
13:25 FROGGS huh, it works locally with nqp-j...
13:27 FROGGS j: use nqp; my Mu $l := nqp::list_s(); nqp::push_s($l, "huh"); say(nqp::join("", $l))
13:27 camelia rakudo-jvm f1a21a: OUTPUT«huh␤»
13:30 raiph joined #perl6
13:34 bartolin j: say { $^a }.assuming(123)() # leads to spectest failures on JVM (S06-currying/assuming-and-mmd.t)
13:34 camelia rakudo-jvm f1a21a: OUTPUT«Method 'Mu' not found for invocant of class 'Parcel'␤  in block <unit> at /tmp/6T13UDTaeW:1␤␤»
13:34 bartolin strangly, the following "patch" makes it work: https://gist.github.com/usev6/d29f551093a704624663
13:35 bartolin I have no idea why adding a line '1;' to 'method assuming' changes this ...
13:35 FROGGS uhh
13:37 bartolin that's what I thought, too *g*
13:37 FROGGS yeah, I guess it is an optimizer bug
13:39 bartolin yes, that would explain. I'll rakudobug it
13:40 eli-se joined #perl6
14:01 leedo_ folks are aware that Inline::Perl5 is currently busted, I assume?
14:01 leedo_ (had a thought to play around with wrapping some Plack stuff with perl6)
14:04 leedo_ well, anyways, here is the error I'm seeing when building it: https://gist.github.com/leedo/b237669f1e6ad88dc92a
14:05 dalek roast: 6302ae8 | usev6++ | S (3 files):
14:05 dalek roast: Fudge tests for method assumoing on JVM, RT #125207
14:05 dalek roast: review: https://github.com/perl6/roast/commit/6302ae8ffa
14:07 FROGGS leedo_: that's an issue on your end
14:08 FROGGS leedo_: you have compiled your perl 5 without -fPIC
14:08 leedo_ ah, ok
14:08 leedo_ now to figure out how ot tell plenv to include that option
14:08 fhelmberger joined #perl6
14:09 FROGGS yeah...
14:10 FROGGS I know that Inline::Perl5 works because I just fixed latest rakudo in that regard :o)
14:11 leedo_ cool, good to know! thanks :)
14:16 telex joined #perl6
14:16 dalek nqp: ab80bb3 | TimToady++ | src/QRegex/Cursor.nqp:
14:16 dalek nqp: faster cstack traversal
14:16 dalek nqp:
14:16 dalek nqp: Cut down statement lists by 3/4 by not pushing cursors that MATCH
14:16 dalek nqp: won't be interested in.  In MATCH, if there's only one destination,
14:16 dalek nqp: don't keep looking up the same hash entry over and over.
14:16 dalek nqp: review: https://github.com/perl6/nqp/commit/ab80bb3fac
14:18 dalek rakudo/nom: 550b8c3 | TimToady++ | src/core/Cursor.pm:
14:18 dalek rakudo/nom: faster cstack traversal
14:18 dalek rakudo/nom:
14:18 dalek rakudo/nom: Don't keep looking up the same hash entry over and over, if there's
14:18 dalek rakudo/nom: only one.  (Stage parse looked up statement 2000 times in a row.)
14:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/550b8c3cfd
14:19 TimToady well, that last one was nqp's fault, really
14:20 TimToady this is mostly prep work for making lazier Match generation
14:22 FROGGS uhh, TimToady++
14:25 * araujo checks perl6/rakudo after a while
14:27 rindolf joined #perl6
14:42 masak araujo: \o
14:47 sue__ joined #perl6
14:57 araujo masak, hola, how that goes? :)
15:00 eli-se joined #perl6
15:01 masak too distracted by $work and @family to get much Perl 6 done... but alive and well, and happy with things :)
15:01 masak araujo: how's with you?
15:02 araujo masak, hehe, real life taking most of my time too, but trying to check cool stuff around whenever I can :)
15:04 masak :)
15:04 masak oh, that reminds me
15:04 diana_olhovik_ joined #perl6
15:05 masak my send+more=money recursive solution broke after TomToady's `for flat` change
15:05 masak TimToady*
15:05 masak it's here https://gist.github.com/masak/7a1d​84435d2bca36b717#file-sendmore-p6
15:05 masak and it doesn't work anymore :/
15:06 masak all the obvious things I tried failed
15:06 masak could someone help me? when it works, it's "supposed to" run for 28 minutes and produce 1 solution.
15:14 molaf_ joined #perl6
15:14 masak ok, just tried it, and it seems to work :)
15:14 masak false alarm.
15:20 zakharyas joined #perl6
15:25 kurahaupo joined #perl6
15:29 cognominal joined #perl6
15:29 anaeem1 joined #perl6
15:31 skids joined #perl6
15:38 BenGoldberg joined #perl6
15:39 BenGoldberg joined #perl6
15:41 timotimo i like the sound of those cstack patches
15:42 timotimo noticable change in parse time?
15:46 dalek roast: 19da7de | usev6++ | S01-perl-5-integration/ (4 files):
15:46 dalek roast: Make sure to skip p5 integration tests when no perl5 compiler is available
15:46 dalek roast: review: https://github.com/perl6/roast/commit/19da7defa4
15:51 ugexe hmm moar is failing to build for me today: Stage parse      : Internal error: zeroed target thread ID in work pass
15:51 ugexe well, rakudobrew on moar
15:52 DrForr .tell hoelzro I've got a primitive callback example ready, easy enough to write but the C-specific stuff like FD_ZERO and select() needs thinking about.
15:52 yoleaux DrForr: I'll pass your message to hoelzro.
15:52 ugexe er rakudo
15:53 DrForr .tell hoelzro It's a direct translation of the C code, look at examples/cb-echo.pl6
15:53 yoleaux DrForr: I'll pass your message to hoelzro.
15:59 raydiak rakudobrew build moar just completed successfully here (64-bit linux)
16:01 ugexe i tried 3 times and got the same error every time (nuked and cleared git_reference)
16:07 raydiak can you think of any env vars set or other relevant customizations or applicable special cases that might make your system different from any other in this regard?
16:08 * raydiak wonders what besides env vars might affect it...
16:09 raydiak like the build tools or something *shrug*
16:12 ugexe no... jvm builds tho
16:13 ugexe time to regress backwards and see which commit doesn't like me
16:13 kaare_ joined #perl6
16:20 ugexe looks like its the faster cstack traversal for nqp or rakudo that my system isnt happy with
16:21 AlexDaniel I've seen a snippet in p6weekly for finding all unicode characters that represent numbers, but is there anything to check the equivalence of letters? For example, I want to find all characters that are equivalent to letter R. The snippet was: say (0..0xFFF0).chrs.join('') ~~ m:g/<:NumericValue({+$_ > 0})>+/
16:21 yoleaux 17 Nov 2014 05:26Z <Mouq> AlexDaniel: https://github.com/lue/p6mode
16:21 ugexe i take that back, it just makes it past stage 0. just died on stage 2 with Stage mast       : No registered operation handler for 'scdisclaim'
16:22 AlexDaniel yoleaux: oh what's that?
16:22 AlexDaniel ohhh
16:22 ugexe not sure how that jvm code is affecting my moar build
16:25 timotimo ugexe: sounds like we need to bump the moar revision?
16:29 ugexe possibly... not sure i know how to test for that. although its odd that raydiak was able to build ok
16:31 dalek roast: 2126474 | usev6++ | S05-metasyntax/unicode-property-pair.t:
16:31 dalek roast: Extend scope of fudging, use 'skip' instead of 'todo'
16:31 dalek roast: review: https://github.com/perl6/roast/commit/212647474d
16:32 skids Moar just built OK for me.
16:32 skids r-m actually
16:33 skids .oO(the disadvantage of maintaining Sum is waiting for the tests to complete on every panda refresh)
16:35 ugexe i was able to build moar at f1a21af (thats the newest i can successfully do)
16:52 raiph m: my $str = 768.chr; say $str.chars # perhaps it would be better if an isolated combining character counted as zero length?
16:52 camelia rakudo-moar 550b8c: OUTPUT«1␤»
16:52 eli-se joined #perl6
16:52 raiph m: my $str = "e" ~ 768.chr; say $str.chars
16:52 camelia rakudo-moar 550b8c: OUTPUT«1␤»
16:55 rjbs A single combining mark is a combining character sequence.
16:55 rjbs It's in line with Unicode suggestions to count it as one.
17:03 raiph rjbs: to count it as a combining character sequence or to count it as length one?
17:03 rjbs To count it as a character.
17:04 domidumont joined #perl6
17:05 raiph rjbs: "character" -> Unicode "grapheme" or "character" -> Unicode "character"?
17:05 rjbs Str.chars returns the "count of graphemes."
17:05 rjbs which I assume means "Extended grapheme clusters"
17:06 rjbs a single mark alone is a grapheme cluster
17:06 rjbs So I would expect .chars to return 1.
17:07 raiph m: say 768.chr
17:07 camelia rakudo-moar 550b8c: OUTPUT«̀␤»
17:07 xfix joined #perl6
17:07 xfix joined #perl6
17:21 raiph say 768.chr # rjbs: what leads you to expect 1 for a .chars of this string? (other than following the Unicode standard suggestion)
17:22 raiph m: say 768.chr # rjbs ^^
17:22 camelia rakudo-moar 550b8c: OUTPUT«̀␤»
17:22 rjbs Nothing else, only that.
17:24 rjbs I can imagine other reasons, though.  It keeps equivalent "string is empty === (.chars == 0)"
17:27 * masak approves of that reason
17:27 raiph rjbs: right. so that trumps the fact you can add two length 1 strings to get a length 1 string
17:29 cygx joined #perl6
17:29 cygx o/
17:29 cygx m: subset Past of Instant where * < now; subset Present of Instant where * == now; subset Future of Instant where * > now; say "now is the { given now { when Past { "past" }; when Present { "present" }; when Future { "future" } } }"
17:29 camelia rakudo-moar 550b8c: OUTPUT«now is the past␤»
17:30 vendethiel :D
17:40 jnthn raiph: The 1 + 1 = 1 thing is true even under *NFC*, let alone NFG.
17:42 jnthn And yes, there's a whole chunk in the Unicode normalization conformance section on initial isolateds
17:42 raiph m: say EVAL 200.chr.perl; EVAL 768.chr.perl
17:42 camelia rakudo-moar 550b8c: OUTPUT«È␤5===SORRY!5=== Error while compiling EVAL_1␤Bogus statement␤at EVAL_1:1␤------> 3<BOL>7⏏5"̀"␤    expecting any of:␤        prefix␤        term␤»
17:42 jnthn So it's a little bit stronger than "suggestion" :)
17:43 raiph jnthn: when I read (and reread, and rereread it) it seemed it was slightly less strong than an official suggestion
17:43 rjbs Yes, and imagine a string that's "\c[DIAERESIS]Your face."
17:44 rjbs If "\c[DIAERESIS]".chars was 0, that string above might be length 10.
17:45 raiph rjbs: and would take up the space of 10 graphemes
17:45 rjbs raiph: The "space"?
17:45 rjbs What kind of space?
17:45 raiph rjbs: the space a character visually occupies
17:46 moritz not all graphemes take up the same amount of space
17:46 rjbs Doees that mean that "\c[HALFWIDTH HANGUL LETTER E]\c[HALFWIDTH HANGUL LETTER E]" should be lenth 1?
17:46 cognominal in that sense does the space character occupy any space?
17:47 rjbs Or what about "\c[INVISIBLE TIMES"?
17:47 raiph cognominal: if the typical human would say yes, then yes
17:47 moritz cognominal: there are zero-width chars (zero-width spaces, for example), "normal" ones and "full width" characters
17:47 rjbs That takes up zero width.
17:47 moritz .chars is *not* supposed to return the display width
17:47 yoleaux * a d e h i l n o p r s t u w y
17:48 moritz yoleaux: wtf?
17:48 geekosaur presumably .chars is a command
17:48 geekosaur .help
17:48 yoleaux geekosaur: I'm yoleaux. Type .commands to see what I can do, or see http://dpk.io/yoleaux for a quick guide.
17:48 cognominal that would be a property of the glyph corresponding to the grapheme in given font
17:48 geekosaur yep unique characters in the string
17:48 rjbs There are other documents about determining visual fit, like UAX 14.
17:49 geekosaur visual width is an attribute of a font, not of a character...
17:49 cognominal m:  my method infix:sym<+>(Code $f, $n) { $f($n) }; &[+].assuming(42) + 666
17:49 camelia rakudo-moar 550b8c: OUTPUT«Cannot call Numeric(Sub: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at /tmp/gM3ZQg1hhl:1␤␤»
17:49 rjbs That, too.
17:50 cognominal too bad automatic conversion goes against the grain of cool stuff
17:50 dalek ecosystem: f48decd | (Steve Mynott)++ | META.list:
17:50 dalek ecosystem: add Text::VimColour
17:50 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/f48decd1da
17:54 BenGoldberg .char zyxabc
17:54 BenGoldberg .chars zyxabc
17:54 yoleaux No characters found
18:25 FROGGS joined #perl6
18:26 jack_rabbit joined #perl6
18:28 dalek nqp/curly: 2844001 | FROGGS++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
18:28 dalek nqp/curly: map new scdisclaim op on moar
18:28 dalek nqp/curly: review: https://github.com/perl6/nqp/commit/2844001093
18:28 dalek nqp/curly: e7b8aef | FROGGS++ | src/vm/jvm/ (3 files):
18:28 dalek nqp/curly: first stab at implementing scdisclaim for jvm
18:28 dalek nqp/curly: review: https://github.com/perl6/nqp/commit/e7b8aef15f
18:28 raiph joined #perl6
18:31 dalek rakudo/curly: ae2045c | FROGGS++ | src/core/CompUnitRepo/Local/Installation.pm:
18:31 dalek rakudo/curly: shift null_s of string heap in CURLI.serialize
18:31 dalek rakudo/curly: review: https://github.com/rakudo/rakudo/commit/ae2045cdb1
18:47 berekuk joined #perl6
18:49 * lizmat wonders what if nqp::ord($onlyname) < 58 means
18:51 FROGGS lizmat: where did you spot that?
18:52 spider-mario joined #perl6
18:52 masak src/core/Cursor.pm, apparently
18:52 lizmat in TimToady's last commit
18:54 masak that 58 is begging to be explained, yes.
18:54 masak also, that commit introduced commented-out debug lines :(
18:54 FROGGS that is about $0 and $<foo>
18:55 FROGGS m: say '9'.ord
18:55 camelia rakudo-moar 550b8c: OUTPUT«57␤»
18:56 FROGGS we have other spots where we check that the capture key is either numeric or alpha
18:56 masak I'm going to go ahead and "forgiveness > permission" remove them
18:56 masak FROGGS++ # for explaining the 58
18:56 masak ++whoever # for making the code explain it too
18:56 FROGGS this shows it better: https://github.com/rakudo/rakudo/commit/550b8c​3cfd#diff-2f2f164b0df50dcdea441025fc29d576R47
18:57 FROGGS so, might deserve a comment line
18:57 masak in a perfect world with reliable constant folding, I'd love to see it as `<= '9'.ord`
18:57 * lizmat will do
18:58 * masak notices, to his amusement, that he can't make his fingers decrement TimToady karma on channel :>
18:58 FROGGS the comment might mention positional vs. named captures
18:58 FROGGS hehe
18:58 vendethiel TlMTOADY-- # *g*
18:58 * vendethiel could also have used a 1 here
18:59 masak good, someone else as craven as I :P
18:59 masak s/craven/respectful/
18:59 anaeem1_ joined #perl6
18:59 dalek rakudo/nom: 0d93f2b | lizmat++ | src/core/Cursor.pm:
18:59 dalek rakudo/nom: Some clarification and cleanup
18:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0d93f2ba17
19:00 FROGGS lizmat++
19:00 masak lizmat++
19:04 cognominal ++lizmat++
19:07 masak m: my $lizmat = 42; ++$lizmat++
19:07 camelia rakudo-moar 550b8c: OUTPUT«Cannot assign to an immutable value␤  in block <unit> at /tmp/Vu3bvGiyFi:1␤␤»
19:07 masak I *think* that should actually be a parse error.
19:07 masak std: my $lizmat = 42; ++$lizmat++
19:08 camelia std 28329a7: OUTPUT«5===SORRY!5===␤"++" and "++" are not associative at /tmp/EJ51kKgIYi line 1:␤------> 3my $lizmat = 42; ++$lizmat++7⏏5<EOL>␤"++" and "++" are not associative at /tmp/EJ51kKgIYi line 1:␤------> 3my $lizmat = 42; ++$lizmat++7⏏5<EOL>␤FAILED 0…»
19:08 masak yeah. like that.
19:08 * masak submits rakudobug
19:08 masak pro tip: you can make rakudobugs out of *anything*! :P
19:08 * lizmat feels honoured  :-)
19:12 raydiak FROGGS: what should panda do when you call a command which can take multiple modules in a list, but one of them has multiple candidates?  a single --auth/--ver won't work for a list of modules
19:13 FROGGS raydiak: it should perhaps print a list of available dists, and prompt for a pick
19:15 raydiak FROGGS: afaik panda has no runtime interaction, maybe intentionally...are you sure I should add interactive prompts?
19:15 FROGGS raydiak: hmmm, is there another way to solve it?
19:15 raydiak FROGGS: let it fail for that one and print a list at the end when it shows failures maybe?
19:16 FROGGS that would also work
19:17 jack_rabbit joined #perl6
19:18 raydiak alright...for now, it already takes a failure and reports it, so I can just fail, and then add the part for stuffing the list of alternatives into the failure and showing them in the error report after the more important pieces are done :)
19:18 FROGGS yeah :o)
19:19 FROGGS the heck... a {} used in the setting is a Block on the jvm, not a hash
19:20 * raydiak has --auth/--ver working for install, and is hoisting the solution into a more suitable place to reuse for all the commands
19:20 raydiak heh, bad jvm!  *shakes finger scoldingly*
19:21 FROGGS raydiak++
19:21 raydiak FROGGS: should I be basing my work on something other than panda/master?
19:22 FROGGS no, master is fine
19:22 FROGGS panda/curly touches other places, and panda/CPAN won't get merged soon
19:24 raydiak cool...just thought to ask b/c the way it installs, the files/dirs are just named by shortname, so they overwrite each other, but I figured maybe curly fixes that
19:24 FROGGS it will, aye
19:25 raydiak neat...alright, off to write code instead of english for a bit :)
19:25 FROGGS :o)
19:26 coffee` joined #perl6
19:29 cygx left #perl6
19:29 jack_rabbit joined #perl6
19:31 hoelzro DrForr: thanks, I'll check it out
19:31 yoleaux 15:52Z <DrForr> hoelzro: I've got a primitive callback example ready, easy enough to write but the C-specific stuff like FD_ZERO and select() needs thinking about.
19:31 yoleaux 15:53Z <DrForr> hoelzro: It's a direct translation of the C code, look at examples/cb-echo.pl6
19:34 dolmen joined #perl6
19:34 raydiak m: my $r = rx/./; say ?$r
19:34 camelia rakudo-moar 0d93f2: OUTPUT«Method 'match' not found for invocant of class 'Any'␤  in block <unit> at /tmp/5_LnzPHxKV:1␤␤»
19:34 raydiak are regexes supposed to do something special when you boolify them?
19:34 FROGGS m: $_ = "foo"; my $r = rx/./; say ?$r
19:34 camelia rakudo-moar 0d93f2: OUTPUT«Method 'match' not found for invocant of class 'Any'␤  in block <unit> at /tmp/N6KEtZ_ZlS:1␤␤»
19:35 raydiak I just want to know if there is a defined object in the var, but it may be a regex, and I get this instead if it is
19:35 raydiak well, not just defined, but true
19:36 hoelzro DrForr: does rl_callback_read_char block at all?
19:36 anaeem1 joined #perl6
19:36 hoelzro and do you have to use the callback variants for reading things + invoking a callback?
19:36 raydiak for regex I thought/hoped true would be anything besides the Regex type object
19:39 DrForr hoelzro: I really haven't tested much about it, I can do some quick checks.
19:40 dalek rakudo/curly: 5fb7fd8 | FROGGS++ | src/core/Distribution.pm:
19:40 dalek rakudo/curly: restructure Distribution; do work once
19:40 dalek rakudo/curly: review: https://github.com/rakudo/rakudo/commit/5fb7fd8599
19:40 dalek rakudo/curly: c4767a3 | FROGGS++ | src/core/CompUnitRepo/Locally.pm:
19:40 dalek rakudo/curly: do no create CURL directories "automagically"
19:40 FROGGS (sorry dalek)
19:40 hoelzro DrForr: if it blocks, you could probably just ignore using select (for now, anyway) and use threads
19:40 koo6 joined #perl6
19:40 hoelzro I don't know how *stable* that will be, but...
19:40 dalek joined #perl6
19:41 anaeem1 joined #perl6
19:43 DrForr I'm getting one time through the loop per keypress so it appears to be blocking. The code works fine when I don't do any FD operations (which I really can't until either POSIX is fleshed out, or we figure out how it's going to be done.)
19:43 DrForr I haven't turned off buffering, and it's running inside tmux, so that may affect things as well.
19:44 skids m: .perl.say for (for ^5 { 41; next if $_ == 2; $_})
19:44 camelia rakudo-moar 0d93f2: OUTPUT«0␤1␤3␤4␤»
19:44 skids m: .perl.say for (1,(),2)
19:44 camelia rakudo-moar 0d93f2: OUTPUT«1␤()␤2␤»
19:45 skids I don't know which is right at this point.
19:47 vendethiel skids: what seems wrong?
19:47 vendethiel for doesn't flatten
19:47 * vendethiel is surprised the "41" doesn't warn here
19:47 skids the inside for returns a flattened result.
19:49 skids (Which is better than returning Nil, but when I wrote that test I didn't expect that to happen when it got fixed.)
19:49 dalek roast: d821762 | usev6++ | S12-construction/new.t:
19:49 dalek roast: Use existing ticket number
19:49 dalek roast: review: https://github.com/perl6/roast/commit/d8217626f9
19:50 coffee` joined #perl6
19:52 skids OK, I think the test remains correct and there should indeed be a '()' in the first result.
19:52 raydiak skids: I'm not sure that's flattening...I think maybe the next just doesn't give a value for that iteration at all, instead of a flattened empty list
19:52 raydiak m: .perl.say for (for ^5 { $_ == 2 ?? () !! $_ })
19:52 camelia rakudo-moar 0d93f2: OUTPUT«0␤1␤()␤3␤4␤»
19:53 raydiak not flattening there
19:54 skids S04 says: Iterations that return C<()> ... return that C<()> as the next value which will therefore disappear when interpolated in flat context, but will interpolate an empty C<Parcel> into slice context.
19:55 FROGGS for does not flatten anymore, right?
19:55 FROGGS m: .perl.say for flat (for ^5 { $_ == 2 ?? () !! $_ })
19:55 camelia rakudo-moar 0d93f2: OUTPUT«0␤1␤3␤4␤»
19:55 raydiak "Iterations that return C<()>" being the operative term there :)
19:56 raydiak ah, I see..."such as by calling next with no extra return arguments"
19:56 skids Ok maybe I should not have cut out the part that says: "such as by calling C<next> with no extra
19:56 skids return arguments"
19:56 skids :)
19:57 raydiak certainly something here or there or both seems awry, in that case
20:04 raydiak doesn't even need nesting or anything:
20:04 raydiak m: say do for ^5 { $_ != 2 ?? $_ !! next }.perl
20:04 camelia rakudo-moar 0d93f2: OUTPUT«(0, 1, 3, 4)␤»
20:05 skids Yeah, that was superstituous.  But in GLR-churn days superstition sometimes pays off.
20:07 skids .oO(always use the place last fixed to not flatten to test something that's not flat :-)
20:08 RabidGravy joined #perl6
20:08 raydiak :)
20:10 jack_rabbit joined #perl6
20:13 raydiak in terms of what to plan for going forward, for shouldn't flatten, but dunno about the next behavior until someone else chimes in about whether that part is changing for the glr or not
20:13 skids I get the impression the GLR is sort of like trying to get all the wrinkles out of wall-to-wall carpeting.  (Gotta Lay Rug)
20:14 raydiak you're not flattening it properly!  :)
20:15 diana_olhovik_ joined #perl6
20:17 raydiak several programming puns to be had with carpet now that I think about it...flattening...unrolling...magic...
20:17 dalek rakudo/nom: 88b1203 | FROGGS++ | src/Perl6/Actions.nqp:
20:17 dalek rakudo/nom: allow to use our scoped tokens, RT #125169
20:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/88b1203c05
20:23 AlexDaniel is there any list of existing unicode operators?
20:23 anaeem1_ joined #perl6
20:25 arnsholt Probably not listing just the Unicode ones, but doc.perl6.org should have all of them
20:25 lizmat FROGGS: I'm not sure you need 7106131a0080aa6cb4fc6f ?
20:25 lizmat the id of the CompUnit is an absolute path, no?
20:25 lizmat or is this meant to be purely informational ?
20:26 FROGGS lizmat: this is about the 'master index'
20:26 FROGGS so I keep a list of CompUnits per symbol name, and filter these by auth/name/ver instead of filtering dists (which can be huge)
20:27 TimToady joined #perl6
20:27 lizmat FROGGS: so it is an optimisation, really
20:28 FROGGS yes, I think so
20:28 lizmat okidoki  :-)
20:28 FROGGS :o)
20:32 FROGGS m: class Foo { method bar is export {} }; import Foo; &bar.signature
20:32 camelia rakudo-moar 0d93f2: ( no output )
20:32 FROGGS m: class Foo { method bar is export {} }; import Foo; say &bar.signature
20:32 camelia rakudo-moar 0d93f2: OUTPUT«(Foo: *%_)␤»
20:32 AlexDaniel arnsholt: hm, maybe I can grep for unicode characters from here somehow https://github.com/perl6/std/blob/master/STD.pm6
20:43 FROGGS m: grammar D4 { token doo4 is export { doo4 }; }; import D4; 'doo4' ~~ &doo4
20:44 camelia rakudo-moar 0d93f2: OUTPUT«Type check failed in binding <anon>; expected 'D4' but got 'Cursor'␤  in regex doo4 at /tmp/shPOxpe_Y3:1␤  in block <unit> at /tmp/shPOxpe_Y3:1␤␤»
20:44 FROGGS TimToady: do we want to allow that?
20:45 jack_rabbit joined #perl6
20:45 * Ulti just fixed bitrot in the Stats module
20:46 Ulti turns out .kv.map({$^k * $^v}) doesnt work so well post GLR :D
20:46 FROGGS and we are not yet post GLR :o)
20:46 Ulti .pairs is now the way to go for .key .value which is nicer anyway
20:48 TimToady .kv is still supposed to be flat
20:49 TimToady m: my @foo = <a b c>. say @foo.kv.perl
20:49 camelia rakudo-moar 0d93f2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/q9kOISTYzj␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at /tmp/q9kOISTYzj:1␤------> 3my @foo = <a b c>. 7⏏5say @foo.kv.perl␤»
20:49 masak hee
20:49 TimToady m: my @foo = <a b c>; say @foo.kv.perl
20:49 camelia rakudo-moar 88b120: OUTPUT«(0, "a", 1, "b", 2, "c")␤»
20:49 TimToady so that map should work
20:49 TimToady sorry, in a meeting, so a bit distracted
20:54 masak m: my @foo = <a b c>; say @foo.kv.elems
20:54 camelia rakudo-moar 88b120: OUTPUT«6␤»
20:54 masak \o/
20:54 masak m: my @foo = <a b c>; say @foo.kv.tree.perl
20:54 camelia rakudo-moar 88b120: OUTPUT«(0; "a"; 1; "b"; 2; "c").item␤»
20:55 raydiak m: my %foo = ^6; say %foo.kv.map: {$^k * $^v}
20:55 camelia rakudo-moar 88b120: OUTPUT«20 0 6␤»
20:55 masak m: my @foo = <a b c>; say @foo.pairs.perl
20:55 camelia rakudo-moar 88b120: OUTPUT«(0 => "a", 1 => "b", 2 => "c")␤»
20:55 masak m: my @foo = <a b c>; say @foo.pairs.map({ .key, .value }).perl
20:55 camelia rakudo-moar 88b120: OUTPUT«((0, "a"), (1, "b"), (2, "c"))␤»
20:55 * masak wonders if there's a shorter way to do that
20:58 raydiak m: say <a b c>.kv.rotor(2).perl
20:58 camelia rakudo-moar 88b120: OUTPUT«((0, "a"), (1, "b"), (2, "c"))␤»
20:59 raydiak m: say <a b c>.pairs».kv.perl
20:59 camelia rakudo-moar 88b120: OUTPUT«((0, "a"), (1, "b"), (2, "c"))␤»
21:00 TimToady we could treat subsigs on pair-ish types as splitting the pair into a list of two things, so .pairs -> ($k,$v) {...}
21:00 TimToady likewise for Rat and Complex
21:03 noganex joined #perl6
21:05 masak could work.
21:05 masak I assume you're not saying we should special-case 2-tuples, but it should work for arbitrary N-tuples?
21:06 Ulti either way I ran Tim King's benchmarks from a couple years ago and modern Rakudo runs them quite a bit faster and more predictably
21:06 Ulti https://gist.github.com/Mat​tOates/c2e19950f46d1a1c241a
21:07 Ulti though I am also using a quite modern CPU :S
21:07 Ulti *shrug*
21:10 skids m: for (1,2,3).pairs -> $p [:key($k), :value($v)] { $p.say; $k.say; $v.say;} # what do square brackets do here as opposed to parens?
21:10 camelia rakudo-moar 88b120: OUTPUT«0 => 1␤0␤1␤1 => 2␤1␤2␤2 => 3␤2␤3␤»
21:11 masak think they're equivalent.
21:12 skids m: for (1,2,3).pairs -> [:key($k), :value($v)] { $k.say; $v.say;} # that works with parens
21:12 camelia rakudo-moar 88b120: OUTPUT«Type check failed in binding <anon>; expected 'Positional' but got 'Pair'␤  in block <unit> at /tmp/di7RXKHy1x:1␤␤»
21:12 mohij joined #perl6
21:14 dalek roast: b159d9b | FROGGS++ | S05-grammar/methods.t:
21:14 dalek roast: add test for our scoped tokens RT #125169
21:14 dalek roast: review: https://github.com/perl6/roast/commit/b159d9b862
21:15 Ulti 11x speed up since Sept 2013 kind of doubt my CPU is that many times faster
21:15 Ulti everyone++ ?
21:16 FROGGS Sep 13?
21:16 Ulti yeah
21:16 Ulti http://sd.jtimothyking.com/2013/0​9/17/how-fast-or-slow-is-perl-6/
21:16 Ulti increasingly more on the side of how fast is perl 6 :)
21:17 Ulti using native types slows things down because I assume you just introduce loads of (un)boxing for the .is-prime
21:18 FROGGS probably, yeah
21:19 FROGGS though, I must say that I am not a performance expert :o)
21:19 FROGGS but yeah, Perl 6 feels overall quite 'fast enough'
21:20 masak tell that to my 26-minute script :/
21:21 masak yes, I was surprised too
21:23 * lizmat gets some shuteye
21:23 lizmat good night, #perl6!
21:23 masak 'night, lizmat++
21:32 kurahaupo joined #perl6
21:40 * raydiak wonders what masak is asking of rakudo which takes 26 minutes
21:41 masak https://gist.github.com/masak/7a1d​84435d2bca36b717#file-sendmore-p6
21:42 masak ok, I just got slightly more impressed.
21:42 masak I ported it to Perl 5... https://gist.github.com/masak/7a1d84435d2​bca36b717#file-sendmore-perl5-version-pl
21:42 masak ...and...
21:42 masak that version takes 8 minutes.
21:43 masak m: say 26 / 8
21:43 camelia rakudo-moar 88b120: OUTPUT«3.25␤»
21:43 raydiak that's...actually not so bad, then?
21:43 masak a factor of 3.25 really isn't bad.
21:43 masak (Perl 6)++
21:43 masak still, I think we can get closer :)
21:44 raydiak will the internals/performance part of the glr help much with that?
21:46 TimToady profile it and see how much gimme and reify there is
21:48 Zoffix joined #perl6
21:49 cognominal TimToady, how come that classes like Match don't do Positional or Associative?
21:49 masak m: say Match ~~ Positional; say Match ~~ Associative
21:49 camelia rakudo-moar 88b120: OUTPUT«False␤False␤»
21:49 TimToady don't remember offhand, and still distracted in a meeting...
21:49 cognominal m: say Cursor.does(Associative)
21:49 camelia rakudo-moar 88b120: OUTPUT«False␤»
21:50 masak Cursor certainly shouldn't be Associative
21:50 cognominal m: say Capture.does(Associative)
21:50 camelia rakudo-moar 88b120: OUTPUT«False␤»
21:50 [Sno] joined #perl6
21:55 raydiak wait, what?  even Array...???...
21:55 raydiak m: say Array ~~ Positional
21:55 camelia rakudo-moar 88b120: OUTPUT«True␤»
21:55 raydiak hrm
21:55 raydiak m: say Array.^mro
21:55 camelia rakudo-moar 88b120: OUTPUT«(Array) (List) (Iterable) (Cool) (Any) (Mu)␤»
21:55 Zoffix joined #perl6
21:55 masak Positional is a role
21:56 masak m: say Array.^roles
21:56 camelia rakudo-moar 88b120: OUTPUT«(Positional)␤»
21:56 raydiak yeah got that part, I did...something else weird, looking for my mistake
21:57 raydiak m: say any(Array,Hash) ~~ any(Positional,Associative)
21:57 camelia rakudo-moar 88b120: OUTPUT«False␤»
21:57 raydiak that's a variant of what I did
21:57 raydiak what does that do?
21:58 masak m: say Array ~~ any(Positional, Associative)
21:58 camelia rakudo-moar 88b120: OUTPUT«True␤»
21:59 masak easiest explanation is that the lhs doesn't autothread.
21:59 masak m: say any(1, 2) ~~ 1
21:59 camelia rakudo-moar 88b120: OUTPUT«any(True, False)␤»
21:59 masak m: say so any(1, 2) ~~ 1
21:59 camelia rakudo-moar 88b120: OUTPUT«True␤»
21:59 raydiak heh we're doing almost the exact same things (locally on my end)
21:59 masak hm.
22:01 masak m: say so any(1, 2) ~~ any(2, 3)
22:01 camelia rakudo-moar 88b120: OUTPUT«True␤»
22:01 masak I don't really understand why that works -- but not the one with type objects.
22:02 raydiak m: []|[] ~~ Positional
22:02 camelia rakudo-moar 88b120: ( no output )
22:02 raydiak m: say []|[] ~~ Positional
22:02 camelia rakudo-moar 88b120: OUTPUT«False␤»
22:02 masak m: say ([]|[]) ~~ Positional
22:02 camelia rakudo-moar 88b120: OUTPUT«False␤»
22:02 raydiak m: 1|2 ~~ Int
22:02 camelia rakudo-moar 88b120: ( no output )
22:02 raydiak m: say 1|2 ~~ Int
22:02 camelia rakudo-moar 88b120: OUTPUT«False␤»
22:03 masak ok, new hypothesis:
22:03 masak type checking is a bit different from value checking
22:03 masak m: say any(Array,Hash) ~~ Junction
22:03 camelia rakudo-moar 88b120: OUTPUT«True␤»
22:03 masak ok, that one seems true.
22:03 raydiak ah, hm
22:04 raydiak m: say (1|2).does: Int
22:04 camelia rakudo-moar 88b120: OUTPUT«False␤»
22:04 masak er, `.does` on a class?
22:05 masak m: say Int.does(Int)
22:05 camelia rakudo-moar 88b120: OUTPUT«True␤»
22:05 masak heh.
22:06 raydiak then, perhaps the LHS of the type membership row in http://design.perl6.org/S03.html#Smart_matching should s/Any/Mu/ to indicate that it doesn't autothread (if this is intended behavior)
22:08 masak 'night, #perl6
22:09 raydiak g'night antipodal masak o/
22:11 raydiak from the same section of S03: All smartmatch types are "itemized"; both ~~ and given/when provide item contexts to their arguments, and autothread any junctive matches so that the eventual dispatch to .ACCEPTS never sees anything "plural".
22:13 raydiak which I guess implies that smartmatch cannot test for a Junction (use .does for that?), and the current behavior is wrong?
22:23 dalek roast: 4e044e9 | usev6++ | S11-modules/require.t:
22:23 dalek roast: Use existing ticket number
22:23 dalek roast: review: https://github.com/perl6/roast/commit/4e044e95bb
22:23 Zoffix joined #perl6
22:42 telex joined #perl6
22:48 raiph joined #perl6
22:54 quester left #perl6
23:02 dayangkun joined #perl6
23:22 spider-mario joined #perl6
23:36 raiph joined #perl6
23:50 Ben_Goldberg joined #perl6

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

Perl 6 | Reference Documentation | Rakudo