»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
atweiden so, i'm aware you can push elements to an array like this: 00:00
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];
camelia rakudo-moar f0a450: OUTPUT«["zero", "one", "two", "three", "four", "five", "six", "seven"]␤seven␤["zero", "one", "two", "three", "four", "five", "six", "seven", "eight"]␤eight␤»
atweiden is there a way to insert elements to an array one spot before the beginning with a similar accessor to [*-0]?
00:02 kjs_ left, cognominal left
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:02
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
lizmat m: my int $a = 1; say $a == $a 00:04
camelia rakudo-moar f0a450: OUTPUT«True␤»
lizmat hmmm
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;
camelia rakudo-moar f0a450: OUTPUT«["zero", "one", "two", "three", "four", "five", "six", "seven"]␤seven␤["eight", "zero", "one", "two", "three", "four", "five", "six", "seven"]␤»
lizmat m: my int $a = 1; say 1 && $a == $a 00:05
camelia rakudo-moar f0a450: OUTPUT«True␤»
lizmat m: my int $a = 1; say $a && $a
camelia rakudo-moar f0a450: OUTPUT«1␤»
lizmat autarch : the part before the && is not boolean
autarch $i < $elems looks boolean to me
lizmat so if that is 0, it won't be booleanified 00:06
m: my int $a = 1; my int $b = 2; say $a < $b
camelia rakudo-moar f0a450: OUTPUT«True␤»
autarch m: say 1 < 2 && 3 == 3
camelia rakudo-moar f0a450: OUTPUT«True␤»
lizmat hmmm...
autarch # afk 00:07
00:07 vendethiel joined
MadcapJake Anyone interested in trying «perl6 -c» on a circular dependency? gist.github.com/MadcapJake/9b8d36c0cef1b7062b7c 00:09
This causes perl6 to go nuts and completely freeze my computer.
lizmat MadcapJake: immediately, or after some time ?
MadcapJake I should say, it's actually «perl6 -I{wherever you place these} -c» 00:10
after about 30 seconds to a minute
my process monitor shows hundreds of `moar` processes
lizmat probably an infiniloop eeating all your memory then
ah, fork bomb as well :-)
please rakudobug it 00:11
MadcapJake ok will do!
MadcapJake wishes his issue submitter was ready :P
atweiden skids: I'm trying to envision what a slang [*-0] accessor but for unshift would look like 00:12
dalek kudo/nom: 859a4d3 | lizmat++ | src/core/Hash.pm:
Make Hash.BIND-KEY about 5% faster

Sadly, there is a lot of overhead to get to BIND-KEY from %h<a> := foo so it won't be visible much in performance gain
00:13
kudo/nom: ccbac92 | lizmat++ | src/core/Hash.pm:
Fix copy-pasto done in f0a45046d1c268f03bd3
atweiden there's a concept of a '-' array accessor in JSON Pointer (RFC 6901)
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
i'm wondering how i could be consistent with the [*-0] syntax on the unshift side
skids atweiden: "@a[]:splice" maybe? 00:14
00:15 revhippie left, Laurent_R left 00:17 firstdayonthejob left
atweiden skids: that's a good idea. the :bool syntax may be easier to understand 00:18
m: my @steps = |qw<deeply nested hash path to array>, :push
camelia ( no output )
atweiden m: my @steps = |qw<deeply nested hash path to array>, :unshift
camelia ( no output )
dalek ast: 8650ef2 | autarch++ | S02-types/instants-and-durations.t:
Add a test for the round trip of Instant via .perl.EVAL
ast: 659a27f | lizmat++ | S02-types/instants-and-durations.t:
Merge pull request #103 from perl6/autarch/fix-Instant.perl

Add a test for the round trip of Instant via .perl.EVAL
ast: be0b07b | lizmat++ | S07-hyperrace/ (2 files):
Fix test counts
00:19
00:20 DubiousPepper left
dalek kudo/nom: bc50164 | lizmat++ | src/core/ (2 files):
Fix roundtrip problem with Instants, autarch++

Inspired by PR #708
00:20
00:22 Averna joined
skids Any chance PR#685 could get some attention? 00:22
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:23
meanwhile, catching some shuteye 00:24
good night, #perl6!
skids lizmat: thanks for looking. Hopefully there will be more guidance on that soon I guess.
n8
00:28 vendethiel left 00:30 SCHAAP137 left, wamba1 joined 00:33 wamba left 00:36 kurahaupo left 00:46 neilb left 00:55 revhippie joined
MadcapJake does perl6 have tail-call optimization? 00:57
00:57 Guest63714 left
MadcapJake or should I say, does rakudo? 00:57
00:58 bowtie joined, bowtie is now known as Guest56851
AlexDaniel MadcapJake: nope 00:59
MadcapJake: at least not right now
00:59 lokien_ left 01:06 captain-adequate left
AlexDaniel MadcapJake: by the way, why do you ask? 01:13
01:32 Actualeyes joined 01:33 wamba1 left
MadcapJake AlexDaniel, just was reading something about tail calls and was curious 01:34
01:53 Herby_ joined
Herby_ Evening, everyone! 01:53
\o
skids o/
Herby_ how goes it 01:54
01:54 pi4 left
Herby_ m: my @a = <a b c d>; @a.pick; say @a; 01:58
camelia rakudo-moar bc5016: OUTPUT«[a b c d]␤»
Herby_ m: my @a = <a b c d>; @a.pick 1; say @a;
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␤ …»
Herby_ m: my @a = <a b c d>; @a.pick: 2; say @a; 01:59
camelia rakudo-moar bc5016: OUTPUT«[a b c d]␤»
Herby_ is there a method to pick/pull an element from an array?
like pulling a card from a deck of cards, and seeing whats left in the deck
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]␤»
AlexDaniel m: my @a = <a b c d>; say @a.splice: ^@a .pick, 1; say @a
camelia rakudo-moar bc5016: OUTPUT«[c]␤[a b d]␤»
AlexDaniel m: my @a = <a b c d>; say @a.splice: ^@a .pick, 1; say @a
camelia rakudo-moar bc5016: OUTPUT«[c]␤[a b d]␤»
AlexDaniel come on
m: my @a = <a b c d>; say @a.splice: ^@a .pick, 1; say @a
camelia rakudo-moar bc5016: OUTPUT«[d]␤[a b c]␤»
AlexDaniel Herby_: ↑ is it good enough? 02:04
Herby_ yes, I figured there was a way :)
question. what is the .splice: ^@a doing there?
AlexDaniel well, splice just gets rid of one element 02:05
m: my @a = <a b c d>; say @a.splice: 0, 1; say @a
camelia rakudo-moar bc5016: OUTPUT«[a]␤[b c d]␤»
AlexDaniel it also returns the removed elements
Herby_: 「^@a .pick」 is just a random index of an array 02:06
Herby_ ah ok
m: my @a = <a b c d e f g>; say @a.splice: ^@a
camelia rakudo-moar bc5016: OUTPUT«[]␤»
Herby_ m: my @a = <a b c d e f g>; say @a.splice: ^@a .pick, 1
camelia rakudo-moar bc5016: OUTPUT«[c]␤»
Herby_ m: my @a = <a b c d e f g>; say @a.splice: ^@a .pick, 1
camelia rakudo-moar bc5016: OUTPUT«[g]␤»
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]␤»
Herby_ k
AlexDaniel Herby_: people yell at me when I use infix-like dot
m: my @a = <a b c d>; say @a.splice: (^@a).pick, 1; say @a
camelia rakudo-moar bc5016: OUTPUT«[b]␤[a c d]␤»
AlexDaniel you can use parens
but I hate parens and my vision is good enough to spot that space… 02:08
02:08 pi4 joined
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)」
camelia rakudo-moar bc5016: OUTPUT«[a c]␤set(b, d)␤»
yoleaux 4 Feb 2016 03:06Z <AlexDaniel> revhippie: but yeah, somehow list comprehension is a very underrated feature in Perl 6 :)
AlexDaniel if not you can put another space on the right hand side of the dot
02:08 BenGoldberg joined
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]␤»
AlexDaniel revhippie: what if your elements are not unique? 02:09
revhippie AlexDaniel: I guess that'd go out the window, then :(
AlexDaniel revhippie: it is also slightly less efficient. But yeah, interesting solution too 02:10
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]␤»
Herby_ m: my @y = ($_**2 for 1 .. 10); say @y;
camelia rakudo-moar bc5016: OUTPUT«[1 4 9 16 25 36 49 64 81 100]␤» 02:16
02:16 Averna left
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]␤»
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 02:18 Xor_ joined, vendethiel joined
phyreprooph Hey everyone, trying to get panda working to install modules following this here: 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:27
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.
it then falls back to curl and wget both of which also don't work 02:30
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:35 yqt left
phyreprooph Was just reading here: github.com/tadzik/panda/issues/96, someone says that it's HTTP::UserAgent's job, but when you go to github.com/sergot/http-useragent, it says to install using "panda install HTTP::UserAgent"..... 02:40
02:40 vendethiel left
skids panda has a local copy of modules it needs for bootstrapping, they get updated from time to time. 02:40
phyreprooph what does that mean? 02:41
02:45 ilbot3 left 02:47 ilbot3 joined 02:48 SquireOfGothos joined, phyreprooph left, SquireOfGothos left 02:59 FROGGS_ joined 03:01 _PiL_ joined, Sqirrel left 03:03 Guest56851 left, FROGGS left 03:04 bowtie joined 03:05 bowtie is now known as Guest45782 03:06 Actualeyes left
ugexe curl or wget should both work if http_proxy env var is set i woudl think 03:09
03:09 kid51 joined 03:11 kid511 left
geekosaur beware https on OS X --- some things look for $https_proxy, others for $HTTPS_PROXY 03:12
consistency wazzat?
ugexe i imagine curl and wget both search for those as well 03:13
03:13 protium joined
geekosaur curl is actually specifically problematic, because the proxies prefpane exports https_proxy but curl wants HTTPS_PROXY 03:15
03:16 Herby_ left
ugexe always set every permutation of casing hmm 03:17
03:18 colomon left, rpburkholder left 03:21 Actualeyes joined 03:25 noganex joined 03:27 colomon joined 03:28 noganex_ left 03:38 Ben_Goldberg joined
dalek c: 7775b43 | skids++ | doc/Type/Proc/Async.pod:
Degarble description of .w method
03:39
03:41 BenGoldberg left 03:43 Ben_Goldberg is now known as BenGoldberg 03:46 squach2 joined 03:49 Actualeyes left 03:51 perlawhirl left 03:55 protium left
masak good noon, #perl6 04:08
skids o/
04:08 kid51 left 04:20 MadcapJake left, Actualeyes joined
Hotkeys o/ masak 04:21
04:21 MadcapJake joined 04:22 MadcapJake left
[Coke] . 04:22
04:24 MadcapJake joined 04:36 vendethiel joined 04:38 PerlJam left, PerlJam joined, cosarara left 04:39 protium joined, cosarara joined, Timbus left 04:40 Timbus joined 04:47 squach joined 04:49 squach2 left 04:54 BenGoldberg left 04:59 squach1 joined 05:00 vendethiel left 05:01 squach left
jdv79 what is META6.info - a hybrid? 05:03
05:04 Cabanossi left
skids The inevitable consequence of not getting it right the first two times? 05:05
05:06 Cabanossi joined
jdv79 i just saw some emails about something using it. that's all i know about it so far. 05:06
dalek osystem: dff9ef9 | ugexe++ | META.list:
s/META.info/META6.json/
05:10
jdv79 ugexe: do you know? 05:11
ugexe its just a fuck up
jdv79 ok. have a good evening then! 05:12
ugexe CSV::Parser used it on accident. a typo
05:15 squach joined 05:17 squach2 joined, dj_goku joined 05:18 squach1 left 05:20 squach left
dalek c: 7fd5283 | raiph++ | doc/Language/performance.pod:
First cut at performance page.

