»ö« 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:01 comborico1611 left, mcmillhj left 00:02 dct left
Zoffix yeah, reproed the problem.. 00:04
00:08 w_richard_w joined
Zoffix golfs it a little 00:09
00:10 Luna521 left
Zoffix huh 00:15
oh
00:18 w_richard_w left 00:20 w_richard_w joined 00:21 rindolf left
Zoffix kt_: I golfed it down and filed a bug report R#1775 00:22
synopsebot R#1775 [open]: github.com/rakudo/rakudo/issues/1775 [ASYNC] Crash in .Supply.tap + .print on an IO::Socket::Async
Zoffix Don't know much about it, but looks like it's a problem in rakudo. A race conditon somewhere or something.
00:28 vcv_ left 00:39 AlexDaniel left 00:49 Actualeyes left 00:52 PufferBot joined, PufferBot left 01:03 mcmillhj joined 01:10 MasterDuke left 01:12 MasterDuke joined 01:19 aborazmeh joined, aborazmeh left, aborazmeh joined
kt_ Zoffix: thanks! 01:19
01:45 ilbot3 left 01:46 FROGGS_ joined 01:50 FROGGS left 01:56 ilbot3 joined, ChanServ sets mode: +v ilbot3 02:06 Actualeyes joined 02:07 cpage_ joined 02:09 skids left 02:11 joy__ joined, [Coke]_ joined, gfldex_ joined 02:12 perlbot_ joined, raydiak_ joined, _notbenh joined, speedChicken_ joined, samebchase1 joined, joy_ left, cpage left 02:13 aeruder_ left, notbenh left, albongo left, speedChicken left, raydiak left, unclechu left, gfldex left, alpha6 left, Voldenet left, cgfbee left, cpage_ is now known as cpage, _notbenh is now known as notbenh, joy__ is now known as joy_, perlbot_ is now known as perlbot, alpha6 joined, albongooo___ joined, hobbs joined, hobbs left, hobbs joined, aeruder joined 02:14 cgfbee joined, simcop2387 joined, Voldenet joined, Voldenet left, Voldenet joined 02:15 yoleaux left 02:16 tadzik left, Garland_g[m] left, wictory[m] left, mienaikage left, CIAvash[m] left, ilmari[m] left, mack[m] left, mirlur[m] left 02:17 elcaro[m] left, AlexDaniel` left, Matthew[m] left 02:18 benchable6 left, releasable6 left, evalable6 left 02:19 benchable6 joined, squashable6 left, coverable6 left 02:23 aborazmeh left 02:41 mcmillhj left, ufobat___ joined 02:45 ufobat_ left 03:05 Actualeyes left 03:09 mcmillhj joined 03:17 coverable6 joined, evalable6 joined, releasable6 joined, statisfiable6 joined 03:27 eliasr left 03:45 mcmillhj left 03:46 xinming_ left 03:48 xinming joined 04:00 jcallen_ is now known as jcallen 04:14 yoleaux joined, ChanServ sets mode: +v yoleaux 04:22 abraxxa left 04:44 khw left 04:52 khw joined 04:53 aindilis left 05:01 khw left 05:05 jmerelo joined 05:10 sauvin joined
jmerelo Hi y'all 05:45
The perl6 tag in StackOverflow just reached 400 followers. stackoverflow.com/questions/tagged/perl6 05:47
moritz \o/ 05:48
05:53 domidumont joined
jmerelo Also, 5 questions in the last 24 hours. That's a record as far as I remember. 05:55
05:59 domidumont left 06:00 domidumont joined
Geth ¦ doc: JJ self-assigned Specify what we mean by private attributes github.com/perl6/doc/issues/1965 06:02
perl6-pod-to-bigpage: 2bd4a5705e | (JJ Merelo)++ | 2 files
Adds configuration for anchors in headers

And inserts only if configured that way. Also tests it.
06:09
perl6-pod-to-bigpage: 2fa627ddf0 | (JJ Merelo)++ | 2 files
Eliminates anchors for X closes #21
perl6-pod-to-bigpage: 2a65374a53 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | 2 files
Merge pull request #22 from JJ/master

Eliminates anchors for indexed terms
06:12 sena_kun joined 06:36 FROGGS_ left 06:38 robertle joined 06:50 abraxxa joined 06:53 w_richard_w left 06:54 kurahaupo_ joined 06:57 kurahaupo left
Geth perl6-pod-to-bigpage: da467b8c63 | (JJ Merelo)++ | 2 files
Bumps up version
07:00
07:05 abraxxa left
Geth doc: cf3bc07124 | (JJ Merelo)++ | 2 files
Updating Pod::To::OneBigPage version and triggering rebuild
07:05
07:09 darutoko joined, andrzejku joined 07:13 andrzejku_ joined 07:16 andrzejku left 07:20 abraxxa joined 07:25 rindolf joined
Geth doc: 09a29f9d99 | (JJ Merelo)++ | util/trigger-rebuild.txt
Trying to trigger rebuild again
07:25
El_Che trigger^1 07:27
trigger^2
jmerelo El_Che: yep, it's not working...
Or maybe it took too long docs.perl6.org/build-log/build-201...+00:00.log 07:28
Anyway, I don't see it updating the modules... 07:29
El_Che jmerelo: i will probably move a repo to de perl6 org. Do you have any idea if/how travis and dockerhub automation work? is that part still linked to your account on those services or it uses a perl6 org account?
07:31 parv joined
jmerelo It's linked to any account with write privileges in the repo, I think. 07:31
07:32 sena_kun left
jmerelo You will notified of errors occurring with your pushes, you'll still see all repos in which you have write premission. I see all perl6/ repos in Travis. 07:32
El_Che true
travis is straightfw 07:33
d
but dockerhub does not had a direct link for automated builds
07:33 dakkar joined
jmerelo You can just say which repo you will use, right? 07:37
El_Che yes, but it will create an img on your personal repo 07:40
that's a fairly ok scenario. I wonder what happens when you need encryption keys, even encrypted 07:41
travis encrypt them for you personal username
07:41 scimon joined
El_Che will those secret be decryptable? Can those be echoes (the probably are)? 07:42
jmerelo El_Che: it does not work with PRs, and probably not with other usernames.
El_Che: no, it does not echo by default encrypted variables and no variable can be used in PRs. They've got that pretty much covered. 07:43
El_Che the canary repo I am working on does need travis and dockerhub integration (it's linked to my username), but no extra keys needed
that would be different if you need to upload stuff to bintray
jmerelo: are you sure? your app need the unencrypted value 07:44
write the value to a file, put it in the package and you have the secret
(it's a shared repo, after all)
jmerelo El_Che: no problem if you're doing it yourself. yes problem in PRs or if someone else does it. 07:45
El_Che yes, that's the issue
jmerelo El_Che: then you're probably better off keeping it in your own private repo. It can still be used from perl6 repos, I guess. 07:46
07:47 zakharyas joined
El_Che yes, only real lost is that nog everyone can rerun the build in travis 07:50
07:50 andrzejku joined
El_Che I'll look into it 07:51
07:53 andrzejku_ left 08:13 zakharyas left 08:15 zakharyas joined 08:25 natrys joined 08:46 tadzik joined 08:48 darutoko left 08:52 ilmari[m] joined, Matthew[m] joined, unclechu joined, AlexDaniel` joined, elcaro[m] joined, CIAvash[m] joined, wictory[m] joined, Garland_g[m] joined, mack[m] joined, mirlur[m] joined, mienaikage joined
donpdonp ive got a Supplier that is creating Socket::Async. after a while of creating these, it throws "Unhandled exception in code scheduled on thread 14" 08:55
except im not sure how to get any extra info, like a stack trace 08:56
08:56 kurahaupo_ left 08:59 abraxxa left 09:00 TEttinger left
lookatme try handle it in CATCH block ? 09:01
09:02 abraxxa joined
donpdonp yes except im not sure where its happening 09:02
and i figured the default exception handler would show a stacktrace? 09:03
example: Unhandled exception in code scheduled on thread 46 09:04
Too few positionals passed; expected 6 arguments but got 2
that err is a clue but i cannot find a 6 param function anywhere and i figure the stack trace has to be available somewhere 09:05
09:07 eliasr joined
donpdonp ive tried adding extra CATCH {default} blocks. ive tried removing all CATCH blocks hoping the default handler would be informative. the error msg remains the same :O 09:09
09:13 imcsk8 left, imcsk8 joined 09:33 imcsk8_ joined 09:34 markong joined 09:38 unclechu left, mack[m] left 09:39 imcsk8 left, hobbs left, hobbs joined, hobbs left, hobbs joined, Matthew[m] left, elcaro[m] left, mirlur[m] left, wictory[m] left, Garland_g[m] left, mienaikage left, CIAvash[m] left, ilmari[m] left, tadzik left, AlexDaniel` left 09:41 statisfiable6 left, releasable6 left, releasable6 joined, statisfiable6 joined 09:42 evalable6 left 09:55 darutoko joined 10:14 domidumont left 10:16 Matthew[m] joined 10:22 araraloren joined 10:24 AlexDaniel joined 10:28 roguelazer left
scimon This sounds like a great case for putting a Stackoverflow question with some example code together :) 10:31
Geth doc: fluca1978 self-assigned Specify what we mean by private attributes github.com/perl6/doc/issues/1965
b98605938c | (Zoffix Znet)++ (committed using GitHub Web editor) | util/trigger-rebuild.txt
10:35
10:36 roguelazer joined, FROGGS joined 10:40 markong left 10:41 BPC joined, BPC left 10:42 araraloren_ joined 10:44 parv left 10:47 araraloren left 10:49 Tison joined
Zoffix .tell jjmerelo "<jmerelo> │ Anyway, I don't see it updating the modules..." Recall I said 3 days ago ( irclog.perlgeek.de/perl6/2018-04-23#i_16081026 ) there's auto-module update system in place as it's using system-wide install of perl6. You need to ping one of the admins github.com/perl6/infrastructure-do...nistration to log in and update the needed 10:54
yoleaux Zoffix: I'll pass your message to jjmerelo.
Zoffix module: github.com/perl6/infrastructure-do...rakudobrew
.tell jjmerelo module: github.com/perl6/infrastructure-do...rakudobrew
yoleaux Zoffix: I'll pass your message to jjmerelo.
jmerelo Zoffix: I'm right here... So please reload the modules all over again. 10:55
Zoffix jmerelo: done
Oh, I had two "j" when tab compl;eteing
jmerelo: well, by done I meant Pod to big page is now at <0.3.1>. Does any other module need updating 10:58
10:58 Zoffix is now known as jjmerelo, jjmerelo is now known as Zoffix
jmerelo Zoffix: Thanks. 10:58
Zoffix jmerelo: FYI: "yoleaux │ 20 Apr 2018 19:02Z <timotimo> jjmerelo: punt is a legit verb btw"
jmerelo Zoffix: I know. I changed that back in the SO question. 10:59
timotimo i wonder how zoffix got reminded of this
Zoffix ./msg yoleaux .ping 11:00
jmerelo El_Che: which, BTW, still has no answer.. stackoverflow.com/questions/499430...n-matching
11:00 markong joined
lizmat I think that's more of a TimToady question :-) 11:00
Zoffix timotimo: and in case you have server messages disabled: "Zoffix │ Oh, I had two "j" when tab compl;eteing" "You are now known as jjmerelo" "You are now known as Zoffix"
timotimo he already saw that, though? 11:02
like, we discussed it at length
Zoffix I guess he saw it by reading chatlogs. You sent it to the wrong nick. 11:09
timotimo i know, i told him about that 11:10
11:11 zakharyas left
Zoffix Then I guess mystery solved? :) 11:12
11:12 tadzik joined 11:13 AlexDaniel` joined, wictory[m] joined, mack[m] joined, CIAvash[m] joined, ilmari[m] joined, mirlur[m] joined, unclechu joined, Garland_g[m] joined, mienaikage joined, elcaro[m] joined
timotimo i suppose so 11:14
buggable New CPAN upload: P5built-ins-0.0.9.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.9.tar.gz 11:16
lizmat
.oO( one should also update dependencies :-( )
Tison m: say " " if False; 11:28
camelia ( no output )
Tison m: say "matched" if 42 ~~ /"{everything}"/; # OUTPUT: «matched␤» 11:29
camelia Resource temporarily unavailable
AlexDaniel m: say "matched" if 42 ~~ /"{everything}"/; # OUTPUT: «matched␤»
camelia MoarVM panic: Could not spawn thread: errorcode -11
AlexDaniel m: say "matched" if 42 ~~ /"{everything}"/; # OUTPUT: «matched␤»
camelia MoarVM panic: Could not spawn thread: errorcode -11
AlexDaniel e: say "matched" if 42 ~~ /"{everything}"/; # OUTPUT: «matched␤»
11:31 evalable6 joined
AlexDaniel e: say "matched" if 42 ~~ /"{everything}"/; # OUTPUT: «matched␤» 11:31
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/h2czzrLLSL
Bogus statement
at /tmp/h2czzrLLSL:2
------> 03<BOL>08⏏04»
expecting any of:
prefix
term
AlexDaniel e: say "matched" if 42 ~~ /"{everything}"/;
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/NkWz4ufvSo
Undeclared routine:
everything used at line 1
AlexDaniel I'm not sure what's going on with camelia 11:32
lizmat m: say "matched" if 42 ~~ /"{everything}"/
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
everything used at line 1
AlexDaniel m: say "matched" if 42 ~~ /"{everything}"/; # OUTPUT: «matched␤»
camelia 5===SORRY!5=== Error while compiling <tmp>
Bogus statement
at <tmp>:2
------> 3<BOL>7⏏5»
expecting any of:
prefix
term
lizmat that's what I get
AlexDaniel oh okay
lizmat m: say "matched" if 42 ~~ /"{everything}"/
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
everything used at line 1
lizmat m: say "matched" if 42 ~~ /"{everything}"/; 11:33
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
everything used at line 1
lizmat m: say "matched" if 42 ~~ /"{everything}"/; # OUTPUT: «matched␤»
camelia 5===SORRY!5=== Error while compiling <tmp>
Bogus statement
at <tmp>:2
------> 3<BOL>7⏏5»
expecting any of:
prefix
term
lizmat whee
Zoffix weird
lizmat something gets parsed after the # ?
Zoffix Oh, "matched" was a comment :)
I thought it was printed
lizmat nope
Zoffix lizmat: there's "n\l" char that camelia translates 11:34
so the » is on a new line by itself
lizmat m: say "matched" if 42 ~~ /"{everything}"/; # OUTPUT: «matched
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
everything used at line 1
lizmat yup
Zoffix++
Zoffix Check out this magic trick!
m: say 2e-324 < 5e-324
camelia True
Zoffix ^_^
(not a bug :P)
oh wait
lizmat that's sound pretty ordinary :-) 11:35
Geth doc: eeef11cce3 | 陈梓立++ | doc/Language/regexes.pod6
Improve section Literals of Regex
synopsebot Link: doc.perl6.org/language/regexes
Zoffix m: say 6e-324 == 5e-324
camelia True
Zoffix m: say 5e-324 11:36
camelia 5e-324
buggable New CPAN upload: P5chdir-0.0.2.tar.gz by ELIZABETH modules.perl6.org/dist/P5chdir:cpan:ELIZABETH
Zoffix This is actually where we do better than Perl 5 now :) It prints 4.94065645841247e-324 :)
lizmat :-) 11:37
Zoffix++ # caring for the little ones :-)
11:37 mscha joined
Zoffix lol 11:37
timotimo can they fix that, though? or would that cause trouble for existing user code?
AlexDaniel similar ecosystem fallout as we had I'd expect? 11:38
Zoffix There is a ticket and last I saw they were discussing how Ruby et al manage to do it. 11:41
And how I found out about Dragon4 algo and how I then found Grisu3 11:43
(and I commented our commits fixing this stuff on that ticket, so presumably Perl 5 will eventually print 5e-324 there too)
Zoffix &
11:43 Zoffix left 11:47 domidumont joined, joy_ left 11:50 joy_ joined
Geth doc: fb373d734a | (JJ Merelo)++ | doc/Type/IO.pod6
Add default values for shells

