Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-02-08

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:00 atweiden so, i'm aware you can push elements to an array like this:
00:00 atweiden m: my @a = qw<zero one two three four five six seven>; say @a.perl; say @a[*-1]; @a[*-0] = 'eight'; say @a.perl; say @a[*-1];
00:00 camelia rakudo-moar f0a450: OUTPUT«["zero", "one", "two", "three", "four", "five", "six", "seven"]␤seven␤["zero", "one", "two", "three", "four", "five", "six", "seven", "eight"]␤eight␤»
00:00 atweiden is there a way to insert elements to an array one spot before the beginning with a similar accessor to [*-0]?
00:02 skids atweiden: not exactly because in order to do that the array needs to be unshifted.  In the case of push none of the other elements move.
00:03 skids But there is unshift and splice.
00:03 autarch lizmat: how would I make Rakudo::Internals.posix-from-tai return a Bool? it's doing a boolean comparison already
00:04 lizmat m: my int $a = 1; say $a == $a
00:04 camelia rakudo-moar f0a450: OUTPUT«True␤»
00:04 lizmat hmmm
00:04 skids m: my @a = qw<zero one two three four five six seven>; say @a.perl; say @a[*-1]; @a.splice(0,0,"eight"); say @a.perl;
00:04 camelia rakudo-moar f0a450: OUTPUT«["zero", "one", "two", "three", "four", "five", "six", "seven"]␤seven␤["eight", "zero", "one", "two", "three", "four", "five", "six", "seven"]␤»
00:05 lizmat m: my int $a = 1; say 1 && $a == $a
00:05 camelia rakudo-moar f0a450: OUTPUT«True␤»
00:05 lizmat m: my int $a = 1; say $a && $a
00:05 camelia rakudo-moar f0a450: OUTPUT«1␤»
00:05 lizmat autarch : the part before the && is not boolean
00:05 autarch $i < $elems looks boolean to me
00:06 lizmat so if that is 0, it won't be booleanified
00:06 lizmat m: my int $a = 1; my int $b = 2; say $a < $b
00:06 camelia rakudo-moar f0a450: OUTPUT«True␤»
00:06 autarch m: say 1 < 2 && 3 == 3
00:06 camelia rakudo-moar f0a450: OUTPUT«True␤»
00:06 lizmat hmmm...
00:07 autarch # afk
00:07 vendethiel joined #perl6
00:09 MadcapJake Anyone interested in trying «perl6 -c» on a circular dependency? https://gist.github.com/MadcapJake/9b8d36c0cef1b7062b7c
00:09 MadcapJake This causes perl6 to go nuts and completely freeze my computer.
00:09 lizmat MadcapJake: immediately, or after some time ?
00:10 MadcapJake I should say, it's actually «perl6 -I{wherever you place these} -c»
00:10 MadcapJake after about 30 seconds to a minute
00:10 MadcapJake my process monitor shows hundreds of `moar` processes
00:10 lizmat probably an infiniloop eeating all your memory then
00:10 lizmat ah, fork bomb  as well  :-)
00:11 lizmat please rakudobug it
00:11 MadcapJake ok will do!
00:11 * MadcapJake wishes his issue submitter was ready :P
00:12 atweiden skids: I'm trying to envision what a slang [*-0] accessor but for unshift would look like
00:13 dalek rakudo/nom: 859a4d3 | lizmat++ | src/core/Hash.pm:
00:13 dalek rakudo/nom: Make Hash.BIND-KEY about 5% faster
00:13 dalek rakudo/nom:
00:13 dalek rakudo/nom: Sadly, there is a lot of overhead to get to BIND-KEY from %h<a> := foo
00:13 dalek rakudo/nom: so it won't be visible much in performance gain
00:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/859a4d38a7
00:13 dalek rakudo/nom: ccbac92 | lizmat++ | src/core/Hash.pm:
00:13 dalek rakudo/nom: Fix copy-pasto done in f0a45046d1c268f03bd3
00:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ccbac924e6
00:13 atweiden there's a concept of a '-' array accessor in JSON Pointer (RFC 6901)
00:13 atweiden so if i were to do a '-' concept for p6 lists, i'd probably want to go with "*-0" to be consistent with the rest of p6
00:13 atweiden i'm wondering how i could be consistent with the [*-0] syntax on the unshift side
00:14 skids atweiden: "@a[]:splice" maybe?
00:14 revhippie left #perl6
00:18 atweiden skids: that's a good idea. the :bool syntax may be easier to understand
00:18 atweiden m: my @steps = |qw<deeply nested hash path to array>, :push
00:18 camelia rakudo-moar f0a450: ( no output )
00:18 atweiden m: my @steps = |qw<deeply nested hash path to array>, :unshift
00:18 camelia rakudo-moar f0a450: ( no output )
00:18 dalek roast: 8650ef2 | autarch++ | S02-types/instants-and-durations.t:
00:18 dalek roast: Add a test for the round trip of Instant via .perl.EVAL
00:18 dalek roast: review: https://github.com/perl6/roast/commit/8650ef2979
00:18 dalek roast: 659a27f | lizmat++ | S02-types/instants-and-durations.t:
00:18 dalek roast: Merge pull request #103 from perl6/autarch/fix-Instant.perl
00:18 dalek roast:
00:18 dalek roast: Add a test for the round trip of Instant via .perl.EVAL
00:18 dalek roast: review: https://github.com/perl6/roast/commit/659a27f284
00:19 dalek roast: be0b07b | lizmat++ | S07-hyperrace/ (2 files):
00:19 dalek roast: Fix test counts
00:19 dalek roast: review: https://github.com/perl6/roast/commit/be0b07bd8d
00:20 dalek rakudo/nom: bc50164 | lizmat++ | src/core/ (2 files):
00:20 dalek rakudo/nom: Fix roundtrip problem with Instants, autarch++
00:20 dalek rakudo/nom:
00:20 dalek rakudo/nom: Inspired by PR #708
00:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bc50164e68
00:21 Averna joined #perl6
00:22 skids Any chance PR#685 could get some attention?
00:23 lizmat skids: not sure how to handle that atm, would need a bit of consensus whether this would wind up in 6.c or 6.d.a
00:24 lizmat meanwhile, catching some shuteye
00:24 lizmat good night, #perl6!
00:24 skids lizmat: thanks for looking.  Hopefully there will be more guidance on that soon I guess.
00:24 skids n8
00:30 wamba1 joined #perl6
00:55 revhippie joined #perl6
00:57 MadcapJake does perl6 have tail-call optimization?
00:57 MadcapJake or should I say, does rakudo?
00:58 bowtie joined #perl6
00:59 AlexDaniel MadcapJake: nope
00:59 AlexDaniel MadcapJake: at least not right now
01:13 AlexDaniel MadcapJake: by the way, why do you ask?
01:32 Actualeyes joined #perl6
01:34 MadcapJake AlexDaniel, just was reading something about tail calls and was curious
01:53 Herby_ joined #perl6
01:53 Herby_ Evening, everyone!
01:53 Herby_ \o
01:53 skids o/
01:54 Herby_ how goes it
01:58 Herby_ m: my @a = <a b c d>; @a.pick; say @a;
01:58 camelia rakudo-moar bc5016: OUTPUT«[a b c d]␤»
01:58 Herby_ m: my @a = <a b c d>; @a.pick 1; say @a;
01:58 camelia rakudo-moar bc5016: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CCAGyrr09t␤Two terms in a row␤at /tmp/CCAGyrr09t:1␤------> 3my @a = <a b c d>; @a.pick7⏏5 1; say @a;␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤       …»
01:59 Herby_ m: my @a = <a b c d>; @a.pick: 2; say @a;
01:59 camelia rakudo-moar bc5016: OUTPUT«[a b c d]␤»
01:59 Herby_ is there a method to pick/pull an element from an array?
01:59 Herby_ like pulling a card from a deck of cards, and seeing whats left in the deck
02:03 AlexDaniel m: my @a = <a b c d>; say @a.splice: ^@a .pick, 1; say @a
02:03 camelia rakudo-moar bc5016: OUTPUT«[c]␤[a b d]␤»
02:03 AlexDaniel m: my @a = <a b c d>; say @a.splice: ^@a .pick, 1; say @a
02:03 camelia rakudo-moar bc5016: OUTPUT«[c]␤[a b d]␤»
02:03 AlexDaniel m: my @a = <a b c d>; say @a.splice: ^@a .pick, 1; say @a
02:03 camelia rakudo-moar bc5016: OUTPUT«[c]␤[a b d]␤»
02:03 AlexDaniel come on
02:03 AlexDaniel m: my @a = <a b c d>; say @a.splice: ^@a .pick, 1; say @a
02:03 camelia rakudo-moar bc5016: OUTPUT«[d]␤[a b c]␤»
02:04 AlexDaniel Herby_: ↑ is it good enough?
02:04 Herby_ yes, I figured there was a way :)
02:04 Herby_ question.  what is the .splice: ^@a    doing there?
02:05 AlexDaniel well, splice just gets rid of one element
02:05 AlexDaniel m: my @a = <a b c d>; say @a.splice: 0, 1; say @a
02:05 camelia rakudo-moar bc5016: OUTPUT«[a]␤[b c d]␤»
02:05 AlexDaniel it also returns the removed elements
02:06 AlexDaniel Herby_: ï½¢^@a .pickï½£ is just a random index of an array
02:06 Herby_ ah ok
02:06 Herby_ m: my @a = <a b c d e f g>; say @a.splice: ^@a
02:06 camelia rakudo-moar bc5016: OUTPUT«[]␤»
02:06 Herby_ m: my @a = <a b c d e f g>; say @a.splice: ^@a .pick, 1
02:06 camelia rakudo-moar bc5016: OUTPUT«[c]␤»
02:06 Herby_ m: my @a = <a b c d e f g>; say @a.splice: ^@a .pick, 1
02:06 camelia rakudo-moar bc5016: OUTPUT«[g]␤»
02:07 Herby_ m: my @a = <a b c d e f g>; say @a.splice: ^@a .pick, 1
02:07 camelia rakudo-moar bc5016: OUTPUT«[a]␤»
02:07 Herby_ k
02:07 AlexDaniel Herby_: people yell at me when I use infix-like dot
02:07 AlexDaniel m: my @a = <a b c d>; say @a.splice: (^@a).pick, 1; say @a
02:07 camelia rakudo-moar bc5016: OUTPUT«[b]␤[a c d]␤»
02:07 AlexDaniel you can use parens
02:08 AlexDaniel but I hate parens and my vision is good enough to spot that space…
02:08 pi4 joined #perl6
02:08 revhippie m: my @a = <a b c d>; my @b = @a.pick: 2; say @b;  say @a (-) @b;
02:08 yoleaux 4 Feb 2016 03:04Z <AlexDaniel> revhippie: I've also figured that any example that is using 「@x.keys.map: …」 can be shortened by doing 「(… for ^@x)」
02:08 camelia rakudo-moar bc5016: OUTPUT«[a c]␤set(b, d)␤»
02:08 yoleaux 4 Feb 2016 03:06Z <AlexDaniel> revhippie: but yeah, somehow list comprehension is a very underrated feature in Perl 6 :)
02:08 AlexDaniel if not you can put another space on the right hand side of the dot
02:08 BenGoldberg joined #perl6
02:08 AlexDaniel m: my @a = <a b c d>; say @a.splice: ^@a . pick, 1; say @a
02:08 camelia rakudo-moar bc5016: OUTPUT«[a]␤[b c d]␤»
02:09 AlexDaniel revhippie: what if your elements are not unique?
02:09 revhippie AlexDaniel: I guess that'd go out the window, then :(
02:10 AlexDaniel revhippie: it is also slightly less efficient. But yeah, interesting solution too
02:15 Herby_ m: my @y = ($_**2 + 1 for 1 .. 10); say @y;
02:15 camelia rakudo-moar bc5016: OUTPUT«[2 5 10 17 26 37 50 65 82 101]␤»
02:15 Herby_ m: my @y = ($_**2 for 1 .. 10); say @y;
02:15 camelia rakudo-moar bc5016: OUTPUT«[1 4 9 16 25 36 49 64 81 100]␤»
02:16 Herby_ m: my @a = <1 2 3 4>; my @y = ($_**2 for @a); say @y;
02:16 camelia rakudo-moar bc5016: OUTPUT«[1 4 9 16]␤»
02:17 Herby_ m: my @a = <1 2 3 4>; ($_**2 for @a).say;
02:17 camelia rakudo-moar bc5016: OUTPUT«(1 4 9 16)␤»
02:17 phyreprooph joined #perl6
02:18 Xor_ joined #perl6
02:18 vendethiel joined #perl6
02:27 phyreprooph Hey everyone, trying to get panda working to install modules following this here: http://perl6maven.com/how-to-install-perl6-modules. I get an issue when I run "panda list" and i think it might have something to do with being behind a proxy? Any help would be muchly appreciated.
02:29 k-man phyreprooph, no idea, but you might want to explain in detail what the issue is
02:29 phyreprooph I get an error saying "Could not download module metadata: Failed to connect: connection timed out.
02:30 phyreprooph it then falls back to curl and wget both of which also don't work
02:31 skids phyreprooph: I saw one other person have problems because of proxies before IIRC.  Apparently, it has not been fixed.
02:31 phyreprooph I see...
02:40 phyreprooph Was just reading here: https://github.com/tadzik/panda/issues/96, someone says that it's HTTP::UserAgent's job, but when you go to https://github.com/sergot/http-useragent, it says to install using "panda install HTTP::UserAgent".....
02:40 skids panda has a local copy of modules it needs for bootstrapping, they get updated from time to time.
02:41 phyreprooph what does that mean?
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:48 SquireOfGothos joined #perl6
02:59 FROGGS_ joined #perl6
03:01 _PiL_ joined #perl6
03:04 bowtie joined #perl6
03:09 ugexe curl or wget should both work if http_proxy env var is set i woudl think
03:09 kid51 joined #perl6
03:12 geekosaur beware https on OS X --- some things look for $https_proxy, others for $HTTPS_PROXY
03:12 geekosaur consistency wazzat?
03:13 ugexe i imagine curl and wget both search for those as well
03:13 protium joined #perl6
03:15 geekosaur curl is actually specifically problematic, because the proxies prefpane exports https_proxy but curl wants HTTPS_PROXY
03:17 ugexe always set every permutation of casing hmm
03:21 Actualeyes joined #perl6
03:25 noganex joined #perl6
03:27 colomon joined #perl6
03:38 Ben_Goldberg joined #perl6
03:39 dalek doc: 7775b43 | skids++ | doc/Type/Proc/Async.pod:
03:39 dalek doc: Degarble description of .w method
03:39 dalek doc: review: https://github.com/perl6/doc/commit/7775b43d73
03:46 squach2 joined #perl6
04:08 masak good noon, #perl6
04:08 skids o/
04:20 Actualeyes joined #perl6
04:21 Hotkeys o/ masak
04:21 MadcapJake joined #perl6
04:22 [Coke] .
04:24 MadcapJake joined #perl6
04:37 PerlJam joined #perl6
04:39 vendethiel joined #perl6
04:39 protium joined #perl6
04:39 cosarara joined #perl6
04:40 Timbus joined #perl6
04:47 squach joined #perl6
04:59 squach1 joined #perl6
05:03 jdv79 what is META6.info - a hybrid?
05:05 skids The inevitable consequence of not getting it right the first two times?
05:06 Cabanossi joined #perl6
05:06 jdv79 i just saw some emails about something using it.  that's all i know about it so far.
05:10 dalek ecosystem: dff9ef9 | ugexe++ | META.list:
05:10 dalek ecosystem: s/META.info/META6.json/
05:10 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/dff9ef9994
05:11 jdv79 ugexe: do you know?
05:11 ugexe its just a fuck up
05:12 jdv79 ok.  have a good evening then!
05:12 ugexe CSV::Parser used it on accident. a typo
05:15 squach joined #perl6
05:17 squach2 joined #perl6
05:17 dj_goku joined #perl6
05:28 dalek doc: 7fd5283 | raiph++ | doc/Language/performance.pod:
05:28 dalek doc: First cut at performance page.
05:28 dalek doc:
05:28 dalek doc: Native type examples missing.
05:28 dalek doc: review: https://github.com/perl6/doc/commit/7fd5283175
05:31 squach joined #perl6
05:36 travis-ci joined #perl6
05:36 travis-ci Doc build failed. raiph 'First cut at performance page.
05:36 travis-ci https://travis-ci.org/perl6/doc/builds/107705215 https://github.com/perl6/doc/compare/7775b43d7388...7fd528317559
05:36 travis-ci left #perl6
05:37 Sqirrel joined #perl6
05:43 squach1 joined #perl6
05:45 dalek doc: 67e00e7 | raiph++ | doc/Language/performance.pod:
05:45 dalek doc: Missed =end pod
05:45 dalek doc: review: https://github.com/perl6/doc/commit/67e00e7660
05:53 squach joined #perl6
06:04 squach1 joined #perl6
06:04 kaare_ joined #perl6
06:04 Cabanossi joined #perl6
06:07 Perleone joined #perl6
06:10 Actualeyes joined #perl6
06:12 travis-ci joined #perl6
06:12 travis-ci Doc build passed. raiph 'Missed =end pod'
06:12 travis-ci https://travis-ci.org/perl6/doc/builds/107706467 https://github.com/perl6/doc/compare/7fd528317559...67e00e766069
06:12 travis-ci left #perl6
06:15 DubiousPepper joined #perl6
06:25 squach joined #perl6
06:39 vendethiel joined #perl6
06:39 protium joined #perl6
06:44 squach1 joined #perl6
06:47 _Gustaf_ joined #perl6
06:55 nakiro joined #perl6
06:57 squach joined #perl6
07:00 dalek doc: 6ee5d3c | raiph++ | doc/Language/performance.pod:
07:00 dalek doc: Fix some broken directives, improve style a bit
07:00 dalek doc: review: https://github.com/perl6/doc/commit/6ee5d3c831
07:01 raiph joined #perl6
07:06 yurivish The new Rakudo Star says this upon launching a repl for the first time: "You may want to `panda install Readline` or `panda install Linenoise` or use rlwrap for a line editor"
07:06 yurivish Which one of the three options is currently the best for standard repl interactions and not messing up on multi-line input?
07:06 [Tux] test            22.627
07:06 [Tux] test-t          12.464
07:06 [Tux] csv-parser      52.158
07:06 yurivish Or two options... I'm not sure what rlwrap is
07:08 llfourn yurivish: multi-line input is not supported yet
07:08 raiph yurivish: re multi-line input: https://www.reddit.com/r/perl6/comments/44nys3/experimental_multiline_repl_branch_up_for_testing/
07:10 yurivish Thanks for the  link. If I want to use a non-experimental branch for now, is there a reason to prefer Readline over Linenoise or vice versa?
07:11 FROGGS joined #perl6
07:12 raiph yurivish: Afaik the main distinction has been licensing, not functionality
07:13 yurivish raiph: okay, I'll use Readline and worry no more :)
07:14 yurivish ...except the tests failed (OS X, newest version): Cannot locate native library 'libreadline.so.6': dlopen(libreadline.so.6, 1): image not found
07:15 yurivish Linenoise worked.
07:15 raiph that would be another good reason to prefer one over another ;)
07:17 CIAvash joined #perl6
07:17 yurivish indeed. issue filed.
07:24 raiph yurivish: where did you file an issue?
07:24 yurivish here: https://github.com/drforr/perl6-readline
07:24 yurivish https://github.com/drforr/perl6-readline/issues/9
07:25 _Gustaf_ joined #perl6
07:31 squach1 joined #perl6
07:33 domidumont joined #perl6
07:37 peteretep joined #perl6
07:37 peteretep seen pmurias
07:37 peteretep !seen pmurias
07:38 peteretep Dang it
07:38 domidumont joined #perl6
07:41 protium joined #perl6
07:41 squach joined #perl6
07:42 vendethiel joined #perl6
07:46 yurivish what's a good way to go from a list made with "string".list back to a string?
07:47 yurivish sorry, with "string".NFKD.list
07:48 dalek doc: 5f71f6a | raiph++ | doc/Language/performance.pod:
07:48 dalek doc: Shorten subtitle and other style tweaks
07:48 dalek doc: review: https://github.com/perl6/doc/commit/5f71f6ac82
07:49 raiph m: say "abc".NFKD.list.perl
07:49 camelia rakudo-moar bc5016: OUTPUT«(97, 98, 99).Seq␤»
07:49 raiph m: say Seq.new(97,98).Str.perl
07:49 camelia rakudo-moar bc5016: OUTPUT«Too many positionals passed; expected 2 arguments but got 3␤  in block <unit> at /tmp/IAoCu1lchL line 1␤␤»
07:52 yurivish .map(*.chr).join works but seems very inefficient
07:52 fireartist joined #perl6
07:55 squach1 joined #perl6
07:56 AlexDaniel m: say "abc".NFKD.Str
07:56 camelia rakudo-moar bc5016: OUTPUT«abc␤»
07:57 yurivish m: say "abøc".NFKD.list.grep(* < 256).Str
07:57 camelia rakudo-moar bc5016: OUTPUT«97 98 248 99␤»
07:57 yurivish m: say "abøc".NFKD.list.grep(* < 100).Str # i meant something more like this for the example
07:57 camelia rakudo-moar bc5016: OUTPUT«97 98 99␤»
07:57 ely-se joined #perl6
07:58 AlexDaniel m: my @a = ‘abc’.NFKD.list; say Uni.new(|@a).Str
07:58 camelia rakudo-moar bc5016: OUTPUT«abc␤»
07:58 AlexDaniel yurivish: ↑ two ways to do it
07:58 AlexDaniel yurivish: depending on whether you've lost your Uni object or not
07:59 yurivish ah, cool, thanks!
07:59 AlexDaniel m: my @a = ‘abc’.NFKD.list; say Uni.new(@a).Str
07:59 camelia rakudo-moar bc5016: OUTPUT«abc␤»
07:59 AlexDaniel ah no need for |
08:00 yurivish even better.
08:00 AlexDaniel o/
08:00 yurivish does perl have something like Mathematica's // operator, which lets you put the head of the expression at the end?
08:00 yurivish so I'd say 'abc'.NFLD.list // Uni.new($_).Str or something
08:01 moritz m: given 'abc'.NFLD.list { say Uni.new($_).Str }
08:01 camelia rakudo-moar bc5016: OUTPUT«Method 'NFLD' not found for invocant of class 'Str'␤  in block <unit> at /tmp/3VoafQN12S line 1␤␤»
08:01 moritz m: given 'abc'.NFKD.list { say Uni.new($_).Str }
08:01 camelia rakudo-moar bc5016: OUTPUT«abc␤»
08:01 moritz also feed operators, but they don't work very well yet
08:02 yurivish right
08:02 yurivish and it's okay that you used a scalar topic variable to pass a list?
08:03 moritz seems to have worked, no? :-)
08:03 moritz but I wasn't quite sure myself
08:03 yurivish well, yes, but I'm now wondering why :P
08:04 moritz I still haven't entirely internalized post-GLR semantics yet
08:06 DubiousPepper joined #perl6
08:07 raiph goodnight
08:07 yurivish 'night!
08:07 raiph left #perl6
08:09 RabidGravy joined #perl6
08:09 squach joined #perl6
08:09 firstdayonthejob joined #perl6
08:11 squach2 joined #perl6
08:12 darutoko joined #perl6
08:19 rindolf joined #perl6
08:20 squach joined #perl6
08:23 RabidGravy marning!
08:28 NZKindest joined #perl6
08:33 squach1 joined #perl6
08:34 sortiz joined #perl6
08:35 squach2 joined #perl6
08:43 sortiz \o #perl6
08:48 squach joined #perl6
08:49 jvcakg joined #perl6
08:49 neilb joined #perl6
08:51 sortiz I've been playing with nqp::attributed a while, and found interesting things: https://gist.github.com/salortiz/db2efe401153b74c0b10
08:53 abraxxa joined #perl6
08:59 timotimo .tell raiph i like your performance page on the documentation
08:59 yoleaux timotimo: I'll pass your message to raiph.
09:06 dakkar_ joined #perl6
09:06 araujo joined #perl6
09:13 dalek perl6-most-wanted: a1a68df | (Erik Colson)++ | most-wanted/modules.md:
09:13 dalek perl6-most-wanted: Add Device::SerialPort
09:13 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/a1a68dff0c
09:13 dalek perl6-most-wanted: f7693f3 | RabidGravy++ | most-wanted/modules.md:
09:13 dalek perl6-most-wanted: Merge pull request #16 from ecocode/patch-2
09:13 dalek perl6-most-wanted:
09:13 dalek perl6-most-wanted: Add Device::SerialPort
09:13 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/f7693f32ef
09:13 zhouzhen1 joined #perl6
09:15 neilb joined #perl6
09:16 kaare_ joined #perl6
09:33 abraxxa joined #perl6
09:34 kjs_ joined #perl6
09:34 wamba joined #perl6
09:46 lizmat good *, #perl6!
09:46 timotimo good
09:48 lizmat .tell jnthn MoarVM@master passes all spectest, but breaks all tests in Inline::Perl5: moar(16170,0x7fff7a3f6300) malloc: *** error for object 0x2000000000000: pointer being freed was not allocated
09:48 yoleaux lizmat: I'll pass your message to jnthn.
09:49 lizmat breakfast&
09:50 sortiz lizmat, can you take a look to my attrinited-test.pl? https://gist.github.com/salortiz/db2efe401153b74c0b10
09:52 psy_ joined #perl6
09:55 jnthn sortiz: Left a note on there.
09:55 yoleaux 7 Feb 2016 23:13Z <lizmat> jnthn: do you have an idea as to when object hashes would make it to Moar ?
09:55 yoleaux 09:48Z <lizmat> jnthn: MoarVM@master passes all spectest, but breaks all tests in Inline::Perl5: moar(16170,0x7fff7a3f6300) malloc: *** error for object 0x2000000000000: pointer being freed was not allocated
09:56 sortiz jnthn, Yes, now that is crystal clear.
09:58 sortiz jnthn, And now I understand the real intent of the attrinited function.
10:01 jnthn :)
10:05 jnthn .tell lizmat Think that Inline::Perl5 thing'll need some ASAN/valgrind analysis...
10:05 yoleaux jnthn: I'll pass your message to lizmat.
10:05 jnthn (I can probably do that)
10:05 jnthn (But not until the evening.)
10:08 zakharyas joined #perl6
10:21 timotimo is this valid perl5 code?
10:22 timotimo my %h; $h { $_ } = $_ for 0 .. 1234; say %h<1234>;
10:23 moritz no
10:23 moritz must be {1234} at the end
10:23 timotimo that could be why one of the benchmarks isn't happy
10:23 moritz and better $h{1234}
10:23 gregf_ joined #perl6
10:24 moritz then it actually produces the correct output :-)
10:24 moritz also, the space between $h and { is *really* weird
10:25 sortiz And 'say' may requires a use 5.16 or so.
10:25 moritz 5.010 is enough
10:25 moritz or -E
10:25 moritz for one-liners
10:25 * timotimo is looking for his local checkout of perl6-bench
10:26 timotimo https://github.com/japhb/perl6-bench/blob/master/microbenchmarks.pl#L309
10:26 timotimo that's the line
10:26 telex joined #perl6
10:26 timotimo i hallucinated the space before { $_ }
10:27 * sortiz Never remember when 'say' was added to perl5
10:27 timotimo moritz: since you know perl5, maybe you see some other instances where the perl5 code is wrong?
10:27 timotimo also, is that a syntax error or a runtime error?
10:27 dalek perl6-bench: c906fc2 | timo++ | microbenchmarks.pl:
10:27 dalek perl6-bench: for_hash_set had a typo in its perl5 code
10:27 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/c906fc20e6
10:27 timotimo not actually important
10:29 tokomer joined #perl6
10:29 moritz timotimo: syntax error
10:29 moritz Operator or semicolon missing before %h at -e line 1.
10:29 timotimo good
10:30 kurahaupo joined #perl6
10:30 espadrine joined #perl6
10:31 moritz my $s = " " x SCALE . "x" x SCALE . " " x SCALE; my $result = ""; ($result) = $s =~ /^\s*(.*?)\s*$/s for 1 .. SCALE; say length($result);
10:31 moritz that looks... no, I think it's allright after all
10:34 * timotimo also fixed 9-billion-names
10:36 jnthn timotimo: There was also a case or two where the expected result came out wrong in the Perl 6 ones
10:36 dalek perl6-bench: abddecc | timotimo++ | perl6/rc-9-billion-names:
10:36 dalek perl6-bench: fix rc-9-billion-names for GLR changes to AoA initialization
10:36 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/abddecc785
10:36 jnthn push_all or so
10:36 jnthn Probably also a victim of GLR
10:36 timotimo jnthn: you may have to install Data::Alias to get a few more of the perl5 benchmarks in
10:36 jnthn I...had :S
10:36 timotimo oh?
10:37 tokomer joined #perl6
10:37 jnthn Was pretty sure i did anyways
10:37 timotimo while_bind didn't end up with a perl5 data line
10:37 jnthn yeah
10:37 tokomer joined #perl6
10:37 jnthn It errored out but I couldn't see why
10:37 timotimo OK
10:37 tokomer joined #perl6
10:37 jnthn I'm sure I installed Data::Alias though.
10:37 jnthn Will have another look
10:38 timotimo well, it has to be installed into the right perl5 probably
10:38 timotimo that could be hairy
10:38 DrForr Inline::Scheme::Guile is almost in usable shape, I was going to create a support module for it tonight.
10:38 jnthn timotimo: ohh...right, 'cus we build our own.
10:39 ely-se joined #perl6
10:39 timotimo it's sometimes a little bit sad to see how far rakudo is behind nqp and perl5
10:40 timotimo from int2str_concat it's clear that perl5 does an optimization when it knows a string that gets .='d is only referenced once (or something like that)
10:40 Actualeyes joined #perl6
10:41 timotimo interestingly, postwhile_nil_native gets us a much better result for rakudo than it does for nqp or perl5
10:41 timotimo in fact, perl5 is *between* nqp and rakudo
10:41 jnthn Yeah. It's nice to see we beat perl5 in some places though :)
10:41 cognominal joined #perl6
10:41 jnthn It's not all bad :)
10:41 timotimo i just tend to give the bad parts more emphasis in my head :)
10:41 salv0 joined #perl6
10:41 DrForr I noticed a drastic speedup in my VM after the hash access optimization.
10:42 jnthn timotimo: Well sure, they're what we need to work on :)
10:42 timotimo oh, haha, our optimization for [+] 1 .. SCALE apparently made the reduce_range benchmark explode
10:42 timotimo (and List::Util would be required for the perl5 one, but it would probably not do the optimization of + into the O(1) algorithm)
10:42 ely-se optimised to O(1) algorithm?
10:43 timotimo eval: my $s = join ", " => 1 .. SCALE; my $i; my @s = split ", " => $s while ++$i <= SCALE; say scalar @s;
10:43 timotimo do we have something to eval perl5 code in here?
10:43 timotimo p5: print "hi"
10:44 moritz not anymore
10:44 timotimo OK
10:44 timotimo that code seems wrong
10:44 ely-se what happened to masak?
10:44 ely-se haven't seen him here since ages
10:44 timotimo i saw him just a few hours ago greeting us
10:45 Hotkeys He said hi earlier
10:45 timotimo he's currently in a far-away timezone
10:45 timotimo timo@schmand ~> perl -E 'my $s = join ", " => 1 .. 1024; my $i; my @s = split ", " => $s while ++$i <= 1024; say scalar @s;'
10:45 timotimo 0
10:45 ely-se Hotkeys: oh :)
10:45 ely-se timotimo: oh :)
10:46 ocbtec joined #perl6
10:46 timotimo i can see that the join part of that code works, but the split part seems to make the array empty
10:48 molaf joined #perl6
10:49 dalek perl6-bench: c2a6e9b | timotimo++ | microbenchmarks.pl:
10:49 dalek perl6-bench: throw out sink warning for visit_2d_indices_for for perl6
10:49 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/c2a6e9b7b7
10:51 Actualeyes joined #perl6
10:54 timotimo the nqp version of create_and_copy_2d_grid_cross seems to expect @foo[0][0] := 1 to autovivify a list of lists
10:55 timotimo i'm not sure what that line was for
10:55 timotimo especially since it's apparently inserting a value into the destination AoA before the source is even set up
10:56 dalek perl6-bench: 7a84825 | timotimo++ | microbenchmarks.pl:
10:56 dalek perl6-bench: (create_and_copy_2d_grid_cross) remove autovivification from nqp
10:56 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/7a848258eb
10:56 timotimo that should help things a little bit
10:57 sortiz timotimo, for that test to work in p5, you need to declare @s first: 'my $s = join ", " => 1 .. 1024; my $i; my @s; @s = split(", ", $s) while ++$i < 1024; say scalar @s;'
10:57 timotimo thank you, sortiz
10:57 timotimo yeah, that seems to do it
10:58 dalek perl6-bench: ff3bae1 | timotimo++ | microbenchmarks.pl:
10:58 dalek perl6-bench: fix split_string_constant perl5 code (sortiz++)
10:58 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/ff3bae14d2
10:58 timotimo jnthn: also, Math::BigRat is a thing that'll want installed, in case you haven't done that already
10:59 timotimo oh, huh
10:59 timotimo rat_mul_div_cancel fails, but probably not because of Math::BigRat not being there, because rat_harmonic actually runs
11:00 timotimo timo@schmand ~> perl -E 'use Math::BigRat; my $r = Math::BigRat->new(1); for (1 .. 1024) { $r *= $_; $r /= $_ + 1 }; say $r.numerator . "/" . $r.denominator;'
11:00 timotimo 1/1025numerator/1/1025denominator
11:00 timotimo right, that's probably not correct?
11:01 timotimo wants to use -> instead of . for numerator and denominator?
11:02 dalek perl6-bench: d177e1a | timotimo++ | microbenchmarks.pl:
11:02 dalek perl6-bench: fix copy-pasto(?) in rat_mul_div_cancel perl5 code
11:02 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/d177e1ad38
11:05 jnthn timotimo: I think so
11:06 timotimo changing that made it run, so that's good
11:07 timotimo jnthn: how do you run the benchmarks? do you wait for a time when your machine is 100% idle and run them then?
11:09 ely-se RPN my favourite notation is
11:11 timotimo anyway, i can't wait to see these new lines show up %)
11:13 timotimo jnthn: can you tell why pi-sequential-iteration wouldn't run on your benchmark? the code looks correct and it does run when i run it at the commandline
11:14 jnthn timotimo: It's not on my local machine, it's on the server I ssh from, which I'm not using for much overnight :)
11:14 timotimo oh!
11:14 timotimo that sounds good
11:15 timotimo .tell japhb can we introduce something like "setup-only mode" to perl6-bench? merge-sort starts with building a list of random numbers and rand itself is already 13x slower in rakudo than it is in perl5
11:15 yoleaux timotimo: I'll pass your message to japhb.
11:16 jnthn timotimo: We're probably besting fixing that my making rand faster ;)
11:17 timotimo feel free ;)
11:18 Actualeyes joined #perl6
11:30 wamba joined #perl6
11:31 wamba joined #perl6
11:34 moritz http://joeduffyblog.com/2016/02/07/the-error-model/ has an interesting introduction
11:34 moritz (haven't read the whole thing yet)
11:44 bioexpress joined #perl6
11:47 bioexpress Should I add a Changes-file to a perl6 repo/module?
11:52 timotimo people probably appreciate that
11:54 dalek nqp: 18f991d | (Salvador Ortiz)++ | docs/ops.markdown:
11:54 dalek nqp: Document attrinited opcode
11:54 dalek nqp: review: https://github.com/perl6/nqp/commit/18f991d626
11:54 dalek nqp: d66805f | lizmat++ | docs/ops.markdown:
11:54 dalek nqp: Merge pull request #276 from salortiz/patch-1
11:54 dalek nqp:
11:54 dalek nqp: Document attrinited opcode
11:54 dalek nqp: review: https://github.com/perl6/nqp/commit/d66805f70a
11:54 dalek nqp: 10fa16c | (Páll Haraldsson)++ | README.pod:
11:54 dalek nqp: Update year, since it's there:
11:54 dalek nqp:
11:54 dalek nqp: I've seen some discussion on copyright years not being important.. (blog was about content on websites). I know it's important for books, and maybe(?) software. Since nobody will think copyright has run out/70+ years old (and since/when license allows almost anything) years may not be too important..
11:54 dalek nqp:
11:54 dalek nqp: Please to not list me as a Perl contributor :) This is my first and probably only commit.. I guess I'll have nothing more to do with Perl. [My favourite language is now Julia, it works with Perl (and maybe it does or should work with Perl 6..).
11:54 dalek nqp: review: https://github.com/perl6/nqp/commit/10fa16cdf0
11:54 dalek nqp: 1b85892 | lizmat++ | README.pod:
11:54 dalek nqp: Merge pull request #275 from PallHaraldsson/patch-1
11:54 dalek nqp:
11:54 dalek nqp: Update year, since it's there:
11:54 dalek nqp: review: https://github.com/perl6/nqp/commit/1b8589210a
11:57 ambs joined #perl6
12:06 wamba joined #perl6
12:20 mr-foobar joined #perl6
12:22 DrForr IIRC not dispatching on return types is a feature?
12:22 DrForr (makes perfect sense of course, what type does 'say foo()' "return" anyway?
12:22 DrForr )
12:23 timotimo yes, we doesn't can that.
12:27 DrForr Pity. It'd be nice to be able to say 'returns JSON' or 'returns Str' and have the right method run, but maybe there's another way to support that.
12:27 timotimo of course there is
12:27 timotimo return an object that has a .JSON and a .Str method
12:27 timotimo you can then use variables you've closed over (or passed to the constructor) to do the right piece of work in those methods
12:28 timotimo that's also how we do "wantarray"-like optimizations
12:28 kid51 joined #perl6
12:29 DrForr Right, I do something similar in ANTLR:: that I'd forgotten about. I'll have to think about how to neatly wrap that up.
12:31 timotimo i think we have a "masquerade" module in the ecosystem that does something similar
12:35 sufrostico joined #perl6
12:37 dalek rakudo/nom: c387d6c | lizmat++ | src/core/Hash.pm:
12:37 dalek rakudo/nom: Scrape a few % off of Hash.push|append
12:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c387d6c297
12:43 sufrostico joined #perl6
12:45 firstdayonthejob joined #perl6
12:47 kid51 joined #perl6
13:08 arnsholt hoelzro++ # Multi-line REPL
13:09 Sgeo joined #perl6
13:15 pmurias joined #perl6
13:15 dalek nqp: fc9de82 | (Pawel Murias)++ | src/vm/js/ (15 files):
13:15 dalek nqp: [js] Represent arrays by wrapping javascript in NQPArray rather than passing raw Array around.
13:15 dalek nqp:
13:15 dalek nqp: Refactor everything to handle that.
13:15 dalek nqp: review: https://github.com/perl6/nqp/commit/fc9de82b0a
13:17 Ven joined #perl6
13:24 dalek rakudo/nom: a5d1e94 | lizmat++ | src/core/Match.pm:
13:24 dalek rakudo/nom: Make it easier to spot errors in Match.perl
13:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a5d1e949f8
13:40 Ven joined #perl6
13:41 llfourn m: class C { method sink { say "SUNK!" } }; say "one"; my ($a) = C.new; say "two"; my $b = C.new;  # Bug? why does the first one sink?
13:41 camelia rakudo-moar a5d1e9: OUTPUT«one␤SUNK!␤two␤»
13:43 lizmat llfourn: because my doesn't sink, but a List in my does?
13:43 yoleaux 10:05Z <jnthn> lizmat: Think that Inline::Perl5 thing'll need some ASAN/valgrind analysis...
13:45 llfourn lizmat: is that intended do you think?
13:45 llfourn (I don't understand sink all that well)
13:45 lizmat I think it's a side-effect of STORE returning Nil
13:45 lizmat hmmmm
13:47 llfourn lizmat: let me know if you want me to RT it :)
13:47 lizmat please do
13:47 llfourn kk
13:47 lizmat I think I have a solution, but would be nice if it doesn't fall through the cracks
13:51 llfourn https://rt.perl.org/Public/Bug/Display.html?id=127491 # :)
13:51 lizmat bah, not a solution :-(
13:52 llfourn gah!
13:52 Ven joined #perl6
13:52 lizmat giving it one more try
13:53 llfourn lizmat++
13:56 panosGR joined #perl6
13:56 lizmat alas, no go
13:56 panosGR Hello everyone.
13:56 moritz \o panosGR
13:56 panosGR I wanted to ask a question regarding Perl6.
13:56 llfourn you've come to the right place!
13:56 panosGR I have a module named WWW::Mechanize which i using in Perl5
13:57 panosGR How to use it in Perl6.
13:57 panosGR Thank you. :)
13:57 panosGR Do i have to port it ?
13:57 llfourn panosGR: https://github.com/niner/Inline-Perl5
13:58 panosGR OMG !!!
13:58 panosGR My friend you really made my day !!!!
13:58 panosGR :) :) :)
13:58 panosGR But in theory can i port it to be fully Perl6 compatible ?
13:59 llfourn \o/
13:59 lizmat panosGR: I think even in practice!
13:59 jast of course... it may be a little bit more work, though :)
14:00 panosGR But if i port it successfully can i put it out as an official ported Perl6 module for the rest of the people to use it?
14:00 llfourn It would be an experince. But you can make it non-blocking in the process!
14:00 panosGR I mean...since i am going to do the work for porting it.....
14:00 perlpilot panosGR: I don't know about that "official" word, but the rest of your sentence is true  :)
14:00 panosGR I am so sorry but i am a complete n00b in Perl6 !
14:00 llfourn if you are aiming to make something exactly the same then I can't see why not
14:01 jast panosGR: have a look at http://modules.perl6.org/ -- there's a brief intro and a link for new module authors
14:01 llfourn but there are probably some things that can be re-thought from WWW::Mechanize in p6
14:01 hoelzro o/ #perl6
14:01 panosGR I don't mind! :) I can start working and in the process of doing it the community can help out with features.
14:02 llfourn \o
14:02 panosGR :)
14:02 panosGR Thank you so much guys ! You really made my afternoon !!!!
14:02 panosGR I am in your debt !
14:02 sortiz hoelzro++ # For your work for multi-line REPL
14:02 llfourn easiest debt I've ever picked up :D
14:02 panosGR :)
14:03 perlpilot nine++  (I don't think he's gotten enough kudos for Inline::Perl5  :)
14:03 panosGR Bye, bye to everyone and see you again soon !
14:03 llfourn ^ yes nine++ that is some real debt
14:04 panosGR left #perl6
14:07 DubiousPepper joined #perl6
14:09 neilb left #perl6
14:10 leont joined #perl6
14:11 mr-foobar joined #perl6
14:11 japhb joined #perl6
14:15 cdg joined #perl6
14:22 M-eternaleye joined #perl6
14:24 dalek rakudo/nom: 38214da | lizmat++ | src/core/Hash.pm:
14:24 dalek rakudo/nom: Streamline Hash|Hash[Type].ASSIGN-KEY
14:24 dalek rakudo/nom:
14:24 dalek rakudo/nom: - no longer bombs with "cannot unbox a type object" for %h{Str}
14:24 dalek rakudo/nom: - make Hash[Type].ASSIGNKEY a few percent faster
14:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/38214da688
14:25 uruwi joined #perl6
14:27 rindolf joined #perl6
14:30 andreoss joined #perl6
14:30 kjs_ joined #perl6
14:30 M-matthew joined #perl6
14:30 M-Illandan joined #perl6
14:31 andreoss is rakudo confirmed to work on Solaris?
14:31 lizmat would be pleasantly surprised.... maybe El_Che knows
14:33 andreoss it gets confused about linker and compiler when building the probo, but even after fixining it in Makefile, it failes to build libuv
14:33 andreoss *probe
14:34 FROGGS IIRC I also tried to build moar on solaris and failed to build libuv
14:34 andreoss it seems the wrong headers are used
14:34 sortiz lizmat, In your last Map.Hash why not: my $hash := nqp::create(Hash); if nqp::defined($!storage) && nqp::elems($!storage) { <ITER-CODE> }␤$hash; # Without else
14:36 lizmat hmm... good point
14:37 lizmat but if there's nothing to copy, it should not keep it in a variable
14:39 sortiz The variable is lexical and not captured, no?
14:39 Khisanth joined #perl6
14:39 dalek rakudo/nom: e58d360 | lizmat++ | src/core/Hash.pm:
14:39 dalek rakudo/nom: Make Hash[Type].BIND-KEY about 2x as fast
14:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e58d360b25
14:40 lizmat sortiz: indeed
14:41 timotimo 2x as fast! holy cow.
14:41 timotimo but there's much overhead to get to BIND-KEY, right?
14:41 lizmat yes
14:41 timotimo fair enough
14:41 sortiz And imo, the same logic applies to Map.Capture, and the if can be turned postfix.
14:41 timotimo oh well :S
14:41 lizmat it will make inlining better
14:41 lizmat sortiz: the thing is, Map is immutable
14:42 lizmat so it would be pretty hard to create a Map with a $!storage *and* not have any elems
14:42 lizmat especially since Map.new checks for that
14:43 lizmat so I'm gonna keep it like it is :-)   but sortiz++ for thinking along!
14:44 sortiz Good point, but then see Map.Bool and Map.elems.
14:44 lizmat sortiz++  good catch!
14:45 lizmat well, elems not so much, but Bool: yes
14:45 lizmat except that we would have to make a Hash.Bool then
14:47 sortiz Yup, optimizing is tricky, I'm learning... :)
14:48 lizmat measuring speedup on Map.Bool now
14:49 lizmat hmmm... interesting fail more
14:49 lizmat *mode
14:52 brrt joined #perl6
14:52 brrt ohhai
14:52 CIAvash joined #perl6
14:57 lizmat sortiz: hmmm..  looks like somewhere something *is* creating Maps with a defined empty $!storage  :-(
14:58 lizmat and of course, this happens when precomping  :-(
14:58 MadcapJake joined #perl6
14:58 Guest27967 left #perl6
15:01 sortiz lizmat, well and good to know, so may be the && nqp.elems($!storage) is indeed util in Map.Hash.
15:05 lizmat checking something else atm
15:05 sortiz lizmat, Seen nqp::create(Map) in Capture.hash, and well be a Capture without named args.
15:05 lizmat yeah, just fixed that  :-)
15:06 lizmat alas, that's not the only one doing it :-(
15:09 skids joined #perl6
15:10 CIAvash joined #perl6
15:15 vendethiel joined #perl6
15:16 dalek doc: ccb9abb | skids++ | doc/Type/Map.pod:
15:16 dalek doc: s/an map/a map/
15:16 dalek doc: review: https://github.com/perl6/doc/commit/ccb9abbfd6
15:17 lizmat m: say [][0]; say Capture.new[0]   # feels to me both should give the same, but am not sure what that would be
15:17 camelia rakudo-moar e58d36: OUTPUT«(Any)␤Nil␤»
15:17 khw joined #perl6
15:18 jnthn lizmat: Not surprised they don't
15:18 jnthn m: say ()[0];
15:18 camelia rakudo-moar e58d36: OUTPUT«Nil␤»
15:18 Actualeyes joined #perl6
15:18 jnthn That's the one that should be consistent (and is...phew :))
15:19 jnthn An Array is a bunch of Scalar containers, so accessing an unassigned index returns an empty Scalar, which defaults to holding Any
15:19 jnthn List and Capture are immutable
15:19 jnthn So if there's nothing there we just give back Nil
15:20 jnthn So the output kinda hides the other important distinction a bit (Array gives back an assignable container)
15:22 lizmat m: say ()[0]; say Capture.new[0]
15:22 camelia rakudo-moar e58d36: OUTPUT«Nil␤Nil␤»
15:22 lizmat m: say (,)[0]; say Capture.new[0]
15:22 camelia rakudo-moar e58d36: OUTPUT«5===SORRY!5=== Error while compiling /tmp/XnT5gA167h␤Preceding context expects a term, but found infix , instead␤at /tmp/XnT5gA167h:1␤------> 3say (,7⏏5)[0]; say Capture.new[0]␤»
15:22 lizmat m: say (1,)[1]; say Capture.new[0]
15:22 camelia rakudo-moar e58d36: OUTPUT«Nil␤Nil␤»
15:22 lizmat ok
15:23 Ven joined #perl6
15:25 prammer joined #perl6
15:28 Ven joined #perl6
15:33 japhb joined #perl6
15:34 dalek ecosystem: d6781e2 | zhouzhen1++ | META.list:
15:34 dalek ecosystem: add Inline::Scheme::Gambit to the list
15:34 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/d6781e24c5
15:34 dalek ecosystem: 28a362e | sylvarant++ | META.list:
15:34 dalek ecosystem: Merge pull request #145 from zhouzhen1/add
15:34 dalek ecosystem:
15:34 dalek ecosystem: add Inline::Scheme::Gambit
15:34 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/28a362e81f
15:35 DrForr Aroo?
15:38 sortiz m: use nqp; unit package Foo; say Foo:: ~~ Map; my \s := nqp::getattr(Foo::, Map, '$!storage'); say nqp::defined(s); say nqp::elems(s)
15:38 camelia rakudo-moar e58d36: OUTPUT«True␤1␤0␤»
15:38 DrForr Huh, much simpler wrapper than what I need.
15:39 moritz DrForr: were you working on the same thing?
15:39 dalek rakudo/nom: 0d12fc4 | lizmat++ | src/core/Capture.pm:
15:39 dalek rakudo/nom: Capture.hash checks better for emptiness
15:39 dalek rakudo/nom:
15:39 dalek rakudo/nom: sortiz++ for spotting
15:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0d12fc4e42
15:39 sortiz lizmat, see a Map with $!storage defined, but elems 0 ^^^
15:40 DrForr No, I have a Guile binding.
15:40 DrForr Guess I should add it, as it's almost ready anyway.
15:41 moritz yes, that would be better
15:41 vendethiel joined #perl6
15:42 andreoss >No compile-time value for s
15:42 andreoss what does this error means?
15:43 timotimo that's probably a less-than-awesome error you're getting :(
15:43 moritz an internal error from the compiler, basically
15:43 jnthn It's a user-facing one in various cases
15:44 moritz oh, like when you use it as a role parameter?
15:44 jnthn In the legitimate case, it means you tried to use the symbol s in a place that needs it at BEGIN time
15:44 timotimo yeah, or in a "use" statement
15:44 jnthn But it's not defined until runtime
15:44 moritz class Foo does R[blah()] { }
15:44 jnthn m: my \s = 'abc'; class ::(s) { }
15:44 camelia rakudo-moar e58d36: OUTPUT«===SORRY!===␤Name ::(s) is not compile-time known, and can not serve as a package name␤»
15:44 jnthn Ah, bit more elaborate error in that case :)
15:44 jnthn But I suspect a variation on that theme
15:46 andreoss m: sub num( |z ) { if z.reverse -> @x { [+] map {  @x[$_] * 10 ** $_ }, ^@x } } ; for 1 -> \s { say num( s, s , s ) }
15:46 camelia rakudo-moar e58d36: OUTPUT«===SORRY!===␤No compile-time value for s␤»
15:46 andreoss why?
15:47 andreoss m: sub num( |z ) { if z -> @x { [+] @x } } ; for 1 -> \s { say num( s, s , s ) }
15:47 camelia rakudo-moar e58d36: OUTPUT«===SORRY!===␤No compile-time value for s␤»
15:47 andreoss m: sub num( |z ) { [+] z } ; for 1 -> \s { say num( s, s , s ) }
15:47 camelia rakudo-moar e58d36: OUTPUT«===SORRY!===␤No compile-time value for s␤»
15:48 jnthn Um, not sure quite what it's trying to do, but num is a type name, and num(...) is thus a coercion
15:48 jnthn Not a sub call
15:48 andreoss oh..
15:48 jnthn Does &num(...) fix it?
15:48 andreoss it does
15:48 jnthn We've pondered in the past adding a warning when people declare subs that match typenames...it would have helped out here
15:49 timotimo i'm not sure why that would require a compile-time value for s, though?
15:50 jnthn timotimo: No, me either.
15:50 jnthn Something feels a little off there
15:50 dalek rakudo/nom: 81dc4b7 | lizmat++ | src/core/Map.pm:
15:50 dalek rakudo/nom: Make Map.Hash look more closely at being empty
15:50 dalek rakudo/nom:
15:50 dalek rakudo/nom: Again, sortiz++
15:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/81dc4b79bc
15:52 musiKk joined #perl6
16:10 lizmat jnthn: let me rephrase my question about type hashes in MoarVM: do you think it would make sense to go for the single hash approach like I've done with Bags/Mixes ?
16:11 TEttinger joined #perl6
16:11 lizmat it would reduce the memory footprint significantly
16:11 isBEKaml joined #perl6
16:13 bowtie joined #perl6
16:13 kurahaupo joined #perl6
16:15 jnthn lizmat: I assume you've measured that? :)
16:16 jnthn lizmat: I've no problem with aligning object hashes with the others though
16:16 jnthn lizmat: It'll make the transition to whatever we end up with easier.
16:16 lizmat well...  actually, a good point
16:16 lizmat I *didn't* measure that
16:16 lizmat I assumed that having 1 hash instead of 2 would mean 1/2 the memory usage
16:16 jnthn I don't think it'll be a *loss*, but my hunch is it's not a huge win either.
16:17 jnthn Yeah, but need to factor in the Pair objects kept around in the second appraoch. :)
16:17 lizmat but having a Pair for each value would also have a memory impact of course
16:17 jnthn Thus why my guess is it's close to break even. :)
16:17 lizmat yeah, gotcha
16:17 jnthn But uniformity is worthwhile.
16:18 jnthn And one hash lookup instead of 2 is probably a speed win.
16:18 lizmat what would be a good way of measuring memory usage ?
16:18 Juerd I use top and sleep 20 :)
16:18 lizmat ok
16:18 jnthn Create a huge object hash (100,000 keys or so), nqp::force_gc(), then sleep
16:19 Juerd I'd love to see wins in the area of memory usage; it's the primary thing that keeps me from using P6 in production right now
16:19 Juerd Production here means running on virtual machines with little memory (512 MB)
16:20 Juerd Is there any way to see what the memory is used *for*, in a threaded thing?
16:20 jnthn Juerd: No, we're lacking good memory profiling tools so far
16:20 ely-se joined #perl6
16:21 jnthn Juerd: At the Perl 6 level of course
16:21 Juerd A simple MQTT::Client program will use approx. 240 MB almost immediately, and start leaking a lot from that point forward, and I have no idea how to even begin debugging this :)
16:21 jnthn Juerd: Plenty for the VM level. Also been working on hunting leaks of late.
16:21 jnthn Understanding and reducing memory use is certainly something on my radar.
16:22 Juerd That's great to hear :)
16:23 lizmat Juerd : maybe an idea to checkout moar=master
16:23 Juerd lizmat: I don't know what that means
16:23 Juerd What's the =?
16:23 lizmat build rakudo with -gen-moar=master
16:23 Juerd Is that something I can feed rakudobrew?
16:24 lizmat *that* is something I don't know
16:24 Juerd :)
16:24 Juerd I should really figure out how to compile manually, one day
16:24 Juerd It's probably not that hard but it's out of my comfort zone
16:24 lizmat git clone
16:24 lizmat perl Configure.pl --gen-moar --gen-nqp --backends=moar
16:24 lizmat make install
16:24 lizmat that's basically it
16:25 sufrostico joined #perl6
16:25 isBEKaml Juerd: perhaps you can use this: https://github.com/tadzik/rakudobrew/blob/master/bin/rakudobrew#L103
16:25 Juerd I'll try soon; need to go now. Thanks so far :)
16:25 isBEKaml --configure-opts
16:26 Actualeyes left #perl6
16:27 andreoss left #perl6
16:28 uruwi joined #perl6
16:28 dalek rakudo/nom: 07cc6f6 | lizmat++ | src/core/Hash.pm:
16:28 dalek rakudo/nom: Make Hash[Any,Any]{object} about 2x as fast
16:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/07cc6f6d41
16:28 bowtie_ joined #perl6
16:31 skids isBEKaml: --configure-opts won't work on triple ( I have a probably bitrotted PR for that )
16:32 AlexDaniel joined #perl6
16:32 raiph joined #perl6
16:33 isBEKaml skids: Oh :-(
16:38 hankache joined #perl6
16:42 hankache hello #perl6
16:43 dalek rakudo/nom: d70d264 | lizmat++ | src/core/Hash.pm:
16:43 dalek rakudo/nom: $!keys are a localy visible role attribute
16:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d70d264829
16:44 isBEKaml skids: I now see your PR. I can certainly understand tadzik's reluctance in accepting it. How about breaking that out into a configuration instead of passing them in as a CLI argument? Perhaps that would make it a bit more manageable? Either way, that definitely demands a rewrite :|
16:45 leont joined #perl6
16:46 skids I think really the issue is in the toolchain, not rakudobrew.  Having MoarVM/nqp/rakudo accept and ignore (or pass on) options would reduce the hinkery needed.
16:46 leont I forgot with whom I talked about it, but I wrote most of that Getopt::Long I discussed earlier
16:47 lizmat jnthn: the single hash approach appears to be using 4% less memory for 1M hash entries
16:49 lizmat jnthn: also it takes 10% less CPU to initialize
16:50 jnthn lizmat: Pretty close to break even on memory then, but on the correct side of the line ;)
16:50 jnthn So nice
16:50 timotimo Juerd: rakudobrew has a "triple" option where you can give a branch or commit for rakudo, nqp and moarvm; you'd then use "rakudobrew triple nom master master" to get latest-everything
16:50 jnthn And faster init is nice indeed
16:50 lizmat yes, but the AT-KEY is of course getting more expensive
16:51 abaugher_ joined #perl6
16:54 sufrostico joined #perl6
16:55 AlexDaniel bartolin: hmm I see that your fork of roast-data has no commit today. Is it ok?
16:56 AlexDaniel bartolin: I'm curious because I'm waiting for jvm log
16:56 lizmat jnthn: still, a loop with both forms of AT-KEY uses 3% less CPU for the single hash case
16:57 lizmat jnthn: the code I used: https://gist.github.com/lizmat/b3c9fa1a67b58dac4ebb
17:02 autark joined #perl6
17:03 jnthn lizmat: Hm, so...good? :)
17:03 jnthn lizmat: I guess constructing a Pair is cheaper than hashing twice
17:04 lizmat yeah, looks like it
17:04 jnthn Nice
17:05 jnthn Well, allocation is relatively fast, and Pair is pretty simple for the optimizer, I'd hope
17:05 lizmat yeah, it beats creating an nqp::list by a long shot
17:05 lizmat and uses less memory
17:07 lizmat but I'm first going to finish my current opt of object hashes, so at least we can measure the gains from the single hash approach there
17:08 bowtie_ joined #perl6
17:08 hoelzro someone using the MSI for R* encountered a problem when building Linenoise: https://github.com/hoelzro/p6-linenoise/issues/13
17:09 hoelzro the issue seems to be that the MSI is built using nmake, so LibraryMake thinks that it should use nmake to build Linenoise
17:09 hoelzro however, the user has strawberry Perl (and thus gmake) installed
17:09 hoelzro any thoughts on how we can get around this with people using the MSI?
17:10 perlpilot does windows have an equivalent to symbolic links?
17:10 perlpilot (or any kind of link)
17:10 jast several, actually
17:10 jast https://en.wikipedia.org/wiki/NTFS_symbolic_link
17:11 jnthn hoelzro: Well, one way is not to piggy-back off how Moar was configured/built :)
17:11 jnthn At least, not for those the choice of make program
17:13 Perleone left #perl6
17:15 s_kilk joined #perl6
17:16 dalek ecosystem: d622fb6 | kuerbis++ | META.list:
17:16 dalek ecosystem: Add Term-Choose-p6 to ecosystem
17:16 dalek ecosystem:
17:16 dalek ecosystem: See https://github.com/kuerbis/Term-Choose-p6
17:16 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/d622fb6ee9
17:16 dalek ecosystem: 4fe4c09 | (Zoffix Znet)++ | META.list:
17:16 dalek ecosystem: Merge pull request #146 from kuerbis/master
17:16 dalek ecosystem:
17:16 dalek ecosystem: Add Term-Choose-p6 to ecosystem
17:16 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/4fe4c09622
17:16 ely-se joined #perl6
17:19 bowtie joined #perl6
17:20 stmuk_ hoelzro: it was a mistake that the MSI shipped without Linenoise .. the future R* build will include it
17:23 uruwi joined #perl6
17:24 FROGGS joined #perl6
17:25 stmuk_ assuming the windows R* build actually builds it correctly
17:25 stmuk_ :)
17:27 Sqirrel_ joined #perl6
17:28 lonewolf28 joined #perl6
17:28 dalek rakudo/nom: ea15bc1 | lizmat++ | src/core/Pair.pm:
17:28 dalek rakudo/nom: Simplify Pair.antipair
17:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ea15bc198c
17:28 dalek rakudo/nom: 472ff3e | lizmat++ | src/core/Hash.pm:
17:28 dalek rakudo/nom: Make Hash[Any,Any] = ... a few percentages faster
17:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/472ff3e23b
17:35 perl6newbee joined #perl6
17:39 bioexpress joined #perl6
17:45 autarch joined #perl6
17:50 buharin joined #perl6
17:59 hoelzro stmuk_: yeah, that was my mistake, but this is still an issue for other modules
18:00 hoelzro jnthn: agreed =) I'm just trying to think about how to get around this
18:00 addison joined #perl6
18:01 mr-foobar joined #perl6
18:01 leont Travis failed, because «unable to access 'https://github.com/tadzik/rakudobrew.git/': Failed connect to github.com:443; Connection timed out»…
18:03 dalek rakudo/nom: 17a4434 | lizmat++ | src/core/Hash.pm:
18:03 dalek rakudo/nom: Make Hash[Any,Any]{obj} = ... a few percent faster
18:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/17a4434c48
18:05 geekosaur travis does that a lot
18:06 rindolf joined #perl6
18:07 Juerd Sweet!
18:07 Juerd timotimo: Thanks for letting me know about 'triple'. Looks easy enough :)
18:08 timotimo :)
18:08 japhb joined #perl6
18:13 Juerd Couldn't determine correct make program. Aborting.
18:13 Juerd Well, that's a first :)
18:15 Laurent_R joined #perl6
18:17 virtualsue joined #perl6
18:19 dalek rakudo/nom: b4c2e9d | lizmat++ | src/core/Hash.pm:
18:19 dalek rakudo/nom: Make Hash[Any,Any]{obj} := .. a few percent faster
18:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b4c2e9dce2
18:22 stmuk_ hoelzro: oh sorry it was your PR which fixed that .. so I guess you knew about it anyway!
18:23 SCHAAP137 joined #perl6
18:24 alpha123 joined #perl6
18:30 dalek ecosystem/add-Inline-Scheme-Guile: fbf4664 | (Jeffrey Goff)++ | META.list:
18:30 dalek ecosystem/add-Inline-Scheme-Guile: Add Inline-Scheme-Guile
18:30 dalek ecosystem/add-Inline-Scheme-Guile: review: https://github.com/perl6/ecosystem/commit/fbf4664e84
18:30 dalek ecosystem: fbf4664 | (Jeffrey Goff)++ | META.list:
18:30 dalek ecosystem: Add Inline-Scheme-Guile
18:30 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/fbf4664e84
18:30 dalek ecosystem: 4ad8bcf | drforr++ | META.list:
18:30 dalek ecosystem: Merge pull request #147 from perl6/add-Inline-Scheme-Guile
18:30 dalek ecosystem:
18:30 dalek ecosystem: Add Inline-Scheme-Guile
18:30 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/4ad8bcfb25
18:30 dalek star: 9c53efd | (Steve Mynott)++ | ports/darwin_dmg/ (2 files):
18:30 dalek star: Start to bring back R* Mac dmg binary build from dead
18:30 dalek star: - remove parrot specific workarounds and add simple Configure
18:30 dalek star: - Rename target directory Rakudo like the Windows build build
18:30 dalek star: - Comment out Rez and remove unused option
18:30 dalek star: - Increase temp file system size so precomp files fit
18:30 dalek star: - Now works with some hand holding
18:30 dalek star: review: https://github.com/rakudo/star/commit/9c53efd7a6
18:33 bowtie joined #perl6
18:34 vendethiel joined #perl6
18:35 lizmat m: my %h{Any}; %h.DELETE-KEY("b")   # a real bug about to be fixed
18:35 camelia rakudo-moar b4c2e9: OUTPUT«This type does not support associative operations␤  in block <unit> at /tmp/7PTnEB9zIs line 1␤␤»
18:36 timotimo oh, neat!
18:39 japhb joined #perl6
18:40 kmel joined #perl6
18:40 dha joined #perl6
18:44 ely-se joined #perl6
18:46 b2gills Hotkeys: the shortest way to get an Int from a Rat is ï½¢+~(Rat) ï½£ (backlogging)
18:47 dalek star: 37a9aab | (Steve Mynott)++ | ports/darwin_dmg/package_darwin_dmg.pl:
18:47 dalek star: don't attempt make clean
18:47 dalek star: review: https://github.com/rakudo/star/commit/37a9aab2ac
18:48 jdv79 how come the "get started" page on perl6.org doesn't mention perl6intro.com or xiny or rosetta code or the nqp/internals intro jnthn did?
18:49 Hotkeys b2gills: oh neat, that might actually be shorter for the golf I was doing, thanks
18:49 jdv79 those are the "get started" resources that pop into mind for me
18:50 jdv79 maybe there are even more?
18:50 buharin hey
18:51 buharin whats a standard
18:51 buharin psgi wigs or p6sgi
18:51 buharin ?
18:51 Hotkeys Never mind it isn't
18:51 bioexpress joined #perl6
18:51 Hotkeys Thanks anyway
18:51 AlexDaniel jdv79: perhaps also https://learnxinyminutes.com/docs/perl6/
18:51 TimToady .oO(most standards eventually turn into chevrons...)
18:51 yoleaux 6 Feb 2016 02:01Z <ChristopherBotto> TimToady: I hope you are feeling better. I heard you were sick a while ago and the last several times I've checked the IRC logs you haven't been around
18:52 bioexpress Hi, is it better to let a subroutine return an array 'p6: return [ @list[@indexes] ];' or is a List 'p6: return @list[@indexes];' also OK? Returning the List would be a little faster.
18:52 jdv79 AlexDaniel: sorry, that's what i meant with "xiny".  i forgot the url - thanks!
18:52 * TimToady got sick again while taking his vactation from a vacation, so is now recovering from his vacation from his vacation... :)
18:54 AlexDaniel jdv79: send a pull request? :)
18:57 uruwi joined #perl6
18:58 japhb joined #perl6
18:58 b2gills Hotkeys: which golf?
19:02 * lizmat is glad TimToady is feeling better
19:02 raiph joined #perl6
19:03 japhb .
19:03 yoleaux 11:15Z <timotimo> japhb: can we introduce something like "setup-only mode" to perl6-bench? merge-sort starts with building a list of random numbers and rand itself is already 13x slower in rakudo than it is in perl5
19:03 timotimo jdv79: actually, the download page has these links
19:03 japhb Ah, merge-sort was a contribution.
19:04 timotimo japhb: i don't really see a way to make that part not be timed :|
19:04 japhb timotimo: The general idea was that SCALE == 0 should result in nothing but compile time and unavoidable startup
19:04 timotimo yeah, but the startup gets bigger the more SCALE you have
19:04 japhb Lemme look at the code in question
19:04 timotimo it generates a list of random numbers SCALE items big
19:05 b2gills Hotkeys: I'm asking because I already have one for CG #71427
19:05 japhb timotimo: Right, what I'm saying is, variable sized things were never supposed to be outside SCALE-controlled loops
19:05 timotimo hm
19:06 timotimo well, i suppose that's all right?
19:06 japhb OIC.
19:06 timotimo we could instead just sort a fixed-size list SCALE times
19:06 japhb The problem is not that it happens in BEGIN or somesuch.  Your complaint is that creating the random data takes so much time, it masks the time taken by the sort itself.
19:07 AlexDaniel b2gills: why +~ ? I don't get it. Does it even work?
19:07 timotimo tbh, i don't actually know what percentage of time is nommed by that part
19:07 timotimo i should probably have measured
19:07 timotimo but i suspect it's much more expensive in the perl6 code compared to the perl5 code
19:07 AlexDaniel m: my $r = 25/3; say WHAT +~($r)
19:07 camelia rakudo-moar b4c2e9: OUTPUT«(Rat)␤»
19:07 japhb Yeah, worth checking that.  You can just run it at the command line, with a couple timers added.
19:08 japhb For large enough scale, the sort *should* dominate, because O(n log n) > O(n) ... but that depends on e.g. 'xx' being O(n).
19:08 AlexDaniel b2gills: ah, that's if you have int-like rat (like “25”)
19:08 japhb Perhaps that's a valid test, though -- just slightly misnamed.
19:08 AlexDaniel b2gills: okay nvm
19:08 japhb timotimo: 'merge-sort-random-ints', perhaps
19:09 b2gills m: my $r = 1/1; say $r.^name; say (+~$r).^name
19:09 camelia rakudo-moar b4c2e9: OUTPUT«Rat␤Int␤»
19:09 timotimo to be fair, the test where perl5 kicks our ass with regards to rand has a for loop where a counter gets +='d
19:10 japhb I would use pre-generated data, but A. that takes up space in the repo if it's checked in, and B. Rakudo's IO has been slow enough in the past that reading pre-generated random Ints may be *slower*.
19:10 japhb nodnod
19:11 lizmat "foo".IO.slurp.words for whitespace separated things should be pretty fast now
19:11 timotimo well, the pre-generated ints could be in the script
19:11 timotimo then it'd be compile time every time and that'd be thrown out
19:12 buharin hey I cant get http://doc.perl6.org/type/Promise what is ->
19:12 timotimo lizmat: we'd also then be int-ifying those results; i wonder how expensive that is?
19:12 buharin I read it is block
19:12 espadrine joined #perl6
19:12 buharin but how it works in that context
19:13 timotimo where exactly are you looking?
19:13 lizmat ah, yes, probably
19:13 buharin on-error variable is stored in $error
19:13 lizmat too bad we don't have a fast unpack  :)
19:13 timotimo ah
19:13 buharin and then it is passes to v.break
19:13 buharin or what
19:13 timotimo not quite, let me explain
19:13 skids buharin: -> $a { } is sort of like 'anon sub ($a) { }'
19:13 dalek rakudo/nom: c4fe4b3 | lizmat++ | src/core/Hash.pm:
19:13 dalek rakudo/nom: Make Hash[Any,Any].DELETE-KEY 30-40% faster
19:13 dalek rakudo/nom:
19:13 dalek rakudo/nom: And also handle the :SINK case
19:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c4fe4b3eef
19:13 llfourn buharin: it's making a named arg with a closure as its value
19:14 timotimo "on-error => foobar" is a pair with the key on-error (which is the name of the argument async-get expects) and the value foobar
19:14 llfourn on-error => sub ($error) { ... } # similar to
19:14 timotimo in this case, foobar is -> $error { ... }, which is a subroutine that accepts a parameter "$error" and does stuff with it
19:15 timotimo in this case it calls .break on the $v (which is the Vow that belongs to the promise) with the error as the parameter to break the promise with
19:15 jdv79 timotimo: huh.  the docs seem to be unnecessarily splayed out
19:16 timotimo jdv79: that's about the links to the learning material?
19:16 buharin w8
19:16 buharin anon is a keyword which prevent install sub in lexical scope
19:16 AlexDaniel on-error => anon sub foo ($error) { … } # this should probably work too
19:16 buharin oh yes :D
19:16 buharin that it
19:17 buharin AlexDaniel, it is more readable form
19:17 buharin need brb
19:17 AlexDaniel buharin: except that you are providing a sub name but not using it anywhere
19:17 AlexDaniel unless you want it to be recursive, I guess…
19:18 AlexDaniel in which case 「sub ($error) { … }」 is just as good
19:18 AlexDaniel or 「-> $error { … }」 for short :)
19:19 jdv79 yeah, idk.  i'd need to think about it more before i suggest anything.  it just feels "too busy" or "too intricate".
19:19 dalek ecosystem: f2fc074 | skids++ | META.list:
19:19 dalek ecosystem: Add Control::Bail to ecosystem
19:19 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/f2fc074802
19:20 jdv79 subjective i know.  i'm just looking at it after not for a while.
19:20 timotimo mhh
19:20 domidumont joined #perl6
19:20 yqt joined #perl6
19:20 AlexDaniel m: anon sub foo($x) { say foo($x+1) unless $x == 10; }(1)
19:20 camelia rakudo-moar b4c2e9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CxqKIKuwTc␤Undeclared routine:␤    foo used at line 1␤␤»
19:20 timotimo i appreciate your intention of helping out in that particular area!
19:20 AlexDaniel it seems like you can't do that, hmm…
19:21 geekosaur it's NYI
19:21 timotimo well, we have &?ROUTINE
19:21 timotimo m: anon sub foo($x) { say &?ROUTINE($x+1) unless $x == 10; }(1)
19:21 camelia rakudo-moar b4c2e9: OUTPUT«()␤True␤True␤True␤True␤True␤True␤True␤True␤»
19:22 dalek star: d63b1f7 | (Steve Mynott)++ | ports/darwin_dmg/adjust_installation_window.scpt:
19:22 dalek star: use Rakudo in applescript too
19:22 dalek star: review: https://github.com/rakudo/star/commit/d63b1f75ef
19:23 AlexDaniel geekosaur: good to know, thanks
19:23 AlexDaniel timotimo: already knew that, thanks anyway :)
19:23 timotimo 'k
19:24 timotimo m: anon sub foo($x) { say callwith($x+1) unless $x == 10; }(1)
19:24 camelia rakudo-moar b4c2e9: OUTPUT«callwith is not in the dynamic scope of a dispatcher␤  in sub foo at /tmp/VQKaZTr3MF line 1␤  in block <unit> at /tmp/VQKaZTr3MF line 1␤␤»
19:24 timotimo m: anon multi sub foo($x) { say &?ROUTINE($x+1) unless $x == 10; }(1)
19:24 camelia rakudo-moar b4c2e9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qdx3jxyu1_␤Cannot use 'anon' with individual multi candidates. Please declare an anon-scoped proto instead␤at /tmp/qdx3jxyu1_:1␤------> 3{ say &?ROUTINE($x+1) unless $x == 10; }7⏏5(1)␤    expectin…»
19:24 timotimo pff.
19:26 M-eternaleye joined #perl6
19:31 hippie m: say pi.WHAT ~ ' <- pi'; # say's auto-.gist confused me greatly at first
19:31 camelia rakudo-moar c4fe4b: OUTPUT«Use of uninitialized value of type Num in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/S81Obyfslk line 1␤ <- pi␤»
19:32 lizmat WHAT returns a type object, that stringifies as "" with warning
19:32 lizmat m: say pi.WHAT.Str ~ ' <- pi'
19:32 camelia rakudo-moar c4fe4b: OUTPUT«Use of uninitialized value of type Num in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/JtTrjSDIRT line 1␤ <- pi␤»
19:32 lizmat m: say pi.^name ~ ' <- pi'
19:32 camelia rakudo-moar c4fe4b: OUTPUT«Num <- pi␤»
19:33 hippie right, but contrasted with 'say pi.WHAT;  say pi.WHAT ~ ' <- pi'; -- you can see what I might've expected.
19:34 * lizmat takes a break from optimizing code for some food and then will commence on the past 2 weeks of Perl 6 Weekly
19:34 hippie food++
19:34 timotimo lizmat: thank you very much
19:35 Sqirrel joined #perl6
19:40 cognominal joined #perl6
19:41 captain-adequate joined #perl6
19:45 buharin joined #perl6
19:48 addison joined #perl6
19:53 b2gills I just found a use for &infix:<^...> but it doesn't exist. :(
19:54 perlpilot b2gills: sorry ... what would that do?
19:54 b2gills throw out the first element
19:54 perlpilot so ... you need the first element to get the sequence, but you don't actually need it for the purpose you are using the sequence for?
19:54 b2gills {([-1,1],[0,2],{[$^a[0,1]Z+$^b[1,0]]}^...*)[^$_]»[0]}
19:55 b2gills {([-1,1],[0,2],{[$^a[0,1]Z+$^b[1,0]]}...*)[1..$_+1]»[0]}
19:55 b2gills It's for a code golf
19:56 b2gills oops off by one error {([-1,1],[0,2],{[$^a[0,1]Z+$^b[1,0]]}^...*)[0..$_]»[0]}
20:01 AlexDaniel b2gills: why not just change [0..$_] to [1..$_] ? :)
20:01 AlexDaniel unless you want to have [^$_] of course
20:01 b2gills AlexDaniel: it would have to be [1..$_+1]
20:02 AlexDaniel riiight
20:02 AlexDaniel ah I know
20:02 AlexDaniel [^$_+1] ?
20:02 AlexDaniel does that work?
20:02 Cabanossi joined #perl6
20:03 AlexDaniel b2gills: ↑ ?
20:03 b2gills m: say +(1..$_+1); say +(1^5+1)
20:03 camelia rakudo-moar c4fe4b: OUTPUT«Use of uninitialized value of type Any in numeric context  in block <unit> at /tmp/t167_S1agu line 1␤1␤one(1, 6)␤»
20:03 AlexDaniel what
20:03 AlexDaniel m: say +(1..$_+1); say +(^5+1)
20:03 camelia rakudo-moar c4fe4b: OUTPUT«Use of uninitialized value of type Any in numeric context  in block <unit> at /tmp/DSwgefOhxd line 1␤1␤5␤»
20:03 b2gills m: say +(1..$_+1); say +(^5+1)
20:03 camelia rakudo-moar c4fe4b: OUTPUT«Use of uninitialized value of type Any in numeric context  in block <unit> at /tmp/pHFKv7J4eK line 1␤1␤5␤»
20:03 AlexDaniel m: say +(1..5+1); say +(^5+1)
20:03 camelia rakudo-moar c4fe4b: OUTPUT«6␤5␤»
20:04 AlexDaniel +2 then?
20:05 AlexDaniel nope…
20:07 ramon joined #perl6
20:08 [Coke] jdv79: I wouldn't consider the nqp internals course a "getting started" resource for rakudo perl 6.
20:09 * [Coke] is glad to see another option for os x installs coming on line. some people just won't use homebrew or macports.
20:10 nowan joined #perl6
20:14 musiKk joined #perl6
20:14 AlexDaniel m: say {([-1,1],[0,2],{[$^a[0,1]Z+$^b[1,0]]} … *)[^$_*1.1]»[0]}(5)
20:14 camelia rakudo-moar c4fe4b: OUTPUT«P6opaque: get_boxed_ref could not unbox for the representation '20'␤  in block <unit> at /tmp/V6x3ZzapTL line 1␤␤»
20:15 hankache joined #perl6
20:16 diakopter hunh
20:18 hankache what are the steps needed to create an executable? I put the script in the bin folder of the module. What else should i do?
20:19 jnthn lizmat: Recreated the Inline::Perl5 problem locally
20:19 newbie joined #perl6
20:19 dalek Heuristic branch merge: pushed 17 commits to rakudo/nom by niner
20:21 hankache the error message is: Could not open file-name. Failed to stat file: no such file or directory
20:23 perlpilot joined #perl6
20:23 jdv79 [Coke]: it maybe be for someone that wants to dive deep.  i agree its not for everyone but that is an intro into a part of p6 tech.
20:27 timotimo could it be that spec tests are kind of hangy right now?
20:28 timotimo lock.t, race.rakudo.moar, promise/start.t, supply/start.t
20:28 buharin and twigil ^
20:28 buharin is also some kind of magic
20:28 buharin xD
20:29 buharin m: sub say-it { say $^a; }
20:29 camelia rakudo-moar c4fe4b: ( no output )
20:30 zakharyas joined #perl6
20:30 buharin m: sub say-it { say $^a; } say-it(2)
20:30 camelia rakudo-moar c4fe4b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9YjpmwKhih␤Strange text after block (missing semicolon or comma?)␤at /tmp/9YjpmwKhih:1␤------> 3sub say-it { say $^a; }7⏏5 say-it(2)␤    expecting any of:␤        infix␤        infix stopper…»
20:30 _ramix_ joined #perl6
20:30 khw joined #perl6
20:34 prammer joined #perl6
20:34 timotimo oof
20:35 skids m: sub say-it { say $^a; }; say-it(2)
20:35 camelia rakudo-moar d68c30: OUTPUT«2␤»
20:36 buharin so
20:37 buharin $^a is like
20:37 buharin hidden function parameter?
20:37 buharin passed positional
20:38 buharin oh now ;d
20:38 skids It is an in place parameter, called a "placeholder"
20:38 buharin m: sub say-it { say $^b ~ $^a; } say-it(2, 3)
20:38 camelia rakudo-moar d68c30: OUTPUT«5===SORRY!5=== Error while compiling /tmp/iuKTymeaxz␤Strange text after block (missing semicolon or comma?)␤at /tmp/iuKTymeaxz:1␤------> 3sub say-it { say $^b ~ $^a; }7⏏5 say-it(2, 3)␤    expecting any of:␤        infix␤        infix …»
20:39 buharin m: sub say-it { say $^b ~ $^a; }; say-it(2, 3)
20:39 camelia rakudo-moar d68c30: OUTPUT«32␤»
20:39 skids They are alphabetical
20:39 buharin skids, yeah I see
20:39 Hotkeys Specifically unicode order
20:39 buharin I remember I used bind placeholders in C++
20:40 buharin it was like pass something to method and use placeholder instead of argument
20:40 buharin like parameters interception
20:40 buharin but it is far more crazy
20:40 Hotkeys m: sub say-it { say $^omega ~ $^alpha }; say-it(2,4)
20:40 camelia rakudo-moar d68c30: OUTPUT«42␤»
20:41 buharin cause I can fully replace subroutines with placeholders
20:41 buharin mean typical function
20:41 buharin anyway when we should use this
20:41 Hotkeys Properly declaring parameters is usually nicer for readability though
20:41 Hotkeys :p
20:43 skids buharin: is is often used in very short closures like the comparator to sort()
20:48 cdg joined #perl6
20:48 _ramix_ Hi! A good Perl 6 tutorial? thx
20:49 jnthn .tell lizmat Fixed the NativeCall regression in Moar HEAD that affected Inline::Perl5; was a long-standing issue that another fix uncovered. Inline::Perl5 installed cleanly for me with the fix.
20:49 yoleaux jnthn: I'll pass your message to lizmat.
20:50 jnthn _ramix_: Maybe http://perl6intro.com/
20:52 gfldex m: sub f(&c){ c((1..10).pick, (1..10).pick) }; { my $scopy = "abc"; say f { $^a ~ $^b ~ $scopy } };
20:52 camelia rakudo-moar d68c30: OUTPUT«34abc␤»
20:52 gfldex buharin: ^^^
20:52 gfldex m: sub f(&c){ c((1..10).pick, (1..10).pick) }; { my $scopy = "abc"; say f { return $^a ~ $^b ~ $scopy } };
20:52 camelia rakudo-moar d68c30: OUTPUT«Attempt to return outside of any Routine␤  in block  at /tmp/kkqRQgrKce line 1␤  in block <unit> at /tmp/kkqRQgrKce line 1␤␤»
20:52 _ramix_ jnthn: Thanks, looks good!
20:53 buharin gfldex, I won't try to understand this :D
20:54 prammer joined #perl6
20:56 gfldex buharin: blocks can have placeholder variables too. You could use a pointy block ofc. but if you use a variable name exactly once in a block you can skip declaring it altogether. Unless you need a type constraint.
20:56 felher joined #perl6
20:56 gfldex buharin: blocks are born with one positional argument called $_, sometimes you need more. That's what placeholders are for.
20:57 buharin gfldex, ;-)
20:57 prammer joined #perl6
20:59 Hotkeys when doing a sequence with the magical sequence stuff
20:59 Hotkeys can you have the function bit return two items to the sequence?
20:59 Hotkeys instead of just one
21:00 buharin Python got better described standards
21:00 buharin with PIP
21:00 buharin here https://github.com/zostay/P6SGI
21:01 buharin I don't know if someone use it or accept it
21:02 prammer joined #perl6
21:03 yqfvwal joined #perl6
21:04 mohae joined #perl6
21:05 dolmen joined #perl6
21:06 apiw joined #perl6
21:06 apiw left #perl6
21:06 raiph joined #perl6
21:06 addison joined #perl6
21:06 revhippie joined #perl6
21:07 Hotkeys what a beautiful sequence:
21:08 Hotkeys m: my &f = {(0,1,1,4,{$^b;$^d;3*$^c-$^a}...*)[0..$_]}; say f(10)
21:08 camelia rakudo-moar d68c30: OUTPUT«(0 1 1 4 3 11 8 29 21 76 55)␤»
21:08 Hotkeys the lucas-nacci sequence
21:08 Hotkeys is there a better way to disregard positionals besides naming them with a semicolon after to do nothing with them?
21:09 Sqirrel joined #perl6
21:10 buharin hey how to encode docs constraints
21:10 buharin I mean for example
21:10 buharin Str:D where *.chars > 0
21:12 buharin is it smh like Str Data where what?
21:12 ely-se joined #perl6
21:12 Hotkeys yep
21:13 Hotkeys m: my Str $foo where *.chars > 0; $foo = ""
21:13 camelia rakudo-moar d68c30: OUTPUT«Type check failed in assignment to $foo; expected <anon> but got Str␤  in block <unit> at /tmp/zAi7Q5qxQD line 1␤␤»
21:13 Hotkeys m: my Str $foo where *.chars > 0; $foo = "bar"
21:13 camelia rakudo-moar d68c30: ( no output )
21:13 Hotkeys is that what you meant?
21:13 Hotkeys buharin:
21:14 buharin Hotkeys, omg this is Perl
21:14 Hotkeys hm?
21:14 Hotkeys You can also make a subset
21:15 Hotkeys m: subset NonEmptyStr of Str where *.chars > 0; my NonEmptyString $foo = ""
21:15 camelia rakudo-moar d68c30: OUTPUT«5===SORRY!5===␤Type 'NonEmptyString' is not declared. Did you mean 'NonEmptyStr'?␤at /tmp/whnfIiPmXL:1␤------> 3Str where *.chars > 0; my NonEmptyString7⏏5 $foo = ""␤Malformed my␤at /tmp/whnfIiPmXL:1␤------> 3NonEmptyStr of Str where…»
21:15 Hotkeys darn
21:15 Hotkeys never mind
21:15 buharin Hotkeys, I mean whats where and * mean here
21:15 Hotkeys oh
21:15 buharin it is var checking
21:16 Hotkeys where is imposing the constraint essentially
21:16 Hotkeys and * represents whatever you put into the var
21:16 Hotkeys so $foo is a string whose value must have greater than 0 chars
21:17 buharin Hotkeys, ohh I remember I look for whatever once
21:17 firstdayonthejob joined #perl6
21:17 dalek doc: a9ab02c | raiph++ | doc/Language/performance.pod:
21:17 dalek doc: Rearrange/polish
21:17 dalek doc:
21:17 dalek doc: Add lazy list processing as a possible "algorithmic improvement"
21:17 dalek doc:
21:17 dalek doc: Misc improvements
21:17 dalek doc:
21:17 dalek doc: ** Native typing examples still missing **
21:17 dalek doc: review: https://github.com/perl6/doc/commit/a9ab02c304
21:17 yqfvwal which of the naming conventions is recommend in perl6?
21:18 Hotkeys yqfvwal: do you mean casing?
21:19 yqfvwal Hotkeys, yes, I see three naming conventions in the introduction, but is not clear, which should be used
21:19 prammer joined #perl6
21:19 Hotkeys hmm
21:19 buharin m: my Str $foo where _.chars > 0; $foo = "ass"
21:19 camelia rakudo-moar d68c30: OUTPUT«5===SORRY!5=== Error while compiling /tmp/boqEz80zKO␤Undeclared name:␤    _ used at line 1␤␤»
21:19 Hotkeys I haven't looked at the intro
21:19 Hotkeys m: my Str $foo where $_.chars > 0; $foo = "ass"
21:19 camelia rakudo-moar d68c30: ( no output )
21:19 DrForr yqfvwal:Whatever you're comfortable with. The language doesn't enforce naming conventions, that's why they're conventions.
21:19 Hotkeys ^
21:20 Hotkeys kebab-case is pretty popular
21:20 buharin m: my Str $foo where $_.chars > 0; $foo = "ass"
21:20 camelia rakudo-moar d68c30: ( no output )
21:20 Hotkeys because we can have dashes
21:20 buharin m: subset NonEmpty of Str $foo where $_.chars > 0; NonEmpty $foo = "ass"
21:20 camelia rakudo-moar d68c30: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vOGua3lYwF␤Two terms in a row␤at /tmp/vOGua3lYwF:1␤------> 3subset NonEmpty of Str7⏏5 $foo where $_.chars > 0; NonEmpty $foo ␤    expecting any of:␤        infix␤        infix stopper␤      Ã¢â‚¬Â¦Ã‚»
21:21 buharin m: subset NonEmpty of Str $foo where $_.chars > 0; my NonEmpty $foo = "ass"
21:21 camelia rakudo-moar d68c30: OUTPUT«5===SORRY!5=== Error while compiling /tmp/aqk7y9hBbJ␤Two terms in a row␤at /tmp/aqk7y9hBbJ:1␤------> 3subset NonEmpty of Str7⏏5 $foo where $_.chars > 0; my NonEmpty $f␤    expecting any of:␤        infix␤        infix stopper␤      Ã¢â‚¬Â¦Ã‚»
21:21 buharin m: subset NonEmpty of Str where $_.chars > 0; my NonEmpty $foo = "ass"
21:21 camelia rakudo-moar d68c30: ( no output )
21:21 buharin xD
21:22 buharin Hotkeys, hey there is no subset in docs
21:23 Hotkeys m: subset NonEmpty of Str where *.chars > 0; my NonEmpty $foo = "bar"
21:23 camelia rakudo-moar d68c30: ( no output )
21:24 Hotkeys why didn't it work before
21:24 Hotkeys oh
21:24 Hotkeys I'm dumb is why
21:24 Hotkeys buharin: weird
21:24 Hotkeys I knew about it from watching a presentation
21:24 Hotkeys didn't realize it wasn't in docs
21:24 Hotkeys maybe it's just hidden somewhere
21:25 buharin ohh
21:25 buharin I thought you are one of inventors
21:25 Hotkeys Nah sorry
21:25 Hotkeys I just like perl 6
21:26 bartolin AlexDaniel: I just pushed today's spectest results (roast-data)
21:26 buharin Hotkeys, could tell me smh about P6SGI standard Im just reading it
21:26 buharin but no see implementation
21:26 partly joined #perl6
21:27 partly hi
21:27 bartolin AlexDaniel: integration/advent2013-day14.t was hanging on MoarVM (I think someone mentioned that one or two days ago; didn't investigate yet)
21:27 partly Why does perl not recognize the UTF-8 ≤ character for <=?
21:28 partly s/perl/perl6/
21:29 geraud joined #perl6
21:30 Hotkeys I don't know partly but I wish it did
21:30 flussence huh
21:30 flussence m: say 3 ≤ 5
21:30 camelia rakudo-moar d68c30: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SNNqiPr_kE␤Confused␤at /tmp/SNNqiPr_kE:1␤------> 3say 37⏏5 ≤ 5␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifie…»
21:30 partly I'm not sure if it's a feature, a bug or you just forgot it
21:31 DrForr You can always read the relevant Synopsis...
21:31 flussence thing is, there's at least a hundred operators in that unicode block that *could* be added to core, but it's not entirely free to do so
21:31 DrForr If there is one, not sure offhand. I just checked the Texas doc, not listed.
21:32 flussence m: sub infix:<≤>(\a, \b) { a <= b }; say 3 ≤ 4
21:32 camelia rakudo-moar d68c30: OUTPUT«True␤»
21:32 yqfvwal Why does perl6 use sigils? (typing them is really inconvenient)
21:33 moritz yqfvwal: as a kind of mini-namespace, and for making interpolation easier
21:33 moritz note that there are places where you can drop the sigil
21:33 moritz m: my \x = 42; say x
21:33 camelia rakudo-moar d68c30: OUTPUT«42␤»
21:34 yqfvwal moritz, thanks
21:35 * partly is skimming through S03
21:35 partly S03 is the right one for such information, right?
21:35 jnthn Also, so you can very easily pick out state in the code when reading it.
21:36 yqfvwal m: my @animals = ['camel','vicuña','llama'];say "The zoo contains " ~ @animals.elems ~ " animals";
21:36 camelia rakudo-moar d68c30: OUTPUT«The zoo contains 3 animals␤»
21:36 Hotkeys m: my @animals = ['camel','vicuña','llama'];say "The zoo contains " ~ +@animals ~ " animals";
21:36 camelia rakudo-moar d68c30: OUTPUT«The zoo contains 3 animals␤»
21:36 Hotkeys :p
21:37 jnthn Can also be: my @animals = <camel vicuña llama>
21:37 raiph m: my @animals = <camel vicuña llama>; say "The zoo contains {+@animals} animals"
21:37 yoleaux 08:59Z <timotimo> raiph: i like your performance page on the documentation
21:37 camelia rakudo-moar d68c30: OUTPUT«The zoo contains 3 animals␤»
21:37 yqfvwal Weird, the interpreter says 1…
21:38 moritz yqfvwal: what's your rakudo version?
21:40 yqfvwal moritz, This is perl6 version 2014.07 built on parrot 6.6.0 revision 0
21:41 DrForr The Christmas release was in 2015, you're a little out of date :)
21:41 Hotkeys wow
21:41 Hotkeys that's a lot out of date
21:41 Hotkeys :p
21:41 moritz yqfvwal: don't use that; it's hopelessly out of date and underpowered
21:41 flussence where are people getting these ancient versions‽
21:42 DrForr Debian probably. I think Ubuntu had similar.
21:42 flussence that's just completely irresponsible of the distro then
21:42 yqfvwal correct, so I assume, I should build it from source
21:43 gfldex Hotkeys: subset is not hidden in the docs. It's part of the type system part of the docs that is missing to this day.
21:43 DrForr Just follow the directions on perl6.org.
21:46 Hotkeys gfldex: ah
21:46 espadrine joined #perl6
21:52 partly Interesting perl6 does not interefere the method parameter type. I.e if the method is calling another method which is typed
21:53 Hotkeys m: (1,3, {$^b, $^a} ... *)[^10].say
21:53 noganex_ joined #perl6
21:53 camelia rakudo-moar d68c30: OUTPUT«(1 3 (3 1) ((3 1) 3) (((3 1) 3) (3 1)) ((((3 1) 3) (3 1)) ((3 1) 3)) (((((3 1) 3) (3 1)) ((3 1) 3)) (((3 1) 3) (3 1))) ((((((3 1) 3) (3 1)) ((3 1) 3)) (((3 1) 3) (3 1))) ((((3 1) 3) (3 1)) ((3 1) 3))) (((((((3 1) 3) (3 1)) ((3 1) 3)) (((3 1) 3) (3 1))) (((…»
21:53 Hotkeys oh dear
21:53 Hotkeys is there a way to have 2 values returned without it being a list
21:54 Hotkeys I don't need it right now but it'd be neat maybe
21:54 dfcarpenterak joined #perl6
21:55 noganex_ joined #perl6
21:55 jnthn Hotkeys: slip
21:55 jnthn m: (1,3, {slip $^b, $^a} ... *)[^10].say
21:55 camelia rakudo-moar d68c30: OUTPUT«(1 3 3 1 1 3 3 1 1 3)␤»
21:55 Hotkeys jnthn: you are great
21:55 Hotkeys thanks
22:02 dalek doc: 8765535 | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod:
22:02 dalek doc: add eyesore to coerce the knowledgeable to doc the type system
22:02 dalek doc: review: https://github.com/perl6/doc/commit/8765535d3f
22:03 gfldex that's the right spot to doc enum too, that is missing as well
22:05 DrForr Yes, in fact Inline::Scheme::Guile doesn't use enun{} where it should to remind me to doc it, and look how well that worked out :)
22:08 addison joined #perl6
22:09 dalek rakudo-star-daily: aa8c933 | coke++ | log/ (9 files):
22:09 dalek rakudo-star-daily: today (automated commit)
22:09 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/aa8c933885
22:11 Timbus joined #perl6
22:13 perlawhirl joined #perl6
22:16 perlawhirl hi perlers
22:16 yoleaux 5 Feb 2016 08:13Z <moritz> perlawhirl: panda has a --force option to overwrite existing installations of a module
22:16 perlawhirl is there a key sequence that will stop long running operations without killing the repl ?
22:16 hoelzro o/ perlawhirl
22:17 hoelzro short answer: no
22:17 hoelzro long answer: not yet ;)
22:17 perlawhirl would be nice if it trapped SIGINT, similar to the python repl
22:17 perlawhirl hah, thanks hoelzro... i figured as much
22:17 hoelzro it's on my todo list
22:18 perlawhirl cool
22:20 pecastro joined #perl6
22:20 AlexDaniel partly: https://gist.github.com/AlexDaniel/c89bd2786f9b63f31e4c
22:20 perlawhirl is compile time type checking on variable assignment something that planned for the future?
22:20 AlexDaniel partly: ≤ ≥ ≠ are the most wanted ones in that list
22:22 partly AlexDaniel: well fullack on my side :)
22:26 perlpilot perlawhirl: you mean:  my $x = 3.14;  my Int $i = $x; failing at compile time?  (because  my Int $i = 3.14 already fails at compile time)
22:27 Hotkeys currently the font I use in atom makes glyphs from =<, >=, and != to those symbols
22:27 Hotkeys so it's nice and readable for me
22:27 Hotkeys but i would like the symbols
22:27 AlexDaniel joined #perl6
22:27 b2gills Hotkeys: you can use 「{ .say }( 'hello world' )」 or assign it to a scalar 「my $f = {…}; $f()」
22:28 perlawhirl perlpilot: oh, yeah... but assigning an Int to a Str (or vice versa) is a runtime failure
22:28 perlawhirl m: my Int $i = 'String'
22:28 camelia rakudo-moar d68c30: OUTPUT«Type check failed in assignment to $i; expected Int but got Str␤  in block <unit> at /tmp/uPej6bCkqu line 1␤␤»
22:28 Hotkeys b2gills: hmm?
22:28 b2gills Also |( … )  is short for slip( … )
22:28 Hotkeys oh
22:28 Hotkeys wait what was the first one in response to
22:29 perlawhirl however... doing it via sub is compile time failure
22:29 perlawhirl m: sub x (Int) {}; x('String')
22:29 camelia rakudo-moar d68c30: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GotBtxdS_X␤Calling x(Str) will never work with declared signature (Int)␤at /tmp/GotBtxdS_X:1␤------> 3sub x (Int) {}; 7⏏5x('String')␤»
22:29 b2gills you were asking if you had to assign to a &f
22:29 Hotkeys oh, how long ago
22:30 perlpilot perlawhirl: probably  :)
22:31 lizmat and a new Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2016/02/08/2016-56-rakudo-starring/
22:31 yoleaux 20:49Z <jnthn> lizmat: Fixed the NativeCall regression in Moar HEAD that affected Inline::Perl5; was a long-standing issue that another fix uncovered. Inline::Perl5 installed cleanly for me with the fix.
22:32 perlpilot lizmat++
22:32 perlawhirl perlpilot: hopefully. just seemed odd to me that subs do it, but var assignment doesn't.
22:32 perlpilot we currently don't always have as much type-information handy at compile time as we would like.
22:33 perlawhirl all good... i'm ok with it, just wanted to know if it was in the pipeline (even if that pipeline is years long :D )
22:34 perlpilot (also, we currently don't have everything implemented as much as we would like either  ;)
22:36 skids joined #perl6
22:36 perlawhirl perlpilot: meanwhile, for basic compile time checking on var assignment, i can take the scenic route via a sub
22:36 perlawhirl m: sub new-int(Int $i) {$i}; my Int $s = new-int('foo');
22:36 camelia rakudo-moar d68c30: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Gz7zjBvoFf␤Calling new-int(Str) will never work with declared signature (Int $i)␤at /tmp/Gz7zjBvoFf:1␤------> 3sub new-int(Int $i) {$i}; my Int $s = 7⏏5new-int('foo');␤»
22:36 perlawhirl :D
22:36 avenj joined #perl6
22:39 b2gills I can tell that the person who wrote Term::Choose is new to Perl 6, as the signature for &choice is :(@,%) not :(*@,*%)
22:40 addison_ joined #perl6
22:51 lizmat b2gills: I assume PR's are welcome!
22:52 b2gills It might be closer to an overhaul
22:54 jnthn lizmat: s/camera’s/cameras/, if you wanna tweak it
22:55 lizmat jnthn : tweaked
22:56 jnthn lizmat++
22:56 lokien_ joined #perl6
22:57 jnthn These days, the weekly always has some things I've missed. :)
22:59 leont Should have PRed ecosystem, to have Getopt::Long in the new modules list, but there'll be another week
23:00 lizmat leont: indeed there will be  :-)
23:00 leont In the mean time, someone showed me a MAIN-HELPER example a few weeks ago, can someone point me in that direction?
23:03 pmurias joined #perl6
23:03 RabidGravy so instead of finishing the CouchDB thing I've been working on for nearly a year, I re-invented something I design five years ago for me last job
23:04 keithbro joined #perl6
23:05 RabidGravy which is all good
23:05 lizmat .oO( l'histoire se repète )
23:14 NZKindest joined #perl6
23:26 virtualsue joined #perl6
23:28 adu joined #perl6
23:32 dad joined #perl6
23:32 dad _dad
23:43 Timbus joined #perl6
23:46 bioexpress joined #perl6
23:47 AlexDani` joined #perl6
23:49 AlexDaniel joined #perl6
23:49 AlexDaniel AlexDaniel`: O_o
23:49 AlexDaniel` oh wow…

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

Perl 6 | Reference Documentation | Rakudo