Native type examples missing.
05:28
05:29 psy_ left 05:31 squach joined 05:33 squach2 left 05:36 travis-ci joined
travis-ci Doc build failed. raiph 'First cut at performance page. 05:36
travis-ci.org/perl6/doc/builds/107705215 github.com/perl6/doc/compare/7775b...d528317559
05:36 travis-ci left 05:37 Sqirrel joined 05:39 khw left 05:43 squach1 joined, skids left 05:45 squach left
dalek c: 67e00e7 | raiph++ | doc/Language/performance.pod:
Missed =end pod
05:45
05:53 squach joined 05:56 squach1 left 05:58 mr-foobar left 06:01 Cabanossi left 06:04 squach1 joined, kaare_ joined, Cabanossi joined, protium left 06:06 Perleone left 06:07 squach left, Perleone joined 06:09 Actualeyes left 06:10 Actualeyes joined 06:12 travis-ci joined
travis-ci Doc build passed. raiph 'Missed =end pod' 06:12
travis-ci.org/perl6/doc/builds/107706467 github.com/perl6/doc/compare/7fd52...e00e766069
06:12 travis-ci left, raiph left 06:15 DubiousPepper joined 06:25 squach joined 06:26 squach1 left 06:39 vendethiel joined, protium joined 06:44 squach1 joined, FROGGS_ left 06:45 squach left 06:47 _Gustaf_ joined 06:55 DubiousPepper left, nakiro joined 06:57 squach joined 06:59 squach1 left
dalek c: 6ee5d3c | raiph++ | doc/Language/performance.pod:
Fix some broken directives, improve style a bit
07:00
07:01 raiph joined
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
Which one of the three options is currently the best for standard repl interactions and not messing up on multi-line input?
[Tux] test 22.627
test-t 12.464
csv-parser 52.158
yurivish Or two options... I'm not sure what rlwrap is
07:07 protium left
llfourn yurivish: multi-line input is not supported yet 07:08
raiph yurivish: re multi-line input: www.reddit.com/r/perl6/comments/44...r_testing/
07:10 geraud left
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:10
07:11 FROGGS joined
raiph yurivish: Afaik the main distinction has been licensing, not functionality 07:12
yurivish raiph: okay, I'll use Readline and worry no more :) 07:13
...except the tests failed (OS X, newest version): Cannot locate native library 'libreadline.so.6': dlopen(libreadline.so.6, 1): image not found 07:14
Linenoise worked. 07:15
raiph that would be another good reason to prefer one over another ;)
07:17 CIAvash joined
yurivish indeed. issue filed. 07:17
07:20 vendethiel left 07:21 _Gustaf_ left
raiph yurivish: where did you file an issue? 07:24
yurivish here: github.com/drforr/perl6-readline
github.com/drforr/perl6-readline/issues/9
07:25 _Gustaf_ joined 07:31 squach1 joined 07:33 domidumont joined, _Gustaf_ left 07:34 squach left 07:35 atweiden left 07:37 peteretep joined, domidumont left
peteretep seen pmurias 07:37
!seen pmurias
Dang it 07:38
07:38 domidumont joined 07:39 buharin left 07:41 protium joined, squach joined 07:42 vendethiel joined 07:44 squach1 left
yurivish what's a good way to go from a list made with "string".list back to a string? 07:46
sorry, with "string".NFKD.list 07:47
dalek c: 5f71f6a | raiph++ | doc/Language/performance.pod:
Shorten subtitle and other style tweaks
07:48
raiph m: say "abc".NFKD.list.perl 07:49
camelia rakudo-moar bc5016: OUTPUT«(97, 98, 99).Seq␤»
07:49 kaare_ left
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␤␤»
yurivish .map(*.chr).join works but seems very inefficient 07:52
07:52 fireartist joined 07:55 squach1 joined
AlexDaniel m: say "abc".NFKD.Str 07:56
camelia rakudo-moar bc5016: OUTPUT«abc␤»
yurivish m: say "abøc".NFKD.list.grep(* < 256).Str 07:57
camelia rakudo-moar bc5016: OUTPUT«97 98 248 99␤»
yurivish m: say "abøc".NFKD.list.grep(* < 100).Str # i meant something more like this for the example
camelia rakudo-moar bc5016: OUTPUT«97 98 99␤»
07:57 ely-se joined
AlexDaniel m: my @a = ‘abc’.NFKD.list; say Uni.new(|@a).Str 07:58
camelia rakudo-moar bc5016: OUTPUT«abc␤»
07:58 squach left
AlexDaniel yurivish: ↑ two ways to do it 07:58
yurivish: depending on whether you've lost your Uni object or not
yurivish ah, cool, thanks! 07:59
AlexDaniel m: my @a = ‘abc’.NFKD.list; say Uni.new(@a).Str
camelia rakudo-moar bc5016: OUTPUT«abc␤»
AlexDaniel ah no need for |
yurivish even better. 08:00
AlexDaniel o/
yurivish does perl have something like Mathematica's // operator, which lets you put the head of the expression at the end?
so I'd say 'abc'.NFLD.list // Uni.new($_).Str or something
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␤␤»
moritz m: given 'abc'.NFKD.list { say Uni.new($_).Str }
camelia rakudo-moar bc5016: OUTPUT«abc␤»
moritz also feed operators, but they don't work very well yet 08:02
yurivish right
and it's okay that you used a scalar topic variable to pass a list?
moritz seems to have worked, no? :-) 08:03
but I wasn't quite sure myself
yurivish well, yes, but I'm now wondering why :P
moritz I still haven't entirely internalized post-GLR semantics yet 08:04
08:04 AlexDaniel left 08:06 DubiousPepper joined
raiph goodnight 08:07
yurivish 'night!
08:07 raiph left 08:09 RabidGravy joined, squach joined, firstdayonthejob joined 08:11 squach2 joined 08:12 squach1 left, darutoko joined 08:14 squach left 08:19 rindolf joined 08:20 squach joined 08:22 squach2 left
RabidGravy marning! 08:23
08:26 NZKindest left 08:28 NZKindest joined 08:30 Sgeo left, DubiousPepper left 08:33 squach1 joined 08:34 sortiz joined 08:35 squach2 joined 08:36 squach left 08:37 squach1 left
sortiz \o #perl6 08:43
08:48 squach joined 08:49 jvcakg joined, jvcakg left, neilb joined 08:50 squach2 left
sortiz I've been playing with nqp::attributed a while, and found interesting things: gist.github.com/salortiz/db2efe401153b74c0b10 08:51
08:53 abraxxa joined 08:59 revhippie left
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, neilb left, araujo joined, araujo left, araujo joined
dalek rl6-most-wanted: a1a68df | (Erik Colson)++ | most-wanted/modules.md:
Add Device::SerialPort
09:13
rl6-most-wanted: f7693f3 | RabidGravy++ | most-wanted/modules.md:
Merge pull request #16 from ecocode/patch-2