Taken from @timo's response. Closes #1974.
11:50
synopsebot Link: doc.perl6.org/type/IO
Geth doc: 591a589dac | (JJ Merelo)++ | doc/Type/Proc.pod6
Adds link to other definition. Ref #1964
synopsebot Link: doc.perl6.org/type/Proc
11:51 domidumont1 joined 11:52 meme joined, meme left
Geth doc: f1730a9788 | (JJ Merelo)++ | doc/Type/IO.pod6
Rephrasing sentence on shells. Closes #1964
11:53
11:55 domidumont left
Geth doc: 622a0aa415 | (Elizabeth Mattijsen)++ | doc/Language/5to6-perlfunc.pod6
Some more precise feedback on P5 -> P6 for functions

  - mention in some cases that the argumentless version is not supported
  - mention in some cases that there is a module in the ecosystem
  - got to eof()
11:59
synopsebot Link: doc.perl6.org/language/5to6-perlfunc
lizmat afk again& 12:00
12:04 domidumont joined 12:07 domidumont1 left
jkramer lizmat: Who are ports like P5chdir aimed for, when P6 has chdir builtin already? Are there people who'd actually rather use a module like that than changing their code to use IO.chdir? 12:23
BTW I went through the top dependencies list from yesterday and a huge lot of the most-used modules are kinda obselete in P6 anyway, since they're builtin/available in the standard library - which is pretty awesome for P6 I think :) 12:25
I think I might try to implement Term::ReadKey in P6 since its there seems to be demand for it and playing with term controls might be interesting as it probably requires native stuff 12:28
That or Archive::Tar
12:29 kurahaupo joined
Herby_ o/ 12:30
timotimo the idea is that users can just continue with their p5 knowledge, and move over p5 code with as little hassle as possible 12:31
El_Che what is the stance of small applications in the ecosystem? In Go there are zillions of lib in github that are a go get away. Do we want growth through quantity of a more select approach? 12:33
I asked becasue I wrote a small app yesterday that looks for newer version of software and nudge (by email, rest of whatever) the user 12:34
should that kind of stuff live in github or be part of the ecosystem (it's a generic Module + cmd line app that uses it) 12:35
AlexDaniel buggable: eco App 12:37
buggable AlexDaniel, Found 68 results: Bailador, Bailador, App::Mi6, Web, Electron. See modules.perl6.org/s/App
AlexDaniel buggable: eco App::
buggable AlexDaniel, Found 35 results: App::Mi6, App::GPTrixie, Web::App::MVC, App::InstallerMaker::WiX, App::Pray. See modules.perl6.org/s/App%3A%3A
AlexDaniel El_Che: ↑
El_Che: so yes, preferably in the ecosystem. This way it'll also be tested when we run toaster 12:38
El_Che AlexDaniel: I tend to write apps where the core functionality is in a Module that be reused and a cmd line app that handles cli and config
ok, I'll clean it up and upload it 12:39
araraloren_ :) I have some app in the ecosystem
AlexDaniel El_Che: right hmm… Does it mean that it has to be two modules? I actually don't know
araraloren_ grep: FindSource
greppable6 araraloren_, 5 lines, 3 modules: gist.github.com/569e2eb02e6e363264...9f1dd25e2b
El_Che I have an evil plan to write more perl6 stuff for smallish things at $work so I can ask for a license for Coma :)
AlexDaniel: I think it should be a module that delivers a default app implementation 12:40
AlexDaniel El_Che: okay yea, that should work
El_Che AlexDaniel: this approach works well in go, like in github.com/nxadm/ldifdiff I have a cmd dir with the implementation
only the cmd versions in its dependencies, while the lib doesn't 12:41
12:42 kurahaupo left, kurahaupo joined
jmerelo El_Che: evil plans are the best 12:45
12:52 kurahaupo left, kurahaupo joined, athenot joined
Geth doc: c64c3a1bd2 | 陈梓立++ | doc/Language/regexes.pod6
Rearrange sections of Regex

