Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-10-23

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:26 Cabanossi joined #perl6
00:34 thowe joined #perl6
00:39 ryn1x joined #perl6
00:42 leedo joined #perl6
00:45 Herby__ joined #perl6
00:47 Kyo91_ joined #perl6
01:01 astj joined #perl6
01:04 Kyo91_ joined #perl6
01:15 bitrauser_ joined #perl6
01:16 cdg joined #perl6
01:17 aborazmeh joined #perl6
01:17 aborazmeh joined #perl6
01:18 itaipu joined #perl6
01:20 aindilis joined #perl6
01:29 ryn1x joined #perl6
01:38 llfourn joined #perl6
01:38 TimToady joined #perl6
01:55 ilbot3 joined #perl6
01:55 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:06 cdg joined #perl6
02:20 Kyo91_ joined #perl6
02:22 noganex joined #perl6
02:24 ryn1x joined #perl6
02:25 Cabanossi joined #perl6
02:30 aindilis joined #perl6
03:12 aindilis joined #perl6
03:27 ryn1x joined #perl6
03:39 Cabanoss- joined #perl6
03:47 cdg joined #perl6
04:24 ryn1x joined #perl6
04:28 mr-fooba_ joined #perl6
04:49 xtreak joined #perl6
05:20 ryn1x joined #perl6
05:45 evalable6 joined #perl6
05:54 wamba joined #perl6
05:56 lowbro joined #perl6
05:56 lowbro joined #perl6
06:02 ryn1x joined #perl6
06:11 j_b_s joined #perl6
06:12 redhands joined #perl6
06:12 parv joined #perl6
06:20 j_b_s testing hello
06:22 abraxxa joined #perl6
06:23 j_b_s what are main programming environments available for perl6 on windows 10? Looking to learn and familiarize with the language, but also start developing some tools to deploy on cloud (if possible)
06:29 teatime I don't really know, but I can point you to installation package for windows http://rakudo.org/how-to-get-rakudo/#Installing-Rakudo-Star-Windows
06:29 teatime and some links to editors  https://perl6.org/whatever/
06:30 salva joined #perl6
06:30 teatime if you want an easy way to type fancy Unicode operators on windows, WinCompose worked well for me in the past
06:30 teatime and perhaps http://mi.cro.services/ might interest you
06:40 Cabanossi joined #perl6
06:42 atroxaper joined #perl6
06:45 j_b_s great, thanks teat
06:45 j_b_s ime
06:52 CacoS joined #perl6
07:02 domidumont joined #perl6
07:02 jonas1 joined #perl6
07:08 domidumont joined #perl6
07:12 ryn1x joined #perl6
07:12 darutoko joined #perl6
07:27 abraxxa joined #perl6
07:30 thunktone joined #perl6
07:31 rba joined #perl6
07:35 margeas joined #perl6
07:40 Cabanossi joined #perl6
07:46 committable6 joined #perl6
07:47 xtreak joined #perl6
07:48 cdg joined #perl6
07:48 committable6 joined #perl6
07:49 zakharyas joined #perl6
07:49 sproctor joined #perl6
07:50 xtreak_ joined #perl6
07:54 ryn1x joined #perl6
08:04 sena_kun joined #perl6
08:06 rba joined #perl6
08:09 eliasr joined #perl6
08:10 rindolf joined #perl6
08:10 Cabanossi joined #perl6
08:10 nadim joined #perl6
08:14 domidumont joined #perl6
08:18 zakharyas joined #perl6
08:27 dakkar joined #perl6
08:30 xtreak joined #perl6
08:40 abraxxa joined #perl6
08:41 rba joined #perl6
09:09 ryn1x joined #perl6
09:10 andrzejku joined #perl6
09:11 domidumont joined #perl6
09:32 ryn1x joined #perl6
09:44 W4RL0RD joined #perl6
09:46 W4RL0RD__ joined #perl6
09:49 W4RL0RD__ joined #perl6
09:51 ExtraCrispy joined #perl6
09:51 lowbro joined #perl6
09:51 lowbro joined #perl6
10:06 abraxxa joined #perl6
10:24 Cabanossi joined #perl6
10:25 greppable6 joined #perl6
10:28 pmurias joined #perl6
10:33 llfourn joined #perl6
10:48 ryn1x joined #perl6
10:54 cdg joined #perl6
10:56 astj joined #perl6
10:56 astj joined #perl6
11:02 xtreak joined #perl6
11:04 S007 joined #perl6
11:07 ChoHag joined #perl6
11:17 raschipi joined #perl6
11:24 ryn1x joined #perl6
11:24 wamba joined #perl6
11:25 Cabanossi joined #perl6
12:10 Geth ¦ perl6-examples: 6ae35dec7e | (Shlomi Fish)++ | categories/euler/prob612-shlomif.p6
12:10 Geth ¦ perl6-examples: Refactor my code.
12:10 Geth ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/6ae35dec7e
12:11 itaipu joined #perl6
12:16 [Coke] .
12:18 rindolf Hi all!
12:18 rindolf p6eval: [*] [2,3,5]
12:18 rindolf m: [*] [2,3,5]
12:18 camelia rakudo-moar bd6c6403e: OUTPUT: «Potential difficulties:␤    Useless use of [*] in sink context␤    at <tmp>:1␤    ------> 3<BOL>7⏏5[*] [2,3,5]␤»
12:19 rindolf m: [*] 2,3,5
12:19 camelia rakudo-moar bd6c6403e: OUTPUT: «Potential difficulties:␤    Useless use of [*] in sink context␤    at <tmp>:1␤    ------> 3<BOL>7⏏5[*] 2,3,5␤»
12:19 lizmat m: say  [*] 2,3,5
12:19 camelia rakudo-moar bd6c6403e: OUTPUT: «30␤»
12:19 geekosaur it doesn't auto-say stuff
12:19 rindolf lizmat: thanks
12:19 geekosaur because then the bot can;t easily be used to test for sink context issues
12:19 rindolf m: say [*] [2,3,5]
12:19 camelia rakudo-moar bd6c6403e: OUTPUT: «30␤»
12:19 rindolf great
12:20 geekosaur or for auto-sinking issues, which do occaisonally come up
12:20 rindolf is this the idiomatic way to do a product?
12:21 darkmorph joined #perl6
12:23 lizmat m: my @a = 2,3,5; say [@] @a  # also works ?
12:23 camelia rakudo-moar bd6c6403e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3my @a = 2,3,5; say [@]7⏏5 @a  # also works ?␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤…»
12:23 lizmat m: my @a = 2,3,5; say [*] @a  # better
12:23 camelia rakudo-moar bd6c6403e: OUTPUT: «30␤»
12:24 * geekosaur is trying to tell if that was a shell-y typo...
12:24 lizmat so yes, I would say it's the idiomatic to do a product on more than 2 values
12:27 ChoHag joined #perl6
12:28 khw joined #perl6
12:34 astj joined #perl6
12:35 Geth ¦ perl6-examples: 98a8fd04fd | (Shlomi Fish)++ | categories/euler/prob612-shlomif.p6
12:35 Geth ¦ perl6-examples: Rename var
12:35 Geth ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/98a8fd04fd
12:35 Geth ¦ perl6-examples: 1cedf866cf | (Shlomi Fish)++ | categories/euler/prob612-shlomif.p6
12:35 Geth ¦ perl6-examples: Refactoring
12:35 Geth ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/1cedf866cf
12:35 Geth ¦ perl6-examples: 4e0ccae754 | (Shlomi Fish)++ | categories/euler/prob612-shlomif.p6
12:35 Geth ¦ perl6-examples: Extract a common function.
12:35 Geth ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/4e0ccae754
12:36 rindolf lizmat: thanks
12:42 zakharyas joined #perl6
12:42 pilne joined #perl6
12:43 zakharyas joined #perl6
12:48 Geth ¦ perl6-examples: 89d76569ce | (Shlomi Fish)++ | categories/euler/prob612-shlomif.p6
12:48 Geth ¦ perl6-examples: Refactoring
12:48 Geth ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/89d76569ce
12:48 Geth ¦ perl6-examples: f4edd80c4e | (Shlomi Fish)++ | categories/euler/prob612-shlomif.p6
12:48 Geth ¦ perl6-examples: Refactoring - avoid a temp
12:48 Geth ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/f4edd80c4e
12:48 Geth ¦ perl6-examples: 34383395b1 | (Shlomi Fish)++ | categories/euler/prob612-shlomif.p6
12:48 Geth ¦ perl6-examples: Refactoring
12:48 Geth ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/34383395b1
12:56 japhdc joined #perl6
12:56 ryn1x joined #perl6
12:57 unicodable6 joined #perl6
13:02 Geth ¦ perl6-examples: 096a3981da | (Shlomi Fish)++ | categories/euler/prob612-shlomif.p6
13:02 Geth ¦ perl6-examples: Refactor: convert to nCr and bag().
13:02 Geth ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/096a3981da
13:04 wamba joined #perl6
13:16 cdg joined #perl6
13:21 ExtraCrispy joined #perl6
13:22 Geth ¦ perl6-examples: fe089d298e | (Shlomi Fish)++ | categories/euler/prob612-shlomif.p6
13:22 Geth ¦ perl6-examples: Refactoring
13:22 Geth ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/fe089d298e
13:25 PMortens_logOnly joined #perl6
13:30 cdg_ joined #perl6
13:38 ryn1x joined #perl6
13:40 Cabanossi joined #perl6
13:41 mson joined #perl6
13:49 napo1eon joined #perl6
13:51 Kyo91_ joined #perl6
13:52 napo1eon joined #perl6
14:00 Zoffix joined #perl6
14:01 Zoffix left #perl6
14:04 japhdotcom joined #perl6
14:10 Cabanossi joined #perl6
14:10 mempko joined #perl6
14:11 Geth ¦ perl6-examples: 259900d959 | (Shlomi Fish)++ | META6.json
14:11 Geth ¦ perl6-examples: Fix t/test-meta.t with a .git suffix.
14:11 Geth ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/259900d959
14:12 Cabanossi joined #perl6
14:14 Cabanossi joined #perl6
14:15 ggoebel joined #perl6
14:16 Cabanossi joined #perl6
14:21 xtreak joined #perl6
14:32 Herby_ joined #perl6
14:32 Herby_ o/
14:33 rba_ joined #perl6
14:36 [Coke] \o
14:37 stmuk new perl6 video https://www.youtube.com/watch?v=AJm7M36DgD0
14:38 stmuk lizmat: for the weekly? ^^
14:39 lizmat stmuk++  :-)
14:40 stmuk hmmm non-visible slides issues .. I'll see if I can get them
14:48 callyalater joined #perl6
14:49 scovit joined #perl6
14:49 scovit hello
14:49 scovit m: my @F = []; say @F; say @F.map({ $_ - 1 })
14:49 camelia rakudo-moar e70969e34: OUTPUT: «[]␤()␤»
14:49 Herby_ Hello
14:49 scovit m: my @F = "".split(" "); say @F; say @F.map({ $_ - 1 })
14:49 camelia rakudo-moar e70969e34: OUTPUT: «[]␤(-1)␤»
14:49 scovit I think I am missing something about the functioning of split..
14:49 scovit how do you understand what is going on there ^ ?
14:50 [Coke] m: my @F = "".split(" ").perl.say
14:50 camelia rakudo-moar e70969e34: OUTPUT: «("",).Seq␤»
14:50 [Coke] m: say ""-1;
14:50 camelia rakudo-moar e70969e34: OUTPUT: «-1␤»
14:50 [Coke] ^^
14:50 scovit Thank you Coke, now how to solve the issue that "".split(" ") still give me "" ?
14:50 geekosaur you split a empty string, you got an empty list back
14:51 lizmat and that stringifies to ""
14:51 geekosaur ^
14:51 scovit I understand that there is a logic behind all this
14:51 [Coke] m: my @F = "".split(" ", :skip-empty).perl.say
14:51 camelia rakudo-moar 50324bb00: OUTPUT: «().Seq␤»
14:51 [Coke] ^^
14:51 lizmat stmuk: if we could have slides to go with the video, that would be brill  :-)
14:52 scovit Thank you Coke
14:52 [Coke] found on https://docs.perl6.org/routine/split
14:53 scovit I didn't bother checking the docs, since
14:53 scovit m: say ("",).Seq
14:53 camelia rakudo-moar 50324bb00: OUTPUT: «()␤»
14:53 scovit it was not at all clear where to look
14:53 geekosaur split would have been my first guess
14:54 [Coke] when trying to track something like that, break it down into pieces first, and see where things start going contrary to expectations.
14:54 scovit geekosaur of course, but there was no reason to assume that perl was behaving according to a logic
14:55 geekosaur ...
14:56 [Coke] That's a weird phrasing that doesn't actually tell me what your expectation was.
14:57 jdv79 AlexDaniel`: yeah, i mistakenly badded instead of skipping
14:57 jdv79 thanks
14:58 scovit my expectation was that [] would be different from ("",).Seq
14:58 scovit which was, but then say wouldn't show
14:58 [Coke] it is different.
14:58 scovit in the output of say
14:58 [Coke] say shows you the gist of something, not the true thing.
14:58 AlexDaniel` jdv79: it's actually non-obvious if you're doing an automated run for example. You have to check the exit code of make *and* configure, or alternatively check if perl6 executable exists
14:58 [Coke] use .perl to get closer to the metal.
14:59 AlexDaniel` jdv79: this is why I love bisectable, it does all that automatically :)
14:59 AlexDaniel` jdv79: … except that it is no good for that particular case :(
14:59 jdv79 haha
15:01 b2gills joined #perl6
15:01 geekosaur scovit, if you want to see the truth, use the .perl method. (which gives you a Str and the gist of a Str is itself, so you can safely 'say' it)
15:01 scovit geekosaur, of I can keep complaining, :skip-empty is not huffman coded
15:02 scovit I think that what I am doing is fairly common
15:02 b2gills :skip-empty **is** huffman coded, because you shouldn't use it very often
15:03 scovit perl -nae 'print scalar @F'
15:03 scovit it is the default here ^
15:04 [Coke] perl6 ain't perl5.
15:04 scovit I am just arguing that people will use it often
15:04 [Coke] https://docs.perl6.org/language/5to6-perlfunc#split
15:04 b2gills I just came back online, but I assume you used .split(''), which is better written as .comb
15:05 geekosaur your argument would be worth a bit more if it werent based on 'I think that...'
15:05 scovit b2gills nop
15:05 [Coke] Looks like that is missing the note about :skip-empty
15:05 Juerd Why is .split('') "better written as" .comb? timtowtdi!
15:07 b2gills I meant .split('',:skip-empty) is better written as .comb. It is about saying what you want rather than what you don't want.
15:08 kshannon joined #perl6
15:09 scovit geekosaur I might better spend my time counting the time arguments about huffman coding are based on handwaving than counting the times split is intended as :skip-empty
15:09 scovit like in all perl5 scripts
15:10 geekosaur enough. I am not the one who decides these things, and you are veering close ot saying that our time is best spent accepting your beliefs as truths
15:10 geekosaur un critically
15:11 b2gills m: ''.comb(/<-[\ ]>+/).perl.say
15:11 camelia rakudo-moar 50324bb00: OUTPUT: «()␤»
15:11 scovit I am arguing that spending time in such a discussion would be less worth than trolling you, sorry for the honesty
15:13 ryn1x joined #perl6
15:14 b2gills There are many places where the default in Perl 5 is to throw away information, and the default in Perl 6 is to keep the information
15:18 AlexDaniel` .hug everyone
15:18 * huggable hugs everyone
15:18 scovit b2gills, I interpret the perl 6 default as keeping an identity element
15:19 piojo_ joined #perl6
15:19 scovit I honestly like the new default
15:19 b2gills m: say '123'.split('abc').perl.say
15:19 camelia rakudo-moar 50324bb00: OUTPUT: «("123",).Seq␤True␤»
15:20 b2gills m: my @a = 1,2,3; say [@a,4,5].perl; say [|@a,4,5]; # another place that Perl 5 would throw away data that Perl 6 doesn't
15:20 camelia rakudo-moar 50324bb00: OUTPUT: «[[1, 2, 3], 4, 5]␤[1 2 3 4 5]␤»
15:22 raschipi Yep, very good principle to have, requiring that discarding information be done explicitly.
15:25 AlexDaniel` it depends on what you look at. Strings, for example, are normalized by default
15:26 troys joined #perl6
15:29 b2gills To be fair, Unicode says that all the ways of encoding a grapheme cluster should be seen as equivalent. It only really becomes a problem when dealing with interfaces that don't follow that part of the spec, like file-systems.
15:33 raschipi Unicode is round-trip capable exactly because that isn't true.
15:35 geekosaur unixlike filesystems mostly don't claim to follow that spec (OS X being a specific exception, and that only for HFS+) so that's a slightly weird statement
15:36 geekosaur in fact posix doesn't promise anything except byte strings
15:39 raschipi That is because it has to support any encoding, not only Unicode ones. Unicode still didn't support Japanese properly until recently, for example (and the new standard that does isn't implemented in any POSIX operating systems anyway). So that's why they didn't change file names to require valid Unicode.
15:40 b2gills That was just an example, there are interfaces that take in utf8 data but treat it more like a list of numbers than text
15:40 raschipi There were talks on Usenix about requiring valid utf-8 in file names and about normalizing them. Apple is already implementing it, soon it will be available in other systems.
15:42 teatime unicode is so complex.  I love it, but I, like, fear it somehow.
15:42 scovit I dubt linux will follow
15:43 b2gills There are certain times where it would be nice for a Str to keep around something like a shadow copy of it's original data for when round-tripping is useful.
15:45 scovit I tought there was an encoding specifically for that utf-c8
15:45 b2gills Or at least if Uni were usable with more of the setting
15:46 raschipi Linux will follow, it will just take a long time and many out-of-tree attempts to get the interfaces right before they committ to it.
15:48 pmurias b2gills: making Uni more usable seems a lot better than a solution that sometimes works but breaks when you mess more with the string
15:51 scovit I think the developers of linux are committed to keep the kernel abi compatibility. While this seems more related to filesystems than the general kernel, it will break some applications
15:52 teatime were you having a problem with reading filepaths that get normalized and end up not the same bytes as the real filepath?
15:53 geekosaur scovit, maybe. I've been imagining a separate set of APIs for utf8
15:54 geekosaur because there will be apps that need to use byte strings for compatibility or etc.
15:54 teatime geekosaur: implicit hardlinks?  :)
15:55 Kyo91_ joined #perl6
15:55 geekosaur and, knowing programmers, probably someone relying on U+00E1 and U+0061 U+0301 being different
15:56 raschipi m: Blob.new(0xf8, 0x67, 0x65, 0x6b).decode('utf8-c8').codes #what a mess
15:56 camelia rakudo-moar 50324bb00: ( no output )
15:56 * teatime predicts unicoded and filepathctl
15:56 raschipi m:say Blob.new(0xf8, 0x67, 0x65, 0x6b).decode('utf8-c8').codes
15:56 evalable6 raschipi, rakudo-moar 50324bb00: OUTPUT: «7»
15:57 * geekosaur predicts linux will find the most byzantine possible way to implement it >.>
15:58 b2gills m: Blob.new(0xf8, 0x67, 0x65, 0x6b).decode('utf8-c8').uninames.map: &say
15:58 camelia rakudo-moar 50324bb00: OUTPUT: «<Plane 16 Private Use-10FFFD>␤LATIN SMALL LETTER X␤LATIN CAPITAL LETTER F␤DIGIT EIGHT␤LATIN SMALL LETTER G␤LATIN SMALL LETTER E␤LATIN SMALL LETTER K␤»
15:59 teatime m: say Blob.new(0xf8, 0x67, 0x65, 0x6b).decode('utf8-c8').encode('utf8-c8').codes
15:59 camelia rakudo-moar 50324bb00: OUTPUT: «No such method 'codes' for invocant of type 'Blob[uint8]'. Did you mean 'does'?␤  in block <unit> at <tmp> line 1␤␤»
15:59 b2gills m: say Blob.new(0xf8, 0x67, 0x65, 0x6b).decode('utf8-c8').encode('utf8-c8').bytes
15:59 camelia rakudo-moar 50324bb00: OUTPUT: «4␤»
16:00 Cabanossi joined #perl6
16:01 raschipi m: say Blob.new(0xf8, 0x67, 0x65, 0x6b).decode('utf8-c8').encode('utf8-c8').^name
16:01 camelia rakudo-moar 50324bb00: OUTPUT: «Blob[uint8]␤»
16:01 raschipi Yeah, but it breakes down in the midlle. Only works as long as one doesn't touch it.
16:03 teatime I'm not necessarily seeing the problem, or at least one that could be avoided w/ automation
16:04 domidumont joined #perl6
16:04 raschipi It's just that it's messy. The guts should be hidden.
16:05 raschipi m:say Blob.new(0xf8, 0x67, 0x65, 0x6b).decode('utf8-c8').codes # This should be '4', because I created it with 4 codes.
16:05 evalable6 raschipi, rakudo-moar 50324bb00: OUTPUT: «7»
16:05 raschipi But it's seven, the encapsulation is broken
16:06 teatime raschipi: when you decode it you're asking for the (perl-normalized/NFG, I guess) utf8 representation
16:06 Kyo91_ joined #perl6
16:06 xtreak joined #perl6
16:06 raschipi m: say Blob.new(0xf8, 0x67, 0x65, 0x6b).decode('utf8-c8')
16:06 camelia rakudo-moar 50324bb00: OUTPUT: «􏿽xF8gek␤»
16:08 moritz that is weird, if you ask me
16:08 raschipi It should output '�gek'
16:08 moritz four bytes to 7 graphemes
16:08 timotimo just improving Uni isn't enough to make things round-trippable
16:08 teatime moritz: it's 7 codepoints, isn't it?
16:08 timotimo that only makes normalization optional. you still can't deal with input that isn't valid utf8 or whatever
16:08 timotimo that's why utf8-c8 exists
16:08 teatime m: say Blob.new(0xf8, 0x67, 0x65, 0x6b).decode('utf8-c8').chars
16:08 camelia rakudo-moar 50324bb00: OUTPUT: «4␤»
16:09 moritz teatime: "􏿽xF8gek" looks like 7 graphemes to me
16:10 teatime yeah I don't understand how xF8 gets into the string output
16:10 timotimo it's what you get when you encode something to utf8 that was created with utf8-c8
16:10 teatime that seems like a bug
16:10 timotimo no
16:10 timotimo it is the intention
16:11 teatime well it's invalid utf8.  ok fair enough.
16:11 raschipi Well, it is documented at least: https://docs.perl6.org/language/unicode#UTF8-C8
16:11 teatime it's not like there's anything righter it could do
16:11 timotimo it could just output the binary garbage again, so that the next thing in the chain has to deal with it :P
16:12 ryn1x joined #perl6
16:12 timotimo users love it when their terminal suddenly shows only drawings and symbols instead of text
16:12 teatime I guess that's what would happen exactly if output encoding is utf8-c8, but since it's utf8 it doesn't output invalid utf8
16:12 raschipi If that's what they told the computer to do, that's what it should do.
16:12 timotimo yeah, then they just have to use utf8-c8 on the way out
16:12 teatime I'm still not seeing the problem, or at least the problem that could be hidden from the user (programmer).
16:13 teatime (by which I mean I guess I missed the point, not that I think you don't have one)
16:13 timotimo m: say (Blob.new(0xf8).decode('utf8-c8') x 3).encode('utf8-c8')
16:13 camelia rakudo-moar 50324bb00: OUTPUT: «Blob[uint8]:0x<f8 f8 f8>␤»
16:13 timotimo you can work properly with the strings it creates
16:14 timotimo complaining that it displays Xxf8 is a bit like complaining that .perl gives you \r where you would have expected the literal \r to be output to the console
16:15 timotimo similarly if you use that as the basis, you can end up splitting bytes in half. that's why Xxf8 is one grapheme. you can't accidentally grab only the first two codepoints
16:16 timotimo does that sound sensible to you?
16:16 raschipi How can I send it down the standard output? Because I want to mess my terminal on purpose
16:16 raschipi The original bytes
16:17 timotimo many ways, for example $*OUT.write($the-weird-string.encode('utf8-c8'))
16:17 timotimo m: $*OUT.encoding = 'utf8-c8'; my $weirdstuff = Buf.new(0xf8).decode('utf8-c8'); $*OUT.write($weirdstuff)
16:17 camelia rakudo-moar 50324bb00: OUTPUT: «Cannot modify an immutable Str (utf8)␤  in block <unit> at <tmp> line 1␤␤»
16:17 timotimo ah, i feared setting encoding afterwards isn't possible
16:18 timotimo m: my $raw-out = open('/dev/stdout', 'utf8-c8'); my $weirdstuff = Buf.new(0xf8).decode('utf8-c8'); $raw-out.say($weirdstuff)
16:18 camelia rakudo-moar 50324bb00: OUTPUT: «open is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in sub open at src/RESTRICTED.setting line 9␤  in block <unit> at <tmp> line 1␤␤»
16:18 timotimo c: HEAD my $raw-out = open('/dev/stdout', 'utf8-c8'); my $weirdstuff = Buf.new(0xf8).decode('utf8-c8'); $raw-out.say($weirdstuff)
16:18 committable6 timotimo, ¦HEAD(50324bb): «Too many positionals passed; expected 1 argument but got 2␤  in block <unit> at /tmp/ZuQ_7h2ewx line 1␤ «exit code = 1»»
16:19 timotimo c: HEAD my $raw-out = open('/dev/stdout', :encoding('utf8-c8')); my $weirdstuff = Buf.new(0xf8).decode('utf8-c8'); $raw-out.say($weirdstuff)
16:19 committable6 timotimo, https://gist.github.com/eec058d4876f95072968926cebab5cb9
16:19 raschipi Thanks timotimo.
16:20 timotimo you'll also need to pass :w to the open call
16:21 darkmorph joined #perl6
16:21 dogbert17 joined #perl6
16:21 wander joined #perl6
16:22 wander Is there some way to use QAST in perl6? not for a concrete aim, just curious
16:23 timotimo yup!
16:24 timotimo looking for an example
16:24 timotimo hm, i thought i could use zoffix' irc bot as an example
16:25 timotimo m: use QAST:from<NQP>; say QAST::SVal.new(:value<hi>).dump
16:25 camelia rakudo-moar 50324bb00: OUTPUT: «- QAST::SVal(hi) ␤␤»
16:25 bdmatatu joined #perl6
16:27 wander thank you~ I tried 'use QAST;' but fail XD
16:27 Geth ¦ doc: 920c6cb8ff | (Will "Coke" Coleda)++ | doc/Type/Any.pod6
16:27 Geth ¦ doc: Update signature to match that of the list variant.
16:27 Geth ¦ doc:
16:27 synopsebot Link: https://doc.perl6.org/type/Any
16:27 Geth ¦ doc: Closes #1604
16:27 Geth ¦ doc: review: https://github.com/perl6/doc/commit/920c6cb8ff
16:28 Khisanth joined #perl6
16:32 timotimo qast: ▸Op: :op<say>, ▸SVal: :value("Have fun!")
16:32 SourceBaby timotimo, OUTPUT: «Have fun!␤»
16:32 timotimo wander: zoffix built this bot with a little DSL for qast compilation and evaluation
16:32 timotimo SourceBaby: source
16:32 SourceBaby timotimo, See: https://github.com/zoffixznet/perl6-sourceable
16:33 wander got it
16:33 timotimo https://github.com/zoffixznet/perl6-sourceable/blob/master/lib/Sourceable/Plugin/Sourcery.pm6#L49 - code starts here
16:35 ryn1x joined #perl6
16:38 Kyo91_ joined #perl6
16:41 setty1 joined #perl6
16:44 ggoebel joined #perl6
16:50 rba joined #perl6
16:50 zakharyas joined #perl6
17:06 itaipu joined #perl6
17:08 zakharyas joined #perl6
17:16 Kyo91_ joined #perl6
17:19 thunktone joined #perl6
17:21 ryn1x joined #perl6
17:23 Zoffix joined #perl6
17:23 Zoffix raschipi: the arg is :enc not :encoding tho
17:23 Zoffix (consistently inconsistent)
17:24 Zoffix m: $*OUT.encoding('utf8-c8'); my $weirdstuff = Buf.new(0xf8).decode('utf8-c8'); $*OUT.write($weirdstuff)
17:24 camelia rakudo-moar 50324bb00: OUTPUT: «Type check failed in binding to parameter '$buf'; expected Blob but got Str ("\xF9")␤  in block <unit> at <tmp> line 1␤␤»
17:24 Zoffix m: $*OUT.encoding('utf8-c8'); my $weirdstuff = Buf.new(0xf8); $*OUT.write($weirdstuff)
17:24 camelia rakudo-moar 50324bb00: ( no output )
17:25 Zoffix Changing encoding after write is defined and works. It's just Yet Another Inconsistency that it takes it as an arg instead of being asigned to
17:26 Zoffix open('/dev/stdout') can be written as open(IO::Special.new: "<STDOUT>").say: "meow"
17:26 bwisti joined #perl6
17:27 Zoffix or, in 6.c, as just open '-'
17:27 timotimo OK
17:28 timotimo i don't do very much I/O it seems :)
17:29 thunktone joined #perl6
17:32 Zoffix :)
17:33 mr-foobar joined #perl6
17:34 timotimo i mostly have ARGFILES do stuff for me
17:38 moritz something funny for the German-speaking 6ers: https://pbs.twimg.com/media/DM1GQCmXcAEYnCi.jpg
17:39 timotimo :D
17:39 Zoffix What does that word really mean?
17:39 ilmari now that'll give you a glowing clean
17:40 Zoffix same translation into Russian
17:41 moritz Zoffix: it's some kind of a hard soap
17:41 Zoffix heh
17:41 moritz curd soap, some other dictionaries say
17:41 moritz no idea how accurate that is, but likely better than nuclear :-)
17:42 Zoffix :)
17:43 Zoffix left #perl6
17:44 pecastro joined #perl6
17:46 Rawriful joined #perl6
17:47 lostinfog joined #perl6
17:49 ryn1x joined #perl6
18:12 stmuk I saw Hauptversionsnummernerhöhungsangst: The German word for fear of increasing the major version number
18:12 stmuk recently
18:13 TreyHarris joined #perl6
18:15 perlpilot Is there a corresponding geringerversionsnummernerhöhungsangst?
18:19 geekosaur what's the one for being afraid that the version number was increased by someone else? >.>
18:21 lizmat .oO( Datenfernubertragungsanlage )
18:21 ChoHag joined #perl6
18:21 moritz geekosaur: that's called "Erfahrung" :-)
18:21 geekosaur *snort*
18:23 perlpilot moritz: how do you get from there to Weisheit?
18:24 moritz perlpilot: how am I supposed to know? :-)
18:24 perlpilot :-)
18:24 lizmat more importantly: *why* do you want to know  :-)
18:25 perlpilot that's okay ... I'll just google it  ;)
18:25 ryn1x joined #perl6
18:40 mson joined #perl6
18:47 PMortens_logOnly joined #perl6
18:51 kyan joined #perl6
18:55 Geth ¦ doc: 4ec20e23db | (Elizabeth Mattijsen)++ | doc/Type/Iterable.pod6
18:55 Geth ¦ doc: hyper/race are no longer experimental
18:55 Geth ¦ doc:
18:55 Geth ¦ doc: - but keep the link for now, until the documentation has migrated here
18:55 Geth ¦ doc: review: https://github.com/perl6/doc/commit/4ec20e23db
18:55 synopsebot Link: https://doc.perl6.org/type/Iterable
18:56 itaipu joined #perl6
19:01 wamba joined #perl6
19:05 Kyo91_ joined #perl6
19:08 setty1 joined #perl6
19:09 raschipi Here waiting for this last change in the docs from lizmat to build so I can send the link to people...
19:11 lizmat raschipi: technically, we should probably wait until after the release
19:12 okl joined #perl6
19:12 lizmat not everybody is working with HEAD  :-)
19:12 raschipi well, just need to know the audience
19:16 j_b_s joined #perl6
19:18 thunktone joined #perl6
19:29 setty1 joined #perl6
19:31 raiph joined #perl6
19:31 thunktone joined #perl6
19:34 ryn1x joined #perl6
19:42 raschipi Done, built.
19:58 nadim joined #perl6
20:02 cdg joined #perl6
20:07 cpage_ joined #perl6
20:11 cdg_ joined #perl6
20:13 ryn1x joined #perl6
20:16 wamba1 joined #perl6
20:20 Kyo91_ joined #perl6
20:31 ChoHag joined #perl6
20:34 espadrine joined #perl6
20:41 Geth ¦ modules.perl6.org: PunKeel++ created pull request #90: Use Travis' repositories API instead of the Builds API
20:41 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/pull/90
20:45 Aceeri_ joined #perl6
21:05 bazzaar joined #perl6
21:08 bazzaar \o perl6
21:10 bazzaar hi, was just reading gfldex's new post 'https://gfldex.wordpress.com/2017/10/22/there-is-more-then-one-way-a-the-same-time/', and spotted some minor typos
21:11 gfldex bazzaar: that's why I put it there before I put it on Rosettacode
21:12 bazzaar don't want to leave a comment just to point out their correction, so posting them here ( hope that's ok)
21:12 bazzaar - pipe.Supply block ... line with contains('Rosetta .. has been clipped at 80 chars
21:12 bazzaar - Proc::Async.new arguments .... 'find*HOME... missing a closing quote
21:13 bazzaar - stdout.lines.tap block .... line with slurp.contains .... ends with }; ... should this be ');
21:14 bazzaar gfldex: thanks for this informative post (and others too), it's much appreciated.
21:15 bdmatatu joined #perl6
21:16 gfldex bazzaar: I can't see those mistakes.
21:18 bazzaar gfldex: that's strange, I'm using Firefox on OpenSuse Leap 42.3, KDE destop
21:20 bazzaar gfldex: I cut and pasted the individual code sections into a single file and ran it, got error messages at those 3 spots.
21:21 gfldex bazzaar: could you check https://gist.github.com/4e734902dcbabe3ff1f287ef1676a579 please?
21:22 gfldex bazzaar: sadly wordpress and code don't mix that well
21:29 ryn1x joined #perl6
21:30 bazzaar gfldex: that code runs without error (I didn't doubt that it would :), it just seems to be the blog where it gets mangled. I don't know enough to suggest how it can be fixed
21:31 geekosaur as gfldex said, wordpress and code samples don't mix
21:34 zostay Anyone have a suggestion how I could do some generic argument processing for .new? I've boiled the problem with what I'm trying to do down to the following snippet.
21:34 zostay m: my %in = a => 1, b => <x y z>; class Z { has Int $.a; has Str @.b }; my %pin = do for Z.^attributes { my $v = %in{ .name.substr(2) }; .name.substr(2) => $v }; Z.new(|%pin);
21:34 camelia rakudo-moar e4a5bb17c: OUTPUT: «Type check failed in assignment to @!b; expected Str but got List ($("x", "y", "z"))␤  in submethod BUILDALL at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
21:35 zostay I just can't figure out how to get the %pin assignment to do what I want it to.
21:37 cpage_ joined #perl6
21:37 lizmat and another Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2017/10/23/2017-43-hyper-lands-racing/
21:38 gfldex that's the only advantage of wordpress
21:38 gfldex I get a 5 seconds warning on an incomming weekly. :)
21:39 lizmat hehe  :-)
21:39 lizmat gfldex++
21:44 bazzaar Perl6 Weekly ... a great start to the week! lizmat++
21:53 Herby_ lizmatt++
21:54 Herby_ lizmat++ rather
21:54 lizmat Herbby++
21:54 lizmat :-)
21:54 Herby_ :3
21:54 evalable6 joined #perl6
22:01 Herby_ Question, which I'll preface by saying I know little about regex and less about grammars
22:01 Herby_ are grammars useful if you don't know the order of the text you're parsing?
22:02 Herby_ for instance, if I have a string that could have: name date location language
22:02 Herby_ but those variables could be in any order, and can change string to string
22:03 Herby_ the order can change string to string
22:05 ugexe does [name | date | location | language] ** 5 suffice?
22:05 geekosaur record = field+ #`{ plus code to make sure the required ones are present} ; field = namefield | datefield | ...
22:05 geekosaur very loosely
22:06 Herby_ hmm
22:07 ugexe er ** 0..4
22:10 ryn1x joined #perl6
22:11 callyalater left #perl6
22:13 Geth ¦ modules.perl6.org: 93d02d138a | PunKeel++ | lib/ModulesPerl6/DbBuilder/Dist/PostProcessor/p20TravisCI.pm
22:13 Geth ¦ modules.perl6.org: Use Travis' repositories API instead of the Builds API
22:13 Geth ¦ modules.perl6.org:
22:13 Geth ¦ modules.perl6.org: Loading should be faster (smaller page), and the build endpoints includes PRs from what I can tell.
22:13 Geth ¦ modules.perl6.org: Related issue: #51
22:13 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/93d02d138a
22:13 Geth ¦ modules.perl6.org: 00d721fc83 | (Zoffix Znet)++ (committed using GitHub Web editor) | lib/ModulesPerl6/DbBuilder/Dist/PostProcessor/p20TravisCI.pm
22:13 Geth ¦ modules.perl6.org: Merge pull request #90 from PunKeel/pk-travis-api
22:13 Geth ¦ modules.perl6.org:
22:13 Geth ¦ modules.perl6.org: Use Travis' repositories API instead of the Builds API
22:13 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/00d721fc83
22:14 Geth ¦ modules.perl6.org: 330a881f0c | (Zoffix Znet)++ (committed using GitHub Web editor) | use-me-for-commit-triggers
22:14 Geth ¦ modules.perl6.org: [REBUILD] it
22:14 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/330a881f0c
22:17 wamba joined #perl6
22:19 El_Che thx lizmat for th weekly!
22:27 timotimo "Easy things should be hard, hard things should be possible." i've got the feeling this might have been typo'd
22:28 geekosaur or thinked
22:28 geekosaur thinkoed
22:49 Herby__ joined #perl6
22:51 stanrifkin joined #perl6
22:52 stanrifkin Is there a online perl website to test code directly in the browser?
22:52 gfldex glot.io
22:53 stanrifkin I didn't know that. Thank you.
22:53 bdmatatu joined #perl6
22:54 Herby__ didnt know that either
22:54 Herby__ learn something new every day!
22:59 Herby__ m: say "foobar" ~~ /foo <?before bar>/;
22:59 camelia rakudo-moar e4a5bb17c: OUTPUT: «「foo」␤»
22:59 Voldenet joined #perl6
22:59 Voldenet joined #perl6
23:01 bitrauser joined #perl6
23:10 ryn1x joined #perl6
23:12 bazzaar joined #perl6
23:13 cdg joined #perl6
23:13 bazzaar \o perl6
23:14 Herby__ o/
23:17 bazzaar Hi, I'm wondering if anyone sees the value of showing 'coding' tags on modules.perl6.org, in addition to (and seperate from) the 'utilisation/purpose' tags currently on the page
23:21 bazzaar coding tags could be automatically populated, and so wouldn't need input from the module authors
23:24 bazzaar they could be based on the occurence of a limited number of keywords in the module code, which could be further reduced to a bag of code subjects (tags)
23:27 bazzaar so if I wanted to look for modules that employ grammars, or action objects, or asynchronous code, or given blocks, or *, then I could
23:29 bazzaar potentially the code subjects (tags) could be further expanded to detail the occurrence of their component list of keywords
23:32 ugexe the tags (code) doesn't mean anything until it has been parsed/ran
23:33 ugexe otherwise there is greppable6, our irc version of grep.metacpan.org, if you just want to grep source code
23:36 pilne joined #perl6
23:36 raschipi joined #perl6
23:37 bazzaar I quess I'm just looking at this from a learning perl6 perspective, I might want to find different ways of writing action objects code, for example
23:39 bazzaar It might be nice to be able to do that by using a tag interface to point me at the relevant modules
23:40 raschipi another online place to run perl6 is to message camelia here in this channel
23:41 geekosaur or in /query or /msg
23:42 raschipi yes, that's what I meant, /msg for message
23:42 bazzaar the list of code subjects (primary tags), and component keywords (secondary tags upon which the tagging is based) needn't be large or too complicated
23:44 geekosaur I suspect it's more likely to happen if someone contributes code...
23:45 ugexe since you can't parse perl6 code without running it i'm not sure a simple tag can convey much significance
23:48 bazzaar I realise that I'm just asking a question, and that doesn't necessarily move things along, sorry for that
23:49 R0b0t1_ joined #perl6
23:52 bazzaar maybe full parsing isn't necessary, just the occurrence? But yes a full parse solution would undoubtedly provide more utility if needed.
23:55 ugexe well for instance you want to find other grammars. but i doubt you're interested in `my $grammar = ` and rather `grammar ...`
23:56 ugexe and consider how many ways you can write each of those
23:57 ugexe i imagine something ok could be done but it'd probably be pretty gnarly

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

Perl 6 | Reference Documentation | Rakudo