Add Device::SerialPort
09:13 zhouzhen1 joined 09:15 neilb joined 09:16 kaare_ joined 09:33 abraxxa left, abraxxa joined 09:34 kjs_ joined, wamba joined
lizmat good *, #perl6! 09:46
timotimo good
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.
lizmat breakfast& 09:49
sortiz lizmat, can you take a look to my attrinited-test.pl? gist.github.com/salortiz/db2efe401153b74c0b10 09:50
09:52 psy_ joined
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: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
sortiz jnthn, Yes, now that is crystal clear. 09:56
jnthn, And now I understand the real intent of the attrinited function. 09:58
jnthn :) 10:01
.tell lizmat Think that Inline::Perl5 thing'll need some ASAN/valgrind analysis... 10:05
yoleaux jnthn: I'll pass your message to lizmat.
jnthn (I can probably do that)
(But not until the evening.)
10:08 zakharyas joined 10:13 TEttinger left, Actualeyes left 10:18 psy_ left 10:21 gregf___ left
timotimo is this valid perl5 code? 10:21
my %h; $h { $_ } = $_ for 0 .. 1234; say %h<1234>; 10:22
moritz no 10:23
must be {1234} at the end
timotimo that could be why one of the benchmarks isn't happy
moritz and better $h{1234}
10:23 gregf_ joined
moritz then it actually produces the correct output :-) 10:24
10:24 telex left
moritz also, the space between $h and { is *really* weird 10:24
sortiz And 'say' may requires a use 5.16 or so. 10:25
moritz 5.010 is enough
or -E
for one-liners
timotimo is looking for his local checkout of perl6-bench
github.com/japhb/perl6-bench/blob/...ks.pl#L309 10:26
that's the line
10:26 telex joined
timotimo i hallucinated the space before { $_ } 10:26
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?
also, is that a syntax error or a runtime error?
dalek rl6-bench: c906fc2 | timo++ | microbenchmarks.pl:
for_hash_set had a typo in its perl5 code
timotimo not actually important
10:29 tokomer joined
moritz timotimo: syntax error 10:29
Operator or semicolon missing before %h at -e line 1.
timotimo good
10:30 kurahaupo joined, kurahaupo left, espadrine joined
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
that looks... no, I think it's allright after all
timotimo also fixed 9-billion-names 10:34
jnthn timotimo: There was also a case or two where the expected result came out wrong in the Perl 6 ones 10:36
dalek rl6-bench: abddecc | timotimo++ | perl6/rc-9-billion-names:
fix rc-9-billion-names for GLR changes to AoA initialization
jnthn push_all or so
Probably also a victim of GLR
timotimo jnthn: you may have to install Data::Alias to get a few more of the perl5 benchmarks in
10:36 tokomer left
jnthn I...had :S 10:36
timotimo oh?
10:37 tokomer joined
jnthn Was pretty sure i did anyways 10:37
10:37 tokomer left
timotimo while_bind didn't end up with a perl5 data line 10:37
jnthn yeah
10:37 tokomer joined, tokomer left
jnthn It errored out but I couldn't see why 10:37
timotimo OK
10:37 tokomer joined
jnthn I'm sure I installed Data::Alias though. 10:37
Will have another look
timotimo well, it has to be installed into the right perl5 probably 10:38
that could be hairy
DrForr Inline::Scheme::Guile is almost in usable shape, I was going to create a support module for it tonight.
jnthn timotimo: ohh...right, 'cus we build our own.
10:39 ely-se left, ely-se joined
timotimo it's sometimes a little bit sad to see how far rakudo is behind nqp and perl5 10:39
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
10:40 Actualeyes joined
timotimo interestingly, postwhile_nil_native gets us a much better result for rakudo than it does for nqp or perl5 10:41
in fact, perl5 is *between* nqp and rakudo
jnthn Yeah. It's nice to see we beat perl5 in some places though :)
10:41 cognominal joined
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
DrForr I noticed a drastic speedup in my VM after the hash access optimization. 10:41
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
(and List::Util would be required for the perl5 one, but it would probably not do the optimization of + into the O(1) algorithm)
ely-se optimised to O(1) algorithm?
timotimo eval: my $s = join ", " => 1 .. SCALE; my $i; my @s = split ", " => $s while ++$i <= SCALE; say scalar @s; 10:43
do we have something to eval perl5 code in here?
p5: print "hi"
moritz not anymore 10:44
timotimo OK
that code seems wrong
ely-se what happened to masak?
haven't seen him here since ages
timotimo i saw him just a few hours ago greeting us
Hotkeys He said hi earlier 10:45
timotimo he's currently in a far-away timezone
timo@schmand ~> perl -E 'my $s = join ", " => 1 .. 1024; my $i; my @s = split ", " => $s while ++$i <= 1024; say scalar @s;'
0
ely-se Hotkeys: oh :)
timotimo: oh :)
10:45 tokomer left 10:46 ocbtec joined
timotimo i can see that the join part of that code works, but the split part seems to make the array empty 10:46
10:48 molaf joined
dalek rl6-bench: c2a6e9b | timotimo++ | microbenchmarks.pl:
throw out sink warning for visit_2d_indices_for for perl6
10:49
10:50 Actualeyes left 10:51 Actualeyes joined
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:54
i'm not sure what that line was for 10:55
especially since it's apparently inserting a value into the destination AoA before the source is even set up
dalek rl6-bench: 7a84825 | timotimo++ | microbenchmarks.pl:
(create_and_copy_2d_grid_cross) remove autovivification from nqp
10:56
timotimo that should help things a little bit
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
yeah, that seems to do it
dalek rl6-bench: ff3bae1 | timotimo++ | microbenchmarks.pl:
fix split_string_constant perl5 code (sortiz++)
10:58
timotimo jnthn: also, Math::BigRat is a thing that'll want installed, in case you haven't done that already
10:59 Actualeyes left
timotimo oh, huh 10:59
rat_mul_div_cancel fails, but probably not because of Math::BigRat not being there, because rat_harmonic actually runs
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
1/1025numerator/1/1025denominator
right, that's probably not correct?
wants to use -> instead of . for numerator and denominator? 11:01
dalek rl6-bench: d177e1a | timotimo++ | microbenchmarks.pl:
fix copy-pasto(?) in rat_mul_div_cancel perl5 code
11:02
jnthn timotimo: I think so 11:05
timotimo changing that made it run, so that's good 11:06
jnthn: how do you run the benchmarks? do you wait for a time when your machine is 100% idle and run them then? 11:07
ely-se RPN my favourite notation is 11:09
timotimo anyway, i can't wait to see these new lines show up %) 11:11
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:13
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!
that sounds good
.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.
jnthn timotimo: We're probably besting fixing that my making rand faster ;) 11:16
timotimo feel free ;) 11:17
11:18 Actualeyes joined 11:28 _PiL_ left 11:30 wamba left, wamba joined 11:31 wamba left, wamba joined
moritz joeduffyblog.com/2016/02/07/the-error-model/ has an interesting introduction 11:34
(haven't read the whole thing yet)
11:44 bioexpress joined
bioexpress Should I add a Changes-file to a perl6 repo/module? 11:47
timotimo people probably appreciate that 11:52
dalek p: 18f991d | (Salvador Ortiz)++ | docs/ops.markdown:
Document attrinited opcode
11:54
p: d66805f | lizmat++ | docs/ops.markdown:
Merge pull request #276 from salortiz/patch-1

Document attrinited opcode
p: 10fa16c | (Páll Haraldsson)++ | README.pod:
Update year, since it's there:

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..
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..).
p: 1b85892 | lizmat++ | README.pod:
Merge pull request #275 from PallHaraldsson/patch-1

