Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-11-11

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:01 BenGoldberg joined #perl6
00:08 Geth ¦ doc: 50d18c2da2 | (Jeremy Studer)++ | 9 files
00:08 Geth ¦ doc: Modified examples with hashes to use %() hash literal syntax
00:08 Geth ¦ doc:
00:08 Geth ¦ doc: Modified section in syntax file to replace instances of the { }
00:08 Geth ¦ doc: operator with the preferred hash literal constructor %(). Documentation
00:08 Geth ¦ doc: of the { } is still in doc/Type/Hash.pod6.
00:08 Geth ¦ doc:
00:08 Geth ¦ doc: Modified existing examples to use the %() hash literal as mentioned in
00:08 Geth ¦ doc: Issue #1380.
00:08 Geth ¦ doc: review: https://github.com/perl6/doc/commit/50d18c2da2
00:15 comborico1611 Pong
00:36 steeznson joined #perl6
00:37 steeznson could anyone tell me what I would write to get a regex that matches any combination of upper/lowercase letters, numbers and whitespace? so far I have <[^a..zA..Z0..9_]> but i think i'm missing something
00:39 MasterDuke steeznson: just ASCII? or unicode letters and numbers also?
00:39 steeznson just ascii at the moment
00:40 MasterDuke https://docs.perl6.org/language/regexes#Backslashed,_predefined_character_classes has some documentation on predefined classes, it's probably best to use some combination of those
00:41 steeznson thanks, i have been reading the docs but they explain a lot very quickly
00:42 steeznson i'll give them another go
00:42 jstuder You can also use Unicode properties as well
00:42 jstuder https://docs.perl6.org/language/regexes#Unicode_properties
00:42 MasterDuke why do you have the '^' in your character class?
00:43 MasterDuke looks like you're missing space, tab, and newline, depending on your definition of whitespace of course
00:45 steeznson the '^' was just a force of habit from writing regexes in html. thanks I'll try adding in '\s' for whitespace.
00:45 TEttinger there are unicode categories for letters and numbers, but the unicode category for whitespace is really lacking; \s works much better so you're good there
00:46 ryn1x joined #perl6
00:46 steeznson 'a..z' matches any combination of lowercase letter, right?
00:46 TEttinger in some English text
00:47 steeznson ok just making sure i wasn't totally off the mark
00:47 TEttinger English, Indonesian, Malay, and a rather small amount of other languages
00:47 TEttinger Hawaiian it won't match ' , which is a letter there
00:48 TEttinger in English it also won't get "He's a good dog."
00:48 jstuder <[L]> matches both uppercase and lowercase I believe, if you want to go the Unicode properties route.
00:50 steeznson i'm consistently amazed by the language support in p6. i think it's safe to say it's been future proofed for non-latin origin characters.
00:50 steeznson ah i'll give <[L]> a bash then
00:52 jstuder yeah it's pretty impressive stuff
00:52 jstuder perl6: my $rx = rx{<[L] + [N] + [\s\t\n] + [_]>}; say so "\n\t Hello 123 \n";
00:52 camelia rakudo-jvm a92950fb4: OUTPUT: «Error while reading '/home/camelia/p6eval-token': No such file or directory at /home/camelia/rakudo-j-inst/bin/eval-client.pl line 10.␤»
00:52 camelia ..rakudo-moar d6f1077d6: OUTPUT: «True␤»
00:53 steeznson i've read that perl directly accesses unicode characters instead of iterating through a library of them but I'm not sure if I understand how unicode can be baked into the language,
00:53 steeznson jstuder: thanks that looks useful
00:54 comborico1611 Anyone having a Friday night perl6 pizza party?
00:55 jstuder not a bad idea ;)
00:56 steeznson comborico1611: having a solitary Friday night perl6 programming party. i maybe slightly foolhardily decided to do a project on perl for uni.
00:57 comborico1611 I wish there was a perl live stream where i could tune-in as i study on weekend nights.
00:57 comborico1611 Reading a perl book, here.
00:57 MasterDuke steeznson: samcv would know better, but i believe several large tables are created when building MoarVM and it gets baked in that way (i.e., the build process generates C code that gets compiled into MoarVM)
00:59 steeznson MasterDuke: sounds interesting, i'll have to ask him next time i'm lurking on this channel
00:59 ryn1x joined #perl6
01:00 MasterDuke steeznson: fyi, samcv is a her
01:00 steeznson ah sorry, sam is a gender neutral name so i gambled and lost
01:01 MasterDuke if you're really want to get into the details, she gave two presentations at (i think) the Amsterdam Perl conference that are on youtube
01:02 raiph joined #perl6
01:03 steeznson sure i've got time to check them out. which conference day is it?
01:03 MasterDuke about unicode and how perl 6 implements things
01:03 MasterDuke couldn't say, i wasn't there
01:03 samcv hey steeznson i'm here
01:04 steeznson nvm found it. it's 'Unicode Internals of Perl 6'
01:04 samcv slides are here if you want as well https://cry.nu/YAPC-EU-2017/
01:05 cdg joined #perl6
01:06 steeznson hi sam, thanks for the slides! i'll let you know if i've got any burning questions after checking out your talk
01:07 comborico1611 I was going to have a campfire today. But the time just wasn't right.
01:07 samcv steeznson: cool thanks
01:08 comborico1611 Actually, now that I remember earlier better, I was attempting to start the fire. I was starting the fire from just a spark. And the Tinder bundle must have been still moist from a previous rain.
01:10 comborico1611 Is there any reason to use a "for" instead of "given", in a switch statement?
01:12 geekosaur it'd just be compressing for and given together for a switch in a loop: for @foo { when ... }   instead of     for @foo -> $tmp { given $tmp { ... }}
01:12 geekosaur remember, all given does is bind $_ to something
01:13 comborico1611 I see. Thank you.
01:13 geekosaur if yoiu have something else that can bind $_ for you, you can skip the given
01:13 comborico1611 I see.
01:14 jstuder perl6: my $rx = rx{<:L + :N + [\s\t\n]>+}; "\n Hello 123 \t \n" ~~ $rx
01:14 camelia rakudo-moar d6f1077d6: ( no output )
01:14 camelia ..rakudo-jvm a92950fb4: OUTPUT: «Error while reading '/home/camelia/p6eval-token': No such file or directory at /home/camelia/rakudo-j-inst/bin/eval-client.pl line 10.␤»
01:14 jstuder perl6: my $rx = rx{<:L + :N + [\s\t\n]>+}; say "\n Hello 123 \t \n" ~~ $rx
01:14 camelia rakudo-moar d6f1077d6: OUTPUT: «「␤ Hello 123     ␤」␤»
01:14 camelia ..rakudo-jvm a92950fb4: OUTPUT: «Error while reading '/home/camelia/p6eval-token': No such file or directory at /home/camelia/rakudo-j-inst/bin/eval-client.pl line 10.␤»
01:15 jstuder steeznson: the regex code I used earlier was totally incorrect; You'd want something more like above. Sorry for the mistake.
01:15 steeznson jstuder: thanks, i've been playing with it in the interactive shell and wondering what was going on
01:16 jstuder steeznson: yeah I goofed. but the example above should work okay
01:16 steeznson it's working now on my end
01:18 MasterDuke comborico1611: for vs given could also completely change the behavior
01:18 MasterDuke m: sub f($a) { if $a < 0 { <a b c> } else { "hi" } }; given f(-1) { when Iterable { say "iterable" }; when Str { say "str" } }
01:18 camelia rakudo-moar d6f1077d6: OUTPUT: «iterable␤»
01:18 MasterDuke m: sub f($a) { if $a < 0 { <a b c> } else { "hi" } }; given f(1) { when Iterable { say "iterable" }; when Str { say "str" } }
01:18 camelia rakudo-moar d6f1077d6: OUTPUT: «str␤»
01:18 MasterDuke m: sub f($a) { if $a < 0 { <a b c> } else { "hi" } }; for f(-1) { when Iterable { say "iterable" }; when Str { say "str" } }
01:18 camelia rakudo-moar d6f1077d6: OUTPUT: «str␤str␤str␤»
01:18 MasterDuke m: sub f($a) { if $a < 0 { <a b c> } else { "hi" } }; for f(1) { when Iterable { say "iterable" }; when Str { say "str" } }
01:18 camelia rakudo-moar d6f1077d6: OUTPUT: «str␤»
01:20 parv joined #perl6
01:20 aborazmeh joined #perl6
01:20 aborazmeh joined #perl6
01:21 comborico1611 Ahh, right. The matching process stopping on the first condition, versus "for" continues to end of list. Right?
01:22 comborico1611 So give
01:22 geekosaur for iterates an iterable, given doesn't, so if you given an iterable then you are matching against that
01:23 comborico1611 Hmm.
01:24 steeznson samcv: that presentation was interesting. i think i've got a better grasp of what's going on now. unfortunately it's 01:30 here in the UK so i'm a little too tired to ask an intelligent follow up question!
01:24 samcv also there are some documentation in moarvm
01:24 samcv https://github.com/MoarVM/MoarVM/blob/master/docs/strings.asciidoc
01:24 samcv i'd read this that i wrote as well
01:25 steeznson sure i'll check it out
01:26 espadrine joined #perl6
01:31 steeznson thanks for all the advice and resources everyone! going to head to bed
01:32 comborico1611 Will named parameters always be accompanied with the colon in a subroutine definition?
01:33 comborico1611 In the*
01:33 samcv comborico1611: i believe so
01:34 samcv or you could do sub foo (:var($var)) but idk why you'd do that
01:35 comborico1611 Heh. I'm not even sure what your doing.
01:35 comborico1611 You're*
01:35 samcv or you could do :var($variable) so supplynig the var option gets set to $variable
01:36 samcv if you want the option name and the resulting variable to be different. but they always have :
01:36 samcv and by default named arguments are optional
01:36 comborico1611 I thank you for your response. I will continue now with the book.
01:41 * HoboWithAShotgun watches a React tutorial.
01:41 perigrin joined #perl6
01:42 HoboWithAShotgun really clever idea with the virtual dom
01:43 comborico1611 Remember when Half-Life 2 came out?
01:44 MasterDuke great game
01:46 ryn1x joined #perl6
01:46 kalkin-- joined #perl6
01:47 comborico1611 The game couldn't live-up to the house
01:47 comborico1611 Hype*
01:49 aindilis joined #perl6
01:49 MasterDuke joined #perl6
01:49 HoboWithAShotgun whoa, hold right there cowboy
01:49 perigrin that's because Black Mesa is no Aperature Science
01:49 HoboWithAShotgun make holocaust jokes all you want, but there are lines
01:50 comborico1611 Haha. You're funny.
01:50 HoboWithAShotgun i'm not funny. i'm different.
01:51 jstuder left #perl6
01:51 comborico1611 Halo vs half life 2... Single player.  Hmm.
01:52 comborico1611 Yeah, half life 2. So it's the best single player game I've played. But the hype was ridiculous. Especially when you were like 17 years old, like i was.
01:56 comborico1611 Half-Life 2 got the vehicles wrong, too.  Too clunky.  Now driving the warthog was an art.
01:57 mempko joined #perl6
01:59 dugword joined #perl6
02:01 comborico1611 m: sub my-sum( $first-num, *@rest) { say @rest; return $first-num + [+] @rest; }; say my-sum 1, 3, 4, 5, 12, 17;
02:01 camelia rakudo-moar d6f1077d6: OUTPUT: «[3 4 5 12 17]␤42␤»
02:02 comborico1611 What is the [+] doing?
02:03 ugexe reduace { $^a + $^b } @rest
02:03 ugexe reduce
02:04 MasterDuke_ joined #perl6
02:05 ugexe m: my @rest = 1..5; say [+] @rest; say reduce { $^a + $^b }, @rest
02:05 camelia rakudo-moar d6f1077d6: OUTPUT: «15␤15␤»
02:05 ugexe m: my @rest = 1..5; say [*] @rest; say reduce { $^a * $^b }, @rest
02:05 camelia rakudo-moar d6f1077d6: OUTPUT: «120␤120␤»
02:06 comborico1611 Hmm. Is this the same reduce? https://docs.perl6.org/routine/reduce
02:08 ugexe what does your gut tell you?
02:09 comborico1611 Yes.
02:10 asdf23456 joined #perl6
02:12 comborico1611 Found it. Reduction operators.
02:12 kaare_ joined #perl6
02:19 ryn1x joined #perl6
02:23 comborico1611 Goodnight, all! Thanks for the help!
02:37 itaylor57 joined #perl6
02:56 ilbot3 joined #perl6
02:56 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!
02:56 ryn1x joined #perl6
03:07 wamba joined #perl6
03:08 Cabanossi joined #perl6
03:08 SmokeMachine does anyone know any thing that could make `prove -r -e "perl6 -Ilib" t` works but `zef test .` don't?
03:09 ugexe try prove -r -e "perl6 -I." t
03:10 SmokeMachine couldn't find my modules...
03:10 ugexe it is not setup as a proper package via META6.json sounds like
03:10 SmokeMachine https://www.irccloud.com/pastebin/6zreVjWR/
03:11 ryn1x joined #perl6
03:12 cdg joined #perl6
03:14 ugexe you aren't declaring anything in your provides
03:17 SmokeMachine yes, Im not...
03:17 noganex_ joined #perl6
03:18 SmokeMachine now I did... `prove -r -e "perl6 -I." t` now works... but `zef test .` don't...
03:18 ryn1x joined #perl6
03:22 SmokeMachine https://www.irccloud.com/pastebin/XEYY00I2/
03:24 ZzZombo m: my @a=<asd bsd>;say await @a.map({start {.tc.say;.uc}})
03:24 camelia rakudo-moar d6f1077d6: OUTPUT: «Asd␤Bsd␤(ASD BSD)␤»
03:24 ZzZombo Why would acode similar to this sometimes execute code for one element twice, while not running for the other at all?
03:25 SmokeMachine ugexe: it says that all 17 and 32 tests passed but on Test Summary it says that no test ran...
03:27 ugexe SmokeMachine: try again with each of these combo of flags `--/tap-harness --/perl6-test`, `--/tap-harness --/prove`, `--/prove --/perl6-test`
03:27 ufobat_ joined #perl6
03:27 ugexe seems like its that tap harness6  on not blead rakudo bug
03:28 SmokeMachine https://www.irccloud.com/pastebin/pGZN4YSG/
03:28 ugexe what is your rakudo version?
03:29 SmokeMachine https://www.irccloud.com/pastebin/N2FxSI6T/
03:29 SmokeMachine https://www.irccloud.com/pastebin/jW4PxTp1/
03:29 ugexe if you update one or both of rakudo and TAP::Harness, I think it will fix your issue
03:30 SmokeMachine https://www.irccloud.com/pastebin/NnsWlsYb/
03:30 MasterDuke_ m: my @a=<asd bsd>; my @b; await Promise.allof(@b = @a.map({start {.tc.say;.uc}})); say @b>>.result
03:30 camelia rakudo-moar d6f1077d6: OUTPUT: «Asd␤Bsd␤[ASD BSD]␤»
03:30 MasterDuke_ ZzZombo: does ^^^ work better for you?
03:37 ZzZombo No
03:59 ZzZombo shit, why it no work? It's just... impossible?
04:03 ryn1x joined #perl6
04:06 Cabanossi joined #perl6
04:06 ZzZombo m: my @a=<asd bsd>;say await @a.race.map({start {.tc.say;.uc}})
04:06 camelia rakudo-moar d6f1077d6: OUTPUT: «Asd␤Bsd␤(ASD BSD)␤»
04:07 ZzZombo even adding this doesn't fix it.
04:08 ZzZombo Even tho it seems like it greatly reduces the chance of such occurrence, but it's still possible.
04:08 ZzZombo Maybe just a lucky string of events.
04:12 TreyHarris joined #perl6
04:14 ryn1x joined #perl6
04:14 labster joined #perl6
04:14 labster raheze
04:14 labster ^ misfire
04:31 Cabanossi joined #perl6
04:35 ryn1x joined #perl6
04:54 ZzZombo Hm, my code is similar to a piece from https://perl6advent.wordpress.com/2013/12/14/asynchronous-programming-promises-and-channels/:
04:54 ZzZombo my @quotes = await @currency_exchanges.map(-> $ex { start { $ex.get_quote($val) } });
04:54 ZzZombo So I guess it signals a bug?
04:55 wamba joined #perl6
04:58 ryn1x joined #perl6
05:03 ugexe sounds like $ex isn't thread safe
05:05 ZzZombo ugexe: so what can I do? All examples I've seen are similar to that code. IDK how to rewrite it.
05:07 ugexe where is code for method get_quote ?
05:07 ZzZombo Loot at the link, it's from there.
05:07 ZzZombo Not mine.
05:07 ugexe it doesnt work
05:09 ugexe ok so that isn't even an example of the code causing the problem
05:10 ugexe e.g. you are not running any code with a method get_quote
05:11 ugexe this is not enough information to make any suggestion
05:12 ZzZombo https://gist.github.com/ZzZombo/e78cad56722eda7f9fe8f40b33ad6bb5
05:13 ugexe do you know if those files cannot be written to by another thread somewhere else?
05:14 ZzZombo nothing else is accesses them.
05:14 ZzZombo -is
05:15 ugexe still not enough information. need entire code path of code inside start { }
05:16 ZzZombo well, you are out of luck, it involves a grammar that parses files. Then, why do you even think its files to blame? My debug output (the line with "Parsing...") clearly shows it parses same file twice.
05:18 napo1eon joined #perl6
05:18 Cabanossi joined #perl6
05:19 ugexe clearly hash access is not thread safe and yet you are doing it
05:20 ugexe so even if it is not what is wrong in this specific case that is why I am questioning your code anyway
05:22 Ben_Goldberg joined #perl6
05:27 ryn1x joined #perl6
05:27 ugexe @sources.race.map({ start { # i'm not sure what this is trying to do
05:29 dugword joined #perl6
05:39 mcmillhj joined #perl6
05:43 cdg joined #perl6
05:46 ryn1x joined #perl6
06:00 mempko joined #perl6
06:02 sftp joined #perl6
06:16 ryn1x joined #perl6
06:22 ryn1x joined #perl6
06:31 philomath joined #perl6
06:33 Cabanossi joined #perl6
06:39 ryu0 joined #perl6
06:39 ryu0 i noticed perl6 seems to be able to identify undefined references at compile time instead of run time. does it always do this? i thought dynamic typed languages usually deferred resolving references until then.
06:47 cpage_ joined #perl6
06:54 ryn1x joined #perl6
06:59 darutoko joined #perl6
07:03 Cabanossi joined #perl6
07:12 aborazmeh joined #perl6
07:12 aborazmeh joined #perl6
07:17 ryn1x joined #perl6
07:18 wamba joined #perl6
07:30 aindilis joined #perl6
07:32 parv joined #perl6
07:38 Cabanossi joined #perl6
07:39 mcmillhj joined #perl6
07:59 mcmillhj joined #perl6
08:04 ryn1x joined #perl6
08:16 mcmillhj joined #perl6
08:18 wamba joined #perl6
08:31 rindolf joined #perl6
08:32 philomath joined #perl6
08:35 domidumont joined #perl6
08:36 ryn1x joined #perl6
08:43 domidumont joined #perl6
09:08 Cabanossi joined #perl6
09:12 setty1 joined #perl6
09:15 ryn1x joined #perl6
09:47 moritz ryu0: Perl 6 resolves lexical symbols at compile time
09:48 moritz ryu0: but for example dynamic variables and package-scoped symbols are resolved at run time
09:48 mcmillhj joined #perl6
10:02 sena_kun joined #perl6
10:04 nadim joined #perl6
10:15 philomath joined #perl6
10:23 ShalokShalom joined #perl6
10:23 ryn1x joined #perl6
10:23 Cabanossi joined #perl6
10:30 mr-foobar joined #perl6
10:32 wander if i want to modify a class.pm6 file, which methods/subs should stay the same?
10:33 wander that is because I find in a `unit class ...` file, many methods/subs not have trait `is export`
10:34 wander can i assume use outside will never use them? for subs i think yes, but how about methods
10:36 geospeck joined #perl6
10:37 dugword joined #perl6
10:40 ZzZombo What is the canonical way of checking a set doesn't contain ANY of provided elements? All?
10:43 yqt joined #perl6
10:49 wander m: my @a = [1,2,3,4,5]; my Set $b = Set([6,7,8,9,0]); say so any(@a.map(* (elem) $b))
10:49 camelia rakudo-moar d6f1077d6: OUTPUT: «False␤»
10:49 wander not quite elegant
10:51 moritz any($a) (elem) $b I'd guess
10:51 wander any(@a) == any($b)
10:51 moritz none($a) (elem) $b even
10:51 wander m: my @a = [1,2,3,4,5]; my Set $b = Set([6,7,8,9,0]); say any(@a) == any($b)
10:51 camelia rakudo-moar d6f1077d6: OUTPUT: «any(any(False), any(False), any(False), any(False), any(True))␤»
10:52 moritz m: m: my @a = [1,2,3,4,5]; my Set $b = Set([6,7,8,9,0]); say so none(@a) (elem) $b
10:52 camelia rakudo-moar d6f1077d6: OUTPUT: «True␤»
10:52 moritz m: m: my @a = [1,2,3,4,5, 6]; my Set $b = Set([6,7,8,9,0]); say so none(@a) (elem) $b
10:52 camelia rakudo-moar d6f1077d6: OUTPUT: «False␤»
10:52 wander m: my @a = [1,2,3,4,5]; my Set $b = Set([6,7,8,9,0]); say so any(@a) == any($b)
10:52 camelia rakudo-moar d6f1077d6: OUTPUT: «True␤»
10:53 wander m: my @a = [6,1,2,3,4,5]; my Set $b = Set([6,7,8,9,0]); say so any(@a) == any($b)
10:53 camelia rakudo-moar d6f1077d6: OUTPUT: «True␤»
10:53 wander :-(
10:53 wander why i use `==` :(
10:54 Cabanossi joined #perl6
10:54 moritz I don't know
10:58 Actualeyes joined #perl6
11:01 ryn1x joined #perl6
11:13 ccntrq joined #perl6
11:24 Cabanossi joined #perl6
11:41 ryn1x joined #perl6
11:47 ChoHag joined #perl6
11:50 geospeck joined #perl6
11:51 Alikzus joined #perl6
11:54 Cabanossi joined #perl6
11:56 espadrine joined #perl6
12:14 nadim joined #perl6
12:17 ryn1x joined #perl6
12:17 Geth ¦ perl6-examples: 0ab4772a19 | (Shlomi Fish)++ | categories/euler/prob042-shlomif.p6
12:17 Geth ¦ perl6-examples: Add my solution to Euler#42.
12:17 Geth ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/0ab4772a19
12:22 eliasr joined #perl6
12:24 Cabanossi joined #perl6
12:33 leont joined #perl6
12:46 cdg joined #perl6
12:55 ryn1x joined #perl6
12:55 comborico1611 joined #perl6
12:57 sjn joined #perl6
13:05 ZzZombo Can this be rewritten in a better way?
13:05 ZzZombo m: say {$_ ?? .succ !! '01' given $^a}(100.rand.truncate)
13:05 camelia rakudo-moar ba49b3432: OUTPUT: «19␤»
13:05 ZzZombo `(100.rand.truncate)` replaces a complex expression I do not want to repeat.
13:06 lizmat m: say {$_ ?? .succ !! '01'}(100.rand.truncate)
13:06 camelia rakudo-moar ba49b3432: OUTPUT: «60␤»
13:07 ZzZombo I wanna get rid of the block if possible.
13:07 lizmat not sure why you did the $^a, the default sig for a block uses $_
13:07 mr-fooba_ joined #perl6
13:08 jnthn m: say ($_ ?? .succ !! '01' given 100.rand.truncate)
13:08 camelia rakudo-moar ba49b3432: OUTPUT: «82␤»
13:09 ZzZombo m: say uc($_ ?? .succ !! '01' given 100.rand.truncate)
13:09 camelia rakudo-moar ba49b3432: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' (corresponding starter was at line 1)␤at <tmp>:1␤------> 3say uc($_ ?? .succ !! '01' given 7⏏100.rand.truncate)␤»
13:09 ZzZombo ^
13:09 jnthn m: say uc(($_ ?? .succ !! '01' given 100.rand.truncate))
13:09 camelia rakudo-moar ba49b3432: OUTPUT: «55␤»
13:10 jnthn Need extra parens to force parsing a statement, not an expression
13:11 wander say uc ($_ ?? .succ !! '01' given 100.rand.truncate)
13:11 evalable6 wander, rakudo-moar ba49b3432: OUTPUT: «76»
13:12 wander in p6, sometimes parens or whitespace important
13:12 wander m: my @a = [1,2,3]; @a>>.say
13:12 camelia rakudo-moar ba49b3432: OUTPUT: «1␤2␤3␤»
13:12 wander m: my @a = [1,2,3]; @a >>.say
13:12 camelia rakudo-moar ba49b3432: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing << or >>␤at <tmp>:1␤------> 3my @a = [1,2,3]; @a >>.7⏏5say␤»
13:13 wamba joined #perl6
13:15 ryn1x joined #perl6
13:26 ZzZombo https://docs.perl6.org/routine/ACCEPTS#class_List
13:26 ZzZombo "(this behaviour powers m:g// smartmatch), or False otherwise. C <-- ???"
13:30 wander an `=item1 C` there
13:30 wander like a typo
13:33 wander moritz: how can we call these stuff? `my regex r { \w }`, `my $c = regex { \d }`, `my token y=tok { \s }` and etc.
13:33 wander subrules or named regex, something better?
13:37 dugword joined #perl6
13:39 Cabanossi joined #perl6
13:52 fhrr joined #perl6
13:53 fhrr hello, guys, what is *the* book to learn perl6?
13:53 fhrr i'm relatively new to programming if that matters
13:54 MasterDuke_ fhrr: https://perl6book.com/ might help figure out which you want
13:55 fhrr what does it mean to "know other programming languages"? i've read some code here, but never written anything even remotely complex
13:55 fhrr here and there*
13:58 MasterDuke_ fhrr: i suspect "know other programming languages" means a little more than that. but i believe a couple of them have at least a couple chapters available for free, you could check those out first
14:00 AlexDaniel joined #perl6
14:03 pilne joined #perl6
14:04 robertle joined #perl6
14:07 mr-foobar joined #perl6
14:07 comborico1611 joined #perl6
14:10 ryn1x joined #perl6
14:17 mr-foobar joined #perl6
14:23 Cabanossi joined #perl6
14:30 darkmorph joined #perl6
14:31 wander fhrr: Perl 6 Deep Dive might be quite friendly
14:32 comborico1611 Friendly to beginners?
14:32 wander yes
14:32 comborico1611 Good to know.
14:32 wander it covers many parts, arouses your interest in exploring them
14:33 comborico1611 I'm set on Moritz's book Fundamental, but that might be the next one.
14:33 wander :P
14:33 comborico1611 Does it have full programs that the reader goes though?
14:33 moritz fhrr eq comborico1611?
14:34 comborico1611 Nope. I'm a different person.
14:34 moritz ok
14:34 comborico1611 I EXIST!
14:34 moritz Fundamentals has complete programs; from a quick skim, Deep Dive doesn't seem to
14:35 comborico1611 I love me some complete programs.
14:35 comborico1611 That's why i bought two Deitel books yesterday.
14:35 * moritz remembers an ad campaign by Murcia, a region in spain. It was mostly "Murcia existe"
14:36 comborico1611 Murcia is southern, right? (I had a college class on history of Spain)
14:37 moritz south east, yes
14:37 comborico1611 Moors took it over there longest?
14:38 comborico1611 Have you ever read any Deitel books?
14:38 comborico1611 I contacted  Laurent Rosenfeld yesterday by email.
14:39 comborico1611 He was very polite.
14:40 * moritz never even heard of Deitel
14:43 araraloren :)
14:53 dogbert17 joined #perl6
14:55 Alikzus joined #perl6
14:56 nadim joined #perl6
15:08 khw joined #perl6
15:08 Cabanossi joined #perl6
15:32 leont joined #perl6
15:37 geospeck joined #perl6
15:44 mr-fooba_ joined #perl6
15:50 ryn1x joined #perl6
15:53 Cabanossi joined #perl6
15:55 domidumont joined #perl6
16:01 nadim joined #perl6
16:16 cdg joined #perl6
16:22 geospeck joined #perl6
16:23 cdg joined #perl6
16:26 ryn1x joined #perl6
16:33 darkmorph joined #perl6
16:41 mj41 joined #perl6
16:44 geospeck joined #perl6
16:47 mr-foobar joined #perl6
16:48 zakharyas joined #perl6
16:48 kaare_ joined #perl6
16:50 wamba joined #perl6
16:55 geospeck the links under this section https://docs.perl6.org/type/IO::Path#File_test_operators give 404
16:55 geospeck "File tests include :e Exists :d Directory :f File :l Symbolic link :r Readable :w Writable :x Executable :s Size :z Zero size"
17:03 geospeck Sorry for writing directly here, I've opened an issue on Github.
17:11 ryn1x joined #perl6
17:13 timotimo https://github.com/perl6/doc/blob/master/doc/Type/IO/Path.pod6#L562 - looks like the list was supposed to be more like a bulleted list anyway
17:15 leont joined #perl6
17:15 releasable6 joined #perl6
17:25 HoboWithAShotgun I'm temporarily stuck on a win64 machine. I installed rakudo via brew and installer. in both cases zef dies with the same error
17:26 Geth ¦ doc: 35132975a4 | (Alex Chen)++ (committed using GitHub Web editor) | doc/Type/IO/Path.pod6
17:26 Geth ¦ doc: Fix #1670
17:26 Geth ¦ doc: review: https://github.com/perl6/doc/commit/35132975a4
17:26 synopsebot Link: https://doc.perl6.org/type/IO/Path
17:26 HoboWithAShotgun No such method 'subst' for invocant of type 'Any' in ... 8E608EE960F95FEE2C36E6AFF89046ACA3634254 (Zef::Distribution) line 125
17:27 HoboWithAShotgun It used to work though
17:33 sena_kun HoboWithAShotgun, seems like a new ticket in zef repo with a stacktrace and maybe pointing to a particular place in the sources.
17:34 Aaronepower joined #perl6
17:36 ryn1x joined #perl6
17:43 ryn1x joined #perl6
17:46 * HoboWithAShotgun with a shotgun can travel into the future
17:46 HoboWithAShotgun https://imgur.com/a/pEKoE
17:48 AlexDaniel huh! :)
17:51 mson joined #perl6
17:53 Cabanossi joined #perl6
17:54 ugexe unfortunately that ticket tells me as much as me telling you it does install things just because https://ci.appveyor.com/project/ugexe/zef/branch/master
17:55 HoboWithAShotgun sorry?
17:56 ugexe are you asking?
17:56 wander HoboWithAShotgun: the issue on doc is fixed
17:56 wander However, doc site built on an unstable, incomplete Pod::To::HTML and disposable htmlify logic. some anxiety
17:57 HoboWithAShotgun i don*t quite understand what u mean ugexe. is my ticket incomplete?
17:58 ryu0 left #perl6
17:58 wander I spent several hours to forget the dark side XD
17:58 ugexe not from your perspective. however i'm not able to figure out the problem with what information I have (nor am I sure what to look for in this case)
17:59 HoboWithAShotgun would you like me o investigate?
17:59 HoboWithAShotgun *to
18:00 ugexe ah no. i just tried on a rakudo newer than 4 days (that travis build) and i got the error on windows vm
18:00 ugexe that appveyor build^
18:00 ugexe i'll restart that appveyor job and see if it still passes
18:03 fatguy joined #perl6
18:04 fatguy can we store the database handle in class attribute ? what type ? i want to reuse my db handle, what is the best practice ?
18:04 HoboWithAShotgun joined #perl6
18:09 ryn1x joined #perl6
18:14 ryn1x joined #perl6
18:15 ugexe HoboWithAShotgun: `zef nuke RootDir` will get you going for now. the problem seems to be with the powershell-client http downloader messing up on its IfModifiedSince path
18:15 ugexe when it downloads the package list
18:17 timotimo fatguy: you don't have to type the attribute, just have it like "has $.dbhandle;"
18:17 ugexe this is why it passes on appveyor - because it always starts fresh so it never takes the IfModifiedSince path
18:20 BenGoldberg joined #perl6
18:21 ugexe this is the 2 code paths fwiw https://github.com/ugexe/zef/blob/82bde92a8e709f9d86999b8ccaed3788a5d5abe7/resources/scripts/win32http.ps1#L7
18:26 HoboWithAShotgun yup, that did the trick
18:26 HoboWithAShotgun tyvm
18:27 HoboWithAShotgun what does it need SVG::Plot::Pie for?
18:29 ugexe zef does not need any external modules
18:30 HoboWithAShotgun wrong channel, that that last line
18:30 HoboWithAShotgun sry
18:32 HoboWithAShotgun is there a software that can switch focus of screens/windows depending on what you look at?
18:32 HoboWithAShotgun (plus a camera of course)
18:34 ugexe probably. there is a company Tobii that does that type of work, although im not sure what the quality is
18:35 dugword joined #perl6
18:35 ryn1x joined #perl6
18:35 cdg joined #perl6
18:41 timotimo they're not offering the necessary bits for linux to make it easy
18:41 timotimo i think you only get a very low-level api for the camera itself or something
18:48 mr-foobar joined #perl6
18:50 ugexe fwiw i got to the point i couldnt use my right hand years ago and a few months with a vertical mouse cleared it up
18:51 Possum joined #perl6
18:51 AlexDaniel ugexe: yes!!
18:52 AlexDaniel that's one of the things I did at the time too
18:52 timotimo i got myself a trackball
18:53 ugexe the important bit in my case was finger movement with a horizontal wrist
18:54 geospeck joined #perl6
18:54 timotimo the trackball also allows my hand to be mostly vertical
18:54 AlexDaniel ugexe: how long did it take to heal completely?
18:56 ugexe not too long... like 3 months
18:56 AlexDaniel yeah. Similarly here
18:56 AlexDaniel but I felt the improvement almost immediately
18:57 AlexDaniel (well, mouse was only one of the things I've changed)
19:00 ugexe i already had the rest of the typical ergonomics... mouse was the last thing because there isn't really a high quality vertical mouse (although there are expensive ones)
19:01 ugexe i use the evolutent, which isn't cheap, but feels like it is
19:02 AlexDaniel the cheapest vertical mouse on ebay felt like heaven for me. I don't have high demands :)
19:04 AlexDaniel ugexe: “rest of the typical ergonomics” – does it include a keyboard? Which one?
19:07 ryn1x joined #perl6
19:07 ugexe freestyle 2 keyboard, uplift sit/stand desk, human solution adjustable keyboard tray, humanscale m8 hydrolic adjustable multi monitor arm, and an old fashioned aeron
19:08 AlexDaniel … wow
19:08 philomath joined #perl6
19:09 AlexDaniel congratz, you've built an anti-RSI sanatorium :)
19:15 ugexe a little overkill at the time, but I needed some last minute business expenses to cross some threshold or some such
19:22 philomath joined #perl6
19:38 ryn1x joined #perl6
19:45 TEttinger joined #perl6
19:46 mr-foobar joined #perl6
19:46 ryn1x joined #perl6
19:49 troys joined #perl6
20:24 ryn1x joined #perl6
20:46 mr-fooba_ joined #perl6
20:46 comborico1611 joined #perl6
20:54 Cabanossi joined #perl6
21:04 colomon joined #perl6
21:14 ryn1x joined #perl6
21:16 comborico1611 joined #perl6
21:21 colomon joined #perl6
21:28 isBEKaml joined #perl6
21:36 colomon joined #perl6
21:44 imcsk8_ joined #perl6
21:46 nadim joined #perl6
21:54 wander do rakudo's features vary from backends=jvm to backends=moarvm?
21:54 wander something i can do with backends=moarvm while cannot do it with backends=jvm
21:56 El_Che wander: moarvm works, jvm is work in progress
21:56 geekosaur do you consider 'works' to be a feature >.>
21:57 wander .
21:57 El_Che there is also a JS backend in progress
21:58 wander however, we use the same "grammar/actions", do we?
21:58 wander difference exists in code gen(?)
22:08 mcmillhj joined #perl6
22:11 colomon joined #perl6
22:12 ryn1x joined #perl6
22:14 brabo joined #perl6
22:16 brabo left #perl6
22:16 ugexe yes
22:16 ugexe occasionally you might have to tweak something if it upsets the jvm, but you ideally you should not have to
22:28 ryn1x joined #perl6
22:33 dugword joined #perl6
22:41 colomon joined #perl6
22:46 colomon joined #perl6
22:50 cdg joined #perl6
22:51 mcmillhj joined #perl6
22:56 bisectable6 joined #perl6
23:01 zakharyas joined #perl6
23:15 ryn1x joined #perl6
23:25 mcmillhj joined #perl6
23:28 colomon joined #perl6
23:38 Khisanth joined #perl6
23:39 mcmillhj joined #perl6
23:45 leont joined #perl6
23:55 mcmillhj joined #perl6
23:59 knight__ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo