Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-06-27

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 mcmillhj joined #perl6
00:01 zapwai joined #perl6
00:07 devmikey joined #perl6
00:08 mr-foobar joined #perl6
00:09 BenGoldberg joined #perl6
00:10 seatek I forgot this: in Perl5 Moose you can use variable attribute names like $self->$attr_name -- anyone know the equiv. in Perl6 for variable attribute names?
00:11 timotimo self."$attr_name"()
00:11 seatek oh yeah!!!! i was trying those crazy ::($attr) ones ;)
00:11 timotimo heh, :: is for packages and lexical scopes
00:12 seatek well self is for methods ;)
00:12 timotimo right, and attributes are accessed with accessor methods
00:12 timotimo private attributes are different, though
00:12 seatek yay
00:12 seatek yeah
00:12 bjz joined #perl6
00:17 mcmillhj joined #perl6
00:22 mcmillhj joined #perl6
00:27 Cabanossi joined #perl6
00:35 mr-foobar joined #perl6
00:35 awwaiid joined #perl6
00:38 lookatme joined #perl6
00:38 lookatme morning
00:39 mcmillhj joined #perl6
00:46 mcmillhj joined #perl6
00:49 awwaiid joined #perl6
00:55 cog_ joined #perl6
00:56 Cabanossi joined #perl6
00:59 awwaiid joined #perl6
01:07 mr-foobar joined #perl6
01:10 awwaiid joined #perl6
01:19 awwaiid joined #perl6
01:33 awwaiid joined #perl6
01:37 mr-foobar joined #perl6
01:39 awwaiid joined #perl6
01:49 skids joined #perl6
01:51 ilbot3 joined #perl6
01:51 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!
01:55 awwaiid joined #perl6
02:04 awwaiid joined #perl6
02:18 noganex joined #perl6
02:27 awwaiid joined #perl6
02:28 cdg joined #perl6
02:33 bjz_ joined #perl6
02:41 awwaiid joined #perl6
02:46 awwaiid joined #perl6
02:59 awwaiid joined #perl6
03:06 awwaiid joined #perl6
03:10 Cabanossi joined #perl6
03:16 awwaiid joined #perl6
03:32 awwaiid joined #perl6
03:35 mr-foobar joined #perl6
03:38 awwaiid joined #perl6
03:40 cpage_ joined #perl6
03:44 awwaiid joined #perl6
03:55 awwaiid joined #perl6
03:57 roguelazer joined #perl6
04:07 awwaiid joined #perl6
04:18 rouking joined #perl6
04:23 moritz lizmat++ # https://p6weekly.wordpress.com/2017/06/26/2017-26-half-way-there/
04:36 mr-foobar joined #perl6
04:37 lookatme moritz++
04:40 awwaiid joined #perl6
04:44 cyphase joined #perl6
04:46 awwaiid joined #perl6
04:51 awwaiid joined #perl6
04:52 curan joined #perl6
04:57 awwaiid joined #perl6
05:02 awwaiid joined #perl6
05:03 skids joined #perl6
05:06 mcmillhj joined #perl6
05:08 bjz joined #perl6
05:08 Xliff_ joined #perl6
05:09 cyphase joined #perl6
05:09 awwaiid joined #perl6
05:10 gabiruh_ joined #perl6
05:11 john51_ joined #perl6
05:12 kaare__ joined #perl6
05:12 cyphase joined #perl6
05:12 sufrosti1o joined #perl6
05:13 lizmat_ joined #perl6
05:13 altLeCamarade joined #perl6
05:13 noganex_ joined #perl6
05:14 MilkmanDan joined #perl6
05:14 f3ew joined #perl6
05:14 dudz joined #perl6
05:14 cyphase joined #perl6
05:15 profan joined #perl6
05:15 baest joined #perl6
05:15 cyphase joined #perl6
05:16 giraffe joined #perl6
05:17 cyphase joined #perl6
05:18 rumble joined #perl6
05:18 cyphase joined #perl6
05:19 awwaiid joined #perl6
05:22 mcmillhj joined #perl6
05:24 awwaiid joined #perl6
05:25 ilogger2 joined #perl6
05:36 dylanwh_ joined #perl6
05:37 raydiak_ joined #perl6
05:38 MilkmanD1n joined #perl6
05:38 salva0 joined #perl6
05:43 protium joined #perl6
05:43 musca joined #perl6
05:43 rouking joined #perl6
05:44 lowbro joined #perl6
05:44 wamba joined #perl6
05:44 lowbro joined #perl6
05:50 aindilis joined #perl6
05:50 mr-foobar joined #perl6
05:51 domidumont joined #perl6
05:51 xtreak joined #perl6
05:51 awwaiid joined #perl6
05:57 awwaiid joined #perl6
05:57 domidumont joined #perl6
06:02 mr-foobar joined #perl6
06:03 awwaiid joined #perl6
06:04 ufobat joined #perl6
06:13 mr-fooba_ joined #perl6
06:29 wamba joined #perl6
06:30 awwaiid joined #perl6
06:33 parv joined #perl6
06:36 awwaiid joined #perl6
06:37 cog_ joined #perl6
06:41 awwaiid joined #perl6
06:46 xzhao joined #perl6
06:46 awwaiid joined #perl6
06:52 awwaiid joined #perl6
06:58 awwaiid joined #perl6
06:58 vendethiel joined #perl6
07:01 domidumont joined #perl6
07:07 abraxxa joined #perl6
07:09 bjz_ joined #perl6
07:09 ufobat ola
07:10 awwaiid joined #perl6
07:13 |oLa| joined #perl6
07:16 awwaiid joined #perl6
07:25 awwaiid joined #perl6
07:30 imcsk8 joined #perl6
07:31 * lizmat_ clickbaits https://p6weekly.wordpress.com/2017/06/26/2017-26-half-way-there/
07:37 awwaiid joined #perl6
07:38 El_Che hello
07:39 astj joined #perl6
07:40 parv yo
07:41 parv howizit?
07:45 dakkar joined #perl6
07:46 awwaiid joined #perl6
07:48 astj joined #perl6
07:49 kaare__ joined #perl6
07:50 lookatme hello
07:50 imcsk8 joined #perl6
07:51 awwaiid joined #perl6
07:52 melezhik Hi!
07:52 melezhik I am reading docs of https://github.com/zoffixznet/perl6-Proc-Q  and not quite clear how can I pass parameters to proc-q ?
07:53 melezhik I am talking about commands parameter - https://github.com/zoffixznet/perl6-Proc-Q#commands
07:53 melezhik say I want to run external program by using Proc::Q
07:54 melezhik the example I see works fine, but when I try to adopt it I get this
07:55 melezhik perl6 -e 'use Proc::Q; proc-q {"echo OK"};'
07:55 melezhik Constraint type check failed in binding to parameter '@commands'; expected anonymous constraint to be met but got Array ($[-> ;; $_? is raw { ...)
07:56 melezhik I the doc for command parameter I read - "A list of lists, where each of inner lists is a list of arguments to Proc::Async.new. "
07:57 melezhik but I can't come up with a proper way to use it ...
07:59 llfourn m: say ({ "echo OK" }).WHAT
07:59 camelia rakudo-moar 823011: OUTPUT: «(Block)␤»
07:59 llfourn but what it wants is a list of lists
07:59 llfourn so if you just want one echo
08:00 llfourn do proc-q [<echo OK>,]
08:00 llfourn actually no need for the comma
08:00 llfourn m: say [<echo OK>]
08:00 camelia rakudo-moar 823011: OUTPUT: «[echo OK]␤»
08:00 llfourn m: say [<echo OK>,] # actually there is
08:00 camelia rakudo-moar 823011: OUTPUT: «[(echo OK)]␤»
08:02 llfourn melezhik: ^
08:02 awwaiid joined #perl6
08:03 melezhik hi llfourn:
08:03 melezhik perl6 -e 'use Proc::Q; proc-q [<echo OK>];'
08:03 melezhik Constraint type check failed in binding to parameter '@commands'; expected anonymous constraint to be met but got Array ($["echo", "OK"])
08:03 llfourn o.o
08:03 jonas1 joined #perl6
08:03 llfourn oh
08:03 llfourn they have to be a list for some reason
08:03 nadim joined #perl6
08:04 llfourn m: dd (<echo OK>,)
08:04 camelia rakudo-moar 823011: OUTPUT: «(("echo", "OK"),)␤»
08:04 llfourn melezhik: like that ^
08:05 melezhik perl6 -e 'use Proc::Q; proc-q (("echo", "OK"),);' - succeed
08:05 llfourn \o/
08:05 melezhik btw it requires the last comma
08:05 llfourn yep
08:05 melezhik after "OK"
08:05 melezhik thanks !
08:05 llfourn nw gl
08:06 melezhik will go further with my investigation of Proc::Q and stuff ;)))
08:06 llfourn I'm interested to see where you are going with sparrowdo etc
08:06 llfourn I read your blog post on using it to do docker
08:06 llfourn I'm currently trying the same sort of things with spitsh
08:07 parv that comma makes the first arg as a list; turning that data into list-of-list
08:07 melezhik I am not sure about certain target auditory, meanwhile I use sparrowdo at my current work, not that extensively
08:07 llfourn target audience?
08:08 melezhik spitsh? probably I have already seen that ...
08:08 llfourn melezhik: https://github.com/spitsh/spitsh
08:08 melezhik yeah, target audience ... sorry
08:08 melezhik yeah will look at ...
08:08 parv m: my @x = (<a b>); my @y = (<a b>,) ; say @x[0].WHAT ; say @y[0].WHAT
08:08 camelia rakudo-moar 823011: OUTPUT: «(Str)␤(List)␤»
08:08 llfourn heh that makes too of us
08:09 llfourn melezhik: are you going to be at TPC eu?
08:09 llfourn two*
08:10 melezhik unfortunatelly I don't have much time at the moment, pretty buzy with many things, so can't attend
08:10 wamba joined #perl6
08:10 Cabanossi joined #perl6
08:10 llfourn ah k
08:10 * llfourn &
08:11 melezhik looks spitsh is more intelegent than sparrowdo, as under the hood sparrowdo just pushes jobs over ssh and runs sparrow client written on Perl5 ...
08:11 melezhik ))
08:12 rindolf joined #perl6
08:13 awwaiid joined #perl6
08:15 jsimonet m: use NativeCall; subset char_t of Str; my Pointer[char_t] $c;
08:15 camelia rakudo-moar 823011: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤An exception occurred while parameterizing Pointer␤at <tmp>:1␤Exception details:␤  A typed pointer can only hold:␤    (u)int8, (u)int16, (u)int32, (u)int64, (u)long, (u)longlong, num16, num32, (s)s…»
08:17 jsimonet Hello, I'm trying to use a C lib in Perl6 and I used GPTrixie to generate Perl6 mapping, but some special types are used in Pointer. Sould I modify all sub definitions or is there another way ?
08:19 awwaiid joined #perl6
08:19 robertle joined #perl6
08:20 parv i am using rakudo rg276d4. why is there no difference between "@x = (<a b>)" & "@x = [ <a b> ]" (both ~~ & == return True)?
08:20 |oLa| joined #perl6
08:24 melezhik parv: thanks for explanation of the last comma
08:27 parv happy to help, with what little I know. I am also learning
08:29 melezhik ))
08:30 melezhik how to read a directory structure ? I need the first level directories inside some dir ...
08:31 melezhik probably this one ? - https://docs.perl6.org/routine/dir
08:31 Ven`` o/
08:31 melezhik might be handy with in-dir?
08:31 moritz melezhik: yes, dir
08:31 moritz melezhik: and you can pass a dir to dir :-)
08:32 moritz m: say dir('/tmp')
08:32 camelia rakudo-moar 823011: OUTPUT: «("/tmp/y2yamldata-M2wvA1".IO "/tmp/.X11-unix".IO "/tmp/.ICE-unix".IO "/tmp/.XIM-unix".IO "/tmp/.font-unix".IO "/tmp/.Test-unix".IO "/tmp/3rat9uqe4F".IO "/tmp/IXajBf20V7".IO "/tmp/b_kUNwvxo8".IO "/tmp/gzUJ6dIrZV".IO "/tmp/EMgpnqBzo8".IO "/tmp/hsperfdata_c…»
08:32 melezhik thanks, moritz:
08:32 awwaiid joined #perl6
08:40 Cabanossi joined #perl6
08:46 xtreak joined #perl6
08:46 xtreak joined #perl6
08:50 awwaiid joined #perl6
08:56 parv does zef know about modules installed with installation of rakudo (if any installed at all) besides the ones installed by zef itself?
08:58 parv nevermind, seems so.
09:00 awwaiid joined #perl6
09:06 awwaiid joined #perl6
09:06 FROGGS joined #perl6
09:08 astj joined #perl6
09:14 awwaiid joined #perl6
09:14 parv later people ...
09:16 astj joined #perl6
09:16 xtreak joined #perl6
09:21 MilkmanDan joined #perl6
09:22 cyphase joined #perl6
09:25 andrzejku_ joined #perl6
09:26 nebuchad` joined #perl6
09:27 colomon_ joined #perl6
09:27 cyphase joined #perl6
09:27 Some-body_ joined #perl6
09:27 BuildTheRobots_ joined #perl6
09:28 nadim_ joined #perl6
09:29 cxreg joined #perl6
09:29 yubimusubi joined #perl6
09:29 broquaint joined #perl6
09:30 xtreak joined #perl6
09:30 ranguard joined #perl6
09:30 cono_ joined #perl6
09:30 Juerd_ joined #perl6
09:30 gfldex_ joined #perl6
09:30 smash_ joined #perl6
09:30 [Coke]_ joined #perl6
09:30 ponbiki_ joined #perl6
09:30 sivoais_ joined #perl6
09:30 cyphase joined #perl6
09:31 cog_ joined #perl6
09:31 curan joined #perl6
09:31 cyphase joined #perl6
09:33 Alikzus_ joined #perl6
09:38 awwaiid joined #perl6
09:38 nowan joined #perl6
09:38 cyphase joined #perl6
09:40 zacts joined #perl6
09:41 camelia joined #perl6
09:41 FROGGS joined #perl6
09:42 araujo joined #perl6
09:42 awwaiid joined #perl6
09:42 araujo joined #perl6
09:42 cyphase joined #perl6
09:42 rba_ joined #perl6
09:44 cyphase joined #perl6
09:47 bjz joined #perl6
09:47 awwaiid joined #perl6
09:48 cyphase joined #perl6
09:51 astj joined #perl6
09:53 ribasushi joined #perl6
09:53 awwaiid joined #perl6
09:55 Cabanossi joined #perl6
09:56 llfourn m: say *<foo>:v # why can't I adverb?
09:56 camelia rakudo-moar c72746: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤You can't adverb ␤at <tmp>:1␤------> 3say *<foo>:v7⏏5 # why can't I adverb?␤    expecting any of:␤        pair value␤»
09:58 awwaiid joined #perl6
10:04 awwaiid joined #perl6
10:12 sena_kun joined #perl6
10:12 awwaiid joined #perl6
10:12 sena_kun o/
10:13 sena_kun m: "foo/bar".IO.add("../../").resolve.relative.say;
10:13 camelia rakudo-moar c72746: OUTPUT: «foo/bar/../..␤»
10:13 zakharyas joined #perl6
10:13 sena_kun But https://docs.perl6.org/type/IO::Path#method_add
10:13 sena_kun Is it docs or implementation?
10:16 FROGGS maybe it only resolves stuff that actually exists?
10:16 FROGGS have you tested that?
10:17 sena_kun Nope. Let's try...
10:18 sena_kun Indeed. Fool me! FROGGS, thanks.
10:18 FROGGS :o)
10:18 FROGGS probably means we should put that in the docs...
10:18 awwaiid joined #perl6
10:18 sena_kun Yeah.
10:19 wtw joined #perl6
10:21 FROGGS sena_kun: are you going to do it?
10:21 sena_kun FROGGS, yeah. Though it is assume method, not `add`. And I'll fix indentation too.
10:23 sena_kun Hmmm. Well, it doesn't seem like a problem, much more as a fault of mine. I mean, resolve method says explicity that "This means that the filesystem is examined for each directory in the path". So fixing only indentation then...
10:24 Geth ¦ doc: 5cca681092 | Altai-man++ (committed using GitHub Web editor) | doc/Type/IO/Path.pod6
10:24 Geth ¦ doc: Fix up code sample indentation
10:24 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5cca681092
10:28 Geth ¦ doc: e1c508f314 | Altai-man++ (committed using GitHub Web editor) | doc/Type/IO/Path.pod6
10:28 Geth ¦ doc: More indentation fixing
10:28 Geth ¦ doc: review: https://github.com/perl6/doc/commit/e1c508f314
10:33 |oLa| joined #perl6
10:35 awwaiid joined #perl6
10:36 FROGGS nine: okay, got Inline::Perl5 installed now... had to change the "perl"-binary name to "perl5.24.0" for me... (I'm using perlbrew, and not switching perls actually)
10:38 FROGGS nine: I get a single test failure though when installing Inline::Perl*6*... Can't call method "get_one" on an undefined value at t/use.t line 12.
10:38 FROGGS is that known
10:38 nine No, it isn't.
10:39 neuron joined #perl6
10:39 neuron Hi
10:39 FROGGS k
10:39 neuron I don't seem to be able to file a bug using the rt.cpan.org web interface
10:39 FROGGS hi neuron
10:39 neuron I would like to report issue with NativeCall, where should I send the email to?
10:39 FROGGS you can send an email to rakudobug@perl.org
10:40 neuron So simple :) Thank you
10:40 FROGGS this will go straight into RT
10:43 curan joined #perl6
10:44 FROGGS damn, maybe I'm just missing -Duseshrplib
10:46 awwaiid joined #perl6
10:52 awwaiid joined #perl6
10:57 wamba joined #perl6
10:57 awwaiid joined #perl6
11:06 xtreak joined #perl6
11:07 FROGGS nine: I still get that error after rebuiling that libperl.so :o(
11:07 melezhik How can I delete an element from array?
11:08 sena_kun melezhik, some particular element? .grep maybe.
11:08 FROGGS delete? with grep?
11:08 awwaiid joined #perl6
11:09 xtreak joined #perl6
11:09 sena_kun On some condition, I mean.
11:09 sena_kun It wasn't note what element should be deleted. :/
11:09 nine m: my @a = 1,2,3; @a[1]:delete; dd @a; @a.splice(1, 1); dd @a
11:09 camelia rakudo-moar c72746: OUTPUT: «Array @a = [1, Any, 3]␤Array @a = [1, 3]␤»
11:10 Geth ¦ doc: 6986130f4e | Altai-man++ (committed using GitHub Web editor) | doc/Type/IO.pod6
11:10 Geth ¦ doc: Fix a strange old thinko
11:10 Geth ¦ doc: review: https://github.com/perl6/doc/commit/6986130f4e
11:11 melezhik thanks nine:
11:15 awwaiid joined #perl6
11:18 travis-ci joined #perl6
11:18 travis-ci Doc build errored. Altai-man 'More indentation fixing'
11:18 travis-ci https://travis-ci.org/perl6/doc/builds/247460697 https://github.com/perl6/doc/compare/5cca681092db...e1c508f31454
11:18 travis-ci left #perl6
11:20 lizmat melezhik: does that what you want?  Or maybe you should look at splice
11:20 lizmat ?
11:21 melezhik I guess :delete is fine
11:23 lizmat melezhik: oki  :-)
11:23 yoleaux joined #perl6
11:25 darutoko joined #perl6
11:25 |oLa|1 joined #perl6
11:29 awwaiid joined #perl6
11:33 FROGGS nine: do you have a blog post or something else that describes how I should subclass a Perl 5 class?
11:33 melezhik I wonder how poll described at https://docs.perl6.org/type/Channel#method_poll work?
11:34 ilmari FROGGS: https://github.com/niner/Inline-Perl5#inherit-from-a-perl-5-class
11:34 melezhik I mean at what conditions item is removed from the channel?
11:34 FROGGS uhh, silly me
11:34 FROGGS I even got that page open -.-
11:34 FROGGS thanks ilmari
11:34 nine And I hope it's kinda intuitive anyway :)
11:34 awwaiid joined #perl6
11:35 FROGGS that use.t is still failing (and I was unable to understand whats going on), so I try to continue to do what I wanted initially
11:38 nine FROGGS: could be that the test is victim to the lexical module loading changes in rakudo
11:38 FROGGS nine: can I test that with an older version of rakudo perhaps?
11:39 cog_ joined #perl6
11:40 nine FROGGS: you could try something like my $whatever = $p6->run('use Whatever; Whatever'); my $obj = $whatever->new();
11:42 FROGGS no dice, `$p6->run('use Perl6Test; Perl6Test')` still returns undef
11:42 melezhik given a channel I want want to see all it's items. basicly poll is ok, but I am not clear _which_ item it recieves?
11:46 awwaiid joined #perl6
11:46 travis-ci joined #perl6
11:46 travis-ci Doc build passed. Altai-man 'Fix a strange old thinko'
11:46 travis-ci https://travis-ci.org/perl6/doc/builds/247472851 https://github.com/perl6/doc/compare/e1c508f31454...6986130f4ef2
11:46 travis-ci left #perl6
11:48 sena_kun m: 'one two three' ~~ /(\w+)+ % ' '/
11:48 camelia rakudo-moar c72746: ( no output )
11:48 sena_kun m: say 'one two three' ~~ /(\w+)+ % ' '/
11:48 camelia rakudo-moar c72746: OUTPUT: «「one two three」␤ 0 => 「one」␤ 0 => 「two」␤ 0 => 「three」␤»
11:49 sena_kun Why indexes are zeroed, instead of proper count?
11:50 sena_kun if  'one two three' ~~ /(\w+)+ % ' '/ { say $0[1] }
11:50 sena_kun m: if 'one two three' ~~ /(\w+)+ % ' '/ { say $0[1] }
11:51 camelia rakudo-moar c72746: OUTPUT: «「two」␤»
11:51 sena_kun It still works. Hmm.
11:52 domidumont joined #perl6
11:54 gdonald joined #perl6
11:54 AlexDaniel joined #perl6
11:59 sena_kun joined #perl6
12:10 bpmedley joined #perl6
12:21 ilbot3 joined #perl6
12:22 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!
12:23 melezhik the reason is why I need to know that some process finishes that this is creteria that I can re-run the same programm again safely
12:23 awwaiid joined #perl6
12:23 melezhik timotimo: probably it might be better to understand what I wanted to achieve looking at the implimentation with Promise - https://github.com/melezhik/sparky/blob/master/sparky.pl6
12:23 melezhik which I failed to do with Proc::Q/Channel
12:26 ilbot3 joined #perl6
12:27 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!
12:29 mcmillhj joined #perl6
12:34 awwaiid joined #perl6
12:34 rindolf joined #perl6
12:35 timotimo aha, proc-q doesn't seem to give you a "this program has been started" message at all, eh?
12:35 FROGGS haha lol
12:35 FROGGS nine: it just works!
12:35 FROGGS wth
12:35 melezhik I am aware about possible races
12:35 timotimo so you won't get the "started"
12:35 timotimo er, i mean "running"
12:35 melezhik if I use Proc::Q I have a Channel object which I can't iterrate through to get know which processes finish
12:35 FROGGS I'm doing this now in a Mojolicious controller: standard Perl 5 preamble, then "use Inline::Perl6; use v6-inline;", and after that I write the implementation of my routes in shiny nice Perl 6!
12:35 melezhik at least with Promise I can
12:35 timotimo why do you think you can't iterate through a channel?
12:35 jnthn melezhik: Untested but I'd probably write it something like https://gist.github.com/jnthn/32c3359202ec5c1a869b00e372fc2a75
12:35 jnthn Though does it need to watch for new scripts also?
12:44 melezhik yeah,  I need an endless loop and I need to ensure that https://gist.github.com/jnthn/32c3359202ec5c1a869b00e372fc2a75#file-x-p6-L11 does not if already running
12:44 melezhik for the same project
12:44 jnthn Ah, what I did doesn't handle the new script case
12:44 nine FROGGS: yeah, I've done something like that for a talk or two :)
12:44 FROGGS nine: I love it *g*
12:44 jnthn But anyway, doing it in the react block and with Proc::Async will be far more manageable :)
12:44 jnthn (react essentially gives you an event loop that stays alive so long as there's work)
12:44 melezhik yeah, without this one I would use Proc::Async
12:44 nine FROGGS: http://niner.name/talks/Web%20development%20and%20Perl%206/Web%20development%20and%20Perl%206.pdf
12:44 melezhik I need state where I can read/write information about some external programm with some paramteres are running at the moment to ensure that it does not run two copies of it
12:44 melezhik at the same time
12:44 jnthn Yeah, the "spawn another copy when the last one exits" is what the run-project call is doing
12:44 jnthn In the whenever
12:44 jnthn Basically, whenever the last one exits, spawn another one
12:44 jnthn (Since whenever is an async construct, it isn't actually recursive)
12:47 ilbot3 joined #perl6
12: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!
12:48 melezhik ok, but I am not clear how this ensure not run '/bin/sh', '-c', $cmd if $cmd is already runnning?
12:49 wamba joined #perl6
12:53 melezhik I mean I checked that this work how I expected but can't understand how )))
12:53 mcmillhj joined #perl6
12:53 |oLa| joined #perl6
12:53 jnthn melezhik: Do you understand how `whenever` works? Or is that the piece you're missing? :)
12:53 jnthn Proc::Async.new('/bin/sh', '-c', $cmd).start returns a Promise that is kept when the command exits
12:54 jnthn whenever $some-promise { code } runs code when $some-promise completes
12:54 jnthn So at that point we know that the process has already exeited, so we can start it again
12:54 jnthn Which we do by calling run-project
12:54 jnthn You might think of react as being like an event loop
12:54 jnthn And whenever sets up an event handler
12:55 Cabanossi joined #perl6
12:55 awwaiid joined #perl6
12:59 FROGGS nine: I can't use a P5 module before the line "use v6-inline;", and call methods on that class after said line, right?
13:03 FROGGS I also am not able to use a P5 module after said line, without causing P6M-duplicate-symbol errors...
13:03 melezhik neat! )))
13:03 nine FROGGS: duplicate symbol errors sound troublesome?
13:03 FROGGS yes
13:03 awwaiid joined #perl6
13:03 FROGGS it reports the package name of the controller I am in to be duplicate
13:05 nine That's odd. It should only try to import modules that were loaded by the use statement.
13:09 ilbot3 joined #perl6
13:09 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!
13:12 vendethiel- joined #perl6
13:12 awwaiid joined #perl6
13:16 nadim_ joined #perl6
13:27 perlpilot joined #perl6
13:35 awwaiid joined #perl6
13:42 ilbot3 joined #perl6
13:42 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!
13:44 awwaiid joined #perl6
13:46 skids joined #perl6
13:46 pmurias joined #perl6
13:51 awwaiid joined #perl6
13:51 wamba joined #perl6
13:56 Cabanossi joined #perl6
13:56 ab6tract joined #perl6
13:59 bjz joined #perl6
14:02 * ab6tract has just tried to sneak a talk submission into the YAPC::EU queue past the deadline
14:02 ab6tract the computer didn't say "no", so ... :)
14:02 zakharyas joined #perl6
14:03 cog_ joined #perl6
14:04 sivoais joined #perl6
14:05 awwaiid joined #perl6
14:13 nine FROGGS: if you use JSON::XS:from<Perl5>; you should be able to access it
14:17 ilbot3 joined #perl6
14:17 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!
14:21 nadim_ joined #perl6
14:21 cyphase joined #perl6
14:27 cyphase joined #perl6
14:27 awwaiid joined #perl6
14:30 FROGGS nine: that's would be the point where I get that P6M duplicate symbol issue
14:30 |oLa| joined #perl6
14:33 melezhik jnthn: looks good for me. last thing I need to run add-dirs at the very of the begining when there are not events to trigger
14:33 melezhik how can I do this?
14:33 melezhik I mean the very beginning of  the script ...
14:33 jnthn melezhik: I did that in the last update of the gist. Just call it at the end of the react block, once everything is set up :)
14:33 melezhik https://gist.github.com/jnthn/32c3359202ec5c1a869b00e372fc2a75#file-x-p6-L29 ? )))
14:33 jnthn yes, that
14:33 jnthn Note that whenever is just setting up the handler for when there are notifications
14:33 jnthn It doesn't block execution
14:37 dogbert2 moritz: is irclog.perlgeek down atm?
14:38 wamba joined #perl6
14:38 mr_ron joined #perl6
14:41 Cabanossi joined #perl6
14:42 seatek joined #perl6
14:42 awwaiid joined #perl6
14:43 lizmat moritz: seems down for me as well
14:52 ilbot3 joined #perl6
14:52 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!
14:53 melezhik good. could you please point me docs on how to set up signals in Perl6 ?
14:54 jnthn https://docs.perl6.org/routine/signal#class_Supply
14:54 jnthn It also returns a Supply
14:54 lizmat signal(SIGINT).tap( { say "Thank you for your attention"; exit 0 } );   # melezhik
14:54 jnthn so whenever signal(SIGINT) { ... }
14:55 jnthn You can probably set some boolean flag $killed = True or so and then in the whenever earlier do `run-project($dir, $project) unless $killed`
14:55 jnthn Then it just won't spawn another one of them
15:03 moritz dogbert2, lizmat: the server swapped; i've restarted the webserver, should be back up now
15:03 lizmat not just yet for me
15:04 moritz :(
15:08 moritz it all seems kinda slow, and consumes a lot of memory
15:08 moritz have to investigate after $dayjob
15:09 melezhik Thanks a lot for help jnthn: and lizmat: will try to add signal handler later, so far all is good )))
15:16 melezhik have commited changes to sparky repo
15:20 cyphase joined #perl6
15:20 cyphase joined #perl6
15:22 ilbot3 joined #perl6
15:22 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!
15:24 ufobat there is often a our $VERSION in perl5 modules. is this still idiomatic/a good way to go in perl6
15:25 timotimo i think the version is meant to be part of the meta info and such?
15:39 ufobat but that means the module itself does not know about its version, just e.g. zef does?
15:39 timotimo i'm convinced there ought to be a way to get the full meta info from whatever installation your script was grabbed from
15:39 timotimo but i don't know what or how
15:46 ilbot3 joined #perl6
15:46 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!
15:51 domidumont joined #perl6
15:51 awwaiid joined #perl6
15:51 cdg joined #perl6
15:55 ilbot3 joined #perl6
15:55 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!
15:59 Cabanossi joined #perl6
16:00 wamba joined #perl6
16:06 |oLa| joined #perl6
16:06 awwaiid joined #perl6
16:06 [Coke] is there a way to tell if a test file is being run via prove with other files vs. standalone? (might be nice to adding some threading to a slow test file if it's not being run with other files)
16:14 ilbot3 joined #perl6
16:14 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!
16:15 moritz joined #perl6
16:19 mxco86 joined #perl6
16:20 awwaiid joined #perl6
16:21 zapwai joined #perl6
16:29 [Coke] golfed: say "LINE: " ~ $++ for run($*EXECUTABLE-NAME, '--doc', "doc/Type/IO/CatHandle.pod6", :out).out.lines; # prints up through 243 and then dies with Malformed UTF-8 - Zoffix, is there actually malformed UTF-8 in there, or is this a result of the .lines? (or passing through perl6 -doc?) (or the run?)
16:31 [Coke] looking at line 243 of the output of perl6 --doc on that file, there's nothing obviously malformed. Looks like straight ASCII
16:32 Geth ¦ doc: c6e8d0809c | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Iterator.pod6
16:32 Geth ¦ doc: Add IterationEnd to search index
16:32 Geth ¦ doc: review: https://github.com/perl6/doc/commit/c6e8d0809c
16:33 mr_ron r: https://gist.github.com/ronaldxs/97c0118cffe486f604c74fd686c113f8
16:33 camelia rakudo-jvm 36823a: OUTPUT: «===SORRY!===␤Could not find Bench at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-j-inst-1/share/perl6/site␤    /home/camelia/rakudo-j-inst-1/share/perl6/vendor␤    /home/camelia/rakudo-j-inst-1/share/perl6␤    CompUnit::Reposi…»
16:33 camelia ..rakudo-moar 36823a: OUTPUT: «===SORRY!===␤Could not find Bench at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-2/share/perl6␤    CompUnit::Repos…»
16:33 mr_ron star: https://gist.github.com/ronaldxs/97c0118cffe486f604c74fd686c113f8
16:33 camelia star-m 2016.10: OUTPUT: «===SORRY!===␤Could not find Bench at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/star-2016.10/share/perl6/site␤    /home/camelia/star-2016.10/share/perl6/vendor␤    /home/camelia/star-2016.10/share/perl6␤    CompUnit::Repository::Absolu…»
16:35 mr_ron Any way to run my gist with Bench?  Perhaps Bench would be a good idea for R* anyway?
16:36 awwaiid joined #perl6
16:36 [Coke] for now, I'd recommend installing it locally.
16:37 [Coke] (doc bad utf8) - .slurp.perl.say - works. .lines.perl.say - dies with utf8 error
16:37 mr_ron I can run the script on my system, but I was hoping to demo here.
16:39 [Coke] zoffiz: Pod formatting code X missing endtag '>' (on the Iterator edit you just made)
16:39 [Coke] *zoffix
16:44 itaipu joined #perl6
16:45 xzhao_ joined #perl6
16:46 xzhao__ joined #perl6
16:46 awwaiid joined #perl6
16:55 Cabanossi joined #perl6
16:57 DeadDelta joined #perl6
16:57 DeadDelta [Coke]: the end tag is present when I look at github commit: https://github.com/perl6/doc/commit/c6e8d0809c
16:58 Geth ¦ doc: 4c00a55a7d | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Iterator.pod6
16:58 Geth ¦ doc: Fix index tag
16:58 Geth ¦ doc: review: https://github.com/perl6/doc/commit/4c00a55a7d
16:58 DeadDelta Looking at /glossary code, looks like the pipe should be before the term instead of after
16:59 [Coke] DeadDelta++
16:59 DeadDelta [Coke]: for CatHandle, this doesn't die, so I assume it's the --doc stuff or something:  perl6 -e '"doc/doc/Type/IO/CatHandle.pod6".IO.slurp.say'
16:59 pilne joined #perl6
17:00 [Coke] slurp works on the --doc output also
17:00 [Coke] just not lines
17:00 itaipu joined #perl6
17:00 xzhao_ joined #perl6
17:00 DeadDelta hm. perl6 -e '"doc/doc/Type/IO/CatHandle.pod6".IO.lines.put' works
17:01 [Coke] doc/doc
17:01 [Coke] I haven't been able to golf it smaller than "run, perl6 --doc, .lines"
17:02 DeadDelta doc/doc is because the clone is in doc/
17:03 DeadDelta I have no problems with perl6 -e 'run(<perl6 --doc doc/doc/Type/IO/CatHandle.pod6>, :out).out.lines.put'
17:03 DeadDelta That's on 2017.05-389-g326faed. So it might be the proc rework at fault
17:04 * DeadDelta &
17:04 DeadDelta left #perl6
17:07 TEttinger joined #perl6
17:07 mr_ron m: https://gist.github.com/ronaldxs/97c0118cffe486f604c74fd686c113f8
17:07 camelia rakudo-moar 36823a: OUTPUT: «5===SORRY!5=== Error while compiling /home/camelia/site#sources/FC133D3E7EC3B0CBE238C296893894C9AB745A05 (Inline::Perl5)␤An exception occurred while evaluating a constant␤at /home/camelia/site#sources/FC133D3E7EC3B0CBE238C296893894C9AB745A05 (Inl…»
17:14 awwaiid joined #perl6
17:21 kaare__ joined #perl6
17:23 timotimo mr_ron: may also want to test the shortcut += vs the full $r = $r + ...
17:25 mr_ron timotimo: Did you run it?
17:25 timotimo i don't have inline::perl5
17:25 timotimo i did run the code in one of the examples
17:25 nadim_ Hello P6!, I saw the word "QuqntHash" twice this week, once in the weekly changes and once when I merged the latest rakudo (512 commit since last, good work), I checked what it is at docs.perl6, it says it's a role, mhhh OK, but then little examples. are there some example of usage?
17:25 timotimo on my machine the "int" version is noticably slower, probably doing a bunch of boxing somewhere
17:25 sjoshi joined #perl6
17:26 lizmat nadim_: QuantHash is the generic term for Set,SetHash,Bag,BagHash,Mix,MixHash
17:26 nadim_ lizmat++
17:26 timotimo interesting, += is faster than the full form
17:26 timotimo i did not expect that
17:27 lizmat timotimo: since when ???
17:27 timotimo no clue
17:28 timotimo the whateverable bots have netsplit out and haven't come back
17:28 zakharyas joined #perl6
17:28 mr_ron timotimo: The point of the exercise was that perl6 int arithmatic is about 10* slower than perl5 which would be understandable since p6 provides unlimited precision but limiting p6 precision with native int only seems to make it worse.
17:28 timotimo half a day ago
17:28 timotimo mr_ron: yeah, i expect we're losing a bunch of time from boxing and unboxing at some position
17:28 timotimo have you tried with the last few releases?
17:28 timotimo i seem to recall there was some kind of regression or something?
17:29 timotimo memory's hazy
17:29 lizmat m: my $a = 42; for ^10000000 { $a += 1 }; say now - INIT now
17:29 camelia rakudo-moar 36823a: OUTPUT: «4.807176␤»
17:29 cog_ joined #perl6
17:29 lizmat m: my $a = 42; for ^10000000 { $a = $a + 1 }; say now - INIT now
17:29 camelia rakudo-moar 36823a: OUTPUT: «3.8667810␤»
17:29 timotimo now compare with int instead of Int
17:29 lizmat m: my int $a = 42; for ^10000000 { $a = $a + 1 }; say now - INIT now
17:29 camelia rakudo-moar 36823a: OUTPUT: «7.3726763␤»
17:30 lizmat m: my int $a = 42; for ^10000000 { $a += 1 }; say now - INIT now
17:30 camelia rakudo-moar 36823a: OUTPUT: «4.35697416␤»
17:30 timotimo fascinating
17:30 lizmat wow, even faster than the Int version
17:30 kurahaupo joined #perl6
17:30 mr_ron m: my Int $a = 42; for ^10000000 { $a += 1 }; say now - INIT now
17:31 lizmat m: use nqp; my int $a = 42; for ^10000000 { $a = nqp::add_i($a,1) }; say now - INIT now
17:31 camelia rakudo-moar 36823a: OUTPUT: «4.7593613␤»
17:31 camelia rakudo-moar 36823a: OUTPUT: «1.9248574␤»
17:31 timotimo except camelia's host may be busy or something
17:31 lizmat m: use nqp; my int $a = 42; for ^10000000 { $a = nqp::add_i($a,1) }; say now - INIT now
17:31 camelia rakudo-moar 36823a: OUTPUT: «2.003535␤»
17:31 lizmat using nqp::ops on native ints still more than 2x as fast
17:32 mr_ron Is it a reasonable goal for p6 with native int to approach p5 performance?
17:32 mr_ron Should it be significantly faster than Any/Int anyway?
17:33 timotimo we ought to be able to get faster than p5
17:33 mr_ron Should I look into filing a PERF ticket?
17:34 timotimo the int and += one spends 3.7% of its time in box_int, whereas it should be more like 0%
17:35 ilmari m: my int $a = 42; for ^10000000 { $a++ }; say now - INIT now
17:35 |oLa| joined #perl6
17:35 camelia rakudo-moar 36823a: OUTPUT: «1.91576415␤»
17:35 timotimo m: my int $a = 42; $a = $a + 1 for ^10_000_000; say now - INIT now
17:35 camelia rakudo-moar 36823a: OUTPUT: «7.59916169␤»
17:36 timotimo interesting, that's equivalently slow to the prefix-for
17:36 timotimo anyway, that code also spends a whole lot of time in invoking and returning from frames
17:36 mr_ron m: my $a = 42; for ^10000000 { $a++ }; say now - INIT now
17:36 camelia rakudo-moar 36823a: OUTPUT: «2.3997292␤»
17:38 timotimo the spesh redesign document says we could probably inline closures that were taken immediately before they get called; that'd benefit that benchmark
17:40 timotimo we're getting $_ passed in and are boxing every single value for that for loop, even though we don't use $_ even once
17:40 Cabanossi joined #perl6
17:41 timotimo about 30% more time is spent if the $_ is unspecified vs when i specify it as being "int"
17:43 timotimo also, the + inside the loop isn't getting inlined, which is certainly odd
17:43 mr_ron m: {my $a = 42; for ^10000000 { $a++ }; say now - ENTER now}; { my int $a = 42; for ^10000000 { $a++ }; say now - ENTER now}
17:43 camelia rakudo-moar 36823a: OUTPUT: «2.34404888␤1.8906015␤»
17:44 mr_ron m: {my $a = 42; for ^10000000 { $a += 2 }; say now - ENTER now}; { my int $a = 42; for ^10000000 { $a += 2 }; say now - ENTER now}
17:45 camelia rakudo-moar 36823a: OUTPUT: «4.812863␤3.084417␤»
17:46 timotimo if you $a++; $a++; you get almost no time increase over just $a++
17:46 mr_ron m: {my $a = 42; for ^10000000 { $a += 1 + $a %3 }; say now - ENTER now}; { my int $a = 42; for ^10000000 { $a += 1 + $a %3 }; say now - ENTER now}
17:47 camelia rakudo-moar 36823a: OUTPUT: «8.119853␤10.5393037␤»
17:47 timotimo indeed, apart from having a bindlex immediately followed by a getlex in there, the $a++; $a++ is rather good performance-wise
17:49 timotimo but the loop itself is still calling the loop body over and over and it's still passing the $_ argument and not using it
17:55 timotimo m: say "{13130020819 / 10000000} cycles per loop entry"
17:55 camelia rakudo-moar 36823a: OUTPUT: «1313.0020819 cycles per loop entry␤»
17:56 timotimo we could do a lot better
17:58 setty1 joined #perl6
17:59 mr_ron I would currently be looking to document with a PERF ticket on
17:59 mr_ron "native int" vs INT/Any
17:59 mr_ron but am open to other suggestions
18:00 mr_ron s/INT/Int/
18:01 lizmat m: for ^1000000 -> { }   # huh?  couldn't we optimize for that in the mean time ?
18:01 camelia rakudo-moar 36823a: OUTPUT: «Too many positionals passed; expected 0 arguments but got 1␤  in block <unit> at <tmp> line 1␤␤»
18:02 lizmat timotimo: ^^^
18:05 timotimo i guess we could
18:08 xzhao joined #perl6
18:12 DeadDelta joined #perl6
18:12 DeadDelta timotimo: the += version has been slower than $x = $x + foo for as long as I remember; even in my upcoming article I mention it. It gets wrapped as a meta operator.
18:12 timotimo but the optimizer has a thing for metaop assign
18:12 DeadDelta Does it?
18:12 DeadDelta OK
18:13 DeadDelta As for "regression". It's the outcome of the fix for the native candidate dispatch
18:13 DeadDelta m: my int $a = 42; for ^10000000 { $a = $a + 1 }; say now - INIT now
18:13 timotimo yeah, the METAOP_ASSIGN is flattened out manually by the optimizer
18:13 camelia rakudo-moar 36823a: OUTPUT: «7.6750003␤»
18:13 DeadDelta ^ that code doesn't go through native candidate. It boxes the native int each time and goes through Int candidate
18:13 DeadDelta m: my int $a = 42; for ^10000000 { $a = $a + my int $ = 1 }; say now - INIT now
18:13 camelia rakudo-moar 36823a: OUTPUT: «2.1363054␤»
18:13 DeadDelta You have to have both natives to go through native candidate
18:13 timotimo but 1 can be either native or non-native?
18:14 DeadDelta Yup
18:14 timotimo i mean we have a Want for that specific reason?
18:14 timotimo i'm clearly confused
18:14 DeadDelta I dunno. jnthn++ can clarify, but that's my (and I believe pmurias++'s too) understanding that the current behaviour is how it's supposed to work
18:15 timotimo that's fair
18:15 DeadDelta In that we don't nativize non-natives in multi dispatch.
18:15 DeadDelta huggable: native
18:15 huggable DeadDelta, here's a ticket: https://rt.perl.org/Ticket/Display.html?id=129844#txn-1433016 and here's explanation why it isn't: https://irclog.perlgeek.de/perl6-dev/2016-10-25#i_13462673
18:16 DeadDelta Yeah, the rules I wrote out had the "convert to native if size fits", but the rules are wrong.
18:16 timotimo hm, okay
18:18 timotimo when using the "my int $ = 1" trick the + operator does get inlined
18:19 mr_ron m: {my $a = 42; for ^10000000 { $a += 1 + $a%3 }; say now - ENTER now}; { my int ($a, $one, $three) = (42, 1, 3); for ^10000000 { $a += $one + $a%$three }; say now - ENTER now}
18:19 camelia rakudo-moar 36823a: OUTPUT: «8.18530108␤2.74818107␤»
18:21 DeadDelta This kinda gives more merit to the idea that was proposed of having to-native syntax or coersers; something shorter and easier to use than (my int $ = foo)
18:23 kaare__ joined #perl6
18:24 greppable6 joined #perl6
18:24 committable6 joined #perl6
18:24 evalable6 joined #perl6
18:24 unicodable6 joined #perl6
18:24 bisectable6 joined #perl6
18:24 benchable6 joined #perl6
18:24 quotable6 joined #perl6
18:24 bloatable6 joined #perl6
18:24 statisfiable6 joined #perl6
18:24 hythm Zamelk is 2 , the other team is 0 ;)
18:24 DeadDelta ?
18:24 hythm Sorry, Wrong channel.
18:25 DeadDelta heh
18:28 kaare__ joined #perl6
18:28 |oLa| joined #perl6
18:31 DeadDelta Yeah, from user perspective this kinda sucks. If all the arguments have a native Want, it isn't really wrong to expect native candidates to be called. Reading the explanation here https://irclog.perlgeek.de/perl6-dev/2016-10-25#i_13462673 I wouldn't want the big int to match, only when we have a Want that's native
18:33 DeadDelta And at least the optimizer could see we're calling native + want that has a native + there's a candidate that can accept two natives and then just rewrite it to be all-native
18:33 * DeadDelta puts it onto "when my skill level get there, try to do so" shelf and moves on
18:39 itaipu joined #perl6
18:40 DeadDelta qast: ▸Op: :op<say>, ▸Op(:op<add_i>, ▸Want(▸IVal(:value(72)), 'iI', ▸IVal(:value(42))), ▸IVal(:value(10)) )
18:40 DeadDelta Ah, no bot :)
18:40 Cabanossi joined #perl6
18:40 DeadDelta Gives 52
18:44 andrzejku joined #perl6
18:44 El_Che so, many perl6 talk in amsterdam soon?
18:44 El_Che someone here presenting
18:45 El_Che ?
18:45 DeadDelta timotimo: what do you mean flattened? The only thing I see between perl6 --target=optimize -e '42 += 55' and perl6 --target=ast -e '42 += 55' is the optimizer making the QAST::Op(call &METAOP_ASSIGN) to QAST::Op(callstatic &METAOP_ASSIGN)
18:45 DeadDelta I forget what callstatic is about. Is that the flattening bit?
18:46 DeadDelta m: use nqp; my int $i = 0; nqp::while($i > 1000_000, $i += 2); say now - INIT now
18:46 camelia rakudo-moar 36823a: OUTPUT: «0.0011683␤»
18:47 DeadDelta benchable6: m: use nqp; my int $i = 0; nqp::while($i < 1_000_000, $i += 2); say now - INIT now
18:47 benchable6 DeadDelta, ¦m:: «Cannot find this revision (did you mean “all”?)»
18:47 DeadDelta yes, I did. Now, get on with it
18:47 DeadDelta benchable6: all use nqp; my int $i = 0; nqp::while($i < 1_000_000, $i += 2); say now - INIT now
18:47 benchable6 DeadDelta, starting to benchmark the 42 given commits
18:48 DeadDelta oh damn, the native thing
18:49 benchable6 DeadDelta, benchmarked the given commits, now zooming in on performance differences
18:49 DeadDelta Abort the mission. I have a new code for you to bench.
18:50 DeadDelta Stupid robot
18:51 st_elmo joined #perl6
18:51 benchable6 DeadDelta, https://gist.github.com/90f33f9ae4cf36633599da0659cb51b2
18:52 Ven joined #perl6
18:53 DeadDelta benchable6: releases use nqp; my int $i = 0; my int $two = 2; my int $lim = 1_000_000; nqp::while($i < $lim, $i += $two); say now - INIT now ||| use nqp; my int $i = 0; my int $two = 2; my int $lim = 1_000_000; nqp::while($i < $lim, $i = $i + $two); say now - INIT now
18:53 benchable6 DeadDelta, starting to benchmark the 20 given commits
18:53 benchable6 DeadDelta, benchmarked the given commits, now zooming in on performance differences
18:57 DeadDelta zoom faster, dammit
19:08 mr_ron m: {my $a = 42; for ^10000000 { $a += 1 + $a%3 }; say now - ENTER now}; { my int ($a, $one, $three) = (42, 1, 3); for ^10000000 { $a += $one + $a%$three }; say now - ENTER now}; { my int ($a, $one, $three, $limit) = (42, 1, 3, 10000000); loop (my int $i = 0; $i < $limit; $i += $one) { $a += $one + $a%$three }; say now - ENTER now}
19:09 camelia rakudo-moar 36823a: OUTPUT: «9.6187681␤2.8602481␤3.7480661␤»
19:11 mr_ron m: {my $a = 42; for ^10000000 { $a += 1 + $a%3 }; say now - ENTER now}; { my int ($a, $one, $three) = (42, 1, 3); for ^10000000 { $a += $one + $a%$three }; say now - ENTER now}; { my int ($a, $one, $three, $limit) = (42, 1, 3, 10000000); loop (my int $i = 0; $i < $limit; $i++) { $a += $one + $a%$three }; say now - ENTER now}
19:12 camelia rakudo-moar 36823a: OUTPUT: «8.39889307␤2.7175026␤0.8140489␤»
19:12 AlexDaniel joined #perl6
19:14 DeadDelta mr_ron: dunno if you were around for the discussion, but what you're observing is expected with the native dispatch bug fix that happened sometime in 2017.05-2017.06 commits
19:14 DeadDelta benchable6: so wtf? Where's the zooming?
19:14 benchable6 DeadDelta, ¦so: «Cannot find this revision (did you mean “all”?)»
19:15 DeadDelta ...
19:15 DeadDelta benchable6: releases use nqp; my int $i = 0; my int $two = 2; my int $lim = 1_000_000; nqp::while($i < $lim, $i += $two); say now - INIT now ||| use nqp; my int $i = 0; my int $two = 2; my int $lim = 1_000_000; nqp::while($i < $lim, $i = $i + $two); say now - INIT now
19:15 benchable6 DeadDelta, starting to benchmark the 20 given commits
19:15 benchable6 DeadDelta, benchmarked the given commits, now zooming in on performance differences
19:18 * AlexDaniel slaps benchable6
19:19 AlexDaniel “Cannot coerce NaN to an Int”
19:19 DeadDelta Well, running that code for all releases with committable, looks like the $i = $i + $two version was always like two orders of magnitude faster than $i += $two: https://gist.github.com/Whateverable/c62f205a69d3a98ccd7147f783452de9 https://gist.github.com/Whateverable/b8bd4dd4620c63410567aa6ee9dfb90a
19:19 DeadDelta So the unrolling timotimo mentioned needs to have a look at it
19:20 pmurias joined #perl6
19:21 pmurias DeadDelta: what positive thing does fueling Perl 5/Perl 6 hostility get us?
19:21 AlexDaniel DeadDelta: fwiw https://github.com/perl6/whateverable/issues/176
19:21 AlexDaniel MasterDuke: benchable6 clearly needs some love :)
19:21 DeadDelta pmurias: we crush them and move on with One True Perl.
19:22 cyphase joined #perl6
19:23 lizmat DeadDelta: for crushing, you need mass
19:23 mr_ron Being more careful with natives I got p6 to run faster than p5: https://gist.github.com/ronaldxs/74b7450aeccb48985fdede871f53d364
19:23 lizmat or a very high velocity  :-)
19:23 DeadDelta mr_ron++ awesome
19:23 AlexDaniel .oO( eat more and run faster )
19:24 DeadDelta lizmat: yeah, well, I don't feel like sitting silent while Perl 5 folks are having a day mocking Perl 6 does us any good either.
19:24 El_Che mr_ron: run the perl5 version with a foreach instead of the C loop
19:25 lizmat and where is that mocking taking place ?
19:25 khw joined #perl6
19:26 DeadDelta lizmat: I'm guessing pmurias was referring to my comments on this reddit post that has an image of a warrior named "Perl6six Isnotperl" with adjacent commentery about how it was very hard to get that character name, but it was well worth it: https://www.reddit.com/r/perl/comments/6jpkhj/i_play_everquest_on_the_project_1999_server_that/
19:26 mr_ron El_Che: I tried with "for (1..10000000) {" and got similar results.  Why did you ask?
19:26 cyphase joined #perl6
19:27 lizmat ah, the colourful one
19:27 El_Che mr_ron: I have seen foreach outperform the C loop
19:27 lizmat what can I say, ignore him
19:27 cyphase joined #perl6
19:27 DeadDelta :)
19:28 cyphase joined #perl6
19:30 El_Che mr_ron: on my machine, the foreach loop is faster
19:30 cyphase joined #perl6
19:31 DeadDelta m: dd max ()
19:31 camelia rakudo-moar 7ec136: OUTPUT: «-Inf␤»
19:31 lizmat DeadDelta: I *will* mention it in the next P6W though
19:31 lizmat m: dd min()
19:32 camelia rakudo-moar 7ec136: OUTPUT: «Inf␤»
19:32 DeadDelta m: dd max (Int)
19:32 camelia rakudo-moar 7ec136: OUTPUT: «-Inf␤»
19:32 El_Che mr_ron: and both are way faster than the perl6 example
19:32 zakharyas joined #perl6
19:32 ggoebel joined #perl6
19:32 DeadDelta AlexDaniel: a hunch would be some math with max/min is what gives a NaN
19:33 DeadDelta lizmat: and ask for more mass... for crushing :P
19:36 mr_ron El_Che: I have p6 faster than p5.10 and about the same as 5.18 but 40% slower than 5.26
19:38 El_Che this is on a mac with 5.18 and rakudo start 2017.01
19:38 El_Che I'll try later on my linux laptop
19:38 DeadDelta Time to upgrade :)
19:38 El_Che (I don't completely get the star versions, but it's the latest I could find)
19:38 El_Che (I'll compile it locally)
19:39 El_Che (but I have wasted more than enough time to make osx workable for me : ) )
19:39 DeadDelta Though that code doesn't look like something happened much
19:39 DeadDelta Star version follow the Rakudo versions they're based on, except they get released like thrice as fewer than monthly rakudo releases
19:40 DeadDelta huggable: star
19:40 huggable DeadDelta, Estimated Rakudo Star releases for 2017: .01, .04, .07 & .10
19:40 DeadDelta So latest is 2017.04 and next will be next month
19:40 * DeadDelta &
19:40 DeadDelta left #perl6
19:41 bjz joined #perl6
19:41 El_Che I follow the rakudo release closedly for my linux packages. But got a mac at work (in addition to my main laptop) so I was curious what was needed to write perl6, 5 and go
19:44 El_Che mr_ron: with the extremely anti-scientific method of running the loop once, I get perl-foreach < perl6 < perl5 when I went to 100000000 (x10)
19:44 El_Che so it looks good indeed
19:45 El_Che on the second run the perl6 is the fastest (0.059s faster than the foreach) so I'll stop running it
19:45 setty1 joined #perl6
19:45 El_Che success
19:45 El_Che :)
19:47 MilkmanDan joined #perl6
19:50 moritz PSA: I had to disable irclog.perlgeek.de
19:51 moritz the web application process used too much memory, and brought down the whole server
19:51 moritz it's still logging in the background
19:51 cyphase joined #perl6
19:53 lizmat moritz: so what caused it to explode like that?  Or did it just go across some threshold ?
19:53 perlpilot clearly it needs a rewrite in P6 ;-)
19:53 moritz lizmat: I updated the OS from Debian Jessie to Stretch
19:54 moritz perlpilot: patches welcome :-)
19:54 perlpilot first someone needs to provide me a patch for some extra time and/or more brain power.  :)
19:54 perlpilot and maybe update my brain so that it doesn't require as much sleep
19:59 andrzejku hi
19:59 andrzejku do someone want to make money with perl?
19:59 andrzejku my friend aksed me as he have an offer
20:00 rindolf andrzejku: hi, I do
20:00 andrzejku rindolf  okay
20:00 rindolf andrewalker: perl 6?
20:00 andrzejku can we speak here?
20:00 rindolf andrzejku: in private will probably be better
20:01 andrzejku okay
20:01 perlpilot though if it really is a Perl 6 job, it would be interesting to here the outcome  :)
20:01 perlpilot s/here/hear/
20:06 espadrine joined #perl6
20:09 prodotiscus joined #perl6
20:14 khw joined #perl6
20:19 samcv u: left corner bracket
20:19 unicodable6 samcv, U+23A3 LEFT SQUARE BRACKET LOWER CORNER [Sm] (⎣)
20:19 unicodable6 samcv, U+23A1 LEFT SQUARE BRACKET UPPER CORNER [Sm] (⎡)
20:19 unicodable6 samcv, 9 characters in total: https://gist.github.com/883a1d8bf709933658670c24251e89c1
20:29 sftp joined #perl6
20:40 amkhlv joined #perl6
20:40 amkhlv m: "Hi Andrei".say
20:40 camelia rakudo-moar 2ce5b6: OUTPUT: «Hi Andrei␤»
20:41 amkhlv perl6 -e 'for "/tmp/utf-error.txt".IO.lines { say "hi"  } '
20:42 amkhlv gives :   Malformed UTF-8
20:42 amkhlv in block <unit> at -e line 1
20:42 amkhlv where /tmp/utf-error.txt   contains the word   Birkhäuser
20:42 amkhlv in ISO-8859
20:45 jnthn Use "/tmp/utf-error.txt".IO.lines(:enc<ISO-8859-1>)
20:45 kyan joined #perl6
20:46 amkhlv Yes, this works. But extremely inconvenient. I have thousands of files all in different encodings.
20:46 lizmat .oO( encoding is a bitch)
20:47 amkhlv is it possible to process file in binary format? Will regex match on binary file?
20:48 jnthn No, but ISO-8859-1 will never give a decoding error, so if you care little enough about matching stuff outside of the ASCII range then that'll work :)
20:49 jnthn Don't think there's a module for doing encoding guessing yet
20:49 cog_ joined #perl6
20:49 * jnthn afk
20:51 amkhlv Why  ISO-8859-1 will never give a decoding error  ?
20:55 geekosaur because all bytes are valid. they may not be *meaningful* in a given context, but unlike utf8 there are no invalid byte sequences
20:56 DeadDelta joined #perl6
20:56 amkhlv Very interesting, geekosaur, I did not know that ! Thank you
20:57 geekosaur (the utf8 invalid sequences represent multibyte sequences that can't happen, for example the reserved utf16 surrogate codepoints or codepoints outside 00000-10ffff)
21:00 awwaiid joined #perl6
21:02 zengargoyle m: say DateTime.new(1498597328)
21:02 camelia rakudo-moar 2ce5b6: OUTPUT: «2017-06-27T21:02:08Z␤»
21:05 zengargoyle hrm... sub MAIN ( Int $now ) { ... } still keeps a numeric arg as IntStr...
21:05 awwaiid joined #perl6
21:06 timotimo of course
21:07 timotimo IntStr is Int, so it matches and thus that is what you get
21:07 timotimo m: say (<100> + 0).perl
21:07 camelia rakudo-moar 2ce5b6: OUTPUT: «100␤»
21:07 timotimo m: say (+<100>).perl
21:07 camelia rakudo-moar 2ce5b6: OUTPUT: «100␤»
21:07 timotimo m: say (+<100>).^name
21:07 camelia rakudo-moar 2ce5b6: OUTPUT: «Int␤»
21:07 timotimo m: say (<100>).^name
21:07 camelia rakudo-moar 2ce5b6: OUTPUT: «IntStr␤»
21:10 zengargoyle that $now doesn't pass into DateTime that also asks for an Int. :(
21:11 zengargoyle have to to $now.Int
21:17 DeadDelta m: say DateTime.new(<1498597328>)
21:17 camelia rakudo-moar 2ce5b6: OUTPUT: «Invalid DateTime string '1498597328'; use an ISO 8601 timestamp (yyyy-mm-ddThh:mm:ssZ or yyyy-mm-ddThh:mm:ss+01:00) instead␤  in block <unit> at <tmp> line 1␤␤»
21:17 * zengargoyle not sure i like multi method new(Int:D $posix,  :$timezone=0, :&formatter) from DateTime and sub MAIN(Int $now) behaving differently....
21:17 DeadDelta Ah haha
21:17 DeadDelta Right, 'cause the Str candidate wins over
21:17 zengargoyle ah
21:17 DeadDelta zengargoyle: well, just coerce it to int. sub MAIN (Int() $now) {} will probably work
21:18 DeadDelta Oh, it won't coerce, 'cause it already an Int
21:18 timotimo yeah
21:19 DeadDelta +$now when using it then
21:20 zengargoyle is there any major difference between + and .Int?
21:20 DeadDelta Not in this case
21:21 DeadDelta &prefix:<+> -> .Numeric -> .Int
21:21 DeadDelta Just shorter to type
21:21 zengargoyle yeah... :)
21:22 DeadDelta And .Int is just nqp::add_I(self, 0, Int)
21:22 DeadDelta that forces it to numeric only
21:22 timotimo right, it also gets rid of any roles you may have mixed in
21:32 [Coke] ff
21:32 [Coke] ww
21:33 DeadDelta buggable: drwa
21:33 DeadDelta buggable: draw
21:33 buggable DeadDelta, The next Accidental /win Lottery draw will happen in 3 days, 2 hours, 26 minutes, and 56 seconds. Currently have 1 ballots submitted by 1 users!
21:33 timotimo not as popular as it used to be
21:33 * DeadDelta is very happy with a new upgrade to perl6.party's markdown pre-processor
21:34 DeadDelta ``Iterator|'s`` gets converted to [`Iterator`'s](https://docs.perl6.org/type/Iterator). ``.pull-one`` -> [`.pull-one`](https://docs.perl6.org/routine/pull-one)
21:35 DeadDelta Gonna link the hell out of articles now :)
21:36 DeadDelta Would be cool to have an end point that displayed search results on docs site. Like https://docs.perl6.org/search/meow would show all results for "meow"
21:36 [Coke] DeadDelta: on my todo list, fwiw.
21:37 DeadDelta [Coke]++
21:37 [Coke] ... I mean, it's been a year, but I'll get to it eventually. :)
21:37 DeadDelta :D
21:37 [Coke] the whole thing is just so (&#$ slow. :|
21:38 [Coke] gets frustrating to try to hack on stuff when the build takes a half hour.
21:40 DeadDelta Making it faster sounds like a fun project.
21:40 DeadDelta Polish all that nasty code in htmlify.p6. Make it pretty and maintainable.
21:40 DeadDelta And fastah
21:41 DeadDelta left #perl6
21:44 MasterDuke DeadDelta: fwiw, benchable's 'compare' option was originally intended to only be used with one commit (i.e., not 'releases', 'all', etc). not sure the output would make sense otherwise (might be the reason why it died)
21:45 MasterDuke but it does need to be made a little smarter/more robust
21:51 DeadDelta joined #perl6
21:52 DeadDelta left #perl6
21:52 DeadDelta joined #perl6
21:59 DeadDelta MasterDuke: it told me to if meant to use "all" so I did.
22:00 DeadDelta benchable6: m: 42
22:00 benchable6 DeadDelta, ¦m:: «Cannot find this revision (did you mean “all”?)»
22:00 MasterDuke hm, i think that's a generic whateverable feature, will try to fix for benchable
22:01 timotimo good idea %)
22:03 ttkp6 joined #perl6
22:03 FROGGS joined #perl6
22:05 MasterDuke can probably add support for multiple commits with compare, it just won't do the bisecting
22:05 cpage_ joined #perl6
22:05 cyphase joined #perl6
22:06 cyphase joined #perl6
22:10 cyphase joined #perl6
22:13 cyphase joined #perl6
22:15 awwaiid joined #perl6
22:20 cyphase joined #perl6
22:24 Voldenet joined #perl6
22:24 Voldenet joined #perl6
22:24 cyphase joined #perl6
22:34 cpage_ joined #perl6
22:36 mcmillhj joined #perl6
22:37 MilkmanDan joined #perl6
22:48 cog_ joined #perl6
22:55 Cabanossi joined #perl6
23:11 cpage_ joined #perl6
23:16 Geth ¦ perl6-examples: 99856ad51e | (David Warring)++ | 2 files
23:16 Geth ¦ perl6-examples: populate META6 provides. add t/test-meta.t
23:16 Geth ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/99856ad51e
23:22 itaipu joined #perl6
23:24 obfusk joined #perl6
23:28 bwisti joined #perl6
23:31 grondilu weird:  I can't access the logs on http://irclog.perlgeek.de/perl6/today
23:32 BenGoldberg joined #perl6
23:33 kyan joined #perl6
23:34 [Coke] they're down for maint.
23:36 DeadDelta they're down 'cause of apparent memory leak on newer Perl 5s. Patches welcome: https://github.com/moritz/ilbot
23:37 DeadDelta moritz: they're running in their own user don't they? Maybe perlbrewing older perl for just that user can be a temporary fix?
23:40 MasterDuke moritz: i've used heaptrack a couple of times recently to help out with memory issues
23:41 zacts joined #perl6
23:43 timotimo just kill the process daily :P
23:47 cpage_ joined #perl6
23:47 leont Many moons ago I ran into an hourly root-cronjob perl script that also had a daily kill cronjob, because of terrible choices in the script.
23:50 leont Rewrote the hell out of it as soon as they let me.
23:55 Cabanossi joined #perl6
23:57 timotimo oh my
23:57 BenGoldberg If the author of a program *knows* his program leaks memory... he could use exec() to start with a clean slate

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

Perl 6 | Reference Documentation | Rakudo