»ö« 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 left 00:01 mcmillhj joined 00:06 mcmillhj left 00:09 breinbaas left 00:11 mcmillhj joined
Xliff .tell sena_kun Net::ZMQ4::Socket.send($msg, $flags) isn't detecting $flags as Int 00:14
yoleaux Xliff: I'll pass your message to sena_kun.
00:15 breinbaas joined 00:16 mcmillhj left
Xliff .tell sena_kun Correction, Jupyter::Kernel::Service is sending a Net::ZMQ4::Message instead of a Str or a Blob. Might want to add another multi 00:22
yoleaux Xliff: I'll pass your message to sena_kun.
00:22 mcmillhj joined 00:27 mcmillhj left 00:28 cdg joined, newb2 joined 00:32 cdg left 00:33 Cabanossi left, pierre_ joined 00:34 Cabanossi joined
newb2 Here's an easy one. In the perl6 REPL how can I run an external script.p6 to modify the perl6 environment? 00:36
Just as I can type "source .bashrc" at the shell prompt and the shell environment will be modified
00:37 mcmillhj joined
newb2 If you're wondering why, I find that the Readline bindings in the shell & in perl6 are by no means identical 00:38
So I need to issue Readline commands to customize the perl6 environment to set vars, bind keys, etc
So the question is how can Ido the equivalent of "source .bashrc" in perl6? 00:40
AlexDaniel maybe EVALFILE ‘smth.p6’ 00:41
japhb newb2: I'm not sure how global Readline's state is, but note that you can use modules in the REPL, and in fact a common trick is to set an alias for your version of the repl that calls `perl6 -M Module::With::My::Favorite::Stuff` so that it's loaded on REPL start
ugexe also require my-script.pl6
newb2 Yes but if I run a shell script in eg bash it doesn't change the environment unless Is source it
Is perl6 different? 00:42
ugexe what do you consider the "environment" in perl6?
00:42 mcmillhj left
newb2 when I set a binding with a headline function that is persistent for the session 00:42
s/headline/readline/
japhb Depends what you mean: are you trying to change the env vars that are passed on to child processes? Or just want to change the state of the running perl6? The latter is much easier in perl* than it is in bash, because perl does not do its normal business by spawning subprocesses all the time. 00:43
newb2 I want to customize the bindings in the REPL, and I have done it
But now I need to run a batch file that will make persistent changes 00:44
teatime www.cbc.ca/news/canada/british-colu...-1.4256694
newb2 Persistent that is for the rest of the session
japhb In other words, when you use a module in Perl, the *default* behavior is that it affects the current running Perl process; in Perl 6, it also tries to limit the scope somewhat to only the current lexical scope, but this works out usually to be what you meant in the REPL.
00:44 IndexMe joined
newb2 OK thanks will give it a spin .. :/) 00:44
00:44 newb2 left
japhb newb2: What is a 'session' in this context? In a single REPL, or every time you start the REPL in that current login session, or forever? 00:45
00:47 llfourn joined 00:51 IndexMe left
samcv what do you guys think the max number of codepoints per grapheme should be. currently, moarvm has a hard limit of 1024 00:52
m: ("\c[COMBINING ACUTE ACCENT]".ord xx 1025).chrs.say 00:53
camelia Too many codepoints (1025) in grapheme
in block <unit> at <tmp> line 1
00:53 mcmillhj joined
geekosaur ultimately it should probably be dynamic. practically, you'd be justified in a fairly low limit like 15 00:54
samcv i mean zalgo text can have a big number on them? not sure how many 00:56
00:59 mcsnolte left
AlexDaniel m: ("\c[COMBINING ACUTE ACCENT]" x 5).chars.say 01:00
camelia 5
samcv AlexDaniel, that is a bug
AlexDaniel samcv: ticket?
samcv uh may not have one?
i will be fixing it for my grant though
it only occurs in certain cases
01:01 mcmillhj left
AlexDaniel samcv: RT #131950 01:03
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131950
01:04 cdg joined
samcv heh thanks 01:04
i discovered it during grant work. probably should have made a bug
i discovered it when i started working on the partial normalization during concatenation 01:05
AlexDaniel by the way, this is one of my favorite bugs: RT #131801 01:06
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131801
AlexDaniel there's something lovely about it, I don't know
01:07 cpage_ left
AlexDaniel not as good as RT #127473 though 01:07
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=127473
01:08 cdg left
samcv is that the same issue? 01:09
hm yeh likely
01:09 cpage_ joined
AlexDaniel :O 01:10
indeed
samcv i'll fix this bug after i push my initial work on changing the mvm representation of synthetics :)
well to my own branch... need to figure out what is causing segfault
AlexDaniel merged 01:11
samcv maybe jnthn or someone can take a look. maybe the fixed size allocator doing something i'm not expecting
01:12 BenGoldberg left, mcmillhj joined
AlexDaniel m: my $x = "\c[COMBINING ACUTE ACCENT]"; my $b = ‘ß’ ~ $x; say $b.uc 01:15
camelia ŚS
AlexDaniel interesting
01:15 BenGoldberg joined 01:19 mcmillhj left
samcv now since we had release i can merge in my knuth morris pratt algorithm too 01:23
woo
01:23 ijneb joined
ijneb How do I do an 'or' expression in givens 01:24
in a when
like when 'N' || 'n' { }
AlexDaniel 'N' | 'n' should work 01:25
it will create a junction which will do the right thing
or maybe /:i n/
mmm /:i ^n$/
given $foo.fc { when 'n'.fc } # ? 01:26
samcv i was gonna say that AlexDaniel yeah
or even # when .fc eq 'n' if you don't know the case of the given 01:27
AlexDaniel when $_ ~~ 'N' || $_ ~~ 'n' # I suppose this should work too?
samcv or, when .fc eq 'N'.fc etc etc
01:28 mcmillhj joined
ijneb I was already doing that samcv 01:29
I need something like this: `when 'N' | $stage == 1
is it possible to do that?
01:30 raschipi joined
AlexDaniel m: my $stage = 1; given ‘z’ { when $_ eq 'N' || $stage == 1 { say ‘hello’ } } 01:31
camelia hello
AlexDaniel m: my $stage = 0; given ‘z’ { when $_ eq 'N' || $stage == 1 { say ‘hello’ } }
camelia ( no output )
samcv i'm writing some moarvm documentation on our string implementation since we don't really have anything 01:32
this is what i have so far: gist.github.com/samcv/07d097d60751...31afffc7a3
AlexDaniel samcv++ 01:33
01:33 mcmillhj left 01:38 sirhalos joined
MasterDuke nice 01:39
01:43 sirhalos left 01:44 mcmillhj joined 01:46 ilbot3 left, Cabanossi left 01:49 Cabanossi joined
AlexDaniel samcv: hey 01:51
samcv hey 01:52
AlexDaniel m: dd (0x0F75.chr x 2).uninames
camelia ("TIBETAN VOWEL SIGN AA", "TIBETAN VOWEL SIGN U", "TIBETAN VOWEL SIGN AA", "TIBETAN VOWEL SIGN U").Seq
AlexDaniel samcv: is it correct or not? ↑
samcv probably correct
01:52 ilbot3 joined, ChanServ sets mode: +v ilbot3
AlexDaniel m: dd (0x0F75.chr ~ 0x0F75.chr).uninames 01:52
camelia ("TIBETAN VOWEL SIGN AA", "TIBETAN VOWEL SIGN AA", "TIBETAN VOWEL SIGN U", "TIBETAN VOWEL SIGN U").Seq
samcv m: (0x0F75.chr x 2).NFC.say
camelia NFC:0x<0f71 0f74 0f71 0f74>
samcv m: (0x0F75.chr).NFC.say
camelia NFC:0x<0f71 0f74>
samcv tibetan is pretty wild
AlexDaniel samcv: but shouldn't it normalize the order? 01:53
01:53 mcmillhj left
samcv hm 01:53
yeah that's probably the same issue
with the repetition that is
m: (0x0F75 xx 2).chrs.uninames.say 01:54
camelia (TIBETAN VOWEL SIGN AA TIBETAN VOWEL SIGN AA TIBETAN VOWEL SIGN U TIBETAN VOWEL SIGN U)
Geth doc: a8e916ed77 | (Will "Coke" Coleda)++ | doc/Language/operators.pod6
fix typos
doc: ccdfa463f6 | (Will "Coke" Coleda)++ | doc/Language/unicode_texas.pod6
remove trailing whitespace;
samcv m: (0x0F75 xx 2).chrs.uniprops('Canonical_Combining_Class').say
camelia (129 129 132 132)
AlexDaniel samcv: right, if you append something it goes away
samcv m: (0x0F75 xx 2).chrs.uniprops('GCB').say
camelia (Extend Extend Extend Extend)
01:54 cpage_ left
samcv yeah that's just the same issue 01:55
but sounds like a good roast test
if you want to add that one?
i like it
AlexDaniel I've left it as a comment on the ticket 01:57
sounds like a great test to have, yes
02:01 pierre_ left 02:03 mcmillhj joined 02:04 cpage_ joined 02:07 raschipi left 02:09 cpage_ left, mcmillhj left 02:13 pierre_ joined
samcv ok cool, my synthetic rework is now working and not crashing :) 02:22
02:29 mr-foobar left 02:32 Cabanossi left 02:33 mcmillhj joined, mr-foobar joined 02:34 Cabanossi joined 02:37 noganex_ joined 02:39 noganex left 02:41 mcmillhj left 02:52 mcmillhj joined 02:58 mcmillhj left 03:01 cpage_ joined 03:02 Cabanossi left 03:04 Cabanossi joined
samcv AlexDaniel, fixed that repeat bug. running spectest now 03:06
AlexDaniel samcv: I didn't expect this to happen so soon 03:07
samcv++
but it sounds too good to be true :)
samcv it's not though
:-) 03:08
03:10 mcmillhj joined
skids wonders how much time is wasted in doing double hash lookups for stuff like nqp::say(nqp::atkey(%p,"a")) if nqp::existskey(%p, "a") 03:17
03:18 mcmillhj left
BenGoldberg m: my atomicint $x = 0; await start { my $y = 0; $y += 1.rand ** 2 + 1.rand **2 <= 1 for ^1000; $x ⚛= $y } xx 10000; say 0.0004 * ⚛$x; 03:18
camelia (signal XCPU)
samcv skids, i could combine it into one op. but not sure what the return would be
BenGoldberg m: my atomicint $x = 0; await start { my $y = 0; $y += 1.rand ** 2 + 1.rand **2 <= 1 for ^1000; $x ⚛= $y } xx 1000; say 0.004 * ⚛$x; 03:19
camelia 3.116
skids samcv: yeah, metrics needed to decide what it is worth. 03:20
samcv m: my atomicint $foo; for 0..* { .say if $foo + 1 != ++$foo }
skids, i mean what would the return value be 03:21
03:21 atroxaper joined
camelia (timeout) 03:21
BenGoldberg Are our new radioactive operators more cpu intensive than normal ones? 03:24
03:25 atroxaper left
TEttinger they have a half-life 03:26
skids samcv: I'd imagine the construct to avoid it would end up being somethng like adding an nqp::hashslot such that one could 'if slot = nqp::hashslot(%foo, "bar") { nqp::some_func($parmx, $slot.contents, $parmy) }' 03:27
samcv so what would it return if the key isn't found? 03:29
03:30 mr-foobar left, leedo left, leedo joined 03:31 mcmillhj joined
skids samcv: well, something false and type-compatible with whatever a slot is. 03:31
03:31 leedo left, leedo joined 03:32 Cabanossi left
skids or, maybe just plain false. 03:32
03:32 mr-foobar joined
samcv AlexDaniel, fix pushed to MVM 03:33
03:33 atroxaper joined 03:34 Cabanossi joined 03:35 mcmillhj left 03:37 atroxaper left 03:38 pierre_ left 03:39 cdg joined
skids Hrm, on the HLL level... 03:39
m: my %h = (:a,:b); my $a := %h<a>; my $c := %h<c>; %h.keys.say; $c = 42; %h.keys.say; %h.perl.say 03:40
camelia (a b)
(a c b)
{:a, :b, :c(42)}
skids Can we introspect $a and $c to see if the key existed...
03:40 leedo left, leedo joined 03:43 cdg left 03:44 unclechu left 03:49 unclechu joined 03:51 mcmillhj joined, cdg joined 03:56 cdg left, mcmillhj left 04:00 Cabanossi left 04:01 pierre_ joined 04:02 Cabanossi joined 04:03 mcmillhj joined 04:07 mcmillhj left 04:11 skids left 04:18 kannan joined, mcmillhj joined 04:23 mcmillhj left, ssm joined 04:26 khw left 04:30 mr-foobar left 04:31 cdg joined 04:34 xtreak joined, mcmillhj joined, mr-foobar joined 04:35 cdg left 04:40 Xliff left 04:41 mcmillhj left 04:45 Actualeyes left 04:52 mcmillhj joined 04:54 pierre_ left 04:58 mcmillhj left 05:02 leedo_ left, shadoxx_ left, telex left, JimmyZ left, Technaton left, FiendKing04 left, plicease left, mr-foobar left, JimmyZ joined, robinsmidsrod joined, telex joined, integral joined, leedo_ joined, integral left, integral joined 05:03 SmokeMachine joined, jkva_ joined, plicease joined, ccakes joined 05:04 shadoxx joined, Technaton joined, sacomo joined, eater left, FiendKing04 joined, unicodable6 left 05:05 statisfiable6 left, greppable6 left, bisectable6 left, releasable6 left, quotable6 left 05:06 mr-foobar joined 05:07 eater joined 05:12 mcmillhj joined 05:15 wamba joined 05:16 mcmillhj left 05:24 mcmillhj joined 05:28 mcmillhj left 05:30 astj joined, astj_ left 05:31 Cabanossi left, mr-foobar left 05:32 Cabanossi joined 05:35 mcmillhj joined 05:36 mr-foobar joined, Actualeyes joined 05:38 ufobat joined 05:40 mcmillhj left 05:51 lowbro joined, lowbro left, lowbro joined 05:52 Skarsnik joined 05:57 Skarsnik left, astj left 05:58 astj joined 06:00 Cabanossi left 06:01 mr-foobar left 06:02 Cabanossi joined 06:04 espadrine joined
lizmat skids: you can't, because the key doesn't exist until you actually assign it 06:05
*that's* the moment the scalar container gets bound to the hash, not before
thanks to the magic of $!whence in Scalar containers
06:05 mr-foobar joined
lizmat breakfast& 06:08
06:10 lowbro left 06:14 pierre_ joined 06:15 lizmat_ joined, cpage__ joined 06:16 BenGoldberg left 06:17 cpage left, cpage__ is now known as cpage 06:18 lizmat left, zacts left 06:21 mcmillhj joined, shmibs left 06:23 shmibs joined 06:24 darutoko joined 06:26 mcmillhj left 06:29 ryu0 left
kannan i want to continually parse a log file and do something when a particular security event is found. How does one move file pointer to the line that has not yet been read and handled? 06:30
06:31 mr-foobar left 06:32 Cabanossi left, lowbro joined, lowbro left, lowbro joined, Cabanossi joined, mr-foobar joined 06:33 mcmillhj joined 06:35 andrzejku_ joined
jast kannan: generally speaking you can remember the seek offset ('tell' method on the IO::Handle object to get the position, 'seek' to move to it later) 06:36
of course this will not work if the logfile gets truncated or rotated in the meantime
kannan jast : ok i see it. maybe i can include a perl Tail::File and output to another file where the lines can be deleted after being parsed. 06:37
06:37 wamba left 06:38 mcmillhj left
kannan is there any equivalent module in perl6 to tail a file? 06:38
06:39 espadrine left
jast there's IO::TailFile: github.com/skaji/perl6-tail -- I don't have any experience with it, though 06:39
it's specifically for a 'following tail' thing, though
06:39 konsolebox left 06:42 eroux joined
kannan jast thanks i will try and post result 06:44
06:45 konsolebox joined, mcmillhj joined 06:46 snarkyboojum joined 06:47 cdg joined
kannan it looks nice - IO::TailFile . It has a 'reactive way' and uses a whenever ... i am not sure what the difference is between a tail -f emulation and the 'reactive way'. but iwill use it and see what happens. 06:48
06:50 mcmillhj left 06:51 cdg left, andrzejku_ left 06:52 ryu0 joined 06:58 mcmillhj joined, eroux left 07:02 mr-foobar left 07:03 mcmillhj left 07:04 ijneb left 07:05 robertle left 07:06 mr-foobar joined 07:08 AnotherNick joined 07:09 xtreak left 07:10 domidumont joined, xtreak joined, mcmillhj joined, lizmat_ left 07:12 domidumont left 07:14 domidumont joined, xtreak left 07:15 mcmillhj left 07:16 nadim joined 07:18 wamba joined
snarkyboojum Supplies are cool! 07:19
kannan ok IO::TailFile works well, even on very fast growing file! 07:20
07:20 xtreak joined
snarkyboojum I'm a bit confused by line 52 of IO::TailFile - it only seems to read 2048 bytes for each file event that it's processing? 07:21
07:21 mcmillhj joined
snarkyboojum or am I misreading that 07:21
07:22 domidumont left 07:23 domidumont joined
kannan now i need to search for a particular string in the line which will be SecurityEvent=InvalidPassword and if found, i need to write it to another file. sorry to ask like this, truly don't want to, but i am new to perl6 as well as programming itself. 07:23
i think i got , i am to use spurt. 07:25
07:26 mcmillhj left
kannan but how to append the line to the same file? 07:26
snarkyboojum can you open the file in append mode? 07:28
.open(:mode<rw> :append) 07:29
I don't really know :)
07:29 epony left
jast spurt is a convenience thing to write a whole file at once. the normal approach is to open the file (in this case, probably in append mode), write things to it as needed, and close it when you're done 07:29
kannan is it same sybtax as open in perl 5, thats what results are showing. where to search sytax docs from within the installation for perl 6? 07:30
ok i think i found 07:31
examples.perl6.org/categories/cookb..._file.html
if i know there is a function 'open' in perl6, how to look it up in a documentation?
snarkyboojum I was looking at docs.perl6.org/type/IO::Handle#method_open 07:32
07:32 mr-foobar left
moritz kannan: you go to docs.perl6.org and type "open" in the search box 07:32
kannan moritz : thanks, thats what i was asking ! 07:33
snarkyboojum hello moritz!
moritz \o snarkyboojum
snarkyboojum o/ 07:34
07:34 mr-foobar joined
snarkyboojum I see you have a cool looking perl 6 book out :) 07:34
moritz snarkyboojum: yes, feedback has been very positive so far 07:35
snarkyboojum I'm catching up on a few years of perl 6 updates! I'm going to grab a copy and give it a read.
moritz snarkyboojum: that great. Do let me know if you liked it 07:36
07:36 mcmillhj joined
moritz (and if yes, maybe write a review on amazon :D ) 07:36
snarkyboojum is 'Perl 6 by Example' available? 07:37
jast it's funny, I can buy your book as an e-book for $19.99... or individual chapters for $29.99 each 07:38
moritz I know 07:40
that's a weird feature stemming from the fact that apress is part of Springer
jast oh, makes perfect sense, then
moritz and Springer tends to publish mightily expensive text books, where you do sometimes want to purchase a chapter chapter
07:40 mcmillhj left
moritz s:2nd/chapter/cheaper/ 07:40
jast yeah, I know all about expensive textbooks... fortunately that time where I needed many of them is all over :) 07:42
moritz jast: what did you study?
jast knowledge engineering and computer science, and later artificial intelligence which I quit early when I got fed up with not doing any actual work 07:43
moritz I did physics, and for the basic courses, the textbooks were kinda OK priced (or available in the library); stuff for my diploma thesis tended to be more specialized and much more expensive
jast of course some fields have even more ridiculously expensive books
moritz jast: ah good
snarkyboojum I'm pretty sure I just picked up the kindle version for $11.04 07:44
jast worst I ever had to buy was < 300 pages, cheapest I could find was €80 used
07:44 nadim left
moritz wow 07:44
jast the book wasn't very good either
07:45 nattefrost joined, kannan left
moritz I remember www.amazon.com/Electronic-Mesoscop...00AKE1T2O/ being astonishingly approachable, and not cheap 07:45
jast one of the best math textbooks I ever bought was <20 € 07:46
moritz but they now have used paperback for ~20USD
jast (new, paperback)
07:47 kannan joined
kannan moritz : what is name of the book? is it in amazon? 07:48
snarkyboojum moritz: that can't be your latest and most up to date portait photo :)
07:49 araraloren_fake joined
moritz kannan: "Perl 6 Fundamentals", and yes 07:49
kannan ty 07:50
moritz kannan: www.amazon.com/Perl-Fundamentals-E...1484228987
snarkyboojum: no, but it's the only one where I don't look like a total ass-hat
:-)
07:50 mcmillhj joined
snarkyboojum moritz, ah - I was going to ask you for your anti-aging secret 07:51
moritz and there's no rule you have to take the latest photo :-)
snarkyboojum absolutely :) 07:53
07:55 mcmillhj left
snarkyboojum Ooh, the Docker tips are great. Ok - I have reading to do ;) 07:58
08:01 dakkar joined, jonas1 joined, mr-foobar left
kannan moritz : i made the purchase! 08:01
08:03 mcmillhj joined 08:05 mr-foobar joined
moritz kannan: thanks! 08:07
08:08 mcmillhj left
kannan do you think i should learn programming with perl6 first, everything seems to say 'learn python' or 'javascript' (and i always do the exact opposite, due to my nature, lol) 08:10
anyway its what i am doing :) 08:11
moritz snarkyboojum: for the Perl 6 Regexes book I'm creating a separate Docker image with stuff pre-installed 08:14
kannan i am seeing docs.perl6.org/routine/match#class_Str . If i want to do a IF condition, then there should be a true/false. [ IF match is ture, the do something]. but the syntax says the output will be the $pat only? 08:16
jast kannan: python and javascript have a lot more followers and there probably exist more python/javascript libraries at this point, but realistically the biggest danger is that if you start with Perl 6, eventually every other language will seem fundamentally lacking to you ;)
kannan jast : very good. i feel happiness with perl. maybe i will become a good coder some day. (its not required for me in my life really, but i want to) 08:17
snarkyboojum if you want to, then you probably will :)
08:19 araujo_ joined
jast kannan: "if" tends to be somewhat more flexible about the exact return type. in this case, "match" returns (Any) if there is no match, which is taken to be false 08:19
08:19 mcmillhj joined
jast also, you can use the smart match operator ~~ instead of the match method for more conciseness, example: 'abc' ~~ /x/ 08:20
08:22 araujo left
ryu0 kannan: C is rarely mentioned anymore, but it has value still. just not to everyone. 08:27
08:27 zakharyas joined 08:28 mcmillhj left 08:31 robertle joined 08:32 lizmat joined
snarkyboojum ryu0, a but like Ruby then :P 08:33
bit*
08:36 astj left 08:37 astj joined 08:38 xtreak left 08:39 mcmillhj joined
snarkyboojum moritz, That's a great way to do things. Docker ftw. I use it quite a bit in a different context in my $dayjob 08:44
08:44 mcmillhj left 08:49 stmuk_ left, sena_kun joined
sena_kun 08:50
yoleaux 22 Aug 2017 23:59Z <Xliff> sena_kun: You're right. It's .send related.
00:14Z <Xliff> sena_kun: Net::ZMQ4::Socket.send($msg, $flags) isn't detecting $flags as Int
00:22Z <Xliff> sena_kun: Correction, Jupyter::Kernel::Service is sending a Net::ZMQ4::Message instead of a Str or a Blob. Might want to add another multi
08:50 TEttinger left 08:51 SmokeMachine left, kannan left, SmokeMachine joined 08:52 jnap_ joined, BuildTheRobots joined 08:53 lizmat_ joined, lizmat left
sena_kun .tell Xliff messing with Net::ZMQ4::Message on send-side is a bit discouraged. send for Str|Blob should be used unless you want to meet up memory corruptions of your message. I don't see anything in the code right now what makes by hands message construction a necessarity, so just try to send $_ directly. 08:57
yoleaux sena_kun: I'll pass your message to Xliff.
moritz .tell kannan btw there's also a a Perl 6 "port" of the "Think Python" book: www.amazon.com/Think-Perl-Like-Com...491980559/ 08:58
yoleaux moritz: I'll pass your message to kannan.
08:58 nhywyll joined
moritz .tell kannan with a free ebook version at greenteapress.com/wp/think-perl-6/ 08:58
yoleaux moritz: I'll pass your message to kannan.
08:59 mcmillhj joined 09:06 kannan joined, mcmillhj left 09:16 BuildTheRobots left, stmuk_ joined 09:17 BuildTheRobots joined
kannan jast : thanks, got called away. the smart match works ok, but the $line is now over written with the value of the $pat - if $line ~~ $pat) {say $line;} 09:24
yoleaux 08:58Z <moritz> kannan: btw there's also a a Perl 6 "port" of the "Think Python" book: www.amazon.com/Think-Perl-Like-Com...491980559/
08:58Z <moritz> kannan: with a free ebook version at greenteapress.com/wp/think-perl-6/
kannan yoleaux : thats very nice , i had got disconn when away.thank you
ok sorry ignore last question 09:28
09:28 xtreak joined 09:31 mr-foobar left 09:32 mr-foobar joined 09:40 zengargoyle left 09:44 cdg joined 09:48 lizmat_ left, cdg left 09:54 cdg joined 09:55 araraloren_fake left
kannan i am simply able to do this : if $line.match($pat) { say $line ; }; which is very intuitive, but when reading up the docs, there did not seem any way explained for this. 09:55
gfldex m: say lines.WHAT 09:56
camelia (Seq)
yoleaux 22 Aug 2017 23:59Z <Zoffix> gfldex: Hi. I was hoping you would be willing to re-join the Perl 6 community. I realize you left because I was an asshole on your PRs and talked badly about you and your code on IRC.
00:00Z <Zoffix> gfldex: It wasn't right for me to do that and I apologize. I intend to do my best to avoid such awful behaviour in the future.
00:00Z <Zoffix> gfldex: Your absence from the community is very tangible and I know several people miss you. I hope you would be willing to accept the invite to the perl6 GitHub org and come back to us: github.com/perl6
gfldex kannan: docs.perl6.org/type/Seq#(Cool)_routine_match 09:57
we do a bad job at explaining Cool and it's relationship to the rest of the type system 09:58
09:59 cdg left
Geth doc: 5c75f77e75 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/atomicint.pod6
Add missing awaits; MasterDuke++
10:00
10:01 Cabanossi left, mr-foobar left, mr-fooba_ joined
kannan ok i will try to understand it, starting from adverbs 10:01
gfldex .tell zoffix you are not the reason why I stepped back from Perl 6. Your behaviour was just a casus belli. I wanted to actually use Perl 6 instead of making it more useable for others for a change. Sadly every time I try, I end up sending complains toward jnthn reguarding crashs and moar eating all my rams.
yoleaux gfldex: I'll pass your message to zoffix.
Geth doc: 70077e9a61 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/atomicint.pod6
Make wrong example markings more obvious
10:02
10:02 Cabanossi joined 10:05 ijneb joined 10:07 araraloren_fake joined 10:23 domidumont left 10:25 ShalokShalom_ joined 10:28 ShalokShalom left 10:30 ShalokShalom_ is now known as ShalokShalom
sena_kun arnsholt, ping~ 10:32
kannan i am using the IO::Tailfile with react {} , this writes lines that match a pattern to another file. Should i use open($my-file-to-write, :a) inside the react {} and close when program exits (its never supposed to , i want to keep it running all the time) OR should the file be open in append mode PRIOR to the react{}. both are working, but i cannot see what the difference is.
i can open and close the file handle inside react, or just open once in append mode at start of program. which is correct way? 10:33
sena_kun kannan, I am not a professor, but I'd say that the second approach is better. This way you do less IO calls(how much less depends on how often your react block is fired). 10:37
kannan sena_kun : that is what i also thought (and did). thanks. 10:38
sena_kun There may be some pitfals, for example, on power outage file system doesn't save the rest of the file(or not) or something like that, it depends on what you need, I guess, but the second seems better for me. 10:40
kannan now the written file can be handled concurrently by another script at the same time ? write.p6 writes and read-write.pl reads and writes , both same file. this will not present any problems i hope? 10:43
sena_kun There will be problems, because of concurrency. :/ 10:44
kannan i see.
sena_kun You need access synchronization.
10:45 nattefrost left
sena_kun kannan, see en.wikipedia.org/wiki/Readers%E2%8...riter_lock for further explanations. 10:45
kannan no, i will write each line to its own file and close the file insdide the IO write script. there is a way to scan dirs for new files and handle them from the other read-write script i hope. 10:46
10:46 nattefrost joined, Zoffix joined, rindolf joined
Zoffix gfldex: understood. Thanks. 10:46
gfldex kannan: you can do that but expect it to break on windows or on network file systems. 10:47
Zoffix kannan: you can accomplish that using advisory locking with filehandles: docs.perl6.org/type/IO::Handle#method_lock
kannan basically what i want to do is analyse security events in a log file and ban IP addresses with iptables when needed. the IO will write only lines with offending IPs bassed on the value of SecurityEvent=something
gfldex kannan: i would write them to a log file and a fifo 10:48
or some other form of IPC
kannan the log file is already generated, by asterisk pbx daemon. i am looking for a way to handle this as fail2ban isnt working so well. 10:49
Zoffix kannan: open() gives you an IO::Handle object. So you could do my $fh = open 'foo', :a; then when writing do $fh.lock; $fh.put: "Stuff"; $fh.close; That'll give exclusive lock; when reading do $fh.lock: :shared; $fh.slurp (or whatever other reading method you wanna use) and then $fh.close. If you don't wanna close then do $fh.flush; $fh.unlock (no need to .flush on reads) 10:50
kannan ok i have to read up on each of this first. thanks gfldex and Zoffix 10:51
Zoffix .lock will basically sit and wait for the other script to finish writing. This way two or more scripts can work on the same file without stepping on each others' toes. 10:54
timotimo sena_kun: the react block body only runs a single time 10:55
10:56 nattefrost left, nattefrost joined
sena_kun timotimo, I meant possible whatever inside. Like `whenever new-cool-event -> { open-file-again; do_stuff; close-file }` instead of `my handle = blah; whenever event -> { write to file with locking; LAST { cleanup() } }`. 10:58
the wording was not the best, true. 10:59
timotimo ah
10:59 skids joined
Ulti www.reddit.com/r/programming/comme...h=7392281b <--- LOL 11:04
timotimo yeah, that cracked me up, too 11:05
Ulti its kind of funny because ligature support in text editors is a thing lots of people genuinely like, the only difference here is IDEs can leave the ligature conversion in the source like setting tab indent to n-spaces :3 11:06
11:10 araujo_ left, araujo joined
Ulti that reddit thread is actually really quite interesting for every bogus "but how do I type things" complaint there are people seeing the upside to unicode being supported in programming for the programmer 11:11
to date unicode support only ever meant for the applications we create its really weird no one has considered how it might be worth dog fooding given we all constantly use myriad maths operators 11:12
gfldex I didn't like unicode operators at all until I made it easy for me to write them. :)
Ulti I didnt until I realised ctrl+cmd+space was a context menu everywhere in macOS 11:13
I still dont write them purely out of fear but perhaps I should change that
especailly as I use set operators a lot and those look so nice
and it would be nice if reading code helped me get better at reading algo papers 11:14
timotimo this is basically exactly the same situation as { and } not being available on old keyboards and therefor we got trigraphs in C 11:15
gfldex I found that enclosing filenames in ⟨⟩ is quite nice as it will help me spot filenames with trailing or leading whitespace and works with files that contain quotes. (And yes, those exist.)
timotimo except our texas variants aren't nearly as terrible as trigraphs
11:17 pierre_ left
kannan how to delete one line in a file? if trying by replacing it with a blank, but carriage return remains. 11:19
sena_kun m: say "one\ntwo".subst("one\n", ''); 11:20
camelia two
sena_kun kannan, ^?
kannan oh ok 11:21
Ulti timotimo: yeah I just read that in the thread I had no idea that was true in C 11:23
11:27 nhywyll left 11:30 zakharyas left 11:36 domidumont joined 11:39 cdg joined 11:40 wamba left 11:43 cdg left 11:44 snarkyboojum left
skids .tell lizmat WRT hash key autoviv, is $!whence set differently if you := to an existing key versus one that doesn't exist? I'm thinking what about a "with-exists"? 11:50
yoleaux skids: I'll pass your message to lizmat.
11:52 cognominal joined
Zoffix .hug 12:00
12:03 huggable left
Zoffix .hug 12:04
12:04 huggable joined, ChanServ sets mode: +v huggable
Zoffix .hug 12:04
huggable hugs everyone
Zoffix .hug me
huggable hugs Zoffix
Zoffix .hug buggable
huggable hugs buggable
tyil hugs Zoffix
:3
Zoffix \o/
12:04 araraloren_fake left 12:06 raschipi joined 12:09 xtreak left 12:12 SmokeMachine left, SmokeMachine joined, parisba_ joined, xtreak joined 12:14 xtreak left 12:20 lizmat joined 12:24 skaji joined 12:26 olinkl joined, zakharyas joined 12:27 lizmat left 12:30 Cabanossi left
kannan i am not able pass a comma separated line into a hash. i pasted the output and the code here -> pastebin.com/cecuibJK 12:30
moritz kannan: $line is just a string 12:31
kannan: so, a single element
hence "Odd number of elements found where hash initializer expected" 12:32
Geth perl6.org: b1e6f5d029 | (Zoffix Znet)++ (committed using GitHub Web editor) | source/resources/index.html
Update URL for Rakudo.Party blog

Also, use HTTPS
12:32 Cabanossi joined
moritz kannan: you might want $line.split(',') or something like that 12:32
kannan i thought we are able to define a hash like $my-hash = (a=>1, b=>2) ; and can thus drop the $line into it. 12:33
12:33 Actualeyes left
moritz you can define a hash like my %h = a => 1, b => 2; 12:34
kannan moritz : thanks, i will try
moritz but only if you write that in source code
Zoffix kannan: if you write in code, yes, but $line is just a single string of text, it doesn't get automatically interpreted as code.
moritz a string isn't automatically interpreted at source code
*as source code
kannan ok
Zoffix kannan: you're likely looking for $filename.IO.lines».split(",").flat».split("=", 2).flat -> $key, $value is copy { $value .= substr: 1, *-1; } 12:40
Take lines of file, for each of them, split on ",", then on each of the resultant values, split on "=" with at most 2 chunks made. Then the $value .= substr business is to remove the quotes from $values
kannan Zoffix: !! i could never have written something like this. i will try to understand it. Thanks a lot! 12:41
12:42 pwr22 joined
Zoffix Any time. The "»" thing is called a hyper operator; it calls the method that follows on each of the items in the list. The `.=` thing is equivalent to $value = $value.substr, except you don't have to type $value twice. 12:43
pwr22: \o 12:44
Welcome \o/
pwr22 Hey
I used to be in here but fell off of IRC when my I forgot the credentials for my ZNC setup... 12:45
Zoffix :) 12:47
pwr22 Sounds like the OSX has a very nice consistent context menu for entering unicode things
I wish that existed everywhere, then I'd have zero complaints ;)
12:47 raschipi left
El_Che pwr22: I hate with passion, the IOS-ization of osx 12:48
pwr22: try to use to type accents :)
12:50 raschipi joined, pierre_ joined 12:52 mcmillhj joined 12:54 Actualeyes joined 12:56 raschipi_ joined 12:59 raschipi left
kannan Zoffix : i get error - missing infix inside hyper.{ the next line has a highlighted envelope like charachter), -> for $filename.IO.lines »⏏ 13:00
Zoffix kannan: remove spaces around » 13:02
kannan oh ok, i did that . i thought whitespaces could be used anywhere in the language
13:02 mr-fooba_ left
Zoffix It's sensitive to them because there's another form of the hyper operator, e.g. like @foo «+» @bar, that has an infix operator inside of it, and it thought you meant that form and forgot to put the infix 13:02
13:03 cdg joined, lizmat joined
raschipi_ kannan: It's also important to note that youn _cannot_ put whitespace anywhere in Perl6. Lot's of things change meaning depending on whitespace. 13:04
Zoffix Some things are sensitive to you. Another place where it matters is between a sub name and parentheses. `foo(42, 100)` means "call sub `foo`, giving it two positional arguments 42 and 100", while `foo (42, 100)` means "call sub foo with 1 positional argument, which is a list of two integer"
s/to you/to whitespace/;
13:04 mr-foobar joined
Zoffix .hug you 13:04
huggable hugs you
Zoffix ^_^
13:05 cdg_ joined
kannan 1.7. Syntax overview 13:06
Perl 6 is free form: You are free (most of the time) to use any amount of whitespace. Thats where i got the idea from.
raschipi_ Yeah, most of the time, exactly like it says.
kannan raschipi : right!
moritz Perl 5 takes the free form stuff to extremes 13:07
you can even include witespace between sigil and name of a variable (p5)
which is especially "funny" for special variables 13:08
13:08 ChoHag left, cdg left
Zoffix kannan: where is that from? If it's an online resource, it could be clarified that in certain places whitespace carries a lot of meaning 13:09
kannan Zoffix : perl6intro.com/#_syntax_overview
mspo how will Acme::Bleach work, then?
13:09 Ven`` joined
lizmat grammarly? 13:10
yoleaux 11:50Z <skids> lizmat: WRT hash key autoviv, is $!whence set differently if you := to an existing key versus one that doesn't exist? I'm thinking what about a "with-exists"?
lizmat .tell skids $!whence is only set if the key doesn't exist yet. is that an answer? 13:11
yoleaux lizmat: I'll pass your message to skids.
skids lizmat: yeah, thanks. Then a with-exists might be possible. As to whether there's an obtainable performance gain... I dunno. 13:13
yoleaux 13:11Z <lizmat> skids: $!whence is only set if the key doesn't exist yet. is that an answer?
Zoffix Thanks. I sent a PR to perl6intro, amending that sentence a bit. github.com/hankache/perl6intro/pull/155 13:14
robertle is zef known to be broken at the moment? I get a "No such method 'subst' for invocant of type 'Any'" when trying to install, I am sure this worked a few days ago...
Zoffix skids: FWIW, the $!whence mechanism is going to go away some time in the future.
13:15 ChoHag joined
Zoffix & 13:15
\o
13:15 Zoffix left
skids Zoffix: Oh thanks for the heads up. Any link describing what will replace it? 13:17
13:17 pmurias joined 13:19 lizmat left 13:20 Zoffix joined
Zoffix skids: no link, but jnthn++ would know more. I know he was saying this isn't the feature we should be even mentioning to users, as it's going to be replaced with something better. 13:21
13:25 broquaint joined 13:26 Xliff joined
kannan Zoffix : for $filename.IO.lines».split(",").flat».split("=", 2).flat -> $key, $value { say "$key = $value"~"\n"; } - how to identify end of line , and add a counter $i. 13:28
13:29 domidumont left
Zoffix skids: here: irclog.perlgeek.de/perl6/2017-02-16#i_14113907 13:29
13:29 domidumont joined
kannan in this case it doesn't matter, as i know the exact number of kv pairs already so i can count it. 13:29
pmurias do we also want columns (as opposed to you line numbers) in our stack traces? 13:30
Zoffix kannan: probably: for $filename.IO.lines { my $line = ++$;for $_».split(",").flat».split("=", 2).flat -> $key, $value { say "[LINE $line]: $key = $value\n"; } } 13:31
kannan: ++$ is an anonymous state variable.
But you can use the $i thing you had just the same. Just split the work into two loops: one that iterates by lines, and second one that does the split stuff on each line 13:32
kannan ok thanks. sorry uou had to literally write the script for me
skids Zoffix: thanks. Yeah, "something the optimizer can reason about" sounds like it might clean up the extra dive into the slot indexing. 13:33
Zoffix It's fine. It's whatt this channel is for :) For giving help :)
13:34 mr-foobar left 13:39 mr-foobar joined 13:44 bdmatatu joined 13:45 Cabanossi left, araujo left 13:47 Cabanossi joined 13:54 lowbro left 13:58 huggable left, Ven`` left, huggable joined, Peter_R left
kannan very noob friendly. very! Thanks for everything. be back later. 13:59
Zoffix \o 14:00
14:00 raiph left, araujo joined 14:01 Peter_R joined, mr-fooba_ joined 14:03 mr-foobar left 14:05 Peter_WR joined, Peter_R left 14:09 TEttinger joined 14:13 Khisanth left 14:16 Peter_WR left 14:21 Kyo91 joined 14:23 pierre_ left 14:27 Khisanth joined 14:29 wamba joined 14:33 rodarmor joined 14:39 Zoffix left 14:41 nattefrost left
sena_kun arnsholt, pingy~ 14:59
timotimo, ping? 15:01
gfldex how to I use react with Proc::Async? this is how for I got: github.com/gfldex/perl6-stress-moa...n-react.p6 15:02
AlexDaniel gfldex: does this help? github.com/perl6/whateverable/blob...#L175-L195 15:03
15:04 mr-fooba_ left 15:05 mcmillhj left 15:06 st_elmo joined, mr-foobar joined
Xliff sena_kuuuun! 15:06
yoleaux 08:57Z <sena_kun> Xliff: messing with Net::ZMQ4::Message on send-side is a bit discouraged. send for Str|Blob should be used unless you want to meet up memory corruptions of your message. I don't see anything in the code right now what makes by hands message construction a necessarity, so just try to send $_ directly.
sena_kun *kyuuun
o/ 15:07
gfldex AlexDaniel: sadly not
Xliff Hrm.
OK, then p6-jupyter-kernel is using way old methods to send data.
sena_kun Seems like it.
Xliff It constructs a Net::ZMQ4::Message and wants to send that.
BTW - api.zeromq.org/master:zmq-getsockopt has ZMQ_RECVMORE as int32, yet in Socket.pm you have it marked as int64 15:08
*groan* 15:09
'k. Now I will need to shunt this to the maintainer. I can't fix his bugs unless I know what he is really trying to accomplish.
15:10 itaipu joined
Xliff And is your warning due to something you read about ZMQ or is this just from your personal experience? 15:10
sena_kun Warning about what?
Xliff Sending using Net::ZMQ4::Message 15:11
sena_kun My tests lost data. The pass otherwise. That's all. 15:12
I am not a NativeCall guru in this aspect.
AlexDaniel gfldex: what about this? gist.github.com/AlexDaniel/6ef21c6...9a9ece2c2e 15:13
sena_kun About int32 vs int64 - send a patch, Xliff++.
*They
*sent
ugh. 15:14
AlexDaniel gfldex: I don't think I can explain it words, honestly I don't “understand” it fully also
Xliff You mean you can't cut and paste the one I msg'd you? :P 15:15
AlexDaniel gfldex: you still need close-stdin somewhere
gfldex AlexDaniel: thanks that one works
sena_kun Xliff, s/send/sent/; :c 15:16
Xliff sena_kun: Oh, all right! *sigh* I will create a pull req later.
sena_kun too busy for irony recognition right now, see github.com/Altai-man/Net-ZMQ/commi...8d4bb5901d 15:17
AlexDaniel gfldex: I really don't know where to put “close-stdin” there. If you do it right after “$line-source.kill”, then “whenever $line-source.stdout” can still fire and you'll be attempting to write into closed stdin :/ 15:19
gfldex I wonder if we should promote the react style in docs.perl6.org/type/Proc::Async
AlexDaniel gfldex: yes we should 15:20
15:20 epony joined
gfldex files an issue 15:20
perlpilot gfldex: what does line-source.p6 do? 15:21
15:21 wamba left 15:22 Skarsnik joined
Skarsnik Hello 15:23
gfldex perlpilot: just output some lines of text. The whole thing was meant to trigger a segfault in moar but shows a leak instead. 15:24
mspo a leak can sometimes turn into a segv? 15:27
gfldex didn't happen yet. The segault happens in another program that is doing similar work 15:28
oddly it seams to take at least 24h before the segfault will hit
AlexDaniel gfldex: irclog.perlgeek.de/perl6-dev/2017-...i_14882806 15:29
gfldex the more cores you got the more heisenbugs you get it seams :->
15:32 mr-fooba_ joined
mspo someone break out the parallela :) 15:33
15:34 mr-foobar left 15:42 nadim joined 15:45 khw joined 15:46 pwr22 left 15:48 robertle left 15:59 alimon left, alimon joined 16:01 mcmillhj joined 16:06 mcmillhj left 16:12 zakharyas left 16:16 espent joined 16:18 geekosaur left 16:26 AnotherNick left, domidumont left 16:27 kannan left 16:28 geekosaur joined 16:29 espent left 16:30 espent joined, Cabanossi left 16:31 robertle joined 16:32 Cabanossi joined
sena_kun timotimo, ping? 16:33
16:37 llfourn left
Geth perl6.org: f85280ecf2 | (Zoffix Znet)++ (committed using GitHub Web editor) | source/community/index.html
Fix mis-aligned panels
16:37
16:37 llfourn joined 16:40 yqt joined
Geth perl6.org: 766ad1abcf | (Zoffix Znet)++ (committed using GitHub Web editor) | source/fun/index.html
Make -OFun section less bare

By adding a couple of audreyt++'s articles on troll hugging and community building.
16:43
perl6.org: c7443a423e | (Zoffix Znet)++ (committed using GitHub Web editor) | source/about/index.html
Include remaining contributors in acknowledgements list
16:48
16:51 jonas1 left
Geth perl6.org: 807b3b0195 | (Zoffix Znet)++ (committed using GitHub Web editor) | source/downloads/index.html
Shorten text of link to docs
16:55
perl6.org: fe3a2eb189 | (Zoffix Znet)++ (committed using GitHub Web editor) | source/downloads/index.html
Add link to other available learning resources
16:56
16:57 mcmillhj joined 17:00 domidumont joined 17:01 BenGoldberg joined
Geth doc: 7aabfe1eea | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/faq.pod6
Simplify answer for version 6.0.0

  - Show more portable example of how to find out what
   language version the compiler implements
  - Remove all the prose about 2015 and binaries; doesn't seem
   overly relevant to the posed question.
17:07
17:08 darutoko left, dakkar left 17:10 labster joined
bdmatatu Xliff -- how should I be sending messages in p6-jupyter-kernel? When I used just socket.send I was getting memory corruption. 17:11
sena_kun bdmatatu, you likely want to wait a day or two until original/fork situation with Net::ZMQ will be resolved. As soon as it become true, ping me here and I'll write you a migration guide or someting. 17:13
bdmatatu Excellent! 17:14
Geth doc: c643206049 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/faq.pod6
Refine answer for when v6.d is going to come out

The date is the most pessimistic of those discussed, but probably the most suitable and vague enough to give to the end user.
17:15
17:17 nadim left 17:30 Cabanossi left 17:32 Cabanossi joined 17:38 setty1 joined
sena_kun if seems that author abandoned Text::Markdown. How bad it would be to publish a fork into ecosystem with different `auth` to let another modules use it instead? 17:41
Skarsnik there is a repository in the eco for this, but if you want to take over it works too I guess 17:42
sena_kun what repository? 17:43
oh, I see "take over" docs...
wrote him a letter at least. 17:54
tyil an old school, physical letter?
handwritten and all that
17:55 AlexDaniel left
sena_kun nope, just an ugly email without a soul of a real paper thing. :c 17:55
17:56 AlexDaniel joined
tyil sad 17:57
mspo is auth a part of the META.json?
17:58 nadim joined
sena_kun dunno. Just saw that zef can do cool things like "zef install "CSV::Parser:auth<tony-o>". 17:59
mspo yeah 18:02
18:02 ennio joined 18:03 AlexDaniel left 18:04 AlexDaniel joined, grondilu joined 18:09 Kyo91 left 18:21 Rawriful joined 18:22 skids left, espadrine joined
timotimo sena_kun i was on the road for a while 18:24
sena_kun timotimo, o/
timotimo and now i'm leaving free wifi land
sena_kun can you help me with zmq bindings? Tomorrow is fine too. I need either commit bits or PR merging. 18:25
I saw you have commit bits there.
18:30 Cabanossi left 18:32 sena_kun left, sena_kun joined, Cabanossi joined 18:33 cdg joined, Kyo91 joined 18:34 leont joined, AnotherNick joined 18:36 cdg_ left
Geth doc: 5f59294d93 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/faq.pod6
Improve "tracking dev builds" answer

  - Point to from-sauce instructions first
  - Downplay rakudobrew, due to its quirks
18:36
18:38 cdg left
Skarsnik hm DBIish test fails 18:39
zef precomp modules? 18:46
I though it kinda slow
ugexe rakudo does it on install 18:49
you could speed up that precomp speed if you order meta6 provides so its in the topilogical order 18:50
Geth doc: bc8c1db3f5 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/faq.pod6
Shorten "Where are good docs" section
ugexe otherwise rakudo can only try to guess what that order is by trying lots of combinations until it finally works 18:51
(because of stuff like `require ::($foo)`) 18:52
Geth doc: 6e1470685a | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/faq.pod6
Mention there's more than one 5to6- guides
18:53
doc: f1624387bb | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/faq.pod6
Minor formatting improvement
18:54
Skarsnik hm weird error travis-ci.org/perl6/DBIish/jobs/267700035 18:56
zef failed?
18:56 Zoffix joined 18:57 Zoffix left
Skarsnik I think the every SSL modules does not like x) 18:58
+me
18:58 wamba joined 18:59 bulbas joined
raschipi_ Skarsnik: It's not you, TLS hates EVERYONE. 18:59
bulbas hi where can i find a list of rakudo star modules? something i can link to
Skarsnik github.com/rakudo/star/blob/master...ODULES.txt ? 19:00
bulbas Skarsnik: thanks how i find what modules are? that page says "xml-writer" but if i look for xml-writer modules.perl6.org/search/?q=xml-writer says nothing how i can find documentation and description? 19:02
19:04 nadim left, mr-fooba_ left
tadzik try modules.perl6.org/search/?q=xml%3A%3Awriter :) 19:04
Skarsnik github.com/rakudo/star/tree/master/modules you have the link to every git repo 19:05
I think there was a syntax on m.p6.org to link directly to a module
bulbas Skarsnik: perfect thanks
19:05 mr-foobar joined
bulbas Thank you all! Bye! 19:06
19:06 bulbas left 19:07 sena_kun left, domidumont left
Skarsnik ugexe, I think zef do weird stuff when you ctrl+c an install. I tried to install IRC::Client I::A::SSl test was looping. I ctr+c then just try to install A:i:ssl alone and it resolved depend for irc::client (I don't think ssl depend on json modules) 19:08
Geth doc: 3459a36e36 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/faq.pod6
Improve "core standard library" answer

  - Shorten for easier reading
  - Link to stuff
  - Put Rakudo Star first, since that's our user-facing distro
19:09
Skarsnik yeah it finished to install irc::client 19:11
fun
Geth doc: 5aef83fc4f | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/faq.pod6
Improve "get hold of the AST" section

  - Show commands with valid code that compiles
  - `optimize` is a better --target= for the AST
  - Tell how to get other --target=s
19:15
doc: 4a2dd70f13 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/faq.pod6
Improve formatting
19:17
19:18 nadim joined 19:19 andrzejku_ joined, andrzejku_ left 19:23 sena_kun joined 19:27 nadim left 19:30 Cabanossi left 19:32 mcmillhj left, Cabanossi joined, mcmillhj joined
Geth doc: 11577335ac | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/faq.pod6
Improve "What is C<(Any)>?" section

  - Users seeing an (Any) has less to do with what type classes inherit from by default
   and more to do with the default values of variables and params
  - There are two types of definedness (.DEFINITE vs .defined)
  - Link to all the things that test definitness
19:35
19:38 Kyo91 left, cdg joined
raschipi_ Zoffix is on a doc roll today. 19:40
19:42 cdg left 19:46 yqt left, cdg joined
Geth doc: 04ab40bbd5 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/faq.pod6
Update "Is there a CPAN for Perl 6?" entry

  - Yes, we now have CPAN!
  - Viewer for it on modules.perl6.org coming soon (in a few weeks tops)
19:49
19:58 Kyo91 joined 20:03 mr-foobar left
ennio Hello! if anyone is interested in vscode... I played a bit with the language server libraries provided by MS, and I managed to have Perl 6 syntax checked without too much problems 20:05
the code is here: github.com/scriplit/vscode-languageserver-perl6
I think it would be nice to have an implementation of the language server protocol in Perl 6 directly, but this seems out of my reach :) 20:06
sena_kun ennio, cool. You may want to add it to perl6.org/whatever/ list.
moritz ennio: nice! 20:07
20:08 Skarsnik left
sena_kun the sources are at github.com/perl6/perl6.org/blob/ma...index.html 20:08
20:09 AnotherNick left
ennio it's far from being really usable at the moment... but if it evolves nicely, I'll definitely add it to this page 20:10
sena_kun ennio++ 20:16
El_Che ennio: just saw and retweeted your announcement. Great news 20:17
20:27 ennio left 20:33 P6steve joined 20:34 cdg left
P6steve hi - anyone know how can I write a signature that has a list of allowed Types for each positional (for infix sub), please? 20:34
raschipi_ P6steve: What about using a multi? 20:35
20:35 geekosaur left
P6steve raschipi - I'm already using multi - but 4x operators, 3x types (Distance, Real, Str) is a lot of repetitive code 20:37
raschipi_ right, what about type classes? 20:38
Or declaring a type that is a superset of the allowed ones?
20:39 cdg joined
P6steve do you mean something like class AllMyTypes is Distance is Real is Str - that'd probably work 20:40
20:41 geekosaur joined
raschipi_ You can also use a type variable (:: sigil) and then check to see if it's an acceptable type later (::T ~~ Distance|Real|Str) 20:43
Or you can use a subset: (Any $var where Distance|Real|Str) 20:46
mspo neovim has a language server plugin 20:47
[Coke] multis for types, private untyped sub they dispatch to...
P6steve that's v. helpful - thanks.. reading type variable docs... 20:51
20:55 bdmatatu left 20:58 raschipi_ left 21:01 setty1 left
Xliff <sena_kun> too busy for irony recognition right now... 21:11
Xliff cracks up.
sena_kun: What zmq binding help do you need?
21:12 P6steve left, mcmillhj left
sena_kun fix problems with 4.2. commit bits to merge it into master. :) 21:13
unclechu hey guys, what would you recommend to try about compiling perl6 to javascript? 21:24
perlpilot unclechu: talking to pmurias :) 21:25
21:27 lizmat joined 21:29 Kyo91_ joined
timotimo sena_kun: i'll just go ahead and merge your pull request 21:29
if that's okay?
sena_kun timotimo, there are some more changes, you can merge that one. 21:30
I'll prepare the second right away.
thanks.
timotimo merged the first one
dalek t-ZMQ: 7438b8c | Altai-man++ | / (3 files):
Closing socket's method
Net-ZMQ: 32b40b4 | Altai-man++ | / (3 files):
Net-ZMQ: Add up ZMQ_RCVHWM and ZMQ_SNDHWM constants;
21:31 dalek joined, ChanServ sets mode: +v dalek, Kyo91 left 21:34 Kyo91_ left
sena_kun timotimo, github.com/arnsholt/Net-ZMQ/pull/17 21:35
timotimo i like this a lot 21:37
dalek Heuristic branch merge: pushed 32 commits to Net-ZMQ by timo
timotimo thanks for putting the time & effort in
sena_kun \o/
timotimo++
it's time to write to jupyter maintainer an issue with a migration guide... 21:38
timotimo \o/
want his email address?
sena_kun I'll file an issue. 21:39
github's issue, i.e.
timotimo sounds good 21:41
i'll be mostly afk again
sena_kun good luck.
21:49 lizmat left 21:50 mcmillhj joined 21:55 snarkyboojum joined, mcmillhj left 21:59 Aaronepower joined 22:06 Rawriful left, mcmillhj joined 22:08 maettu left 22:11 mcmillhj left 22:16 itaipu left 22:17 robertle left 22:20 devmikey joined 22:22 mcmillhj joined 22:27 mcmillhj left
samcv ok think imma bump moarvm so we get knuth morris pratt, everything seems to be in order 22:28
22:28 mcmillhj joined 22:33 mcmillhj left 22:36 espadrine left 22:37 rindolf left 22:44 mcmillhj joined 22:46 hythm left 22:48 mcmillhj left 23:00 mcmillhj joined, cdg left, llfourn left 23:04 mcmillhj left, st_elmo left, cosimo left 23:05 cosimo joined 23:07 dustinm`_ joined, dustinm` left 23:12 sena_kun left 23:15 mcmillhj joined 23:16 lizmat joined, cdg joined 23:17 pmurias left 23:20 mcmillhj left 23:21 cdg left
samcv timotimo, i think we may want to stop collapsing strings when we do regex on them 23:24
m: my $a = 'aaaaaaaaaab'; my $b = 'a' x 999999 ~ 'b'; say $b ~~ /$a/; say now - INIT now
camelia 「aaaaaaaaaab」
7.6077099
samcv my $a = 'aaaaaaaaaab'; my $b = 'a' x 999999 ~ 'b'; use nqp; say nqp::index($b, $a, 0); say now - INIT now
m: my $a = 'aaaaaaaaaab'; my $b = 'a' x 999999 ~ 'b'; use nqp; say nqp::index($b, $a, 0); say now - INIT now 23:25
camelia 999989
0.205195282
samcv so that takes only .2 seconds if we don't collapse it
especially now that we have knuth morris pratt algorithm for _all_ strings, i think it may be a good idea?
23:27 skids joined, devmikey left
TEttinger did those print on top of each other? 23:29
it looks like the five 9s might have been something else printed
samcv 999989? 23:30
for some reason literal regex takes a ridiculous amount of time
even when i disable flattening the haystack 23:31
it must be doing a bunch of crap other than just indexing it. i mean it's just a literal
23:31 mcmillhj joined
MasterDuke heh, try interpolating a literal string into the regex, multiple times slower 23:32
samcv hmm? you mean like <$this> ? 23:33
m: my $a = 'aaaaaaaaaab'; my $b = 'a' x 999999 ~ 'b'; say $b ~~ /<$a>/; say now - INIT now
camelia 「aaaaaaaaaab」
19.30805550
MasterDuke that's worse even than just $this
oh ha, that's what you first did 23:34
samcv well yeah since it has to create the regex
MasterDuke but yeah, <$this> is the slowest
samcv yeah since it's not literal
basically like eval
MasterDuke yep
samcv not sure why literal is so slow. but i don't know how the regex compiler works... 23:35
23:36 mcmillhj left
samcv 4.5000660 secs with flattening and disabling flattening it takes 4.7 secs 23:36
which is sad since nqp::index is practically instant
23:38 snarkyboojum left 23:39 mst left
samcv and case insensitive regex is 5.09 seconds. why is just plain literal so slow.. 23:40
how do i look into this and see what ops it's running? i mean i tread --target=mast but i cant find `MAST::Op index` anywhere. does it refer to some precompiled bytecode or something that actually has that op? 23:41
samcv is angry i made the nqp::index op faster but regex is still so slow...
MasterDuke look at --target=optimize 23:43
samcv nope not there either 23:44
nothing with 'index' in it at all
23:45 Cabanossi left
MasterDuke what code are you looking at? something with nqp::index? or a regex? 23:47
samcv yeah
23:47 Cabanossi joined
samcv it's a regex 23:47
not sure how it would work without using index at all though...
or index from end or something
MasterDuke i think the actual regex engine does it 23:49
see the QAST::Regex?
samcv so the regex engine doesn't use nqp::index? 23:50
MasterDuke it might, but maybe it does it at runtime? 23:52
could stick an fprintf(stderr, ...) in index and see 23:54
Ulti is anyone else bummed that the "atomic" operators are not on the periodic table www.ozonehouse.com/mark/periodic/ 23:55
samcv well i mean it does use nqp::index. but. it must do other ops too 23:59