Separate Wildcards and character classes into two section, also rearrange some subsection to improve readability.
Improve some examples and typesetting.
12:53
synopsebot Link: doc.perl6.org/language/regexes
12:56 mcmillhj joined 12:57 kt_ left 13:01 domidumont1 joined 13:02 domidumont left
Tison Regex document mixed use 'anchor' and 'assertion', are they really the same thing? 13:04
13:04 kurahaupo left
Tison docs.perl6.org/language/regexes#Anchors 13:04
13:04 kurahaupo joined, zakharyas joined
araraloren_ no 13:05
IMO :)
Geth doc: 8964acd63e | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/5to6-perlfunc.pod6
Mention &*chdir in p5-6 chdir docs
13:06
synopsebot Link: doc.perl6.org/language/5to6-perlfunc
Tison .ask moritz Regex document mixed use 'anchor' and 'assertion', are they really the same thing? 13:07
yoleaux Tison: I'll pass your message to moritz.
moritz Tison: good question
yoleaux 13:07Z <Tison> moritz: Regex document mixed use 'anchor' and 'assertion', are they really the same thing?
jmerelo timotimo: Most assertions are anchors. Some are not
moritz I *think* that ... what jmerelo said 13:08
jmerelo So probably they should go in different sections
jnthn Hm, I'd had it as anchors being things like $ and ^ and friends, while assertions are things using the <foo> syntax 13:09
jmerelo jnthn: right. And they are now in the same "Anchors" section, like Tison has noticed. 13:11
As you see above, there's been a recent rearrangement... 13:12
Tison ok..let me think of it..
Geth doc: dbd7cf231f | (JJ Merelo)++ | doc/Language/grammars.pod6
Puts token and rule back into the index

