Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-09-01

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:04 BenGoldberg joined #perl6
00:05 japhb Who is Zoffix right now?  I need to ask about IRC::Client ...
00:06 timotimo elfoonto
00:06 japhb ... but not here?  Hmmm
00:07 timotimo zoffix tends to pop in and out of existence
00:07 japhb How do you .tell someone who keeps changing nick all the dang time?
00:07 geekosaur they left, yes
00:07 geekosaur (and I see I pegged them without much evidence :)
00:07 bioduds yay, worked
00:09 japhb Gah, well: Anyone currently in here successfully use IRC::Client in a Rakudo built today?
00:10 bioduds I guess you could md5 before installing, geekosaur?
00:10 japhb I'm trying to figure out if I failed my daily stupidity check, or I got unlucky and IRC::Client is allergic to a recent commit.
00:10 bioduds to check if a man in the middle attack occurred, no?
00:11 geekosaur I hope you mean sha256; md5 is long since compromised for that use, and sha1 is unreliable
00:11 bioduds could be, yes
00:11 bioduds would prevent such hotspot geeks, right?
00:12 timotimo https should already be good enough, if we can get the certificate pinned in the curl commandline maybe?
00:12 bioduds excellent
00:12 bioduds yes, there is no session
00:12 bioduds no hijacking I guess
00:13 bioduds Im putting up a whole series of linux distros now to test it
00:13 bioduds first was ubuntu 14.04
00:13 bioduds later ill try on my old mac
00:14 cognominal joined #perl6
00:14 bioduds obscuring the file also helps
00:14 bioduds with https, am I right?
00:14 bioduds I mean, along with https
00:15 mcmillhj joined #perl6
00:16 dalek doc: 51d7a8d | gfldex++ | doc/Language/control.pod6:
00:16 dalek doc: alias swtich to given for search
00:16 dalek doc: review: https://github.com/perl6/doc/commit/51d7a8d7e5
00:16 MasterDuke japhb: bisectable6, benchable6, and committable6 all use IRC::Client
00:16 MasterDuke with a somewhat recent Rakudo
00:17 timotimo if someone gets a trusted certificate for rakudo.org and MITMs you, you can still be pwned ...
00:18 geekosaur and unfortunately that kind of thing is a somewhat common occurrence
00:18 timotimo like if you have an antivirus or something the OEM installed that ships a CA in order to "protect" you from stuff in https encrypted connections
00:18 geekosaur cf. various entities getting certs for both microsoft.com and google.com
00:18 timotimo and when the software also accidentally ships the private key to go with that certificate authority ...
00:18 geekosaur or deliberately, in the dell case
00:18 timotimo lenovo also had a case of that
00:19 MasterDuke japhb: This is Rakudo version 2016.07.1-148-g9cbd855 built on MoarVM version 2016.07-17-g40948f6
00:19 bioduds who would be responsible for acquiring such a certificate for perl6.org, guys?
00:20 bioduds im using 2016.04
00:27 geekosaur what?
00:27 geekosaur I have the feeling you did not understand what was said there and now you want a fake perl6.org cert to hijack the site with?
00:28 eyck joined #perl6
00:28 geekosaur also I have the feeling you are so convinced that something *fundamentally insecure* is critically important to have and therefore cannot possibly be fundamentally insecure, it's just a matter of tweaking things right to make it safe
00:29 geekosaur and yes, I have seen lots of justifications for why "just set the server up right and it's perfectly safe" that prove that the people that wrote them *do not understand network security*
00:32 mcmillhj joined #perl6
00:35 japhb MasterDuke: I figured out the problem -- no SSL support in IRC::Client.
00:37 MasterDuke ahh, didn't realize that. good to know
00:42 mcmillhj joined #perl6
00:49 pierre_ joined #perl6
01:05 mcmillhj joined #perl6
01:08 labster joined #perl6
01:13 bjz joined #perl6
01:14 Actualeyes joined #perl6
01:16 mcmillhj joined #perl6
01:19 bjz_ joined #perl6
01:26 bjz joined #perl6
01:27 BenGoldberg joined #perl6
01:30 ItayAlmog joined #perl6
01:32 pierre_ joined #perl6
01:47 ilbot3 joined #perl6
01:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:49 bjz_ joined #perl6
01:53 mcmillhj joined #perl6
02:00 itaipu joined #perl6
02:11 SmokeMachine____ If I want to "create" a "alias" for the class word, I can use the EXPORTHOW... Is there anything like that for the has word?
02:14 labster joined #perl6
02:16 SmokeMachine____ m: module EXPORTHOW {constant DEFINE::just-a-class = Metamodel::ClassHOW}; say just-a-class Name {}
02:16 camelia rakudo-moar ec9e81: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing initializer on constant declaration␤at <tmp>:1␤------> 3module EXPORTHOW {constant DEFINE:7⏏5:just-a-class = Metamodel::ClassHOW}; sa␤»
02:18 SmokeMachine____ m: module EXPORTHOW {module DEFINE {constant just-a-class = Metamodel::ClassHOW}}; say just-a-class Name {}
02:18 camelia rakudo-moar ec9e81: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    Name used at line 1␤Undeclared routine:␤    just-a-class used at line 1␤␤»
02:22 SmokeMachine____ m: package EXPORTHOW {package DEFINE {constant just-a-class = Metamodel::ClassHOW}}; say just-a-class Name {}
02:22 camelia rakudo-moar ec9e81: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    Name used at line 1␤Undeclared routine:␤    just-a-class used at line 1␤␤»
02:22 SmokeMachine____ Something like that...
02:23 SmokeMachine____ But is there a way to do that with the "has" key word?
02:23 pierre_ joined #perl6
02:24 SmokeMachine____ And for methods?
02:27 mcmillhj joined #perl6
02:39 noganex joined #perl6
02:43 ugexe Slangs
02:46 aries_liuxueyang joined #perl6
02:51 mcmillhj joined #perl6
02:53 bob777 joined #perl6
02:59 richi235 joined #perl6
03:02 mempko joined #perl6
03:02 pierre_ joined #perl6
03:14 cibs joined #perl6
03:26 mcmillhj joined #perl6
03:48 MilkmanDan joined #perl6
03:52 mcmillhj joined #perl6
04:08 mcmillhj joined #perl6
04:09 Actualeyes left #perl6
04:10 mempko joined #perl6
04:19 Cabanossi joined #perl6
04:21 mcmillhj joined #perl6
04:22 labster joined #perl6
04:34 mcmillhj joined #perl6
04:38 sftp joined #perl6
04:39 mindos joined #perl6
04:40 zostay joined #perl6
04:40 peteretep joined #perl6
04:40 kipd joined #perl6
04:40 olinkl joined #perl6
04:40 Lucas_One joined #perl6
04:41 kent\n joined #perl6
04:42 DrParis joined #perl6
04:42 gabiruh joined #perl6
04:44 ponbiki joined #perl6
04:44 canopus joined #perl6
04:46 pierre_ joined #perl6
04:48 JimmyZ joined #perl6
04:52 Matthew[m] joined #perl6
04:54 mcmillhj joined #perl6
05:04 pnu_ joined #perl6
05:05 Guest58374 joined #perl6
05:05 tbrowder joined #perl6
05:06 mrsolo joined #perl6
05:06 PotatoGim joined #perl6
05:07 woolfy joined #perl6
05:07 w4and0er96 joined #perl6
05:13 jnap_ joined #perl6
05:18 mcmillhj joined #perl6
05:25 Woodi tail -3 ~/.bashrc\nexport PATH\nPATH=$HOME/.rakudo/bin:$PATH\nexport PATH\nYou have new mail.\n$   should work :)
05:27 geekosaur except when you use virtual environment managers which expect that .bashrc does not undo the path changes they just made
05:28 Woodi geekosaur: err... .bashrc are now autogenerated too ?? :)
05:28 geekosaur (some uses of perlbrew; rvm; hsenv; more generally stuff like modules)
05:37 canopus joined #perl6
05:38 Actualeyes joined #perl6
05:40 Woodi geekosaur: looks hsenv introduces new layer so installation needs to be level-up from this. or just implementation of meta-tools that operate on environment from inside is needed :>
05:41 geekosaur so, the real point is, you use an environment manager to point your current shell to a particular installation of something. you fire up vim, and expect it to also be using that. but vim loads your .bashrc when it runs an external command, which undoes the modified $PATH --- oops
05:42 Woodi err... there was RFC discussion on #perl6-dev yesterday... do this means that pasting links from HN is now prohibited without thinking&proposing RFC paper ??
05:42 ufobat joined #perl6
05:44 Woodi geekosaur: that's why you need meta-part there, it needs to modify .bashrc template for every env usage :)
05:46 geekosaur that's not scalable to modules or nikola or other such systems where the sysadmins manage the environment configs for possibly hundreds of users with different shells
05:47 pierre_ joined #perl6
05:50 * Woodi finally become proper X desktop user by learning to use that virtual desktop feature from twm/fvwm times :)
05:57 pierre_ joined #perl6
05:59 moritz Woodi: welcome to the 20th century! :-)
06:01 pierre_ joined #perl6
06:15 mcmillhj joined #perl6
06:18 Wiertek joined #perl6
06:19 woolfy1 joined #perl6
06:20 pierre___ joined #perl6
06:20 wamba joined #perl6
06:21 wtw_ joined #perl6
06:21 wtw_ joined #perl6
06:21 firstdayonthejob joined #perl6
06:21 pmurias joined #perl6
06:24 zacts joined #perl6
06:28 mempko joined #perl6
06:29 brrt joined #perl6
06:30 moritz ok, I'm not sure fvwm had that in 1999
06:30 nadim joined #perl6
06:36 berthos joined #perl6
06:39 domidumont joined #perl6
06:45 domidumont joined #perl6
06:45 mcmillhj joined #perl6
06:45 geekosaur it did
06:46 geekosaur original twm didn't
06:47 darutoko joined #perl6
06:49 geekosaur probably thinking of ctwm, from 1992
06:50 nine joined #perl6
06:57 domidumont joined #perl6
07:00 mcmillhj joined #perl6
07:01 CIAvash joined #perl6
07:12 mohae_ joined #perl6
07:19 gucore joined #perl6
07:23 dsp_ joined #perl6
07:25 espadrine_ joined #perl6
07:31 Wiertek joined #perl6
07:34 woolfy joined #perl6
07:36 zakharyas joined #perl6
07:40 canopus joined #perl6
07:50 RabidGravy joined #perl6
07:51 mcmillhj joined #perl6
08:01 girafe joined #perl6
08:03 labster joined #perl6
08:07 grondilu joined #perl6
08:07 nightsh joined #perl6
08:07 grondilu how do I recursively list all regular files in a directory?
08:08 dolmen joined #perl6
08:09 nine grondilu: use File::Find or Path::Iterator
08:10 grondilu yeah, just saw it on rosettacode
08:11 dakkar joined #perl6
08:14 pierre_ joined #perl6
08:16 yoleaux joined #perl6
08:19 leont joined #perl6
08:22 masak good antenoon, #perl6
08:29 brrt joined #perl6
08:31 mcmillhj joined #perl6
08:34 vendethiel joined #perl6
08:34 jonas3 joined #perl6
08:34 smls joined #perl6
08:45 ItayAlmog joined #perl6
08:47 Sgeo_ joined #perl6
08:48 rindolf joined #perl6
08:49 ItayAlmog joined #perl6
08:51 mcmillhj joined #perl6
08:51 perl6p4 joined #perl6
08:52 ab6tract joined #perl6
08:52 ab6tract o/ #perl6
08:53 ab6tract i seem to be confused about array slicing
08:53 ab6tract m: my @a = [ 1 xx 5 ], [ 2 xx 5], [3 xx 5], [4 xx 5]; say @a[][2]; say @a[*][2]
08:53 camelia rakudo-moar ec9e81: OUTPUT«[3 3 3 3 3]␤[3 3 3 3 3]␤»
08:53 lizmat ab6tract: or you found a bug  :)
08:53 ab6tract i thought for sure one of those syntaxes (or another that i am forgetting) used to give a list of all the second elements of the arrays
08:55 ab6tract lizmat: are you saying i ain't crazy (at least not about this)?
08:56 lizmat well, @a[*] is basically the same as @a[], which is basically the same as @a
08:56 masak m: my @a = [1 xx 5], [2 xx 5], [3 xx 5], [4 xx 5]; say @a[*;2]
08:56 camelia rakudo-moar ec9e81: OUTPUT«(1 2 3 4)␤»
08:56 lizmat so that's just saying @a[2], which looks correct
08:56 masak ab6tract: ^^
08:57 ab6tract right, but wasn't there a slice syntax for getting at every second element?
08:57 ab6tract of a multi dim
08:57 lizmat I think that's still NYI ?
08:57 ab6tract oh
08:57 ab6tract lol
08:57 ab6tract masak just showed me :)
08:57 lizmat ah, ok, must not be awake then  :-)
08:57 lizmat there's something wrt to multidim slicing that's NYI still
08:58 DrForr Of *course* Perl6 does APL-style slicing. :/
08:58 masak DrForr: you seem disappointed at this.
08:58 DrForr It means I have *more* work :)
08:58 ab6tract maybe we can bacronym APL to be Another Perly Language :)
08:59 mniip joined #perl6
08:59 sjohnson joined #perl6
08:59 rafl joined #perl6
08:59 remmie joined #perl6
09:00 dylanwh joined #perl6
09:00 DrForr The major problem is that APL does strict L-to-R evaluation; I'd need to add a slang that ignores precedence in order to make the operations properly line up.
09:02 leont_ joined #perl6
09:03 jervo joined #perl6
09:03 nine joined #perl6
09:03 nadim joined #perl6
09:03 ufobat joined #perl6
09:03 aries_liuxueyang joined #perl6
09:03 imcsk8 joined #perl6
09:03 Ulti joined #perl6
09:03 hanekomu joined #perl6
09:03 mtj_ joined #perl6
09:03 jdv79 joined #perl6
09:03 broquaint joined #perl6
09:03 shadowpaste joined #perl6
09:03 xdbr joined #perl6
09:03 TheDir_ joined #perl6
09:03 jeek joined #perl6
09:03 gypsydave5 joined #perl6
09:03 jast joined #perl6
09:03 margeas joined #perl6
09:03 ggherdov joined #perl6
09:04 MorayJ joined #perl6
09:05 mcmillhj joined #perl6
09:06 aries_liuxueyang joined #perl6
09:09 ggherdov joined #perl6
09:19 mcmillhj joined #perl6
09:20 Sgeo_ joined #perl6
09:23 pierre_ joined #perl6
09:26 TEttinger DrForr: does it? isn't there some precedence so "1 2 3 4 rho 2 2" knows that the first block of numbers are an array, and "2 2" is another array passed as argument to rho?
09:27 domidumont joined #perl6
09:28 DrForr Well, that was at least the impression I got when I last read the official manual (which I have in storage back in the States.) I'm sure the memory has faded, though.
09:36 pierre_ joined #perl6
09:38 pierre_ joined #perl6
09:47 michiamodiego joined #perl6
09:47 brrt joined #perl6
09:49 di_ego joined #perl6
09:52 di_ego left #perl6
09:54 CIAvash joined #perl6
10:13 dalek ecosystem: 81e535d | ab5tract++ | META.list:
10:13 dalek ecosystem: Update Terminal::Print META6.json location
10:13 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/81e535d81c
10:22 girafe joined #perl6
10:23 nine nadim: you've already missed a lot of interesting discussion over in #perl6-toolchain starting at http://irclog.perlgeek.de/perl6-​toolchain/2016-08-29#i_13112051
10:23 nine nadim: also my proposal at https://github.com/perl6/toolcha​in-bikeshed/blob/master/build.md
10:24 Sgeo joined #perl6
10:30 lambd0x joined #perl6
10:30 lambd0x Hi everyone!
10:42 DrForr Afternoon.
10:43 itaipu joined #perl6
11:07 eyck joined #perl6
11:11 kaare__ joined #perl6
11:13 melezhik Hi!
11:13 melezhik Hwo can I get an exception object inside CATCH { ... } ?
11:13 lizmat $_
11:14 melezhik thanks!
11:14 lizmat m: die "foo"; CATCH { dd $_ }
11:14 camelia rakudo-moar f0e6ae: OUTPUT«X::AdHoc.new(payload => "foo")␤foo␤  in block <unit> at <tmp> line 1␤␤»
11:15 melezhik ok, thanks lizmat:
11:16 melezhik sorry, for silly question, I read about payload , but still can't understand how to use it in my exception classes ...
11:19 lizmat die "foo" is basically short for X::AdHoc.new(payload => "foo").throw
11:19 lizmat other exceptions have other parameters
11:20 melezhik so payload method only makes a sense for X::AdHoc class?
11:21 lizmat yes
11:21 lizmat m: say 24 / my $ = 0; CATCH { dd $_ }    # other example
11:21 camelia rakudo-moar f0e6ae: OUTPUT«X::Numeric::DivideByZero.new(using => "div", numerator => 24)␤Attempt to divide 24 by zero using div␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
11:22 melezhik ok, thanks lizmat:
11:22 melezhik how to disable variables interpolation inside regular expressions ?
11:23 melezhik to have something /$foo/ where $foo is not a variable ...
11:23 timotimo just put it in single quotes
11:23 timotimo that'll guarantee no interpolation happens
11:24 nadim nine, I'll look at it right now
11:26 nadim nine:  so when I explain a problem you profit of the occasion to cleanup your nose and get a small raccoon out of it. http://imgur.com/a/mBNte
11:26 melezhik thanks timotimo: , I guessed this, probably had some other errors in other parts of my regexps ...
11:28 timotimo could be, yes
11:28 nine LOL
11:28 nadim hehe
11:28 nine Well if the image was larger, I could talk myself out of this...
11:28 timotimo melezhik: have you tried perl6-debug-m yet? (you need to install a front-end module)
11:28 melezhik perl6-debug-m for what ?
11:29 nadim nine: IMVHO, and I know a lot of people will not get it, forget make, forget make, forget make. also, in my experience, declarative systems will fail. or rather they will deprecate rapidly. Maybe we can continue this on the toolchain channel.
11:29 timotimo melezhik: for your regex parsing?
11:29 nine nadim: please. I wouldn't mind you reposting that
11:30 melezhik ah, I am confident enough to manage on my own, thanks for advise anyway ...
11:30 lizmat nadim: that was just nine switching the tape recorder up his nose to "record"  :-)
11:31 melezhik can't find to how to have tests without plan at https://docs.perl6.org/language/testing if I have only done-testing at the end, I still have a Parse errors: No plan found in TAP output
11:32 lizmat just a done-testing at the end should be enough
11:32 lizmat m: use Test; ok 1; done-testing
11:32 camelia rakudo-moar f0e6ae: OUTPUT«ok 1 - ␤1..1␤»
11:32 melezhik ahh, got now, seems like program flow does not reach a done-testing call
11:32 melezhik that's the reason ...
11:32 melezhik it's ok now
11:32 DrForr Or 'plan 42;' at the top, if you know the number of tests or can compute them.
11:33 timotimo worst case, just END { done-testing }   :P
11:33 nadim lizmat: he's sneaky like that
11:35 melezhik strange enough if I have asserts in CATCH {} block seems like done-testing also needs to be called inside CATCH {} block; If I have done-testing just at the end of the file I have "No plan found in TAP output"
11:38 lizmat m: say 24 / my $ = 0; CATCH { default { dd $_ } }   # use default to disarm the exception
11:38 camelia rakudo-moar f0e6ae: OUTPUT«X::Numeric::DivideByZero.new(using => "div", numerator => 24)␤»
11:38 lizmat m: use Test; die; CATCH { default { dd $_ } }; done-testing
11:38 camelia rakudo-moar f0e6ae: OUTPUT«X::AdHoc.new(payload => "Died")␤»
11:39 lizmat m: use Test; ok "foo"; die; CATCH { default { dd $_ } }; ok "bar"; done-testing
11:39 camelia rakudo-moar f0e6ae: OUTPUT«ok 1 - ␤X::AdHoc.new(payload => "Died")␤»
11:39 lizmat hmmm
11:39 lizmat m: use Test; ok "foo"; die; CATCH { default { dd $_ } }; ok "bar"; END done-testing
11:39 camelia rakudo-moar f0e6ae: OUTPUT«ok 1 - ␤X::AdHoc.new(payload => "Died")␤1..1␤»
11:39 melezhik was able to reproduce lizmat: ?
11:39 lizmat melezhik: I guess using END is best then  :-)
11:40 melezhik yes, but this one is obscure , don't you think?
11:42 jnthn Having a CATCH block in the mainline of your test file is sure obscure :)
11:44 melezhik yeah, tests need to get improved , for sure, I just trying to say that I expect that done-testing works at the end of my code, without any additional magic with END { ... }
11:44 lizmat m: use Test; ok "foo"; die; CATCH { .resume }; ok "bar"; done-testing
11:44 camelia rakudo-moar f0e6ae: OUTPUT«ok 1 - ␤ok 2 - ␤1..2␤»
11:44 lizmat I think the misunderstanding was about what CATCH does
11:44 lizmat the CATCH doesn't prevent the exception to be thrown per se
11:45 melezhik why you focus on CATCH? I just found that done-testing does not work for some cases
11:45 lizmat melezhik: what is the case it doesn't work ?
11:45 melezhik ok, let me write an explanatory code
11:46 melezhik I thought you already did ...
11:46 itaipu_ joined #perl6
11:46 Xliff I've tracked weird behavior in a custom sub EXPORT I am writing.
11:46 Xliff If I send anything but an empty map, I get the following error: "Cannot find method 'package_at_key': no method cache and no .^find_method
11:46 Xliff "
11:48 Xliff Maybe related to https://rt.perl.org/Public/​Bug/Display.html?id=128010
11:48 Xliff ??
11:54 mcmillhj joined #perl6
11:55 vendethiel joined #perl6
11:55 jnthn melezhik: After a CATCH has handled the exception, the block enclosing the CATCH is left (which in your case is the mainline of the program). done-testing isn't something magical, it's just a normal subroutine call (like all the test subs). So you exit the mainline of the program before there's any chance to reach done-testing and run it.
11:57 melezhik https://gist.github.com/melezhik/​5a3b0b77e8e094bf10d37bad60b0a542
11:57 melezhik please take a look at this
11:58 lizmat melezhik: after the CATCH block is executed, execution stops: it never reaches the done-testing in that case
11:58 dalek doc: 37999cd | MasterDuke17++ | doc/Language/glossary.pod6:
11:58 dalek doc: Fix typo in 'Colon Pair' indexing
11:58 dalek doc: review: https://github.com/perl6/doc/commit/37999cdde3
12:00 melezhik "after the CATCH block is executed, execution stops:  it never reaches the done-testing in that case"  does it stated at https://docs.perl6.org/language/exceptions ?
12:00 rindolf joined #perl6
12:01 itaipu joined #perl6
12:02 masak melezhik: yes.
12:02 masak melezhik: from that page: "Exceptions interrupt control flow and divert it away from the statement following the statement that threw it."
12:02 lizmat https://docs.perl6.org/language/e​xceptions#Resuming_of_Exceptions
12:03 masak (in fact, the sentence is not completely correct. interruption happens at the resolution of sequence points, not statements.)
12:04 melezhik masak: it's about exceptions , but not that clear (at least I can't this that everything going _after_ CATCH blocks  will be never executed  ... )
12:04 timotimo not quite
12:05 masak melezhik: "Exceptions interrupt control flow"
12:05 domidumont joined #perl6
12:05 masak melezhik: it's right there in those words
12:05 timotimo m: { die "oh no!"; say "not executed"; CATCH { default { } }; say "also not executed?" }; say "end of the thing"
12:05 camelia rakudo-moar f0e6ae: OUTPUT«end of the thing␤»
12:05 timotimo ah.
12:05 jnthn melezhik: It's not about "not after the CATCH block", it's about "not after the point of the throw"
12:06 masak yes, it's not about "after the CATCH"... what jnthn++ said
12:06 melezhik masak: and? ... I know what exceptions are , please reread my lines about catch blocks
12:06 masak melezhik: plonk
12:06 jnthn But yes, I agree that page could be more clear.
12:06 jnthn melezhik: If you expect control to reach your done-testing statement, your understanding of exceptions has some way to go :)
12:07 jnthn The easiest way to deal with this is just to shove the throwing statement and your CATCH inside of a try { ... }
12:07 jnthn lunch time &
12:07 melezhik guys forget about done-testing, I am just tying to say that according to exceptions docs it's not clear that code goes after CATCH {} will be never executed
12:08 ItayAlmog joined #perl6
12:08 melezhik it is not about I can't have my tests done in right way, it's about ,,, well more about documentation, imho
12:09 moritz melezhik: you're welcome to open an issue on the perl6/docs repo, or even contribute the docs yourself
12:09 moritz perl6/doc that is
12:09 moritz on github
12:09 melezhik yes, sure , I just want to be sure that I do not want judge anybody I just want to be sure, that other get my thoughts ...
12:11 melezhik now I know how CATCH works in perl6, thanks for explanations, I just tried to say this behavior is not clear after my reading perl6 exceptions docs, that is it.
12:12 melezhik won't tell more on this topic :))
12:12 mst right, but we're saying "we don't know how to make it clearer if you don't help, so please help, we'd love that"
12:12 domidumont joined #perl6
12:13 melezhik mst: sure
12:13 moritz melezhik: don't stop with that topic. Please use your newly gained understanding to improve the docs.
12:13 mst melezhik++ # I look forward to the patch
12:13 melezhik moritz: , mst: will think about perl6 doc contribution
12:13 mcmillhj joined #perl6
12:14 DrForr It's just a Git PR away :)
12:15 melezhik DrForr: sure ... :)
12:15 DrForr Fork, checkout a new doc branch, hack hack, commit, PR. *boom*.
12:16 timotimo good boom or bad boom? :)
12:16 jast only one way to find out
12:17 DrForr Boom today, boom tomorrow. There's *always* a boom tomorrow.
12:17 timotimo hm. when's next boomday?
12:17 timotimo fish: ddate: command not found...   -  grrrrrr
12:18 DrForr Tomorrow, of course. (Good grief, have you all forgotten Babylon 5?...)
12:18 MasterDuke joined #perl6
12:18 * arnsholt <3 Babylon 5
12:18 melezhik btw, if perl6 CATCH {}  has something similar like "ensure"  block like in ruby, where someone could put a code which will be executed _unconditionally_,  right after all the "when" blocks executed ... ?
12:19 timotimo melezhik: yeah, LEAVE should do that
12:19 melezhik ahh, good
12:20 timotimo who's the boom king?
12:20 arnsholt Well, masak used to be king of the bug reports, so maybe he is? =)
12:20 timotimo no, no, no. i'm the boom king!
12:21 timotimo anyway, AFK for a bit
12:21 DrForr . o ( Say hello to my *BOOM* stick )
12:21 timotimo (if you don't know what i was referencing, it's "She's So Hot Boom" by Flight of the Conchords, and it comes highly recommended - especially with the video that goes with it)
12:22 garu joined #perl6
12:23 dalek Inline-Perl5/raccoon: e746858 | niner++ | / (3 files):
12:23 dalek Inline-Perl5/raccoon: Experimental support for experimental raccoon build system
12:23 dalek Inline-Perl5/raccoon: review: https://github.com/niner/Inl​ine-Perl5/commit/e74685849a
12:29 garu hi everyone! not sure if it's a bug, a not-implemented-yet or a by-design thing, but "my regex fú { \. }; say 'w00t' if 'a.b' ~~ / <fú> /;" is borking with "Error encoding ASCII string: could not encode codepoint 250"
12:30 garu if I change fú with fu it works, of course
12:32 garu (tested against moar-nom aa5e494. running rakudobrew build moar now)
12:32 bjz joined #perl6
12:34 sufrostico joined #perl6
12:35 MasterDuke bisect: my regex fú { \. }; say 'w00t' if 'a.b' ~~ / <fú> /
12:35 bisectable6 MasterDuke, On both starting points (good=2015.12 bad=ec9e814) the exit code is 1 and the output is identical as well
12:35 bisectable6 MasterDuke, Output on both points: ===SORRY!===␤Error encoding ASCII string: could not encode codepoint 250
12:35 n1lp7r joined #perl6
12:36 masak timotimo: thanks for the "boom" reference. I enjoyed watching https://www.youtube.com/watch?v=a-sawvtJxDI :)
12:36 masak have heard the song before but not seen the video
12:36 garu p6: my regex fú { \. }; say 'w00t' if 'a.b' ~~ / <fú> /;
12:36 camelia rakudo-moar f0e6ae: OUTPUT«===SORRY!===␤Error encoding ASCII string: could not encode codepoint 250␤»
12:37 garu I guess it fails on HEAD as well :/
12:37 moritz that's a bug :(
12:38 garu moritz: excelent! is it easy enough that someone who's never had any contact with the codebase *cough*me*cough* can take a stab a it? Or will I be doing more damage than good? :D
12:39 moritz garu: I don't know
12:39 moritz garu: it's not immediately obvious where the bug comes from, so I can't tell
12:40 garu then I guess the answer is no. no worries, I'm happy I could help spotting it anyway :)
12:41 masak what's codepoint 250? is there any non-ASCII in that camelia eval?
12:43 moritz masak: regex fú
12:43 moritz the ú isn't ASCII :-)
12:43 moritz .u ú
12:43 yoleaux U+00FA LATIN SMALL LETTER U WITH ACUTE [Ll] (ú)
12:48 masak geez, I gotta set up this term correctly...
12:50 timotimo masak: i more thought of https://www.youtube.com/watch?v=JT5AQIlmM0I when i mentioned the video that goes with it :)
12:50 timotimo it has a bit of the story from the series at the beginning, but it's super funny, too.
12:54 timotimo other favourites include "i'm not crying", "you don't have to be a prostitute", "carol brown", "frodo don't wear the ring", "mother uckers", and so many more :)
12:54 neuron joined #perl6
12:55 tonar joined #perl6
12:56 tonar bisect: :१x
12:56 bisectable6 tonar, For the given starting points (good=2015.12 bad=ec9e814), exit code on a ‘good’ revision is 1 (which is bad), bisecting with inverted logic
12:56 bisectable6 tonar, bisect log: https://gist.github.com/20bd​24e49edd56c97325efda0224876d
12:56 bisectable6 tonar, (2016-06-12) https://github.com/rakudo/rakudo/commit/054a54a
12:57 tonar committable6: 2016.04 :१x
12:57 committable6 tonar, ¦«2016.04»: ===SORRY!===␤Error encoding ASCII string: could not encode codepoint 2407 «exit code = 1»
12:57 tonar garu: ^ the fix for your thing is likely the same. (see commit from bisectable)
12:57 tonar s/same/similar/;
12:59 tonar And the docs for nqp ops are here: https://github.com/perl6/nqp/​blob/master/docs/ops.markdown
13:00 tonar You don't need the radix one, but maybe something or other :)
13:02 timotimo so what's RT #128306 exactly?
13:02 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=128306
13:02 timotimo thank you, synopsebot6
13:03 timotimo oh, does that mean the fix got b0rked in the mean time? then why did bisectable show that commit and not the one that b0rked it recently(ish)?
13:05 eliasr joined #perl6
13:07 tonar joined #perl6
13:07 melezhik https://github.com/perl6/doc/pull/876 - CATCH blocks and the following code
13:07 melezhik my vision of it
13:08 tonar timotimo: the 128306 is a resolved ticket. It had the same error as garu's issue, and thus its fix may be at least helpful to garu's desire to attempt to fix the bug.  Nothing got broken after it got fixed. I've used commitable robot to execute code on a pre-fix commit.
13:09 DrForr melezhik: Yay!
13:10 tonar melezhik: that's not accurate. The CATCH block can go anywhere in the block. It's the code after the thrown *exception* that will never get executed.
13:11 melezhik tonar: I see
13:11 tonar melezhik: you can put that CATCH and LEAVE right at the start of the block and effect would be nearly* the same (*the only difference is when they are at the very end, which affects block's return value)
13:12 melezhik "The CATCH block can go anywhere in the block" , what do you mean by <block> ? A some other block, like try { ... } ?
13:13 moritz the block outside of CATCH
13:13 melezhik ок, moritz: makes a sense now
13:14 tonar m: CATCH { default { 'sploops'.say } }; die "zomg!"; say 'we are OK'
13:14 camelia rakudo-moar a45202: OUTPUT«sploops␤»
13:14 melezhik I will probably adjust my patch soon
13:14 tonar m: CATCH { default { 'sploops'.say } }; say 'this still gets printed because it is before the exception thrown by die that follows'; die "zomg!"; say 'we are OK'
13:14 camelia rakudo-moar a45202: OUTPUT«this still gets printed because it is before the exception thrown by die that follows␤sploops␤»
13:15 timotimo tonar: you know a lot about stuff, but i never read your name before ... are you The Z? :P
13:15 tonar m: say 'this still gets printed because it is before the exception thrown by die that follows'; die "zomg!"; say 'we are OK'; CATCH { default { 'sploops'.say } };
13:15 camelia rakudo-moar a45202: OUTPUT«this still gets printed because it is before the exception thrown by die that follows␤sploops␤»
13:15 melezhik tonar: make a sense for me, will update my MR soon
13:15 tonar timotimo: Tthe Z? Never heard of her.
13:15 skids joined #perl6
13:15 tonar :)
13:19 cdg joined #perl6
13:20 MilkmanDan joined #perl6
13:23 girafe joined #perl6
13:26 itaipu joined #perl6
13:34 timotimo huh, this "Girls Who Code DSM" account apparently has only a single tweet and it's about perl6 ... strange
13:35 mst that's really weird, the DSM's only at version 5
13:37 timotimo what does DSM stand for in your context?
13:38 MilkmanDan joined #perl6
13:39 mst enwp.org/DSM_V
13:40 timotimo oh, that thing
13:40 timotimo as long as it doesn't classify perl 6 as a disorder ...
13:44 darutoko joined #perl6
13:46 jonadab joined #perl6
13:51 ugexe its spectrum now
13:51 timotimo Perl Spectrum Disorder?
13:51 mspo joined #perl6
13:51 timotimo could be either 5, or 6, or in some older patients, 4? :)
14:00 melezhik tonar: have just updated my MR - https://github.com/perl6/doc/pull/876/files
14:02 gfldex joined #perl6
14:06 MilkmanDan joined #perl6
14:06 timotimo melezhik: "upper block" instead of "outer block"?
14:08 melezhik yeah, outer is better name for this
14:08 Wiertek joined #perl6
14:10 tokomer joined #perl6
14:14 rindolf joined #perl6
14:14 bobv joined #perl6
14:15 MilkmanDan joined #perl6
14:23 woolfy joined #perl6
14:27 gfldex m: enum Options(<Foo Bar>); sub f(+@a where @a.all ~~ Options){ dd @a }; f(Foo, Bar);
14:27 camelia rakudo-moar a45202: OUTPUT«[Options::Foo, Options::Bar]␤»
14:27 melezhik s/upper/outer/
14:27 melezhik commited
14:30 lizmat melezhik: looks good to me, but I'm also a bit distracted  :-)
14:33 gfldex m: enum Options(<Foo Bar>); enum Options2(<Buzz>); sub f(+@a where @a.all ~~ (Options|Options2)){ dd @a }; f(Foo, Buzz);
14:33 camelia rakudo-moar a45202: OUTPUT«Constraint type check failed for parameter '@a'␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:33 gfldex m: enum Options(<Foo Bar>); enum Options2(<Buzz>); sub f(+@a where @a.all ~~ (Options,Options2).any){ dd @a }; f(Foo, Buzz);
14:33 camelia rakudo-moar a45202: OUTPUT«Constraint type check failed for parameter '@a'␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:33 gfldex i did expect that to work
14:34 melezhik lizmat: that's ok, so do I  ;-) , at my regular job ...
14:34 itaipu joined #perl6
14:36 gfldex i do not expect that to work anymore :)
14:36 gfldex m: enum Options(<Foo Bar>); enum Options2(<Buzz>); sub f(+@a where @a.any ~~ (Options,Options2).any){ dd @a }; f(Foo, Buzz);
14:36 camelia rakudo-moar a45202: OUTPUT«[Options::Foo, Options2::Buzz]␤»
14:37 gfldex that works but is wrong
14:38 gfldex how do I say "all members of LHS must be member of either of the members of RHS"?
14:41 khw joined #perl6
14:44 lizmat all(@lhs) (elem) any(@rhs) "?
14:45 gfldex m: enum Options(<Foo Bar>); enum Options2(<Buzz>); sub f(+@a where @a.all (elem) (Options,Options2).any){ dd @a }; f(Foo, Buzz);
14:45 camelia rakudo-moar a45202: OUTPUT«Constraint type check failed for parameter '@a'␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:46 AlexDaniel joined #perl6
14:46 lizmat gfldex: does it work outside of a where clause ?
14:47 gfldex m: enum Options(<Foo Bar>); enum Options2(<Buzz>); say (Foo, Buzz).all (elem) any(Options,Options2)
14:47 camelia rakudo-moar a45202: OUTPUT«all(any(False, False), any(False, False))␤»
14:47 gfldex m: enum Options(<Foo Bar>); enum Options2(<Buzz>); say (Foo, Buzz) (elem) any(Options,Options2)
14:47 camelia rakudo-moar a45202: OUTPUT«any(False, False)␤»
14:48 rindolf joined #perl6
14:51 zacts joined #perl6
14:52 gfldex m: enum Options(<Foo Bar>); enum Options2(<Buzz>); say all(Foo, Buzz) (elem) (Foo, Bar, Buzz)
14:52 camelia rakudo-moar a45202: OUTPUT«all(True, True)␤»
14:52 gfldex m: enum Options(<Foo Bar>); enum Options2(<Buzz>); say all(Foo, Buzz, 5) (elem) (Foo, Bar, Buzz)
14:52 camelia rakudo-moar a45202: OUTPUT«all(True, True, False)␤»
14:52 gfldex m: enum Options(<Foo Bar>); enum Options2(<Buzz>); say so all(Foo, Buzz, 5) (elem) (Foo, Bar, Buzz)
14:52 camelia rakudo-moar a45202: OUTPUT«False␤»
14:53 pmurias joined #perl6
14:53 pmurias nine: what's racoon?
14:54 lizmat pmurias: it's basically a module installer that can be included in the distribution itself
14:54 lizmat use case: install Inline::Perl5 without needing panda
14:55 gfldex m: enum Options(<Foo Bar>); enum Options2(<Buzz>); say Options (|) Options2;
14:55 camelia rakudo-moar a45202: OUTPUT«set((Options), (Options2))␤»
14:55 gfldex m: enum Options(<Foo Bar>); enum Options2(<Buzz>); say Options::.keys (|) Options2::.keys;
14:55 camelia rakudo-moar a45202: OUTPUT«set(Foo, Bar, Buzz)␤»
14:56 gfldex i would expect (|) on enums to return a union of enum keys (objects, not Str)
15:00 gfldex m: enum Options(<Foo Bar>); enum Options2(<Buzz>); say Options::.values (|) Options2::.values;
15:00 camelia rakudo-moar a45202: OUTPUT«set(Foo, Buzz, Bar)␤»
15:00 gfldex .values actually
15:03 Actualeyes joined #perl6
15:07 [Coke] .seen supernovus
15:07 yoleaux I saw supernovus 22 Apr 2016 23:27Z in #perl6: <supernovus> Well, I'm going to have to run. Have a great day/night everyone. I hope to fix up some of my long neglected libraries at some point when I'm not completely overloaded with work! :-)
15:08 mempko joined #perl6
15:15 darutoko joined #perl6
15:18 dalek doc: 66b49f8 | MasterDuke17++ | doc/Language/terms.pod6:
15:18 dalek doc: Add :123abc form to Pair description
15:18 dalek doc: review: https://github.com/perl6/doc/commit/66b49f8fbb
15:19 nine pmurias: a raccoon is like a panda but smaller :) It's meant as a bootstrapping and packaging tool. Cases where you don't need all the features that panda or zef provide. Most notably installation of dependencies.
15:22 b2gills It looks like the DSM in "Girls Who Code DSM" is short for Des Moines
15:37 pyrimidine joined #perl6
15:39 [Coke] is http::easy not async?
15:40 TimToady gfldex: please rakudobug that
15:41 lostinfog joined #perl6
15:43 TimToady m: enum Options <Foo Bar>; sub f(Foo $foo?){}; f(Foo);
15:43 camelia rakudo-moar a45202: ( no output )
15:43 TimToady m: enum Options <Foo Bar>; sub f(Foo() $foo?){}; f(0);
15:43 camelia rakudo-moar a45202: OUTPUT«Method 'Options' not found for invocant of class 'Int'␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:43 TimToady m: enum Options <Foo Bar>; sub f(Foo() $foo?){}; f();
15:43 camelia rakudo-moar a45202: OUTPUT«Method 'Options' not found for invocant of class 'Any'␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:43 TimToady that one, I mean
15:43 TimToady m: enum Options <Foo Bar>; sub f(Foo $foo?){}; f();
15:43 camelia rakudo-moar a45202: OUTPUT«Invocant requires an instance of type Int, but a type object was passed.  Did you forget a .new?␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:43 TimToady er, that one
15:45 gfldex TimToady: filed as #129160
15:45 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=129160
15:49 pmurias joined #perl6
15:49 [Coke] What's the Foo type there? only that specific enum value?
15:50 [Coke] m: sub f(3 $a) { $a }; say f(4); say f(3);
15:50 camelia rakudo-moar a45202: OUTPUT«Constraint type check failed for parameter '$a'␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:50 cibs joined #perl6
15:50 [Coke] m: sub f(3 $a) { $a }; say f(3);
15:50 camelia rakudo-moar a45202: OUTPUT«3␤»
15:50 [Coke] huh.
15:52 [Coke] specifying an instance value seems not entirely helpful, but ok.
15:52 [Coke] (moreso on multis, I suppose.)
15:52 TimToady m: sub f(3 $a?) { $a }; say f()
15:52 camelia rakudo-moar a45202: OUTPUT«Invocant requires an instance of type Int, but a type object was passed.  Did you forget a .new?␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:53 TimToady arguably it might not be a bug, but we should think about it
15:53 TimToady m: sub f(3 $a = 2) { $a }; say f()
15:53 camelia rakudo-moar a45202: OUTPUT«Constraint type check failed for parameter '$a'␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:54 [Coke] ... should I tag it RFC instead of BUG? ;)
15:54 TimToady yeah
15:54 lizmat TimToady: forgetting a comma: sub f(3 $a?) versus sub f(3,$a?) becomes an easy bug to miss ?
15:55 TimToady you take your chances in life...
15:55 lizmat true
15:55 TimToady sometimes missing commas blow up rockets
15:56 TimToady I mean, we could certainly require an absence of TTIAR inside siggies, but then you'd have to write sub f (Int & $x) {} or some such
15:56 TimToady so we've always gone with "implicit and" inside sigs
15:57 * [Coke] could use a sig today.
15:57 TimToady m: sub foo (Int 3 $x) {}
15:57 camelia rakudo-moar a45202: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤A parameter may only have one prefix type constraint␤at <tmp>:1␤------> 3sub foo (Int 37⏏5 $x) {}␤»
15:58 TimToady in the original design, that would just work
15:59 TimToady m: sub foo (Int Str $x) {say $x}; foo(<42>)
15:59 camelia rakudo-moar a45202: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤A parameter may only have one prefix type constraint␤at <tmp>:1␤------> 3sub foo (Int Str7⏏5 $x) {say $x}; foo(<42>)␤»
15:59 TimToady m: sub foo (IntStr $x) {say $x}; foo(<42>)
15:59 camelia rakudo-moar a45202: OUTPUT«42␤»
16:00 TimToady m: sub foo (Int $x where Str) {say $x}; foo(<42>)
16:00 camelia rakudo-moar a45202: OUTPUT«42␤»
16:00 TimToady we shoved most of that into the 'where' category
16:06 araujo_ joined #perl6
16:10 araujo__ joined #perl6
16:21 leont_ joined #perl6
16:21 khw joined #perl6
16:22 MilkmanDan joined #perl6
16:27 kyclark joined #perl6
16:28 kyclark I think I've asked this sort of thing several times, but how do I write a MAIN sig that requires a list of existing files? http://lpaste.net/182555
16:29 tofu_ joined #perl6
16:30 gfldex kyclark: where @files>>.f.all
16:30 gfldex (i think)
16:34 kyclark This seems to work: sub MAIN (*@files where all(@files) ~~ File) {
16:35 kyclark but the error message is unclear for the user "Constraint type check failed for parameter '@files'"
16:37 ilmari can types have custom error messages?
16:37 kyclark I can say "@files.grep(File)" to get files -- how can I negate the grep?
16:37 kyclark To get not-files?
16:38 timotimo m: sub test (*@a where (all(@a) ~~ Int or die "oh no!") { }; test (1, 2, 3); test (9, 9, "nine")
16:38 camelia rakudo-moar a45202: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unexpected block in infix position (missing statement control word before the expression?)␤at <tmp>:1␤------> 3a where (all(@a) ~~ Int or die "oh no!")7⏏5 { }; test (1, 2, 3); test (9, 9, "nine"␤…»
16:38 timotimo m: sub test (*@a where (all(@a) ~~ Int or die "oh no!")) { }; test (1, 2, 3); test (9, 9, "nine")
16:38 camelia rakudo-moar a45202: OUTPUT«oh no!␤  in sub test at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
16:38 timotimo kyclark: you can grep for (none(File))
16:39 kyclark Hecking sweet.
16:41 MilkmanDan joined #perl6
16:43 timotimo i wonder if we should introduce an optimized Junction for none of only one argument ...
16:44 gfldex kyclark: the open method will do the check and produce a proper error message for you. Working with file systems and assuming eagerness may provide you with surprises.
16:47 mempko joined #perl6
16:54 MilkmanDan joined #perl6
17:02 andrzejku joined #perl6
17:03 domidumont joined #perl6
17:06 gfldex kyclark: it's nice to provide absolute paths and check for dangling symlink (what does not work right now because of rakudobug) https://gist.github.com/gfldex/6​c6b1fc11ee6906627717d91e90702c3
17:09 firstdayonthejob joined #perl6
17:09 kyclark Right now I'm just doing "unless $file.IO.f" check in the loop.  Good enough?
17:10 gfldex you will get odd error messages, esp. for your audience who may never have heared of symlinks
17:11 gfldex kyclark: also that a file is there doesn't have to mean that you can read it. But .open should handle that case.
17:11 grondilu given a hash %h and an array such as my @abc = <a b c>, how do I access %h<a><b><c> ?
17:11 * gfldex goes to check
17:12 avuserow m: class Hats {has uint8 $.f;}; my $h = Hats.new; my uint8 $u = -1; $h.^attributes(:local)[0].set_value($h, $u); say $u; say $h.f
17:12 camelia rakudo-moar a45202: OUTPUT«255␤-1␤»
17:12 avuserow I would've expected both to be 255... any ideas here?
17:13 kyclark m: my %h = 'a'..'c' Z=> 1..*; say %h<a b c>.join(', ')
17:13 camelia rakudo-moar a45202: OUTPUT«1, 2, 3␤»
17:14 grondilu kyclark: nope, that's a slice.  I was refering to a nested structure.
17:14 wamba joined #perl6
17:14 kyclark Dang it, I thought I had the answer.  :-)
17:14 avuserow m: my %h = a => b => c => 4; my @path = <a b c>; my $a = %h; $a = $a{$_} for @path; say $a # grondilu
17:14 camelia rakudo-moar a45202: OUTPUT«4␤»
17:14 kyclark Mostly I do asking, so I got excited I might answer.
17:14 gfldex grondilu: see: https://github.com/gfldex/pe​rl6-rakudo-slippy-semilists
17:16 gfldex grondilu: also, expect slowness. You may be better of with stiching the key together by hand. But you have to be careful with your values in that case.
17:17 timotimo m: my %a; %a<a><b><c> = "hi"; my @l = <a b c>; say (%a, |@a).reduce(-> %a, $e { %a{$e} });
17:17 camelia rakudo-moar a45202: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '@a' is not declared. Did you mean '%a'?␤at <tmp>:1␤------> 3><c> = "hi"; my @l = <a b c>; say (%a, |7⏏5@a).reduce(-> %a, $e { %a{$e} });␤»
17:17 timotimo m: my %a; %a<a><b><c> = "hi"; my @l = <a b c>; say (%a, |@l).reduce(-> %a, $e { %a{$e} });
17:17 camelia rakudo-moar a45202: OUTPUT«hi␤»
17:17 masak m: constant %FOO = a => 1, b => 2, c => 3; say "OH HAI"
17:17 camelia rakudo-moar a45202: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Type check failed in constant declaration of %FOO; expected Associative but got List (List)␤at <tmp>:1␤------> 3constant %FOO = a => 1, b => 2, c => 37⏏5; say "OH HAI"␤    expecting any of:␤   …»
17:18 masak TimToady: why is it that `my %foo` works, but not `constant %FOO` in the above. feels to me it violates Least Surprise :)
17:18 timotimo m: my %a; %a<a><b><c> = "hi"; my @l = <a b c>; sub infix:<(HE)>(%a, $e) { %a{$e} }; say [(HE)] %a, |@l
17:18 camelia rakudo-moar a45202: OUTPUT«hi␤»
17:18 MasterDuke m: my %h; %h<a><b><c> = 1; my $a = %h; $a = $a{$_} for <a b c>; say $a
17:18 gfldex masak: IIRC constant got implicit binding
17:18 camelia rakudo-moar a45202: OUTPUT«1␤»
17:19 timotimo right, constants with sigils don't really work ATM
17:19 grondilu and as a lvalue?
17:19 gfldex grondilu: the module I linked should support lvalues
17:20 grondilu m: my %h; my $e = %h; $e := $e{$_} for <a b c>; $e := "foo"; say %h<a><b><c>;
17:20 camelia rakudo-moar a45202: OUTPUT«(Any)␤»
17:21 masak timotimo: "ATM"? so in the cuture, my eval above might not fail?
17:22 grondilu gfldex: I'll look into it.  Btw travis seems broken for this module.
17:23 gfldex m: my %h; say %h{'a';'b';'c'} = 1; dd %h; my $e := %h{'a';'b';'c'}; $e = 2; dd %h;
17:23 camelia rakudo-moar a45202: OUTPUT«(1)␤Hash %h = {:a(${:b(${:c(1)})})}␤Cannot assign to an immutable value␤  in block <unit> at <tmp> line 1␤␤»
17:26 shinobicl joined #perl6
17:26 gfldex grondilu: travis is fine, the readme was wrong
17:27 grondilu indeed, for some reason the travis logo did not show up I had to hard refresh.
17:28 gfldex i sneaked in and added one "s" twice
17:28 grondilu oh ok
17:29 grondilu I'm slightly confused, though.  If this postfix operator is specced why is it NYI and requires a module?
17:29 gfldex it's designed, not specced
17:30 grondilu also I said postfix but you describe it as postcircumfix and use is as a prefix.  Not sure what's going on.
17:30 gfldex i did add postcircumfix:<{; }>:exists to rakudo but failed for the other two
17:31 grondilu oh silly me
17:32 grondilu it's postcircumfix:<{|| }> not prefix:<||>
17:32 Ancient__ joined #perl6
17:32 gfldex techically it could be prefix:<||> if there would be a buildin type called SemiList (or somesuch)
17:32 gfldex with that it would become trivial to add it to rakudo
17:33 Ancient__ joined #perl6
17:33 timotimo masak: i have no clue :S
17:34 grondilu Have you considered making a SemiList module instead?
17:35 gfldex grondilu: it would need to go into 6.d anyways and it ain't no december yet
17:39 grondilu m: proto extract(%, $) {*}; multi extract(%h, Str $p) { %h{$p} }; multi extract(%h, Pair $p) { extract(%h{$p.key}, $p.value) };  (my %h)<a><b><c> = "foo!"; say extract(%h, [=>] <a b c>)
17:39 camelia rakudo-moar a45202: OUTPUT«foo!␤»
17:39 kyclark On one machine, I installed Perl 6 from Rakudo Star, so how do I build panda now?  On another machine, I used rakudobrew.
17:39 vendethiel joined #perl6
17:39 grondilu lol, I'm happy with that one.
17:40 gfldex kyclark: * comes with panda build in
17:40 grondilu maybe what we just need is define AT-KEY(Pair $)
17:40 grondilu Or make a lisp-style list role.
17:41 MilkmanDan joined #perl6
17:41 grondilu m: proto extract(%, $) is rw {*}; multi extract(%h, Str $p) { %h{$p} }; multi extract(%h, Pair $p) { extract(%h{$p.key}, $p.value) };  my %h; extract(%h, [=>] <a b c>) = "foo"; say %h<a><b><c>
17:41 camelia rakudo-moar a45202: OUTPUT«Type check failed in binding to <anon>; expected Associative but got Any (Any)␤  in sub extract at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
17:42 grondilu m: proto extract(%, $) is rw {*}; multi extract(%h, Str $p) { %h{$p} }; multi extract(%h, Pair $p) { extract(%h{$p.key}, $p.value) };  (my %h)<a><b><c> = Mu; extract(%h, [=>] <a b c>) = "foo"; say %h<a><b><c>
17:42 camelia rakudo-moar a45202: OUTPUT«Cannot modify an immutable Mu␤  in block <unit> at <tmp> line 1␤␤»
17:42 grondilu m: proto extract(%, $) is rw {*}; multi extract(%h, Str $p) { %h{$p} }; multi extract(%h, Pair $p) { extract(%h{$p.key}, $p.value) };  (my %h)<a><b><c> := "foo"; extract(%h, [=>] <a b c>) = "foo"; say %h<a><b><c>
17:42 camelia rakudo-moar a45202: OUTPUT«Cannot assign to a readonly variable or a value␤  in block <unit> at <tmp> line 1␤␤»
17:42 grondilu m: proto extract(%, $) is rw {*}; multi extract(%h, Str $p) { %h{$p} }; multi extract(%h, Pair $p) { extract(%h{$p.key}, $p.value) };  (my %h)<a><b><c> = "foo"; extract(%h, [=>] <a b c>) = "bar"; say %h<a><b><c>
17:42 camelia rakudo-moar a45202: OUTPUT«Cannot modify an immutable Str␤  in block <unit> at <tmp> line 1␤␤»
17:42 grondilu hum, lvalue is challenging
17:44 gfldex m: my %h; say %h{'a';'b';'c'} = (my $a = 1); dd %h; %h{'a';'b';'c'} = 2; dd %h
17:44 camelia rakudo-moar a45202: OUTPUT«(1)␤Hash %h = {:a(${:b(${:c(1)})})}␤Hash %h = {:a(${:b(${:c(2)})})}␤»
17:44 gfldex you need to assign a container
17:44 gfldex m: my %h; say %h{'a';'b';'c'} = (my $ = 1); dd %h; %h{'a';'b';'c'} = 2; dd %h
17:44 camelia rakudo-moar a45202: OUTPUT«(1)␤Hash %h = {:a(${:b(${:c(1)})})}␤Hash %h = {:a(${:b(${:c(2)})})}␤»
17:44 grondilu m: proto extract(%, $) is rw {*}; multi extract(%h, Str $p) { %h{$p} }; multi extract(%h, Pair $p) { extract(%h{$p.key}, $p.value) };  (my %h)<a><b><c> = my $ = "foo"; extract(%h, [=>] <a b c>) = "bar"; say %h<a><b><c>
17:45 camelia rakudo-moar a45202: OUTPUT«Cannot modify an immutable Str␤  in block <unit> at <tmp> line 1␤␤»
17:45 gfldex we don't need no stinkin' variable names ofc
17:45 grondilu m: proto extract(%, $) is rw {*}; multi extract(%h, Str $p) { %h{$p} }; multi extract(%h, Pair $p) { extract(%h{$p.key}, $p.value) };  (my %h)<a><b><c> := my $ = "foo"; extract(%h, [=>] <a b c>) = "bar"; say %h<a><b><c>
17:45 camelia rakudo-moar a45202: OUTPUT«Cannot assign to a readonly variable or a value␤  in block <unit> at <tmp> line 1␤␤»
17:46 gfldex m: my %h; %h{1} = 2; %h{1} = 3;
17:46 camelia rakudo-moar a45202: ( no output )
17:47 gfldex actually I vote for bug. It's a normal Hash even if it's keys are multidim. And Hash is not Map.
17:47 domidumont joined #perl6
17:48 * gfldex gets his rakudobug form
17:48 grondilu how would you golf it?
17:49 gfldex m: my %h; %h{1;2;3} = 1; %h{1;2;3} = 2;
17:49 camelia rakudo-moar a45202: ( no output )
17:50 Ven joined #perl6
17:50 grondilu that does not die, does it?
17:51 gfldex m: my %h; say %h{1;2} = 1; dd %h; my $e := %h{1;2}; $e = 2; dd %h;
17:51 camelia rakudo-moar a45202: OUTPUT«(1)␤Hash %h = {"1" => ${"2" => 1}}␤Cannot assign to an immutable value␤  in block <unit> at <tmp> line 1␤␤»
17:52 gfldex m: my %h; say %h{1} = 1; dd %h; my $e := %h{1}; $e = 2; dd %h;
17:52 camelia rakudo-moar a45202: OUTPUT«1␤Hash %h = {"1" => 1}␤Hash %h = {"1" => 2}␤»
17:53 grondilu ok, I see the issue better now
17:53 grondilu well, I don't want to be negative or anything, but that confirms what I say sometimes.
17:54 gfldex not well tested those multidim Hashs
17:54 grondilu "everytime I try to do something more or less serious in Perl 6, I encounter a bug"
17:54 gfldex i do encounter to but less and less these days
17:54 grondilu though "more or less serious" is not exactly what I mean.
17:55 grondilu I mean more like: "something that has a purpose per se, not just toying with the language".
17:56 gfldex that's how you find bugs in a compiler/language after all
17:56 grondilu I guess.
17:56 grondilu it might also be an observational biais.  I don't pay nearly as much attention when everything goes fine.
17:57 gfldex it took python 9 years to become useful, so we are well within the deadline :)
17:59 grondilu I use multidim hashes whenever I want to deal with a small database.  I tend to put it all in a single Hash, and then I encounter bugs like this.
18:00 grondilu so if multidim Hashes are not well tested, it may be LTA
18:01 * grondilu suddenly wonders if he really understand what a multidim Hash is.
18:01 gfldex it may be a very simple fix
18:01 dustinm` joined #perl6
18:01 gfldex it's a nested Hash (unless someone goes in with the big optimisation hammer)
18:02 grondilu ok, "nested Hash" is easier to understand for me.
18:02 gfldex but it autovivifies wrong. It binds to a value where it could copy the value into a new container and bind to that
18:02 kyclark Along those liines, I was playing yesterday with wanting a Hash of Arrays, e.g., %h{'key'} = <val1 val2 val3> and I was having a bear of a time figuring out how to get the list out of the hash.
18:03 grondilu should be straightforward.
18:04 grondilu m: (my %h)<key> = <a b>; say %h<key>.perl
18:04 camelia rakudo-moar a45202: OUTPUT«$("a", "b")␤»
18:04 grondilu not sure what's the issue.  Maybe you forgot to slip it?
18:04 grondilu m: (my %h)<key> = <a b>; say |%h<key>, 'c'
18:04 camelia rakudo-moar a45202: OUTPUT«abc␤»
18:05 grondilu m: (my %h)<key> = <a b>; d |%h<key>, 'c'
18:05 camelia rakudo-moar a45202: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    d used at line 1␤␤»
18:05 grondilu m: (my %h)<key> = <a b>; dd |%h<key>, 'c'
18:05 camelia rakudo-moar a45202: OUTPUT«"a"␤"b"␤"c"␤»
18:05 kyclark You can see my progress here: https://github.com/kyclark/metagenomics-b​ook/blob/master/perl6/kmers/assemble.pl6
18:05 gfldex m: my %h; %h.push: (a=>1); %h.push: (a=>2); dd %h;
18:05 camelia rakudo-moar a45202: OUTPUT«Hash %h = {:a($[1, 2])}␤»
18:06 kyclark m: my %h; %h{'key'} = <val1 val2 val3>; my @list = %h<key>; dd @list;
18:06 camelia rakudo-moar a45202: OUTPUT«Array @list = [("val1", "val2", "val3"),]␤»
18:06 kyclark vs my $list = %h<key>;
18:07 kyclark vs my @list = |%h<key>
18:07 gfldex m: my %h; %h{'key'} = <val1 val2 val3>; my $list = %h<key>; dd $list;
18:07 camelia rakudo-moar a45202: OUTPUT«List $list = $("val1", "val2", "val3")␤»
18:07 gfldex you assigned a list to an Array
18:07 gfldex likely not what you want
18:07 spider-mario joined #perl6
18:07 gfldex m: my %h; %h{'key'} = <val1 val2 val3>; my $list := %h<key>; dd $list;
18:07 camelia rakudo-moar a45202: OUTPUT«List %h = $("val1", "val2", "val3")␤»
18:08 kyclark Right, but I knew the value was a list-y/sequence-y/array-ish thing
18:08 gfldex also, as long as you don't want to change the Array, leave it a list and use binding
18:08 grondilu so, use brackets
18:08 grondilu [<val1 val2 val3>]
18:08 cygx joined #perl6
18:08 kyclark The differences seem very subtle to me, and I don't feel confident explaining them to beginners.
18:08 cygx m: my %h; %h{1;2} = 42; say %h{1;2}.VAR.WHAT # ???
18:08 camelia rakudo-moar a45202: OUTPUT«(List)␤»
18:09 grondilu tell them <val1 val2 val3> is like a tuple.
18:09 kyclark I thought about using %h.append to build up the hash, but when only one item exists, then it's just a Str
18:09 gfldex use .push with a Pair as argument
18:09 grondilu all the more reasons to use brackets
18:09 AndyBotwin joined #perl6
18:11 gfldex kyclark: to actually understand what is going on you need to know the difference between iterators and Arrays. One is behaviour the other is storage of data.
18:11 gfldex those are very different concepts
18:11 * grondilu nods
18:12 gfldex that is a problem with a Last Language ofc. You get problems with seamingly magic behaviour in the eye of the noob.
18:12 masak I disagree in principle.
18:13 masak "we're a last language" shouldn't be an excuse not to explain things in a simple way.
18:13 araujo joined #perl6
18:13 mspo if I had enough ram to compile rakudo I'd love to do a docs :)
18:15 jonadab joined #perl6
18:20 mcmillhj joined #perl6
18:21 jt__ joined #perl6
18:22 kyclark So this is interesting (to me):
18:22 kyclark m: my %h1; for <val1 val2 val3> -> $v { %h1<key>.push($v) }; say %h1<key>.WHAT
18:23 camelia rakudo-moar a45202: OUTPUT«(Array)␤»
18:23 kyclark When I build it up with "push" it's an Array, but when declared like this it's a List
18:23 kyclark m: my %h2; %h2{'key'} = <val1 val2 val3>; say %h2<key>.WHAT
18:23 camelia rakudo-moar a45202: OUTPUT«(List)␤»
18:23 kyclark Regardless, I can't do my @l1 = %h<key>;
18:24 geekosaur m: <val1 val2 val3>.WHAT.say
18:24 camelia rakudo-moar a45202: OUTPUT«(List)␤»
18:24 kyclark And I think what bothers me about that is that I would expect the context of the assignment to determine the shape of the data structure
18:24 domidumont joined #perl6
18:25 gfldex i would not because <a b c> is a List of Str values _literal_
18:25 gfldex the idea behind .push creating an Array container is that you will likely push more after pushing once
18:26 kyclark m: my @list = <a b c>; put @list.join(', ')
18:26 camelia rakudo-moar a45202: OUTPUT«a, b, c␤»
18:28 kyclark m: my $list = <a b c>; $list.join(', ')
18:28 camelia rakudo-moar a45202: ( no output )
18:28 kyclark m: my $list = <a b c>; put $list.join(', ')
18:28 camelia rakudo-moar a45202: OUTPUT«a, b, c␤»
18:28 kyclark Either way Perl seems to handle the list-y thing properly there.
18:29 geekosaur actually, the real reason is:
18:29 geekosaur m: my %h; %h<z> = <a b c>; %h<z>.push: 'd'; dd %h
18:29 camelia rakudo-moar a45202: OUTPUT«Cannot call 'push' on an immutable 'List'␤  in block <unit> at <tmp> line 1␤␤»
18:29 geekosaur Array is the mutable version of List
18:30 kyclark Either way I feel that assiging something list-y to a @list should do that without the "|" slip business. Just my opinion.
18:31 kyclark As someone trying to teach this to beginners, I'm trying to justify the extra syntax and understanding.
18:31 mcmillhj joined #perl6
18:32 kyclark m:  my $list = <a b c>; $list.push('d')
18:32 camelia rakudo-moar a45202: OUTPUT«Cannot call 'push' on an immutable 'List'␤  in block <unit> at <tmp> line 1␤␤»
18:32 kyclark m: my @list = <a b c>; @list.push('d')
18:32 camelia rakudo-moar a45202: ( no output )
18:32 gfldex it's actually easier to explain with Hash and Map. You want an enum to be constant (constant both for the "length"-part as of the value part), so you need a type that is Hashy but immutable.
18:33 kyclark m: my @list := <a b c>; @list.push('d')
18:33 camelia rakudo-moar a45202: OUTPUT«Cannot call 'push' on an immutable 'List'␤  in block <unit> at <tmp> line 1␤␤»
18:33 geekosaur m: my @list = <a b c>; @list.push('d'); dd @list
18:33 camelia rakudo-moar a45202: OUTPUT«Array @list = ["a", "b", "c", "d"]␤»
18:33 Actualeyes joined #perl6
18:33 geekosaur ihg right, @ doesn't itemize but $ does and the things *inside* a @ or % do
18:34 labster joined #perl6
18:34 gfldex listy immutability becomes very important when you program functional but explaining functional takes time (and footgun use on the side of the beginners)
18:36 kyclark I've taught Perl 5 to beginners many times.  I believe that the removal of sigil inflection (e.g., $list[0], $hash{'key'}) def makes it easier to understand that variables.  I was under the impression that @ would always mean "items in a series" and $ means "one thing" but that "one thing" can also be "items in a series" and so I'm a bit confused
18:36 smls joined #perl6
18:38 gfldex if you know what pointers are (if you come from C or C++) it makes sense very easily
18:38 cygx kyclark: @ talks about the array as a collection of objects, $ talks about the array itself as a single object
18:41 mcmillhj joined #perl6
18:41 kyclark m: say ["a", "b", "c"].WHAT
18:41 camelia rakudo-moar a45202: OUTPUT«(Array)␤»
18:41 kyclark m: say ("a", "b", "c").WHAT
18:41 camelia rakudo-moar a45202: OUTPUT«(List)␤»
18:41 kyclark m: my @list = ("a", "b", "c"); say @list.WHAT
18:41 camelia rakudo-moar a45202: OUTPUT«(Array)␤»
18:41 cygx assignment is copying, and @-variables default to Array
18:41 kyclark It's odd to me that "()" == List in one context and Array in another
18:42 cygx kyclark: see above ;)
18:42 kyclark Right, not trying to be dense.
18:42 kyclark But check this:
18:42 kyclark m: my @list = ["a", "b", "c"]; dd @list
18:42 camelia rakudo-moar a45202: OUTPUT«Array @list = ["a", "b", "c"]␤»
18:43 kyclark I would almost expect the data structure to be [[["a", "b", "c"]]
18:43 geekosaur it's still List in all contexts. it's assigning a List to a @-sigil that deconstructs the list and reconstitutes it as an Array
18:43 kyclark which is what I get when I try to copy the List out of the Hash
18:43 grondilu kyclark: single argument rule
18:43 grondilu m: dd my @ = [<foo bar>],
18:43 camelia rakudo-moar a45202: OUTPUT«Array @ = [["foo", "bar"],]␤»
18:44 grondilu add a comma if you want to bypass it
18:44 * grondilu is not sure about the spelling here :/
18:44 grondilu m: say <coma comma>.pick
18:44 camelia rakudo-moar a45202: OUTPUT«comma␤»
18:45 grondilu neh it's gotta be coma
18:45 gfldex m: my $a = <a b c>; my @a = <a b c>; put Q:a:s/$a @a/;
18:45 camelia rakudo-moar a45202: OUTPUT«a b c @a␤»
18:45 gfldex i'm pretty sure :a used to work
18:45 avuserow (it's spelled comma :P)
18:45 gfldex m: my $a = <a b c>; my @a = <a b c>; put Q:qq/$a @a/;
18:45 DrForr m: say <, , chameleon>
18:45 camelia rakudo-moar a45202: OUTPUT«a b c @a␤»
18:45 camelia rakudo-moar a45202: OUTPUT«(, , chameleon)␤»
18:45 AlexDaniel joined #perl6
18:54 perlawhirl joined #perl6
18:57 labster joined #perl6
18:57 cygx joined #perl6
18:57 itaipu joined #perl6
18:57 cygx left #perl6
18:58 perlawhirl kyclark: just reading backlog... i too was confused at first with listy things inside hashes.
18:58 awwaiid joined #perl6
18:58 perlawhirl the key to understanding them is the second sentence of the Hash doc: "The values are all scalar containers"
18:59 perlawhirl scalars are singular. if you want to iterate over the values as a list, you need to destructure it as so...
18:59 perlawhirl m: my %x; %x<foo> = [<bar baz qux>]; .say for %x<foo>; .say for %x<foo>.list
18:59 camelia rakudo-moar a45202: OUTPUT«[bar baz qux]␤bar␤baz␤qux␤»
19:02 mohae joined #perl6
19:03 [Coke] docs.perl6.org - doesn't say what qqx// does with out or err on the process.
19:05 mohae__ joined #perl6
19:09 TheLemonMan joined #perl6
19:11 bobv m: say $A::a;
19:12 camelia rakudo-moar a45202: OUTPUT«(Any)␤»
19:12 bobv say $a;
19:12 bobv m: say $a;
19:12 camelia rakudo-moar a45202: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$a' is not declared␤at <tmp>:1␤------> 3say 7⏏5$a;␤»
19:12 bobv Why does the $A::a seem to be a valid (though uninitialised) variable?
19:13 gfldex m: say A::a;
19:13 camelia rakudo-moar a45202: OUTPUT«Could not find symbol '&a'␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
19:14 bobv That looks fine.
19:38 shinobicl hi all
19:38 shinobicl is there an equivalent of Perl Dancer for Perl6 already? Something like a Dancer2?
19:42 geekosaur bailador?
19:43 Actualeyes joined #perl6
19:44 canopus joined #perl6
19:45 tadzik bailador is close
19:45 tadzik Prancer I think is also a Dancer clone, no?
19:45 tadzik bailador now has an active maintainer, unlike most of my other project s:P
19:46 TEttinger joined #perl6
19:57 [Coke] they aren't on #perl6, are they?
20:10 MasterDuke [Coke]: FYI, RT #117739 and RT #118607 can be closed/resolved
20:10 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=117739
20:10 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=118607
20:11 ugexe why doesnt perl6 have monotheic protonbeams yet?
20:14 MasterDuke and both are or were closed already, thanks all
20:15 harmil_wk ugexe: I would imagine it's because no one found a shark to mount them on...
20:21 mcmillhj joined #perl6
20:22 zakharyas joined #perl6
20:22 grondilu m: say "foo-bar" ~~ /<ident>+/
20:22 camelia rakudo-moar a45202: OUTPUT«「foo」␤ ident => 「foo」␤»
20:23 * grondilu thought '-' was in ident
20:23 masak no, it's in <identifier>
20:24 masak token identifier { <.ident> [ <.apostrophe> <.ident> ]* }
20:25 grondilu ok, good to know
20:26 grondilu but can't I use it?
20:26 grondilu m: say "foo-bar" ~~ /<identifier>/
20:26 camelia rakudo-moar a45202: OUTPUT«Method 'identifier' not found for invocant of class 'Cursor'␤  in block <unit> at <tmp> line 1␤␤»
20:29 mr-foobar joined #perl6
20:31 El_Che for the people that do the releases, please check https://github.com/nxadm/rakudo-pkg (with the result packages here: http://claudio.ulyssis.be/perl6/ ). The idea is to create native Linux packages with docker (no VMs or dangling local sources).
20:32 skids .oO(packaging wheel-shoulderers++)
20:32 mcmillhj joined #perl6
20:33 TheLemonMan hmm, do twigils in signature parameters make any sense ?
20:34 El_Che well, nine wasn't happy with rakudobrew for non core devs, and we need to keep nine happy :)
20:36 El_Che TheLemonMan: you mean for this: https://docs.perl6.org/type/Signatur​e#Optional_and_Mandatory_Parameters
20:36 TheLemonMan El_Che, nope, the '!' and '.' twigils
20:37 geekosaur the problems with rakudobrew are: (1) every so often it gets confused and you have to toss its repos and start over (2) it gets you WIP stuff that isn't ready for end users yet
20:37 El_Che TheLemonMan: yes, I thought so. But what usage do you have in mind
20:38 aries_liuxueyang joined #perl6
20:39 El_Che geekosaur: yeah, I agree. But packaging is painful, hence the docker-fpm compromise. However, it would be good to know what's expected/needed so they are used on the rakudo site. Otherwise, the packages will not be discoverable.
20:40 El_Che An advanced user can use it to create his/her own packages of course, maar the end products is not the pkg creation tools, but the packages themselves
20:41 skids TheLemonMan: Yes, they are used in BUILD all the time to bind directly to attributes.
20:42 TheLemonMan skids, can you point me to a place where they're used ?
20:42 El_Che TheLemonMan: https://docs.perl6.org/langua​ge/classtut#index-entry-BUILD
20:42 setty1 joined #perl6
20:42 skids Unfortunately, there's also RT#125437 regarding them.
20:42 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=125437
20:48 mcmillhj joined #perl6
20:54 * [Coke] is amused by: https://boingboing.net/2016/08/31/​puke-i-am-your-phava-code-th.html
20:59 MilkmanDan joined #perl6
20:59 itaipu joined #perl6
21:02 grondilu m: "foo" ~~ /$<name> = <.ident>++/; (my %){$<name>}
21:02 camelia rakudo-moar a45202: ( no output )
21:02 grondilu m: "foo" ~~ /$<name> = <.ident>++/; (my %){$<name>}<bar>
21:02 camelia rakudo-moar a45202: OUTPUT«Type List does not support associative indexing.␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
21:02 grondilu m: "foo" ~~ /$<name> = <.ident>++/; (my %){~$<name>}<bar>
21:02 camelia rakudo-moar a45202: ( no output )
21:02 grondilu not sure why I have to enfore string conversion here
21:04 grondilu m: "foo" ~~ /$<name> = <.ident>+/; (my %){~$<name>}<bar>
21:04 camelia rakudo-moar a45202: ( no output )
21:04 grondilu m: "foo" ~~ /$<name> = <.ident>+/; (my %){$<name>}<bar>
21:04 camelia rakudo-moar a45202: OUTPUT«Type List does not support associative indexing.␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
21:04 grondilu m: "foo" ~~ /$<name> = [<.ident>+]/; (my %){$<name>}<bar>
21:04 camelia rakudo-moar a45202: ( no output )
21:05 grondilu meh
21:05 mcmillhj joined #perl6
21:05 cdg joined #perl6
21:06 cdg joined #perl6
21:07 [Coke] is the complaint that you have to the string conversion instead of {} doing it for you automatically?
21:08 [Coke] to *do
21:11 Zoffix joined #perl6
21:12 Zoffix El_Che, what about that repo?
21:12 Zoffix El_Che, or re-phrased... what do you want me to do?
21:13 El_Che Zoffix: hi, I would like to know what's needed to put native packages on the download link
21:13 leont_ joined #perl6
21:13 El_Che So beginners have a more accessible option than building from source
21:15 El_Che (at least on Linux)
21:16 itaipu joined #perl6
21:16 kyclark perlawhirl, that helps immensely!  Thanks.
21:17 kyclark Sorry was in class.
21:18 El_Che Zoffix: the idea is to create an infra to easily build packages.
21:18 Zoffix El_Che, can all of them be built on debian?
21:18 El_Che Zoffix: yes
21:19 El_Che it just used dockers, it will run on any 64-bit host
21:20 Zoffix I'm currently working on automating the entire Rakudo release process. I would guess creating those packages can be just part of it. And we can upload them to http://rakudo.org/downloads/ ... say in `pre-built-packages` dir
21:20 Zoffix well, the release bot would upload them there
21:21 El_Che as long as the download links are deterministic (as they are now) it should be a full automated process
21:21 Zoffix \o/
21:21 Zoffix Cool. I bookmarked that repo and will look at it closer when I have fewer beers in my hand :P
21:22 El_Che we need to make sure they are tested before putting them for the first time on the webpage. So far, "they work for me"
21:22 El_Che :)
21:22 ItayAlmog joined #perl6
21:24 SmokeMachine____ :)
21:24 El_Che have fun with the beers, and ping me to change whatever needed
21:25 Zoffix will do
21:27 Actualeyes joined #perl6
21:29 mohae joined #perl6
21:30 bstamour joined #perl6
21:31 bstamour Hi everyone, I'm having issues installing the module DOM::Tiny using panda.
21:31 bstamour It downloads fine, passes all tests, but afterward, I am receiving the following message
21:31 bstamour "Failed to open file /home/bryan/.panda-work/147​2764873_1/lib/DOM/Tiny.pm: no such file or directory"
21:32 bstamour I created the .panda-work directory manually, and re-ran panda install DOM::Tiny
21:32 SmokeMachine____ hi! what means "Error while importing from 'JSON::Schema': no such tag 'qwer'" ?
21:32 bstamour But to no avail. In fact, the directory I created was removed as well. Has anyone else experienced this kind of issue?
21:33 Zoffix bstamour, it got broken META file. Once sec
21:33 SmokeMachine____ Im running: use JSON::Schema :qwer<asdf>;
21:33 bstamour Zoffix: thanks.
21:34 Zoffix bstamour, cd $(mktemp -d); git clone https://github.com/zoffixznet/p6-DOM-Tiny; git checkout patch-1; panda install .
21:34 SmokeMachine____ hum!!! it thinks thats something like :ver<>, right?!
21:34 Zoffix bstamour, I sent a PR to get it fixed, but unsure when it'll get merged: https://github.com/zostay/p6-DOM-Tiny/pull/1
21:35 SmokeMachine____ so, I can't use a sub EXPORTER(*%pars){...} ?
21:35 SmokeMachine____ sub EXPORT(*%pars){...}
21:36 zostay Looking now 😊
21:36 Zoffix \o/
21:36 bstamour Zoffix: so far so good. Running tests.
21:36 zostay Merged
21:37 bstamour :-)
21:37 El_Che wow, that's what I call service
21:37 Zoffix :)
21:38 zostay Perfect timing. Just say down at the lappy after coming back from my kiddos guitar lessons.
21:38 bstamour zostay: does that mean I'll be able to panda install it directly now?
21:38 bstamour i.e. panda install DOM::Tiny
21:38 Zoffix bstamour, should be able to, yeah
21:38 zostay If that's all that was broke, yes
21:38 bstamour okay. Testing now. Thanks for the quick help everyone.
21:38 zostay If it doesn't just go, let me know and I can fix it
21:38 * Zoffix namedrops Test::META to avoid such issues :D
21:38 bstamour Will do.
21:39 zostay I need dzil or something for p6 to automate that stuff. I suck at mundane tasks that computers should do for me.
21:40 * Zoffix nods
21:40 zostay But yeah, I've messed up my metas pretty consistently
21:42 bstamour worked like a charm
21:42 bstamour one more round of thanks.
21:42 bstamour :-)
21:43 Zoffix \o/
21:45 Zoffix SmokeMachine____, IME no. I've looked at https://docs.perl6.org/language/modules#EXPORT_ and I see sentence "Whereas UNIT::EXPORT packages deal with the named parameters passed to use," but I've not explored that further
21:45 espadrine_ joined #perl6
21:46 zostay bstamour: let me know of any bugs, it's still pretty new and relatively untested
21:47 SmokeMachine____ hum! thats it! thanks Zoffix!
21:49 MilkmanDan joined #perl6
21:51 n1lp7r joined #perl6
21:55 bjz joined #perl6
21:59 bjz joined #perl6
22:00 mcmillhj joined #perl6
22:00 Sgeo joined #perl6
22:13 bjz joined #perl6
22:13 john51 joined #perl6
22:13 cdg joined #perl6
22:15 Sgeo joined #perl6
22:16 MasterDuke joined #perl6
22:18 mcmillhj joined #perl6
22:18 bisectable6 joined #perl6
22:19 firstdayonthejob joined #perl6
22:24 raydiak :q
22:24 yoleaux 14 Aug 2016 21:57Z <grondilu> raydiak: https://github.com/raydiak/Math-Symbolic/issues/3
22:25 pierre_ joined #perl6
22:30 daedalus_ joined #perl6
22:30 mcmillhj joined #perl6
22:30 Zoffix left #perl6
22:31 MorayJ joined #perl6
22:36 mcmillhj joined #perl6
22:36 felher joined #perl6
22:44 cpage_ joined #perl6
22:48 bjz joined #perl6
22:49 mcmillhj joined #perl6
22:58 skids joined #perl6
23:03 timotimo oh lord, the cat is holding my hand against his head with both his paws
23:06 cpage_ joined #perl6
23:11 TEttinger good kitty
23:13 sufrostico joined #perl6
23:16 mcmillhj joined #perl6
23:22 labster joined #perl6
23:27 mcmillhj joined #perl6
23:41 mcmillhj joined #perl6
23:53 mcmillhj joined #perl6
23:57 jonadab joined #perl6

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

Perl 6 | Reference Documentation | Rakudo