Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-11-15

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:02 TimToady joined #perl6
00:09 wander joined #perl6
00:12 cdg joined #perl6
00:13 Juerd joined #perl6
00:13 ryn1x joined #perl6
00:28 dugword joined #perl6
00:29 ryn1x joined #perl6
00:37 lookatme joined #perl6
00:47 mcmillhj joined #perl6
00:58 raiph joined #perl6
00:59 ryn1x joined #perl6
01:02 kitsunenokenja joined #perl6
01:07 cpage_ joined #perl6
01:08 aborazmeh joined #perl6
01:08 aborazmeh joined #perl6
01:10 ryn1x joined #perl6
01:15 comborico1611 I'm back. Good supper. Homemade hamburgers.
01:15 ivans sounds nice
01:15 ivans what did you put in them?
01:15 comborico1611 They are so easy and fast to make, as well.
01:16 comborico1611 Salt and pepper, onions, ketchup.
01:17 comborico1611 My brother actually puts ingredients IN the meat.  Wortstershire, i forgot the rest.
01:17 ivans it's weird how homemeade food tastes so good
01:17 ivans even if it's the simplest thing in the world
01:18 lookatme China hamburgers :)
01:18 comborico1611 For some foods homemade is amazing. For others, not as good as professional. I'm thinking steak here.
01:18 ivans for sure, there's a place for professionals
01:19 ivans one of the best meals I ever had was a nice big steak in canada
01:20 ivans I've noticed some active people on projecteuler.net using Perl 6, is anyone of them on this channel? :)
01:20 ivans the solutions I've seen on the forums is a big reason I'm interested in Perl 6 again
01:20 ivans looks like a proper useful language now
01:21 comborico1611 Not me. I'm not that into math.
01:21 comborico1611 What about China hamburgers?
01:22 ivans I have no clue what that would be
01:22 ivans TIL
01:22 MasterDuke heh. i was working on a projecteuler.net problem in Perl 6 and it wasn't running fast enough. i started looking into the rakudo compiler and ended up contributing to Rakudo, NQP, and MoarVM
01:22 MasterDuke but still haven't solved that problem
01:22 timotimo i imagine china hamburgers are really hard to chew and also cut up your mouth from the inside when you try to eat them
01:22 comborico1611 Heh
01:22 ivans MasterDuke: :D
01:23 ivans I really like chinese food in general
01:23 comborico1611 I need to go back a self-study mathematics.
01:23 ivans had some just the day before
01:24 comborico1611 American Chinese food is the best.
01:24 ivans comborico1611: I'm studying (re-learning) math on my own right now
01:24 lookatme If you interesting in china food, I recommend you watch video of "The food ranger" on the Youtube
01:24 comborico1611 What branch are you in now?
01:24 ivans "mathematics and its history" is a very nice book to get an overview of different areas
01:25 comborico1611 Lookatme, ty I'll check it now.
01:25 ivans I skimmed through it once, now I'm reading it again carefully
01:25 comborico1611 Hmm. I love history, so that sounds great.
01:25 ivans it's a really nice splend of history and actual math
01:26 ivans I think it'll take me a year to finish this careful second reading
01:26 comborico1611 I bought a math book that sounds similar. It is a classic. Can't remember the name. Not sure why i didn't finish it.
01:27 ivans I've started 50 math books for every one I've finished
01:27 ivans so nowadays when I pick up a new one, I'll plan to read it twice
01:28 comborico1611 I believe it. For me, Math is a subject that has to have a talented teacher, or i don't understand.
01:28 ivans first time I'll skip everything that's too complicated and just skim
01:28 comborico1611 That is a wise strategy.
01:28 ivans and if I liked the 1% I understood, I'll go over it again
01:28 ivans incidentally, I re-read "How to read a book" this year
01:28 comborico1611 Hmm.
01:29 comborico1611 I never thought to study such a subject. Makes really good sense to, now that i think about it.
01:29 lookatme Also I heard there is a snack bar under the Empire State Building in NewYork sold China hamburgers from ShanXi (China city).
01:30 comborico1611 Heh.
01:30 ivans if I ever visit the US, I'll check it out :
01:30 ivans :D
01:30 ivans the images I got from google look tasty
01:30 ivans just like most asian food
01:31 lookatme Yeah, if you want try Chinese food, welcome to China :)
01:31 comborico1611 Asian food is the best in the world. Then, Mexican.
01:32 timotimo the best pizza i had in recent memory was from a chinese restaurant (for delivery)
01:32 comborico1611 😆
01:33 MasterDuke heh. the best neapolitan pizza i ever had was in tallin, estonia. better than the place in naples, italy where the pizza was invented
01:34 comborico1611 Man, you get around.
01:34 ryn1x joined #perl6
01:35 MasterDuke every once in a while, i do like to travel when i get the opportunity
01:35 dugword joined #perl6
01:35 comborico1611 I like cracker-thin pizza OR new York style.
01:36 MasterDuke chicago-style is actually my favorite. i was just in nyc, but i don't really like their pizza
01:36 ivans I've been travelling for quite a few years now
01:36 ivans nothing's better than local asian food
01:38 MasterDuke i've never been to that part of asia, but would love to get there sometime
01:38 kalkin-- joined #perl6
01:38 comborico1611 I must be in the mood for Chicago (deep dish) pizza.
01:39 ivans I've managed to find surprisingly good pizza everywhere in south-east asia I've been
01:39 ivans even my Italian friend had no complaints, and that's saying a lot
01:40 comborico1611 lol
01:40 ivans there are so many expats that decide to buy a restaurant and show how it's really done
01:41 comborico1611 Interesting.
01:45 cdg_ joined #perl6
01:49 comborico1611 Getting sleepy.
01:49 lookatme good night
01:49 comborico1611 Goodnight, guys!
01:53 ryn1x joined #perl6
01:56 cdg joined #perl6
02:16 ryn1x joined #perl6
02:27 ryn1x joined #perl6
02:34 cdg joined #perl6
02:36 char_var[buffer] joined #perl6
02:40 char_var[buffer] joined #perl6
02:54 astj_ 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:59 Morfent joined #perl6
03:01 piojo joined #perl6
03:12 Khisanth joined #perl6
03:13 ivans_ joined #perl6
03:13 noganex_ joined #perl6
03:21 ufobat joined #perl6
03:28 mcmillhj joined #perl6
03:34 ryn1x joined #perl6
03:39 Cabanossi joined #perl6
03:44 mr-foobar joined #perl6
04:01 Mrofnet joined #perl6
04:04 llfourn joined #perl6
04:05 ryn1x joined #perl6
04:06 astj joined #perl6
04:09 Cabanossi joined #perl6
04:24 wamba joined #perl6
04:31 wander joined #perl6
04:31 wander m: say "42" ~~ m:g/\d/
04:31 camelia rakudo-moar fff43fd70: OUTPUT: «(「4」 「2」)␤»
04:31 wander m: say "42" ~~ rx:g/\d/
04:31 camelia rakudo-moar fff43fd70: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Adverb g not allowed on rx␤at <tmp>:1␤------> 3say "42" ~~ rx:g/\d/7⏏5<EOL>␤»
04:31 wander m: say "42" ~~ rx:i/\d/
04:31 camelia rakudo-moar fff43fd70: OUTPUT: «「4」␤»
04:31 wander m: say "42" ~~ /:g \d/
04:31 camelia rakudo-moar fff43fd70: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unrecognized regex modifier :g␤at <tmp>:1␤------> 3say "42" ~~ /:7⏏5g \d/␤    expecting any of:␤        term␤»
04:31 wander m: say "42" ~~ /:i \d/
04:31 camelia rakudo-moar fff43fd70: OUTPUT: «「4」␤»
04:32 wander raiph moritz: ^^
04:32 wander is it normal?
04:33 wander relevant perl6/doc#1675
04:33 synopsebot DOC#1675 [open]: https://github.com/perl6/doc/issues/1675 Difference between //, m//, and rx// in regex
04:35 ryn1x joined #perl6
04:47 wander joined #perl6
04:53 Cabanossi joined #perl6
04:55 mniip joined #perl6
04:55 raiph wander: yes. some adverbs apply *inside* the *declarations* of regexes, others apply to *matches* see https://docs.perl6.org/language/regexes#Matching_adverbs
04:58 wander how about the difference between 'rx:g' and 'm:g'
05:02 astj joined #perl6
05:03 dj_goku joined #perl6
05:03 dj_goku joined #perl6
05:03 raiph m is a match operation that can take match adverbs; it just happens to include a regex declaration in its syntax
05:04 raiph rx is a regex declaration that can't take match adverbs; it just happens to sometimes be immediately run if in sink context or rhs of ~~
05:05 raiph wander: ^^
05:05 wander i got it
05:08 ryn1x joined #perl6
05:16 Actualeyes joined #perl6
05:20 piojo Is there any way to do a parallel "for" loop? This doesn't work: for @objects.race { }
05:20 piojo I've been using .race.map (conceptually this is a mismatch), or for @objects { start { ... } } (this is slower)
05:21 geekosaur you may be looking for hyperoperators?
05:21 piojo geekosaur: don't those only work with functions/operators?
05:22 piojo I couldn't get hyper operators to work with a block, but perhaps my syntax was just wrong
05:22 Cabanossi joined #perl6
05:26 geekosaur I'm not sure if you need to define your own operator to make the syntax work. think there's some evil abuse of [] ?
05:28 cdg joined #perl6
05:29 piojo geekosaur: abusing `map` (using it in sink context) is less evil than abusing operators. Unless there's something I just missed in the docs, like @a».{ ... }
05:33 piojo is there a method which invokes a block, like a method version of `given`?
05:34 piojo this definitely doesn't work: <a b c>».given( -> $obj { logic here })
05:37 geekosaur actually, I think you just want the example for race. map and for are not so different
05:38 ryn1x joined #perl6
05:38 mempko joined #perl6
05:39 geekosaur in fact, in the perl 5 community there's a thing about people using map instead of for, which is wasteful because it builds a result list only to throw it away
05:39 geekosaur but iirc in perl 6 for builds the result list anyway, so not even that difference
05:39 piojo geekosaur: but in perl6 it's faster to use .race.map than to call 'await do for { start { } }'
05:39 piojo oh, I didn't realize calling map wasn't wasteful
05:46 napo1eon joined #perl6
05:57 piojo still, this is such awkward syntax, there should be a better way. I think I'll ask on SO
05:58 piojo IMO, calling map in a sink context should give a warning, since it's likely that `@foo.map` should be `@bar = @foo.map`
05:59 piojo but it's still the fastest way to do concurrent iteration with a block
05:59 geekosaur yeh. it's actually worse than that, we tend to rely on stuff in sink context doing something (at least wrning) but a list or hash that is sunk silently vanishes
06:00 geekosaur which includes, say, Failure-s embedded in the list/hash
06:00 geekosaur so they never throw
06:08 Cabanossi joined #perl6
06:10 ryn1x joined #perl6
06:21 lowbro joined #perl6
06:21 lowbro joined #perl6
06:30 wamba joined #perl6
06:32 piojo geekosaur: oh, that is quite bad
06:33 geekosaur the flip side is you don't want to wait for everything in a 1000000 element list to be sunk
06:34 geekosaur which makes me wonder if things like for need to be aware of their context and propagate it to the block
06:34 geekosaur but that probably has its own problems
06:34 piojo Also, I notice "await do for @foo { start { ... } }" also does not print failures
06:35 piojo so that makes the "map" case less problematic, if the competition exhibits the same symptom
06:47 ilbot3 joined #perl6
06: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!
06:48 cgfbee joined #perl6
06:51 ch3ck3r joined #perl6
06:51 domidumont joined #perl6
07:02 wamba joined #perl6
07:09 piojo I just posted it: https://stackoverflow.com/questions/47301334/is-there-a-fast-parallel-for-loop-in-perl-6
07:19 ryn1x joined #perl6
07:20 darutoko joined #perl6
07:23 wander joined #perl6
07:36 sena_kun joined #perl6
07:42 nadim joined #perl6
07:43 rindolf joined #perl6
07:44 lookatme On my PC(opensuse 23), race is slow than normal iteration
07:47 lookatme The for loop took about 3.20s, and the race is 9.80s
07:47 lookatme And hyper took 9.70s
07:50 ryn1x joined #perl6
07:55 moritz for such a fast inner loop, you need a really large batch size to make it any faster
07:59 lizmat joined #perl6
08:02 konsolebox joined #perl6
08:03 parv joined #perl6
08:03 jonas1 joined #perl6
08:11 lookatme IDK, I set batch to 100000, it still took 6.0s :(
08:12 wander do we have Class like bitset?
08:12 wander or say bitmap
08:12 moritz this was with rakudo 2017.10-132-g1c38715
08:13 lookatme Here is  This is Rakudo version 2017.10 built on MoarVM version 2017.10
08:14 piojo lookatme: the actual example is searching a file: $path.IO.slurp.contains($str)
08:15 piojo It's a little slower, and it shows the difference between .race.map and await do for { start { } }, though they're both much faster than normal loop
08:15 lookatme I haven't seen bitmap in docs
08:16 TEttinger wander: what's the purpose you have in mind? I wonder if binding Roaring would make sense if you want compressed bitsets
08:17 TEttinger Roaring is interesting among all the bitset libs out there because it has a not-super-tiny amount of overhead per bitset, but can compress large bitsets much better
08:18 lookatme Unfortunately, the for + start is the slowest in my pc, it took 45s
08:19 TEttinger EWAH, which is used in some form by Git, has much less overhead per bitset but less compression. I have some crazy code that uses a simpler version of EWAH's RLE-type encoding, but uses it for 2D data and can generally compress spatially nearby areas into one 16-bit "all on" section, and keep most of the rest in one or a few "all off" sections
08:24 domidumont joined #perl6
08:25 piojo @moritz, I don't think hyper even works right on my computer. it's much too fast, and I don't think the block even gets executed
08:25 wander I need a bitset to hold a state vector
08:25 piojo I assumed it was just an experimental API, but perhaps it's a windows problem
08:34 cpage_ joined #perl6
08:35 wander it acts like my Bool @a[n]
08:35 wander but more efficient
08:35 wander or out fix-size Bool Array can be efficient
08:37 wander some actions I want to support like `and` -> @a Z(||) @b
08:38 wander hey, why not use a Int and by calling (+|)
08:38 Morfent joined #perl6
08:39 wander m: my Int $a = 0; $a +| (1 +< 25); say $a +^ (1 +< 1)
08:39 camelia rakudo-moar fff43fd70: OUTPUT: «WARNINGS for <tmp>:␤2␤Useless use of "+|" in expression "$a +| (1 +< 25)" in sink context (line 1)␤»
08:40 wander my Int $a = 0; $a +|= (1 +< 25); say $a +^ (1 +< 1)
08:40 wander m: my Int $a = 0; $a +|= (1 +< 25); say $a +^ (1 +< 1)
08:40 camelia rakudo-moar fff43fd70: OUTPUT: «33554434␤»
08:40 wander I can try it
08:41 wander m: my Int $a = 0; $a +|= +^(1 +< 1000); say $a +^ (1 +< 1)
08:41 camelia rakudo-moar fff43fd70: OUTPUT: «-1071508607186267320948425049060001810561404811705533607443750388370351051124936122493198378815695858127594672917553146825187145285692314043598457757469857480393456777482423098542107460506237114187795418215304647498358194126739876755916554394607706291…»
08:43 Aaronepower joined #perl6
08:45 wander bad on +^, when +^(1000)_2, I want (0111)_2, seems not
08:45 lookatme piojo, which rakudo version are you running ?
08:45 wander m: my Int $a = 8; say +^$a;
08:45 camelia rakudo-moar fff43fd70: OUTPUT: «-9␤»
08:45 piojo lookatme: 2017.09-355-g27131ed8d
08:45 eliasr joined #perl6
08:45 piojo I should upgrade, I didn't realize I wasn't on the October release
08:46 lookatme yeah,
08:46 piojo m: <a b c>.race.map: { .say if $_ eq 'a' }
08:46 camelia rakudo-moar fff43fd70: OUTPUT: «a␤»
08:46 lookatme I faced same problem when using .09 version
08:46 piojo ^^ That doesn't work on my version. I'll try upgrading
08:47 lookatme It works on my pc
08:48 wander ok I can build a mask full of 1 at first
08:48 piojo Oh, it only fails in the REPL
08:48 piojo But I've had strange results from "hyper" ever since I discovered what it was. Still, I need to upgrade.
08:51 lookatme m: my Int $a = 0; $a +|= (1 +< 1000); say $a.base(2)
08:51 camelia rakudo-moar fff43fd70: OUTPUT: «10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000…»
08:57 zakharyas joined #perl6
09:01 ryn1x joined #perl6
09:05 piojo Okay, hyper does work fine in the current master branch :)
09:05 piojo lookatme: thanks for the hint
09:08 Cabanossi joined #perl6
09:09 cpage joined #perl6
09:12 zakharyas joined #perl6
09:13 dakkar joined #perl6
09:17 piojo The issue I complained about with IO.path.slurp not being threadsafe is even fixed!
09:17 piojo You guys fixed all the things!
09:18 piojo (gals and guys, I should probably say, considering who has been making the fixes :)
09:18 pat_js joined #perl6
09:26 scimon joined #perl6
09:30 [particle] joined #perl6
09:30 AlexDaniel` lookatme: what's the code that doesn't perform faster with race?
09:34 [particle]1 joined #perl6
09:38 piojo AlexDaniel`: I believe it was (^500000).race.map: -> $i { my $result = ($i ** 2).Str; }
09:39 piojo Hey, if I filed a rakudobug by e-mail and want to close it, can I register on rt.perl.org with the same e-mail account and close my bug?
09:40 ryn1x joined #perl6
09:44 cdg joined #perl6
09:58 moritz not automatically
09:58 moritz somebody has to give you permissions to close RT tickets
09:58 moritz though if it's just a one-time thing, I can do that too
09:58 moritz what's the ticket in question?
09:59 moritz and why do you want to close it?
10:00 piojo moritz: I would be grateful if you could close this for me: https://rt.perl.org/Public/Bug/Display.html?id=132447
10:00 moritz correction: I can't right now, because RT doesn't let me log in :(
10:00 piojo because the bug I made such a careful testcase for is no longer happening with the newest build.
10:01 moritz then we should still have a test before we close the issue
10:01 moritz just send a mail that the problem is fixed on newest rakudo
10:01 piojo oh, I need to reply to the auto-send, don't I?
10:02 piojo moritz: I think this one would be hard to test for. My test case needs to be run repeatedly in a bash loop until it fails
10:02 piojo In fact, I can't guarantee it was fixed. All I can say is that I can't reproduce on the a fresh build of the master branch.
10:03 eroux joined #perl6
10:05 wamba joined #perl6
10:05 moritz yes, reply to the autoresponder should work
10:14 AlexDaniel joined #perl6
10:16 astj joined #perl6
10:17 wamba joined #perl6
10:20 astj joined #perl6
10:21 astj joined #perl6
10:25 robertle joined #perl6
10:27 piojo moritz: thanks, I'm gonna run one more test on my home computer, then hopefully report it's been fixed:)
10:36 astj joined #perl6
10:38 AlexDaniel c: HEAD (^500000).race(:125000batch, :4degree).map: -> $i { my $result = ($i ** 2).Str; }
10:38 committable6 AlexDaniel, ¦HEAD(fff43fd): «»
10:38 AlexDaniel c: HEAD (^500000).race(:125000batch, :4degree).map: -> $i { my $result = ($i ** 2).Str; }; say now - BEGIN now
10:38 committable6 AlexDaniel, ¦HEAD(fff43fd): «1.4407807»
10:38 AlexDaniel c: HEAD (^500000).map: -> $i { my $result = ($i ** 2).Str; }; say now - BEGIN now
10:39 committable6 AlexDaniel, ¦HEAD(fff43fd): «2.9554306»
10:39 ZzZombo "MoarVM panic: Memory allocation failed; could not allocate zu bytes"
10:39 ZzZombo zu?
10:39 AlexDaniel lookatme: ↑
10:39 moritz base 36? :-)
10:39 mcmillhj joined #perl6
10:40 AlexDaniel %zu?
10:40 AlexDaniel ZzZombo: what system is it? What was the compiler?
10:41 AlexDaniel lookatme: so the good news is that it is actually faster, but you'll have to specify the batch yourself
10:41 AlexDaniel c: HEAD (^500000).race(:125000batch).map: -> $i { my $result = ($i ** 2).Str; }; say now - BEGIN now
10:41 committable6 AlexDaniel, ¦HEAD(fff43fd): «1.4837286»
10:41 ZzZombo Windows 10 x64.
10:42 ZzZombo "This is Rakudo version 2017.07 built on MoarVM version 2017.07
10:42 ZzZombo implementing Perl 6.c."
10:42 piojo ZzZombo: I saw that bug with that version, too. If you upgrade, it should go away.
10:43 AlexDaniel I think it was fixed in https://github.com/MoarVM/MoarVM/commit/684d8ae0f9094f26519b50e84ceb8199ac2b7bff#diff-0a7e8ec29bcbb2fed373afa437250cad
10:43 ryn1x joined #perl6
10:45 AlexDaniel c: HEAD (^500000).race(:62500batch, :8degree).map: -> $i { my $result = ($i ** 2).Str; }; say now - BEGIN now
10:45 committable6 AlexDaniel, ¦HEAD(fff43fd): «1.3494808»
10:45 AlexDaniel c: HEAD (^500000).race(:62500batch).map: -> $i { my $result = ($i ** 2).Str; }; say now - BEGIN now
10:45 committable6 AlexDaniel, ¦HEAD(fff43fd): «1.687596»
10:46 AlexDaniel lookatme: … maybe even the degree also
10:46 astj joined #perl6
10:52 ZzZombo "Just run perl6-debug instead of perl6."
10:52 ZzZombo "'perl6-debug' is not recognized as an internal or external command,
10:52 ZzZombo operable program or batch file."
10:52 ZzZombo what do?
11:11 araraloren joined #perl6
11:12 DrForr It's usually 'perl6-debug-$compiler-extension' - maybe 'perl6-debug-m'?
11:13 DrForr (although "batch file" indicates you might be on Windows and a bit out of my current operating zone.)
11:23 piojo DrForr: yeah, on windows I can run perl6-debug-m.bat, but I've never used the debugger so I can't say any more than that.
11:33 HoboWithAShotgun joined #perl6
11:35 wamba joined #perl6
11:38 astj joined #perl6
11:38 lizmat https://www.youtube.com/watch?v=q8stPrG1rDo  # Superglue for the 21st Century
11:40 Aaronepower joined #perl6
11:42 astj joined #perl6
11:45 notbenh joined #perl6
11:45 sena_kun joined #perl6
11:46 huf joined #perl6
11:46 ryn1x joined #perl6
11:54 parv joined #perl6
11:58 parv lizmat, i thought you were pointing to chemical compound w/ your "Superglue" youtube video. dang it!
11:59 lizmat hehe... :-)  fake news!   :-)
12:00 parv good bait!
12:03 parv friction based construction: https://youtu.be/Ct6BUPvE2sM?t=14s
12:05 geospeck joined #perl6
12:09 astj joined #perl6
12:11 ryn1x joined #perl6
12:11 margeas joined #perl6
12:12 astj joined #perl6
12:13 parv later ...
12:24 DrForr I assume this is the new Gangnam Style?
12:28 astj joined #perl6
12:34 lowbro joined #perl6
12:34 lowbro joined #perl6
12:38 ZzZombo #perl6, clean way to rename a file to same name, but append `.bak`, i. e. 'filename.ext' -> 'filename.ext.bak'?
12:40 mcmillhj joined #perl6
12:42 ilmari $path.rename($path ~ '.bak')
12:42 ilmari assuming $path is an IO::Path for the file
12:42 ilmari if you just have it as a string: $filename.IO.rename($filename ~ '.bak')
12:43 ZzZombo you can concat `IO::Path` and `Str`?
12:45 moritz who said $filename was a IO::Path?
12:45 ilmari yes, IO::Path stringifies to the path
12:45 ilmari moritz: I said $path was
12:45 moritz ah
12:45 moritz missed that
12:46 astj joined #perl6
12:47 piojo_ joined #perl6
12:47 lizmat https://news.ycombinator.com/item?id=15702045  # Cro on HN, alas no comments yet
12:50 tyil sad :(
12:50 tyil I havent used Cro yet, so I cant really comment on whether its good or not :(
12:51 piojo_ I can't comment very much because I haven't used any other web services framework
12:51 ZzZombo Can this be simplified? Need to return either a item type specific localized string, or from fallback object, or a decorated token as last resort.
12:51 wander joined #perl6
12:51 ZzZombo return .value with ($localization{$item} && $localization{$item}{$type} && $localization{$item}{$type}{$note} || Nil,$localization{$type} && $localization{$type}{$note} || Nil).first({.defined && .isa(Grammar::VDF::Key-Value)});
12:51 ZzZombo "#$note";
12:51 Actualeyes joined #perl6
12:51 piojo_ But I do like that it's synchronous, and it seems like most of the other modern web frameworks want to be async
12:52 wander .
12:53 ZzZombo I just noticed I can replace the argument to `first` with just `*.isa(Grammar::VDF::Key-Value)`, but anything else?
12:56 tyil cant you shorten the entire first part with the && to just the last one, and replace the || with //
12:57 tyil so `$localization{$item} && $localization{$item}{$type} && $localization{$item}{$type}{$note} ||` becomes `$localization{$item}{$type}{$note} //`
12:57 ZzZombo no, if an intermediate element doesn't exist, accessing its contents is illegal.
12:57 sjn joined #perl6
12:58 tyil ah
12:58 ilmari m: my %h; say $h<bar><baz><zot> // 'wibble'
12:58 camelia rakudo-moar 15eb4f68c: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '$h' is not declared. Did you mean '%h'?␤at <tmp>:1␤------> 3my %h; say 7⏏5$h<bar><baz><zot> // 'wibble'␤»
12:58 ilmari m: my %h; say %h<bar><baz><zot> // 'wibble'
12:58 camelia rakudo-moar 15eb4f68c: OUTPUT: «wibble␤»
12:58 ZzZombo it's not a Hash.
12:58 ZzZombo It's an instance of a custom class.
12:59 ZzZombo It just happens to do the magic necessary to make subscript access work with it.
13:00 tyil I wouldn't call it magic :p
13:00 moritz it's magic until you understand how it works :-)
13:01 ryn1x joined #perl6
13:02 ilmari what does it return for non-existing elements? why not just return something like Any, which itself returns Any on any subscripting
13:03 ilmari or you could make it return Nil
13:03 ZzZombo It returns Nil.
13:04 ZzZombo Maybe yea
13:05 ilmari well, Nil allows subscrpting and just returns Nil, so even the // is unnecessary
13:05 moritz the magic really happens when you start writing ot it
13:05 moritz *to it
13:05 ZzZombo I forgot about that, I don't need the `|| Nil`
13:05 ZzZombo But it is. I could not find a way to introduce my own adverbs, for example, without copying much of the Hash code dealing with slices and subscripts.
13:08 Cabanossi joined #perl6
13:22 titsuki joined #perl6
13:24 mcmillhj joined #perl6
13:28 piojo_ assignment to Any that's bound to a nonexistent field of an array/hash/list is black, black magic.
13:29 piojo_ Not list, just Array/Hash
13:29 mcmillhj joined #perl6
13:31 zakharyas joined #perl6
13:40 ZzZombo Is `.Str` hidden from backtraces in Rakudo?
13:41 piojo_ ‎ZzZombo‎: I don't know, but if it's hidden but you want to see it, use $exception.backtrace.full
13:42 aborazmeh joined #perl6
13:42 aborazmeh joined #perl6
13:45 cdg joined #perl6
13:47 jnthn m: multi postcircumfix:<[ ]>(@arr, Int $indice, :$log!) { say "index: $indice"; @arr.AT-POS($indice) }; my @a = 1..10; say @a[4]:log
13:47 camelia rakudo-moar 2c84f77e7: OUTPUT: «index: 4␤5␤»
13:47 jnthn ZzZombo: ^^ your own adverb
13:47 ZzZombo it didn't play well when my module was imported IIRC.
13:48 ZzZombo As in, no class slice functions were visible or something.
13:49 Geth ¦ marketing: 6f04d47bfb | (Zoffix Znet)++ | 8 files
13:49 Geth ¦ marketing: Update "Introducing Perl 6" brochure
13:49 Geth ¦ marketing:
13:49 Geth ¦ marketing: - Add back info about loading multiple module versions
13:49 Geth ¦ marketing: - Change stock to be have less of a corporate feel
13:49 Geth ¦ marketing: review: https://github.com/perl6/marketing/commit/6f04d47bfb
13:49 ZzZombo But I could use them well inside the module.
13:49 jnthn Did you put `is export` on it?
13:49 mcmillhj joined #perl6
13:50 lizmat ZzZombo: works fine for me when you put the "is export" on it
13:51 ZzZombo I see in an old version
13:51 ZzZombo our proto sub postcircumfix:<{ }> (|) {*}
13:51 ZzZombo multi sub postcircumfix:<{ }>(::?CLASS:D \SELF,*%_) is export
13:51 ZzZombo so I guess it didn't work.
13:54 wamba joined #perl6
13:57 Geth ¦ marketing: dea64171ba | (Zoffix Znet)++ | 4 files
13:57 Geth ¦ marketing: Fix typography/add bleedless PDF for Intro P6 brochure
13:57 Geth ¦ marketing:
13:57 Geth ¦ marketing: - Add text more spacing on features overview page
13:57 Geth ¦ marketing: - Generate bleedless PDF for print, since the one with bleeds has
13:57 Geth ¦ marketing: stuff from adjacent pages bleeding onto the sheet.
13:57 Geth ¦ marketing: review: https://github.com/perl6/marketing/commit/dea64171ba
13:58 ryn1x joined #perl6
14:01 cdg joined #perl6
14:02 philomath_ joined #perl6
14:03 rindolf joined #perl6
14:06 mson joined #perl6
14:06 astj joined #perl6
14:07 lizmat joined #perl6
14:17 piojo_ joined #perl6
14:29 Geth ¦ doc: 4dc22f5571 | (Curt Tilmes)++ (committed using GitHub Web editor) | doc/Language/io-guide.pod6
14:29 Geth ¦ doc: ever -> never
14:29 Geth ¦ doc:
14:29 Geth ¦ doc: typo, changing meaning to the exact opposite
14:29 Geth ¦ doc: review: https://github.com/perl6/doc/commit/4dc22f5571
14:29 synopsebot Link: https://doc.perl6.org/language/io-guide
14:31 astj joined #perl6
14:38 Cabanossi joined #perl6
14:40 AHoboWithAShotgu joined #perl6
14:42 zakharyas joined #perl6
14:45 astj joined #perl6
14:46 raiph joined #perl6
14:47 comborico1611 joined #perl6
14:49 mcmillhj joined #perl6
14:50 comborico1611 Hi
14:52 dj_goku_ joined #perl6
14:52 dj_goku_ joined #perl6
15:04 Mrofnet joined #perl6
15:04 wamba joined #perl6
15:04 Geth ¦ marketing: b66ba06a61 | (Zoffix Znet)++ | 3 files
15:04 Geth ¦ marketing: Add pub symlinks to all versions of IntroP6
15:04 Geth ¦ marketing: review: https://github.com/perl6/marketing/commit/b66ba06a61
15:06 lizmat https://github.com/MunGell/awesome-for-beginners   # any takers for Perl 6 ?
15:06 rindolf joined #perl6
15:07 comborico1611 What is it lizmat?
15:08 Geth ¦ marketing: 5b156f47dd | (Zoffix Znet)++ | 3 files
15:08 Geth ¦ marketing: Remove symlinks
15:08 Geth ¦ marketing:
15:08 Geth ¦ marketing: Not working as I expected them to :(
15:08 Geth ¦ marketing: review: https://github.com/perl6/marketing/commit/5b156f47dd
15:08 comborico1611 Are they projects that actually need to be accomplished? Or practice exercises?
15:08 comborico1611 I see.
15:09 comborico1611 I may jump on it.  I have this C book i need to get through, but i may work on it 30 minutes a day.
15:09 comborico1611 Thanks!
15:10 tyil lizmat: /b 54
15:10 tyil woops
15:10 tyil forget that
15:13 Geth ¦ marketing: d3755956c1 | (Zoffix Znet)++ | 3 files
15:13 Geth ¦ marketing: Cheat and just copy PDFs themselves into pub/
15:13 Geth ¦ marketing: review: https://github.com/perl6/marketing/commit/d3755956c1
15:15 ryn1x joined #perl6
15:16 cdg joined #perl6
15:18 Geth ¦ marketing: 5265bf8aa7 | (Zoffix Znet)++ (committed using GitHub Web editor) | pub/README.md
15:18 Geth ¦ marketing: Add links to print PDFs as well
15:18 Geth ¦ marketing: review: https://github.com/perl6/marketing/commit/5265bf8aa7
15:18 nadim joined #perl6
15:22 tbrowder Zoffix: how about mentioning p6 advent in marketing brochure?
15:23 Cabanossi joined #perl6
15:23 lizmat hmmm... not much use ~ 10 months of the year ?
15:23 Zoffix joined #perl6
15:24 robertle joined #perl6
15:24 Zoffix tbrowder: not quite a fan because most(?) of currently available advent covers pre-Christmas Rakudo, which may differ from current implementation and thus frustrate users.
15:25 tbrowder well, i was thinking of the entire collection, but you’re right, not a good idea...
15:25 [Coke] It would be a nice project to go back and update those old entries to insure they have working code, or at least list which versions the code ran on, or if it's now out of date.
15:25 [Coke] (but that's a lot of work)
15:26 [Coke] maybe we can do that for this year's crop, add a small banner showing the language spec and rakudo version any code was run with)
15:28 Actualeyes joined #perl6
15:29 mcmillhj joined #perl6
15:36 ZzZombo can I look up a variable in he outer scope, like with C++ `::<variable>`?
15:36 Zoffix OUTER::
15:36 Zoffix m: my $x = 42; { my $x = 10; say [$x, $OUTER::x ]
15:36 camelia rakudo-moar 0b35c4adc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3= 42; { my $x = 10; say [$x, $OUTER::x ]7⏏5<EOL>␤    expecting any of:␤        postfix␤        statement end␤        statement modifier␤        stat…»
15:36 Zoffix m: my $x = 42; { my $x = 10; say [$x, $OUTER::x ] }
15:36 camelia rakudo-moar 0b35c4adc: OUTPUT: «[10 42]␤»
15:37 Zoffix m: my $x = "meows"; { my $x = 42; { my $x = 10; say [$x, $OUTER::x, $OUTER::OUTER::x ] } }
15:37 camelia rakudo-moar 0b35c4adc: OUTPUT: «[10 42 meows]␤»
15:41 Geth ¦ marketing: 229e14ee66 | (Zoffix Znet)++ | 8 files
15:41 Geth ¦ marketing: Expand learning resources in IntroP6
15:41 Geth ¦ marketing:
15:41 Geth ¦ marketing: - Add "Practice online" with exercism and glot.io
15:41 Geth ¦ marketing: - Add link to see more resources at https://perl6.org/resources/
15:41 Geth ¦ marketing: review: https://github.com/perl6/marketing/commit/229e14ee66
15:41 Zoffix left #perl6
15:42 ZzZombo Gracious me.
15:42 ZzZombo "write_fhb requires a native array of uint8 or int8"
15:42 ZzZombo what did I break this time?
15:44 timotimo can you get a stacktrace with --ll-exception?
15:46 ZzZombo I'm trying.
15:46 astj joined #perl6
15:46 ryn1x joined #perl6
15:48 astj joined #perl6
15:48 mcmillhj joined #perl6
15:50 pmurias joined #perl6
15:50 pmurias hi
15:51 comborico1611 Hi
15:51 cdg joined #perl6
15:56 mempko joined #perl6
15:56 moritz ho
15:56 ZzZombo timotimo: I got it, wanna see it?
15:56 timotimo sure
15:57 ZzZombo https://pastebin.com/Xkxm0WZA
15:59 timotimo ZzZombo: can you apply a moarvm patch and re-run?
15:59 ZzZombo Uh, apply what?
16:00 khw joined #perl6
16:00 timotimo https://gist.github.com/timo/d60cefdbd100d097eec78663b5a97b26
16:00 timotimo alternatively, can you run this with perl6-gdb-m?
16:00 comborico1611 Ho, moritz. Still making good ground on your book?
16:01 timotimo then you would "break io.c:144
16:01 timotimo oh, but then you'll need debug info or it'll be annoying AF to find a reference to the actual object
16:01 timotimo also, --debug=0 in moarvm's compiler flags
16:01 timotimo anyway, the patch is easier; gotta run!
16:02 ZzZombo I could, but it's pretty late here, I hoped to wrap things up for today when this issue cropped up.
16:02 ZzZombo I'm not sure how to apply the patch, I need to build from source, right? And that's gonna be for sure a pin on Windows?
16:02 ZzZombo pain*
16:04 ZzZombo I can only add that I'm trying to save a file in UTF-16LE encoding, via `IO.spurt`.
16:04 ZzZombo The same code path works for UTF-8 fine.
16:08 moritz comborico1611: yes, progress is fine
16:08 El_Che moritz: what do I have an image in my head now of a dog in a house in flames saying that? :)
16:09 comborico1611 Heh. No, he says he is actually is ahead of schedule.
16:10 moritz El_Che: :-)
16:10 Morfent joined #perl6
16:10 moritz so, I had a few days to proof-read the book, and found so many errors that I requested a second round
16:11 moritz (errors that were introduced during typesetting, presumably)
16:11 moritz and that second round will be early next week
16:11 cdg joined #perl6
16:11 moritz and then... it goes to the press!
16:11 Merfont joined #perl6
16:13 comborico1611 There is an interesting interview where the author discusses publishing and typesetting actually from a computer scientist Tannenbaum on YouTube.
16:13 troys joined #perl6
16:13 [Coke] moritz++
16:13 comborico1611 Apparently he introduced a new technology to ease publishing.
16:14 wander m: my token opts { \s+ }; my token tok { a<.opts>b }; "a b" ~~ &tok;
16:14 camelia rakudo-moar 0b35c4adc: OUTPUT: «No such method 'opts' for invocant of type 'Match'. Did you mean any of these?␤    ords␤    pos␤    roots␤␤  in regex tok at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
16:14 wander m: my token opts { \s+ }; my token tok { a<opts>b }; "a b" ~~ &tok;
16:14 camelia rakudo-moar 0b35c4adc: ( no output )
16:14 wander why? if i don't want to capture <opts>, what can i do?
16:15 jnthn <.opts>
16:15 wander IIRC the doc say i can use <.opts>, however error msg occurs
16:15 wander jnthn: so how about code snip above?
16:16 moritz wander: it's <&opts> for lexical tokens
16:16 jnthn ohh...it's lexical
16:16 * jnthn almost never uses those :)
16:16 moritz wander: and <.opts> for tokens that are looked up in method scope
16:16 jnthn What moritz said :)
16:16 moritz jnthn: I had to read up on the syntax for the book :-)
16:17 wander thank you!
16:20 ryn1x joined #perl6
16:30 ShalokShalom joined #perl6
16:40 timotimo atom teletype looks neat
16:42 wander m: my $sz = 10; my @ins = ['$STACK-SIZE']; say @ins[0]; @ins[0].subst(/'$STACK-SIZE'/, ~$sz); say @ins[0];
16:42 camelia rakudo-moar 0b35c4adc: OUTPUT: «$STACK-SIZE␤$STACK-SIZE␤»
16:42 wander oops
16:42 wander .= needed
16:44 tyil timotimo: as in atom the editor?
16:45 timotimo yes
16:45 tyil pics
16:45 timotimo https://teletype.atom.io/
16:45 tyil ah
16:46 tyil I can put that on the list of "things I really dont want in my editor"
16:46 tyil but for training people it could be neat i guess
16:47 mcmillhj joined #perl6
16:47 timotimo good thing it's a plugin, then
17:02 tyil I dont use atom either way :p
17:08 Cabanossi joined #perl6
17:22 ryn1x joined #perl6
17:27 setty1 joined #perl6
17:32 mcmillhj joined #perl6
17:32 releasable6 joined #perl6
17:41 domidumont joined #perl6
17:46 mcmillhj joined #perl6
17:47 wamba joined #perl6
17:53 yqt joined #perl6
18:09 mcmillhj joined #perl6
18:15 cdg joined #perl6
18:16 zakharyas joined #perl6
18:18 pecastro joined #perl6
18:25 zakharyas joined #perl6
18:27 konsolebox joined #perl6
18:32 zakharyas joined #perl6
18:33 ryn1x joined #perl6
18:39 AHoboWithAShotgu some of you guys are frequent flyers. Check this out: http://www.aviationtoday.com/2017/11/08/boeing-757-testing-shows-airplanes-vulnerable-hacking-dhs-says/
18:40 AHoboWithAShotgu scary, isn't it?
18:41 TEttinger WATCHLISTED
18:42 TEttinger they did that in the cheesy American TV show "24" already. it was in the last season with Jack Bauer, after the season where LA was nuked so they just moved the focus to other cities.
18:42 mr-fooba_ joined #perl6
18:43 TEttinger and that was after the season where Jack landed a commercial plane on a freeway with apparently no flight training
18:48 mcmillhj joined #perl6
18:56 dogbert17 joined #perl6
18:57 ryn1x joined #perl6
18:59 AlexDaniel joined #perl6
18:59 tyil maybe he used auto pilo
18:59 tyil t
19:00 |oLa| joined #perl6
19:22 masak today's p6 interference in p5: "oh righ, p5 doesn't have qqx[]"
19:25 AlexDaniel isn't it great?
19:25 AlexDaniel most of the time when you “need” qqx you're actually about to shoot your head off
19:27 dogbert17 await (^5).map({start { say qqx{echo -n foo $_} } })
19:28 ChoHag joined #perl6
19:30 ingy isn't qqx just `` in perl5?
19:31 ingy perl -E 'say `echo hello $world`'
19:36 sftp joined #perl6
19:40 Ulti given the good perl6 Atom support this is really cool https://blog.atom.io/2017/11/15/code-together-in-real-time-with-teletype-for-atom.html
19:42 mcmillhj joined #perl6
19:43 comborico1611 joined #perl6
19:45 perlpilot_ joined #perl6
19:47 Ulti hah also Visual Studio Code https://code.visualstudio.com/blogs/2017/11/15/live-share what a coincidence... the same day
19:53 * ingy remembers shared editing with audreyt et al from 15 years ago
19:54 mspo there have been a few
19:54 mspo even before subethaedit
19:54 mspo wasn't the (really) old sharing text editor also called atom?
19:54 ingy waiting for the vim plugin
19:55 ryn1x joined #perl6
19:55 ingy https://github.com/FredKSchott/CoVim
19:56 ingy everything has been done. you can all go home now.
19:56 mspo oh no I'm thinking of ACE
20:00 konsolebox_ joined #perl6
20:06 wamba[m] joined #perl6
20:06 mack[m] joined #perl6
20:42 tyil ingy: is there anything vim cant do :'D
20:48 Geth ¦ doc: 5845aa70d6 | (Jan-Olof Hendig)++ | 9 files
20:48 Geth ¦ doc: Make invisible words visible on the types page
20:48 Geth ¦ doc:
20:48 Geth ¦ doc: As per issue #209 links in =SUBTITLE elements does not work. Where
20:48 Geth ¦ doc: they have been used the word inside L<> isn't rendered. While waiting
20:48 Geth ¦ doc: for this to be fixed we'll remove the L<> tags. When the issue is
20:48 Geth ¦ doc: resolved this commit can be reverted.
20:48 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5845aa70d6
21:04 ryn1x joined #perl6
21:17 mr-foobar joined #perl6
21:19 Geth ¦ doc: b345a07b68 | (Jan-Olof Hendig)++ | doc/Type/Supplier/Preserving.pod6
21:19 Geth ¦ doc: Fix another broken SUBTITLE
21:19 Geth ¦ doc: review: https://github.com/perl6/doc/commit/b345a07b68
21:19 synopsebot Link: https://doc.perl6.org/type/Supplier/Preserving
21:25 comborico1611 What does geth stand for?
21:25 tyil Geth exists to help
21:26 [Coke] Geth is a fictional AI race from Mass effect.
21:26 geekosaur http://masseffect.wikia.com/wiki/Geth (and be aware that it replaced a bot named "dalek")
21:26 Aaronepower joined #perl6
21:27 [Coke] http://masseffect.wikia.com/wiki/Geth
21:27 [Coke] hee. :)
21:28 mcmillhj joined #perl6
21:30 Geth ¦ doc: 4625b5ef8b | (Jan-Olof Hendig)++ | 2 files
21:30 Geth ¦ doc: Formatting fixes
21:30 Geth ¦ doc: review: https://github.com/perl6/doc/commit/4625b5ef8b
21:32 comborico1611 Haha.  I see.
21:32 comborico1611 Thanks!  I just gotta know these things.
21:39 mcmillhj joined #perl6
21:40 cdg joined #perl6
21:43 ryn1x joined #perl6
21:50 kitsunenokenja joined #perl6
21:53 Cabanossi joined #perl6
22:02 ChoHag joined #perl6
22:03 mcmillhj joined #perl6
22:04 cdg joined #perl6
22:06 pilne joined #perl6
22:14 cdg_ joined #perl6
22:31 comborico1611 Just finished another chapter, boys.
22:33 Ulti chapter of what?
22:33 El_Che 11?
22:34 comborico1611 Ch. 4. I think I'm on ch. 11 for perl6 book.
22:34 comborico1611 C How To Program
22:34 itaylor57 joined #perl6
22:35 El_Che comborico1611: which one? moritz's? Laurent rosenfeld's?
22:35 El_Che the 2 if I recall correctly
22:35 comborico1611 Laurent's.
22:36 El_Che he seemed nice at yapce
22:37 ryn1x joined #perl6
22:37 comborico1611 Maybe this week, i will submit a review on Laurent's book.  Only topics that remain are oo, reaction, and functional programming models.
22:38 comborico1611 He was very polite in his email correspondence with me.
22:38 El_Che reaction?
22:38 Cabanossi joined #perl6
22:38 comborico1611 I believe so.
22:38 El_Che as in reactive programming?
22:39 comborico1611 As
22:39 comborico1611 Yes.
22:39 espadrine joined #perl6
22:39 El_Che ic
22:39 comborico1611 I'm sorry, declarative programming.
22:40 comborico1611 His book is organized into Parts. The first part is the fundamentals a programming. The second part consists of object-oriented, declarative, functional programming models.
22:40 comborico1611 Into two parts*
22:41 El_Che I need to have a look again (I have access through safari)
22:44 ryn1x joined #perl6
22:45 mr-foobar joined #perl6
22:49 cdg joined #perl6
22:54 cdg_ joined #perl6
22:54 cdg_ joined #perl6
23:03 cdg joined #perl6
23:23 comborico1611 joined #perl6
23:24 comborico1611 Almost supper time.
23:30 ryn1x joined #perl6
23:35 mson joined #perl6
23:37 lizmat joined #perl6
23:37 mcmillhj joined #perl6
23:38 Cabanossi joined #perl6
23:42 mcmillhj_ joined #perl6
23:53 cdg joined #perl6

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

Perl 6 | Reference Documentation | Rakudo