Update year, since it's there:
11:57 ambs joined 12:01 bioexpress left 12:05 wamba left 12:06 wamba joined 12:20 mr-foobar joined 12:22 rindolf left
DrForr IIRC not dispatching on return types is a feature? 12:22
(makes perfect sense of course, what type does 'say foo()' "return" anyway?
)
timotimo yes, we doesn't can that. 12:23
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
return an object that has a .JSON and a .Str method
you can then use variables you've closed over (or passed to the constructor) to do the right piece of work in those methods
that's also how we do "wantarray"-like optimizations 12:28
12:28 kid51 joined
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:29
timotimo i think we have a "masquerade" module in the ecosystem that does something similar 12:31
12:35 sufrostico joined
dalek kudo/nom: c387d6c | lizmat++ | src/core/Hash.pm:
Scrape a few % off of Hash.push|append
12:37
12:41 sufrostico left 12:42 firstdayonthejob left 12:43 sufrostico joined 12:45 firstdayonthejob joined 12:47 kid51 left, kid51 joined 12:52 kid51 left 12:57 kjs_ left
arnsholt hoelzro++ # Multi-line REPL 13:08
13:09 Sgeo joined 13:15 pmurias joined
dalek p: fc9de82 | (Pawel Murias)++ | src/vm/js/ (15 files):
[js] Represent arrays by wrapping javascript in NQPArray rather than passing raw Array around.

Refactor everything to handle that.
13:15
13:17 Ven joined
dalek kudo/nom: a5d1e94 | lizmat++ | src/core/Match.pm:
Make it easier to spot errors in Match.perl
13:24
13:37 vendethiel left 13:39 Ven left 13:40 Ven joined 13:41 Ven left
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␤»
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...
llfourn lizmat: is that intended do you think? 13:45
(I don't understand sink all that well)
lizmat I think it's a side-effect of STORE returning Nil
hmmmm
llfourn lizmat: let me know if you want me to RT it :) 13:47
lizmat please do
llfourn kk
lizmat I think I have a solution, but would be nice if it doesn't fall through the cracks
llfourn rt.perl.org/Public/Bug/Display.html?id=127491 # :) 13:51
lizmat bah, not a solution :-(
llfourn gah! 13:52
13:52 Ven joined
lizmat giving it one more try 13:52
llfourn lizmat++ 13:53
13:54 Ven left 13:56 panosGR joined
lizmat alas, no go 13:56
panosGR Hello everyone.
moritz \o panosGR
panosGR I wanted to ask a question regarding Perl6.
llfourn you've come to the right place!
panosGR I have a module named WWW::Mechanize which i using in Perl5
How to use it in Perl6. 13:57
Thank you. :)
Do i have to port it ?
llfourn panosGR: github.com/niner/Inline-Perl5
panosGR OMG !!! 13:58
My friend you really made my day !!!!
:) :) :)
But in theory can i port it to be fully Perl6 compatible ?
llfourn \o/ 13:59
lizmat panosGR: I think even in practice!
jast of course... it may be a little bit more work, though :)
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!
panosGR I mean...since i am going to do the work for porting it.....
perlpilot panosGR: I don't know about that "official" word, but the rest of your sentence is true :)
panosGR I am so sorry but i am a complete n00b in Perl6 !
llfourn if you are aiming to make something exactly the same then I can't see why not
jast panosGR: have a look at 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
hoelzro o/ #perl6
panosGR I don't mind! :) I can start working and in the process of doing it the community can help out with features.
llfourn \o 14:02
panosGR :)
Thank you so much guys ! You really made my afternoon !!!!
I am in your debt !
sortiz hoelzro++ # For your work for multi-line REPL
llfourn easiest debt I've ever picked up :D
panosGR :)
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 !
llfourn ^ yes nine++ that is some real debt
14:04 panosGR left 14:06 uruwi left 14:07 DubiousPepper joined 14:09 neilb left, mr-foobar left 14:10 japhb left, leont joined 14:11 mr-foobar joined, japhb joined 14:15 cdg joined 14:20 CIAvash left 14:22 M-eternaleye joined
dalek kudo/nom: 38214da | lizmat++ | src/core/Hash.pm:
Streamline Hash|Hash[Type].ASSIGN-KEY

  - no longer bombs with "cannot unbox a type object" for %h{Str}
  - make Hash[Type].ASSIGNKEY a few percent faster
14:24
14:25 Khisanth left, uruwi joined 14:27 rindolf joined 14:30 andreoss joined, kjs_ joined, M-matthew joined, M-Illandan joined 14:31 japhb left
andreoss is rakudo confirmed to work on Solaris? 14:31
lizmat would be pleasantly surprised.... maybe El_Che knows
14:32 ely-se left
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
*probe
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
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
lizmat hmm... good point 14:36
but if there's nothing to copy, it should not keep it in a variable 14:37
sortiz The variable is lexical and not captured, no? 14:39
14:39 Khisanth joined
dalek kudo/nom: e58d360 | lizmat++ | src/core/Hash.pm:
Make Hash[Type].BIND-KEY about 2x as fast
14:39
lizmat sortiz: indeed 14:40
14:40 pi4 is now known as pederindi
timotimo 2x as fast! holy cow. 14:41
but there's much overhead to get to BIND-KEY, right?
lizmat yes
timotimo fair enough
sortiz And imo, the same logic applies to Map.Capture, and the if can be turned postfix.
timotimo oh well :S
lizmat it will make inlining better
sortiz: the thing is, Map is immutable
so it would be pretty hard to create a Map with a $!storage *and* not have any elems 14:42
especially since Map.new checks for that
so I'm gonna keep it like it is :-) but sortiz++ for thinking along! 14:43
14:43 zhouzhen1 left
sortiz Good point, but then see Map.Bool and Map.elems. 14:44
lizmat sortiz++ good catch!
well, elems not so much, but Bool: yes 14:45
except that we would have to make a Hash.Bool then
sortiz Yup, optimizing is tricky, I'm learning... :) 14:47
14:48 M-matthew left
lizmat measuring speedup on Map.Bool now 14:48
hmmm... interesting fail more 14:49
*mode
14:52 brrt joined
brrt ohhai 14:52
14:52 CIAvash joined
lizmat sortiz: hmmm.. looks like somewhere something *is* creating Maps with a defined empty $!storage :-( 14:57
and of course, this happens when precomping :-( 14:58
14:58 MadcapJake left, MadcapJake joined, MadcapJake is now known as Guest27967, Guest27967 left 14:59 sufrostico left
sortiz lizmat, well and good to know, so may be the && nqp.elems($!storage) is indeed util in Map.Hash. 15:01
lizmat checking something else atm 15:05
sortiz lizmat, Seen nqp::create(Map) in Capture.hash, and well be a Capture without named args.
lizmat yeah, just fixed that :-)
alas, that's not the only one doing it :-( 15:06
15:09 CIAvash left, skids joined 15:10 CIAvash joined 15:15 vendethiel joined
dalek c: ccb9abb | skids++ | doc/Type/Map.pod:
s/an map/a map/
15:16
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, Actualeyes left
jnthn lizmat: Not surprised they don't 15:18
m: say ()[0];
camelia rakudo-moar e58d36: OUTPUT«Nil␤»
15:18 Actualeyes joined
jnthn That's the one that should be consistent (and is...phew :)) 15:18
An Array is a bunch of Scalar containers, so accessing an unassigned index returns an empty Scalar, which defaults to holding Any 15:19
List and Capture are immutable
So if there's nothing there we just give back Nil
So the output kinda hides the other important distinction a bit (Array gives back an assignable container) 15:20
15:20 _Dad left
lizmat m: say ()[0]; say Capture.new[0] 15:22
camelia rakudo-moar e58d36: OUTPUT«Nil␤Nil␤»
lizmat m: say (,)[0]; say Capture.new[0]
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]␤»
lizmat m: say (1,)[1]; say Capture.new[0]
camelia rakudo-moar e58d36: OUTPUT«Nil␤Nil␤»
15:22 uruwi left
lizmat ok 15:22
15:23 Ven joined, Ven left 15:25 prammer joined 15:28 Ven joined 15:30 kjs_ left, brrt left 15:33 japhb joined
dalek osystem: d6781e2 | zhouzhen1++ | META.list:
add Inline::Scheme::Gambit to the list
15:34
osystem: 28a362e | sylvarant++ | META.list:
Merge pull request #145 from zhouzhen1/add