Closes #1967
Also refs #1912 because regex was repeated.
13:14
synopsebot Link: doc.perl6.org/language/grammars
13:14 jmerelo left, Zoffix joined
Zoffix jkramer: it's part of the The Butterfly Perl 5 Project: www.perl.com/article/an-open-lette...community/ makes porting Perl 5 modules easier, since you can just stick one of those modules and get Perl 5's behaviour for those routines. 13:15
lizmat actually CPAN Butterfly Plan, a precursor to the Butterfly Perl 5 Project 13:17
really afk& 13:18
13:18 kurahaupo left, scimon left 13:19 scimon joined 13:20 luffysenpai joined, comborico1611 joined
Zoffix Ah, right, CPAN Butterfly I meant 13:20
luffysenpai Here from the perl6 site, how do I get started? 13:22
13:22 kurahaupo joined
Zoffix luffysenpai: do you know any programming languages already? 13:22
luffysenpai Python, C, C++, Java
Zoffix luffysenpai: you could try LearnXinY site: learnxinyminutes.com/docs/perl6/ We also have a Python -> Perl 6 in a nutshell doc: docs.perl6.org/language/py-nutshell 13:23
luffysenpai Doing a graduate course in computer engineering, will this help? 13:24
Zoffix luffysenpai: there's also perl6intro.com/ books (some are free) perl6book.com/ and you can check the "For newcomers" section on perl6.org/resources/
No idea. Haven't done any computer engineering courses.
13:24 titsuki_ left
Zoffix It'd help in a sense that you learn another language. And Perl 6 is also multi-paradigm so you learn a bunch of... paradigms 13:25
Plus Perl 6 is a lexically mutable language, which is a really fancy thing as I understand it
13:26 [Coke]_ is now known as [Coke]
Zoffix m: { sub infix:<♥> { say $^a + $^b }; say 2 ♥ 42; #`(look! a ♥ operator here!) }; try 'say 2 ♥ 42'; say $!.^name; #`(but not here anymore) 13:27
camelia WARNINGS for <tmp>:
44
True
Any
Useless use of constant string "say 2 ♥ 42" in sink context (line 1)
Zoffix m: { sub infix:<♥> { say $^a + $^b }; say 2 ♥ 42; #`(look! a ♥ operator here!) }; try 'say 2 ♥ 42'.EVAL; say $!.^name; #`(but not here anymore)
camelia 44
True
X::Syntax::Confused
luffysenpai I'm supposed to be learning simple perl scripts to be implemented via cmd tomorrow in an exam, and thse links you've provided already help a bunch!
Juerd luffysenpai: Note that if it's homework, it might be about Perl 5 instead of Perl 6
Zoffix luffysenpai: uh.. are you sure the exam is about Perl 6 and not Perl (as in Perl 5)? They're different languages; like C vs C++ 13:28
luffysenpai I'm looking forward to learning, at what point doI begin to contribue though?
It's about perl 5 but I'm interested in perl 6, so this is extra-curricular for me
Zoffix luffysenpai: you can contribute right away. A lot of people start off with the docs, since as a newcomer it's a lot easier for you to see what needs to be improved. There's also a bunch of open Issues: github.com/perl6/doc/issues 13:29
luffysenpai I'm already making comparisons between 5 and 6
13:30 vike left 13:33 athenot_ joined 13:34 athenot left 13:35 vike joined
luffysenpai Thank you @Zoffix! 13:35
Zoffix Any time.
13:36 Tison left 13:37 vcv_ joined, kurahaupo left, kurahaupo joined 13:39 skids joined
kurahaupo Zoffix: did you intend « say say 2+42 » 13:39
Zoffix nay, just one say
araraloren_ m: { sub infix:<♥> { $^a + $^b }; say 2 ♥ 42 13:40
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3 sub infix:<♥> { $^a + $^b }; say 2 ♥ 427⏏5<EOL>
expecting any of:
postfix
statement end
statement modifier
araraloren_ m: sub infix:<♥> { $^a + $^b }; say 2 ♥ 42
camelia 44
Zoffix Also, that example is bogus, 'cause that sub won't be seen in the EVAL even if it were in scope.
kurahaupo Yay!
Zoffix huh.. wonder if it's a bug actually. 13:41
Ah no
m: sub say(|) { put "no say for you!" }; try q|say 2 ♥ 42|.EVAL; say $!.^name; 13:42
camelia no say for you!
Zoffix (got confused by this, but the "no say for you" is coming from the say that says the name)
oh and I wasn't meant to use ♥ in the eval /o\
m: sub put(|) { say "no say for you!" }; try q|put 42|.EVAL; say $!.^name; 13:43
camelia no say for you!
Any
Zoffix So EVAL does see lexical changes. But it doesn't see language mutations? I guess that's normal
13:44 Kaiepi left, Kaiepi joined 13:45 domidumont joined 13:47 Tison joined
AlexDaniel haha docs.perl6.org/language/5to6-perlfunc#chdir 13:48
13:48 kurahaupo left
tadzik : 13:48
:o
13:49 domidumont1 left, kurahaupo joined
Geth doc: 53e0604615 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/5to6-perlfunc.pod6
Fix pod error in chdir
13:49
synopsebot Link: doc.perl6.org/language/5to6-perlfunc
Zoffix .ask TimToady are language mutations supposed to propagate to EVAL (e.g. sub infix:<♥> { say $^a + $^b }; 'say 2 ♥ 42'.EVAL) ? I see &EVAL tries to find LANG, but dumping it even at begin time seems to always show Nil: github.com/rakudo/rakudo/blob/29b0...m6#L54-L66 13:50
yoleaux Zoffix: I'll pass your message to TimToady.
comborico1611 I'm trying to figure out what this simple example is doing: hastebin.com/bituxeyuza.pl 13:55
Zoffix comborico1611: it fails to compile because variable is not defined :P
comborico1611 Yeah, I don't think it is runable. But the author is trying to teach something from it, but I don't get it. 13:56
Zoffix comborico1611: but basically @array is a thing that holds a bunch of things and each of the things it holds is numbered (called an index) and you can store or retrieve those things by using @array[$index]. And for cases when you want to store/retrieve more than one thing at the same time, there's "array slice" syntax, where you give more than one index at the same time, e.g. @array[0, 2];. In that example, the 13:57
more than one index is stored in another array @keys. And then you assign more than one thing by doing @array[@keys] = @lettters; So the first item in @letters will go to index 0 and second item in @letters will go to index 2
m: my @keys = <0 2>; my @letters = 'a'…'z'; (my @array)[@keys] = @letters; dd @array 13:58
camelia Array @array = ["a", Any, "b"]
Zoffix m: my @keys = <0 2>; my @letters = 'a'…'z'; my @array = ^5; @a[@keys] = @letters; dd @array
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '@a' is not declared
at <tmp>:1
------> 3 my @letters = 'a'…'z'; my @array = ^5; 7⏏5@a[@keys] = @letters; dd @array
Zoffix m: my @keys = <0 2>; my @letters = 'a'…'z'; my @array = ^5; @array[@keys] = @letters; dd @array
camelia Array @array = ["a", 1, "b", 3, 4]
Zoffix m: my @keys = <0 2>; my @letters = 'a'…'z'; my @array = ^5; @array[@keys] = 'a'…'z'; dd @array 13:59
camelia Array @array = ["a", 1, "b", 3, 4]
Zoffix m: my @keys = <0 2>; my @letters = 'a'…'z'; my @array = ^5; @array[^10] = 'a'…'z'; dd @array
camelia Array @array = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]
13:59 kurahaupo left
Zoffix m: my @keys = <0 2>; (my @array)[$@keys] = 'a'…'z'; dd @array # a curveball :P 14:00
camelia Array @array = [Any, Any, ("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z").Seq]
14:00 kurahaupo joined
Zoffix Well, you should ignore the last one for now, comborico1611 :) 14:01
comborico1611 Zoffix: I see. Yes that is it. "slicing" Very good. thanks!
err "array slice syntax" 14:02
Zoffix "slicing" is also a decent term :)
Works with hashes too
comborico1611 Eh I like the formal one.
Zoffix m: my @keys = <foo bar ber>; (my %h){@keys} = ^10; dd %h 14:03
camelia Hash %h = {:bar(1), :ber(2), :foo(0)}
Zoffix m: (my %h)<foo bar ber> = ^10; dd %h
camelia Hash %h = {:bar(1), :ber(2), :foo(0)}
Zoffix m: my @keys = <foo bar ber>; (my %h is BagHash){@keys} = ^10; dd %h 14:05
camelia ("bar","ber"=>2).BagHash
14:05 Zoffix left 14:09 pilne left, kurahaupo left 14:10 kurahaupo joined 14:13 kurahaupo left, kurahaupo joined 14:14 wamba joined 14:15 ced_ joined 14:18 hythm joined 14:23 squashable6 joined
Geth doc: 58ff646a6a | 陈梓立++ | doc/Language/regexes.pod6
Rearrange sections of regex/anchors

