»ö« 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 TimToady joined 00:21 Chillance left 00:24 awwaiid left 00:25 cyphase left 00:29 cyphase joined 00:31 holyghost joined 00:36 Todd_ joined 00:37 bjz joined
Todd_ Hi Everyone. I need to ask a question about zef. I am about to install a module with it. Is there a way to tell zef I want the module stored in the universal location and not some user's profile? 00:37
Actaully, how do I tell the zef creator I also want zef stored globally? 00:39
00:39 margeas left 00:42 Cabanossi left, yqt left, wamba left, kurahaupo_ joined 00:43 Cabanossi joined
Todd_ okay, I jsut did a global find on zef and removed everything. Then reinstalled zef and it when into /usr/lib64/perl6/site/bin which makes me happy. 00:44
00:44 kurahaupo left 00:47 rjbs- is now known as rjbs
Todd_ `ln -s /usr/lib64/perl6/site/bin/zef /usr/bin/zef` helps too 00:48
00:49 holyghost left 00:52 holyghost joined
Todd_ just out of curiousity, where would I download Net::SMTP from? 00:56
00:57 bjz_ joined 00:58 kyan left, bjz left
Todd_ foudn it: github.com/jpve/perl6-net-pcap 00:59
00:59 Actualeyes joined
Todd_ oops: github.com/retupmoca/P6-Net-SMTP 00:59
01:00 Ven joined 01:01 Ven left
Todd_ zef put Net::SMTP into `/home/linuxutil/P6-Net-SMTP/lib/Net` How do I fix this? 01:07
01:11 kyan joined
Todd_ well, my program now runs without whining, so it must have been insalled somewhere else too 01:11
Bye bye
01:11 Todd_ left 01:36 holyghost left 01:42 holyghost joined 01:45 ilbot3 left 01:48 ilbot3 joined, ChanServ sets mode: +v ilbot3 01:53 espadrine left
zostay Zoffix: in this case they'd be the same, I just find it curious that I'm allowed to create an Array[Pair] filled with Str through the use of » 01:56
02:04 zapwai left 02:06 holyghost left, noganex joined 02:09 noganex_ left 02:17 bjz_ left 02:24 bisectable6 left 02:26 Cabanossi left 02:28 Cabanossi joined 02:36 bisectable6 joined, ChanServ sets mode: +v bisectable6 02:38 kyan left 02:57 Cabanossi left 02:58 Cabanossi joined 03:01 kyan joined, sufrostico left 03:06 kurahaupo_ is now known as kurahaupo, mr-foobar left, mr-fooba_ joined 03:09 mcmillhj_ joined, mcmillhj joined 03:14 mcmillhj left, mcmillhj_ left 03:20 cpage_ left 03:25 Cabanossi left 03:27 Cabanossi joined 03:28 mcmillhj joined 03:33 mcmillhj left 03:42 mcmillhj joined, mcmillhj_ joined 03:47 mcmillhj_ left, mcmillhj left
ugexe lol... over the course of an hour, and 10 straight messages to himself, he solved all his own problems 03:47
AlexDaniel ugexe: rubber duck debugging done right 03:50
03:54 AlexDaniel left 03:55 Cabanossi left 03:57 Cabanossi joined 04:01 mcmillhj joined, mcmillhj_ joined 04:02 bjz joined 04:06 mcmillhj left, cpage_ joined, mcmillhj_ left 04:17 mcmillhj joined 04:22 mcmillhj left 04:29 xtreak joined 04:33 araujo left 04:44 mcmillhj joined 04:47 leedo joined 04:48 mcmillhj left 04:53 xtreak left, CIAvash joined 04:56 Cabanossi left 04:57 mcafee joined, Cabanossi joined 05:05 bjz left 05:06 labster left 05:08 bjz joined 05:10 mcafee left 05:15 xtreak joined 05:29 cbk joined 05:37 bjz left 05:45 skids left 05:49 skids joined 06:16 leah2 left 06:19 wamba joined 06:20 xiaomiao left 06:26 Cabanossi left 06:27 Cabanossi joined 06:29 skids left 06:38 xiaomiao joined, bjz joined 06:43 parv joined 06:58 wamba left 07:11 bjz left 07:13 setty1 joined 07:16 bjz joined 07:23 Sgeo_ joined 07:26 Sgeo left 07:55 avalenn left 08:01 darutoko joined 08:15 labster joined 08:16 xtreak left 08:21 xtreak joined 08:29 bjz left 08:48 bjz joined 08:54 dct joined 09:07 rindolf joined 09:09 Rawriful joined 09:10 dct left 09:20 bjz left 09:22 CIAvash left 09:25 margeas joined, Cabanossi left 09:27 Cabanossi joined 09:28 bjz joined 09:31 parv left 09:35 wamba joined 09:39 lowbro left 09:45 xtreak left 09:46 xtreak joined 09:48 robertle joined
tbrowder hi #perl6 10:23
lizmat tbrowder o/ 10:25
tbrowder i think the docs need a new entry under Language, called something like Core Modules, that lists modules included with Perl 6. they probably should also be listed in modules.perl6.org. opinions? hi, lizmat! 10:26
10:27 brrt joined, TEttinger left
lizmat tbrowder: re CORE Modules, seems like a good idea 10:27
re modules.perl6.org listing: not so sure 10:28
tbrowder yeah, i keep wasting time looking for Pod::To::Text...
10:28 lichtkind left
tbrowder and forgetting it is in rakudo 10:29
lizmat well, maybe that *should* live as a module, similarly to TAP.pm6 perhaps ?
tbrowder hm, sounds good to me. 10:31
which of the core modules really need to be in core? 10:33
perl 5 over the years has moved out some core modules 10:34
lizmat well, I think the list that can be moved is actually pretty small 10:35
tbrowder anyhoo, that's probably something for another time...i'll try to add a doc chunk later 10:37
10:37 Ven joined 10:38 Ven is now known as Guest55917
nadim Hi all. FYI: Just noticed that Panda is still referenced in INSTALL.txt 10:39
tbrowder hi, nadim, good catch, PR 10:40
10:41 Cabanossi left 10:42 Cabanossi joined
lizmat nadim tbrowder: fixed it 10:44
10:47 Guest55917 left, Ven_ joined
nadim I also noticed that p6 --version gives this: This is Rakudo version 2017.04.3-303-gabc0509, the commit is 20 mn old (thanks lizmat) and the build is 5 mn old but the date 2017.04.03 is comming from ... well I don 10:47
I don't know where 10:48
lizmat because we had 4 .point release on 2017.04 ?
10:52 Ven_ left 10:54 Ven_ joined 10:59 Ven_ left 11:01 Ven_ joined 11:05 Ven_ left 11:07 Ven_ joined 11:08 Chillance joined 11:11 kyan left 11:13 labster left 11:18 AlexDaniel joined 11:20 Ven_ left, xtreak left 11:21 Ven_ joined, xtreak joined 11:22 xtreak left 11:25 xtreak joined 11:26 Ven_ left
robertle tony-o: travis works for my branch of pluggable, so I guess you just need to enable it and it would work for yours as well. also forgot to mention that the README.md is now a rendering of the pod 11:26
11:41 avalenn joined 11:42 xtreak left, xtreak joined 11:53 brrt left 11:54 tokomer left, Cabanossi left 11:57 Cabanossi joined
tbrowder lizmat: i have a doc entry almost ready, but i notice all the core modules under rakudo/lib have a pm6 extension *except* CompUnit/Repository/Staging.pm (probably because it is used so much by zef). 11:58
12:00 Ven joined, Zoffix joined, Ven is now known as Guest16010
Zoffix tbrowder: don't add TAP.pm to the list. It'll be removed after today's release 12:01
12:01 eyck left
tbrowder roger! 12:01
12:14 Guest16010 left 12:29 nebuchadnezzar joined 12:34 xtreak left 12:38 eyck joined 12:44 eyck left 12:59 nebuchadnezzar left 13:05 Ven joined 13:06 Ven is now known as Guest87036 13:08 nebuchadnezzar joined 13:13 Zoffix left 13:15 eyck joined 13:17 aborazmeh joined, aborazmeh left, aborazmeh joined
lizmat If you're in the Oslo area: blogs.perl.org/users/damian_conway/...-perl.html 13:24
13:24 eyck left
lizmat your chance to see Damian in action! 13:24
13:25 Cabanossi left
lizmat although at a price and it's not about Perl 6 13:26
:-(
13:27 Cabanossi joined 13:30 bjz_ joined 13:31 bjz left 13:32 eyck joined
Geth doc: tbrowder++ created pull request #1316:
add new doc with list of core modules
13:33
13:33 setty1 left 13:35 kaare_ left 13:42 eyck left 13:43 bpmedley joined
lizmat tbrowder: seems to be missing some empty lines between =items ? 13:45
also: I would say "Used by installers such as zef" instead of "Used by zef" 13:46
tbrowder hm, i'll check. i tried to build the docs locally but have a pod-bigpage failure with rakudo n 13:47
a recent rakudo nom 13:48
13:53 brrt joined, brrt left, nadim left, nadim joined 13:54 aborazmeh left
tbrowder lizmat: see if that's better 13:57
lizmat tbrowder: looks good 13:58
re CompUnit/Repository/Staging.pm being a .pm rather than a .pm6
feels to me this is an oversight rather than an intentional thing
nine ugexe tony-o: opinions ^^^ ?
Geth doc: 28df7e46e6 | (Tom Browder)++ | doc/Language/modules-core.pod6
add new doc with list of core modules
13:59
doc: 396e0d8304 | (Tom Browder)++ | doc/Language/modules-core.pod6
remove blank lines, mod comment per lizmat
doc: 06bf3a92de | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/modules-core.pod6
Merge pull request #1316 from tbrowder/core-mod

add new doc with list of core modules
nine tbrowder: CompUnit::Repository::Staging is _not_ for zef. It's for installing modules into a staging area and moving them into their final position later on, i.e. creating distro packages. 14:01
14:01 eyck joined
nine lizmat: yes, I'm just still not used to using .pm6 as extension :) 14:02
lizmat ok, propose we change that after the release :-)
tbrowder nine: so it should be listed under internal modules then?? 14:03
lizmat tbrowder: no, it's about .pm vs .pm6 14:04
nadim not using .pm6 either, maybe I should change alll the modules I have while I have so few. do we have a P6 syntax for vim somewhere? 14:05
tbrowder i was referring to nine's comment about the use of compunit...staging
should i move it to the list of internal-use modules? 14:06
MasterDuke nadim: i think it's built-in to recent versions of vim now 14:08
yoleaux 10:47Z <brrt> MasterDuke: i'll look into it
tbrowder i'll remove the use comment anyway...
nadim can someone have a look at travis,yml at github.com/nkh/P6-Data-Dump-Tree and tell me if they see something obviously wrong?
tbrowder change panda to zef 14:09
nadim ok
what would be the exact config? still need a "rekudobrew something" in the yaml file? 14:11
I mean: how does Zef get installed?
14:15 awwaiid joined
Geth doc: tbrowder++ created pull request #1317:
correct comment
14:16
doc: a99ec90956 | (Tom Browder)++ | doc/Language/modules-core.pod6
correct comment
14:17
doc: b81b16aa0d | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/modules-core.pod6
Merge pull request #1317 from tbrowder/mod-core-fix