add Inline::Scheme::Gambit
DrForr Aroo? 15:35
15:36 vendethiel left
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␤»
DrForr Huh, much simpler wrapper than what I need.
moritz DrForr: were you working on the same thing? 15:39
dalek kudo/nom: 0d12fc4 | lizmat++ | src/core/Capture.pm:
Capture.hash checks better for emptiness

  sortiz++ for spotting
sortiz lizmat, see a Map with $!storage defined, but elems 0 ^^^
DrForr No, I have a Guile binding. 15:40
Guess I should add it, as it's almost ready anyway.
15:40 fireartist left
moritz yes, that would be better 15:41
15:41 vendethiel joined
andreoss >No compile-time value for s 15:42
what does this error means?
timotimo that's probably a less-than-awesome error you're getting :( 15:43
moritz an internal error from the compiler, basically
jnthn It's a user-facing one in various cases
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
timotimo yeah, or in a "use" statement
jnthn But it's not defined until runtime
moritz class Foo does R[blah()] { }
jnthn m: my \s = 'abc'; class ::(s) { }
camelia rakudo-moar e58d36: OUTPUT«===SORRY!===␤Name ::(s) is not compile-time known, and can not serve as a package name␤»
jnthn Ah, bit more elaborate error in that case :)
But I suspect a variation on that theme
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␤»
andreoss why?
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␤»
andreoss m: sub num( |z ) { [+] z } ; for 1 -> \s { say num( s, s , s ) }
camelia rakudo-moar e58d36: OUTPUT«===SORRY!===␤No compile-time value for s␤»
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
Not a sub call
andreoss oh..
jnthn Does &num(...) fix it?
andreoss it does
jnthn We've pondered in the past adding a warning when people declare subs that match typenames...it would have helped out here
timotimo i'm not sure why that would require a compile-time value for s, though? 15:49
jnthn timotimo: No, me either. 15:50
Something feels a little off there
dalek kudo/nom: 81dc4b7 | lizmat++ | src/core/Map.pm:
Make Map.Hash look more closely at being empty

Again, sortiz++
15:52 musiKk joined 15:57 DubiousPepper left 16:03 vendethiel left, Ven left 16:04 nakiro left 16:05 FROGGS left
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:10
16:11 TEttinger joined, Guest45782 left
lizmat it would reduce the memory footprint significantly 16:11
16:11 isBEKaml joined 16:13 bowtie joined, kurahaupo joined, bowtie is now known as Guest88659
jnthn lizmat: I assume you've measured that? :) 16:15
lizmat: I've no problem with aligning object hashes with the others though 16:16
lizmat: It'll make the transition to whatever we end up with easier.
lizmat well... actually, a good point
I *didn't* measure that
I assumed that having 1 hash instead of 2 would mean 1/2 the memory usage
jnthn I don't think it'll be a *loss*, but my hunch is it's not a huge win either.
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
jnthn Thus why my guess is it's close to break even. :)
lizmat yeah, gotcha
jnthn But uniformity is worthwhile.
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 ?
Juerd I use top and sleep 20 :)
lizmat ok
jnthn Create a huge object hash (100,000 keys or so), nqp::force_gc(), then sleep
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
Production here means running on virtual machines with little memory (512 MB)
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
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 :)
jnthn Juerd: Plenty for the VM level. Also been working on hunting leaks of late.
Understanding and reducing memory use is certainly something on my radar.
Juerd That's great to hear :) 16:22
lizmat Juerd : maybe an idea to checkout moar=master 16:23
Juerd lizmat: I don't know what that means
What's the =?
lizmat build rakudo with -gen-moar=master
Juerd Is that something I can feed rakudobrew?
lizmat *that* is something I don't know 16:24
Juerd :)
I should really figure out how to compile manually, one day
It's probably not that hard but it's out of my comfort zone
lizmat git clone
perl Configure.pl --gen-moar --gen-nqp --backends=moar
make install
that's basically it
16:25 sufrostico joined
isBEKaml Juerd: perhaps you can use this: github.com/tadzik/rakudobrew/blob/...obrew#L103 16:25
Juerd I'll try soon; need to go now. Thanks so far :)
isBEKaml --configure-opts
16:26 Guest88659 left, Actualeyes left 16:27 andreoss left, ely-se left 16:28 uruwi joined
dalek kudo/nom: 07cc6f6 | lizmat++ | src/core/Hash.pm:
Make Hash[Any,Any]{object} about 2x as fast
16:28
16:28 bowtie_ joined 16:31 leont left
skids isBEKaml: --configure-opts won't work on triple ( I have a probably bitrotted PR for that ) 16:31
16:32 AlexDaniel joined, raiph joined
isBEKaml skids: Oh :-( 16:33
16:37 pmurias left 16:38 hankache joined
hankache hello #perl6 16:42
dalek kudo/nom: d70d264 | lizmat++ | src/core/Hash.pm:
$!keys are a localy visible role attribute
16:43
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:44
16:45 leont joined
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
lizmat jnthn: the single hash approach appears to be using 4% less memory for 1M hash entries 16:47
jnthn: also it takes 10% less CPU to initialize 16:49
jnthn lizmat: Pretty close to break even on memory then, but on the correct side of the line ;) 16:50
16:50 abaugher_ left
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
jnthn And faster init is nice indeed
lizmat yes, but the AT-KEY is of course getting more expensive
16:51 domidumont left, abaugher_ joined 16:52 sufrostico left 16:54 sufrostico joined
AlexDaniel bartolin: hmm I see that your fork of roast-data has no commit today. Is it ok? 16:55
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
jnthn: the code I used: gist.github.com/lizmat/b3c9fa1a67b58dac4ebb 16:57
17:02 autark joined
jnthn lizmat: Hm, so...good? :) 17:03
lizmat: I guess constructing a Pair is cheaper than hashing twice
lizmat yeah, looks like it 17:04
jnthn Nice
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
and uses less memory
17:06 bowtie_ left
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:07
17:08 bowtie_ joined
hoelzro someone using the MSI for R* encountered a problem when building Linenoise: github.com/hoelzro/p6-linenoise/issues/13 17:08
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
however, the user has strawberry Perl (and thus gmake) installed
any thoughts on how we can get around this with people using the MSI?
perlpilot does windows have an equivalent to symbolic links? 17:10
(or any kind of link)
jast several, actually
en.wikipedia.org/wiki/NTFS_symbolic_link
jnthn hoelzro: Well, one way is not to piggy-back off how Moar was configured/built :) 17:11
At least, not for those the choice of make program
17:13 Perleone left 17:14 musiKk left 17:15 s_kilk joined
dalek osystem: d622fb6 | kuerbis++ | META.list:
Add Term-Choose-p6 to ecosystem

See github.com/kuerbis/Term-Choose-p6
17:16
osystem: 4fe4c09 | (Zoffix Znet)++ | META.list:
Merge pull request #146 from kuerbis/master