Separate anchors into two sections, Anchors and Zero-Width Assertions. Since they are not quite the same concept.
Also do some improvements and introduce a summary table of anchors.
14:24
synopsebot Link: doc.perl6.org/language/regexes
14:28 athenot joined 14:32 mscha left, athenot_ left 14:34 hythm left
Geth doc: 8902a9ec3e | (Will "Coke" Coleda)++ | doc/Language/5to6-perlfunc.pod6
whitespace
14:35
doc: 0cf11f4872 | (Will "Coke" Coleda)++ | 2 files
learn new words
synopsebot Link: doc.perl6.org/language/5to6-perlfunc
jkramer gist.github.com/jkramer/c47495d8e3...525889d994 14:37
Any ideas about the $*IN.getc bit? I don't know what it does internally that would cause that 14:38
Ah it's probably about encoding. 14:40
Juerd juerd.nl/i/a99062b2aee0fd69baaf163255b3a730.png # one-time error. I have not been able to reproduce it at all. 14:41
jkramer Hmm but in binary mode .getc throws X::IO::BinaryMode :D 14:42
ascii encoding works.
14:43 ced_ left
mcmillhj Is there a better way to flatten multiple Range objects into a single list than: ('0' .. '9', 'a' .. 'z', 'A' .. 'Z').flatmap({ .flat }) or is this a generally accepted approach ? 14:44
araraloren_ m: say ('0' .. '9', 'a' .. 'z', 'A' .. 'Z') 14:45
camelia ("0".."9" "a".."z" "A".."Z")
araraloren_ m: .say for ('0' .. '9', 'a' .. 'z', 'A' .. 'Z')
camelia "0".."9"
"a".."z"
"A".."Z"
araraloren_ m: .say for ('0' ... '9', 'a' ... 'z', 'A' ... 'Z')
camelia 0
1
2
3
4
5
6
7
8
9
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
jnthn m: dd ('0' .. '9', 'a' .. 'z', 'A' .. 'Z').flat 14:46
camelia ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", …
mcmillhj jnthn: what does `dd` do ?
araraloren_ dump ?
jnthn Dump
To show the result 14:47
A single .flat seems to do what you want without the map, though.
mcmillhj oh ok, I didn't realize I could use .flat directly on the List of Ranges
Geth doc: 010f8eb9c8 | 陈梓立++ | doc/Language/regexes.pod6
Fix X<> tag for render
14:48
synopsebot Link: doc.perl6.org/language/regexes
mcmillhj jnthn: thanks 14:49
14:50 ChoHag joined 14:51 kt_ joined 14:55 Zoffix joined 14:56 troys joined
Zoffix jkramer: documentation often describes all such behaviours. See the documentation for getc routine, in particular the "Waiting for potential combiners" section: docs.perl6.org/routine/getc.html#(...utine_getc 14:56
14:58 ChoHag left
jkramer Zoffix: Yup, found it 14:59
It works if I set the encoding to ascii first
14:59 Tison left
Zoffix jkramer: I'd guess that cause a crash for any non-ascii chars 15:00
15:00 ChoHag joined
jkramer Zoffix: True 15:01
Zoffix m: '漢'.decode.encode: 'ascii'
camelia No such method 'decode' for invocant of type 'Str'. Did you mean 'encode'?
in block <unit> at <tmp> line 1
Zoffix m: '漢'.encode.decode: 'ascii'
camelia Can not decode a utf-8 buffer as if it were ascii
in block <unit> at <tmp> line 1
Zoffix m: Buf.new('漢'.encode).decode: 'ascii'
camelia Will not decode invalid ASCII (code point > 127 found)
in block <unit> at <tmp> line 1
jkramer I'm not too proficient with UTF-8 encoding, but shouldn't it .getc return instantly for characters like 'e' as they're not combiners? 15:02
Zoffix jkramer: a combiner may follow "e" to turn it into "é"
m: say "e" ~ "\x[308]"
camelia ë
Zoffix m: say ("e" ~ "\x[308]").chars
camelia 1
jkramer Ah
I assumed non-ascii chars in UTF-8 always have a leading special code, not an ascii character and a trailing modifier 15:03
15:03 dustinm` left
jkramer Hmm, now I don't know what to do. I tempted to use getchar() but then again users might expect it to work with multibyte/non-ascii characters 15:05
But then again it's read-key, not read-char :) 15:08
timotimo multibyte is also for things like arrow keys 15:11
chansen_ Zoffix: How do you instruct Rakudo that you want to distingue between a sequence of logical characters (grapheme clusters) and a sequence of code points?
Zoffix m: say ("e" ~ "\x[308]").codes 15:12
camelia 1
Zoffix no idea
Zoffix is a Unicode n00b
timotimo we don't yet have a "just decode this unicode" mode, we always do normalization at the moment
chansen_ That is a flaw in the design IMHO, there should be a distinction between a sequence of logical characters (grapheme clusters) and a sequence code points. 15:14
timotimo you can get at the code points easily
but they'll always have gone through normalization
but yeah, NYI, i'd also like us to have that feature
15:16 domidumont left
Zoffix m: [.codes, .chars].say with "\c[woman juggling: dark skin tone]" 15:16
camelia [5 1]
15:16 dustinm` joined 15:17 araraloren_ left 15:18 athenot left
Geth doc: 263299f667 | 陈梓立++ (committed using GitHub Web editor) | util/trigger-rebuild.txt
Update trigger-rebuild.txt
15:23
mcmillhj Is there a paste site for this channel? 15:25
Zoffix mcmillhj: most people just use gist.github.com/ 15:27
15:28 jmerelo joined
mcmillhj Zoffix: gotcha, I'll make a gist. I have a question about sharing type constraints 15:28
gist.github.com/mcmillhj/6447e9a05...db0f848dba
jkramer I found an awkward hack for returning ascii chars instantly but supporting multi-byte UTF-8 chars at the same time. :) gist.github.com/jkramer/c47495d8e3...525889d994
jmerelo mcmillhj: you can also try StackOverflow... 15:29
jkramer It basically reads the input as single bytes and appends them to a buffer. As soon as Buf.decode works without an exception, it returns that as result
mcmillhj jmerelo: I can post it there if you all want to have some sort of record of the question, I just couldn't see from the docs how to apply a signature to multiple parameters across several functions 15:30
jmerelo mcmillhj: yep, we would appreciate that. It's easier also for newcomers. 15:31
chansen_ jkramer: ouch, that's an ugly hack ;)
Zoffix m: subset LimitB of Int where Int 2 ≤ * ≤ 62; sub a(LimitB $x) { say "a $x" }; sub b(LimitB $y) { say "b $y" }; a 42; b 50;
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3subset LimitB of Int where Int7⏏5 2 ≤ * ≤ 62; sub a(LimitB $x) { say "a $
expecting any of:
infix
infix stopper
p…
Zoffix m: subset LimitB of Int where 2 ≤ * ≤ 62; sub a(LimitB $x) { say "a $x" }; sub b(LimitB $y) { say "b $y" }; a 42; b 50;
camelia a 42
b 50
jkramer chansen_: I know but it works surprisingly well :D
Zoffix mcmillhj: ^ you can define a subset. Also, as you can see, you can chain the comparators
jmerelo mcmillhj: and if there are doc problems or missing features present, please make a doc issue go with that :-) (Although if you mention it in StackOverflow, I usually do that myself)
Zoffix has no idea where they are documented... 15:32
mcmillhj oh interesting, so that is a new type instead of a signature applied to multiple parameters
it's possible I was thinking of the problem incorrectly and that is why it wasn't in the docs
Zoffix mcmillhj: pretty much
mcmillhj I was looking here: docs.perl6.org/type/Signature 15:33
Zoffix You can't instantiate it or anything, but you can typecheck against it
jmerelo mcmillhj: you can check out this article by Zoffix perl6advent.wordpress.com/2016/12/...6-subsets/ 15:34
Zoffix mcmillhj: found a bit of docs here: docs.perl6.org/language/typesystem#subset
jmerelo mcmillhj: but yep, that would be an excellent question for StackOverflow. 15:35
Zoffix gulps at that article
mcmillhj I'll ask it there as well so there is a record and include both answers
jmerelo Zoffix: subsets are not in the index, though...
Zoffix Maybe it's because of the indexing issue tho. or was that fixed/
mcmillhj I was specifically thinking about sharing this somehow: my $sig = :(Int $a where $a >= 2 && $a <= 62);
not sure if that is possible
jmerelo Zoffix: we haven't even figured it out.
chansen_ jkramer: Hopefully this will be rectified, there are three levels of layers in Unicode: code units, code points and logical characters. 15:36
15:36 wamba left
jmerelo mcmillhj: you can't declare signatures and then use them for declaring routines, unfortunately 15:36
Zoffix mcmillhj: share how? Isn't that what subset would do? You're constraining by Int and a custom codeblock in both cases
mcmillhj jmerelo: okay, that is where I got lost then :) 15:37
Zoffix: I totally agree that the subset seems like the correct way about this, but looking at the Signature docs I saw that definition and (incorrectly) thought there would be a way to share it.
15:37 luffysenpai left
jmerelo mcmillhj: mee too: stackoverflow.com/questions/488013...eclaration and stackoverflow.com/questions/415313...-in-perl-6 15:37
mcmillhj well, that will teach me to not google more first :\ 15:38
Zoffix m: my $sig = :(Int $a where $a >= 2 && $a <= 62); sub a(|c) { c ~~ $sig ?? (say "in") !! die "Wrong params" }; a 42
camelia in
Zoffix m: my $sig = :(Int $a where $a >= 2 && $a <= 62); sub a(|c) { c ~~ $sig ?? (say "in") !! die "Wrong params" }; a 70
camelia Wrong params
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
Zoffix haha :)
mcmillhj I'll still add this question though, I think it has way separate from that question
s/way/value/
Zoffix m: my $sig = :(Int $a where $a >= 2 && $a <= 62); sub a(|c where $sig) { say "in" }; a 70 15:39
camelia Constraint type check failed in binding to parameter 'c'; expected anonymous constraint to be met but got Capture (\(70))
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
jmerelo mcmillhj: thanks!
Zoffix m: my $sig = :(Int $a where $a >= 2 && $a <= 62); sub a(|c where $sig) { say "in" }; a 40
camelia in
Zoffix m: my $sig = :(Int $a where $a >= 2 && $a <= 62); multi a(|c where $sig) { say "in" }; multi a(|) { say "wrong args, bruh" }; a 40
camelia in
Zoffix m: my $sig = :(Int $a where $a >= 2 && $a <= 62); multi a(|c where $sig) { say "in" }; multi a(|) { say "wrong args, bruh" }; a 100
camelia wrong args, bruh
Zoffix m: multi a($) is pure { say "in" }; $ = a 50; INIT say "meow" 15:41
camelia meow
in
Zoffix That's a very easy way to lose your opt.... 15:42
(`pure` ain't on the proto, so it don't get folded)
15:44 ced_ joined
ced_ join 15:45
15:45 ChoHag left
ced_ Hi everybody. 15:46
Could someone help me with following I try to use the perl6-debug-m it works and I can poke around in the code. What I'm missing is the Term::Readline functionality arrow up down CTRL-K etc.... I've installed readline with zef and it seems I was succesfull. If there is a place where I could read me through what is the url? Google did not have a clue
timotimo ced_: the easiest way to get readline into a program is to use rlwrap, i heavily recommend that
you would just use "rlwrap your-command blah" on the terminal 15:47
i.e. "rlwrap perl6-debug-m -e 'say q/hi/'"
ced_ thks I'll have a try 15:48
jmerelo ced_: Can you also post that question in StackOverflow? To gather more answers and/or give it more visibility. Thanks! 15:49
timotimo how about we go through every paragraph of the docs and turn it into a potential stackoverflow question and find someone in the community to post it ... 15:51
jmerelo timotimo: and then we use the answers to modify the documentation which then raises new questions... 15:52
15:53 ced_ left
timotimo for no good reason, the idea to ask everybody who has a question to also post to stackoverflow, kind of irks me 15:54
jmerelo timotimo: you probably have a good reason in that I'm being quite repetitive. I think I've said it like 3 times today.
I know it can be annoying. It's not totally unintended, though. 15:55
15:57 khw joined
jmerelo But so far there are 641 questions tagged Perl6 in stackoverflow. 640 of them are by brian d foy. 15:57
Just kiddin', but if he weren't asking questions, there would be like 80 less. 15:58
This IRC channel and Twitter are amazing for getting your questions answered knowledgeably, amiably and fast. 15:59
However, it's not the best thing for indexing those questions and answers. Somebody looking for perl6-debug-m is highly unlikely to arrive to the 300th line in an IRC day log.
There's like half a dozen of problems solved in this IRC channel a day. That's around 5 more than are solved in StackOverflow on a daily basis. And that's 5 questions and amazng answers that will be lost, like teardrops in the rain. 16:01
So, timotimo, sorry for the rant, but I'm likely do the "stackoverflow it" all over again... 16:02
16:04 aindilis joined, kaare_ left
timotimo fair enough 16:04
16:11 scimon left 16:19 shlomif joined 16:21 rindolf left
Zoffix jmerelo: yeah, do it. It's mildly annoying and not everyone will post questions (or answers), but there's a long term benefit of having lots of P6 on SO 16:24
Break out of the echo chamber :) 16:25
16:26 shlomif is now known as rindolf
Zoffix I'm guessing new ones show up on SO's homepage too? stackoverflow.com/ That's even better for visibility. 16:26
jmerelo Zoffix: that's correct. I also try to tag questions with things such as "functional" so "oop" so that we get geeks from that area interested too :-) 16:27
Zoffix jmerelo++ 16:28
16:33 robertle left, dakkar left
comborico1611 What does auto-quoted mean? my %hash = foo => "bar", # keys get auto-quoted 16:38
16:38 albongooo___ left
AlexDaniel comborico1611: meaning that you don't have to write my %hash = 'foo' => "bar" 16:39
but you can
comborico1611 What is the shorthand version?
16:39 albongo joined
Zoffix huggable: colonpair 16:39
huggable Zoffix, All the shortcuts of colonpairs: twitter.com/zoffix/status/839807414211854337
16:39 athenot joined
Zoffix comborico1611: ^ prolly any of those variants 16:39
huggable: colonpair :is: The majority of the shortcuts of colonpairs: twitter.com/zoffix/status/839807414211854337 16:40
huggable Zoffix, Added colonpair as The majority of the shortcuts of colonpairs: twitter.com/zoffix/status/839807414211854337
abraxxa Zoffix: typo in your twitter: stings that look like numbers
Zoffix too late now. :) 16:41
comborico1611 Ahh! I get it. 'foo' compare with foo. thanks!
16:44 luffysenpai joined, zakharyas left 16:48 zakharyas joined, Zoffix left 16:49 jmerelo left, domidumont joined 16:53 luffysenpai left
comborico1611 So far I'm enjoying the LearnXinYminutes of Perl6 16:55
Wanting to confirm this simple subroutine tutorial has an error: hastebin.com/soraletuzi.pl 16:59
17:00 zakharyas left 17:01 zakharyas joined
colomon comborico1611: is the issue what with-optional (with no parens) returns? 17:01
17:02 Zoffix joined
comborico1611 colomon: the string is returning on all three sub calls. 17:02
Which isn't want the author's comments say will happen.
colomon the string is returned on NONE of the calls
Zoffix comborico1611: no, there's no error. The first call is the same as the rest.
colomon the return values are (Any) (Any) 1
Zoffix comborico1611: the string is *printed* by the routine. The routine returns the argument you give it. And that argument defaults to Any type object if you don't give it an argument (which is the case in both the first and second calls) 17:03
s/same as the rest/same as the second/;
colomon as given the code doesn’t do anything with the return value of the function
I added “say” to each of the last three lines so I’d know what it was doing. 17:04
Zoffix m: sub z ($arg?) { $arg }; dd z; dd z(); dd z 42; 17:05
camelia Any $arg = Any
Any $arg = Any
Int $arg = 42
Zoffix comborico1611: ^ a bit clearer example that actually dumps the return value
comborico1611 colomon: Yes, the "say" trick helps. I'm not sure what this all means, but I get the string + Any etc
Zoffix m: sub z ($arg = Int) { $arg }; say z; say z(); say z 42;
camelia (Int)
(Int)
42
colomon comborico1611: no, the function call PRINTS the string (that’s what say does) and then returns $arg. 17:06
Zoffix ^ and here a different default was given, so that's what's returned when no args are given
17:06 Zoffix left
comborico1611 Alright. I think I'm back on track now. 17:09
Thanks!
colomon it would have been clearer to use dd (like Zoffix++ did back there a few lines) instead of say for the results of the calls to with-optional, at it would help visually distinguish what is being printed by say in the function from what is returned. 17:15
17:23 robertle joined 17:36 comborico1611 left 17:45 zakharyas left 17:47 jast left 17:49 jast joined 17:53 avalenn joined 18:05 espadrine_ joined 18:07 natrys left
mcmillhj How do I indicate that I want an Array of Arrays? I notice that this appears to get flattened `my @queue = (('a', 'b'));` however if start with two elements no flattening occurs: `my @queue = (('a', 'b'), ('c', 'd'));` 18:21
18:21 kaare_ joined 18:22 andrzejk_ joined
AlexDaniel m: my @queue = (('a', 'b'));; dd @queue 18:24
camelia Array @queue = ["a", "b"]
AlexDaniel m: my @queue = (('a', 'b'),); dd @queue
camelia Array @queue = [("a", "b"),]
AlexDaniel mcmillhj: basically you need a comma in there if you have only one element
mcmillhj oh interesting, thanks 18:25
AlexDaniel mcmillhj: the docs explain it like this: “(1); # This is not a List, just a 1 in parentheses” 18:27
mcmillhj: docs.perl6.org/language/list#Literal_Lists
18:30 sauvin left 18:32 domidumont left
mcmillhj AlexDaniel: thanks 18:33
18:35 [particle]1 left 18:37 kaare_ left, darutoko left 18:38 kaare_ joined 18:42 jmerelo joined
jmerelo hi 18:43
18:56 zachk joined, zachk left, zachk joined 18:59 jmerelo left 19:00 pecastro left 19:03 andrzejk_ left 19:06 andrzejk_ joined 19:07 lalitmee joined, lalitmee left 19:08 lalitmee joined, lalitmee left 19:10 zakharyas joined
mcmillhj I can't seem to figure out what this means: `Type check failed in binding to parameter '@seq'; expected Positional[Array] but got Array ($[1, 8])` 19:11
I have a subroutine that accepts an Array: `sub search(Array @seq where *.elems == 2) { ... }` and I am pretty sure I am passing an Array to it via `search([1, 8]);` 19:12
AlexDaniel mcmillhj: well, @seq by itself will take an array just fine 19:13
mcmillhj: you're asking for an array of arrays actually
mcmillhj AlexDaniel: ugh, I keep forgetting that
AlexDaniel: thanks ;) 19:14
19:14 rickyracky joined, rickyracky left
AlexDaniel alternatively you can do something like this: 19:15
m: sub search(Array $a where *.elems == 2) { say ‘ok’ }; search [1, 2]'
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3.elems == 2) { say ‘ok’ }; search [1, 2]7⏏5'
expecting any of:
infix
infix stopper
postfix
statement en…
AlexDaniel m: sub search(Array $a where *.elems == 2) { say ‘ok’ }; search [1, 2]
camelia ok
mcmillhj yeah, I just keep getting confused because the type signature and the sigil 19:16
19:28 [particle] joined 19:29 raynold joined 19:40 kt_ left
mcmillhj Is it possible to use an Array as a key in a Hash? I read through this section in the docs: docs.perl6.org/type/Hash#Non-strin...ject_hash) which sort of implies this would work. I can't get it to work when trying however: gist.github.com/mcmillhj/e2200a93f...e811b20cac 19:53
tobs mcmillhj: looks like it's slicing the hash instead. I don't know if you can tell it not to. 19:59
m: my %h{Array}; %h.push: %{[1,2] => [3,4]}; %h.perl.say # :-/ 20:02
camelia Type check failed in binding to parameter 'key'; expected Array but got Str ("1 2")
in block <unit> at <tmp> line 1
tobs m: my %h{Array}; %h.push: :{[1,2] => [3,4]}; %h.perl.say
camelia (my Any %{Array} = ([1, 2]) => $[3, 4])
mcmillhj ooh interesting 20:05
20:06 TEttinger joined 20:09 mcmillhj left 20:12 mmoc joined, mmoc left
tobs m: class A {}; my %h{A}; %h{A.new, A.new} = 42, 52; say %h.elems # seems to be fine if your keys don't slice 20:12
camelia 2
20:13 mephinet left 20:15 comborico1611 joined 20:17 pecastro joined 20:26 FROGGS left 20:29 zakharyas left 20:31 Zoffix joined 20:34 andrzejk_ left
comborico1611 Is / (a || b) c / ... the same as... / [a || b] c / 20:34
?
Zoffix .tell mcmillhj You can use Arrays for hash keys, but it's likely to be pain, since they're not value types (so you'd have to use the same Array object to do the lookup, not one that just has the same values). Also, you need to place it into a Scalar container to tell the compiler you want to treat it as one item (the key) instead of a list of keys. Lastly, by default hashes stringigfy keys, so you'll need to
yoleaux Zoffix: I'll pass your message to mcmillhj.
Zoffix use object hashes: m: my @a = <a b c>; (my %h{Array}){$@a} = 42; %h{$@a}.say
.tell mcmillhj use object hashes: m: my @a = <a b c>; (my %h{Array}){$@a} = 42; %h{$@a}.say
yoleaux Zoffix: I'll pass your message to mcmillhj.
Zoffix comborico1611: it matches the same thing, but the first one captures the (a || b) into a positional capture 20:35
m: "ac" ~~ /(a || b) c/; $0
camelia ( no output )
comborico1611 I see. Thanks!
Zoffix m: "ac" ~~ /(a || b) c/; say $0
camelia 「a」
Zoffix m: "ac" ~~ /[a || b] c/; say $0
camelia Nil
20:37 andrzejk_ joined 20:41 andrzejk_ left 20:42 rindolf left 20:46 Philip___ joined 20:47 Philip___ left 20:49 rindolf joined 20:51 comborico1611 left
Kaiepi does perl6 have an event loop? 20:59
moritz rakudo uses moarvm, and moarvm uses libuv, which has an event loop 21:01
21:01 kurahaupo_ joined 21:02 kurahaupo left
Kaiepi i mean more like node's event loop 21:02
21:02 kurahaupo_ left
Kaiepi in the runtime 21:02
moritz but the design documents and the test suit don't enforce one at the language layer
21:02 kurahaupo joined
moritz in the rakudo-on-moarvm implementation, there is an event loop, yes 21:02
Kaiepi so no? 21:03
moritz moarvm is the runtime
it really depends on what you want to know 21:04
Kaiepi oh 21:07
21:07 KotH left
Kaiepi what does moar's event loop handle? 21:08
21:08 KotH joined, andrzejk_ joined, andrzejk_ left
Kaiepi node's handles timeouts, process.nexttick, promises, libuv stuff mainly 21:09
21:10 mephinet joined, kaare_ left 21:11 rindolf left
moritz I'm not sure; others are much more qualified to answer that :-) 21:11
21:17 mcmillhj joined
lizmat . 21:22
21:22 mcmillhj left 21:27 |oLa| joined, skids left 21:32 jast left 21:33 mcmillhj joined 21:34 jast joined 21:35 pmurias joined 21:38 mcmillhj left
zostay a quick grep of MoarVM reveals that the libuv event loop is referenced in a lot of different places: timers, io, ipc, signals... each thread appears to get it's own event loop 21:41
21:43 Zoffix left
buggable New CPAN upload: P5fileno-0.0.1.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.1.tar.gz 21:46
21:49 mcmillhj joined
AlexDaniel oh wow 21:54
Kaiepi++
ah no
that's not a pull request!!!
that's just a ticket :D
21:54 mcmillhj left 21:55 pilne joined
Kaiepi which ticket? 21:55
21:56 kurahaupo_ joined
Kaiepi AlexDaniel, 21:57
AlexDaniel D#1968
synopsebot D#1968 [open]: github.com/perl6/doc/issues/1968 Adding a Perl 6 from Node.js - Nutshell page
Kaiepi ah
thanks 21:58
21:59 kurahaupo left, wamba joined 22:01 kurahaupo_ left 22:02 kurahaupo joined 22:05 mcmillhj joined
Herby_ o/ 22:09
22:10 mcmillhj left 22:11 MasterDuke left
zostay Kaiepi++ I was just thinking that would be nice to have... but didn't make a ticket. ;) 22:15
22:16 kurahaupo left 22:17 dct joined, kurahaupo joined
Kaiepi looks like i'm doing pretty well today 22:17
22:19 mcmillhj joined
jnthn Kaiepi: MoarVM runs an event loop internally using libuv, but that's very much implementation detail. 22:20
22:21 pmurias left
Kaiepi ah 22:21
so it's not the same type of dela as node's
jnthn No. By design. :-) 22:22
Everything is exposed in terms of Promise (single async value) and Supply (stream of async values). 22:23
22:23 mcmillhj left
Kaiepi good because node's event loop is hell 22:26
especially when you get into combining promisese and timeouts and process.nextTick 22:27
s/promisese/promises
22:29 kurahaupo left, kurahaupo joined 22:31 mcmillhj joined 22:41 mcmillhj left, kurahaupo left 22:42 kurahaupo joined 22:43 |oLa| left 22:46 mcmillhj joined 22:47 espadrine_ left 22:51 mcmillhj left 22:53 wamba left, kurahaupo left 22:56 mcmillhj joined 22:58 MasterDuke joined 22:59 kurahaupo joined, mcmillhj_ joined 23:04 mcmillhj_ left 23:08 dct left 23:13 mcmillhj_ joined, kurahaupo left 23:14 kurahaupo joined, SCHAPiE left 23:16 epony left, zachk left 23:17 mcmillhj_ left 23:18 skids joined 23:27 kurahaupo left, kurahaupo joined 23:28 vcv_ left 23:32 SCHAPiE joined, mcmillhj_ joined 23:37 mcmillhj_ left 23:38 sno left 23:42 kurahaupo left, kurahaupo joined 23:48 mcmillhj_ joined 23:53 mcmillhj_ left 23:57 kurahaupo left, kurahaupo joined 23:59 mcmillhj_ joined