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

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

Perl 6 | Reference Documentation | Rakudo