Add Term-Choose-p6 to ecosystem
17:16 ely-se joined 17:17 bowtie_ left 17:18 uruwi left 17:19 bowtie joined 17:20 bowtie is now known as Guest25583
stmuk_ hoelzro: it was a mistake that the MSI shipped without Linenoise .. the future R* build will include it 17:20
17:23 uruwi joined 17:24 FROGGS joined
stmuk_ assuming the windows R* build actually builds it correctly 17:25
:)
17:26 s_kilk left 17:27 Sqirrel_ joined 17:28 lonewolf28 joined
dalek kudo/nom: ea15bc1 | lizmat++ | src/core/Pair.pm:
Simplify Pair.antipair
17:28
kudo/nom: 472ff3e | lizmat++ | src/core/Hash.pm:
Make Hash[Any,Any] = ... a few percentages faster
17:30 Sqirrel left 17:31 autarch left 17:35 perl6newbee joined 17:39 zakharyas left, bioexpress joined 17:45 bioexpress left, autarch joined 17:47 mr-foobar left 17:49 rindolf left 17:50 buharin joined
hoelzro stmuk_: yeah, that was my mistake, but this is still an issue for other modules 17:59
jnthn: agreed =) I'm just trying to think about how to get around this 18:00
18:00 addison joined 18:01 mr-foobar joined
leont Travis failed, because «unable to access 'github.com/tadzik/rakudobrew.git/': Failed connect to github.com:443; Connection timed out»… 18:01
dalek kudo/nom: 17a4434 | lizmat++ | src/core/Hash.pm:
Make Hash[Any,Any]{obj} = ... a few percent faster
18:03
18:04 uruwi left
geekosaur travis does that a lot 18:05
18:06 rindolf joined
Juerd Sweet! 18:07
timotimo: Thanks for letting me know about 'triple'. Looks easy enough :)
18:08 japhb left
timotimo :) 18:08
18:08 japhb joined
Juerd Couldn't determine correct make program. Aborting. 18:13
Well, that's a first :)
18:15 Laurent_R joined 18:17 virtualsue joined
dalek kudo/nom: b4c2e9d | lizmat++ | src/core/Hash.pm:
Make Hash[Any,Any]{obj} := .. a few percent faster
18:19
stmuk_ hoelzro: oh sorry it was your PR which fixed that .. so I guess you knew about it anyway! 18:22
18:23 diakopte1 is now known as diakopter, SCHAAP137 joined, ely-se left 18:24 alpha123 joined 18:28 sevvie left
dalek osystem/add-Inline-Scheme-Guile: fbf4664 | (Jeffrey Goff)++ | META.list:
Add Inline-Scheme-Guile
18:30
osystem: fbf4664 | (Jeffrey Goff)++ | META.list:
Add Inline-Scheme-Guile
osystem: 4ad8bcf | drforr++ | META.list:
Merge pull request #147 from perl6/add-Inline-Scheme-Guile

Add Inline-Scheme-Guile
ar: 9c53efd | (Steve Mynott)++ | ports/darwin_dmg/ (2 files):
Start to bring back R* Mac dmg binary build from dead

  - Rename target directory Rakudo like the Windows build build
  - Comment out Rez and remove unused option
  - Increase temp file system size so precomp files fit
  - Now works with some hand holding
18:32 Guest25583 left 18:33 bowtie joined, bowtie is now known as Guest11571 18:34 vendethiel joined 18:35 dakkar_ left
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␤␤»
timotimo oh, neat! 18:36
18:36 japhb left 18:39 japhb joined 18:40 kmel joined, dha joined 18:41 kmel left 18:42 raiph left 18:43 hankache left 18:44 ely-se joined, ely-se left
b2gills Hotkeys: the shortest way to get an Int from a Rat is 「+~(Rat) 」 (backlogging) 18:46
dalek ar: 37a9aab | (Steve Mynott)++ | ports/darwin_dmg/package_darwin_dmg.pl:
don't attempt make clean
18:47
18:48 espadrine left
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:48
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
maybe there are even more? 18:50
buharin hey
whats a standard 18:51
psgi wigs or p6sgi
?
Hotkeys Never mind it isn't
18:51 bioexpress joined, firstdayonthejob left
Hotkeys Thanks anyway 18:51
AlexDaniel jdv79: perhaps also learnxinyminutes.com/docs/perl6/
TimToady
.oO(most standards eventually turn into chevrons...)
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
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!
TimToady got sick again while taking his vactation from a vacation, so is now recovering from his vacation from his vacation... :)
AlexDaniel jdv79: send a pull request? :) 18:54
18:57 japhb left, uruwi joined 18:58 japhb joined
b2gills Hotkeys: which golf? 18:58
lizmat is glad TimToady is feeling better 19:02
19:02 raiph joined
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
timotimo jdv79: actually, the download page has these links
japhb Ah, merge-sort was a contribution.
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 autark left
timotimo yeah, but the startup gets bigger the more SCALE you have 19:04
japhb Lemme look at the code in question
timotimo it generates a list of random numbers SCALE items big
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
timotimo hm
well, i suppose that's all right? 19:06
japhb OIC.
timotimo we could instead just sort a fixed-size list SCALE times
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.
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
i should probably have measured
but i suspect it's much more expensive in the perl6 code compared to the perl5 code
AlexDaniel m: my $r = 25/3; say WHAT +~($r)
camelia rakudo-moar b4c2e9: OUTPUT«(Rat)␤»
japhb Yeah, worth checking that. You can just run it at the command line, with a couple timers added.
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”)
japhb Perhaps that's a valid test, though -- just slightly misnamed.
AlexDaniel b2gills: okay nvm
japhb timotimo: 'merge-sort-random-ints', perhaps
b2gills m: my $r = 1/1; say $r.^name; say (+~$r).^name 19:09
camelia rakudo-moar b4c2e9: OUTPUT«Rat␤Int␤»
timotimo to be fair, the test where perl5 kicks our ass with regards to rand has a for loop where a counter gets +='d
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
nodnod
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
then it'd be compile time every time and that'd be thrown out
buharin hey I cant get 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?
buharin I read it is block
19:12 espadrine joined
buharin but how it works in that context 19:12
timotimo where exactly are you looking? 19:13
lizmat ah, yes, probably
buharin on-error variable is stored in $error
lizmat too bad we don't have a fast unpack :)
timotimo ah
buharin and then it is passes to v.break
or what
timotimo not quite, let me explain
skids buharin: -> $a { } is sort of like 'anon sub ($a) { }'
dalek kudo/nom: c4fe4b3 | lizmat++ | src/core/Hash.pm:
Make Hash[Any,Any].DELETE-KEY 30-40% faster

