»ö« 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.
00:00 mcmillhj joined 00:01 zapwai joined 00:03 awwaiid left 00:04 mr-foobar left 00:05 mcmillhj left 00:07 devmikey joined 00:08 mr-foobar joined 00:09 BenGoldberg joined
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:10
timotimo self."$attr_name"() 00:11
seatek oh yeah!!!! i was trying those crazy ::($attr) ones ;)
timotimo heh, :: is for packages and lexical scopes
seatek well self is for methods ;) 00:12
timotimo right, and attributes are accessed with accessor methods
private attributes are different, though
seatek yay
yeah
00:12 bjz joined 00:17 mcmillhj joined 00:19 devmikey left 00:21 mcmillhj left 00:22 troys is now known as troys_, mcmillhj joined 00:26 Cabanossi left 00:27 Cabanossi joined, mcmillhj left 00:32 mr-foobar left 00:35 mr-foobar joined, awwaiid joined 00:38 lookatme joined
lookatme morning 00:38
00:39 mcmillhj joined 00:44 mcmillhj left 00:45 baest left 00:46 mcmillhj joined 00:47 awwaiid left 00:49 awwaiid joined 00:54 awwaiid left 00:55 mcmillhj left, cog_ joined, Cabanossi left 00:56 Cabanossi joined 00:58 cognominal left 00:59 awwaiid joined 01:03 mr-foobar left 01:04 awwaiid left 01:07 mr-foobar joined 01:10 awwaiid joined 01:13 AlexDaniel left 01:17 awwaiid left 01:19 awwaiid joined 01:26 awwaiid left 01:32 mr-foobar left 01:33 awwaiid joined 01:37 mr-foobar joined 01:38 awwaiid left 01:39 awwaiid joined, skids left 01:46 skids joined, ilbot3 left 01:48 awwaiid left 01:49 awwaiid joined 01:51 ilbot3 joined, ChanServ sets mode: +v ilbot3 01:53 awwaiid left 01:55 awwaiid joined 02:02 awwaiid left 02:04 awwaiid joined 02:18 noganex joined 02:21 noganex_ left 02:25 awwaiid left 02:27 awwaiid joined 02:28 cdg joined 02:33 bjz_ joined 02:34 awwaiid left 02:35 bjz left 02:36 zapwai left 02:41 awwaiid joined 02:45 awwaiid left 02:46 awwaiid joined 02:53 awwaiid left 02:58 cpage_ left 02:59 awwaiid joined 03:05 awwaiid left 03:06 awwaiid joined 03:09 Cabanossi left 03:10 Cabanossi joined 03:16 awwaiid left, awwaiid joined, cyphase left 03:21 awwaiid left 03:23 pilne left, BenGoldberg left 03:32 awwaiid joined 03:34 mr-foobar left 03:35 mr-foobar joined 03:37 awwaiid left 03:38 awwaiid joined 03:40 cpage_ joined 03:41 cog_ left 03:42 awwaiid left 03:44 awwaiid joined 03:49 awwaiid left 03:54 roguelazer left 03:55 awwaiid joined 03:57 roguelazer joined 04:00 awwaiid left 04:07 awwaiid joined 04:10 troys_ is now known as troys 04:15 cdg left 04:17 awwaiid left 04:18 rouking joined
moritz lizmat++ # p6weekly.wordpress.com/2017/06/26/...way-there/ 04:23
04:31 khw left 04:33 mr-foobar left 04:36 dwarring left, mr-foobar joined
lookatme moritz++ 04:37
04:40 awwaiid joined 04:44 cyphase joined 04:45 awwaiid left 04:46 awwaiid joined 04:49 kyan left 04:51 awwaiid left, awwaiid joined 04:52 curan joined 04:54 cyphase left 04:56 awwaiid left 04:57 awwaiid joined 04:59 skids left 05:01 awwaiid left 05:03 awwaiid joined, skids joined 05:04 bjz_ left 05:06 mcmillhj joined, troys is now known as troys_ 05:25 ilogger2 joined, ChanServ sets mode: +v ilogger2 05:36 dylanwh_ joined 05:37 raydiak_ joined 05:38 MilkmanD1n joined, salva0 joined 05:40 protium joined 05:41 musca joined 05:42 rouking joined 05:44 lowbro joined, wamba joined, lowbro left, lowbro joined 05:50 aindilis joined, mr-foobar joined 05:51 domidumont joined, xtreak joined, awwaiid joined 05:56 awwaiid left 05:57 domidumont left, awwaiid joined, domidumont joined 05:58 mr-foobar left 06:02 awwaiid left, mr-foobar joined 06:03 awwaiid joined 06:04 ufobat joined 06:05 rouking left 06:11 wamba left, awwaiid left 06:13 mr-fooba_ joined 06:14 mr-foobar left 06:29 wamba joined 06:30 awwaiid joined 06:33 parv joined 06:35 awwaiid left 06:36 awwaiid joined 06:37 cog_ joined 06:41 awwaiid left, awwaiid joined 06:45 domidumont left, awwaiid left 06:46 xzhao joined, awwaiid joined 06:51 awwaiid left 06:52 awwaiid joined 06:57 awwaiid left 06:58 awwaiid joined, vendethiel joined 07:00 cog_ left 07:01 domidumont joined 07:07 abraxxa joined 07:08 awwaiid left 07:09 bjz_ joined
ufobat ola 07:09
07:10 awwaiid joined 07:13 |oLa| joined 07:15 awwaiid left 07:16 awwaiid joined 07:23 awwaiid left 07:25 awwaiid joined 07:26 |oLa| left 07:30 imcsk8 joined
lizmat_ clickbaits p6weekly.wordpress.com/2017/06/26/...way-there/ 07:31
07:36 awwaiid left 07:37 awwaiid joined
El_Che hello 07:38
07:39 astj joined
parv yo 07:40
howizit? 07:41
07:44 astj left, wamba left 07:45 dakkar joined, awwaiid left 07:46 awwaiid joined 07:48 astj joined, imcsk8 left 07:49 kaare__ joined
lookatme hello 07:50
07:50 imcsk8 joined 07:51 awwaiid left, awwaiid joined
melezhik Hi! 07:52
I am reading docs of github.com/zoffixznet/perl6-Proc-Q and not quite clear how can I pass parameters to proc-q ?
I am talking about commands parameter - github.com/zoffixznet/perl6-Proc-Q#commands
say I want to run external program by using Proc::Q 07:53
the example I see works fine, but when I try to adopt it I get this 07:54
perl6 -e 'use Proc::Q; proc-q {"echo OK"};' 07:55
Constraint type check failed in binding to parameter '@commands'; expected anonymous constraint to be met but got Array ($[-> ;; $_? is raw { ...)
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:56
but I can't come up with a proper way to use it ... 07:57
llfourn m: say ({ "echo OK" }).WHAT 07:59
camelia (Block)
llfourn but what it wants is a list of lists
so if you just want one echo
do proc-q [<echo OK>,] 08:00
actually no need for the comma
m: say [<echo OK>]
camelia [echo OK]
llfourn m: say [<echo OK>,] # actually there is
camelia [(echo OK)]
08:01 awwaiid left
llfourn melezhik: ^ 08:01
08:02 awwaiid joined
melezhik hi llfourn: 08:03
perl6 -e 'use Proc::Q; proc-q [<echo OK>];'
Constraint type check failed in binding to parameter '@commands'; expected anonymous constraint to be met but got Array ($["echo", "OK"])
llfourn o.o
08:03 jonas1 joined
llfourn oh 08:03
they have to be a list for some reason
08:03 nadim joined
llfourn m: dd (<echo OK>,) 08:04
camelia (("echo", "OK"),)
llfourn melezhik: like that ^
melezhik perl6 -e 'use Proc::Q; proc-q (("echo", "OK"),);' - succeed 08:05
llfourn \o/
melezhik btw it requires the last comma
llfourn yep
melezhik after "OK"
thanks !
llfourn nw gl
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
I read your blog post on using it to do docker
I'm currently trying the same sort of things with spitsh
parv that comma makes the first arg as a list; turning that data into list-of-list 08:07
08:07 awwaiid left
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?
melezhik spitsh? probably I have already seen that ... 08:08
llfourn melezhik: github.com/spitsh/spitsh
melezhik yeah, target audience ... sorry
yeah will look at ...
parv m: my @x = (<a b>); my @y = (<a b>,) ; say @x[0].WHAT ; say @y[0].WHAT
camelia (Str)
(List)
llfourn heh that makes too of us
melezhik: are you going to be at TPC eu? 08:09
two*
melezhik unfortunatelly I don't have much time at the moment, pretty buzy with many things, so can't attend 08:10
08:10 wamba joined, Cabanossi joined
llfourn ah k 08:10
llfourn &
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
))
08:12 rindolf joined 08:13 awwaiid joined
jsimonet m: use NativeCall; subset char_t of Str; my Pointer[char_t] $c; 08:15
camelia 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…
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:17
08:18 awwaiid left 08:19 awwaiid joined, robertle joined
parv i am using rakudo rg276d4. why is there no difference between "@x = (<a b>)" & "@x = [ <a b> ]" (both ~~ & == return True)? 08:20
08:20 |oLa| joined 08:24 awwaiid left
melezhik parv: thanks for explanation of the last comma 08:24
parv happy to help, with what little I know. I am also learning 08:27
melezhik )) 08:29
how to read a directory structure ? I need the first level directories inside some dir ... 08:30
probably this one ? - docs.perl6.org/routine/dir 08:31
Ven`` o/
melezhik might be handy with in-dir?
moritz melezhik: yes, dir
melezhik: and you can pass a dir to dir :-)
m: say dir('/tmp') 08:32
camelia ("/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…
melezhik thanks, moritz:
08:32 awwaiid joined 08:36 awwaiid left 08:39 Cabanossi left 08:40 Cabanossi joined 08:45 xtreak left 08:46 xtreak joined, xtreak left, xtreak joined 08:50 awwaiid joined 08:55 awwaiid left
parv does zef know about modules installed with installation of rakudo (if any installed at all) besides the ones installed by zef itself? 08:56
nevermind, seems so. 08:58
09:00 awwaiid joined 09:05 awwaiid left 09:06 awwaiid joined, FROGGS joined 09:07 astj left 09:08 astj joined 09:13 awwaiid left 09:14 awwaiid joined
parv later people ... 09:14
09:15 parv left, astj left 09:16 xtreak left, astj joined, xtreak joined 09:18 MilkmanD1n left 09:20 xtreak left 09:21 MilkmanDan joined 09:22 cyphase joined 09:23 awwaiid left 09:25 cyphase left, andrzejku_ joined 09:26 nebuchad` joined, colomon_ joined 09:27 cyphase joined, Some-body_ joined, BuildTheRobots_ joined 09:28 nadim_ joined 09:29 cxreg joined, yubimusubi joined, broquaint joined, xtreak joined 09:30 ranguard joined, cono_ joined, Juerd_ joined, gfldex_ joined, smash_ joined, [Coke]_ joined, cyphase left, ponbiki_ joined, sivoais_ joined, cyphase joined, cyphase left 09:31 cog_ joined, curan joined, cyphase joined 09:33 Alikzus_ joined 09:34 FROGGS left, nadim left 09:35 Some-body_ is now known as DarthGandalf, colomon_ is now known as colomon, Juerd_ is now known as Juerd, cyphase left, BuildTheRobots_ is now known as BuildTheRobots 09:36 awwaiid joined 09:37 nowan joined, cyphase joined 09:39 astj left 09:40 zacts joined 09:41 camelia joined, cyphase left, awwaiid left, FROGGS joined 09:42 araujo joined, awwaiid joined, araujo left, araujo joined, cyphase joined, rba_ joined, ChanServ sets mode: +v camelia, cyphase left 09:44 bjz_ left, cyphase joined 09:46 awwaiid left 09:47 bjz joined, awwaiid joined, cyphase left 09:48 cyphase joined, cyphase left 09:51 astj joined 09:52 awwaiid left 09:53 ribasushi joined, awwaiid joined, Cabanossi left 09:55 Cabanossi joined, astj left
llfourn m: say *<foo>:v # why can't I adverb? 09:56
camelia 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:56 cog_ left 09:58 awwaiid left, awwaiid joined 10:03 awwaiid left 10:04 awwaiid joined 10:11 awwaiid left 10:12 sena_kun joined, awwaiid joined
sena_kun o/ 10:12
m: "foo/bar".IO.add("../../").resolve.relative.say; 10:13
camelia foo/bar/../..
10:13 zakharyas joined
sena_kun But docs.perl6.org/type/IO::Path#method_add 10:13
Is it docs or implementation?
10:16 |oLa| left
FROGGS maybe it only resolves stuff that actually exists? 10:16
have you tested that?
sena_kun Nope. Let's try... 10:17
10:17 awwaiid left
sena_kun Indeed. Fool me! FROGGS, thanks. 10:18
FROGGS :o)
probably means we should put that in the docs...
10:18 awwaiid joined
sena_kun Yeah. 10:18
10:18 bjz left 10:19 wtw joined
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.
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:23
Geth doc: 5cca681092 | Altai-man++ (committed using GitHub Web editor) | doc/Type/IO/Path.pod6
Fix up code sample indentation
10:24
10:24 awwaiid left
Geth doc: e1c508f314 | Altai-man++ (committed using GitHub Web editor) | doc/Type/IO/Path.pod6
More indentation fixing
10:28
10:33 |oLa| joined 10:35 awwaiid joined
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:36
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
is that known
nine No, it isn't.
10:39 neuron joined
neuron Hi 10:39
FROGGS k
neuron I don't seem to be able to file a bug using the rt.cpan.org web interface
FROGGS hi neuron
neuron I would like to report issue with NativeCall, where should I send the email to?
FROGGS you can send an email to [email@hidden.address]
neuron So simple :) Thank you 10:40
FROGGS this will go straight into RT
10:40 awwaiid left 10:42 curan left 10:43 curan joined
FROGGS damn, maybe I'm just missing -Duseshrplib 10:44
10:44 neuron left 10:46 awwaiid joined 10:51 awwaiid left 10:52 awwaiid joined, wamba left 10:54 cono_ is now known as cono 10:56 awwaiid left 10:57 wamba joined, awwaiid joined 11:02 nadim_ left, awwaiid left 11:05 xtreak left 11:06 xtreak joined
FROGGS nine: I still get that error after rebuiling that libperl.so :o( 11:07
melezhik How can I delete an element from array?
sena_kun melezhik, some particular element? .grep maybe. 11:08
11:08 xtreak left
FROGGS delete? with grep? 11:08
11:08 awwaiid joined 11:09 xtreak joined
sena_kun On some condition, I mean. 11:09
It wasn't note what element should be deleted. :/
nine m: my @a = 1,2,3; @a[1]:delete; dd @a; @a.splice(1, 1); dd @a
camelia Array @a = [1, Any, 3]
Array @a = [1, 3]
Geth doc: 6986130f4e | Altai-man++ (committed using GitHub Web editor) | doc/Type/IO.pod6
Fix a strange old thinko
11:10
melezhik thanks nine: 11:11
11:14 awwaiid left 11:15 awwaiid joined 11:17 nebuchad` is now known as nebuchadnezzar 11:18 travis-ci joined
travis-ci Doc build errored. Altai-man 'More indentation fixing' 11:18
travis-ci.org/perl6/doc/builds/247460697 github.com/perl6/doc/compare/5cca6...c508f31454
11:18 travis-ci left
lizmat melezhik: does that what you want? Or maybe you should look at splice 11:20
?
melezhik I guess :delete is fine 11:21
11:22 curan left 11:23 awwaiid left
lizmat melezhik: oki :-) 11:23
11:23 yoleaux joined, ChanServ sets mode: +v yoleaux 11:25 darutoko joined, |oLa|1 joined 11:27 |oLa| left 11:28 rindolf left 11:29 awwaiid joined
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 docs.perl6.org/type/Channel#method_poll work?
11:33 awwaiid left
ilmari FROGGS: github.com/niner/Inline-Perl5#inhe...rl-5-class 11:34
melezhik I mean at what conditions item is removed from the channel?
FROGGS uhh, silly me
I even got that page open -.-
thanks ilmari
nine And I hope it's kinda intuitive anyway :)
11:34 awwaiid joined
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:35
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, awwaiid left 11:40 rba_ left
nine FROGGS: you could try something like my $whatever = $p6->run('use Whatever; Whatever'); my $obj = $whatever->new(); 11:40
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:44 wamba left 11:46 awwaiid joined, travis-ci joined
travis-ci Doc build passed. Altai-man 'Fix a strange old thinko' 11:46
travis-ci.org/perl6/doc/builds/247472851 github.com/perl6/doc/compare/e1c50...86130f4ef2
11:46 travis-ci left
sena_kun m: 'one two three' ~~ /(\w+)+ % ' '/ 11:48
camelia ( no output )
sena_kun m: say 'one two three' ~~ /(\w+)+ % ' '/
camelia 「one two three」
0 => 「one」
0 => 「two」
0 => 「three」
sena_kun Why indexes are zeroed, instead of proper count? 11:49
11:50 domidumont left
sena_kun if 'one two three' ~~ /(\w+)+ % ' '/ { say $0[1] } 11:50
11:50 awwaiid left
sena_kun m: if 'one two three' ~~ /(\w+)+ % ' '/ { say $0[1] } 11:50
camelia 「two」 11:51
sena_kun It still works. Hmm.
11:52 domidumont joined 11:54 gdonald joined, AlexDaniel joined 11:57 sena_kun left 11:58 |oLa|1 left 11:59 sena_kun joined 12:04 bpmedley joined, sivoais_ left 12:07 cog_ left 12:09 Cabanossi left
timotimo melezhik: polling out an item from the channel grabs the earliest one that was sent and not yet received. the channel acts like a queue, you cannot get any other item than the "next to be received" one 12:09
melezhik ok 12:10
12:10 kyan joined
melezhik I guess I end up with simple Per6 / Promice implimentation to get what I need 12:10
12:11 Cabanossi joined
melezhik probably Proc::Q/Channel does not fit for my task or I still understand well how this works ... 12:11
timotimo what is proc-q not doing for you? 12:12
12:12 itaipu joined 12:13 awwaiid joined
melezhik my inital task is to run many externall program (processes) asynchronoulsy , but I also need to ensure not run the same program twice. 12:16
Proc::Q starts a banch of proccess but then I need to walk though all of then to get know that some of them finish 12:17
I have tried to use Channel/poll for this
12:18 ilbot3 joined, ChanServ sets mode: +v ilbot3
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:18
12:18 awwaiid left 12:19 awwaiid joined 12:21 sena_kun left
melezhik timotimo: probably it might be better to understand what I wanted to achieve looking at the implimentation with Promise - github.com/melezhik/sparky/blob/ma...sparky.pl6 12:22
which I failed to do with Proc::Q/Channel
12:23 ilbot3 left
melezhik but again probably I miss something ))) 12:23
12:23 awwaiid left
jnthn That code has a read/write data race on %project-state 12:26
12:26 ilbot3 joined, ChanServ sets mode: +v ilbot3, mcmillhj joined 12:28 [Coke]_ is now known as [Coke] 12:30 awwaiid joined, rindolf joined
timotimo aha, proc-q doesn't seem to give you a "this program has been started" message at all, eh? 12:30
FROGGS haha lol
nine: it just works!
wth
melezhik I am aware about possible races 12:31
12:31 mcmillhj left
timotimo so you won't get the "started" 12:31
er, i mean "running"
melezhik if I use Proc::Q I have a Channel object which I can't iterrate through to get know which processes finish 12:32
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!
melezhik at least with Promise I can
timotimo why do you think you can't iterate through a channel? 12:33
jnthn melezhik: Untested but I'd probably write it something like gist.github.com/jnthn/32c3359202ec...e372fc2a75
Though does it need to watch for new scripts also? 12:34
melezhik yeah, I need an endless loop and I need to ensure that gist.github.com/jnthn/32c3359202ec...e-x-p6-L11 does not if already running 12:35
for the same project
jnthn Ah, what I did doesn't handle the new script case 12:36
nine FROGGS: yeah, I've done something like that for a talk or two :)
FROGGS nine: I love it *g*
jnthn But anyway, doing it in the react block and with Proc::Async will be far more manageable :)
(react essentially gives you an event loop that stays alive so long as there's work)
melezhik yeah, without this one I would use Proc::Async
nine FROGGS: niner.name/talks/Web%20development%...rl%206.pdf 12:37
12:37 xtreak left
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:38
12:38 awwaiid left
melezhik at the same time 12:38
jnthn Yeah, the "spawn another copy when the last one exits" is what the run-project call is doing
In the whenever
Basically, whenever the last one exits, spawn another one 12:39
(Since whenever is an async construct, it isn't actually recursive)
12:39 ilbot3 left
melezhik jnthn: can I look at the implimetation where it does not run two copies at the time ? 12:40
12:41 nadim_ joined, |oLa| joined
jnthn melezhik: What, where it detects new projects also? 12:41
(The current version will never run two copies at a time.) 12:42
melezhik for simplicity let's say that projects list does not change
12:42 konsolebox joined
jnthn Oh 12:42
Then the current one I pasted should handle it
We do one loop over the directories at startup and call run-project 12:43
That runs the command using Proc::Async
The contents of the whenever block runs when the process exits
melezhik ahh, I see )))
jnthn And so at this point there's no copies of it running so we just call run-project again
:)
12:44 awwaiid joined 12:47 |oLa| left, ilbot3 joined, ChanServ sets mode: +v ilbot3
melezhik ok, but I am not clear how this ensure not run '/bin/sh', '-c', $cmd if $cmd is already runnning? 12:47
12:49 awwaiid left, wamba joined
melezhik I mean I checked that this work how I expected but can't understand how ))) 12:51
12:51 mcmillhj joined, |oLa| joined
jnthn melezhik: Do you understand how `whenever` works? Or is that the piece you're missing? :) 12:52
Proc::Async.new('/bin/sh', '-c', $cmd).start returns a Promise that is kept when the command exits
whenever $some-promise { code } runs code when $some-promise completes 12:53
So at that point we know that the process has already exeited, so we can start it again
Which we do by calling run-project
12:53 wamba left
jnthn You might think of react as being like an event loop 12:54
And whenever sets up an event handler
12:54 Cabanossi left 12:55 nadim_ left, Cabanossi joined, awwaiid joined 12:58 smash_ is now known as smash
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? 12:59
I also am not able to use a P5 module after said line, without causing P6M-duplicate-symbol errors... 13:00
13:00 awwaiid left
melezhik neat! ))) 13:00
nine FROGGS: duplicate symbol errors sound troublesome?
FROGGS yes 13:01
13:01 awwaiid joined
FROGGS it reports the package name of the controller I am in to be duplicate 13:01
13:02 itaipu left
nine That's odd. It should only try to import modules that were loaded by the use statement. 13:03
13:03 ilbot3 left 13:04 lookatme joined 13:05 xtreak joined 13:07 |oLa| left 13:09 FROGGS left, ilbot3 joined, ChanServ sets mode: +v ilbot3 13:10 vendethiel- joined, awwaiid left 13:11 xtreak left 13:12 awwaiid joined, vendethiel left 13:16 nadim_ joined 13:18 awwaiid left 13:25 perlpilot joined 13:32 awwaiid joined 13:34 ilbot3 left 13:36 FROGGS joined
melezhik jnthn: how to adjust your example to make it possible to re-read root directory structure in case new projects appear? any ideas? 13:36
13:37 awwaiid left
jnthn melezhik: See IO::Notification 13:37
13:38 awwaiid joined 13:39 dudz joined, wamba joined
FROGGS nine: am I meant to access, say JSON::XS, that was loaded by P5 in a v6-inline block? 13:40
melezhik ok, I will look at this. And one more thing. Seems with new code my scripts ignore ctrl^c when running from console , so I have to `ps uax|grep` and then kill $pid to terminate it 13:41
13:42 ilbot3 joined, ChanServ sets mode: +v ilbot3 13:43 awwaiid left, awwaiid joined 13:44 wamba left 13:46 skids joined, pmurias joined 13:49 awwaiid left, nadim_ left 13:51 awwaiid joined, wamba joined 13:53 Cabanossi left 13:55 AlexDaniel left, Cabanossi joined 13:56 ab6tract joined, bjz joined, wamba left 13:57 awwaiid left 13:59 lowbro left
ab6tract has just tried to sneak a talk submission into the YAPC::EU queue past the deadline 14:00
the computer didn't say "no", so ... :) 14:01
14:01 zakharyas left, zakharyas joined 14:03 cog_ joined, sivoais joined 14:04 awwaiid joined 14:05 zakharyas left
nine FROGGS: if you use JSON::XS:from<Perl5>; you should be able to access it 14:06
14:08 awwaiid left 14:09 ilbot3 left
melezhik jnthn: IO::Notification works fine on itslef, but I hardly can see how to combine it with my script using react/react/Proc::Async 14:09
14:10 awwaiid joined
melezhik and I still have to care about directories untrouched to process them again and again where IO::Notification does not help 14:10
jnthn Yeah, you'd still need some kind of hash for directories you already added
You'd use the IO::Notification with another whenever block 14:11
INside of the react
And pull the code that scans directories out into a sub
And call it from the whenever
14:12 ufobat left, ufobat joined
melezhik yeah I have just thought about this ... 14:12
)))
14:12 |oLa| joined 14:13 wamba joined
jnthn melezhik: Untested, but gist.github.com/jnthn/32c3359202ec...e372fc2a75 is a sketch of it 14:14
14:14 awwaiid left
jnthn Inside of a react block, it makes sure that you are only inside of one of the whenevers at a time 14:14
(And code called as part of executing a whenever)
So this solution doesn't contain race conditions :)
oh, I forgot one thing 14:15
updated
14:15 awwaiid joined
jnthn Should call add-dirs() once a the start too, to set things up for what's already there :) 14:15
14:17 ilbot3 joined, ChanServ sets mode: +v ilbot3 14:19 nadim_ joined 14:20 cyphase joined 14:22 |oLa| left, cyphase left, pmurias left 14:25 cyphase joined, awwaiid left 14:27 awwaiid joined
FROGGS nine: that's would be the point where I get that P6M duplicate symbol issue 14:28
14:29 |oLa| joined
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:31
how can I do this?
I mean the very beginning of the script ...
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 :)
melezhik gist.github.com/jnthn/32c3359202ec...e-x-p6-L29 ? ))) 14:32
jnthn yes, that
14:33 cog_ left
jnthn Note that whenever is just setting up the handler for when there are notifications 14:33
It doesn't block execution
14:36 awwaiid left
dogbert2 moritz: is irclog.perlgeek down atm? 14:36
14:37 kyan left, wamba left 14:38 wamba joined, Cabanossi left, mr_ron joined 14:40 Cabanossi joined 14:41 seatek joined 14:42 awwaiid joined
lizmat moritz: seems down for me as well 14:42
14:44 wamba left 14:49 awwaiid left, ilbot3 left 14:50 awwaiid joined, kyan joined, |oLa| left, zakharyas joined
melezhik jnthn: looks good. btw if I terminate script does it wait it's childs, lanched by Proc::Async.new ? 14:51
14:51 domidumont left
melezhik looks like if I terminate the script some sparrowdo commands are still here (at least I see the one ) 14:51
in `Sl` state
jnthn How are you terminating it?
melezhik kill $pid 14:52
jnthn But no, there's nothing set up for it to wait
You could install a signal handler to make that happen
14:52 ilbot3 joined, ChanServ sets mode: +v ilbot3
melezhik good. could you please point me docs on how to set up signals in Perl6 ? 14:53
jnthn docs.perl6.org/routine/signal#class_Supply 14:54
It also returns a Supply
lizmat signal(SIGINT).tap( { say "Thank you for your attention"; exit 0 } ); # melezhik
jnthn so whenever signal(SIGINT) { ... }
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
Then it just won't spawn another one of them
moritz dogbert2, lizmat: the server swapped; i've restarted the webserver, should be back up now 15:03
lizmat not just yet for me
moritz :( 15:04
15:08 FROGGS left
moritz it all seems kinda slow, and consumes a lot of memory 15:08
have to investigate after $dayjob
melezhik Thanks a lot for help jnthn: and lizmat: will try to add signal handler later, so far all is good ))) 15:09
have commited changes to sparky repo 15:10
15:11 cyphase left 15:12 cyphase joined, cyphase left, cyphase joined 15:13 ab6tract left, ilbot3 left 15:14 zakharyas left 15:16 cyphase left, cyphase joined, cyphase left 15:18 zakharyas joined, cyphase joined, cyphase left 15:19 cyphase joined, cyphase left 15:22 ilbot3 joined, ChanServ sets mode: +v ilbot3 15:23 jonas1 left
ufobat there is often a our $VERSION in perl5 modules. is this still idiomatic/a good way to go in perl6 15:24
timotimo i think the version is meant to be part of the meta info and such? 15:25
ufobat but that means the module itself does not know about its version, just e.g. zef does? 15:27
15:29 bjz left
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:29
but i don't know what or how
15:34 ilbot3 left 15:35 kurahaupo joined
ufobat okay 15:37
dogbert2 moritz: are you running perlgeek on an RPi :-)
15:40 devmikey joined
moritz dogbert2: I kinda wish I did 15:40
I ^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^HInstead it's a Vm with 2gb RAM, and I recently did an OS upgrade 15:42
15:42 awwaiid left 15:43 awwaiid joined 15:46 ilbot3 joined, ChanServ sets mode: +v ilbot3, zakharyas left 15:47 domidumont joined 15:48 awwaiid left 15:49 awwaiid joined 15:50 cdg joined 15:51 ilbot3 left, cdg_ joined 15:53 Cabanossi left 15:55 ilbot3 joined, ChanServ sets mode: +v ilbot3, cdg left, Cabanossi joined 15:58 wamba joined 16:02 |oLa| joined 16:03 awwaiid left 16:04 |oLa| left, awwaiid joined
[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:06
16:06 ilbot3 left 16:08 awwaiid left 16:09 awwaiid joined
[Coke] with jnthn's latest updates to Proc, getting a new (I think) failure in doc's xtest: 16:12
perl6 xt/space-after-comma.t doc/Type/IO/CatHandle.pod6 -> Malformed UTF-8
16:14 abraxxa left, ilbot3 joined, ChanServ sets mode: +v ilbot3 16:15 moritz joined 16:19 mxco86 joined, awwaiid left 16:20 awwaiid joined 16:21 zapwai joined
[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:29
16:29 devmikey left
[Coke] looking at line 243 of the output of perl6 --doc on that file, there's nothing obviously malformed. Looks like straight ASCII 16:31
Geth doc: c6e8d0809c | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Iterator.pod6
Add IterationEnd to search index
16:32
mr_ron r: gist.github.com/ronaldxs/97c0118cf...d686c113f8 16:33
camelia ===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
===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
mr_ron star: gist.github.com/ronaldxs/97c0118cf...d686c113f8
camelia ===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
mr_ron Any way to run my gist with Bench? Perhaps Bench would be a good idea for R* anyway? 16:35
16:35 awwaiid left 16:36 awwaiid joined
[Coke] for now, I'd recommend installing it locally. 16:36
(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.
[Coke] zoffiz: Pod formatting code X missing endtag '>' (on the Iterator edit you just made) 16:39
*zoffix
16:44 itaipu joined 16:45 awwaiid left, xzhao_ joined 16:46 xzhao__ joined, awwaiid joined 16:49 itaipu left 16:53 Cabanossi left 16:55 Cabanossi joined 16:57 DeadDelta joined
DeadDelta [Coke]: the end tag is present when I look at github commit: github.com/perl6/doc/commit/c6e8d0809c 16:57
Geth doc: 4c00a55a7d | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Iterator.pod6
Fix index tag
16:58
DeadDelta Looking at /glossary code, looks like the pipe should be before the term instead of after
[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, xzhao__ left
[Coke] slurp works on the --doc output also 17:00
just not lines
17:00 xzhao_ left, itaipu joined, xzhao_ joined
DeadDelta hm. perl6 -e '"doc/doc/Type/IO/CatHandle.pod6".IO.lines.put' works 17:00
[Coke] doc/doc 17:01
I haven't been able to golf it smaller than "run, perl6 --doc, .lines"
DeadDelta doc/doc is because the clone is in doc/ 17:02
I have no problems with perl6 -e 'run(<perl6 --doc doc/doc/Type/IO/CatHandle.pod6>, :out).out.lines.put' 17:03
That's on 2017.05-389-g326faed. So it might be the proc rework at fault
DeadDelta & 17:04
17:04 DeadDelta left 17:07 TEttinger joined
mr_ron m: gist.github.com/ronaldxs/97c0118cf...d686c113f8 17:07
camelia 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:11 itaipu left 17:12 kurahaupo left 17:13 awwaiid left 17:14 awwaiid joined 17:17 dakkar left 17:21 kaare__ left, kaare__ joined
timotimo mr_ron: may also want to test the shortcut += vs the full $r = $r + ... 17:23
mr_ron timotimo: Did you run it? 17:25
timotimo i don't have inline::perl5
i did run the code in one of the examples
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?
timotimo on my machine the "int" version is noticably slower, probably doing a bunch of boxing somewhere
17:25 sjoshi joined
lizmat nadim_: QuantHash is the generic term for Set,SetHash,Bag,BagHash,Mix,MixHash 17:26
nadim_ lizmat++
timotimo interesting, += is faster than the full form
i did not expect that
lizmat timotimo: since when ??? 17:27
timotimo no clue
the whateverable bots have netsplit out and haven't come back 17:28
17:28 zakharyas joined
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
mr_ron: yeah, i expect we're losing a bunch of time from boxing and unboxing at some position
have you tried with the last few releases?
i seem to recall there was some kind of regression or something?
memory's hazy 17:29
lizmat m: my $a = 42; for ^10000000 { $a += 1 }; say now - INIT now
camelia 4.807176
17:29 cog_ joined
lizmat m: my $a = 42; for ^10000000 { $a = $a + 1 }; say now - INIT now 17:29
camelia 3.8667810
timotimo now compare with int instead of Int
lizmat m: my int $a = 42; for ^10000000 { $a = $a + 1 }; say now - INIT now
camelia 7.3726763
lizmat m: my int $a = 42; for ^10000000 { $a += 1 }; say now - INIT now 17:30
camelia 4.35697416
timotimo fascinating
lizmat wow, even faster than the Int version
17:30 kurahaupo joined
mr_ron m: my Int $a = 42; for ^10000000 { $a += 1 }; say now - INIT now 17:30
lizmat m: use nqp; my int $a = 42; for ^10000000 { $a = nqp::add_i($a,1) }; say now - INIT now 17:31
camelia 4.7593613
1.9248574
timotimo except camelia's host may be busy or something
lizmat m: use nqp; my int $a = 42; for ^10000000 { $a = nqp::add_i($a,1) }; say now - INIT now
camelia 2.003535
lizmat using nqp::ops on native ints still more than 2x as fast
mr_ron Is it a reasonable goal for p6 with native int to approach p5 performance? 17:32
Should it be significantly faster than Any/Int anyway?
timotimo we ought to be able to get faster than p5 17:33
mr_ron Should I look into filing a PERF ticket?
timotimo the int and += one spends 3.7% of its time in box_int, whereas it should be more like 0% 17:34
ilmari m: my int $a = 42; for ^10000000 { $a++ }; say now - INIT now 17:35
17:35 |oLa| joined
camelia 1.91576415 17:35
timotimo m: my int $a = 42; $a = $a + 1 for ^10_000_000; say now - INIT now
camelia 7.59916169
timotimo interesting, that's equivalently slow to the prefix-for 17:36
anyway, that code also spends a whole lot of time in invoking and returning from frames
mr_ron m: my $a = 42; for ^10000000 { $a++ }; say now - INIT now
camelia 2.3997292
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:38
17:38 Cabanossi left
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
17:40 Cabanossi joined
timotimo about 30% more time is spent if the $_ is unspecified vs when i specify it as being "int" 17:41
17:42 sjoshi left
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}
camelia 2.34404888
1.8906015
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:44
camelia 4.812863
3.084417
17:45
timotimo if you $a++; $a++; you get almost no time increase over just $a++ 17:46
17:46 xzhao left
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:46
camelia 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
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:49
17:52 cog_ left
timotimo m: say "{13130020819 / 10000000} cycles per loop entry" 17:55
camelia 1313.0020819 cycles per loop entry
timotimo we could do a lot better 17:56
17:58 setty1 joined
mr_ron I would currently be looking to document with a PERF ticket on 17:59
"native int" vs INT/Any
but am open to other suggestions
s/INT/Int/ 18:00
lizmat m: for ^1000000 -> { } # huh? couldn't we optimize for that in the mean time ? 18:01
camelia Too many positionals passed; expected 0 arguments but got 1
in block <unit> at <tmp> line 1
lizmat timotimo: ^^^ 18:02
timotimo i guess we could 18:05
18:05 xzhao_ left 18:08 xzhao joined 18:12 DeadDelta joined
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
DeadDelta Does it?
OK
As for "regression". It's the outcome of the fix for the native candidate dispatch 18:13
m: my int $a = 42; for ^10000000 { $a = $a + 1 }; say now - INIT now
timotimo yeah, the METAOP_ASSIGN is flattened out manually by the optimizer
camelia 7.6750003
DeadDelta ^ that code doesn't go through native candidate. It boxes the native int each time and goes through Int candidate
m: my int $a = 42; for ^10000000 { $a = $a + my int $ = 1 }; say now - INIT now
camelia 2.1363054
DeadDelta You have to have both natives to go through native candidate
timotimo but 1 can be either native or non-native?
DeadDelta Yup
timotimo i mean we have a Want for that specific reason? 18:14
i'm clearly confused
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
timotimo that's fair 18:15
DeadDelta In that we don't nativize non-natives in multi dispatch.
huggable: native
huggable DeadDelta, here's a ticket: rt.perl.org/Ticket/Display.html?id...xn-1433016 and here's explanation why it isn't: irclog.perlgeek.de/perl6-dev/2016-...i_13462673
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
when using the "my int $ = 1" trick the + operator does get inlined 18:18
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 8.18530108
2.74818107
18:20 |oLa| left
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:21
18:23 kaare__ left, kaare__ joined 18:24 greppable6 joined, committable6 joined, evalable6 joined, ChanServ sets mode: +v greppable6, ChanServ sets mode: +v committable6, ChanServ sets mode: +v evalable6, unicodable6 joined, bisectable6 joined, benchable6 joined, quotable6 joined, bloatable6 joined, ChanServ sets mode: +v unicodable6, ChanServ sets mode: +v bisectable6, ChanServ sets mode: +v benchable6, ChanServ sets mode: +v quotable6, ChanServ sets mode: +v bloatable6, statisfiable6 joined, ChanServ sets mode: +v statisfiable6
hythm Zamelk is 2 , the other team is 0 ;) 18:24
DeadDelta ?
hythm Sorry, Wrong channel.
DeadDelta heh 18:25
18:28 kaare__ left, kaare__ joined, |oLa| joined, zakharyas left 18:31 kaare__ left
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 irclog.perlgeek.de/perl6-dev/2016-...i_13462673 I wouldn't want the big int to match, only when we have a Want that's native 18:31
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:38 ponbiki_ is now known as ponbiki 18:39 Cabanossi left, itaipu joined
DeadDelta qast: ▸Op: :op<say>, ▸Op(:op<add_i>, ▸Want(▸IVal(:value(72)), 'iI', ▸IVal(:value(42))), ▸IVal(:value(10)) ) 18:40
Ah, no bot :)
18:40 Cabanossi joined
DeadDelta Gives 52 18:40
18:44 andrzejku joined
El_Che so, many perl6 talk in amsterdam soon? 18:44
someone here presenting
? 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)
I forget what callstatic is about. Is that the flattening bit?
m: use nqp; my int $i = 0; nqp::while($i > 1000_000, $i += 2); say now - INIT now 18:46
camelia 0.0011683
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”?)»
DeadDelta yes, I did. Now, get on with it
benchable6: all use nqp; my int $i = 0; nqp::while($i < 1_000_000, $i += 2); say now - INIT now
benchable6 DeadDelta, starting to benchmark the 42 given commits
DeadDelta oh damn, the native thing 18:48
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.
Stupid robot 18:50
18:51 st_elmo joined
benchable6 DeadDelta, gist.github.com/90f33f9ae4cf366335...0659cb51b2 18:51
18:52 Ven joined, Ven is now known as Guest73188
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
DeadDelta, benchmarked the given commits, now zooming in on performance differences
18:56 Guest73188 left
DeadDelta zoom faster, dammit 18:57
18:59 darutoko left 19:02 vendethiel- left 19:05 itaipu left
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:08
camelia 9.6187681
2.8602481
3.7480661
19:09
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:11
camelia 8.39889307
2.7175026
0.8140489
19:12
19:12 AlexDaniel joined
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
benchable6: so wtf? Where's the zooming?
benchable6 DeadDelta, ¦so: «Cannot find this revision (did you mean “all”?)»
DeadDelta ... 19:15
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
benchable6 DeadDelta, starting to benchmark the 20 given commits
DeadDelta, benchmarked the given commits, now zooming in on performance differences
AlexDaniel slaps benchable6 19:18
“Cannot coerce NaN to an Int”
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: gist.github.com/Whateverable/c62f2...f783452de9 gist.github.com/Whateverable/b8bd4...6ee9dfb90a 19:19
So the unrolling timotimo mentioned needs to have a look at it
19:20 pmurias joined
pmurias DeadDelta: what positive thing does fueling Perl 5/Perl 6 hostility get us? 19:21
AlexDaniel DeadDelta: fwiw github.com/perl6/whateverable/issues/176
MasterDuke: benchable6 clearly needs some love :)
DeadDelta pmurias: we crush them and move on with One True Perl.
19:22 cyphase joined
lizmat DeadDelta: for crushing, you need mass 19:23
mr_ron Being more careful with natives I got p6 to run faster than p5: gist.github.com/ronaldxs/74b7450ae...871f53d364
lizmat or a very high velocity :-)
DeadDelta mr_ron++ awesome
AlexDaniel
.oO( eat more and run faster )
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
lizmat and where is that mocking taking place ? 19:25
19:25 khw joined, cyphase left
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: www.reddit.com/r/perl/comments/6jp...rver_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 19:27 cyphase left
lizmat ah, the colourful one 19:27
El_Che mr_ron: I have seen foreach outperform the C loop
lizmat what can I say, ignore him
19:27 cyphase joined
DeadDelta :) 19:27
19:27 cyphase left 19:28 cyphase joined, cyphase left
El_Che mr_ron: on my machine, the foreach loop is faster 19:30
19:30 cyphase joined
DeadDelta m: dd max () 19:31
camelia -Inf
lizmat DeadDelta: I *will* mention it in the next P6W though
m: dd min()
camelia Inf 19:32
DeadDelta m: dd max (Int)
camelia -Inf
El_Che mr_ron: and both are way faster than the perl6 example
19:32 zakharyas joined, ggoebel joined
DeadDelta AlexDaniel: a hunch would be some math with max/min is what gives a NaN 19:32
lizmat: and ask for more mass... for crushing :P 19:33
19:33 setty1 left
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:36
19:36 cyphase left
El_Che this is on a mac with 5.18 and rakudo start 2017.01 19:38
I'll try later on my linux laptop
DeadDelta Time to upgrade :)
El_Che (I don't completely get the star versions, but it's the latest I could find)
(I'll compile it locally)
(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
Star version follow the Rakudo versions they're based on, except they get released like thrice as fewer than monthly rakudo releases
huggable: star
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
DeadDelta &
19:40 DeadDelta left 19:41 bjz joined
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:41
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
so it looks good indeed
on the second run the perl6 is the fastest (0.059s faster than the foreach) so I'll stop running it 19:45
19:45 setty1 joined
El_Che success 19:45
:)
19:46 MilkmanDan left 19:47 MilkmanDan joined
moritz PSA: I had to disable irclog.perlgeek.de 19:50
the web application process used too much memory, and brought down the whole server 19:51
it's still logging in the background
19:51 cyphase joined
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 ;-)
moritz lizmat: I updated the OS from Debian Jessie to Stretch
perlpilot: patches welcome :-) 19:54
perlpilot first someone needs to provide me a patch for some extra time and/or more brain power. :)
and maybe update my brain so that it doesn't require as much sleep
andrzejku hi 19:59
do someone want to make money with perl?
my friend aksed me as he have an offer
rindolf andrzejku: hi, I do 20:00
andrzejku rindolf okay
rindolf andrewalker: perl 6?
andrzejku can we speak here?
rindolf andrzejku: in private will probably be better
andrzejku okay 20:01
perlpilot though if it really is a Perl 6 job, it would be interesting to here the outcome :)
s/here/hear/
20:02 khw left 20:06 espadrine joined 20:09 prodotiscus joined 20:14 prodotiscus left, khw joined
samcv u: left corner bracket 20:19
unicodable6 samcv, U+23A3 LEFT SQUARE BRACKET LOWER CORNER [Sm] (⎣)
samcv, U+23A1 LEFT SQUARE BRACKET UPPER CORNER [Sm] (⎡)
samcv, 9 characters in total: gist.github.com/883a1d8bf709933658...24251e89c1
20:20 andrzejku left 20:27 zakharyas left 20:29 sftp joined 20:34 domidumont left 20:39 mr_ron left 20:40 amkhlv joined
amkhlv m: "Hi Andrei".say 20:40
camelia Hi Andrei
amkhlv perl6 -e 'for "/tmp/utf-error.txt".IO.lines { say "hi" } ' 20:41
gives : Malformed UTF-8 20:42
in block <unit> at -e line 1
where /tmp/utf-error.txt contains the word Birkhäuser
in ISO-8859
20:45 kyan left
jnthn Use "/tmp/utf-error.txt".IO.lines(:enc<ISO-8859-1>) 20:45
20:45 kyan joined
amkhlv Yes, this works. But extremely inconvenient. I have thousands of files all in different encodings. 20:46
lizmat
.oO( encoding is a bitch)
amkhlv is it possible to process file in binary format? Will regex match on binary file? 20:47
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:48
Don't think there's a module for doing encoding guessing yet 20:49
20:49 cog_ joined
jnthn afk 20:49
amkhlv Why ISO-8859-1 will never give a decoding error ? 20:51
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:55
20:56 DeadDelta joined
amkhlv Very interesting, geekosaur, I did not know that ! Thank you 20:56
20:57 colomon left
geekosaur (the utf8 invalid sequences represent multibyte sequences that can't happen, for example the reserved utf16 surrogate codepoints or codepoints outside 00000-10ffff) 20:57
20:59 awwaiid left 21:00 awwaiid joined, st_elmo left
zengargoyle m: say DateTime.new(1498597328) 21:02
camelia 2017-06-27T21:02:08Z
zengargoyle hrm... sub MAIN ( Int $now ) { ... } still keeps a numeric arg as IntStr... 21:05
21:05 awwaiid left, awwaiid joined
timotimo of course 21:06
IntStr is Int, so it matches and thus that is what you get 21:07
m: say (<100> + 0).perl
camelia 100
timotimo m: say (+<100>).perl
camelia 100
timotimo m: say (+<100>).^name
camelia Int
timotimo m: say (<100>).^name
camelia IntStr
zengargoyle that $now doesn't pass into DateTime that also asks for an Int. :( 21:10
have to to $now.Int 21:11
21:12 mcmillhj left, cog_ left
DeadDelta m: say DateTime.new(<1498597328>) 21:17
camelia 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
zengargoyle not sure i like multi method new(Int:D $posix, :$timezone=0, :&formatter) from DateTime and sub MAIN(Int $now) behaving differently....
DeadDelta Ah haha
Right, 'cause the Str candidate wins over
zengargoyle ah
DeadDelta zengargoyle: well, just coerce it to int. sub MAIN (Int() $now) {} will probably work
Oh, it won't coerce, 'cause it already an Int 21:18
timotimo yeah
DeadDelta +$now when using it then 21:19
zengargoyle is there any major difference between + and .Int? 21:20
DeadDelta Not in this case
&prefix:<+> -> .Numeric -> .Int 21:21
Just shorter to type
zengargoyle yeah... :)
DeadDelta And .Int is just nqp::add_I(self, 0, Int) 21:22
that forces it to numeric only
timotimo right, it also gets rid of any roles you may have mixed in
21:30 rindolf left
[Coke] ff 21:32
ww
DeadDelta buggable: drwa 21:33
buggable: draw
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!
timotimo not as popular as it used to be
DeadDelta is very happy with a new upgrade to perl6.party's markdown pre-processor
``Iterator|'s`` gets converted to [`Iterator`'s](docs.perl6.org/type/Iterator). ``.pull-one`` -> [`.pull-one`](docs.perl6.org/routine/pull-one) 21:34
Gonna link the hell out of articles now :) 21:35
Would be cool to have an end point that displayed search results on docs site. Like docs.perl6.org/search/meow would show all results for "meow" 21:36
[Coke] DeadDelta: on my todo list, fwiw.
DeadDelta [Coke]++ 21:37
[Coke] ... I mean, it's been a year, but I'll get to it eventually. :)
DeadDelta :D
[Coke] the whole thing is just so (&#$ slow. :|
gets frustrating to try to hack on stuff when the build takes a half hour. 21:38
21:38 setty1 left
DeadDelta Making it faster sounds like a fun project. 21:40
Polish all that nasty code in htmlify.p6. Make it pretty and maintainable.
And fastah
21:41 DeadDelta left 21:44 robertle left
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:44
but it does need to be made a little smarter/more robust 21:45
21:47 |oLa| left 21:51 DeadDelta joined 21:52 DeadDelta left, DeadDelta joined
DeadDelta MasterDuke: it told me to if meant to use "all" so I did. 21:59
benchable6: m: 42 22:00
benchable6 DeadDelta, ¦m:: «Cannot find this revision (did you mean “all”?)»
MasterDuke hm, i think that's a generic whateverable feature, will try to fix for benchable
timotimo good idea %) 22:01
22:02 bjz left 22:03 ttkp6 joined, FROGGS joined, cyphase left
MasterDuke can probably add support for multiple commits with compare, it just won't do the bisecting 22:05
22:05 cpage_ joined, cyphase joined, cyphase left 22:06 cyphase joined 22:09 cyphase left 22:10 cyphase joined, cyphase left 22:13 cyphase joined 22:14 awwaiid left 22:15 awwaiid joined 22:16 cyphase left 22:18 nadim_ left 22:20 cyphase joined 22:23 cyphase left 22:24 Voldenet joined, Voldenet left, Voldenet joined, cyphase joined 22:30 zacts left, wamba left 22:31 cpage_ left 22:34 cpage_ joined 22:36 mcmillhj joined 22:37 MilkmanDan left, MilkmanDan joined 22:40 ufobat left 22:48 cog_ joined 22:53 Cabanossi left 22:55 Cabanossi joined 23:03 FROGGS left 23:07 cpage_ left 23:10 pmurias left 23:11 cpage_ joined
Geth perl6-examples: 99856ad51e | (David Warring)++ | 2 files
populate META6 provides. add t/test-meta.t
23:16
23:19 kyan left 23:22 itaipu joined 23:24 obfusk joined 23:28 bwisti joined 23:29 cpage_ left
grondilu weird: I can't access the logs on irclog.perlgeek.de/perl6/today 23:31
23:32 BenGoldberg joined 23:33 kyan joined
[Coke] they're down for maint. 23:34
DeadDelta they're down 'cause of apparent memory leak on newer Perl 5s. Patches welcome: github.com/moritz/ilbot 23:36
moritz: they're running in their own user don't they? Maybe perlbrewing older perl for just that user can be a temporary fix?
MasterDuke moritz: i've used heaptrack a couple of times recently to help out with memory issues 23:40
23:41 zacts joined
timotimo just kill the process daily :P 23:43
23:47 cpage_ joined
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:47
Rewrote the hell out of it as soon as they let me. 23:50
23:53 Cabanossi left, mcmillhj left 23:54 itaipu left 23:55 Cabanossi joined
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