Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-12-15

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:17 khw joined #perl6
00:30 Geth ¦ doc: 0++ created pull request #1714: Fix )> typo
00:30 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1714
00:34 lookatme joined #perl6
00:34 lookatme o/
00:40 TimToady joined #perl6
00:41 ZzZombo joined #perl6
00:43 aborazmeh joined #perl6
00:43 aborazmeh joined #perl6
00:59 lookatme Is there something about non-block IO of Perl6 ?
01:01 raschipi_ non-blocking as in asynchronous or non-block as in charachter output?
01:01 raschipi_ non-buffered, I mean
01:01 cpage_ joined #perl6
01:03 telex joined #perl6
01:05 lookatme non-blocking in asynchronous
01:07 leah2 joined #perl6
01:08 geekosaur I think perl 6 prefers you use Promises instead of direct non-blocking I/O
01:08 geekosaur the moar layer *does* use non-blocking I/O
01:10 raschipi_ Uses libuv for non-blocking I/O, which on most operating systems means firing up a new thread that will block for the I/O operation.
01:10 lookatme yeah, that's what I mean
01:11 raschipi_ Don't even know of a mainstream operating system that supports non-blocking I/O
01:11 Geth ¦ doc: fe032415ea | (Dmitri Iouchtchenko)++ | doc/Language/regexes.pod6
01:11 synopsebot Link: https://doc.perl6.org/language/regexes
01:11 Geth ¦ doc: Fix )> typo
01:11 Geth ¦ doc: review: https://github.com/perl6/doc/commit/fe032415ea
01:11 Geth ¦ doc: 40a2a53783 | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6
01:11 Geth ¦ doc: Merge pull request #1714 from 0/typo-fix
01:11 Geth ¦ doc:
01:11 Geth ¦ doc: Fix )> typo
01:11 Geth ¦ doc: review: https://github.com/perl6/doc/commit/40a2a53783
01:13 geekosaur os x certainly does
01:13 geekosaur windows has some asynch I/O which can be used to implement it iirrc
01:15 MasterDuke joined #perl6
01:16 raschipi_ I said mainstream, not niche Operating systems.
01:18 geekosaur so you either meant only Windows and said nothing, or you meant something obscure enough that nobody will know what you're talking about anyway
01:20 lookatme I think windows support non-blocking IO
01:21 raschipi_ windows is a niche operating system, used only on desktops.
01:21 TEttinger lol
01:21 lookatme :) so, what is mainstream OS
01:21 raschipi_ Linux
01:21 TEttinger asking the expert eh?
01:22 comborico1611 lookatme, you are in Vietnam, right?
01:22 lookatme :( in china
01:23 lookatme Linux is not popular than Windows
01:23 teatime well technically
01:23 TEttinger the only place linux is more popular than windows is for servers, which is, you guessed it, a niche
01:23 teatime how many android handsets are there?
01:24 TEttinger android I guess is linux-derived, or at least unix-derived
01:24 raschipi_ "servers", i.e. all IT.
01:24 TEttinger ...
01:24 teatime TEttinger: os x is unix-derived.  android runs the linux kernel.
01:24 geekosaur don't bother, I now recognize one of these mirror universe folks who block all evidence of linux's actual populatiry so they can think it;s mroe popular than both windows and macos (both of which have far larger installed bases in the real world unless you count things like wifi routers and other embedded uses that nobody even knows whats inside)
01:25 raschipi_ I'm just kidding, of course.
01:25 teatime lol guys, we're not really doing this.  don't take it too seriously.
01:25 raschipi_ Yet Linux install base is indeed much bigger than the other two.
01:25 TEttinger the only mainstream OS is plan 9
01:25 teatime microsoft is making apps for linux now.
01:25 lookatme comborico1611, I am in china :)
01:26 TEttinger teatime: and they're a major contributor to the linux kernel
01:26 Morfent freebsd is great and eventually i will radicalize someone
01:26 TEttinger largest organization on github too I think
01:27 teatime eh?
01:27 TEttinger yeah, it's weird
01:27 raschipi_ Most people learning to program shouldn't concern themselves with desktops, the programming market is much bigger outside of it.
01:27 teatime major contributor?  didn't know that.  but tons of companies are.
01:28 teatime raschipi_: quite true.  I am quickly growing tired of "apps", though.
01:28 raschipi_ Microsoft was forced to contribute a lot of code in a settlement for violating linux copyright, for copying code.
01:29 raschipi_ Otherwise they just contribute code for making Linux work well in Azure.
01:30 Morfent microsoft really must've liked cowsay
01:34 raschipi_ The major part of the programming market is private code, not public code. Software that is shipped for a single client, not distributted for the public.
01:34 raschipi_ And that runs on Linux, be it transactions or high-performance.
01:37 TEttinger ah, here's the MS on Github thing https://github.com/blog/2425-release-radar-september-2017
01:38 TEttinger (at the bottom)
01:45 comborico1611 lookatme, sorry for the delay. I got caught-up in YouTube subscription
01:46 comborico1611 Chinese food is the best in the world
01:50 lookatme Haha
01:50 comborico1611 Right?
01:51 lookatme yeah, almost :)
01:52 comborico1611 What's before it then?
01:57 lookatme I didn't get it
02:00 comborico1611 What is a better food than Chinese?
02:01 lookatme Maybe the food you love but have no chance taste :)
02:03 comborico1611 This is possible.  But I'm speaking of the food we have tasted.
02:04 comborico1611 What is your age?
02:05 lookatme China also has something you certainly didn't like, such as DouZhi(a drink of BeiJing)
02:06 lookatme I am 27th old
02:06 comborico1611 Is it alcoholic?
02:06 comborico1611 I'm 31.
02:07 comborico1611 You were born 1990.
02:07 comborico1611 Or 89?
02:07 lookatme No, not china spirit
02:07 lookatme yeah, 90
02:08 lookatme https://en.wikipedia.org/wiki/Douzhi
02:08 lookatme The wiki
02:08 lookatme It's looks like a milk :)
02:10 comborico1611 By-products are often not good.  But not always. Molasses is a by-product of refined sugar.
02:10 comborico1611 Molasses is nutrient-rich.
02:10 comborico1611 27 years old. Time goes by fast quickly doesn't it?
02:10 lookatme Yeah
02:11 comborico1611 I suspect time goes by faster for someone living in China. The young people that live in America grow up slowly because we are shielded from many issues of life.
02:11 comborico1611 Nevertheless, time has gone by quickly for me as well here in America.
02:12 comborico1611 My wife was born in 1990.
02:13 lookatme oh
02:13 comborico1611 Well, I need to read my Bible before I sleep. It was nice talking with you. Hope to see you tomorrow.
02:14 lookatme ok
02:14 lookatme night
02:14 comborico1611 Goodnight!
03:01 ilbot3 joined #perl6
03:01 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!
03:06 pilne joined #perl6
03:09 Juerd joined #perl6
03:22 perlpilot joined #perl6
03:22 tokik left #perl6
03:25 Morfent how do you get the elements of a pointer to an array returned from a native call?
03:25 Morfent i've tried pointer arithmetic but my tests keep failing
03:30 Morfent ohh you're supposed to give nativecast the pointer object, not Pointer.Int
03:34 Morfent ...wait
03:52 astronavt joined #perl6
03:58 piojo1 joined #perl6
04:05 bart___ joined #perl6
04:08 piojo joined #perl6
04:49 bwisti joined #perl6
04:56 Cabanoss- joined #perl6
05:11 imcsk8 joined #perl6
05:24 wamba joined #perl6
05:58 ZzZombo joined #perl6
06:54 domidumont joined #perl6
06:56 Actualeyes joined #perl6
07:01 domidumont joined #perl6
07:21 darutoko joined #perl6
07:28 sena_kun joined #perl6
07:52 lowbro joined #perl6
07:52 lowbro joined #perl6
07:52 lookatme Morfent, yeah, nativecast will help you
07:58 pmurias joined #perl6
08:15 wamba joined #perl6
08:29 abraxxa joined #perl6
08:32 ryn1x joined #perl6
08:35 pmurias joined #perl6
08:50 cdg joined #perl6
08:56 scimon joined #perl6
08:57 piojo m: my Hash[Int] %nested-types; %nested-types.WHAT.say;
08:57 camelia rakudo-moar 3405001da: OUTPUT: «(Hash[Hash)␤»
08:58 piojo that's not valid, right?
09:01 moritz it loks weird
09:01 moritz like, trunctaed
09:01 moritz m: my Int %h; say %h.^name
09:01 camelia rakudo-moar 3405001da: OUTPUT: «Hash[Int]␤»
09:06 lookatme I have a question about supply
09:07 AlexDaniel c: 2017.05,HEAD my Hash[Int] %nested-types; %nested-types.WHAT.say;
09:07 committable6 AlexDaniel, ¦2017.05: «(Hash[Hash[Int]])␤» ¦HEAD(3405001): «(Hash[Hash)␤»
09:07 AlexDaniel bisect: old2017.05 my Hash[Int] %nested-types; %nested-types.WHAT.say;
09:07 bisectable6 AlexDaniel, On both starting points (old=2015.12 new=3405001) the exit code is 1 and the output is identical as well
09:07 bisectable6 AlexDaniel, Output on both points: «===SORRY!=== Error while compiling /tmp/ZxCgYdslMv␤Malformed postfix call␤at /tmp/ZxCgYdslMv:1␤------> old2017.⏏05 my Hash[Int] %nested-types; %nested-t␤»
09:07 lookatme https://pastebin.com/T5HwANUD
09:07 AlexDaniel bisect: old=2017.05 my Hash[Int] %nested-types; %nested-types.WHAT.say;
09:07 bisectable6 AlexDaniel, Bisecting by output (old=2017.05 new=3405001) because on both starting points the exit code is 0
09:07 bisectable6 AlexDaniel, bisect log: https://gist.github.com/36e14d1291814ad80f9d38fdfaf96343
09:07 bisectable6 AlexDaniel, (2017-05-31) https://github.com/rakudo/rakudo/commit/1ed284e2953382744b02058a2ec548658d744786
09:07 AlexDaniel c: 1ed284e295^,1ed284e295 my Hash[Int] %nested-types; %nested-types.WHAT.say;
09:07 committable6 AlexDaniel, ¦1ed284e295^: «(Hash[Hash[Int]])␤» ¦1ed284e: «(Hash[Hash)␤»
09:07 lookatme eval:https://pastebin.com/T5HwANUD
09:07 evalable6 lookatme, It looks like a URL, but mime type is ‘text/html; charset=utf-8’ while I was expecting something with ‘text/plain’ or ‘perl’ in it. I can only understand raw links, sorry.
09:07 lookatme eval: https://pastebin.com/T5HwANUD
09:07 evalable6 lookatme, It looks like a URL, but mime type is ‘text/html; charset=utf-8’ while I was expecting something with ‘text/plain’ or ‘perl’ in it. I can only understand raw links, sorry.
09:07 lookatme eval: https://pastebin.com/raw/T5HwANUD
09:07 evalable6 lookatme, Successfully fetched the code from the provided URL.
09:07 evalable6 lookatme, rakudo-moar 3405001da: OUTPUT: «(exit code 2) Usage:␤  /tmp/L2uKRhd1qA <file> ␤»
09:08 lookatme that need a command line argument :(
09:08 AlexDaniel piojo: will you submit a bug report?
09:09 piojo AlexDaniel: sure. I noticed Hash[Hash is the same length as Hash[Int]. I bet it works for other types, too
09:09 lookatme I was watch a pdf about python Coroutine: http://www.dabeaz.com/coroutines/Coroutines.pdf
09:10 piojo m: my Hash[Array] %nested-types; %nested-types.WHAT.say;
09:10 camelia rakudo-moar 3405001da: OUTPUT: «(Hash[Hash)␤»
09:10 piojo oh, so the length was just a coincidence
09:10 AlexDaniel piojo: well, the commit says “Assuming we will never get something more complicated than foo[bar]”, so it's pretty broken I think :)
09:11 lookatme It has a Pipeline Example in page 22, I want write it in Perl6
09:11 piojo AlexDaniel: that's funny
09:15 scimon lookatme: looking :)
09:19 piojo AlexDaniel: thanks, reported as #132585
09:23 abraxxa I wonder if the statement 'the ability to write optimized Logstash plugins in any JVM language' in the last section of https://www.elastic.co/blog/logstash-6-1-0-released means that I'll be able to use Perl 6 running on the JVM in there
09:25 scimon lookatme : On you return take a look at https://docs.perl6.org/type/IO::Handle#(Any)_method_Supply and https://docs.perl6.org/type/Supply#method_grep
09:28 AlexDaniel piojo: just curious, why use RT when you can use github?
09:28 zakharyas joined #perl6
09:32 piojo AlexDaniel: I never realized rakudo had multiple bug trackers. :)
09:32 piojo is github more convenient for developers?
09:33 AlexDaniel piojo: maybe a little bit
09:34 AlexDaniel piojo: but if you look at the monthly report, most *new* tickets are on github. So I'm guessing it's more convenient for users. https://gist.github.com/Whateverable/da2317696a8aa7dcfb82cf724ed2e123
09:40 piojo AlexDaniel: I once worked on another e-mail API for bug submission, so maybe I'm romantic.
09:40 piojo not coincidentally, it was also written in perl.
09:41 AlexDaniel piojo: heh, well feel free to use any bug tracker. We are letting the best one survive :)
09:42 piojo AlexDaniel: Now that I see github only has 60 open bugs, I'm sorely tempted to use that instead of rakudobug.
09:43 simonm joined #perl6
09:44 eliasr joined #perl6
09:44 Ven` joined #perl6
09:44 tyil the latest advent post has a line stating `$ perl6 web-spider.p6 [–domain=http://xxx.org]`, shouldn't that be two dashes (`--domain`)?
09:45 piojo oh my, that should be example.com
09:45 piojo at least it's not hyperlinked!
09:46 imcsk8_ joined #perl6
09:51 * lizmat will fix
09:53 lizmat .u –
09:53 yoleaux U+2013 EN DASH [Pd] (–)
09:54 lizmat .u -
09:54 yoleaux U+002D HYPHEN-MINUS [Pd] (-)
09:55 lizmat I guess wordpress is changing the -- to –   :-(
09:55 lizmat too bad you can't use – as a replacement for -- in CLI  :-(
09:56 DrForr Well, the the em-dash would be ---foo :)
09:56 DrForr *then
09:59 lizmat fixed it by using &#45;&#45;  :-(
09:59 rindolf joined #perl6
09:59 lizmat too bad about the p5isms in the code
09:59 lizmat and the unnecessary use of .kv
10:20 pmurias piojo: the biggest advantage of the github bug tracker is that it's familiar to more people
10:20 yoleaux 11 Dec 2017 17:05Z <samcv> pmurias: <:space> is a property name alias for White_Space, though if there is <:ascii> then it should be <:InASCII> if it's meant as alias for InBasicLatin
10:23 AlexDaniel pmurias: I thought that the biggest advantage was that it works…
10:24 AlexDaniel :)
10:24 AlexDaniel at least, that's the reason why I opened it
10:26 pmurias AlexDaniel: doesn't RT work too? (as obnoxious as it may be)
10:27 AlexDaniel pmurias: yes, for some people. See this as an example: https://irclog.perlgeek.de/perl6-dev/2017-10-22#i_15336853
10:27 AlexDaniel pmurias: the latest issue was that wander++ was trying to participate in the squashathon but RT only showed his comments a few days later
10:28 AlexDaniel and it's unclear if all of their comments reached the tracker in the end
10:28 AlexDaniel basically, it is only reliable if you do everything through the bitcard account
10:29 AlexDaniel the problem with the bitcard stuff is that a huge % of users end up with a broken account
10:29 AlexDaniel and this is *still* not fixed, as far as I know
10:30 AlexDaniel at least, I never received any notification that it was fixed, and all rt bugs are private and there's no access to them whatsoever, even if you submitted the bug report in the first place
10:31 AlexDaniel (if it's unclear, I'm referring to issues submitted through perlbug-admin)
10:32 ZzZombo joined #perl6
10:33 cdg joined #perl6
10:33 AlexDaniel Oh yeah, by the way
10:34 AlexDaniel if anybody reading this has this problem with their RT account: https://imgur.com/a/n93Dn
10:34 AlexDaniel then you should mail the address on the bottom of the page, describing the problem
10:34 AlexDaniel and a few days (if not weeks) later they'll fix your account
10:34 AlexDaniel after that you should not experience any RT issues.
10:36 AlexDaniel Oh, also, if anybody is wondering how to submit a bug report through RT when you have an account, you can do it here: https://rt.perl.org/m/
10:38 cdg_ joined #perl6
10:40 cdg joined #perl6
10:51 piojo Is it bad practice to use "is raw" for an optional output parameter to a method, simply because "is rw" isn't allowed?
10:52 araraloren joined #perl6
10:54 piojo m: my $account-balance = 10; sub has-currency($amount, :$missing-amount-output is raw=*) { unless $missing-amount-output ~~ Whatever { $missing-amount-output = $amount-$account-balance; }; return $account-balance > $amount; }; my $shortfall; say has-currency(12, :missing-amount-output($shortfall)); say "lacking $shortfall" if $shortfall > 0;
10:54 camelia rakudo-moar 3405001da: OUTPUT: «False␤lacking 2␤»
10:55 araraloren o|
11:01 mscha joined #perl6
11:02 mscha Very annoying: my code with gather/take is about a THOUSAND times slower than old-fashioned linear code.  https://www.reddit.com/r/adventofcode/comments/7jxkiw/2017_day_15_solutions/dra8ez6/
11:03 mscha In the meantime, all Python solvers use generators without such issues.  😢
11:04 lizmat mscha: why the "lazy" ?   is that needed ?
11:04 mscha lizmat: not sure, I just add it “just in case”.
11:04 lizmat so how's the timing without it ?
11:04 AlexDaniel mscha: what arguments should I use to test it?
11:05 Morfent how does the eager gather for match up
11:05 mscha AlexDaniel: for instance a file with two numbers in it: 65 8921
11:09 mscha lizmat: without the `lazy` it never finishes, because I assigned it to a @var.  When I use a $var instead it works, but isn't any faster.
11:09 AlexDaniel mscha: well actually I have no idea how to run that with the gather-take sub you gave
11:11 mscha AlexDaniel: https://pastebin.com/e7vbi7u4
11:11 araraloren scimon, I am not asking how to do it, and IO::Handle::Supply only support emit chunk :)
11:12 araraloren BTW, I am that lookatme
11:12 lizmat mscha: could you try without the lazy and binding the generators to the arrays ?
11:12 scimon Got that.
11:13 scimon Just thought they might be helpful.
11:13 araraloren scimon, anyway thanks
11:14 araraloren Actually I write that code with gather/take too, but not working
11:15 mscha lizmat: still never finishing with "my @gen-A := generator(...);".  When I change it to a scalar ($gen-A), it finished again, in the same time (~32s).
11:16 AlexDaniel mscha: what about using * instead of ×
11:17 mscha AlexDaniel: 10s.  So 3 times as fast.  Still by far not fast enough...
11:19 AlexDaniel mscha: by the way, you can probably write something like ($init, {($_ * $times) % $modulo} … *)
11:19 pmurias joined #perl6
11:19 AlexDaniel that's not really faster, but just as an idea
11:19 itaipu joined #perl6
11:20 araraloren I heard gather/take is implement by exception
11:21 mscha Actually a small correction: i said “a THOUSAND times slower”, but I counted my zeroes wrong, it's ‘only’ a hundred times slower.
11:22 mscha And × vs * taks care of a factor 3, so gather/take is only 30 times slower than linear code.
11:22 geekosaur control exceptions aren't normal exceptions. they're nonlocal flow control primitives, and get to skip much of the exception machinery
11:24 geekosaur (you could think of gather/take as a call/cc if you're feeling schemey)
11:24 araraloren oh, is it slower than coroutines ?
11:27 Ven` joined #perl6
11:28 AlexDaniel mscha: that's still unfortunate :(
11:31 lizmat https://gist.github.com/lizmat/d8da65dfea8d223f4c673f6e61656a25  # mscha: my approach so far
11:33 sena_kun joined #perl6
11:35 mscha lizmat: that is nice & fast indeed, thanks!
11:36 lizmat hmmm... it appears we don't have a int int candidate for +& because of RT #128655
11:37 synopsebot RT#128655 [open]: https://rt.perl.org/Ticket/Display.html?id=128655 [OPTIMIZER] Mixup in candidates through optimizer
11:38 mscha "+& 65535" is still (slightly) faster than "% 65536".
11:47 notbenh joined #perl6
12:13 Rawriful joined #perl6
12:27 Morfent man i really need to learn lldm
12:32 pmurias what's lldm?
12:33 pmurias geekosaur: in what sense do control exception skip much of the exception machinery?
12:33 Morfent it's a c debugger
12:34 pmurias geekosaur: to be fair they can be optimized out sometimes
12:34 pmurias Morfent: you mean lldb?
12:34 Morfent lol yeah
12:35 Morfent my bad
12:36 Morfent there are a couple bugs that show up in moar that i wanna try to fix
12:36 Morfent on my os i mean
12:40 markong joined #perl6
12:52 pdcawley joined #perl6
13:14 Ven` joined #perl6
13:25 roguelazer joined #perl6
13:31 konsolebox joined #perl6
13:34 AlexDaniel joined #perl6
13:35 natrys joined #perl6
13:38 Geth ¦ doc: 1abc77a105 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/pod.pod6
13:38 synopsebot Link: https://doc.perl6.org/language/pod
13:38 Geth ¦ doc: update pod info for current capability
13:38 Geth ¦ doc:
13:38 Geth ¦ doc: remove “key => ...” formats which are not yet implemented
13:38 Geth ¦ doc: review: https://github.com/perl6/doc/commit/1abc77a105
13:40 Geth ¦ doc: 3d044a93ed | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/pod.pod6
13:40 Geth ¦ doc: use preferred English form of number in text
13:40 Geth ¦ doc: review: https://github.com/perl6/doc/commit/3d044a93ed
13:42 Geth ¦ doc: 61673d496c | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/pod.pod6
13:42 Geth ¦ doc: close parenthetical expression
13:42 Geth ¦ doc: review: https://github.com/perl6/doc/commit/61673d496c
13:51 jonathon joined #perl6
13:58 cdg joined #perl6
13:59 cdg joined #perl6
14:02 bdmatatu joined #perl6
14:07 cdg_ joined #perl6
14:16 Cabanossi joined #perl6
14:20 Ven` joined #perl6
14:22 piojo_ joined #perl6
14:31 comborico1611 joined #perl6
14:36 pdcawley joined #perl6
14:45 Zoffix joined #perl6
14:45 Zoffix Reminder: release is in 2 days and we still have 3 release blockers, if anyone can figure out how to fix them: https://github.com/rakudo/rakudo/issues?q=is%3Aissue+is%3Aopen+label%3A%22%E2%9A%A0+blocker+%E2%9A%A0%22
14:45 Zoffix Reminder: release is in 2 days and we still have 3 release blockers, if anyone can figure out how to fix them: https://github.com/rakudo/rakudo/issues?q=is%3Aissue+is%3Aopen+label%3A%22%E2%9A%A0+blocker+%E2%9A%A0%22
14:46 Cabanossi joined #perl6
14:48 Zoffix left #perl6
14:48 bdmatatu Is there a clever way of running something every time except the first time through a loop?  (like the opposite of 'once'?)
14:49 moritz m: for <a b c d> { say "foo" if ++$; .say }
14:49 camelia rakudo-moar 3405001da: OUTPUT: «foo␤a␤foo␤b␤foo␤c␤foo␤d␤»
14:49 moritz m: for <a b c d> { say "foo" if $++; .say }
14:49 camelia rakudo-moar 3405001da: OUTPUT: «a␤foo␤b␤foo␤c␤foo␤d␤»
14:50 moritz bdmatatu: ^^
14:50 bdmatatu thank you!
14:58 lizmat m: for <a b c d>.tail(*-1) { say "foo"; .say }
14:58 camelia rakudo-moar 0a2e5172d: OUTPUT: «foo␤b␤foo␤c␤foo␤d␤»
14:58 lizmat ah, something
14:59 lizmat ok, scratch that then :-)
15:05 zakharyas joined #perl6
15:06 jonathon anyone else having/had problems building rakudo 2017.11 on Ubuntu? I've been using Debian packages to backport and to date everything to 2017.10 has compiled without issue.
15:06 jonathon Log for anyone interested: https://launchpadlibrarian.net/349345231/buildlog_ubuntu-xenial-amd64.rakudo_2017.11-0york1~16.04_BUILDING.txt.gz
15:09 geospeck joined #perl6
15:11 Altreus which doc should I read to learn what the zef equivalent of a cpanfile is?
15:11 Altreus or does cpanfile also work :P
15:16 comborico1611 I heard that many former Java programmers went to Ruby.  I'm wondering if the same can be said for Perl5 and PHP.
15:17 comborico1611 I'm shocked by how I've heard it was said 80% of websites were php.
15:18 jonathon the deployment story for PHP is better than for the majority of other languages, so it shouldn't be _too_ surprising ;)
15:18 comborico1611 I'll have to read about that. Thank you.
15:21 pdcawley joined #perl6
15:25 Herby_ joined #perl6
15:25 Herby_ o/
15:40 piojo_ joined #perl6
15:44 Altreus another question - can I create a subset of Set (or something else) that constrains the values inside it to be of a certain type/
15:44 Altreus I'm not sure what to search for
15:54 DrForr m: my Set $x where * ~~ Int;
15:54 camelia rakudo-moar 1fb518956: ( no output )
15:54 DrForr Not sure if that'd work but it compiles :)
15:55 timotimo that won't do it i don't think
15:55 timotimo that would just match the set itself against Int
15:56 piojo_ joined #perl6
15:58 cdg joined #perl6
15:59 cdg joined #perl6
16:05 mahafyi joined #perl6
16:12 troys joined #perl6
16:15 mienaikage Tried throwing a couple of ideas at the wall but I just get "Set cannot be parameterized"
16:16 pmurias joined #perl6
16:28 mienaikage The best idea I have is `my %set is Set = Array[Int](^10)`
16:31 st_elmo joined #perl6
16:33 AlexDaniel` :3
16:33 Altreus mienaikage: wat :D
16:33 timotimo m: my $p = Promise.new; $p.then(-> $it { say $it }); $.keep(1)
16:33 camelia rakudo-moar 1fb518956: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable $.keep used where no 'self' is available␤at <tmp>:1␤------> 3; $p.then(-> $it { say $it }); $.keep(1)7⏏5<EOL>␤»
16:33 * AlexDaniel` sees some messages directly from matrix
16:33 timotimo m: my $p = Promise.new; $p.then(-> $it { say $it }); $p.keep(1)
16:33 camelia rakudo-moar 1fb518956: ( no output )
16:34 timotimo i ... don't understand?
16:34 Altreus I mean if Set cannot be parameterised then is there an equivalent that can?
16:34 Zoffix joined #perl6
16:34 timotimo well, hashes can
16:34 Altreus I guess an array can too
16:35 timotimo greppable6: Promise.new
16:35 Zoffix Altreus: do you mean constrain it so it blows up if you try to store something or constraint something that accepts a Set (e.g. a parameter)?
16:35 greppable6 timotimo, https://gist.github.com/fa9ef6dc027d7692ea7562b8cfc59db2
16:35 Altreus the former
16:35 Altreus It's not necessary - I'm just exploring the language
16:35 Altreus an array would suffice really
16:36 Altreus However, I can imagine a situation in which it would be more useful than here
16:36 Zoffix Altreus: ah, then subset won't help. It'd only check on assignment/binding. You can parametarize a hash and manually do what Set does for you
16:36 Zoffix m: my %h{Int}; %h{42e0}++
16:36 camelia rakudo-moar 1fb518956: OUTPUT: «Type check failed in binding to parameter 'key'; expected Int but got Num (42e0)␤  in block <unit> at <tmp> line 1␤␤»
16:36 Zoffix m: my %h{Int}; %h{42}++; say %h
16:36 camelia rakudo-moar 1fb518956: OUTPUT: «{42 => 1}␤»
16:36 timotimo oh, the thens get scheduled on the scheduler
16:36 Zoffix m: subset Meows of SetHash where .keys.all ~~ Int; my Meows $x = SetHash.new(1, 42e0)
16:37 camelia rakudo-moar 1fb518956: OUTPUT: «Type check failed in assignment to $x; expected Meows but got SetHash (SetHash.new(42e0,1))␤  in block <unit> at <tmp> line 1␤␤»
16:37 Zoffix m: subset Meows of SetHash where .keys.all ~~ Int; my Meows $x = SetHash.new; $x{42e0}++ # but this won't get checked, 'cause it ain't binding/assignment
16:37 camelia rakudo-moar 1fb518956: ( no output )
16:37 mienaikage m: my Bool %h{Int}; %h{42}++; say %h
16:37 camelia rakudo-moar 1fb518956: OUTPUT: «{42 => True}␤»
16:38 Zoffix Altreus: the META6.json required to be had by modules is the "cpanfile". Though, less flexible. AFAIK we don't have any way to specify suggested/optional modules
16:39 Altreus I just wanted a thing to tell zef to read so I can install deps easily :)
16:39 Altreus I'll look it up when i've understood this Set stuff
16:39 Altreus I think maybe I don't want a Set because then I have to make types so I can use === properly
16:39 Altreus or rather, so Set can use === properly
16:39 Altreus can I do...
16:39 Altreus m: my @ar{Int}; @ar[0] = 1; @ar[1] = 1.1;
16:39 camelia rakudo-moar 1fb518956: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤The {} shape syntax with the @ sigil is reserved␤at <tmp>:1␤------> 3my @ar{Int7⏏5}; @ar[0] = 1; @ar[1] = 1.1;␤    expecting any of:␤        statement end␤        statement modifier␤  …»
16:39 Altreus no
16:40 Altreus unless the {} is because it was a hash
16:40 Zoffix m: my Int @ar; @ar[0] = 1; @ar[1] = 1.1;
16:40 camelia rakudo-moar 1fb518956: OUTPUT: «Type check failed in assignment to @ar; expected Int but got Rat (1.1)␤  in block <unit> at <tmp> line 1␤␤»
16:40 Altreus oh well
16:41 Altreus I guess I went around the houses to find that out :)
16:41 Zoffix the {} was because it's a hash and that's the constraint for keys, mienaikage's example showed additional Bool constraint for values and same syntax works for Arrays
16:41 Zoffix (amusingly `my @ar[Rat]` compiles too; though doesn't do anything)
16:43 Zoffix .tell jonathon doesn't seem like any good hints for reasons in your build failure. Do you have enough memory to build? You need about 1.3GB of RAM/swap for rakudo (though I think those failures manifest differently). We already have pre-built Ubuntu packages. You could just use them: https://github.com/nxadm/rakudo-pkg/releases
16:43 yoleaux Zoffix: I'll pass your message to jonathon.
16:44 mahafyi hello. I am trying to get the Pelr6 advent Day 15 – A Simple Web Spider With Promises to run. It failed initially till i changed urls_seen to url_seen at line 35. but whenever i run it with a domain, the results are blank.
16:45 Zoffix mahafyi: what's your perl6 version?   perl6 -v
16:45 mahafyi 2017.10
16:46 mahafyi Zoffix : 2017.10
16:47 Zoffix mahafyi: try sticking   CATCH { default { .say } }  at the top of sub crawl()
16:48 Zoffix actually, nm, that won't show anything new
16:50 natrys joined #perl6
16:51 mahafyi right, it outputs just parenthesis - ()
16:51 Zoffix Ah, I see the bug
16:54 Zoffix mahafyi: this appears to do stuff: https://temp.perl6.party/crawl.txt
16:54 mahafyi and when it does run, how does one see / track / monitor the concurrency - will it show up as a separate pid
16:54 setty1 joined #perl6
16:54 Zoffix mahafyi: you can remove `dd` lines to toss debug prints. The bug was `my $href =  $anchor.Str;` needs to be `my $href =  $anchor.attribs<href>;`
16:56 Zoffix mahafyi: no, it's threads, not separate processes. You can set RAKUDO_SCHEDULER_DEBUG=1 env var to get info on what the scheduler is doing
16:56 wamba joined #perl6
16:56 Zoffix There's also RAKUDO_SCHEDULER_DEBUG_STATUS=1 that's really spammy
16:57 raschipi joined #perl6
16:59 lizmat Altreus: are you talking about Set or SetHash: aka immutable or a mutable Set ?
16:59 mahafyi Zoffix : thank you
16:59 lizmat if immutable, then we only need to do checks at initialization time, which would be much simpler
17:01 cdg joined #perl6
17:01 AlexDaniel joined #perl6
17:03 cdg_ joined #perl6
17:04 Zoffix left #perl6
17:05 cdg joined #perl6
17:05 domidumont joined #perl6
17:06 raschipi Today's advent post is full of mistakes, which is very unfurtunate. An other one I found: MAIN executes last in a program, yet the post says it executes first.
17:06 lizmat raschipi: you mean MAIN executes after having executed the mainline ?
17:09 raschipi m: say "aaa"; sub MAIN {say "bbb";}
17:09 camelia rakudo-moar 1fb518956: OUTPUT: «aaa␤bbb␤»
17:09 raschipi Well, not last, but after running mainline of the program, correct.
17:10 raschipi m: sub MAIN {say "bbb";} say "aaa";
17:10 camelia rakudo-moar 1fb518956: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Strange text after block (missing semicolon or comma?)␤at <tmp>:1␤------> 3sub MAIN {say "bbb";}7⏏5 say "aaa";␤    expecting any of:␤        infix␤        infix stopper␤        stateme…»
17:10 raschipi m: sub MAIN {say "bbb";}; say "aaa";
17:10 camelia rakudo-moar 1fb518956: OUTPUT: «aaa␤bbb␤»
17:12 khw joined #perl6
17:16 Cabanossi joined #perl6
17:16 mahafyi Zoffix : out of curiosity, how come your nick does not show in the users list in this channel, but yet you are here?
17:17 raschipi He has a brigge that sends any messages with his nick to him as a github message.
17:22 mahafyi oh ok
17:26 mahafyi This crawler / spider seems to be a good place to practice for me; it doesn't really do what i expected. It stops after some initial hrefs, and it doesn't follow links in pages linked to. I think it will be good to see how to do that and to print it neatly as a tree and also a csv file.
17:26 mahafyi I used view-source:http://dohistory.org/on_your_own/links.html , just a site from a random google search)
17:31 raschipi m: put "a",any(<b c d>)
17:31 camelia rakudo-moar 1fb518956: OUTPUT: «ab␤ac␤ad␤»
17:31 philomath_ joined #perl6
17:32 raschipi m: print "a",any(<b c d>)
17:32 camelia rakudo-moar 1fb518956: OUTPUT: «abacad»
17:40 mahafyi module deredere did not install. (failed Gumbo dependency installation). I ran it with --force-test , per the output I saw. Now it won't run the examples (https://github.com/Altai-man/deredere)error shown is - Cannot locate native library 'libgumbo.so.1': libgumbo.so.1: cannot open shared object file:
17:43 raschipi mahafyi: Do you have libgumbo installed?
17:43 mahafyi probably not :) i will check
17:44 mahafyi ok no error now
17:46 Cabanossi joined #perl6
18:18 mahafyi i guess i am stuck at ($node.Str ~~ /src\=\"(.+?)\"/)[0].Str;  i can scrape img tag as per example, https://github.com/Altai-man/deredere/blob/master/examples/scrape-images.p6 . If i try to change to tag to <a> then The file-with-output is not 0 byte file, but its full of blank lines.
18:19 mahafyi i get a Use of Nil in string context error for every link in the target URL page
18:20 mahafyi I guess i have to go back to the docs and books and understand the basics again.
18:27 mahafyi so, once thats sorted and i learn how to look for links with <a> href, then does 'concurrency' mean that as a URL link is encountered, there is a separate thread created that will repeat the parsing of links for each such link?
18:29 raschipi By default it will launch up to 16 threads at a time, I think, and go through the qeue reusing worker threads untill all of them are done.
18:30 mahafyi oh i see.
18:31 mson joined #perl6
18:31 mahafyi i often see the words parallelism and concurrency used with respect to perl6. are they the same things? or different concepts?
18:31 raschipi After 'wait'ing the threads, you can check weather the promises were 'kept' or 'broken' to know how it went.
18:32 raschipi They're different but very close concepts
18:32 mahafyi i see, so the results of each promise 'kept' will be the list of URLs in that particular thread? correct? and here we can write the data scraped in a tree structure, like a YAML file for instance?
18:34 mahafyi i will work on it and see how it goes.
18:34 raschipi Parallelism is when two or more threads are running at the same time.  Concurrency is when two threads are making progress at the same time. If you have just one core you'll have concurrency but no parallelism, because concurrency includes time-multiplexing threads as well as running them at the same time (parralellism).
18:36 mahafyi wow, i actually think i may understand that
18:38 raschipi Parallelism is a subset of concurrency. Even with multiple cores you can have concurrency without parallelism if threads syncrhonize their work and just one runs at a time with the others waiting on a lock.
18:39 geospeck joined #perl6
18:41 mahafyi luckily i took a deep dive into just that with my first program, (second actually, after hello-world.pl), zoffix wrote out the whole script for me too. so i got what that means. i was trying to open a file to run a react block, when another program was trying to write to that file.
18:42 mahafyi but really i feel it is the density of the operators and pretty much everything else that makes it hard to be useful programmer in any way, its just not yet inernalized and available like a mental reflex, i have to go back and pore over the whole book again and again.
18:42 Ulti defo no regrets leaving it until the evening before to finish my advent post.... :Z
18:44 raschipi mahafyi: Just like learning any new language or a new domain of math.
18:44 raschipi Soon enough you'll be fluent, just keep at it.
18:45 mahafyi raschipi : thanks, i will.
18:49 raschipi There was one time a presenter at a Perl conference asked the audience to raise their hands if they were able to remember how all Perl5 operators worked or if they needed to look the docs for them to remember and not a single one raised their hand, including TimToady.
18:56 mahafyi oh ok. I still have a first go at a100-doors rosetta problem left hanging. I write and write and then look at the answer which is a couple of lines. I realized the algorithm comes from a mathematical understanding of the solution. But i tried to modify it in some way and i realize i have not understood operators at all. but i think this web data scraping is a good place to continue for me.
18:58 raschipi If you don't get it from the docs, just ask.
18:58 mahafyi i will, ty!
18:59 ryn1x joined #perl6
18:59 mahafyi i saw that, you said it earlier and based on the m: examples, i understood what you said.
18:59 mahafyi oops, wrong post.
19:04 mahafyi how can one type a Unicode like U+03c6 to print Greek small phi, from a US english keyboad?
19:07 geekosaur https://docs.perl6.org/language/unicode_entry
19:09 mahafyi geekosaur : perfect thanks
19:09 geekosaur plus various tools you can scrounge that aren't in there, like I use WinCompose in my win10 vm and it'd be <altgr> * p h i in my setup (this kbd doesn't have their default compose key)
19:19 AlexDaniel geekosaur: looks like you're the right person to document it https://github.com/perl6/doc/issues/1531
19:19 AlexDaniel :)
19:21 geekosaur only to the extent that maybe I'm the only one here with any clue about it. I only stumbled over the greek keybindings by accident a couple days ago
19:23 geekosaur ...and being amused that they bound a table-flip to the konami sequence
19:32 yqt joined #perl6
19:34 cdg joined #perl6
19:39 rindolf joined #perl6
19:48 mahafyi in https://github.com/Altai-man/deredere/blob/master/examples/scrape-images.p6  at line 8: $node.Str ~~ /src\=\"(.+?)\"/)[0].Str , the right hand side is a regex beginning with 'src=' and thereafter i am not able to comprehend what it means. I know what it does, is give the actual value of the img path. I would like to change this to get the whole string "the actual url only" when i change...
19:48 mahafyi ...the tag from img to a, but avoid the
19:50 mahafyi is it the .Str atthe end of the line that returns the path-to-image >
19:52 geekosaur that question seems to be missing a few words. and possibly some context
19:53 mahafyi let me put it clearly in a pastebin
20:07 perlpilot The .Str at the end is so you get a string instead of a Match obj.
20:09 mahafyi how can i save the output i see in console to a file , i tried 'perl6 scrape.p6 > myoutput.txt , but the file is blank.
20:09 moritz then scrape.p6 didn't produce any output
20:10 mahafyi but i see error on the console, i am having trouble copying it to paste in the pastebin.
20:10 perlpilot mahafyi: redirect stderr then?
20:11 moritz you can slo do  perl6 scrape.p6 |& tee myoutput.txt
20:12 moritz that way both stdout and stderr land in the file, *and* you can see what's going on
20:12 perlpilot moritz++ an excellent idea
20:12 moritz |& requires bash 4.0+, but that should be pretty ubiqutious by now
20:13 raschipi tee also isn't installed by default on most distros, package moreutils in Debian, for example
20:13 moritz raschipi: it isn't?
20:13 perlpilot weird
20:14 perlpilot tee (like vi) has been on every unix system I've *ever* used.
20:14 perlpilot It was even on the embedded QNX
20:14 moritz maybe not in a minimal thing (like for a docker base image), but on standard desktop/server systems, it should be there
20:15 geospeck joined #perl6
20:15 moritz on minimal systems, not even "less" is installed. Hard to work with "more" :-)
20:15 mahafyi moritz : there is a difference in output on console when i usee the tee, and when i simply run perl6 scrape.p6
20:15 raschipi Oh yes, my bad, tee is in the base intall
20:15 raschipi I'm thinking of sponge
20:27 mahafyi http://paste.debian.net/1000914
20:27 mahafyi https://github.com/Altai-man/deredere/blob/master/examples/scrape-images.p6
20:28 DrForr V<> is in the Documentation synopsis, but not the online pod docs - which one wins?
20:28 raschipi Is it in roast?
20:29 DrForr Yes, that's where I found it. I'll add it, I just need to figure out how it should be rendered and what it's for.
20:30 signal joined #perl6
20:30 DrForr Not sure if it's in the synopsis text, I'll have a look.
20:30 signal left #perl6
20:30 geospeck joined #perl6
20:30 geospeck joined #perl6
20:31 DrForr 'verbatim' is a good mnemonic for that.
20:32 raschipi If it's in roast you can even add it to the docs. If it's in the docs but not implemented in rakudo it's usual to write a note saying it's not implemented in rakudo yet.
20:34 DrForr It's in roast.
20:34 DrForr I've got other things to add as well to the test suite...
20:37 DrForr Actually it might be a bug.
20:38 DrForr I would think there would be an associated Pod::FormattingCode.new(:type('V')) ith it, but there isn't anything.
20:41 DrForr V<C<boo> B<bar> asd> get translated into a Pod::Block::Para, not Pod::Block::Para.new(:contents([Pod::FomattingCode.new(:type('V'),:contents(["C<foo> B<bar> asd"]))).
20:44 El_Che Wow
20:44 El_Che Java Generics Flashback
20:46 mspo ++
20:48 timotimo El_Che: how come the memories haven't been erased?
20:48 El_Che timotimo: I don't run
20:48 timotimo maybe it's time to start with that
20:48 DrForr Neuralyzer failure.
20:49 timotimo .o( always, i want to be with you, and make believe with you, and live in harmony, harmony, oh love! )
20:49 * El_Che wonders if it's time to tell timotimo that Java Generics are erased ar runtime. But he suspects timotimo knows.
20:57 committable6 joined #perl6
20:58 releasable6 joined #perl6
20:58 nativecallable6 joined #perl6
20:58 squashable6 joined #perl6
20:58 bloatable6 joined #perl6
20:58 greppable6 joined #perl6
20:58 evalable6 joined #perl6
20:58 quotable6 joined #perl6
20:58 unicodable6 joined #perl6
20:58 bisectable6 joined #perl6
20:58 benchable6 joined #perl6
20:58 reportable6 joined #perl6
20:58 coverable6 joined #perl6
20:58 statisfiable6 joined #perl6
20:58 dogbert17 joined #perl6
21:10 mahafyi error:1417110A:SSL routines:tls_process_server_hello:wrong ssl version
21:10 mahafyi For Internal Error'server returned no data': Internal Error: 'server returned no data'
21:10 mahafyi MoarVM panic: Trying to unwind over wrong handler
21:11 mahafyi now i see in console the URLS with an OK, but there is no scraoed-data file, the script erros out as above
21:14 mahafyi whoa , and the html files are saved in the directory
21:17 TEttinger joined #perl6
21:17 mahafyi thanks all, i will work on it
21:25 Celelibi joined #perl6
21:31 Cabanossi joined #perl6
21:32 Kyo91_ joined #perl6
21:43 Ulti would anyone like to proof read tomorrows advent?
21:44 |oLa| joined #perl6
21:45 DrForr Sure, I've got access to the WP instance.
22:10 perlpilot Ulti: just looked it over.  I think I saw some areas that needed commas, but that's about it.   Also, I'd say in the last paragraph "But now its time for me to get on with some *Perl 6* code in 2018!"   :-)
22:11 perlpilot Ulti: oh, and there are some code gists that don't show up ... are you gonna put them inline manually?
22:11 Kyo91 joined #perl6
22:13 DrForr I'm afraid I flooded him with corrections :)
22:13 perlpilot DrForr: good, I just kind of read it relatively fast.  :)
22:14 perlpilot Ulti++ (for the advent post)
22:14 Ulti erk Ill check the gists not showing up :Z
22:15 Ulti or did you look at the edit view?
22:15 Kyo91 joined #perl6
22:15 Ulti they only show up when rendered fully
22:15 Ulti perlpilot: good catch on the Perl 6 code in 2018 :P changed
22:16 perlpilot ah, yeah I did just look at the edit view.  They show up well in the preview
22:16 a3f_ joined #perl6
22:16 Ulti ok Im hitting schedule this has been enough work already and I want a Friday out with my friends >:P
22:17 Ulti thanks a lot for your proof reading DrForr, I should have come to you for my thesis :D
22:17 Ulti whats your normal page rate? :P
22:17 Kyo91 joined #perl6
22:18 DrForr Hee. I normally try to stay away from personal style...
22:18 Ulti yeah I need to use PERF instead of performance to excite all the devops people on HN
22:19 DrForr Wasn't aware that was a thing.
22:19 Ulti but hey good news, I left off my recent numbers on I/O which have dropped I think recently
22:19 Ulti DrForr: not really a thing but its the internet we need to be /edgy/
22:20 * Ulti wanders off to the pub and hopes he doesnt get a load of scary people emailing him like last time
22:21 DrForr I keep getting recruiters haranguing me about devops positions, I'd better remember that for the next interview.
22:21 DrForr Good luck with that.
22:22 Ulti yeah talk about how many dockers you have in your clouds and that you "refresh" the servers serverlessly
22:22 Ulti maybe get IOPS in there somewhere somehow
22:24 moritz don't forget to mention kubernetes and service meshs!
22:24 Ulti no then they might hire you
22:26 ggoebel joined #perl6
22:27 agwind joined #perl6
22:28 Kyo91 joined #perl6
22:30 Kyo91 joined #perl6
22:31 ZzZombo joined #perl6
22:33 Herby_ \o
22:34 Altreus How can I construct a class name as a string and then construct an object of that class?
22:34 moritz m: my $name = 'Any'; say ::($name).new
22:34 camelia rakudo-moar 370073fcd: OUTPUT: «Any.new␤»
22:34 Altreus tak!
22:35 El_Che Boom-boom-at-runtime
22:35 Altreus I have a lot to learn :o
22:36 Altreus yeah well it was boom at runtime in perl5 too
22:36 Altreus But it's way easier than repeating myself a million times just to shortcut something
22:37 Altreus oh actually I might have designed this requirement out
22:38 El_Che Altreus: https://i.redd.it/qzoxajoc73201.png
22:39 Altreus +1
23:01 Cabanossi joined #perl6
23:05 brrt joined #perl6
23:07 synopsebot joined #perl6
23:07 Geth joined #perl6
23:10 Geth joined #perl6
23:13 Geth joined #perl6
23:15 MasterDuke joined #perl6
23:21 pilne joined #perl6
23:43 wamba joined #perl6
23:46 Cabanossi joined #perl6
23:50 cdg joined #perl6
23:50 comborico1611 joined #perl6
23:56 TeamBlast joined #perl6

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

Perl 6 | Reference Documentation | Rakudo