And also handle the :SINK case
llfourn buharin: it's making a named arg with a closure as its value
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
timotimo in this case, foobar is -> $error { ... }, which is a subroutine that accepts a parameter "$error" and does stuff with it
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
timotimo jdv79: that's about the links to the learning material? 19:16
buharin w8
anon is a keyword which prevent install sub in lexical scope
AlexDaniel on-error => anon sub foo ($error) { … } # this should probably work too
buharin oh yes :D
that it
AlexDaniel, it is more readable form 19:17
need brb
AlexDaniel buharin: except that you are providing a sub name but not using it anywhere
unless you want it to be recursive, I guess…
in which case 「sub ($error) { … }」 is just as good 19:18
or 「-> $error { … }」 for short :)
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 osystem: f2fc074 | skids++ | META.list:
Add Control::Bail to ecosystem
jdv79 subjective i know. i'm just looking at it after not for a while. 19:20
timotimo mhh
19:20 domidumont joined, yqt joined
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␤␤»
timotimo i appreciate your intention of helping out in that particular area!
AlexDaniel it seems like you can't do that, hmm…
geekosaur it's NYI 19:21
timotimo well, we have &?ROUTINE
m: anon sub foo($x) { say &?ROUTINE($x+1) unless $x == 10; }(1)
camelia rakudo-moar b4c2e9: OUTPUT«()␤True␤True␤True␤True␤True␤True␤True␤True␤»
19:21 dha left
dalek ar: d63b1f7 | (Steve Mynott)++ | ports/darwin_dmg/adjust_installation_window.scpt:
use Rakudo in applescript too
19:22
19:23 nowan left
AlexDaniel geekosaur: good to know, thanks 19:23
timotimo: already knew that, thanks anyway :)
timotimo 'k
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␤␤»
timotimo m: anon multi sub foo($x) { say &?ROUTINE($x+1) unless $x == 10; }(1)
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…»
timotimo pff.
19:26 perl6newbee left, M-eternaleye left, M-eternaleye joined 19:27 M-eternaleye is now known as eternaleye 19:29 cdg left
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␤»
lizmat WHAT returns a type object, that stringifies as "" with warning 19:32
m: say pi.WHAT.Str ~ ' <- pi'
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␤»
lizmat m: say pi.^name ~ ' <- pi'
camelia rakudo-moar c4fe4b: OUTPUT«Num <- pi␤»
hippie right, but contrasted with 'say pi.WHAT; say pi.WHAT ~ ' <- pi'; -- you can see what I might've expected. 19:33
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 Sqirrel_ left
timotimo lizmat: thank you very much 19:34
19:35 Sqirrel joined 19:39 buharin left, cognominal left 19:40 cognominal joined 19:41 captain-adequate joined 19:44 espadrine left 19:45 buharin joined 19:48 addison left, addison joined
b2gills I just found a use for &infix:<^...> but it doesn't exist. :( 19:53
perlpilot b2gills: sorry ... what would that do? 19:54
b2gills throw out the first element
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?
b2gills {([-1,1],[0,2],{[$^a[0,1]Z+$^b[1,0]]}^...*)[^$_]»[0]}
{([-1,1],[0,2],{[$^a[0,1]Z+$^b[1,0]]}...*)[1..$_+1]»[0]} 19:55
It's for a code golf
oops off by one error {([-1,1],[0,2],{[$^a[0,1]Z+$^b[1,0]]}^...*)[0..$_]»[0]} 19:56
19:56 virtualsue left 19:59 Cabanossi left
AlexDaniel b2gills: why not just change [0..$_] to [1..$_] ? :) 20:01
unless you want to have [^$_] of course
b2gills AlexDaniel: it would have to be [1..$_+1]
AlexDaniel riiight 20:02
ah I know
[^$_+1] ?
does that work?
20:02 prammer left, Cabanossi joined
AlexDaniel b2gills: ↑ ? 20:03
b2gills m: say +(1..$_+1); say +(1^5+1)
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)␤»
AlexDaniel what
m: say +(1..$_+1); say +(^5+1)
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␤»
b2gills m: say +(1..$_+1); say +(^5+1)
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␤»
AlexDaniel m: say +(1..5+1); say +(^5+1)
camelia rakudo-moar c4fe4b: OUTPUT«6␤5␤»
AlexDaniel +2 then? 20:04
nope… 20:05
20:07 ramon joined 20:08 ramon is now known as Guest58939
[Coke] jdv79: I wouldn't consider the nqp internals course a "getting started" resource for rakudo perl 6. 20:08
[Coke] is glad to see another option for os x installs coming on line. some people just won't use homebrew or macports. 20:09
20:10 nowan joined 20:14 musiKk joined
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 perlpilot left, hankache joined
diakopter hunh 20:16
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:18
jnthn lizmat: Recreated the Inline::Perl5 problem locally 20:19
20:19 newbie joined
dalek Heuristic branch merge: pushed 17 commits to rakudo/nom by niner 20:19
20:20 domidumont left
hankache the error message is: Could not open file-name. Failed to stat file: no such file or directory 20:21
20:22 darutoko left, yqt left 20:23 perlpilot joined
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:23
20:24 khw left
timotimo could it be that spec tests are kind of hangy right now? 20:27
lock.t, race.rakudo.moar, promise/start.t, supply/start.t 20:28
buharin and twigil ^
is also some kind of magic
xD
20:29 ocbtec is now known as ocbtec_AFK
buharin m: sub say-it { say $^a; } 20:29
camelia ( no output )
20:29 felher left 20:30 zakharyas joined
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, khw joined 20:34 prammer joined
timotimo oof 20:34
20:34 zengargoyle left, hankache left
skids m: sub say-it { say $^a; }; say-it(2) 20:35
camelia rakudo-moar d68c30: OUTPUT«2␤»
20:36 prammer left
buharin so 20:36
$^a is like 20:37
hidden function parameter?
passed positional
20:37 avenj left
buharin oh now ;d 20:38
skids It is an in place parameter, called a "placeholder"
buharin m: sub say-it { say $^b ~ $^a; } say-it(2, 3)
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 …»
buharin m: sub say-it { say $^b ~ $^a; }; say-it(2, 3) 20:39
camelia rakudo-moar d68c30: OUTPUT«32␤»
skids They are alphabetical
buharin skids, yeah I see
Hotkeys Specifically unicode order
buharin I remember I used bind placeholders in C++
it was like pass something to method and use placeholder instead of argument 20:40
like parameters interception
but it is far more crazy
Hotkeys m: sub say-it { say $^omega ~ $^alpha }; say-it(2,4)
camelia rakudo-moar d68c30: OUTPUT«42␤»
buharin cause I can fully replace subroutines with placeholders 20:41
mean typical function
anyway when we should use this
Hotkeys Properly declaring parameters is usually nicer for readability though
:p
skids buharin: is is often used in very short closures like the comparator to sort() 20:43
20:48 cdg joined
_ramix_ Hi! A good Perl 6 tutorial? thx 20:48
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.
jnthn _ramix_: Maybe perl6intro.com/ 20:50
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␤»
gfldex buharin: ^^^
m: sub f(&c){ c((1..10).pick, (1..10).pick) }; { my $scopy = "abc"; say f { return $^a ~ $^b ~ $scopy } };
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␤␤»
_ramix_ jnthn: Thanks, looks good!
buharin gfldex, I won't try to understand this :D 20:53
20:54 prammer joined, raiph left
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
20:56 skids left, prammer left, felher joined
gfldex buharin: blocks are born with one positional argument called $_, sometimes you need more. That's what placeholders are for. 20:56
buharin gfldex, ;-) 20:57
20:57 CIAvash left, prammer joined 20:58 mohae left, Guest58939 left 20:59 Sqirrel left
Hotkeys when doing a sequence with the magical sequence stuff 20:59
can you have the function bit return two items to the sequence?
instead of just one
buharin Python got better described standards 21:00
with PIP
here github.com/zostay/P6SGI
I don't know if someone use it or accept it 21:01
21:01 prammer left, salv0 left 21:02 prammer joined 21:03 yqfvwal joined 21:04 mohae joined 21:05 dolmen joined 21:06 apiw joined, addison left, apiw left, raiph joined, addison joined, revhippie joined 21:07 prammer left
Hotkeys what a beautiful sequence: 21:07
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)␤»
Hotkeys the lucas-nacci sequence
is there a better way to disregard positionals besides naming them with a semicolon after to do nothing with them?
21:09 Sqirrel joined
buharin hey how to encode docs constraints 21:10
I mean for example
Str:D where *.chars > 0
is it smh like Str Data where what? 21:12
21:12 ely-se joined
Hotkeys yep 21:12
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␤␤»
Hotkeys m: my Str $foo where *.chars > 0; $foo = "bar"
camelia ( no output )
Hotkeys is that what you meant?
buharin:
buharin Hotkeys, omg this is Perl 21:14
Hotkeys hm?
You can also make a subset
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…»
Hotkeys darn
never mind
buharin Hotkeys, I mean whats where and * mean here
Hotkeys oh
buharin it is var checking 21:16
Hotkeys where is imposing the constraint essentially
and * represents whatever you put into the var
so $foo is a string whose value must have greater than 0 chars
buharin Hotkeys, ohh I remember I look for whatever once 21:17
21:17 firstdayonthejob joined
dalek c: a9ab02c | raiph++ | doc/Language/performance.pod:
Rearrange/polish

Add lazy list processing as a possible "algorithmic improvement"
Misc improvements
  ** Native typing examples still missing **