correct comment
tbrowder nadim: "rakudobrew build-zef\nzef installdeps ." 14:20
with "-" in front of each line
nadim: sorry, last line i use is "- zef install --depsonly ." 14:21
14:23 yqt joined
tbrowder www.irccloud.com/pastebin/mMJhB4yA/ 14:23
14:24 committable6 left, committable6 joined, ChanServ sets mode: +v committable6
tbrowder ref my doc change: ugly! working on it... 14:25
14:28 zapwai joined
Geth doc: tbrowder++ created pull request #1318:
correct head tags, add subtitle
14:30
doc: fc26eb614b | (Tom Browder)++ | doc/Language/modules-core.pod6
correct head tags, add subtitle
doc: a55dd8ebf6 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/modules-core.pod6
Merge pull request #1318 from tbrowder/mdoc-fix

correct head tags, add subtitle
doc: tbrowder++ created pull request #1319:
correct links
14:36
doc: 56e2701dfb | (Tom Browder)++ | doc/Language/modules-core.pod6
correct links
doc: 9e5d047f27 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/modules-core.pod6
Merge pull request #1319 from tbrowder/mdoc-fix2

correct links
14:45 kyan joined 14:49 khw joined
ugexe lizmat: I think that module used to live in src/ (not lib/) where the convention is .pm 14:58
n/m too late 14:59
15:10 Guest87036 left 15:15 bjz_ left
nadim I have an object that does a few roles, the roles are added in different places, later I get the object and want to know if it does a specific role; How do get that information? 15:24
ah! .does 15:25
15:28 setty1 joined
moritz nadim: or you could just do smart matching 15:28
against the role 15:29
m: role R1 { }; role R2 { }; (({} does R1) does R2) ~~ R1
camelia ( no output )
moritz m: role R1 { }; role R2 { }; say (({} does R1) does R2) ~~ R1
camelia True
moritz m: role R1 { }; role R2 { }; say (({} does R1) does R2) ~~ R2
camelia True
moritz m: role R1 { }; role R2 { }; role R3 { }; say (({} does R1) does R2) ~~ R3
camelia False
15:31 astj joined
nadim right! it looks better but I had to use 'can' instead. the base class needs a role to implement a specific method and there are multiple roles that could implement it, including roles that the end user could define 15:33
15:34 skids joined 15:35 astj left
ugexe fwiw there is some instance where I ended up reaching for .^find_method instead of .^can 15:36
so if .^can doesn't do what you want in some instance try .^find_method just to see 15:37
15:38 bjz joined 15:39 NeuralAnomaly left 15:40 Cabanossi left 15:42 Cabanossi joined 15:44 NeuralAnomaly joined, ChanServ sets mode: +v NeuralAnomaly 15:50 bjz left
nadim ugexe: good to know but I didn't use .^can but .can, there is no difference as long as a role doe not implement 'can' I guess 15:52
15:52 zapwai left
Geth doc: 56613a1de7 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/modules-core.pod6
Clarify Test.pm6

  - Link to testing page
  - Not all modules use Test.pm6 for testing (viva la Testo.pm6!)
