Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-08-23

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 mcmillhj joined #perl6
00:11 mcmillhj joined #perl6
00:14 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 #perl6
00:22 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 #perl6
00:28 cdg joined #perl6
00:28 newb2 joined #perl6
00:33 pierre_ joined #perl6
00:34 Cabanossi joined #perl6
00:36 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 newb2 Just as I can type "source .bashrc" at the shell prompt and the shell environment will be modified
00:37 mcmillhj joined #perl6
00:38 newb2 If you're wondering why, I find that the Readline bindings in the shell & in perl6 are by no means identical
00:38 newb2 So I need to issue Readline commands to customize the perl6 environment to set vars, bind keys, etc
00:40 newb2 So the question is how can Ido the equivalent of "source .bashrc" in perl6?
00:41 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
00:41 ugexe also require my-script.pl6
00:41 newb2 Yes but if I run a shell script in eg bash it doesn't change the environment unless Is source it
00:42 newb2 Is perl6 different?
00:42 ugexe what do you consider the "environment" in perl6?
00:42 newb2 when I set a binding with a headline function that is persistent for the session
00:42 newb2 s/headline/readline/
00:43 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
00:44 newb2 But now I need to run a batch file that will make persistent changes
00:44 teatime http://www.cbc.ca/news/canada/british-columbia/shane-patmore-abbotsford-bridge-1.4256694
00:44 newb2 Persistent that is for the rest of the session
00:44 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 #perl6
00:44 newb2 OK thanks will give it a spin .. :/)
00:45 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:47 llfourn joined #perl6
00:52 samcv what do you guys think the max number of codepoints per grapheme should be. currently, moarvm has a hard limit of 1024
00:53 samcv m: ("\c[COMBINING ACUTE ACCENT]".ord xx 1025).chrs.say
00:53 camelia rakudo-moar 636a3c: OUTPUT: «Too many codepoints (1025) in grapheme?  in block <unit> at <tmp> line 1??»
00:53 mcmillhj joined #perl6
00:54 geekosaur ultimately it should probably be dynamic. practically, you'd be justified in a fairly low limit like 15
00:56 samcv i mean zalgo text can have a big number on them? not sure how many
01:00 AlexDaniel m: ("\c[COMBINING ACUTE ACCENT]" x 5).chars.say
01:00 camelia rakudo-moar 636a3c: OUTPUT: «5?»
01:00 samcv AlexDaniel, that is a bug
01:00 AlexDaniel samcv: ticket?
01:00 samcv uh may not have one?
01:00 samcv i will be fixing it for my grant though
01:00 samcv it only occurs in certain cases
01:03 AlexDaniel samcv: RT #131950
01:03 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131950
01:04 cdg joined #perl6
01:04 samcv heh thanks
01:04 samcv i discovered it during grant work. probably should have made a bug
01:05 samcv i discovered it when i started working on the partial normalization during concatenation
01:06 AlexDaniel by the way, this is one of my favorite bugs: RT #131801
01:06 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131801
01:06 AlexDaniel there's something lovely about it, I don't know
01:07 AlexDaniel not as good as RT #127473 though
01:07 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=127473
01:09 samcv is that the same issue?
01:09 samcv hm yeh likely
01:09 cpage_ joined #perl6
01:10 AlexDaniel :O
01:10 AlexDaniel indeed
01:10 samcv i'll fix this bug after i push my initial work on changing the mvm representation of synthetics :)
01:10 samcv well to my own branch... need to figure out what is causing segfault
01:11 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 mcmillhj joined #perl6
01:15 AlexDaniel m: my $x = "\c[COMBINING ACUTE ACCENT]"; my $b = ‘ß’ ~ $x; say $b.uc
01:15 camelia rakudo-moar 636a3c: OUTPUT: «?S?»
01:15 AlexDaniel interesting
01:15 BenGoldberg joined #perl6
01:23 samcv now since we had release i can merge in my knuth morris pratt algorithm too
01:23 samcv woo
01:23 ijneb joined #perl6
01:24 ijneb How do I do an 'or' expression in givens
01:24 ijneb in a when
01:24 ijneb like when 'N' || 'n' { }
01:25 AlexDaniel 'N' | 'n' should work
01:25 AlexDaniel it will create a junction which will do the right thing
01:25 AlexDaniel or maybe /:i n/
01:25 AlexDaniel mmm /:i ^n$/
01:26 AlexDaniel given $foo.fc { when 'n'.fc } # ?
01:26 samcv i was gonna say that AlexDaniel yeah
01:27 samcv 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?
01:27 samcv or, when .fc eq 'N'.fc etc etc
01:28 mcmillhj joined #perl6
01:29 ijneb I was already doing that samcv
01:29 ijneb I need something like this: `when 'N' | $stage == 1
01:29 ijneb is it possible to do that?
01:30 raschipi joined #perl6
01:31 AlexDaniel m: my $stage = 1; given ‘z’ { when $_ eq 'N' || $stage == 1 { say ‘hello’ } }
01:31 camelia rakudo-moar 636a3c: OUTPUT: «hello?»
01:31 AlexDaniel m: my $stage = 0; given ‘z’ { when $_ eq 'N' || $stage == 1 { say ‘hello’ } }
01:31 camelia rakudo-moar 636a3c: ( no output )
01:32 samcv i'm writing some moarvm documentation on our string implementation since we don't really have anything
01:32 samcv this is what i have so far: https://gist.github.com/samcv/07d097d607514c8834098a31afffc7a3
01:33 AlexDaniel samcv++
01:38 sirhalos joined #perl6
01:39 MasterDuke nice
01:50 sirhalos left #perl6
01:50 mcmillhj joined #perl6
01:52 ilbot3 joined #perl6
01:52 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:52 AlexDaniel m: dd (0x0F75.chr ~ 0x0F75.chr).uninames
01:52 camelia rakudo-moar 636a3c: OUTPUT: «("TIBETAN VOWEL SIGN AA", "TIBETAN VOWEL SIGN AA", "TIBETAN VOWEL SIGN U", "TIBETAN VOWEL SIGN U").Seq?»
01:52 samcv m:  (0x0F75.chr x 2).NFC.say
01:52 camelia rakudo-moar 636a3c: OUTPUT: «NFC:0x<0f71 0f74 0f71 0f74>?»
01:52 samcv m:  (0x0F75.chr).NFC.say
01:52 camelia rakudo-moar 636a3c: OUTPUT: «NFC:0x<0f71 0f74>?»
01:52 samcv tibetan is pretty wild
01:53 AlexDaniel samcv: but shouldn't it normalize the order?
01:53 samcv hm
01:53 samcv yeah that's probably the same issue
01:53 samcv with the repetition that is
01:54 samcv m:  (0x0F75 xx 2).chrs.uninames.say
01:54 camelia rakudo-moar 636a3c: OUTPUT: «(TIBETAN VOWEL SIGN AA TIBETAN VOWEL SIGN AA TIBETAN VOWEL SIGN U TIBETAN VOWEL SIGN U)?»
01:54 Geth ¦ doc: a8e916ed77 | (Will "Coke" Coleda)++ | doc/Language/operators.pod6
01:54 Geth ¦ doc: fix typos
01:54 Geth ¦ doc: review: https://github.com/perl6/doc/commit/a8e916ed77
01:54 Geth ¦ doc: ccdfa463f6 | (Will "Coke" Coleda)++ | doc/Language/unicode_texas.pod6
01:54 Geth ¦ doc: remove trailing whitespace;
01:54 Geth ¦ doc: review: https://github.com/perl6/doc/commit/ccdfa463f6
01:54 samcv m:  (0x0F75 xx 2).chrs.uniprops('Canonical_Combining_Class').say
01:54 camelia rakudo-moar 636a3c: OUTPUT: «(129 129 132 132)?»
01:54 AlexDaniel samcv: right, if you append something it goes away
01:54 samcv m:  (0x0F75 xx 2).chrs.uniprops('GCB').say
01:54 camelia rakudo-moar 636a3c: OUTPUT: «(Extend Extend Extend Extend)?»
01:55 samcv yeah that's just the same issue
01:55 samcv but sounds like a good roast test
01:55 samcv if you want to add that one?
01:55 samcv i like it
01:57 AlexDaniel I've left it as a comment on the ticket
01:57 AlexDaniel sounds like a great test to have, yes
02:03 mcmillhj joined #perl6
02:04 cpage_ joined #perl6
02:13 pierre_ joined #perl6
02:22 samcv ok cool, my synthetic rework is now working and not crashing :)
02:33 mcmillhj joined #perl6
02:33 mr-foobar joined #perl6
02:34 Cabanossi joined #perl6
02:37 noganex_ joined #perl6
02:52 mcmillhj joined #perl6
03:01 cpage_ joined #perl6
03:04 Cabanossi joined #perl6
03:06 samcv AlexDaniel, fixed that repeat bug. running spectest now
03:07 AlexDaniel samcv: I didn't expect this to happen so soon
03:07 AlexDaniel samcv++
03:07 AlexDaniel but it sounds too good to be true :)
03:07 samcv it's not though
03:08 samcv :-)
03:10 mcmillhj joined #perl6
03:17 * 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:18 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 rakudo-moar 636a3c: OUTPUT: «(signal XCPU)»
03:18 samcv skids, i could combine it into one op. but not sure what the return would be
03:19 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 rakudo-moar 636a3c: OUTPUT: «3.116?»
03:20 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 }
03:21 samcv skids, i mean what would the return value be
03:21 atroxaper joined #perl6
03:21 camelia rakudo-moar 636a3c: OUTPUT: «(timeout)»
03:24 BenGoldberg Are our new radioactive operators more cpu intensive than normal ones?
03:26 TEttinger they have a half-life
03:27 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:29 samcv so what would it return if the key isn't found?
03:30 leedo joined #perl6
03:31 mcmillhj joined #perl6
03:31 skids samcv: well, something false and type-compatible with whatever a slot is.
03:31 leedo joined #perl6
03:32 skids or, maybe just plain false.
03:32 mr-foobar joined #perl6
03:33 samcv AlexDaniel, fix pushed to MVM
03:33 atroxaper joined #perl6
03:34 Cabanossi joined #perl6
03:39 cdg joined #perl6
03:39 skids Hrm, on the HLL level...
03:40 skids 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 rakudo-moar 636a3c: OUTPUT: «(a b)?(a c b)?{:a, :b, :c(42)}?»
03:40 skids Can we introspect $a and $c to see if the key existed...
03:40 leedo joined #perl6
03:49 unclechu joined #perl6
03:51 mcmillhj joined #perl6
03:51 cdg joined #perl6
04:01 pierre_ joined #perl6
04:02 Cabanossi joined #perl6
04:03 mcmillhj joined #perl6
04:18 kannan joined #perl6
04:18 mcmillhj joined #perl6
04:23 ssm joined #perl6
04:31 cdg joined #perl6
04:34 xtreak joined #perl6
04:34 mcmillhj joined #perl6
04:34 mr-foobar joined #perl6
04:52 mcmillhj joined #perl6
05:02 JimmyZ joined #perl6
05:02 robinsmidsrod joined #perl6
05:02 telex joined #perl6
05:02 integral joined #perl6
05:02 leedo_ joined #perl6
05:02 integral joined #perl6
05:03 SmokeMachine joined #perl6
05:03 jkva_ joined #perl6
05:03 plicease joined #perl6
05:03 ccakes joined #perl6
05:04 shadoxx joined #perl6
05:04 Technaton joined #perl6
05:04 sacomo joined #perl6
05:04 FiendKing04 joined #perl6
05:06 mr-foobar joined #perl6
05:07 eater joined #perl6
05:12 mcmillhj joined #perl6
05:15 wamba joined #perl6
05:24 mcmillhj joined #perl6
05:30 astj joined #perl6
05:32 Cabanossi joined #perl6
05:35 mcmillhj joined #perl6
05:36 mr-foobar joined #perl6
05:36 Actualeyes joined #perl6
05:38 ufobat joined #perl6
05:51 lowbro joined #perl6
05:51 lowbro joined #perl6
05:52 Skarsnik joined #perl6
05:58 astj joined #perl6
06:02 Cabanossi joined #perl6
06:04 espadrine joined #perl6
06:05 lizmat skids: you can't, because the key doesn't exist until you actually assign it
06:05 lizmat *that's* the moment the scalar container gets bound to the hash, not before
06:05 lizmat thanks to the magic of $!whence in Scalar containers
06:05 mr-foobar joined #perl6
06:08 lizmat breakfast&
06:14 pierre_ joined #perl6
06:15 lizmat_ joined #perl6
06:15 cpage__ joined #perl6
06:21 mcmillhj joined #perl6
06:23 shmibs joined #perl6
06:24 darutoko joined #perl6
06:30 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:32 lowbro joined #perl6
06:32 lowbro joined #perl6
06:32 Cabanossi joined #perl6
06:32 mr-foobar joined #perl6
06:33 mcmillhj joined #perl6
06:35 andrzejku_ joined #perl6
06:36 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 jast of course this will not work if the logfile gets truncated or rotated in the meantime
06:37 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:38 kannan is there any equivalent module in perl6 to tail a file?
06:39 jast there's IO::TailFile: https://github.com/skaji/perl6-tail -- I don't have any experience with it, though
06:39 jast it's specifically for a 'following tail' thing, though
06:42 eroux joined #perl6
06:44 kannan jast thanks i will try and post result
06:45 konsolebox joined #perl6
06:45 mcmillhj joined #perl6
06:46 snarkyboojum joined #perl6
06:47 cdg joined #perl6
06:48 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:52 ryu0 joined #perl6
06:58 mcmillhj joined #perl6
07:06 mr-foobar joined #perl6
07:08 AnotherNick joined #perl6
07:10 domidumont joined #perl6
07:10 xtreak joined #perl6
07:10 mcmillhj joined #perl6
07:14 domidumont joined #perl6
07:16 nadim joined #perl6
07:18 wamba joined #perl6
07:19 snarkyboojum Supplies are cool!
07:20 kannan ok IO::TailFile works well, even on very fast growing file!
07:20 xtreak joined #perl6
07:21 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 mcmillhj joined #perl6
07:21 snarkyboojum or am I misreading that
07:23 domidumont joined #perl6
07:23 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:25 kannan i think i got , i am to use spurt.
07:26 kannan but how to append the line to the same file?
07:28 snarkyboojum can you open the file in append mode?
07:29 snarkyboojum .open(:mode<rw> :append)
07:29 snarkyboojum I don't really know :)
07:29 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:30 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:31 kannan ok i think i found
07:31 kannan http://examples.perl6.org/categories/cookbook/07file-access/07-01opening_file.html
07:31 kannan if i know there is a function 'open' in perl6, how to look it up in a documentation?
07:32 snarkyboojum I was looking at https://docs.perl6.org/type/IO::Handle#method_open
07:32 moritz kannan: you go to docs.perl6.org and type "open" in the search box
07:33 kannan moritz : thanks, thats what i was asking !
07:33 snarkyboojum hello moritz!
07:33 moritz \o snarkyboojum
07:34 snarkyboojum o/
07:34 mr-foobar joined #perl6
07:34 snarkyboojum I see you have a cool looking perl 6 book out :)
07:35 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.
07:36 moritz snarkyboojum: that great. Do let me know if you liked it
07:36 mcmillhj joined #perl6
07:36 moritz (and if yes, maybe write a review on amazon :D )
07:37 snarkyboojum is 'Perl 6 by Example' available?
07:38 jast it's funny, I can buy your book as an e-book for $19.99... or individual chapters for $29.99 each
07:40 moritz I know
07:40 moritz that's a weird feature stemming from the fact that apress is part of Springer
07:40 jast oh, makes perfect sense, then
07:40 moritz and Springer tends to publish mightily expensive text books, where you do sometimes want to purchase a chapter chapter
07:40 moritz s:2nd/chapter/cheaper/
07:42 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?
07:43 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
07:43 jast of course some fields have even more ridiculously expensive books
07:43 moritz jast: ah good
07:44 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 moritz wow
07:44 jast the book wasn't very good either
07:45 nattefrost joined #perl6
07:45 moritz I remember https://www.amazon.com/Electronic-Mesoscopic-Semiconductor-Microelectronic-Engineering-ebook/dp/B00AKE1T2O/ being astonishingly approachable, and not cheap
07:46 jast one of the best math textbooks I ever bought was <20 €
07:46 moritz but they now have used paperback for ~20USD
07:46 jast (new, paperback)
07:47 kannan joined #perl6
07:48 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 #perl6
07:49 moritz kannan: "Perl 6 Fundamentals", and yes
07:50 kannan ty
07:50 moritz kannan: https://www.amazon.com/Perl-Fundamentals-Examples-Projects-Studies/dp/1484228987
07:50 moritz snarkyboojum: no, but it's the only one where I don't look like a total ass-hat
07:50 moritz :-)
07:50 mcmillhj joined #perl6
07:51 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 :-)
07:53 snarkyboojum absolutely :)
07:58 snarkyboojum Ooh, the Docker tips are great. Ok - I have reading to do ;)
08:01 dakkar joined #perl6
08:01 jonas1 joined #perl6
08:01 kannan moritz : i made the purchase!
08:03 mcmillhj joined #perl6
08:05 mr-foobar joined #perl6
08:07 moritz kannan: thanks!
08:10 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:11 kannan anyway its what i am doing :)
08:14 moritz snarkyboojum: for the Perl 6 Regexes book I'm creating a separate Docker image with stuff pre-installed
08:16 kannan i am seeing https://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 ;)
08:17 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 #perl6
08:19 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 mcmillhj joined #perl6
08:20 jast also, you can use the smart match operator ~~ instead of the match method for more conciseness, example: 'abc' ~~ /x/
08:27 ryu0 kannan: C is rarely mentioned anymore, but it has value still. just not to everyone.
08:27 zakharyas joined #perl6
08:31 robertle joined #perl6
08:32 lizmat joined #perl6
08:33 snarkyboojum ryu0, a but like Ruby then :P
08:33 snarkyboojum bit*
08:37 astj joined #perl6
08:39 mcmillhj joined #perl6
08:44 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:49 sena_kun joined #perl6
08:50 sena_kun
08:50 yoleaux 22 Aug 2017 23:59Z <Xliff> sena_kun: You're right. It's .send related.
08:50 yoleaux 00:14Z <Xliff> sena_kun: Net::ZMQ4::Socket.send($msg, $flags) isn't detecting $flags as Int
08:50 yoleaux 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:51 SmokeMachine joined #perl6
08:52 jnap_ joined #perl6
08:52 BuildTheRobots joined #perl6
08:53 lizmat_ joined #perl6
08:57 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.
08:58 moritz .tell kannan btw there's also a a Perl 6 "port" of the "Think Python" book: https://www.amazon.com/Think-Perl-Like-Computer-Scientist/dp/1491980559/
08:58 yoleaux moritz: I'll pass your message to kannan.
08:58 nhywyll joined #perl6
08:58 moritz .tell kannan with a free ebook version at http://greenteapress.com/wp/think-perl-6/
08:58 yoleaux moritz: I'll pass your message to kannan.
08:59 mcmillhj joined #perl6
09:06 kannan joined #perl6
09:16 stmuk_ joined #perl6
09:17 BuildTheRobots joined #perl6
09:24 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: https://www.amazon.com/Think-Perl-Like-Computer-Scientist/dp/1491980559/
09:24 yoleaux 08:58Z <moritz> kannan: with a free ebook version at http://greenteapress.com/wp/think-perl-6/
09:24 kannan yoleaux : thats very nice , i had got disconn when away.thank you
09:28 kannan ok sorry ignore last question
09:28 xtreak joined #perl6
09:32 mr-foobar joined #perl6
09:44 cdg joined #perl6
09:54 cdg joined #perl6
09:55 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:56 gfldex m: say lines.WHAT
09:56 camelia rakudo-moar 636a3c: OUTPUT: «(Seq)?»
09:56 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.
09:56 yoleaux 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.
09:56 yoleaux 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: https://github.com/perl6
09:57 gfldex kannan: https://docs.perl6.org/type/Seq#(Cool)_routine_match
09:58 gfldex we do a bad job at explaining Cool and it's relationship to the rest of the type system
10:00 Geth ¦ doc: 5c75f77e75 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/atomicint.pod6
10:00 Geth ¦ doc: Add missing awaits; MasterDuke++
10:00 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5c75f77e75
10:01 mr-fooba_ joined #perl6
10:01 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.
10:01 yoleaux gfldex: I'll pass your message to zoffix.
10:02 Geth ¦ doc: 70077e9a61 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/atomicint.pod6
10:02 Geth ¦ doc: Make wrong example markings more obvious
10:02 Geth ¦ doc: review: https://github.com/perl6/doc/commit/70077e9a61
10:02 Cabanossi joined #perl6
10:05 ijneb joined #perl6
10:07 araraloren_fake joined #perl6
10:25 ShalokShalom_ joined #perl6
10:32 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.
10:33 kannan 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:37 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:38 kannan sena_kun : that is what i also thought (and did). thanks.
10:40 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:43 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:44 sena_kun There will be problems, because of concurrency. :/
10:44 kannan i see.
10:44 sena_kun You need access synchronization.
10:45 sena_kun kannan, see https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock for further explanations.
10:46 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 nattefrost joined #perl6
10:46 Zoffix joined #perl6
10:46 rindolf joined #perl6
10:46 Zoffix gfldex: understood. Thanks.
10:47 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: https://docs.perl6.org/type/IO::Handle#method_lock
10:47 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
10:48 gfldex kannan: i would write them to a log file and a fifo
10:48 gfldex or some other form of IPC
10:49 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:50 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:51 kannan ok i have to read up on each of this first. thanks gfldex and Zoffix
10:54 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:55 timotimo sena_kun: the react block body only runs a single time
10:56 nattefrost joined #perl6
10:58 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:59 sena_kun the wording was not the best, true.
10:59 timotimo ah
10:59 skids joined #perl6
11:04 Ulti https://www.reddit.com/r/programming/comments/6va32n/perl_6_going_atomic_with/dlypgiy/?st=j6owwtsl&amp;sh=7392281b  <--- LOL
11:05 timotimo yeah, that cracked me up, too
11:06 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:10 araujo joined #perl6
11:11 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:12 Ulti 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. :)
11:13 Ulti I didnt until I realised ctrl+cmd+space was a context menu everywhere in macOS
11:13 Ulti I still dont write them purely out of fear but perhaps I should change that
11:13 Ulti especailly as I use set operators a lot and those look so nice
11:14 Ulti and it would be nice if reading code helped me get better at reading algo papers
11:15 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.)
11:15 timotimo except our texas variants aren't nearly as terrible as trigraphs
11:19 kannan how to delete one line in a file? if trying by replacing it with a blank, but carriage return remains.
11:20 sena_kun m: say "one\ntwo".subst("one\n", '');
11:20 camelia rakudo-moar 636a3c: OUTPUT: «two?»
11:20 sena_kun kannan, ^?
11:21 kannan oh ok
11:23 Ulti timotimo: yeah I just read that in the thread I had no idea that was true in C
11:36 domidumont joined #perl6
11:39 cdg joined #perl6
11:50 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 #perl6
12:00 Zoffix .hug
12:04 Zoffix .hug
12:04 huggable joined #perl6
12:04 Zoffix .hug
12:04 * huggable hugs everyone
12:04 Zoffix .hug me
12:04 * huggable hugs Zoffix
12:04 Zoffix .hug buggable
12:04 * huggable hugs buggable
12:04 * tyil hugs Zoffix
12:04 tyil :3
12:04 Zoffix \o/
12:06 raschipi joined #perl6
12:12 SmokeMachine joined #perl6
12:12 parisba_ joined #perl6
12:12 xtreak joined #perl6
12:20 lizmat joined #perl6
12:24 skaji joined #perl6
12:26 olinkl joined #perl6
12:26 zakharyas joined #perl6
12:30 kannan i am not able pass a comma separated line into a hash. i pasted the output and the code here -> https://pastebin.com/cecuibJK
12:31 moritz kannan: $line is just a string
12:31 moritz kannan: so, a single element
12:32 moritz 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
12:32 Geth ¦ perl6.org: Update URL for Rakudo.Party blog
12:32 Geth ¦ perl6.org:
12:32 Geth ¦ perl6.org: Also, use HTTPS
12:32 Geth ¦ perl6.org: review: https://github.com/perl6/perl6.org/commit/b1e6f5d029
12:32 Cabanossi joined #perl6
12:32 moritz kannan: you might want $line.split(',') or something like that
12:33 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:34 moritz you can define a hash like  my %h = a => 1, b => 2;
12:34 kannan moritz : thanks, i will try
12:34 moritz but only if you write that in source code
12:34 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.
12:34 moritz a string isn't automatically interpreted at source code
12:34 moritz *as source code
12:34 kannan ok
12:40 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 Zoffix 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
12:41 kannan Zoffix: !! i could never have written something like this. i will try to understand it. Thanks a lot!
12:42 pwr22 joined #perl6
12:43 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:44 Zoffix pwr22: \o
12:44 Zoffix Welcome \o/
12:44 pwr22 Hey
12:45 pwr22 I used to be in here but fell off of IRC when my I forgot the credentials for my ZNC setup...
12:47 Zoffix :)
12:47 pwr22 Sounds like the OSX has a very nice consistent context menu for entering unicode things
12:47 pwr22 I wish that existed everywhere, then I'd have zero complaints ;)
12:48 El_Che pwr22: I hate with passion, the IOS-ization of osx
12:48 El_Che pwr22: try to use to type accents :)
12:50 raschipi joined #perl6
12:50 pierre_ joined #perl6
12:52 mcmillhj joined #perl6
12:54 Actualeyes joined #perl6
12:56 raschipi_ joined #perl6
13:00 kannan Zoffix : i get error - missing infix inside hyper.{ the next line has a highlighted envelope like charachter), -> for $filename.IO.lines »?
13:02 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 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:03 cdg joined #perl6
13:03 lizmat joined #perl6
13:04 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"
13:04 Zoffix s/to you/to whitespace/;
13:04 mr-foobar joined #perl6
13:04 Zoffix .hug you
13:04 * huggable hugs you
13:04 Zoffix ^_^
13:05 cdg_ joined #perl6
13:06 kannan 1.7. Syntax overview
13:06 kannan 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.
13:06 raschipi_ Yeah, most of the time, exactly like it says.
13:06 kannan raschipi : right!
13:07 moritz Perl 5 takes the free form stuff to extremes
13:07 moritz you can even include witespace between sigil and name of a variable (p5)
13:08 moritz which is especially "funny" for special variables
13:09 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 : http://perl6intro.com/#_syntax_overview
13:09 mspo how will Acme::Bleach work, then?
13:09 Ven`` joined #perl6
13:10 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"?
13:11 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.
13:13 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?
13:14 Zoffix Thanks. I sent a PR to perl6intro, amending that sentence a bit. https://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...
13:14 Zoffix skids: FWIW, the $!whence mechanism is going to go away some time in the future.
13:15 ChoHag joined #perl6
13:15 * Zoffix &
13:15 Zoffix \o
13:15 Zoffix left #perl6
13:17 skids Zoffix: Oh thanks for the heads up.  Any link describing what will replace it?
13:17 pmurias joined #perl6
13:20 Zoffix joined #perl6
13:21 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:25 broquaint joined #perl6
13:26 Xliff joined #perl6
13:28 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:29 Zoffix skids: here: https://irclog.perlgeek.de/perl6/2017-02-16#i_14113907
13:29 domidumont joined #perl6
13:29 kannan in this case it doesn't matter, as i know the exact number of kv pairs already so i can count it.
13:30 pmurias do we also want columns (as opposed to you line numbers) in our stack traces?
13:31 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 Zoffix kannan: ++$ is an anonymous state variable.
13:32 Zoffix 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
13:33 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:39 mr-foobar joined #perl6
13:44 bdmatatu joined #perl6
13:47 Cabanossi joined #perl6
13:58 huggable joined #perl6
13:59 kannan very noob friendly. very! Thanks for everything. be back later.
14:00 Zoffix \o
14:00 araujo joined #perl6
14:01 Peter_R joined #perl6
14:01 mr-fooba_ joined #perl6
14:05 Peter_WR joined #perl6
14:09 TEttinger joined #perl6
14:21 Kyo91 joined #perl6
14:27 Khisanth joined #perl6
14:29 wamba joined #perl6
14:33 rodarmor joined #perl6
14:39 Zoffix left #perl6
14:59 sena_kun arnsholt, pingy~
15:01 sena_kun timotimo, ping?
15:02 gfldex how to I use react with Proc::Async? this is how for I got: https://github.com/gfldex/perl6-stress-moar/blob/master/bin/moar-stress-main-react.p6
15:03 AlexDaniel gfldex: does this help? https://github.com/perl6/whateverable/blob/0840d63c02abaa959d48832055aaafcf6bd3f7cc/lib/Whateverable.pm6#L175-L195
15:06 st_elmo joined #perl6
15:06 mr-foobar joined #perl6
15:06 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.
15:06 sena_kun *kyuuun
15:07 sena_kun o/
15:07 gfldex AlexDaniel: sadly not
15:07 Xliff Hrm.
15:07 Xliff OK, then p6-jupyter-kernel is using way old methods to send data.
15:07 sena_kun Seems like it.
15:07 Xliff It constructs a Net::ZMQ4::Message and wants to send that.
15:08 Xliff BTW - http://api.zeromq.org/master:zmq-getsockopt has ZMQ_RECVMORE as int32, yet in Socket.pm you have it marked as int64
15:09 Xliff *groan*
15:09 Xliff '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 #perl6
15:10 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?
15:11 Xliff Sending using Net::ZMQ4::Message
15:12 sena_kun My tests lost data. The pass otherwise. That's all.
15:12 sena_kun I am not a NativeCall guru in this aspect.
15:13 AlexDaniel gfldex: what about this? https://gist.github.com/AlexDaniel/6ef21c6baf345797c144529a9ece2c2e
15:13 sena_kun About int32 vs int64 - send a patch, Xliff++.
15:13 sena_kun *They
15:13 sena_kun *sent
15:14 sena_kun ugh.
15:14 AlexDaniel gfldex: I don't think I can explain it words, honestly I don't “understand” it fully also
15:15 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
15:15 gfldex AlexDaniel: thanks that one works
15:16 sena_kun Xliff, s/send/sent/; :c
15:16 Xliff sena_kun: Oh, all right! *sigh* I will create a pull req later.
15:17 sena_kun too busy for irony recognition right now, see https://github.com/Altai-man/Net-ZMQ/commit/f2648d6a0de982e41d6a8e9b86f2508d4bb5901d
15:19 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 https://docs.perl6.org/type/Proc::Async
15:20 AlexDaniel gfldex: yes we should
15:20 epony joined #perl6
15:20 * gfldex files an issue
15:21 perlpilot gfldex: what does line-source.p6 do?
15:23 Skarsnik joined #perl6
15:23 Skarsnik Hello
15:24 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:27 mspo a leak can sometimes turn into a segv?
15:28 gfldex didn't happen yet. The segault happens in another program that is doing similar work
15:28 gfldex oddly it seams to take at least 24h before the segfault will hit
15:29 AlexDaniel gfldex: https://irclog.perlgeek.de/perl6-dev/2017-07-17#i_14882806
15:29 gfldex the more cores you got the more heisenbugs you get it seams :->
15:32 mr-fooba_ joined #perl6
15:33 mspo someone break out the parallela :)
15:42 nadim joined #perl6
15:45 khw joined #perl6
15:59 alimon joined #perl6
16:01 mcmillhj joined #perl6
16:16 espent joined #perl6
16:28 geekosaur joined #perl6
16:30 espent joined #perl6
16:31 robertle joined #perl6
16:32 Cabanossi joined #perl6
16:33 sena_kun timotimo, ping?
16:37 Geth ¦ perl6.org: f85280ecf2 | (Zoffix Znet)++ (committed using GitHub Web editor) | source/community/index.html
16:37 Geth ¦ perl6.org: Fix mis-aligned panels
16:37 Geth ¦ perl6.org: review: https://github.com/perl6/perl6.org/commit/f85280ecf2
16:37 llfourn joined #perl6
16:40 yqt joined #perl6
16:43 Geth ¦ perl6.org: 766ad1abcf | (Zoffix Znet)++ (committed using GitHub Web editor) | source/fun/index.html
16:43 Geth ¦ perl6.org: Make -OFun section less bare
16:43 Geth ¦ perl6.org:
16:43 Geth ¦ perl6.org: By adding a couple of audreyt++'s articles on troll hugging
16:43 Geth ¦ perl6.org: and community building.
16:43 Geth ¦ perl6.org: review: https://github.com/perl6/perl6.org/commit/766ad1abcf
16:48 Geth ¦ perl6.org: c7443a423e | (Zoffix Znet)++ (committed using GitHub Web editor) | source/about/index.html
16:48 Geth ¦ perl6.org: Include remaining contributors in acknowledgements list
16:48 Geth ¦ perl6.org: review: https://github.com/perl6/perl6.org/commit/c7443a423e
16:55 Geth ¦ perl6.org: 807b3b0195 | (Zoffix Znet)++ (committed using GitHub Web editor) | source/downloads/index.html
16:55 Geth ¦ perl6.org: Shorten text of link to docs
16:55 Geth ¦ perl6.org: review: https://github.com/perl6/perl6.org/commit/807b3b0195
16:56 Geth ¦ perl6.org: fe3a2eb189 | (Zoffix Znet)++ (committed using GitHub Web editor) | source/downloads/index.html
16:56 Geth ¦ perl6.org: Add link to other available learning resources
16:56 Geth ¦ perl6.org: review: https://github.com/perl6/perl6.org/commit/fe3a2eb189
16:57 mcmillhj joined #perl6
17:00 domidumont joined #perl6
17:01 BenGoldberg joined #perl6
17:07 Geth ¦ doc: 7aabfe1eea | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/faq.pod6
17:07 Geth ¦ doc: Simplify answer for version 6.0.0
17:07 Geth ¦ doc:
17:07 Geth ¦ doc: - Show more portable example of how to find out what
17:07 Geth ¦ doc:     language version the compiler implements
17:07 Geth ¦ doc: - Remove all the prose about 2015 and binaries; doesn't seem
17:07 Geth ¦ doc:    overly relevant to the posed question.
17:08 Geth ¦ doc: review: https://github.com/perl6/doc/commit/7aabfe1eea
17:10 labster joined #perl6
17:11 bdmatatu Xliff -- how should I be sending messages in p6-jupyter-kernel?  When I used just socket.send I was getting memory corruption.
17:13 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:14 bdmatatu Excellent!
17:15 Geth ¦ doc: c643206049 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/faq.pod6
17:15 Geth ¦ doc: Refine answer for when v6.d is going to come out
17:15 Geth ¦ doc:
17:15 Geth ¦ doc: The date is the most pessimistic of those discussed, but probably the
17:15 Geth ¦ doc: most suitable and vague enough to give to the end user.
17:15 Geth ¦ doc: review: https://github.com/perl6/doc/commit/c643206049
17:32 Cabanossi joined #perl6
17:38 setty1 joined #perl6
17:41 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:42 Skarsnik there is a repository in the eco for this, but if you want to take over it works too I guess
17:43 sena_kun what repository?
17:43 sena_kun oh, I see "take over" docs...
17:54 sena_kun wrote him a letter at least.
17:54 tyil an old school, physical letter?
17:54 tyil handwritten and all that
17:55 sena_kun nope, just an ugly email without a soul of a real paper thing. :c
17:56 AlexDaniel joined #perl6
17:57 tyil sad
17:57 mspo is auth a part of the META.json?
17:58 nadim joined #perl6
17:59 sena_kun dunno. Just saw that zef can do cool things like "zef install "CSV::Parser:auth<tony-o>".
18:02 mspo yeah
18:02 ennio joined #perl6
18:04 AlexDaniel joined #perl6
18:04 grondilu joined #perl6
18:21 Rawriful joined #perl6
18:22 espadrine joined #perl6
18:24 timotimo sena_kun i was on the road for a while
18:24 sena_kun timotimo, o/
18:24 timotimo and now i'm leaving free wifi land
18:25 sena_kun can you help me with zmq bindings? Tomorrow is fine too. I need either commit bits or PR merging.
18:25 sena_kun I saw you have commit bits there.
18:32 sena_kun joined #perl6
18:32 Cabanossi joined #perl6
18:33 cdg joined #perl6
18:33 Kyo91 joined #perl6
18:34 leont joined #perl6
18:34 AnotherNick joined #perl6
18:36 Geth ¦ doc: 5f59294d93 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/faq.pod6
18:36 Geth ¦ doc: Improve "tracking dev builds" answer
18:36 Geth ¦ doc:
18:36 Geth ¦ doc: - Point to from-sauce instructions first
18:36 Geth ¦ doc: - Downplay rakudobrew, due to its quirks
18:36 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5f59294d93
18:39 Skarsnik hm DBIish test fails
18:46 Skarsnik zef precomp modules?
18:46 Skarsnik I though it kinda slow
18:49 ugexe rakudo does it on install
18:50 ugexe 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
18:50 Geth ¦ doc: Shorten "Where are good docs" section
18:50 Geth ¦ doc: review: https://github.com/perl6/doc/commit/bc8c1db3f5
18:51 ugexe otherwise rakudo can only try to guess what that order is by trying lots of combinations until it finally works
18:52 ugexe (because of stuff like `require ::($foo)`)
18:53 Geth ¦ doc: 6e1470685a | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/faq.pod6
18:53 Geth ¦ doc: Mention there's more than one 5to6- guides
18:53 Geth ¦ doc: review: https://github.com/perl6/doc/commit/6e1470685a
18:54 Geth ¦ doc: f1624387bb | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/faq.pod6
18:54 Geth ¦ doc: Minor formatting improvement
18:54 Geth ¦ doc: review: https://github.com/perl6/doc/commit/f1624387bb
18:56 Skarsnik hm weird error https://travis-ci.org/perl6/DBIish/jobs/267700035
18:56 Skarsnik zef failed?
18:56 Zoffix joined #perl6
18:57 Zoffix left #perl6
18:58 Skarsnik I think the every SSL modules does not like x)
18:58 Skarsnik +me
18:58 wamba joined #perl6
18:59 bulbas joined #perl6
18:59 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
19:00 Skarsnik https://github.com/rakudo/star/blob/master/modules/MODULES.txt ?
19:02 bulbas Skarsnik: thanks how i find what modules are? that page says "xml-writer" but if i look for xml-writer http://modules.perl6.org/search/?q=xml-writer says nothing how i can find documentation and description?
19:04 tadzik try http://modules.perl6.org/search/?q=xml%3A%3Awriter :)
19:05 Skarsnik https://github.com/rakudo/star/tree/master/modules you have the link to every git repo
19:05 Skarsnik I think there was a syntax on m.p6.org to link directly to a module
19:05 bulbas Skarsnik: perfect thanks
19:05 mr-foobar joined #perl6
19:06 bulbas Thank you all! Bye!
19:08 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:09 Geth ¦ doc: 3459a36e36 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/faq.pod6
19:09 Geth ¦ doc: Improve "core standard library" answer
19:09 Geth ¦ doc:
19:09 Geth ¦ doc: - Shorten for easier reading
19:09 Geth ¦ doc: - Link to stuff
19:09 Geth ¦ doc: - Put Rakudo Star first, since that's our user-facing distro
19:09 Geth ¦ doc: review: https://github.com/perl6/doc/commit/3459a36e36
19:11 Skarsnik yeah it finished to install irc::client
19:11 Skarsnik fun
19:15 Geth ¦ doc: 5aef83fc4f | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/faq.pod6
19:15 Geth ¦ doc: Improve "get hold of the AST" section
19:15 Geth ¦ doc:
19:15 Geth ¦ doc: - Show commands with valid code that compiles
19:15 Geth ¦ doc: - `optimize` is a better --target= for the AST
19:15 Geth ¦ doc: - Tell how to get other --target=s
19:15 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5aef83fc4f
19:17 Geth ¦ doc: 4a2dd70f13 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/faq.pod6
19:17 Geth ¦ doc: Improve formatting
19:17 Geth ¦ doc: review: https://github.com/perl6/doc/commit/4a2dd70f13
19:18 nadim joined #perl6
19:19 andrzejku_ joined #perl6
19:23 sena_kun joined #perl6
19:32 Cabanossi joined #perl6
19:32 mcmillhj joined #perl6
19:35 Geth ¦ doc: 11577335ac | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/faq.pod6
19:35 Geth ¦ doc: Improve "What is C<(Any)>?" section
19:35 Geth ¦ doc:
19:35 Geth ¦ doc: - Users seeing an (Any) has less to do with what type classes inherit from by default
19:35 Geth ¦ doc:     and more to do with the default values of variables and params
19:35 Geth ¦ doc: - There are two types of definedness (.DEFINITE vs .defined)
19:35 Geth ¦ doc: - Link to all the things that test definitness
19:35 Geth ¦ doc: review: https://github.com/perl6/doc/commit/11577335ac
19:38 cdg joined #perl6
19:40 raschipi_ Zoffix is on a doc roll today.
19:46 cdg joined #perl6
19:49 Geth ¦ doc: 04ab40bbd5 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/faq.pod6
19:49 Geth ¦ doc: Update "Is there a CPAN for Perl 6?" entry
19:49 Geth ¦ doc:
19:49 Geth ¦ doc: - Yes, we now have CPAN!
19:49 Geth ¦ doc: - Viewer for it on modules.perl6.org coming soon (in a few weeks tops)
19:49 Geth ¦ doc: review: https://github.com/perl6/doc/commit/04ab40bbd5
19:58 Kyo91 joined #perl6
20:05 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 ennio the code is here: https://github.com/scriplit/vscode-languageserver-perl6
20:06 ennio 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 https://perl6.org/whatever/ list.
20:07 moritz ennio: nice!
20:08 sena_kun the sources are at https://github.com/perl6/perl6.org/blob/master/source/whatever/index.html
20:10 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:16 sena_kun ennio++
20:17 El_Che ennio: just saw and retweeted your announcement. Great news
20:33 P6steve joined #perl6
20:34 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:35 raschipi_ P6steve: What about using a multi?
20:37 P6steve raschipi - I'm already using multi - but 4x operators, 3x types (Distance, Real, Str) is a lot of repetitive code
20:38 raschipi_ right, what about type classes?
20:38 raschipi_ Or declaring a type that is a superset of the allowed ones?
20:39 cdg joined #perl6
20:40 P6steve do you mean something like class AllMyTypes is Distance is Real is Str - that'd probably work
20:41 geekosaur joined #perl6
20:44 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:46 raschipi_ Or you can use a subset: (Any $var where Distance|Real|Str)
20:47 mspo neovim has a language server plugin
20:47 [Coke] multis for types, private untyped sub they dispatch to...
20:51 P6steve that's v. helpful - thanks.. reading type variable docs...
21:11 Xliff <sena_kun> too busy for irony recognition right now...
21:11 * Xliff cracks up.
21:11 Xliff sena_kun: What zmq binding help do you need?
21:13 sena_kun fix problems with 4.2. commit bits to merge it into master. :)
21:24 unclechu hey guys, what would you recommend to try about compiling perl6 to javascript?
21:25 perlpilot unclechu: talking to pmurias :)
21:27 lizmat joined #perl6
21:29 Kyo91_ joined #perl6
21:29 timotimo sena_kun: i'll just go ahead and merge your pull request
21:29 timotimo if that's okay?
21:30 sena_kun timotimo, there are some more changes, you can merge that one.
21:30 sena_kun I'll prepare the second right away.
21:30 sena_kun thanks.
21:30 timotimo merged the first one
21:30 dalek Net-ZMQ: 7438b8c | Altai-man++ | / (3 files):
21:30 dalek Net-ZMQ: Closing socket's method
21:31 dalek Net-ZMQ: review: https://github.com/arnsholt/Net-ZMQ/commit/7438b8c289
21:31 dalek Net-ZMQ: 32b40b4 | Altai-man++ | / (3 files):
21:31 dalek Net-ZMQ: Add up ZMQ_RCVHWM and ZMQ_SNDHWM constants;
21:31 dalek joined #perl6
21:35 sena_kun timotimo, https://github.com/arnsholt/Net-ZMQ/pull/17
21:37 timotimo i like this a lot
21:37 dalek Heuristic branch merge: pushed 32 commits to Net-ZMQ by timo
21:37 timotimo thanks for putting the time & effort in
21:37 sena_kun \o/
21:37 sena_kun timotimo++
21:38 sena_kun it's time to write to jupyter maintainer an issue with a migration guide...
21:38 timotimo \o/
21:38 timotimo want his email address?
21:39 sena_kun I'll file an issue.
21:39 sena_kun github's issue, i.e.
21:41 timotimo sounds good
21:41 timotimo i'll be mostly afk again
21:41 sena_kun good luck.
21:50 mcmillhj joined #perl6
21:55 snarkyboojum joined #perl6
21:59 Aaronepower joined #perl6
22:06 mcmillhj joined #perl6
22:20 devmikey joined #perl6
22:22 mcmillhj joined #perl6
22:28 samcv ok think imma bump moarvm so we get knuth morris pratt, everything seems to be in order
22:28 mcmillhj joined #perl6
22:44 mcmillhj joined #perl6
23:00 mcmillhj joined #perl6
23:05 cosimo joined #perl6
23:07 dustinm`_ joined #perl6
23:15 mcmillhj joined #perl6
23:16 lizmat joined #perl6
23:16 cdg joined #perl6
23:24 samcv timotimo, i think we may want to stop collapsing strings when we do regex on them
23:24 samcv m: my $a = 'aaaaaaaaaab'; my $b = 'a' x 999999 ~ 'b'; say $b ~~ /$a/; say now - INIT now
23:24 camelia rakudo-moar 636a3c: OUTPUT: «?aaaaaaaaaab??7.6077099?»
23:24 samcv my $a = 'aaaaaaaaaab'; my $b = 'a' x 999999 ~ 'b'; use nqp; say nqp::index($b, $a, 0); say now - INIT now
23:25 samcv 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 rakudo-moar 636a3c: OUTPUT: «999989?0.205195282?»
23:25 samcv so that takes only .2 seconds if we don't collapse it
23:25 samcv especially now that we have knuth morris pratt algorithm for _all_ strings, i think it may be a good idea?
23:27 skids joined #perl6
23:29 TEttinger did those print on top of each other?
23:29 TEttinger it looks like the five 9s might have been something else printed
23:30 samcv 999989?
23:30 samcv for some reason literal regex takes a ridiculous amount of time
23:31 samcv even when i disable flattening the haystack
23:31 samcv it must be doing a bunch of crap other than just indexing it. i mean it's just a literal
23:31 mcmillhj joined #perl6
23:32 MasterDuke heh, try interpolating a literal string into the regex, multiple times slower
23:33 samcv hmm? you mean like <$this> ?
23:33 samcv m: my $a = 'aaaaaaaaaab'; my $b = 'a' x 999999 ~ 'b'; say $b ~~ /<$a>/; say now - INIT now
23:33 camelia rakudo-moar 636a3c: OUTPUT: «?aaaaaaaaaab??19.30805550?»
23:33 MasterDuke that's worse even than just $this
23:34 MasterDuke oh ha, that's what you first did
23:34 samcv well yeah since it has to create the regex
23:34 MasterDuke but yeah, <$this> is the slowest
23:34 samcv yeah since it's not literal
23:34 samcv basically like eval
23:34 MasterDuke yep
23:35 samcv not sure why literal is so slow. but i don't know how the regex compiler works...
23:36 samcv 4.5000660 secs with flattening and disabling flattening it takes 4.7 secs
23:36 samcv which is sad since nqp::index is practically instant
23:40 samcv and case insensitive regex is 5.09 seconds. why is just plain literal so slow..
23:41 samcv 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...
23:43 MasterDuke look at --target=optimize
23:44 samcv nope not there either
23:44 samcv nothing with 'index' in it at all
23:47 MasterDuke what code are you looking at? something with nqp::index? or a regex?
23:47 samcv yeah
23:47 Cabanossi joined #perl6
23:47 samcv it's a regex
23:47 samcv not sure how it would work without using index at all though...
23:47 samcv or index from end or something
23:49 MasterDuke i think the actual regex engine does it
23:49 MasterDuke see the QAST::Regex?
23:50 samcv so the regex engine doesn't use nqp::index?
23:52 MasterDuke it might, but maybe it does it at runtime?
23:54 MasterDuke could stick an fprintf(stderr, ...) in index and see
23:55 Ulti is anyone else bummed that the "atomic" operators are not on the periodic table https://www.ozonehouse.com/mark/periodic/
23:59 samcv well i mean it does use nqp::index. but. it must do other ops too

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

Perl 6 | Reference Documentation | Rakudo