21:17
yqfvwal which of the naming conventions is recommend in perl6?
Hotkeys yqfvwal: do you mean casing? 21:18
yqfvwal Hotkeys, yes, I see three naming conventions in the introduction, but is not clear, which should be used 21:19
21:19 prammer joined
Hotkeys hmm 21:19
buharin m: my Str $foo where _.chars > 0; $foo = "ass"
camelia rakudo-moar d68c30: OUTPUT«5===SORRY!5=== Error while compiling /tmp/boqEz80zKO␤Undeclared name:␤ _ used at line 1␤␤»
Hotkeys I haven't looked at the intro
m: my Str $foo where $_.chars > 0; $foo = "ass"
camelia ( no output )
DrForr yqfvwal:Whatever you're comfortable with. The language doesn't enforce naming conventions, that's why they're conventions.
Hotkeys ^
kebab-case is pretty popular 21:20
buharin m: my Str $foo where $_.chars > 0; $foo = "ass"
camelia ( no output )
Hotkeys because we can have dashes
buharin m: subset NonEmpty of Str $foo where $_.chars > 0; NonEmpty $foo = "ass"
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␤ …»
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␤ …»
buharin m: subset NonEmpty of Str where $_.chars > 0; my NonEmpty $foo = "ass"
camelia ( no output )
buharin xD
Hotkeys, hey there is no subset in docs 21:22
Hotkeys m: subset NonEmpty of Str where *.chars > 0; my NonEmpty $foo = "bar" 21:23
camelia ( no output )
Hotkeys why didn't it work before 21:24
oh
I'm dumb is why
buharin: weird
I knew about it from watching a presentation
didn't realize it wasn't in docs
maybe it's just hidden somewhere
buharin ohh 21:25
I thought you are one of inventors
Hotkeys Nah sorry
I just like perl 6
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
but no see implementation
21:26 partly joined
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)
partly Why does perl not recognize the UTF-8 ≤ character for <=?
s/perl/perl6/ 21:28
21:28 FROGGS left 21:29 geraud joined
Hotkeys I don't know partly but I wish it did 21:30
flussence huh
m: say 3 ≤ 5
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…»
partly I'm not sure if it's a feature, a bug or you just forgot it
21:31 zakharyas left
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
DrForr If there is one, not sure offhand. I just checked the Texas doc, not listed.
flussence m: sub infix:<≤>(\a, \b) { a <= b }; say 3 ≤ 4 21:32
camelia rakudo-moar d68c30: OUTPUT«True␤»
yqfvwal Why does perl6 use sigils? (typing them is really inconvenient)
moritz yqfvwal: as a kind of mini-namespace, and for making interpolation easier 21:33
note that there are places where you can drop the sigil
m: my \x = 42; say x
camelia rakudo-moar d68c30: OUTPUT«42␤»
yqfvwal moritz, thanks 21:34
21:34 ocbtec_AFK is now known as ocbtec
partly is skimming through S03 21:35
S03 is the right one for such information, right?
jnthn Also, so you can very easily pick out state in the code when reading it.
21:36 ely-se left
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␤»
Hotkeys m: my @animals = ['camel','vicuña','llama'];say "The zoo contains " ~ +@animals ~ " animals";
camelia rakudo-moar d68c30: OUTPUT«The zoo contains 3 animals␤»
Hotkeys :p
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"
yoleaux 08:59Z <timotimo> raiph: i like your performance page on the documentation
camelia rakudo-moar d68c30: OUTPUT«The zoo contains 3 animals␤»
yqfvwal Weird, the interpreter says 1…
moritz yqfvwal: what's your rakudo version? 21:38
yqfvwal moritz, This is perl6 version 2014.07 built on parrot 6.6.0 revision 0 21:40
DrForr The Christmas release was in 2015, you're a little out of date :) 21:41
Hotkeys wow
that's a lot out of date
:p
moritz yqfvwal: don't use that; it's hopelessly out of date and underpowered
flussence where are people getting these ancient versions‽
DrForr Debian probably. I think Ubuntu had similar. 21:42
flussence that's just completely irresponsible of the distro then
yqfvwal correct, so I assume, I should build it from source
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:43 buharin left 21:44 molaf left, Timbus left
Hotkeys gfldex: ah 21:46
21:46 espadrine joined 21:52 addison left
partly Interesting perl6 does not interefere the method parameter type. I.e if the method is calling another method which is typed 21:52
Hotkeys m: (1,3, {$^b, $^a} ... *)[^10].say 21:53
21:53 noganex_ joined
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
is there a way to have 2 values returned without it being a list
I don't need it right now but it'd be neat maybe 21:54
21:54 noganex_ left, dfcarpenterak joined 21:55 noganex_ joined, noganex left
jnthn Hotkeys: slip 21:55
21:55 _ramix_ left
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)␤»
Hotkeys jnthn: you are great
thanks
21:56 espadrine left
dalek c: 8765535 | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod:
add eyesore to coerce the knowledgeable to doc the type system
22:02
gfldex that's the right spot to doc enum too, that is missing as well 22:03
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:05
22:07 musiKk left 22:08 addison joined
dalek kudo-star-daily: aa8c933 | coke++ | log/ (9 files):
today (automated commit)
22:09
22:11 kaare_ left, Timbus joined 22:13 perlawhirl joined
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
perlawhirl is there a key sequence that will stop long running operations without killing the repl ?
hoelzro o/ perlawhirl
short answer: no 22:17
long answer: not yet ;)
perlawhirl would be nice if it trapped SIGINT, similar to the python repl
hah, thanks hoelzro... i figured as much
hoelzro it's on my todo list
perlawhirl cool 22:18
22:19 pecastro left 22:20 pecastro joined
AlexDaniel partly: gist.github.com/AlexDaniel/c89bd2786f9b63f31e4c 22:20
perlawhirl is compile time type checking on variable assignment something that planned for the future?
AlexDaniel partly: ≤ ≥ ≠ are the most wanted ones in that list
partly AlexDaniel: well fullack on my side :) 22:22
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:26
22:27 addison left
Hotkeys currently the font I use in atom makes glyphs from =<, >=, and != to those symbols 22:27
so it's nice and readable for me
22:27 AlexDaniel left
Hotkeys but i would like the symbols 22:27
22:27 AlexDaniel joined
b2gills Hotkeys: you can use 「{ .say }( 'hello world' )」 or assign it to a scalar 「my $f = {…}; $f()」 22:27
perlawhirl perlpilot: oh, yeah... but assigning an Int to a Str (or vice versa) is a runtime failure 22:28
m: my Int $i = 'String'
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␤␤»
Hotkeys b2gills: hmm?
b2gills Also |( … ) is short for slip( … )
Hotkeys oh
wait what was the first one in response to
perlawhirl however... doing it via sub is compile time failure 22:29
m: sub x (Int) {}; x('String')
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')␤»
b2gills you were asking if you had to assign to a &f
Hotkeys oh, how long ago
22:30 raiph left
perlpilot perlawhirl: probably :) 22:30
22:30 rindolf left
lizmat and a new Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2016/02/08/...-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.
perlpilot lizmat++ 22:32
perlawhirl perlpilot: hopefully. just seemed odd to me that subs do it, but var assignment doesn't.
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 )
perlpilot (also, we currently don't have everything implemented as much as we would like either ;) 22:34
22:36 skids joined
perlawhirl perlpilot: meanwhile, for basic compile time checking on var assignment, i can take the scenic route via a sub 22:36
m: sub new-int(Int $i) {$i}; my Int $s = new-int('foo');
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');␤»
perlawhirl :D
22:36 avenj joined 22:39 AlexDaniel left
b2gills I can tell that the person who wrote Term::Choose is new to Perl 6, as the signature for &choice is :(@,%) not :(*@,*%) 22:39
22:40 addison_ joined 22:49 yqfvwal left
lizmat b2gills: I assume PR's are welcome! 22:51
b2gills It might be closer to an overhaul 22:52
22:54 vendethiel left
jnthn lizmat: s/camera’s/cameras/, if you wanna tweak it 22:54
lizmat jnthn : tweaked 22:55
jnthn lizmat++ 22:56
22:56 lokien_ joined
jnthn These days, the weekly always has some things I've missed. :) 22:57
leont Should have PRed ecosystem, to have Getopt::Long in the new modules list, but there'll be another week 22:59
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
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:03
23:04 keithbro joined
RabidGravy which is all good 23:05
lizmat
.oO( l'histoire se repète )
23:09 keithbro left 23:13 RabidGravy left 23:14 NZKindest left, NZKindest joined 23:20 Fleurety left 23:21 Timbus left 23:22 dolmen left, prammer left 23:26 virtualsue joined 23:28 adu joined 23:32 dad joined
dad _dad 23:32
23:33 dad is now known as Guest63689 23:37 wamba left 23:43 Laurent_R left, Timbus joined 23:46 bioexpress left, bioexpress joined 23:47 AlexDani` joined, AlexDani` is now known as AlexDaniel` 23:49 AlexDaniel joined
AlexDaniel AlexDaniel`: O_o 23:49
AlexDaniel` oh wow…
23:49 AlexDaniel left, AlexDaniel` left 23:50 virtualsue left 23:55 pmurias left