»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:04 Juerd left 00:12 rindolf left 00:17 khw joined
Geth doc: 0++ created pull request #1714:
Fix )> typo
00:30
00:34 lookatme joined
lookatme o/ 00:34
00:37 cpage_ left 00:39 TimToady left 00:40 TimToady joined, markong left 00:41 ZzZombo left, ZzZombo joined 00:42 cdg left 00:43 aborazmeh joined, aborazmeh left, aborazmeh joined
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
01:01 cpage_ joined 01:02 telex left 01:03 telex joined
lookatme non-blocking in asynchronous 01:05
01:05 leah2 left 01:07 leah2 joined
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
01:15 MasterDuke joined
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
01:40 aborazmeh left
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
01:49 Actualeyes left
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!
02:14 comborico1611 left 02:16 MasterDuke left 02:17 itaipu left 02:46 ilbot3 left 03:00 cdg joined 03:01 ilbot3 joined, ChanServ sets mode: +v ilbot3 03:06 pilne joined 03:09 Juerd joined 03:21 perlpilot left 03:22 perlpilot joined, tokik left
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
03:52 astronavt joined 03:58 piojo1 joined 04:01 piojo left 04:05 bart___ joined 04:08 piojo joined 04:09 bart___ is now known as brrt 04:11 piojo1 left 04:13 cdg left 04:25 raschipi_ left 04:39 astronavt left 04:49 bwisti joined 04:56 Cabanoss- joined 04:59 Cabanossi left, Cabanoss- is now known as Cabanossi 05:01 pilne left 05:11 imcsk8 left, imcsk8 joined 05:24 wamba joined 05:28 brrt left 05:53 khw left 05:54 ZzZombo left 05:58 ZzZombo joined 06:54 domidumont joined 06:56 Actualeyes joined 07:00 domidumont left 07:01 domidumont joined 07:09 wamba left 07:21 darutoko joined 07:28 sena_kun joined 07:52 lowbro joined, lowbro left, lowbro joined
lookatme Morfent, yeah, nativecast will help you 07:52
07:58 pmurias joined, pmurias left 08:05 sena_kun left 08:15 wamba joined 08:27 ryn1x left 08:29 abraxxa joined 08:32 ryn1x joined 08:35 pmurias joined 08:50 cdg joined 08:54 cdg left 08:56 scimon joined
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
09:15 lookatme left
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
09:28 zakharyas joined
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
09:43 simonm joined, simonm left 09:44 eliasr joined, Ven` joined
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!
09:46 imcsk8_ joined 09:50 imcsk8 left
lizmat will fix 09:51
.u – 09:53
yoleaux U+2013 EN DASH [Pd] (–)
09:54 llfourn left
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 :-(
09:56 wamba left
DrForr Well, the the em-dash would be ---foo :) 09:56
*then
lizmat fixed it by using &#45;&#45; :-( 09:59
09:59 rindolf joined
lizmat too bad about the p5isms in the code 09:59
and the unnecessary use of .kv
10:02 jeromelanteri left
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
10:32 ZzZombo left, ZzZombo joined 10:33 cdg joined
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
10:38 cdg left, cdg_ joined 10:40 cdg joined 10:43 cdg_ left 10:45 cdg left
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
10:52 araraloren joined
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
11:01 mscha joined
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
11:03 TEttinger left
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
11:13 pmurias left
araraloren Actually I write that code with gather/take too, but not working 11:14
11:15 Ven` left
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
11:19 pmurias joined
AlexDaniel that's not really faster, but just as an idea 11:19
11:19 itaipu joined
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 ?
11:27 Ven` joined
AlexDaniel mscha: that's still unfortunate :( 11:28
11:29 Ven` left
lizmat gist.github.com/lizmat/d8da65dfea8...6e61656a25 # mscha: my approach so far 11:31
11:33 sena_kun joined
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
11:45 notbenh left 11:47 notbenh joined 11:59 cpage_ left 12:13 Rawriful joined 12:22 zakharyas left 12:25 AlexDaniel left
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
12:40 markong joined 12:52 pdcawley joined 13:14 Ven` joined 13:22 roguelazer left 13:25 roguelazer joined 13:26 konsolebox left 13:30 jferrero left 13:31 konsolebox joined 13:34 AlexDaniel joined 13:35 natrys joined
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
13:51 jonathon joined, pdcawley left 13:58 cdg joined 13:59 cdg left, cdg joined 14:02 bdmatatu joined 14:07 cdg_ joined 14:10 cdg left 14:14 Ven` left, Cabanossi left 14:16 Cabanossi joined 14:20 Ven` joined 14:21 abraxxa left 14:22 piojo_ joined 14:31 comborico1611 joined 14:36 pdcawley joined 14:45 Zoffix joined, Cabanossi left
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
14:46 Cabanossi joined 14:47 Morfent left 14:48 Zoffix left
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!
14:51 pdcawley left 14:52 itaipu left 14:53 AlexDaniel left
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
15:00 Ven` left 15:05 zakharyas joined
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
15:09 geospeck joined
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.
15:21 pdcawley joined 15:25 Herby_ joined
Herby_ o/ 15:25
15:39 piojo_ left 15:40 piojo_ joined 15:41 jonathon left
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
15:51 piojo_ left
DrForr m: my Set $x where * ~~ Int; 15:54
camelia ( no output )
DrForr Not sure if that'd work but it compiles :)
15:55 geospeck left
timotimo that won't do it i don't think 15:55
that would just match the set itself against Int
15:56 cdg_ left, piojo_ joined 15:58 cdg joined 15:59 cdg left, cdg joined 16:04 pmurias left 16:05 mahafyi joined 16:12 troys joined 16:14 mscha left
mienaikage Tried throwing a couple of ideas at the wall but I just get "Set cannot be parameterized" 16:15
16:16 pmurias joined 16:25 natrys left
mienaikage The best idea I have is `my %set is Set = Array[Int](^10)` 16:28
16:31 lowbro left, st_elmo joined
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?
16:34 Zoffix joined
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
16:46 zakharyas left
Zoffix mahafyi: what's your perl6 version? perl6 -v 16:46
mahafyi 2017.10
16:46 domidumont left
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
16:51 natrys joined
mahafyi right, it outputs just parenthesis - () 16:52
Zoffix Ah, I see the bug
16:53 natrys left
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
16:55 setty1 joined
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
16:57 cdg left
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
16:57 wamba joined
Zoffix There's also RAKUDO_SCHEDULER_DEBUG_STATUS=1 that's really spammy 16:57
16:58 raschipi joined
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
17:01 cdg joined, AlexDaniel joined 17:03 ChoHag left, cdg left, cdg_ joined 17:04 Zoffix left, cdg joined 17:05 domidumont joined
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:08 cdg_ left
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
17:12 khw joined 17:14 piojo_ left, Cabanossi left 17:16 dogbert17 left, Cabanossi joined
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)
17:30 scimon left
raschipi m: put "a",any(<b c d>) 17:31
camelia ab
ac
ad
17:31 philomath_ joined
raschipi m: print "a",any(<b c d>) 17:32
camelia abacad
17:34 troys is now known as troys_ 17:39 ggoebel left
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
17:43 Cabanossi left
mahafyi probably not :) i will check 17:43
ok no error now 17:44
17:46 Cabanossi joined 17:54 troys_ is now known as troys 17:59 araraloren left
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
18:31 mson joined
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).
18:35 darutoko left, gregf_ left
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
18:38 ryn1x left 18:39 geospeck joined
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
18:50 wamba left 18:53 cdg left
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!
18:59 ryn1x joined
mahafyi i saw that, you said it earlier and based on the m: examples, i understood what you said. 18:59
oops, wrong post.
19:02 Actualeyes left
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
19:32 yqt joined, rindolf left 19:34 cdg joined 19:39 rindolf joined, cdg left
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
19:51 philomath_ left
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
20:14 domidumont left, geospeck left 20:15 geospeck joined
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 geospeck left
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
20:30 signal joined
DrForr Not sure if it's in the synopsis text, I'll have a look. 20:30
20:30 signal left, geospeck joined, geospeck left, geospeck joined
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.
20:50 st_elmo left 20:52 cpage left 20:56 committable6 left 20:57 committable6 joined, ChanServ sets mode: +v committable6 20:58 nativecallable6 left, benchable6 left, squashable6 left, bisectable6 left, reportable6 left, statisfiable6 left, releasable6 left, coverable6 left, greppable6 left, evalable6 left, quotable6 left, bloatable6 left, unicodable6 left, releasable6 joined, ChanServ sets mode: +v releasable6, nativecallable6 joined, squashable6 joined, bloatable6 joined, ChanServ sets mode: +v squashable6, ChanServ sets mode: +v bloatable6, greppable6 joined, evalable6 joined, quotable6 joined, unicodable6 joined, ChanServ sets mode: +v unicodable6, bisectable6 joined, benchable6 joined, ChanServ sets mode: +v bisectable6, ChanServ sets mode: +v benchable6, reportable6 joined, coverable6 joined, statisfiable6 joined, ChanServ sets mode: +v statisfiable6, dogbert17 joined
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
21:17 TEttinger joined
mahafyi thanks all, i will work on it 21:17
21:17 mahafyi left, troys is now known as troys_ 21:24 Celelibi left 21:25 Celelibi joined 21:30 eliasr left, Cabanossi left 21:31 Cabanossi joined 21:32 Kyo91_ joined, Kyo91_ left
Ulti would anyone like to proof read tomorrows advent? 21:43
21:44 |oLa| joined
DrForr Sure, I've got access to the WP instance. 21:45
22:00 bdmatatu left, mson left
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
22:11 Kyo91 joined 22:12 rindolf left 22:13 Kyo91 left
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
22:15 Kyo91 joined
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
22:16 a3f_ joined
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
22:17 Kyo91 left, Kyo91 joined
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/
22:20 a3f left, a3f_ is now known as a3f
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
22:26 ggoebel joined 22:27 agwind joined, Kyo91 left 22:28 Kyo91 joined, geospeck left 22:29 TimToady left, Kyo91 left 22:30 Kyo91 joined 22:31 ZzZombo left, ZzZombo joined
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
22:42 Kyo91 left, setty1 left 22:44 pmurias left 22:54 yqt left 22:59 Cabanossi left 23:01 Cabanossi joined 23:05 brrt joined 23:07 synopsebot left, synopsebot joined, ChanServ sets mode: +v synopsebot, Geth left, Geth joined, ChanServ sets mode: +v Geth, brrt left 23:09 Geth left 23:10 Geth joined, ChanServ sets mode: +v Geth 23:13 Geth left, Geth joined, ChanServ sets mode: +v Geth 23:15 MasterDuke joined 23:21 pilne joined 23:22 troys_ is now known as troys 23:26 sena_kun left 23:43 wamba joined 23:45 Cabanossi left 23:46 Cabanossi joined 23:49 comborico1611 left 23:50 cdg joined, comborico1611 joined 23:54 TeamBlast left, cdg left, troys is now known as troys_ 23:55 afresh1 left, MasterDuke left 23:56 TeamBlast joined