15:52
15:57 grumble left 15:58 grumble joined 16:06 kaare_ joined 16:12 araraloren joined
araraloren hi 16:12
How can I use a github repo branch as a source-url in MATE6 file 16:13
If anybody know how to, please tell me. 16:15
16:18 haxmeister left 16:19 wamba left 16:20 NeuralAnomaly left, NeuralAnomaly joined, ChanServ sets mode: +v NeuralAnomaly
Geth doc: tbrowder++ created pull request #1320:
make a single list and don't speculate about use
16:20
doc: 2798c8d5ba | (Tom Browder)++ | doc/Language/modules-core.pod6
make a single list and don't speculate about use
16:21
doc: 31993dc019 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/modules-core.pod6
Merge pull request #1320 from tbrowder/mdoc-fix3

make a single list and don't speculate about use
tbrowder araraloren: I recommend you refer to a release instead of a branch. That will look something like this: "source-url" : "github.com/tbrowder/Text-More-Perl....1.4.zip", 16:26
16:30 zakharyas joined 16:33 NeuralAnomaly left, xiaomiao left 16:36 NeuralAnomaly joined, ChanServ sets mode: +v NeuralAnomaly 16:39 mingdao joined 16:40 xiaomiao joined, Cabanossi left, NeuralAnomaly left, kaare__ joined 16:41 NeuralAnomaly joined, ChanServ sets mode: +v NeuralAnomaly 16:42 Cabanossi joined, kaare_ left 16:45 esh_ is now known as esh 16:54 avalenn left 16:56 avalenn joined 16:58 NeuralAnomaly left 16:59 NeuralAnomaly joined, ChanServ sets mode: +v NeuralAnomaly 17:02 zakharyas left 17:03 zakharyas joined
Geth modules.perl6.org: f0dbaed8e9 | (Tom Browder)++ (committed using GitHub Web editor) | templates/root/index.html.ep
add ref to new core module list
17:07
17:11 Zoffix joined
Zoffix araraloren: I think ugexe++ was going to add a helper unzip script to zef so that `unzip` command is not required. So then the Issue I opened wouldn't matter 17:12
araraloren: OR, upload to CPAN. zef now defaults to it, as I understand
araraloren: and I see Inline::Perl5 links in ecosystem like this: github.com/perl6/ecosystem/blob/ma....list#L277 and look at the source URL... A CPAN dist: raw.githubusercontent.com/niner/In...META6.json 17:14
17:14 tokomer joined
Zoffix araraloren: and to upload to cpan... I think mi6 now has support, or you can do it manually on PAUSE's site: pause.perl.org/pause/query 17:15
buggable: eco mi6
buggable Zoffix, App::Mi6 'minimal authoring tool for Perl6': github.com/skaji/mi6
Zoffix &
17:15 Zoffix left
araraloren tbrowder, Yeah, I use that format, current in my module 17:18
.tell Zoffix Em, thanks, I'll look at `upload to CPAN` 17:22
yoleaux araraloren: I'll pass your message to Zoffix.
araraloren Maybe better change `zip` to `.tar.gz`. 17:26
17:31 leah2_ joined, leah2_ is now known as leah2 17:36 astj joined
tbrowder ugexe recommends zip version release for cross-platform use 17:37
ugexe tbrowder: eh Zoffix proved me wrong when his linux dist didnt have a way to unzip 17:38
tbrowder well he needs to add zip package to it 17:39
ugexe the same can be said from the other side
tbrowder we linux peops are much more forgiving than msw
ugexe .tar.gz should be cross platform enough. just not on windows without perl5 in PATH 17:40
17:40 astj left
tbrowder so do we now need two source url entries? 17:41
araraloren Use a zip module as backend would be better. It's reliable than zip command.
nadim not using .pm6 either, maybe I should change alll the modules I have while I have so few. do we have a P6 syntax for vim somewhere? pretend it is not installed even if it is? 17:43
17:44 Actualeyes left
araraloren Vim has a perl5 syntax hightlight 17:44
perl6
s/perl5/perl6/ 17:45
17:45 lowbro joined, lowbro left, lowbro joined
tbrowder ahem, at some point it seems to me we need some kind of module check for minimum requirements before a module can be entered into the ecosystem. there are new entries without any functionality at all--basically a skeleton WIP. 17:45
nadim thanks araraloren, the message above is garbage, half an old question and half a new one. typo of the day :)
araraloren oh 17:46
nadim is it possible to tell prove to "not find a module" even if it is installed? I want to test as if Term::ANSIColors wasn't there without modifying 50 tests. 17:51
17:56 Cabanossi left, domidumont joined 17:57 Cabanossi joined 18:02 domidumont left, domidumont joined
moritz nadim: are you doing the conditional loading in the tests, or in the code you're testing? 18:16
18:24 AlexDani` joined 18:25 AlexDani` is now known as AlexDaniel` 18:27 AlexDaniel left
moritz twitter.com/nogoodnickleft/status/...7455987712 # if you're not on twitter, you can register your vote here as well :-) 18:29
18:29 AlexDaniel` is now known as AlexDaniel 18:32 brrt joined
MasterDuke moritz: 1,3,2 (ranked order of preference) 18:35
moritz MasterDuke: thanks 18:36
mst 1 (I did vote), because the other two I think I can grok from the reference docs 18:40
moritz I wonder if a Perl 6 version of "Mastering Regular Expressions" is in order 18:46
does anybody here know Jeffrey Friedl personally, and would be willing to introduce me to him? 18:49
MasterDuke i love that book. one of the only two reference/programming books i've read cover-to-cover (the other being programming perl)
moritz I love it too, and regularly recommend it 18:51
he, so far there are 8 responses, and the percentages are 75, 13, 12 18:54
rounding in action, I suppose :-)
mst oh dear 18:55
18:56 Cabanossi left, tokomer left 18:57 Cabanossi joined
moritz I've actually written code that does similarly horrible rounding 18:58
exporting invoice data to the finacial accounting system, breaking it down into cost centers 18:59
and it's super important that the book entries sum up to the total on the invoice, but much less important if one of the cost centres is a cent off 19:00
if the rounding error is 0.01, I can just put it on "misc", but -0.01 isn't acceptable, so I have add that randomly to one of the other cost centers 19:01
19:03 wamba joined 19:05 TEttinger joined
tbrowder moritz: +1 for 1 19:06
19:08 zakharyas left, haxmeister joined 19:09 domidumont left
haxmeister Thank you all for Perl 6.. my new favorite language. it is truly next level! 19:10
AlexDaniel \o/
moritz you're welcome (on behalf of #perl6) :-)
19:12 espadrine joined
haxmeister \o/ :-D 19:12
chaining functions with dot notation is my new favorite syntax to abuse :-D 19:14
AlexDaniel abuse it is :) 19:20
haxmeister well that is what many people secretly love about perl right?.. all that syntactic sugar that we can abuse in our own scripts.. you know those scripts we keep for ourselves and hopefully never show to anybody else 19:22
19:22 labster joined
moritz or not so secretly :-) 19:24
mst I'm pretty much ok with the idea that perls are expressive, and that gives you the potential to write both extremely readable and extremely unreadable code 19:26
haxmeister I tend to lean towards the "wth is that?" readability rating lol 19:27
sometimes the "why did you do it like that?" zone as well 19:28
19:35 brrt left 19:41 Cabanossi left 19:42 Cabanossi joined 19:48 darutoko left, zakharyas joined 19:49 yqt left
Geth ecosystem: e2d465c489 | loren++ (committed using GitHub Web editor) | META.list
Update Getopt::Kinoko to v0.3.5
19:52
20:12 dct joined 20:28 brrt joined 20:30 brrt left 20:35 AndyDee joined, zapwai joined 20:39 Cabanossi left 20:42 Cabanossi joined 20:48 espadrine left
Voldenet the thing I'll ask now is very evil, but I'll ask anyway 21:05
can you run perl6 with python interpreter?
jnthn Haven't heard of a bridge in that direction, no. You can via Inline::Python use python modules from Perl 6, though (which works by embedding a Python interpreter). :) 21:07
21:09 rindolf left 21:13 imcsk8 left 21:21 imcsk8 joined
nadim moritz: I want to make sure Term::ANSIColor is not loaded during tests as the module generates a different output when it is found. 21:23
jnthn nadim: Does it do a runtime require of it? 21:25
(Guarded with try?) 21:26
It's not an especially "clever" solution, but I'd probably just env var it.
(Have an env var that, if set, causes the require to not be attempted) 21:27
Another potential (though utter hack) option is to have a t/hack/Term/ANSIColor.pm6 that simply dies upon being loaded and the -It/hack so it takes precedence and hides the real one 21:28
21:41 Cabanossi left, setty1 left 21:42 Cabanossi joined
nadim what is returned whn qx is given a command that does not exist? 21:47
It may be explained in the documentation but not where qx is documented
and do we have a way to detect terminal width in windows (I guess windows is also a target) on unix (and so far by default) I use stty. 21:49
21:51 zakharyas left 21:52 bjz joined 21:56 kotp joined 22:07 dct left 22:20 TEttinger left, TEttinger joined 22:30 lowbro left 22:36 astj joined 22:39 wamba left, Zoffix joined
Zoffix nadim: appears to return an empty string on my box. For terminal width, see Terminal::Width (it's used by Test::Notice if you wanted to see usage) 22:40
buggable: eco Terminal::Width
buggable Zoffix, Terminal::Width 'Get the current width of the terminal': github.com/zoffixznet/perl6-Terminal-Width
22:41 Cabanossi left, astj left 22:42 Cabanossi joined
Geth doc: 1d548f13a2 | (Trey Harris)++ | doc/Language/glossary.pod6
Glossary: add 'Value type' entry

The term "value type" is thrown around a few other places in the docs, so this is an attempt to explain it in terms not requiring much CS theory.
22:43
22:48 Zoffix left 22:51 mcmillhj_ joined, mcmillhj joined 23:03 Alikzus_ left 23:04 Ven joined, Ven is now known as Guest81488 23:05 kurahaupo_ joined
tbrowder can someone give a ref to some guidance on unpacking a pod object? i can extract a pod object from a file, but it is an array and doesn't seem amenable to breaking it down to individual pod objects. do i need to test each piece t 23:06
forget the last partial sentence 23:07
23:08 nadim left 23:09 kurahaupo left 23:15 Rawriful left 23:27 mcmillhj_ left, mcmillhj left 23:38 mcmillhj joined, mcmillhj_ joined 23:41 mawkish__ joined 23:42 kyan left 23:43 mcmillhj_ left, mcmillhj left 23:45 Chillance left 23:49 mscha joined
mscha How do I return two separate lists from a sub? 23:49
m: sub foo { my @a = (1,2,3); my @b = <a b c>; return @a, @b; }; my (@a, @b) = foo; say "a = @a[]; b = @b[]"; # Not like this, apparently
camelia a = 1 2 3 a b c; b =
23:50 mawkish__ left 23:51 margeas left 23:52 mcmillhj joined, mcmillhj_ joined
AlexDaniel mscha: well, yes, that's how you return two arrays :) 23:53
m: sub foo { my @a = (1,2,3); my @b = <a b c>; return @a, @b; }; dd foo
camelia ([1, 2, 3], ["a", "b", "c"])
AlexDaniel but do you get them out… hmmm 23:54
how*
23:55 bjz_ joined
AlexDaniel m: sub foo { my @a = 1,2,3; my @b = <a b c>; return @a, @b; }; my (@a; @b) = flat foo; dd @a; dd @b 23:56
camelia Array @a = [1, 2, 3, "a", "b", "c"]
Array @b = []
23:56 bjz left
AlexDaniel oops 23:56
well, that's too flat…
timotimo sooo 23:57
i moved house toda
today
i.e. my bed and my desk and computer
and i'll sleep here tonight
and there's two cats
i'll sleep a night in a cat household for the first time <3 23:58
AlexDaniel timotimo: if cats are arrays, and you have a list of cats, how do you put them into @a and @b ?
timotimo huh, i meant to write this in a different channel 23:59
i should maybe put on my glasses for computer use
no matter
AlexDaniel m: sub foo { my @a = 1,2,3; my @b = <a b c>; return @a, @b; }; my ($a, $b) = foo; dd $a; dd $b
camelia Array $a = $[1, 2, 3]
Array $b = $["a", "b", "c"]
AlexDaniel that's one way to do it, but what if I insist on @a and @b?