»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
Geth doc: 0++ created pull request #1714:
Fix )> typo
00:30
lookatme o/ 00:34
lookatme Is there something about non-block IO of Perl6 ? 00:59
raschipi_ non-blocking as in asynchronous or non-block as in charachter output? 01:01
non-buffered, I mean
lookatme non-blocking in asynchronous 01:05
geekosaur I think perl 6 prefers you use Promises instead of direct non-blocking I/O 01:08
the moar layer *does* use non-blocking I/O
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
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
Fix )> typo
synopsebot Link: doc.perl6.org/language/regexes
doc: 40a2a53783 | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6
Merge pull request #1714 from 0/typo-fix

Fix )> typo
geekosaur os x certainly does 01:13
windows has some asynch I/O which can be used to implement it iirrc
raschipi_ I said mainstream, not niche Operating systems. 01:16
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:18
lookatme I think windows support non-blocking IO 01:20
raschipi_ windows is a niche operating system, used only on desktops. 01:21
TEttinger lol
lookatme :) so, what is mainstream OS
raschipi_ Linux
TEttinger asking the expert eh?
comborico1611 lookatme, you are in Vietnam, right? 01:22
lookatme :( in china
Linux is not popular than Windows 01:23
teatime well technically
TEttinger the only place linux is more popular than windows is for servers, which is, you guessed it, a niche
teatime how many android handsets are there?
TEttinger android I guess is linux-derived, or at least unix-derived 01:24
raschipi_ "servers", i.e. all IT.
TEttinger ...
teatime TEttinger: os x is unix-derived. android runs the linux kernel.
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)
raschipi_ I'm just kidding, of course. 01:25
teatime lol guys, we're not really doing this. don't take it too seriously.
raschipi_ Yet Linux install base is indeed much bigger than the other two.
TEttinger the only mainstream OS is plan 9
teatime microsoft is making apps for linux now.
lookatme comborico1611, I am in china :)
TEttinger teatime: and they're a major contributor to the linux kernel 01:26
Morfent freebsd is great and eventually i will radicalize someone
TEttinger largest organization on github too I think
teatime eh? 01:27
TEttinger yeah, it's weird
raschipi_ Most people learning to program shouldn't concern themselves with desktops, the programming market is much bigger outside of it.
teatime major contributor? didn't know that. but tons of companies are.
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.
Otherwise they just contribute code for making Linux work well in Azure. 01:29
Morfent microsoft really must've liked cowsay 01:30
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
And that runs on Linux, be it transactions or high-performance.
TEttinger ah, here's the MS on Github thing github.com/blog/2425-release-radar...ember-2017 01:37
(at the bottom) 01:38
comborico1611 lookatme, sorry for the delay. I got caught-up in YouTube subscription 01:45
Chinese food is the best in the world 01:46
lookatme Haha 01:50
comborico1611 Right?
lookatme yeah, almost :) 01:51
comborico1611 What's before it then? 01:52
lookatme I didn't get it 01:57
comborico1611 What is a better food than Chinese? 02:00
lookatme Maybe the food you love but have no chance taste :) 02:01
comborico1611 This is possible. But I'm speaking of the food we have tasted. 02:03
What is your age? 02:04
lookatme China also has something you certainly didn't like, such as DouZhi(a drink of BeiJing) 02:05
I am 27th old 02:06
comborico1611 Is it alcoholic?
I'm 31.
You were born 1990. 02:07
Or 89?
lookatme No, not china spirit
yeah, 90
en.wikipedia.org/wiki/Douzhi 02:08
The wiki
It's looks like a milk :)
comborico1611 By-products are often not good. But not always. Molasses is a by-product of refined sugar. 02:10
Molasses is nutrient-rich.
27 years old. Time goes by fast quickly doesn't it?
lookatme Yeah
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
Nevertheless, time has gone by quickly for me as well here in America.
My wife was born in 1990. 02:12
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.
lookatme ok 02:14
night
comborico1611 Goodnight!
Morfent how do you get the elements of a pointer to an array returned from a native call? 03:25
i've tried pointer arithmetic but my tests keep failing
ohh you're supposed to give nativecast the pointer object, not Pointer.Int 03:30
...wait 03:34
lookatme Morfent, yeah, nativecast will help you 07:52
piojo m: my Hash[Int] %nested-types; %nested-types.WHAT.say; 08:57
camelia (Hash[Hash)
piojo that's not valid, right? 08:58
moritz it loks weird 09:01
like, trunctaed
m: my Int %h; say %h.^name
camelia Hash[Int]
lookatme I have a question about supply 09:06
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)␤»
AlexDaniel bisect: old2017.05 my Hash[Int] %nested-types; %nested-types.WHAT.say;
bisectable6 AlexDaniel, On both starting points (old=2015.12 new=3405001) the exit code is 1 and the output is identical as well
AlexDaniel, Output on both points: «04===SORRY!04=== Error while compiling /tmp/ZxCgYdslMv␤Malformed postfix call␤at /tmp/ZxCgYdslMv:1␤------> 03old2017.08⏏0405 my Hash[Int] %nested-types; %nested-t␤»
lookatme pastebin.com/T5HwANUD
AlexDaniel bisect: old=2017.05 my Hash[Int] %nested-types; %nested-types.WHAT.say;
bisectable6 AlexDaniel, Bisecting by output (old=2017.05 new=3405001) because on both starting points the exit code is 0
AlexDaniel, bisect log: gist.github.com/36e14d1291814ad80f...fdfaf96343
AlexDaniel, (2017-05-31) github.com/rakudo/rakudo/commit/1e...658d744786
AlexDaniel c: 1ed284e295^,1ed284e295 my Hash[Int] %nested-types; %nested-types.WHAT.say;
committable6 AlexDaniel, ¦1ed284e295^: «(Hash[Hash[Int]])␤» ¦1ed284e: «(Hash[Hash)␤»
lookatme eval:pastebin.com/T5HwANUD
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.
lookatme eval: pastebin.com/T5HwANUD
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.
lookatme eval: pastebin.com/raw/T5HwANUD
evalable6 lookatme, Successfully fetched the code from the provided URL.
(exit code 2) Usage:
/tmp/L2uKRhd1qA <file>
lookatme that need a command line argument :( 09:08
AlexDaniel piojo: will you submit a bug report?
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: www.dabeaz.com/coroutines/Coroutines.pdf
piojo m: my Hash[Array] %nested-types; %nested-types.WHAT.say; 09:10
camelia (Hash[Hash)
piojo oh, so the length was just a coincidence
AlexDaniel piojo: well, the commit says “Assuming we will never get something more complicated than foo[bar]”, so it's pretty broken I think :)
lookatme It has a Pipeline Example in page 22, I want write it in Perl6 09:11
piojo AlexDaniel: that's funny
scimon lookatme: looking :) 09:15
piojo AlexDaniel: thanks, reported as #132585 09:19
abraxxa I wonder if the statement 'the ability to write optimized Logstash plugins in any JVM language' in the last section of 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:23
scimon lookatme : On you return take a look at docs.perl6.org/type/IO::Handle#(An...hod_Supply and docs.perl6.org/type/Supply#method_grep 09:25
AlexDaniel piojo: just curious, why use RT when you can use github? 09:28
piojo AlexDaniel: I never realized rakudo had multiple bug trackers. :) 09:32
is github more convenient for developers?
AlexDaniel piojo: maybe a little bit 09:33
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. gist.github.com/Whateverable/da231...724ed2e123 09:34
piojo AlexDaniel: I once worked on another e-mail API for bug submission, so maybe I'm romantic. 09:40
not coincidentally, it was also written in perl.
AlexDaniel piojo: heh, well feel free to use any bug tracker. We are letting the best one survive :) 09:41
piojo AlexDaniel: Now that I see github only has 60 open bugs, I'm sorely tempted to use that instead of rakudobug. 09:42
tyil the latest advent post has a line stating `$ perl6 web-spider.p6 [–domain=xxx.org]`, shouldn't that be two dashes (`--domain`)? 09:44
piojo oh my, that should be example.com 09:45
at least it's not hyperlinked!
lizmat will fix 09:51
.u – 09:53
yoleaux U+2013 EN DASH [Pd] (–)
lizmat .u - 09:54
yoleaux U+002D HYPHEN-MINUS [Pd] (-)
lizmat I guess wordpress is changing the -- to – :-( 09:55
too bad you can't use – as a replacement for -- in CLI :-(
DrForr Well, the the em-dash would be ---foo :) 09:56
*then
lizmat fixed it by using &#45;&#45; :-( 09:59
lizmat too bad about the p5isms in the code 09:59
and the unnecessary use of .kv
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
AlexDaniel pmurias: I thought that the biggest advantage was that it works… 10:23
:) 10:24
at least, that's the reason why I opened it
pmurias AlexDaniel: doesn't RT work too? (as obnoxious as it may be) 10:26
AlexDaniel pmurias: yes, for some people. See this as an example: irclog.perlgeek.de/perl6-dev/2017-...i_15336853 10:27
pmurias: the latest issue was that wander++ was trying to participate in the squashathon but RT only showed his comments a few days later
and it's unclear if all of their comments reached the tracker in the end 10:28
basically, it is only reliable if you do everything through the bitcard account
the problem with the bitcard stuff is that a huge % of users end up with a broken account 10:29
and this is *still* not fixed, as far as I know
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:30
(if it's unclear, I'm referring to issues submitted through perlbug-admin) 10:31
AlexDaniel Oh yeah, by the way 10:33
if anybody reading this has this problem with their RT account: imgur.com/a/n93Dn 10:34
then you should mail the address on the bottom of the page, describing the problem
and a few days (if not weeks) later they'll fix your account
after that you should not experience any RT issues.
Oh, also, if anybody is wondering how to submit a bug report through RT when you have an account, you can do it here: rt.perl.org/m/ 10:36
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:51
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 False
lacking 2
araraloren o| 10:55
mscha Very annoying: my code with gather/take is about a THOUSAND times slower than old-fashioned linear code. www.reddit.com/r/adventofcode/comm...s/dra8ez6/ 11:02
mscha In the meantime, all Python solvers use generators without such issues. 😢 11:03
lizmat mscha: why the "lazy" ? is that needed ? 11:04
mscha lizmat: not sure, I just add it “just in case”.
lizmat so how's the timing without it ?
AlexDaniel mscha: what arguments should I use to test it?
Morfent how does the eager gather for match up 11:05
mscha AlexDaniel: for instance a file with two numbers in it: 65 8921
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
mscha AlexDaniel: pastebin.com/e7vbi7u4 11:11
araraloren scimon, I am not asking how to do it, and IO::Handle::Supply only support emit chunk :)
BTW, I am that lookatme 11:12
lizmat mscha: could you try without the lazy and binding the generators to the arrays ?
scimon Got that.
Just thought they might be helpful. 11:13
araraloren scimon, anyway thanks
araraloren Actually I write that code with gather/take too, but not working 11:14
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:15
AlexDaniel mscha: what about using * instead of × 11:16
mscha AlexDaniel: 10s. So 3 times as fast. Still by far not fast enough... 11:17
AlexDaniel mscha: by the way, you can probably write something like ($init, {($_ * $times) % $modulo} … *) 11:19
AlexDaniel that's not really faster, but just as an idea 11:19
araraloren I heard gather/take is implement by exception 11:20
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:21
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
(you could think of gather/take as a call/cc if you're feeling schemey) 11:24
araraloren oh, is it slower than coroutines ?
AlexDaniel mscha: that's still unfortunate :( 11:28
lizmat gist.github.com/lizmat/d8da65dfea8...6e61656a25 # mscha: my approach so far 11:31
mscha lizmat: that is nice & fast indeed, thanks! 11:35
lizmat hmmm... it appears we don't have a int int candidate for +& because of RT #128655 11:36
synopsebot RT#128655 [open]: rt.perl.org/Ticket/Display.html?id=128655 [OPTIMIZER] Mixup in candidates through optimizer 11:37
mscha "+& 65535" is still (slightly) faster than "% 65536". 11:38
Morfent man i really need to learn lldm 12:27
pmurias what's lldm? 12:32
geekosaur: in what sense do control exception skip much of the exception machinery? 12:33
Morfent it's a c debugger
pmurias geekosaur: to be fair they can be optimized out sometimes 12:34
Morfent: you mean lldb?
Morfent lol yeah
my bad 12:35
there are a couple bugs that show up in moar that i wanna try to fix 12:36
on my os i mean
Geth doc: 1abc77a105 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/pod.pod6
update pod info for current capability

remove “key => ...” formats which are not yet implemented
13:38
synopsebot Link: doc.perl6.org/language/pod
doc: 3d044a93ed | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/pod.pod6
use preferred English form of number in text
13:40
doc: 61673d496c | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/pod.pod6
close parenthetical expression
13:42
Zoffix Reminder: release is in 2 days and we still have 3 release blockers, if anyone can figure out how to fix them: github.com/rakudo/rakudo/issues?q=...2%9A%A0%22 14:45
bdmatatu Is there a clever way of running something every time except the first time through a loop? (like the opposite of 'once'?) 14:48
moritz m: for <a b c d> { say "foo" if ++$; .say } 14:49
camelia foo
a
foo
b
foo
c
foo
d
moritz m: for <a b c d> { say "foo" if $++; .say }
camelia a
foo
b
foo
c
foo
d
moritz bdmatatu: ^^ 14:50
bdmatatu thank you!
lizmat m: for <a b c d>.tail(*-1) { say "foo"; .say } 14:58
camelia foo
b
foo
c
foo
d
lizmat ah, something
ok, scratch that then :-) 14:59
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
Log for anyone interested: launchpadlibrarian.net/349345231/b...ING.txt.gz
Altreus which doc should I read to learn what the zef equivalent of a cpanfile is? 15:11
or does cpanfile also work :P
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:16
I'm shocked by how I've heard it was said 80% of websites were php. 15:17
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.
Herby_ o/ 15:25
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
I'm not sure what to search for
DrForr m: my Set $x where * ~~ Int; 15:54
camelia ( no output )
DrForr Not sure if that'd work but it compiles :)
timotimo that won't do it i don't think 15:55
that would just match the set itself against Int
mienaikage Tried throwing a couple of ideas at the wall but I just get "Set cannot be parameterized" 16:15
mienaikage The best idea I have is `my %set is Set = Array[Int](^10)` 16:28
AlexDaniel` :3 16:33
Altreus mienaikage: wat :D
timotimo m: my $p = Promise.new; $p.then(-> $it { say $it }); $.keep(1)
camelia 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>
AlexDaniel` sees some messages directly from matrix
timotimo m: my $p = Promise.new; $p.then(-> $it { say $it }); $p.keep(1)
camelia ( no output )
timotimo i ... don't understand? 16:34
Altreus I mean if Set cannot be parameterised then is there an equivalent that can?
timotimo well, hashes can 16:34
Altreus I guess an array can too
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)?
greppable6 timotimo, gist.github.com/fa9ef6dc027d7692ea...b8cfc59db2
Altreus the former
It's not necessary - I'm just exploring the language
an array would suffice really
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
m: my %h{Int}; %h{42e0}++
camelia Type check failed in binding to parameter 'key'; expected Int but got Num (42e0)
in block <unit> at <tmp> line 1
Zoffix m: my %h{Int}; %h{42}++; say %h
camelia {42 => 1}
timotimo oh, the thens get scheduled on the scheduler
Zoffix m: subset Meows of SetHash where .keys.all ~~ Int; my Meows $x = SetHash.new(1, 42e0)
camelia Type check failed in assignment to $x; expected Meows but got SetHash (SetHash.new(42e0,1))
in block <unit> at <tmp> line 1
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 ( no output )
mienaikage m: my Bool %h{Int}; %h{42}++; say %h
camelia {42 => True}
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:38
Altreus I just wanted a thing to tell zef to read so I can install deps easily :) 16:39
I'll look it up when i've understood this Set stuff
I think maybe I don't want a Set because then I have to make types so I can use === properly
or rather, so Set can use === properly 16:40
can I do...
m: my @ar{Int}; @ar[0] = 1; @ar[1] = 1.1;
camelia 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
Altreus no
unless the {} is because it was a hash 16:41
Zoffix m: my Int @ar; @ar[0] = 1; @ar[1] = 1.1;
camelia Type check failed in assignment to @ar; expected Int but got Rat (1.1)
in block <unit> at <tmp> line 1
Altreus oh well
I guess I went around the houses to find that out :) 16:42
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
(amusingly `my @ar[Rat]` compiles too; though doesn't do anything)
.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: github.com/nxadm/rakudo-pkg/releases 16:44
yoleaux Zoffix: I'll pass your message to jonathon.
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:46
mahafyi 2017.10
mahafyi Zoffix : 2017.10 16:47
Zoffix mahafyi: try sticking CATCH { default { .say } } at the top of sub crawl() 16:48
actually, nm, that won't show anything new 16:49
mahafyi right, it outputs just parenthesis - () 16:52
Zoffix Ah, I see the bug
Zoffix mahafyi: this appears to do stuff: temp.perl6.party/crawl.txt 16:55
mahafyi and when it does run, how does one see / track / monitor the concurrency - will it show up as a separate pid
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:55
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:57
Zoffix There's also RAKUDO_SCHEDULER_DEBUG_STATUS=1 that's really spammy 16:57
lizmat Altreus: are you talking about Set or SetHash: aka immutable or a mutable Set ? 16:59
mahafyi Zoffix : thank you
lizmat if immutable, then we only need to do checks at initialization time, which would be much simpler
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 ?
raschipi m: say "aaa"; sub MAIN {say "bbb";} 17:09
camelia aaa
bbb
raschipi Well, not last, but after running mainline of the program, correct.
m: sub MAIN {say "bbb";} say "aaa"; 17:10
camelia 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…
raschipi m: sub MAIN {say "bbb";}; say "aaa";
camelia aaa
bbb
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:16
raschipi He has a brigge that sends any messages with his nick to him as a github message. 17:17
mahafyi oh ok 17:22
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
I used view-source:dohistory.org/on_your_own/links.html , just a site from a random google search)
raschipi m: put "a",any(<b c d>) 17:31
camelia ab
ac
ad
raschipi m: print "a",any(<b c d>) 17:32
camelia abacad
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 (github.com/Altai-man/deredere)error shown is - Cannot locate native library 'libgumbo.so.1': libgumbo.so.1: cannot open shared object file: 17:40
raschipi mahafyi: Do you have libgumbo installed? 17:43
mahafyi probably not :) i will check 17:43
ok no error now 17:44
mahafyi i guess i am stuck at ($node.Str ~~ /src\=\"(.+?)\"/)[0].Str; i can scrape img tag as per example, github.com/Altai-man/deredere/blob...-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:18
i get a Use of Nil in string context error for every link in the target URL page 18:19
I guess i have to go back to the docs and books and understand the basics again. 18:20
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:27
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:29
mahafyi oh i see. 18:30
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.
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?
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).
mahafyi wow, i actually think i may understand that 18:36
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:38
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:41
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
raschipi mahafyi: Just like learning any new language or a new domain of math. 18:44
Soon enough you'll be fluent, just keep at it.
mahafyi raschipi : thanks, i will.
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:49
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:56
raschipi If you don't get it from the docs, just ask. 18:58
mahafyi i will, ty!
mahafyi i saw that, you said it earlier and based on the m: examples, i understood what you said. 18:59
oops, wrong post.
mahafyi how can one type a Unicode like U+03c6 to print Greek small phi, from a US english keyboad? 19:04
geekosaur docs.perl6.org/language/unicode_entry 19:07
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)
AlexDaniel geekosaur: looks like you're the right person to document it github.com/perl6/doc/issues/1531 19:19
:)
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:21
...and being amused that they bound a table-flip to the konami sequence 19:23
mahafyi in github.com/Altai-man/deredere/blob...-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
...the tag from img to a, but avoid the
is it the .Str atthe end of the line that returns the path-to-image > 19:50
geekosaur that question seems to be missing a few words. and possibly some context 19:52
mahafyi let me put it clearly in a pastebin 19:53
perlpilot The .Str at the end is so you get a string instead of a Match obj. 20:07
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
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?
moritz you can slo do perl6 scrape.p6 |& tee myoutput.txt 20:11
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
moritz |& requires bash 4.0+, but that should be pretty ubiqutious by now
raschipi tee also isn't installed by default on most distros, package moreutils in Debian, for example 20:13
moritz raschipi: it isn't?
perlpilot weird
tee (like vi) has been on every unix system I've *ever* used. 20:14
It was even on the embedded QNX
moritz maybe not in a minimal thing (like for a docker base image), but on standard desktop/server systems, it should be there
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
raschipi Oh yes, my bad, tee is in the base intall 20:15
I'm thinking of sponge
mahafyi paste.debian.net/1000914 20:27
github.com/Altai-man/deredere/blob...-images.p6
DrForr V<> is in the Documentation synopsis, but not the online pod docs - which one wins? 20:28
raschipi Is it in roast?
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:29
DrForr Not sure if it's in the synopsis text, I'll have a look. 20:30
DrForr 'verbatim' is a good mnemonic for that. 20:31
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:32
DrForr It's in roast. 20:34
I've got other things to add as well to the test suite...
Actually it might be a bug. 20:37
I would think there would be an associated Pod::FormattingCode.new(:type('V')) ith it, but there isn't anything. 20:38
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:41
El_Che Wow 20:44
Java Generics Flashback
mspo ++ 20:46
timotimo El_Che: how come the memories haven't been erased? 20:48
El_Che timotimo: I don't run
timotimo maybe it's time to start with that
DrForr Neuralyzer failure.
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.
mahafyi error:1417110A:SSL routines:tls_process_server_hello:wrong ssl version 21:10
For Internal Error'server returned no data': Internal Error: 'server returned no data'
MoarVM panic: Trying to unwind over wrong handler
now i see in console the URLS with an OK, but there is no scraoed-data file, the script erros out as above 21:11
whoa , and the html files are saved in the directory 21:14
mahafyi thanks all, i will work on it 21:17
Ulti would anyone like to proof read tomorrows advent? 21:43
DrForr Sure, I've got access to the WP instance. 21:45
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:10
Ulti: oh, and there are some code gists that don't show up ... are you gonna put them inline manually? 22:11
DrForr I'm afraid I flooded him with corrections :) 22:13
perlpilot DrForr: good, I just kind of read it relatively fast. :)
Ulti++ (for the advent post) 22:14
Ulti erk Ill check the gists not showing up :Z
or did you look at the edit view? 22:15
Ulti they only show up when rendered fully 22:15
perlpilot: good catch on the Perl 6 code in 2018 :P changed
perlpilot ah, yeah I did just look at the edit view. They show up well in the preview 22:16
Ulti ok Im hitting schedule this has been enough work already and I want a Friday out with my friends >:P 22:16
thanks a lot for your proof reading DrForr, I should have come to you for my thesis :D 22:17
whats your normal page rate? :P
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
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
DrForr: not really a thing but its the internet we need to be /edgy/
Ulti wanders off to the pub and hopes he doesnt get a load of scary people emailing him like last time 22:20
DrForr I keep getting recruiters haranguing me about devops positions, I'd better remember that for the next interview. 22:21
Good luck with that.
Ulti yeah talk about how many dockers you have in your clouds and that you "refresh" the servers serverlessly 22:22
maybe get IOPS in there somewhere somehow
moritz don't forget to mention kubernetes and service meshs! 22:24
Ulti no then they might hire you
Herby_ \o 22:33
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
camelia Any.new
Altreus tak!
El_Che Boom-boom-at-runtime 22:35
Altreus I have a lot to learn :o
yeah well it was boom at runtime in perl5 too 22:36
But it's way easier than repeating myself a million times just to shortcut something
oh actually I might have designed this requirement out 22:37
El_Che Altreus: i.redd.it/qzoxajoc73201.png 22:38
Altreus +1 22:39