Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-02-08

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:04 gdonald joined #perl6
00:06 pyrimidine joined #perl6
00:09 japhb joined #perl6
00:15 meept joined #perl6
00:22 jeffythedragonsl joined #perl6
00:23 jeffythedragonsl Hey I wanted some feedback on the MVM rename
00:25 jeffythedragonsl If anyone is online
00:35 japhb joined #perl6
00:41 tony-o let's hear it
00:54 IOninja I think they were asking *for* feedback.
00:56 IOninja https://github.com/MoarVM/MoarVM/pull/522
01:02 sammers jeffythedragonsl, I haven't been following, what is the motivation behind renaming MVMArray* to VMArray*?
01:04 geekosaur they left
01:05 SmokeMachine IOninja: Eddward: aren't the backslashes to scape the hash's %?
01:06 zakharyas joined #perl6
01:08 japhb joined #perl6
01:08 IOninja SmokeMachine: yes, but originally it wasn't indicated it was the output of .perl
01:19 timotimo sammers: there was a ticket on moarvm's github issue tracker that suggested renaming the class to be named in accordance to the REPR
01:19 adu joined #perl6
01:20 AJ_ joined #perl6
01:21 cibs joined #perl6
01:23 cdg joined #perl6
01:23 zacts joined #perl6
01:26 samcv good * #perl6
01:26 timotimo heyo samcv
01:26 samcv hi :)
01:30 samcv i'm going to transfer https://github.com/samcv/Atom-as-a-Perl6-IDE/ to be a perl 6 repo
01:30 samcv so more people can edit it without PR
01:31 samcv done
01:33 jeffythedragonsl joined #perl6
01:35 jeffythedragonsl hey
01:35 japhb joined #perl6
01:35 timotimo hey jeffythedragonsl
01:35 timotimo i ... have kind of bad news for you
01:36 timotimo https://irclog.perlgeek.de/moarvm/2017-02-07#i_14059465
01:37 jeffythedragonsl it's ok
01:37 jeffythedragonsl these things happen
01:37 MasterDuke jeffythedragonsl: you can join my club, my first moarvm PR was rejected also
01:38 jeffythedragonsl haha
01:38 timotimo we might want to give the issues list a good once-over ...
01:38 jeffythedragonsl I just really would like to see perl 6 succeed
01:40 jeffythedragonsl well i did find that missing "Mu " bug so that's a start
01:40 timotimo the one that made the repl unhapy?
01:40 jeffythedragonsl ya
01:40 timotimo that was a good one
01:41 * timotimo clickbaits https://p6weekly.wordpress.com/2017/02/07/2017-06-fosdem-after-math/
01:41 AlexDaniel joined #perl6
01:43 mrdside joined #perl6
01:43 mrdside hi! how can i open file with "KOI8-R Cyrillic" encoding?
01:43 timotimo oh yikes
01:44 jeffythedragonsl joined #perl6
01:44 jeffythedragonsl nice
01:44 timotimo mrdside: you can read it in as binary and copy-paste the table from https://en.wikipedia.org/wiki/KOI8-R to turn it into a list of unicode characters (with the chr sub)
01:45 mrdside maybe i can convert it in shell?
01:45 mrdside i need fast solution
01:46 mrdside convert and than read in perl
01:46 timotimo yeah, a program called "iconv" can help you here
01:46 timotimo kind of like iconv -f koi8-r -t utf8 my_file_with_cyrillic.txt
01:46 timotimo might want to put a -o output_file.txt in there, too
01:46 timotimo so it'll end up in a file rather than in your shell
01:47 samcv i like koi fish
01:48 samcv nice KOI is so old it was designed by the soviet union
01:49 cdg joined #perl6
01:49 jeffythedragonsl well if you see another easy moarvm issue send me an email
01:50 meept joined #perl6
01:51 MasterDuke jeffythedragonsl: i would think https://github.com/MoarVM/MoarVM/issues/513 is approachable
01:51 mrdside don't work with Cyrillic
01:51 mrdside only KIOR-8
01:52 mrdside timotino: i need collect data from two text files in this encoding
01:52 * IOninja reads new GitHub terms of service
01:54 IOninja A few months ago there was a question on how contributions to rakudo from people without CLA work legally. Per GitHub terms, they automatically become licensed under the same license as Rakudo and the submitter is responsible for being permitted legally to submit their content
01:54 BenGoldberg joined #perl6
01:54 timotimo mrdside: isn't that exactly what you need?
01:54 timotimo i'm confused
01:54 samcv IOninja, link to changes for github TOS?
01:54 samcv mrdside, i would just convert using some utility to unicode and then work with it
01:55 IOninja samcv: https://github.com/blog/2314-new-github-terms-of-service
01:55 samcv what i don't get a diff of the changes?
01:55 samcv thanks github
01:56 mrdside timotimo: i have two files, and i need get strings from both, compare, and collect by people names (file in specific format)
01:56 samcv compare how?
01:56 samcv to check if equal?
01:56 mrdside compare by people names
01:56 timotimo if you don't care what the actual strings are, you can just compare them byte-by-byte and not decode at all
01:57 samcv hah timotimo
01:59 mrdside timotimo: sound good, and, i think, enough for me
02:00 timotimo cool
02:00 IOninja Sounds like we should stick CLA's license into rakudo's repo or something. Aristic 2.0 says if we modify's someone's property, we need to clearly document how our changes make it different.
02:01 timotimo my suggestion, though, is to decode the files as latin1
02:01 * IOninja goes to bed
02:01 timotimo so you can use string functions then
02:01 mrdside Malformed UTF-8
02:02 timotimo decode it as latin-1
02:02 timotimo i.e. open with :enc<latin-1>
02:02 mrdside abracadabra
02:03 mrdside but, at least, more symbols ))
02:03 timotimo yeah, you'll see a bit of crap
02:03 BenGoldberg m: use experimental :macros; macro twice($q) { return quasi {  {{{$q}}}, {{{$q}}}  } }; twice say 42;
02:03 camelia rakudo-moar 51b0ab: OUTPUT«42␤42␤»
02:03 BenGoldberg m: use experimental :macros; macro prefix:<twice>($q) { return quasi {  {{{$q}}}, {{{$q}}}  } }; twice say 42;
02:03 camelia rakudo-moar 51b0ab: OUTPUT«42␤42␤»
02:03 BenGoldberg m: use experimental :macros; macro postfix:<twice>($q) { return quasi {  {{{$q}}}, {{{$q}}}  } };  say 42 twice;
02:03 camelia rakudo-moar 51b0ab: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3uasi {  {{{$q}}}, {{{$q}}}  } };  say 427⏏5 twice;␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end…»
02:04 timotimo but as long as you write it back correctly and never change things it'll be just fine
02:04 BenGoldberg Can anyone well me why that third one doesn't work?
02:05 BenGoldberg s/well/tell/
02:06 mrdside timotimo: work after `iconv` to `utf-8`
02:06 mrdside timotimo: and read `my $fh = open("1-utf.txt", :r)`
02:09 labster joined #perl6
02:09 cibs joined #perl6
02:09 timotimo ah
02:12 sammers timotimo, thanks
02:16 samcv nice mrdside
02:17 samcv .o0( curious how russian names sort differently with .sort versus .collate right now)
02:17 mrdside samcv: i don't think so, bacuase how can i get file with right data after work?
02:17 samcv what?
02:18 samcv oh i was meaning `use experimental :collation` and then sorting names with .collate instead of .sort (you have to be on moar-blead git branch)
02:21 samcv could be very significant if you are sorting names which have normal latin letters with ones that have cyrillic letters
02:22 gdonald joined #perl6
02:23 samcv m: say ('Бруно','Вадим').sort
02:23 camelia rakudo-moar 51b0ab: OUTPUT«(Бруно Вадим)␤»
02:23 samcv m: use experimental :collation; say ('Бруно','Вадим').collate
02:23 camelia rakudo-moar 51b0ab: OUTPUT«(Бруно Вадим)␤»
02:23 samcv hmm not sure why .sort sorts that way. but i guess that B is not a latin b?
02:23 samcv the capitac lB
02:23 samcv capital B
02:24 samcv m: 'В'.uniname.say
02:24 camelia rakudo-moar 51b0ab: OUTPUT«CYRILLIC CAPITAL LETTER VE␤»
02:24 AlexDaniel Б is b :)
02:24 samcv that would do it
02:24 samcv no i know that
02:24 samcv m: use experimental :collation; say ('Brian', 'Бруно','Вадим').collate
02:24 camelia rakudo-moar 51b0ab: OUTPUT«(Brian Бруно Вадим)␤»
02:24 samcv m: use experimental :collation; say ('Applesauce', 'Brian', 'Бруно','Вадим').collate
02:24 camelia rakudo-moar 51b0ab: OUTPUT«(Applesauce Brian Бруно Вадим)␤»
02:24 samcv m: use experimental :collation; say ('Applesauce', 'Brian', 'Бруно','Вадим').sort
02:24 camelia rakudo-moar 51b0ab: OUTPUT«(Applesauce Brian Бруно Вадим)␤»
02:24 pyrimidine joined #perl6
02:25 samcv m: use experimental :collation; say ('ZZZ', 'Applesauce', 'Brian', 'Бруно','Вадим').sort
02:25 camelia rakudo-moar 51b0ab: OUTPUT«(Applesauce Brian ZZZ Бруно Вадим)␤»
02:25 samcv m: use experimental :collation; say ('ZZZ', 'Applesauce', 'Brian', 'Бруно','Вадим').collate
02:25 camelia rakudo-moar 51b0ab: OUTPUT«(Applesauce Brian ZZZ Бруно Вадим)␤»
02:25 AlexDaniel m: use experimental :collation; say ('Applesauce', 'Brian', 'Бруно','Вадим', 'Ананас').sort
02:25 camelia rakudo-moar 51b0ab: OUTPUT«(Applesauce Brian Ананас Бруно Вадим)␤»
02:25 samcv m: use experimental :collation; say ('ZZZ', 'Applesauce', 'Brian', 'Бруно','Вадим').collate
02:25 camelia rakudo-moar 51b0ab: OUTPUT«(Applesauce Brian ZZZ Бруно Вадим)␤»
02:25 samcv hmm interesting
02:26 * AlexDaniel doesn't see how this is different from the regular unicode order
02:26 samcv it doesn't seem to be in this case
02:27 AlexDaniel m: use experimental :collation; say ('Applesauce', 'Brian', 'Бруно','Вадим', 'Ананас').collate
02:27 camelia rakudo-moar 51b0ab: OUTPUT«(Applesauce Brian Ананас Бруно Вадим)␤»
02:27 samcv m: use experimental :collation; say ('ZZZ', 'zephyer', 'Applesauce', 'Brian', 'Бруно','Вадим').sort
02:27 camelia rakudo-moar 51b0ab: OUTPUT«(Applesauce Brian ZZZ zephyer Бруно Вадим)␤»
02:27 samcv m: use experimental :collation; say ('ZZZ', 'zephyer', 'applesauce', 'Applesauce', 'Brian', 'Бруно','Вадим').sort
02:27 camelia rakudo-moar 51b0ab: OUTPUT«(Applesauce Brian ZZZ applesauce zephyer Бруно Вадим)␤»
02:27 samcv m: use experimental :collation; say ('ZZZ', 'zephyer', 'applesauce', 'Applesauce', 'Brian', 'Бруно','Вадим').collate
02:27 camelia rakudo-moar 51b0ab: OUTPUT«(applesauce Applesauce Brian zephyer ZZZ Бруно Вадим)␤»
02:28 samcv the rusian letters just seem to be in the correctish order
02:28 samcv unlike the ascii latin letters
02:28 samcv tho might change when you put russian lowercase in there i'm not sure if lowercase comes before uppercase or the converse in unicode
02:28 AlexDaniel m: use experimental :collation; say ('ZZZ', 'zephyer', 'applesauce', 'Applesauce', 'Brian', 'Бруно','Вадим', 'бруно', 'вадим').collate
02:28 camelia rakudo-moar 51b0ab: OUTPUT«(applesauce Applesauce Brian zephyer ZZZ бруно вадим Бруно Вадим)␤»
02:30 adu joined #perl6
02:30 samcv m: use experimental :collation; my @array = ('ZZZ', 'zephyer', 'applesauce', 'Applesauce', 'Brian', 'Бруно','Вадим'); @array.append(@array.».lc.flat); @array .= sort.unique; say @array.collate
02:30 camelia rakudo-moar 51b0ab: OUTPUT«(applesauce applesauce applesauce Applesauce brian Brian zephyer zephyer zzz ZZZ бруно вадим Бруно Вадим)␤»
02:31 samcv m: use experimental :collation; my @array = ('ZZZ', 'zephyer', 'applesauce', 'Applesauce', 'Brian', 'Бруно','Вадим'); @array.append(@array.».lc.flat); @array .= sort.unique; say @array.sort
02:31 camelia rakudo-moar 51b0ab: OUTPUT«(Applesauce Brian ZZZ applesauce applesauce applesauce brian zephyer zephyer zzz Бруно Вадим бруно вадим)␤»
02:34 samcv m: use experimental :collation; my @array = ('ZZZ', 'zephyer', 'applesauce', 'Applesauce', 'Brian', 'Бруно','Вадим'); @array.append(|@array.».lc, |@array.».uc); @array = @array.sort.unique; say @array.collate
02:34 camelia rakudo-moar 51b0ab: OUTPUT«(applesauce Applesauce APPLESAUCE brian Brian BRIAN zephyer zzz ZEPHYER ZZZ бруно вадим Бруно БРУНО Вадим ВАДИМ)␤»
02:35 samcv m: use experimental :collation; my @array = ('ZZZ', 'zephyer', 'applesauce', 'Applesauce', 'Brian', 'Бруно','Вадим'); @array.append(|@array.».lc, |@array.».uc); @array = @array.sort.unique; say @array
02:35 camelia rakudo-moar 51b0ab: OUTPUT«[APPLESAUCE Applesauce BRIAN Brian ZEPHYER ZZZ applesauce brian zephyer zzz БРУНО Бруно ВАДИМ Вадим бруно вадим]␤»
02:36 samcv m: use experimental :collation; my @array = ('ZZZ', 'zephyer', 'applesauce', 'Applesauce', 'Brian', 'Бруно','Вадим'); @array.append(|@array.».lc, |@array.».uc); @array = @array.sort.unique; $*COLLATION.set(:primary(False)); say @array.collate
02:36 camelia rakudo-moar 51b0ab: OUTPUT«(applesauce brian zephyer zzz бруно вадим Applesauce APPLESAUCE Brian BRIAN ZEPHYER ZZZ Бруно БРУНО Вадим ВАДИМ)␤»
02:36 samcv nice. it sorted by case
02:36 samcv irrespective of what the letters where
02:36 Ben_Goldberg joined #perl6
02:37 samcv fancy!
02:38 samcv i have been meaning to test my implementation of UCA against the UCA test provided by unicode
02:39 samcv i think i'll do that today
02:39 BenGoldberg It seems so strange that you use a global, $*COLLATION ...
02:39 samcv well it's a dynamic variable
02:39 BenGoldberg What if two threads want to do it differently?
02:40 samcv well not sure if we have it this way yet, but the plan is to do $*COLLATION = Collation.new;
02:40 samcv inside a block
02:40 mrdside joined #perl6
02:40 mrdside timotimo: i solved with service `https://2cyr.com/decode/`
02:41 BenGoldberg Personally, I'd be more comfortable doing: my $collation = Collation.new; $collation.sort(@array)
02:46 timotimo thing is that with the dynamic var you can tell routines that live outside your "jurisdiction" how to sort stuff
02:46 timotimo but it'd be interesting to have the .sort or .collate method on the Collation, too
02:46 samcv joined #perl6
02:47 labster joined #perl6
02:48 adu hi all
02:55 user__ joined #perl6
02:59 samcv hello
03:01 samcv omg gather take is amazing
03:01 samcv can lazy gather process the lines of this unicode collation test file. and lazily convert the line into a string, since there's like 200,000 lines to the file. it makes a huge difference
03:02 samcv and that's the short file ;)
03:03 labster1 joined #perl6
03:13 circ-user-Bpuqu joined #perl6
03:17 circ-user-Bpuqu I'm just want to know if it valid:
03:24 circ-user-Bpuqu say ('a'..'c') ~~ ('a'..'c');
03:24 MasterDuke m: say ('a'..'c') ~~ ('a'..'c');
03:24 camelia rakudo-moar 51b0ab: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5a' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
03:25 samcv well it passes most of the Unicode Collation Algorithm test. i'm hoping the failing ones are due to it not supporting collation weights for multiple codepoints
03:25 samcv because it's not just single codepoints that can have collation weights, but series of codepoints
03:26 samcv m: say  ('a'..'c') eqv ('a'..'c');
03:26 camelia rakudo-moar 51b0ab: OUTPUT«True␤»
03:27 MasterDuke m: say ('a'..'c').list ~~ ('a'..'c').list;
03:27 camelia rakudo-moar 51b0ab: OUTPUT«True␤»
03:27 MasterDuke m: say ('a'..'c').list ~~ ('a'..'z').list;
03:27 camelia rakudo-moar 51b0ab: OUTPUT«False␤»
03:28 agentzh joined #perl6
03:33 samcv m: ('a'.. 'c').WHAT
03:33 camelia rakudo-moar 51b0ab: ( no output )
03:34 samcv m: ('a'.. 'c').WHAT.say
03:34 camelia rakudo-moar 51b0ab: OUTPUT«(Range)␤»
03:34 samcv what would smart match do for Ranges?
03:34 samcv m: say ('a'..'c').list ~~ ('a'..'d').list
03:34 camelia rakudo-moar 51b0ab: OUTPUT«False␤»
03:36 MasterDuke m: say (1..3) ~~ (1..3);
03:36 camelia rakudo-moar 51b0ab: OUTPUT«True␤»
03:38 MasterDuke m: say 'a' > 'c'
03:38 camelia rakudo-moar 51b0ab: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5a' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
03:54 Lucas_One left #perl6
03:58 samcv m: say 'a' before 'c'
03:58 camelia rakudo-moar 51b0ab: OUTPUT«True␤»
04:00 gdonald joined #perl6
04:02 wamba joined #perl6
04:03 MasterDuke m: say 'a' gt 'c'
04:03 camelia rakudo-moar 51b0ab: OUTPUT«False␤»
04:04 masak m: say 'bros' before 'garden hoes'
04:04 camelia rakudo-moar 51b0ab: OUTPUT«True␤»
04:04 masak or is that 'garden hoses'? not sure.
04:05 samcv m: say 'Z' gt 'a'
04:05 camelia rakudo-moar 51b0ab: OUTPUT«False␤»
04:06 skids joined #perl6
04:06 samcv lameo
04:06 samcv Error encoding UTF-8 string: could not encode codepoint 55296
04:06 samcv in sub proclaim at /home/samantha/perl6/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 605
04:07 samcv odd that the error happens in Test module and not in my own code...
04:07 samcv m: 55296.uniname.say
04:07 camelia rakudo-moar 51b0ab: OUTPUT«<Non Private Use High Surrogate>␤»
04:09 samcv not sure to deal with these High Surrogates
04:10 samcv i wonder if i can just remove them and it should be fine?
04:10 samcv m: 55296.base(16).say
04:10 camelia rakudo-moar 51b0ab: OUTPUT«D800␤»
04:11 samcv m: Uni.new(0xD800, 0x0021)
04:11 camelia rakudo-moar 51b0ab: ( no output )
04:11 samcv m: Uni.new(0xD800, 0x0021).say
04:11 camelia rakudo-moar 51b0ab: OUTPUT«Uni:0x<d800 0021>␤»
04:11 samcv m: Uni.new(0xD800, 0x0021).Str
04:11 camelia rakudo-moar 51b0ab: ( no output )
04:11 samcv m: Uni.new(0xD800, 0x0021).Str.say
04:11 camelia rakudo-moar 51b0ab: OUTPUT«Error encoding UTF-8 string: could not encode codepoint 55296␤  in block <unit> at <tmp> line 1␤␤»
04:11 samcv m: Uni.new(0xD800, 0x0021).Str.ords
04:11 camelia rakudo-moar 51b0ab: ( no output )
04:11 samcv m: Uni.new(0xD800, 0x0021).Str.ords.say
04:11 camelia rakudo-moar 51b0ab: OUTPUT«(55296 33)␤»
04:11 samcv hmmmmm
04:12 jdmmmmm joined #perl6
04:12 samcv m: 55296.uniprop('MVM_Collation_Primary').say
04:12 camelia rakudo-moar 51b0ab: OUTPUT«0␤»
04:12 samcv m: 'a'.uniprop('MVM_Collation_Primary').say
04:12 camelia rakudo-moar 51b0ab: OUTPUT«0␤»
04:13 samcv forget the name of that property
04:14 Eddward joined #perl6
04:14 samcv m: 'a'.uniprop('MVM_COLLATION_PRIMARY').say
04:14 camelia rakudo-moar 51b0ab: OUTPUT«7240␤»
04:14 samcv m: 55296.uniprop('MVM_COLLATION_PRIMARY').say
04:14 camelia rakudo-moar 51b0ab: OUTPUT«0␤»
04:14 samcv m: 0021.chr.say
04:14 camelia rakudo-moar 51b0ab: OUTPUT«Potential difficulties:␤    Leading 0 does not indicate octal in Perl 6. Please use 0o021 if you mean that.␤    at <tmp>:1␤    ------> 00217⏏5.chr.say␤␤»
04:14 samcv m: 0x0021.chr.say
04:14 camelia rakudo-moar 51b0ab: OUTPUT«!␤»
04:14 samcv ok i guess i can just ignore those
04:15 samcv is there a way i can grep -v in perl 6?
04:15 samcv i never figured out how to grep OUT things
04:16 MasterDuke m: say ^9 .grep({ not $_ > 3})
04:16 camelia rakudo-moar 51b0ab: OUTPUT«(0 1 2 3)␤»
04:16 MasterDuke m: say ^9 .grep({ $_ > 3})
04:16 camelia rakudo-moar 51b0ab: OUTPUT«(4 5 6 7 8)␤»
04:17 samcv that is lta
04:17 samcv should be an easy way to do that
04:18 samcv we need a named parameter please
04:20 Eddward Is there a trick to getting at the bytes behind a string?
04:20 samcv yes
04:20 samcv do you want to encode it as utf-8? or uh
04:21 samcv what do you want, the codepoints?
04:21 samcv what are you doing with these bytes. do you want the bytes the string would be in if you wrote it to a file?
04:21 Eddward I'm trying to find the difference between "Più" & "Più" and why it gets changed passing through p6
04:21 samcv m: "Più".uninames.say; "Più".uninames.say
04:21 camelia rakudo-moar 51b0ab: OUTPUT«(LATIN CAPITAL LETTER P LATIN SMALL LETTER I LATIN SMALL LETTER U WITH GRAVE)␤(LATIN CAPITAL LETTER P LATIN SMALL LETTER I LATIN SMALL LETTER U WITH GRAVE)␤»
04:22 samcv Eddward, are they not the same?
04:22 samcv tell me what the differences are between the two
04:23 samcv i have been working on lots of Unicode stuff in the backend for perl 6 so i can probably figure out what is happening
04:23 MasterDuke m: say "Più".ords; say "Più".ords
04:23 camelia rakudo-moar 51b0ab: OUTPUT«(80 105 249)␤(80 105 249)␤»
04:23 Eddward In a file processed by p5 the u is 3 bytes.  The version processed by p6 is 2 bytes.
04:23 MasterDuke i get a different result on my machine
04:23 samcv perl 5 doesn't care about unicode though
04:24 MasterDuke (80 105 249) vs (80 105 117 1114109 120 67 67 1114109 120 56 48)
04:24 samcv they are equivelant unicode strings
04:24 samcv wtf
04:24 samcv Eddward, what are you trying to do? are you reading from a file that is not normalized unicode?
04:25 samcv MasterDuke, what is perl's equivilant of ords?
04:25 samcv Eddward, i can help you if you can tell me the codepoints of both strings
04:25 Eddward I'm reading an sqlite db generated by a mono program.  I read out a file URI with the characters (mostly) uri escaped.
04:25 samcv from what perl 5 sees
04:26 MasterDuke samcv: don't know
04:26 Eddward Will the output of a hex editor help?
04:26 samcv sprintf '%2.2x', unpack('U0U*', $char)
04:26 Eddward 00000000: 4164 6167 696f 202d 2050 6975 cc80 2061  Adagio - Piu.. a
04:26 samcv Eddward, can you do that for both strings?
04:26 Eddward 00000000: 4164 6167 696f 202d 2050 69c3 b920 616e  Adagio - Pi.. an
04:26 samcv no i don't want hex of the file. that's utf-8 encoded
04:27 samcv if you can sprintf '%2.2x', unpack('U0U*', $char) # then i can help you see why it's different in perl 6. i suspend the strings are equal when normalized. one may be decomposed
04:27 pyrimidine joined #perl6
04:28 Eddward That's the text file I'm generating.  It's a playlist for an mp3 player.  The second one is what p6 generates.  If I ls the file, it doesn't find it.
04:28 Eddward Does p6 not write utf8 by default on linux?
04:28 samcv no it writes utf8
04:28 samcv but perl 6 normalizes all unicode to the canonical representation
04:28 Eddward I can't generate the 3 byte version in perl6.
04:29 Eddward That's my problem.
04:29 samcv because that's not the proper unicode representation?
04:29 samcv i'm not sure why you want to generate it
04:29 Eddward I need the 3 byte version because that's the file name in the fs.  perl6 is creating a 2 byte version.
04:29 samcv oh....
04:29 samcv crap
04:29 samcv fug
04:30 samcv this makes me sad then
04:30 Eddward Sorry to share sadness.  :(
04:30 samcv well the true solution would be to have the filenames on the filesystem be canonical unicode representation, but that doesn't totally help you
04:30 samcv though it might
04:31 samcv i think perl 6 can handle filenames which aren't in canonical unicode form though
04:31 Eddward Not really.  I've already had to put a hack in my code because the URI escaping it's "right".
04:31 samcv i think mac os x saves the canonical representation or something
04:32 samcv can you rename the files?
04:33 Eddward I could rename it, but I'm not super keen on renaming files because a toy script can't handle it.
04:33 Eddward Is that a linux bug or an arbitrary decision?
04:33 samcv linux doesn't do anything with unicode, it just saves the filename exactly how it was specified
04:33 samcv unlike mac os x
04:33 Eddward I'm just trying to translate a perl5 script to learn perl6 and I'm able to declare defeat.
04:34 samcv well that's the source of the issue, the filenames are not saved with their proper unicode codepoint sequences
04:34 samcv so i'm guessing these files were generated with perl 5?
04:34 Eddward The file is from the openmus project.  I'd think they'd have caught heck for making files with corrupt names.
04:34 samcv unlikely Eddward
04:35 Eddward The file is Symphony No. 1 in C Minor, Op. 68 - IV. Adagio - Più andante - Allegro non troppo, ma con brio.mp3
04:35 Eddward I just unzipped it.
04:35 samcv link to it?
04:35 Eddward well, not just now....
04:35 Eddward Let me go find it....
04:35 samcv oh thanks!
04:36 samcv i'm guessing it's saved decomposed
04:36 samcv m: say 'ù'.ords
04:36 camelia rakudo-moar 51b0ab: OUTPUT«(249)␤»
04:36 samcv m: say 'ù'.NFD.say
04:36 camelia rakudo-moar 51b0ab: OUTPUT«NFD:0x<0075 0300>␤True␤»
04:36 samcv m: say 'ù'.NFD
04:36 camelia rakudo-moar 51b0ab: OUTPUT«NFD:0x<0075 0300>␤»
04:36 samcv yeah it's probbaly saved as 0x75, 0x300
04:37 samcv which is what causes it to be stored in more bytes
04:38 samcv i think os x
04:39 samcv will allow you to access a file as 0x75, 0x300, even if on disk it's codepoint 249
04:39 samcv which is pretty smart
04:39 Actualeyes joined #perl6
04:39 samcv Eddward, will you be here in 20 minutes
04:40 Eddward I think
04:40 Cabanoss- joined #perl6
04:40 samcv ok i will be back in 20 minutes :) please stick around and find the link to those files and that would be great :)
04:40 Eddward https://archive.org/download/musopen-dvd/Musopen-DVD.zip/Musopen%20DVD%2FBrahms%20-%20Symphony%20No%201%20in%20C%20Major%2FSymphony%20No.%201%20in%20C%20Minor%2C%20Op.%2068%20-%20IV.%20Adagio%20-%20Piu%CC%80%20andante%20-%20Allegro%20non%20troppo%2C%20ma%20con%20brio.mp3
04:41 Eddward ok
04:43 Eddward The dvd is probably bigger than you want: https://archive.org/details/musopen-dvd
04:43 Eddward But the single file download was saved as a 3 byte code by firefox.  I'll check back...
04:49 LeCamarade joined #perl6
04:51 LeCamarade joined #perl6
04:53 LeCamarade joined #perl6
04:56 samcv ok i'm back
04:57 alt1LeCamarade joined #perl6
04:59 samcv Eddward, it seems to read the file name properly i think
04:59 samcv with the non-normalized unicode
04:59 alt1LeCamarade joined #perl6
05:00 Eddward Perl6 reads it?
05:00 samcv maybe. i'm investigating
05:01 Eddward I'm trying to create a playlist (with perl6) can will have the paths that another program will use to then play it.
05:01 Eddward If I do an ls with the normalized version created by p6, ls fails.
05:01 samcv idk i get
05:01 samcv "Symphony No. 1 in C Minor, Op. 68 - IV. Adagio - Piu􏿽xCC􏿽x80 andante - Allegro non troppo, ma con brio.mp3".IO
05:01 Eddward I'm guess mpd will fail to, but I haven't tested that.
05:02 samcv let me try and move the file
05:02 samcv or something
05:02 Eddward I think I'm going through the entirely wrong approach here.
05:02 samcv well i can get the size of the file fine
05:02 Eddward I should probably be dealing with buffers or something.
05:02 samcv ok so what are you doing again? making a playlist?
05:02 samcv from a folder of music files?
05:04 alt1LeCamarade joined #perl6
05:04 Eddward I'm reading the music library DB file for banshe (written in mono I believe) and dumping all of it's playlists in m3u files so I can load them onto a portable music player running mpd and one of the many mpd clients.
05:04 Eddward err banshee
05:05 samcv hm
05:05 Eddward I have a working version written in perl5.  I'm testing against it.
05:06 samcv ok it seems to be reading it oddly
05:06 altLeCamarade joined #perl6
05:06 samcv the filename. it's possible it has invalid unicode characters in it
05:06 samcv or there's a bug
05:06 samcv i get "Symphony No. 1 in C Minor, Op. 68 - IV. Adagio - Piu􏿽xCC􏿽x80 andante - Allegro non troppo, ma con brio.mp3".IO
05:06 samcv and i get a private use character in it
05:07 Eddward I've learned a bit of perl6 cli handling, DBIish and got practical experience with chaining operation on lazy lists.  It's been great for learning, but I think I just hit a problem That's beyond me.
05:07 Eddward The file maybe invalid, but so far, perl6 is thing only thing on any of my systems that has called foul.
05:08 Eddward It seems right in an "I don't care" kind of way.
05:09 Eddward For what it's worth, this page shows the 2 byte version.  https://musopen.org/music/1564/johannes-brahms/symphony-no-1-in-c-minor-op-68/
05:09 Eddward I can't download it since I don't have an account.  I'm not sure if the zipped CD image would be any different.
05:10 pyrimidine joined #perl6
05:12 samcv ok perl says the codepoints are 83,121,109,112,104,111,110,121,32,78,111,46,32,49,32,105,110,32,67,32,77,105,110,111,114,44,32,79,112,46,32,54,56,32,45,32,73,86,46,32,65,100,97,103,105,111,32,45,32,80,105,117,204,128,32,97,110,100,97,110,116,101,32,45,32,65,108,108,101,103,114,111,32,110,111,110,32,116,114,111,112,112,111,44,32,109,97,32,99,111,110,32,98,114,105,111,46,109,112,51
05:12 samcv which is not what perl 6 says
05:12 samcv m: Uni.new(83,121,109,112,104,111,110,121,32,78,111,46,32,49,32,105,110,32,67,32,77,105,110,111,114,44,32,79,112,46,32,54,56,32,45,32,73,86,46,32,65,100,97,103,105,111,32,45,32,80,105,117,204,128,32,97,110,100,97,110,116,101,32,45,32,65,108,108,101,103,114,111,32,110,111,110,32,116,114,111,112,112,111,44,32,109,97,32,99,111,110,32,98,114,105,111,46,109,112,51).Str.ords.say
05:12 camelia rakudo-moar 51b0ab: OUTPUT«(83 121 109 112 104 111 110 121 32 78 111 46 32 49 32 105 110 32 67 32 77 105 110 111 114 44 32 79 112 46 32 54 56 32 45 32 73 86 46 32 65 100 97 103 105 111 32 45 32 80 105 117 204 128 32 97 110 100 97 110 116 101 32 45 32 65 108 108 101 103 114 111 32 11…»
05:13 samcv m: say Uni.new(83,121,109,112,104,111,110,121,32,78,111,46,32,49,32,105,110,32,67,32,77,105,110,111,114,44,32,79,112,46,32,54,56,32,45,32,73,86,46,32,65,100,97,103,105,111,32,45,32,80,105,117,204,128,32,97,110,100,97,110,116,101,32,45,32,65,108,108,101,103,114,111,32,110,111,110,32,116,114,111,112,112,111,44,32,109,97,32,99,111,110,32,98,114,105,111,46,109,112,51).Str.ords eq (83,121,109,112,104,111,110,121,32,78,111,46,32,49,32,105,110,32,67,32,77,105,11
05:13 samcv 0,111,114,44,32,79,112,46,32,54,56,32,45,32,73,86,46,32,65,100,97,103,105,111,32,45,32,80,105,117,204,128,32,97,110,100,97,110,116,101,32,45,32,65,108,108,101,103,114,111,32,110,111,110,32,116,114,111,112,112,111,44,32,109,97,32,99,111,110,32,98,114,105,111,46,109,112,51)
05:13 camelia rakudo-moar 51b0ab: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in parenthesized expression; couldn't find final ')' ␤at <tmp>:1␤------> 1,46,32,49,32,105,110,32,67,32,77,105,117⏏5<EOL>␤    expecting any of:␤        statement en…»
05:13 samcv i think irc cut me off oh well will try on my computer
05:13 Eddward I suspect URI::escape maybe be changing it, but I don't know that.
05:14 pyrimidine joined #perl6
05:14 Eddward m: say Uni.new(83,121,109,112,104,111,110,121,32,78,111,46,32,49,32,105,110,32,67,32,77,105,110,111,114,44,32,79,112,46,32,54,56,32,45,32,73,86,46,32,65,100,97,103,105,111,32,45,32,80,105,117,204,128,32,97,110,100,97,110,116,101,32,45,32,65,108,108,101,103,114,111,32,110,111,110,32,116,114,111,112,112,111,44,32,109,97,32,99,111,110,32,98,114,105,111,46,109,112,51).Str.ords eq (83,121,109,112,104,1
05:14 camelia rakudo-moar 51b0ab: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in parenthesized expression; couldn't find final ')' ␤at <tmp>:1␤------> 12,51).Str.ords eq (83,121,109,112,104,17⏏5<EOL>␤    expecting any of:␤        statement en…»
05:14 Eddward 11,110,121,32,78,111,46,32,49,32,105,110,32,67,32,77,105,110,111,114,44,32,79,112,46,32,54,56,32,45,32,73,86,46,32,65,100,97,103,105,111,32,45,32,80,105,117,204,128,32,97,110,100,97,110,116,101,32,45,32,65,108,108,101,103,114,111,32,110,111,110,32,116,114,111,112,112,111,44,32,109,97,32,99,111,110,32,98,114,105,111,46,109,112,51)
05:14 Eddward Did it to me too.
05:15 Eddward # todo - automatic invalid UTF-8 detection
05:15 Eddward # see http://www.w3.org/International/questions/qa-forms-utf-8
05:15 Eddward #     find first sequence of %[89ABCDEF]<.xdigit>
05:15 Eddward #         use algorithm from url to determine if it's valid UTF-8
05:16 Eddward sub uri-unescape(*@to_unesc, Bool :$no-utf8 = False) is export {
05:16 Eddward my @rc = @to_unesc.flatmap: {
05:16 Eddward .trans('+' => ' ')\
05:16 Eddward .subst(:g, / [ '%' (<.xdigit> ** 2 ) ]+ /, -> $/ {
05:16 Eddward $no-utf8
05:16 Eddward ?? $0.flatmap({ :16(~$_).chr }).join
05:16 Eddward !! Buf.new($0.flatmap({ :16(~$_) })).decode('UTF-8')
05:16 Eddward })
05:16 Eddward };
05:16 Eddward return |@rc;
05:16 Eddward }
05:16 Eddward I wonder if I need that utf8 flag.
05:18 samcv where is that stuff you just pasted from?
05:18 samcv the uri code?
05:18 samcv yeah it may be invalid utf-8. i suspect it may be
05:19 samcv for filenames it converts invalid utf-8 to synthetic codepoints
05:19 samcv so that it doesn't 'lose' them
05:19 samcv since it can't convert to a normal unicode string
05:19 jeffythedragonsl joined #perl6
05:20 samcv Eddward, make sure to enable unicode strings and utf8, always as a matter of policy
05:20 samcv otherwise odd things can happen
05:20 samcv i don't think this is related to that, i'm sure your script will work with them (most likely)
05:21 Eddward rakudo-star-2017.01/modules/uri/lib/URI/Escape.pm
05:21 samcv ah that's the one you're using?
05:21 samcv though i think the problem is invalid utf-8
05:21 Eddward I was told to use that by IOninja.
05:22 samcv yeah i think that's probbaly working fine. but if we have utf-8 that's not being decoded, then you'll get a wrong thing
05:22 samcv get the wrong URI if you're using the filename
05:22 samcv maybe there's some utility we can use to batch rename files in valid utf-8?
05:23 Eddward I'm using uri_unescape to decode the URI in the DB file.
05:23 Eddward I'm not super eager to change a bunch of files on my system for this.
05:24 Eddward I'm kinda of the opinion that the file name is what the file name is, when the tool likes it or not.
05:24 samcv i suspend if the files had valid utf-8 names perl 6 would process it fine
05:24 samcv even if it's invalid utf-8?
05:25 Eddward Well yes, but they aren't I gues, but the system and other tools handle it ok.
05:25 samcv i suspend they have some way to handle invalid utf-8 and convert it to valid utf-8
05:26 gfldex "On malformed utf-8 .decode will throw X::AdHoc. To handle sloppy utf-8 use utf8-c8."
05:26 Eddward ls can see it with the current name.  It's can't see it with the correct encoding.
05:27 samcv gfldex, it won't throw if the filename is invalid utf-8
05:27 samcv it just uses utf8-c8 to decode filenames regardless
05:27 samcv gfldex, if you want to try and download the file yourself: https://archive.org/download/musopen-dvd/Musopen-DVD.zip/Musopen%20DVD%2FBrahms%20-%20Symphony%20No%201%20in%20C%20Major%2FSymphony%20No.%201%20in%20C%20Minor%2C%20Op.%2068%20-%20IV.%20Adagio%20-%20Piu%CC%80%20andante%20-%20Allegro%20non%20troppo%2C%20ma%20con%20brio.mp3
05:27 samcv and see what you think
05:28 Eddward So is it safe to say perl6 can't handle this data?
05:28 * gfldex takes notes
05:28 samcv yes it would seem supposing this is invalid utf-8, perl 6 is unable to correct it to what it should beq
05:28 Eddward I'm just processing path data.
05:28 gfldex it's safe to say Rakudo can't handle it and it may or may not be a bug
05:29 gfldex may be worth a bugreport
05:29 samcv afaik moarvm retains all invalid utf-8
05:30 samcv either that or it's a bug in utf8-c8 and it is valid but it's not decoding it right
05:31 samcv one of the two
05:31 samcv though i'm inclined to think more likely it's slightly invalid in some way
05:32 Eddward I'm fine with it being invalid if the OS is.  I want to preserve it an round trip it like I do in the perl5 version of the script.
05:32 Eddward Thanks anyway.  I think this is where I give up.
05:32 samcv well it can preverse it due to round trip
05:32 samcv but it cannot pull out what other things are seeing the filename is
05:32 samcv *preserve
05:33 Eddward :-)
05:33 samcv heh
05:33 samcv but if i do qx{ls}.trim.IO.s
05:34 Eddward To me, the round trip is, banshee scanned the files system and created the DB.  The script reads the DB and produces playlists, the music player reads the playlist and can open the file.
05:34 samcv yeah so minimum it seems other tools can figure out what its name should be. so hopefully we can figure out how to do the same
05:34 Eddward ooh, I'll try that.  I'm curious.
05:35 samcv i'm going to open a ticket for MoarVM
05:36 Eddward OK.  Should I gather other/better data?
05:38 samcv well what you can do i guess is try getting the file's name using some utility with qx{find .} which should get all the files in the folder
05:38 samcv and then try and check filename.IO.e
05:39 samcv which checks if it exists
05:39 Eddward How do I get codepoints from a string?
05:39 samcv .ords
05:39 samcv m: say "hello".ords
05:39 camelia rakudo-moar 51b0ab: OUTPUT«(104 101 108 108 111)␤»
05:39 samcv m: say "hello".ords.perl
05:39 camelia rakudo-moar 51b0ab: OUTPUT«(104, 101, 108, 108, 111).Seq␤»
05:39 samcv .perl is usually best to output, because you can literally copy the outputted text and it's valid perl 6 code. similar to javascript has JSON
05:41 Eddward 80, 105, 249 is what I get from the qx{ls ...}
05:41 samcv Eddward, https://github.com/MoarVM/MoarVM/issues/525
05:41 samcv should subscribe to that if you have a github account
05:42 samcv Eddward, `say $_.IO.e for qx{find .}.lines`
05:43 samcv in a folder with the problem file that has two other files as well i get "True␤False␤True"
05:43 samcv that is how you can see if there's any more files that have this issue
05:45 Eddward > say $_.IO.e for qx{find .}.lines
05:45 Eddward Unable to read from 'find .'
05:45 Eddward in block <unit> at <unknown file> line 1
05:45 samcv my @list;
05:45 samcv $_.IO.e or @list.push($_.IO) for qx{find .}.lines;
05:45 samcv say @list;
05:45 samcv this is what i would do
05:45 samcv not sure why you would get that error
05:46 Eddward Unable to read from 'find .'
05:46 samcv https://gist.github.com/c658da51e0cdc4a5bbbbb20d13796650
05:46 Eddward let me play with it...
05:46 samcv can you try downloading this into the folder that has the file and run it?
05:47 Eddward qx{ls .} works.  qx{find .} doesn't
05:48 BenGoldberg m: qx,find .,.say;
05:48 camelia rakudo-moar 51b0ab: OUTPUT«qx, qqx is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in sub QX at src/RESTRICTED.setting line 11␤  in block <unit> at <tmp> line 1␤␤»
05:49 Eddward perl6 /tmp/find_bad_files.p6
05:49 Eddward Unable to read from 'find .'
05:49 Eddward in block <unit> at /tmp/find_bad_files.p6 line 2
05:49 Eddward Actually thrown at:
05:49 Eddward in block <unit> at /tmp/find_bad_files.p6 line 2
05:50 Eddward qx{find . | head} works
05:50 Eddward My library is very large.
05:50 Eddward Let me subset this.
05:51 samcv i'm making a recursive version now
05:51 samcv Eddward, can you run 'find .' on the command line?
05:52 Eddward yep
05:52 Eddward find . | wc -l
05:52 Eddward 69946
05:53 Eddward qx{find /tmp}.lines works
05:54 Eddward qx{find 'mp3/Musopen DVD/Brahms - Symphony No 1 in C Major'}.lines works,
05:54 samcv Eddward, my new recursive version https://gist.github.com/samcv/c658da51e0cdc4a5bbbbb20d13796650
05:55 curan joined #perl6
05:55 samcv hmm then
05:55 samcv does qx{find} work?
05:55 samcv should do the same thing
05:55 Eddward qx{find} doesn't work.  Trying new script....
05:56 samcv really? wtf
05:56 Eddward perl6 /tmp/find_bad_files.p6
05:56 samcv Eddward, how about `run 'find'`
05:56 Eddward Unable to read from 'find .'
05:56 Eddward in sub MAIN at /tmp/find_bad_files.p6 line 4
05:56 Eddward in block <unit> at /tmp/find_bad_files.p6 line 1
05:56 Eddward Actually thrown at:
05:56 Eddward in sub MAIN at /tmp/find_bad_files.p6 line 4
05:56 Eddward in block <unit> at /tmp/find_bad_files.p6 line 1
05:56 samcv can you: run 'find'
05:57 Eddward bingo.  That works...
05:57 samcv ok :) modifying my script
05:59 Eddward I'm trying to figure out something like say $_.IO.e for run("find .").split("\n")
05:59 Eddward Is there a perldoc6 ?
06:00 samcv docs.perl6.org
06:00 samcv you want .lines
06:00 samcv but i'm almost done making this work
06:03 samcv Eddward, got it! https://gist.github.com/samcv/c658da51e0cdc4a5bbbbb20d13796650
06:04 Eddward :-/
06:04 Eddward perl6 /tmp/find_bad_files.p6
06:04 Eddward Malformed UTF-8
06:04 Eddward in sub MAIN at /tmp/find_bad_files.p6 line 4
06:04 Eddward in block <unit> at /tmp/find_bad_files.p6 line 1
06:05 Eddward I think we knew that.
06:06 Eddward Running /tmp with the copy I downloaded....
06:06 Eddward perl6 /tmp/find_bad_files.p6 /tmp
06:06 Eddward ["/tmp/Symphony No. 1 in C Minor, Op. 68 - IV. Adagio - Più andante - Allegro non troppo, ma con brio.mp3".IO "/tmp/pl/.#Pandora_export.m3u".IO "/tmp/pl2/.#Pandora_export.m3u".IO "/tmp/pl/.#Pandora_export.m3u".IO "/tmp/pl2/.#Pandora_export.m3u".IO]
06:06 samcv where do you get the malformed utf-8?
06:07 samcv wait. so in this case the shell is outputting malformed utf-8 too?
06:07 samcv weird...
06:07 samcv so that file is maybe double bad?
06:07 samcv the one file you gave me i don't get malformed utf-8
06:07 samcv do you get that error with JUST that file?
06:08 samcv in the case of that file, qx{find } would output valid utf-8
06:08 Eddward The mp3 and it looks like a few temporary emacs files.
06:09 samcv only that one mp3?
06:09 samcv weird about the emacs files
06:10 Eddward That's the only mp3 in /tmp.
06:10 * samcv runs it on my whole home directory
06:10 samcv goddamit malformed utf-8 and it died
06:11 Eddward perl6 /tmp/find_bad_files.p6 ~
06:11 Eddward Unable to read from 'find /home/hursh'
06:11 Eddward in sub MAIN at /tmp/find_bad_files.p6 line 4
06:11 Eddward in block <unit> at /tmp/find_bad_files.p6 line 1
06:11 Eddward Actually thrown at:
06:11 Eddward in sub MAIN at /tmp/find_bad_files.p6 line 4
06:11 Eddward in block <unit> at /tmp/find_bad_files.p6 line 1
06:13 samcv gonna try putting some try blocks in there
06:13 samcv hmm it still dies
06:14 gdonald joined #perl6
06:14 circ-user-Bpuqu joined #perl6
06:15 samcv probably because that exception happens in moarvm
06:16 sammers hi #perl6
06:17 sammers how does Thread.yield work?
06:17 samcv well. commenting out that exception throwing in moarvm and trying again. XD
06:17 elisdg joined #perl6
06:18 masak sammers: when you ask "how does Thread.yield work?", what form do you expect an answer to be? a step-by-step description?
06:18 masak sammers: have you looked at the Rakudo source code? it's pretty authoritative.
06:18 sammers yeah, good point.
06:19 sammers thanks, I will take a look. there weren't any examples on docs.perl6.org
06:19 masak now, *that's* good feedback ;)
06:20 masak maybe open a github issue at https://github.com/perl6/doc ?
06:20 sammers ok, will do
06:22 sammers masak, this is the file you were referring to? rakudo/src/core/Thread.pm
06:24 wamba joined #perl6
06:28 Eddward samcv: Needs to handle white space in names.
06:28 Eddward perl6 /tmp/find_bad_files.p6 ogg/
06:28 Eddward find: `ogg/Aesop': No such file or directory
06:28 Eddward find: `Rock': No such file or directory
06:28 Eddward find: `ogg/Aesop': No such file or directory
06:28 Eddward find: `Rock/big_ones': No such file or directory
06:28 Eddward /bin/sh: 1: Soldiers: not found
06:28 Eddward find: `ogg/game/Swords': No such file or directory
06:29 Eddward quote $dir on line 4.
06:30 Eddward and $path on line 10
06:30 samcv ah
06:31 samcv thanks you
06:34 Eddward so far I have offensive mp3s and mod files.  The oggs, flacs, wavs, and rm files are good.
06:34 Eddward I'm checking the sids.
06:34 samcv kk
06:34 samcv thank you
06:37 CIAvash joined #perl6
06:41 Eddward The quoting's not enough.  I have files with singles quotes and $.
06:42 Eddward Still looks like that's the only file.
06:43 Eddward find /space/pub/music/mp3/ -type d -print0 | xargs -l -0 perl6 /tmp/find_bad_files.p6
06:45 samcv if it is invalid utf-8 i'll contact archive.org but regardless seems other things can handle it
06:45 Eddward yep
06:45 samcv though i'm not sure how that would work. currently it saves all bad utf-8
06:45 samcv i don't think it has a mechanism for save this bad utf-8 but also pull out a good name
06:45 Eddward There'll be other problem files.
06:45 falafel joined #perl6
06:45 samcv but i will ask jnthn about it
06:46 Eddward ok.  Thanks for looking at it.
06:46 samcv no problem :)
06:47 samcv Eddward, i'll try and update the script so we don't have to quote anything
06:47 samcv and use 'run'
06:49 Eddward Sounds good.
06:49 Eddward left #perl6
06:49 Eddward joined #perl6
06:52 samcv Eddward, updated https://gist.github.com/samcv/c658da51e0cdc4a5bbbbb20d13796650
06:53 RabidGravy joined #perl6
06:54 Eddward perl6 /tmp/find_bad_files.p6
06:54 Eddward Malformed UTF-8
06:54 Eddward in sub MAIN at /tmp/find_bad_files.p6 line 4
06:54 Eddward in block <unit> at /tmp/find_bad_files.p6 line 1
06:54 rurban joined #perl6
06:56 Eddward doesn't matter which path we take on line 4.
06:56 samcv omg Eddward https://www.j3e.de/linux/convmv/man/
06:56 samcv converts filename encoding
06:56 samcv gonna install it and try on that file
06:56 Eddward :-)
06:57 samcv hmm it didn't make any changes
06:57 Eddward perl6 /tmp/find_bad_files.p6 mp3/Musopen\ DVD/Brahms\ -\ Symphony\ No\ 1\ in\ C\ Major/
06:57 Eddward ["mp3/Musopen DVD/Brahms - Symphony No 1 in C Major/Symphony No. 1 in C Minor, Op. 68 - IV. Adagio - Più andante - Allegro non troppo, ma con brio.mp3".IO]
06:57 samcv Eddward, interestingly if i tab complete that file
06:57 Eddward There's something worse than that file in my tree.
06:58 samcv m: say 0300.uniname
06:58 camelia rakudo-moar 51b0ab: OUTPUT«Potential difficulties:␤    Leading 0 does not indicate octal in Perl 6. Please use 0o300 if you mean that.␤    at <tmp>:1␤    ------> 3say 03007⏏5.uniname␤LATIN CAPITAL LETTER I WITH BREVE␤»
06:58 samcv m: say 0x0300.uniname
06:58 camelia rakudo-moar 51b0ab: OUTPUT«COMBINING GRAVE ACCENT␤»
06:58 samcv the combining grave accent mark doesn't render
06:58 samcv and my terminal just shows Piu<0300>
06:59 Eddward I ca tab complete the following fine : ls 'mp3/Musopen DVD/Brahms - Symphony No 1 in C Major/Symphony No. 1 in C Minor, Op. 68 - IV. Adagio
06:59 samcv i could try changing it to ISO-8859-1
06:59 samcv and back
07:00 Eddward I'm en_US.utf8 for everything but LANGUAGE LC_ALL
07:01 samcv what do you know
07:01 Eddward those are blank.
07:01 samcv converting it to another format and back, now can read the filename fine in perl 6 :P
07:01 Eddward ?
07:01 samcv "Symphony No. 1 in C Minor, Op. 68 - IV. Adagio - Più andante - Allegro non troppo, ma con brio.mp3"
07:01 Eddward Is it 2 byte or 3?
07:01 samcv uh
07:02 samcv dunno but it seems to be fixed
07:02 samcv and visually it looks exactly the same
07:02 samcv still has the u with the ` on it
07:02 samcv probably 2 bytes
07:02 samcv since that's what it should be
07:03 samcv you want 2 bytes right?
07:03 samcv not sure exactly what it is.
07:03 samcv but try installing convmv
07:03 Eddward It's 3 byte in the filesystem.
07:03 samcv convmv -f utf-8 -t ISO-8859-1 filename.mp6
07:04 samcv convmv -f utf-8 -t ISO-8859-1 filename.mp6 --notest (to actually move)
07:04 samcv then convmv -f ISO-8859-1 -t utf-8
07:04 Eddward Changing the filename would remove the problem.
07:04 samcv then just reindex it i guess?
07:05 samcv luckily the characters are availible in ISO 8859
07:05 Eddward I need to update it in banshee and I'll have trouble if there's ever another file that p6 doesn't like.
07:05 Eddward The original problem was that perl6 can't handle it as is when everything else in the pipeline can.
07:05 samcv yeah
07:05 samcv agreed
07:08 samcv time to get back to working on unicode collation algorithm :P
07:09 Eddward sounds good.  It's way past my bed time.  I'm going to shutdown for the night.
07:09 Eddward Thanks again.
07:09 samcv night!
07:09 pyrimidine joined #perl6
07:09 zacts joined #perl6
07:14 pyrimidi_ joined #perl6
07:16 darutoko joined #perl6
07:21 raiph joined #perl6
07:22 raiph joined #perl6
07:23 jjido joined #perl6
07:32 jjido joined #perl6
07:37 wamba joined #perl6
07:46 nine samcv: maybe you could even do convmv -f utf-8 -t utf-8?
07:46 samcv nope that doesn't change it
07:46 samcv I tried
08:08 mr-foobar joined #perl6
08:11 abraxxa joined #perl6
08:15 pyrimidine joined #perl6
08:23 kst`` joined #perl6
08:28 nebuchadnezzar joined #perl6
08:30 ufobat joined #perl6
08:40 noganex joined #perl6
08:41 grumble joined #perl6
08:43 samcv MasterDuke, nice PR
08:43 samcv merged
08:46 AlexDaniel joined #perl6
09:02 rindolf joined #perl6
09:03 wamba joined #perl6
09:10 pyrimidine joined #perl6
09:15 pyrimidi_ joined #perl6
09:19 andrzejku joined #perl6
09:22 neuron joined #perl6
09:28 LeCamarade joined #perl6
09:31 labster joined #perl6
09:36 * DrForr pkes his head in.
09:36 DrForr *pokes
09:38 peteretep_ joined #perl6
09:39 dakkar joined #perl6
09:40 sergot_ joined #perl6
09:40 KotH_ joined #perl6
09:40 ranguard_ joined #perl6
09:40 [Coke]_ joined #perl6
09:40 cibs_ joined #perl6
09:40 literal_ joined #perl6
09:40 effbiai_ joined #perl6
09:40 effbiai_ joined #perl6
09:41 tony-o_ joined #perl6
09:41 Kaffe_ joined #perl6
09:41 sivoais_ joined #perl6
09:41 jferrero_ joined #perl6
09:41 rumble joined #perl6
09:41 bhm_ joined #perl6
09:41 shmibs_ joined #perl6
09:42 mxco86_ joined #perl6
09:44 adrusi_ joined #perl6
09:44 gabiruh_ joined #perl6
09:44 xxpor_ joined #perl6
09:44 matt_ joined #perl6
09:48 dg joined #perl6
09:50 samcv hey DrForr
09:50 laouji joined #perl6
09:52 movl joined #perl6
09:52 araujo joined #perl6
09:53 gdonald joined #perl6
09:53 mtj_ joined #perl6
10:00 pyrimidine joined #perl6
10:01 jonas1 joined #perl6
10:02 shadowpaste0 joined #perl6
10:10 wamba joined #perl6
10:11 DrForr samcv: Howdy. I ended up with 94 people on Safari last night.
10:11 samcv nice!
10:13 DrForr Yep. People even hung around afterward to ask questions, for about half an hour.
10:21 DrForr One of the comments I got was "I have loved Perl 5 but use it seldomly now, maybe I will give Perl 6 a try, there are some nice improvements."
10:23 moritz \o/
10:26 El_Che DrForr: after fosdem I went to cfgmgmtcamp conference (2 days) and chatter with some people about Perl 6
10:27 El_Che People that have use it are *very* positive about it. But, what came back again and again was performance
10:27 DrForr Should've asked you to say hello to Bob for me, used to work for him. (he was on a panel)
10:28 DrForr Yep, I can totally understand. I would crack a metaphorical whip but it isn't my place and all that other fun stuff.
10:28 El_Che Some people were seriously considering perl 6 for production, but wait because of performance (after some POC code)
10:28 El_Che (not ranting here, just passing along what I heard)
10:32 DrForr Nod.
10:34 TimToady joined #perl6
10:35 samcv .tell Eddward I am told if you open the file with :enc<utf8-c8>, or you can rename the file, ($file).copy($file.Str.encode('utf8-c8').decode('utf8')) where $file is a IO::Path obj
10:35 yoleaux samcv: I'll pass your message to Eddward.
10:35 pmurias joined #perl6
10:49 pyrimidine joined #perl6
10:57 inokenty joined #perl6
11:13 pyrimidine joined #perl6
11:15 bjz joined #perl6
11:15 pyrimidine joined #perl6
11:18 gdonald joined #perl6
11:25 cibs joined #perl6
11:29 sena_kun joined #perl6
11:34 pyrimidine joined #perl6
11:36 garo joined #perl6
11:37 cibs joined #perl6
11:40 espadrine joined #perl6
11:44 thdr|2 joined #perl6
12:15 bjz_ joined #perl6
12:16 * ilmari watches lizmat's talk at 1.5x speed
12:16 ilmari faster, faster!
12:17 samcv link to talks pls ilmari
12:17 samcv faster!
12:17 ilmari http://video.fosdem.org/2017/K.4.201/
12:17 samcv not fast enough!
12:17 * ilmari speeds it up to 2x (fastest firefox will let me)
12:19 gregf__ any Perl6 talks?
12:19 ilmari yes
12:19 gregf__ ah - theyre all in there
12:19 gregf__ cheers ilmari
12:19 ilmari https://fosdem.org/2017/schedule/track/perl/
12:23 ilmari bah, lizmat's is cut short :(
12:24 * ilmari goes for lunch instead
12:34 dalek perl6-bench: 18f45b1 | timotimo++ | microbenchmarks.pl:
12:34 dalek perl6-bench: don't use smartmatch in perl5 microbenchmark
12:34 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/18f45b196f
12:34 yoleaux 2 Feb 2017 22:15Z <[Coke]> dalek: update that repo to use Geth instead: Change the webhook to http://geth.perl6.party/?chan=#perl6-dev (or #moarvm for moarvm), Content-type: application/json and "Send me everything."
12:34 samcv oh yay i think what my results here indicate is that we pass 100% of Unicode Collation tests aside from the ones that have collation values attached to sequences of codepoitns!
12:34 samcv \o/
12:34 timotimo hooray!
12:35 samcv so that 8% are all caused by being starters in the coll sequence weights
12:35 * samcv does a dance
12:35 timotimo .tell dalek ahoi, please update that repo to use geth instead: Change the webhook to http://geth.perl6.party/?chan=#perl6-dev (or #moarvm for moarvm), Content-type: application/json and "Send me everything."
12:35 yoleaux timotimo: I'll pass your message to dalek.
12:35 samcv dalek? lol. is that a joke
12:35 timotimo we do love puns and references in here
12:36 samcv :)
12:36 pyrimidine joined #perl6
12:36 timotimo geth is a reference, too, but a much less widely known one
12:37 timotimo japhb: could you do the geth setup for perl6-bench? and we might want to consider moving reporting to #perl6-dev instead?
12:38 samcv i don't know dalek or geth
12:38 samcv please tell me! then we have both ^5 afterward
12:38 timotimo sure
12:38 samcv since that's what perl 6 people do all day right
12:38 timotimo all day and night
12:39 timotimo daleks are the ones from doctor who who scream "EXTERMINATE" all the time
12:39 samcv is that a video game?
12:39 timotimo doctor who is one of the longest-running sci-fi TV shows, the BBC makes it
12:39 samcv doctor who?
12:39 timotimo yes, doctor who
12:40 samcv oh sorry i just read over that as if it was a mis-repeated word
12:40 timotimo http://doctorwhotoys.net/dalekprogenitorguardian%20copy.jpg - you might have seen one of them somewhere on the 'net before
12:40 samcv so i totally missed it
12:40 samcv damn you human grep function
12:40 timotimo :)
12:40 timotimo bloom filters, eh?
12:40 IOninja And Geth are AI made by Qunarians to serve as tools and later turned on their creators
12:40 samcv bloom filters:?
12:41 IOninja from mass effect games
12:41 timotimo bloom filters are a really cool data structure
12:41 samcv oh looked it up
12:41 samcv i blame you for not putting a comma or something
12:41 timotimo you configure them up front for "how bad do you want your false positive rate to be?"
12:41 timotimo and then you can fit knowledge about billions of individual thingies into a few kilobytes of data
12:41 timotimo and get no false negatives ever
12:42 timotimo for membership tests
12:42 samcv wow
12:42 samcv howwww
12:42 samcv m: "Bloom Filter".HOW.say
12:42 camelia rakudo-moar 39c517: OUTPUT«Perl6::Metamodel::ClassHOW.new␤»
12:43 timotimo imagine you have a big bitfield, and you build a hashing function that gives you a few (like four or five) different bit indices for any given value
12:44 timotimo "putting a value in" means turning these four or five bits to 1
12:44 timotimo "testing if something's already in" means checking that *all* of the corresponding bits are set to 1
12:44 timotimo if one or more of these bits are 0, it's guaranteed to not have been put in
12:44 timotimo but the chance of getting "yup, it's in" for values that have not been put in depends on how big your bit field is and how many values you calculate for each thing
12:45 timotimo "how many indices you calculate"*
12:45 samcv timotimo, http://www.unicode.org/versions/corrigendum3.html
12:45 samcv heh
12:45 samcv they changed the decomposition for a character. take that os x
12:45 timotimo oh jesus christ
12:46 samcv they didn't change the normalized version
12:46 timotimo someone accidentally typed F when they meant Four
12:46 jast it's almost as if there are downside to storing things decomposed
12:46 samcv heh jast
12:46 samcv hope that was sarcasm
12:46 samcv i think NFC changes less
12:46 jast your hope shall go fulfilled ;)
12:47 samcv i mean they have changed these http://www.unicode.org/versions/corrigendum4.html
12:47 jast I only discovered this particular atrocity in osx last year
12:47 samcv but i think that was changing the mapping of already non-nfc form characters
12:47 pyrimidine joined #perl6
12:47 samcv how did you discover it jast
12:48 samcv Correct canonical mapping for 2F868 from 2136A to 36FC
12:48 jast I was involved in a web app that had started accepting essentially the full unicode set in path/filenames
12:48 samcv so people were probalby already typing 36FC
12:48 samcv and i doubt anybody used 2F868 except for some weird circumstances
12:48 samcv so i think it's best to store in NFC
12:48 jast and when people created links to files uploaded by osx users, somehow the links didn't work
12:49 samcv can you just convert it to NFC?
12:49 samcv also it's sad that they give the NFD form if you request the directory name
12:49 jast I don't remember the ultimate decision that was made, I was mostly focused on other issues
12:49 samcv that's what you are implying?
12:49 samcv programs see NFD names?
12:50 timotimo so ... can i have some help with perl5 here?
12:50 samcv maybe
12:50 jast well, basically an osx user would upload a file in the browser. the browser would send the local filename, and the web app would copy it verbatim
12:50 timotimo my $s = join ", " => 1 .. 512; my @s = split /\s*,\s*/ => $s for 1 .. 512; say scalar @s
12:50 timotimo does this code seem wrong?
12:51 jast those arrows really confused me for a moment... :)
12:51 timotimo i'm not the one who wrote this code, but my understanding is that => is just ,
12:51 jast yep
12:51 timotimo anyway, this prints out 0, when it should print out 511 instead
12:52 jast what exactly is the 'for' supposed to be doing?
12:52 rindolf joined #perl6
12:52 faraco joined #perl6
12:53 faraco howdy
12:53 timotimo make it run for longer
12:54 samcv jast, then the links are wrong?
12:55 jast samcv: links in which other users manually typed the filename for a link
12:55 samcv ah
12:55 samcv i see
12:55 samcv yeah just convert them all to nfc then
12:56 timotimo then the users are wrong!
12:56 samcv heh
12:56 samcv also does perl 5 have a REPL
12:57 timotimo yeah, but you get it via a package
12:57 samcv what is this package good sir
12:57 timotimo Devel::REPL or something
12:57 * timotimo definitely not a perl5 programmer
12:57 samcv heh
12:57 timotimo it might even come with typical perl5 installations
12:58 samcv but how do i run it
12:58 jast timotimo: fixed: my $s = join ", " => 1 .. 512; my @s; @s = split /\s*,\s*/ => $s for 1 .. 512; say scalar @s
12:58 timotimo perl -MDevel::REPL i'd imagine
12:58 timotimo oh, so putting the "my" in the "scope" of the for loop made it not exist afterwards?
12:59 jast that's what I thought, but the code works even if I 'use strict' and 'use warnings'
12:59 jast I can't fully explain what's going on :)
12:59 jast ("works" as in "doesn't die")
12:59 timotimo *shrug*
12:59 timotimo the only thing that matters to me is that we can get these benchmarks again :)
13:00 timotimo http://moarvm.org/measurements/perl6-bench/2017-02-08.html - wanna look at some more perl5 code in these? (click on the [ Code ] on the top-right for every graph that misses a bright-orange line)
13:00 timotimo (i already fixed charrange)
13:00 timotimo (and charrange_ignorecase)
13:00 samcv did perl 5 change?
13:00 timotimo well, for one of these, yes
13:00 jast bit short on time right now, unfortunately
13:01 timotimo no problem! thanks for your help!
13:01 jast you're welcome
13:01 timotimo the charrange one used ~~ to do regex matching, which got deprecated a loooong time ago
13:01 Sound joined #perl6
13:01 jast that's easy enough to fix
13:01 timotimo yeah, =~ instead of ~~
13:02 faraco are you talking about some sort of 'perlsh'?
13:02 jast I remember a while ago a coworker added ~~ to a codebase. doubly ironic because the code had to work in perl 5.8.x which was way before ~~
13:02 timotimo whoops
13:06 lukaramu joined #perl6
13:06 timotimo fixed create_and_iterate_hash_kv
13:07 timotimo it used %h{$_} = $_ instead of $h{$_} = $_
13:08 * IOninja chuckles at #LetLizSpeak trending on Twitter
13:08 IOninja lizmat having troubles with her FOSDEM talks? :)
13:09 vike joined #perl6
13:09 * faraco looking at Perl 6 capability to run on BEAM vm.
13:12 llfourn joined #perl6
13:15 wamba joined #perl6
13:26 dalek perl6-bench: 98e29f8 | timotimo++ | microbenchmarks.pl:
13:26 dalek perl6-bench: fix split_string_regex for perl5, thanks jast++
13:26 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/98e29f8786
13:26 dalek perl6-bench: de5b2af | timotimo++ | microbenchmarks.pl:
13:26 dalek perl6-bench: fix create_and_iterate_hash_kv for perl5
13:26 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/de5b2af855
13:26 dalek perl6-bench: 0029b74 | timotimo++ | microbenchmarks.pl:
13:26 yoleaux 12:35Z <timotimo> dalek: ahoi, please update that repo to use geth instead: Change the webhook to http://geth.perl6.party/?chan=#perl6-dev (or #moarvm for moarvm), Content-type: application/json and "Send me everything."
13:26 timotimo bam
13:26 dalek perl6-bench: fix loop_object_accessor (maybe?)
13:26 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/0029b74398
13:26 timotimo .tell dalek ahoi, please update that repo to use geth instead: Change the webhook to http://geth.perl6.party/?chan=#perl6-dev (or #moarvm for moarvm), Content-type: application/json and "Send me everything."
13:26 yoleaux timotimo: I'll pass your message to dalek.
13:30 lukiramu joined #perl6
13:33 Actualeyes joined #perl6
13:37 [Coke]_ .tell japhb please update perl6-bench to use geth.
13:37 yoleaux [Coke]_: I'll pass your message to japhb.
13:37 timotimo i already told 'em :)
13:38 DrForr I also made sure to invite one and all to freenode #perl6 if they've got questions. So we may have some newcomers over the next few days.
13:39 IOninja cool
13:40 timotimo sweet
13:40 hartenfels joined #perl6
13:46 pmurias joined #perl6
13:47 jdv79 IOninja: i guess the signup barrier on CPAN, well PAUSE, is a valid critism
13:48 jdv79 *criticism
13:48 * jdv79 needs to wake up
13:48 timotimo yeah, modern services for developers ought to give at least "sign in with github" and "sign in with google"
13:48 timotimo not sure if bitbucket give you a single-sign-on thing
13:49 pyrimidine joined #perl6
13:49 jdv79 i think if there was just a way to signup without involving another human it'd be fine
13:50 timotimo oh, what, you have to get your account verified or something?
13:50 jdv79 its always been like that
13:50 IOninja Unless they changed it yes, you have to wait for human to setup your account.
13:50 Geth ¦ doc: 5c93398657 | (Jonathan Worthington)++ | 2 files
13:50 Geth ¦ doc: Make Perl6::Documentable::Registry a monitor.
13:50 Geth ¦ doc:
13:50 Geth ¦ doc: When we are using --parallel=n with n > 1, we can add to this from
13:50 Geth ¦ doc: multiple threads. This causes problems. Making it a monitor seems to
13:50 Geth ¦ doc: cause no pain for the --parallel=1 case, and gets rid of a race in
13:50 Geth ¦ doc: the real parallel case, bringing us closer to --parallel=2 working.
13:50 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5c93398657
13:51 IOninja jdv79: my biggest concern is: how can CPAN6/MetaCPAN6 handle :auth<>? And the seccond biggest concern is: all this stuff's written in Perl 5 can we reasonably expect to have enough volunteers to maintain the Perl 6 side of all of that infrustructure?
13:52 IOninja timotimo for example doesn't know Perl 5. I know it, but I'm very unmotivated to write it.
13:52 IOninja And I'd even say "know" it by know. I forgotten a good bit in a year.
13:53 IOninja s/by know/by now/;
13:55 DrForr I did end up fielding a question about CPAN/6PAN from the listeners - I said that PSIXDISTS is where we're testing CPAN integration, but you might want to talk about that on IRC.
13:57 jdv79 afaik there is no issue with auth but haven't dug into that part yet
13:57 imcsk8_ joined #perl6
13:58 jdv79 aparrently getting people that are motivated to help is a real issue which has surprised me
13:58 IOninja That surprises me, since, for example, this URL has no auth encoded in it: https://metacpan.org/pod/JSON::Meth
13:58 jdv79 though ranguard_ and mst have been a lot of help
13:59 Actualeyes joined #perl6
13:59 jdv79 i'm not saying its implemented, just that there wasn't any known blockers back when last we talked about it
14:00 jdv79 i think there wasn't even any clarity as to what that would do
14:01 jdv79 how do you think it should be handled?
14:01 timotimo it needs to be a layer of distinction that probably has to end up going everywhere?
14:03 IOninja Make auth part of the name, while decopling it enough that for example https://metacpan.org/pod/JSON::Meth would lead to some "disambiguation page" if there are two authors with a module with tha tname
14:03 IOninja ?
14:03 * IOninja isn't sure if that's a good idea
14:10 gdonald joined #perl6
14:14 Eddward joined #perl6
14:17 itcharlie joined #perl6
14:19 abraxxa joined #perl6
14:19 jdv79 auth is already part of the name in a lot of places.  i think we just need to fixup the ambiguous parts like the one you pointed out.
14:40 IOninja cool
14:41 IOninja "jdv79 │ aparrently getting people that are motivated to help is a real issue"
14:41 IOninja There were a few poeople who had desire to improve ecosystem
14:41 IOninja But we don't have anything concrete to point them to, like a TODO list or a list of Issues or something.
14:41 IOninja I think there's a repo somewhere, but what needs to be done?
14:43 awwaiid joined #perl6
14:43 khw joined #perl6
14:46 wamba joined #perl6
14:47 abraxxa joined #perl6
14:49 [Coke] samcv: is "perl6 htmlify.p6" supposed to just die now on OS X?
14:49 samcv why would it be supposed to die?
14:50 [Coke] I don't know, that's why I'm asking you if that was your intention.
14:50 samcv no it was not
14:50 [Coke] one sec
14:50 samcv btw you can run htmlify.p6 --no-proc-async --parallel=2
14:50 samcv and it will still run the code that causes the crashing
14:51 [Coke] https://gist.github.com/coke/574de54eb3b000104fa9b0b04021ebb9
14:51 pyrimidine joined #perl6
14:51 samcv welp
14:51 samcv shouldn't die
14:51 samcv it worked fine when i tested it
14:52 timotimo never say die
14:52 samcv and basically forced the condition to check whether it was running on macos
14:52 samcv shouldn't be fired?
14:53 timotimo m: say die
14:53 camelia rakudo-moar a63d82: OUTPUT«Died␤  in block <unit> at <tmp> line 1␤␤»
14:53 samcv lol
14:53 [Coke] the problem is assigning to $no-proc-async, apparently.
14:53 samcv To kill a process is a triggering term to those who have been affected by death or killings in their life. Instead of kill-ing a process, which is something immoral and a result of toxic masculinity, ToleranUX opts to fire processes. Unlike kill-ing a process, firing a process allows it to still live, just no longer performs any function. In addition to being able to manually fire any process that offends you, ToleranUX will automatically fire any
14:53 samcv process that is determined to be too offensive. Likewise, killall is now fireall.
14:53 gdonald joined #perl6
14:54 samcv we should change die to 'fire-self'
14:54 samcv or maybe just `panic`
14:55 timotimo might not want to have it called the same as go's "panic", because our CATCH isn't very much like "recover"
14:55 [Coke] Bool :$no-proc-async = False -- cannot change the value, cannot make is rw because it's optional, cannot make mandatory because we want it to have a default.
14:56 samcv boo
14:56 samcv chown and takeown implies the permanent and oppressive ownership of selective files. Instead of forcefully taking control of files and limiting their freedom to interact collaboratively with other files, the employ command fairly compensates files for their services while encouraging social growth with not only other employed files, but the filesystem as a whole.
14:56 samcv lol.
14:57 samcv the whole thing is here: https://gitlab.com/femsf/toleranux
14:57 donaldh joined #perl6
14:58 huf ewww, i can smell the fedoras
14:58 samcv can you get the fedora dry cleaned?
15:02 g4 left #perl6
15:14 llfourn joined #perl6
15:20 itcharlie2 joined #perl6
15:29 skids joined #perl6
15:32 bwisti joined #perl6
15:35 Geth ¦ perl6-most-wanted: 8a89be19ef | (Tom Browder)++ | most-wanted/modules.md
15:35 Geth ¦ perl6-most-wanted: more cgi modules wanted
15:35 Geth ¦ perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/8a89be19ef
15:35 llfourn joined #perl6
15:39 pyrimidine joined #perl6
15:41 FROGGS joined #perl6
15:43 cdg joined #perl6
15:45 * IOninja can't imagine people using CGI::Session in this day and age; especially with Perl 6
15:46 IOninja $ /usr/bin/time perl6 -e ''
15:46 IOninja 0.13user 0.04system 0:00.17elapsed 97%CPU (0avgtext+0avgdata 220416maxresident)k
15:47 IOninja Does this mean perl6 -e '' uses 220MB of RAM?
15:47 timotimo seems to be the case
15:47 IOninja :o
15:47 timotimo it uses just 61 on my machine
15:47 timotimo 0.07user 0.01system 0:00.08elapsed 96%CPU (0avgtext+0avgdata 61728maxresident)k
15:47 IOninja 7024maxresident for Perl 5
15:47 timotimo yeah, it's not ideal by far
15:48 cdg joined #perl6
15:48 [Coke] IOninja: here, it's   54272000  maximum resident set size
15:48 [Coke] vs    2818048  maximum resident set size for perl5'
15:50 IOninja On my 32-bit debian I get 40MB and on my 64-bit debian I get 61MB
15:50 timotimo how did you get the 220 number?
15:51 IOninja I get it consistently on my buntu
15:51 timotimo version, compile flags, etc etc?
15:51 timotimo any diffs in any of the repos?
15:51 IOninja It's really all outdated, so I'd guess some 3rdparty lib we include is bigger when older?
15:52 timotimo shouldn't be that much bigger
15:52 timotimo outdated how?
15:52 timotimo maybe it's a version that still uses parrot?
15:53 donaldh or a version that predates a lot of lazy startup initialization
15:53 yoleaux 2 Feb 2017 19:59Z <moritz> donaldh: there's now a FAILGOAL example and short explanation in https://leanpub.com/perl6. Enjoy!
15:53 timotimo or that, yeah
15:54 IOninja heh, no, the same version as the 32-bit box with 40MB
15:55 timotimo that's pretty strange.
15:55 IOninja Here's the perl6 -V for 220MB one: https://gist.github.com/zoffixznet/a5d5bc8d0ffbef9b8aa68f3615315655
15:55 IOninja And here's the diff for it and the 40MB one: https://gist.github.com/zoffixznet/e62e122833225e22269b56eb513d966d
15:55 IOninja -moar::jit=$(JIT_POSIX_X64)
15:55 IOninja +moar::jit=$(JIT_STUB)
15:55 IOninja Could that be it?
15:55 timotimo throwing out the jit should make it smaller, not bigger
15:56 IOninja The +moar::jit=$(JIT_STUB) is for 40MB
15:57 IOninja though it's moar::jit=$(JIT_POSIX_X64) on my 64-bit debian that uses 61MB
15:58 SmokeMachine What happens if a distro/module was written by more than 1 person?
15:58 SmokeMachine Is there :auth<auth1 auth2>?
15:59 timotimo well, 40mb and 61mb isn't so terrible, it's the 220mb that worries me
15:59 IOninja SmokeMachine: there's authors => [ ] for authors. `auth` is... authority I guess or whatever
16:00 gdonald joined #perl6
16:00 IOninja m: use Test:auth<perl>
16:00 camelia rakudo-moar a63d82: ( no output )
16:00 IOninja m: use Test:auth<perl not-perl>
16:00 camelia rakudo-moar a63d82: OUTPUT«===SORRY!===␤Could not find Test:auth<perl not-perl> at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-2/share/perl6␤  …»
16:00 IOninja I think it just uses it as one thing
16:01 SmokeMachine IOninja: so, :auth would be next to GitHub' concept of "organization"?
16:02 timotimo auth is like "github:timo"
16:02 timotimo i.e. "github has the authority over the namespace in which i'm called timo"
16:02 tbrowder IOninja: and what do you recommend instead of CGI?
16:03 IOninja Anything that isn't horribly slow and as above results show memory consuming?
16:03 SmokeMachine :auth<github:rakudo> like the organization rakudo or :auth<github:FCO> like the github user FCO?
16:05 timotimo organizations are "just" special users, aren't they?
16:05 ocbtec joined #perl6
16:06 SmokeMachine Idk
16:09 jdv79 what?
16:10 donaldh is $class.^perl something that once existed but got excised?
16:10 donaldh e.g. https://github.com/samuraisam/p6-pb/blob/master/t/perlable.t#L27
16:11 donaldh Oh,  no ignore me, it's a custom .perl method
16:12 IOninja tbrowder: the empty perl6 -e '' takes 60MB of RAM and takes 0.15s to execute. My bots use about 300-400MB each, so say your CGI app uses that much. That means that if you get 5 people accessing your app at the same time, your server will need to have 1.5GB-2GB of RAM to handle it. If hosted on an average VM, I could DoS your site by just leaning on the F5 key. And you also pay that .15s (more even, a for real
16:12 IOninja app) startup cost for each request, which means your site will be pretty sluggish. What people do these days is just run one app that listens and responds to stuff, so you use less ram and respond faster.
16:13 jdv79 SmokeMachine: afaik auth is just "$repo:$account"
16:13 IOninja tbrowder: which makes me dubious anyone would want to build an app complex enough to want CGI::Sessions in it, especially in Perl 6, given its currently lavish requirements for RAM and slow startup speed
16:14 jdmmmmm joined #perl6
16:15 jdv79 one place where i worked each apache kid took maybe 200-300M a pop
16:15 jdv79 mem is cheap:)
16:16 IOninja heh
16:17 tbrowder i understand the mem req, but my sites are VERY low use (and my server has a lot or RAM), and CGI programming is a little easier for me to program.  I would love to move to something better but haven't yet seen a good transition path (read "cookbook recipe"), especially using Apache.
16:18 FROGGS_ joined #perl6
16:19 tbrowder but i'm always open to suggestions...
16:19 tbrowder especially to good books on the subject...
16:24 tbrowder what i need is mod_perl6!
16:25 * IOninja shudders
16:25 IOninja tbrowder: have you seen Bailador?
16:25 IOninja buggable: eco bailador
16:25 buggable IOninja, Found 5 results: Bailador, Bailador::Dev::AutoRestarter, Bailador::Plugin::Static, Bailador::Plugin::AssetPack::SASS, Bailador::Template::Mojo::Extended. See http://modules.perl6.org/#q=bailador
16:25 pyrimidine joined #perl6
16:26 jdv79 tbrowder: there are p6 web framework like dists.  is that not what you are looking for?
16:26 IOninja Well, I dunno how approachable it is if you never done the one-app thing
16:27 IOninja Here's an example that uses sessions: https://github.com/ufobat/Bailador/blob/master/examples/sessions.pl6
16:28 abraxxa1 joined #perl6
16:29 tbrowder i have looked at Bailador, not sure about using on Apache, https?
16:32 IOninja you'd configure apache (and https on it) pretty much the same as for CGI, except instead of ExecCGI stuff you tell it to reverseproxy to your app running on a local port: https://gist.github.com/zoffixznet/1cdc5552f5f4dbdf8c3b370c12f7f1a8
16:32 IOninja so app runs on local port 3000 and apache receives all the connections and just forwards them to your app
16:34 tbrowder i do have a new site i'm about to build and i'm up to using something new (including maybe Moritz's "mowyw")
16:35 IOninja It's Perl 5 innit? If you're willing to use it, check out http://www.mojolicious.org/ It's pretty easy to pick up.
16:35 IOninja perl6.party uses it: https://github.com/zoffixznet/perl6.party
16:36 mst I should really try perl6+catalyst at some point
16:36 mst since catalyst is designed to support roles and etc.
16:36 rurban joined #perl6
16:37 tbrowder and i've been sown the reverse proxy thing before (thanks!)--just need to figure out the real dir and file layout for a remote host updated from my local host...lots invested in my current "infrastructure"
16:42 timotimo the good thing is that you can put your app anywhere you please
16:42 timotimo doesn't even have to be on the same server, as long as apache can connect to the port on the machine that runs that app
16:43 timotimo so your file and directory layout can be whatever works best for you
16:44 wamba joined #perl6
16:47 pyrimidine joined #perl6
16:50 tbrowder okay guys, you convinced me.  i'll try Bailador first i think...thanks!
16:51 timotimo bailador is single-threaded, but since your stuff is low-use anyway, that shouldn't be a problem
16:51 timotimo though i'd recommend serving static files like images and css through apache itself rather than your bailador app
17:03 samcv why apache?
17:04 samcv why not nginx??
17:05 llfourn joined #perl6
17:05 IOninja years of experience with apache; no experience with nginx
17:06 tbrowder because i'm very comfy with its security, configuration, and tls handling
17:07 cibs joined #perl6
17:08 hartenfels joined #perl6
17:13 IOninja m: sub infix:<🙼> { FatRat.new: $^a, $^b }; say 2🙼1
17:13 camelia rakudo-moar 2b1eb6: OUTPUT«2␤»
17:13 IOninja AlexDaniel, ^ my contribution to your Unicode Ops file :)
17:14 TimToady u: 🙼
17:14 unicodable6 TimToady, U+1F67C VERY HEAVY SOLIDUS [So] (🙼)
17:15 IOninja or maybe not... it's not very fixed widthy...
17:15 TimToady u: heavy solidus
17:15 unicodable6 TimToady, U+1F67C VERY HEAVY SOLIDUS [So] (🙼)
17:15 unicodable6 TimToady, U+1F67D VERY HEAVY REVERSE SOLIDUS [So] (🙽)
17:15 TimToady what happened to not quite so heavy solidus?
17:15 rurban left #perl6
17:16 IOninja TimToady: you have a robo-message in #perl6-dev about whether Num/0e0 should throw or do the IEEE semantics
17:16 TimToady you mean NaN maybe?
17:17 IOninja Well, if either argument to infix:</> is a Num, both are coerced to a Num; and with Nums, you'd have 0e0/0e0 => NaN; */0e0 => Inf, with the sign of the numerator
17:17 samcv that solidus is really heavy
17:17 samcv u: solidus
17:17 unicodable6 samcv, U+002F SOLIDUS [Po] (/)
17:17 unicodable6 samcv, U+005C REVERSE SOLIDUS [Po] (\)
17:17 unicodable6 samcv, https://gist.github.com/b7a2d49268ab7e1b3d106df30562c7c0
17:17 IOninja m: say 42/0e0
17:17 camelia rakudo-moar 2b1eb6: OUTPUT«Attempt to divide 42 by zero using /␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
17:17 samcv TimToady, well we have big? ⧹
17:17 IOninja ^ so that would give Inf
17:17 samcv it's very tall
17:18 IOninja m: say (my num $ = 0e0) / (my num $ = 0e0)
17:18 camelia rakudo-moar 2b1eb6: OUTPUT«This type cannot unbox to a native number: P6opaque, Failure␤  in block <unit> at <tmp> line 1␤␤»
17:18 IOninja That would give NaN
17:18 Geth ¦ doc: a20595e7bb | (Jonathan Worthington)++ | htmlify.p6
17:18 Geth ¦ doc: Fix a couple of data races in parallel mode.
17:18 Geth ¦ doc: review: https://github.com/perl6/doc/commit/a20595e7bb
17:19 samcv 🙼 ← Eraser emoji
17:20 samcv 🙼🙼𝗪𝗔𝗥𝗡𝗜𝗡𝗚🙽🙽
17:21 [Coke] Wͬ͒🄐ℝǸ̸𝕀ℕ⅁ 𝐁Ë́̀E̫̜Ⓟ ̎͞🄑OͣͥO̬ͫԀ
17:22 TimToady just seems odd to have a "very heavy solidus" without a "heavy solidus" to be "very" with respect to...
17:22 TimToady language is weird
17:23 TimToady was just thinking yesterday that it's really hard to find any preposition in English that doesn't immediately bring to mind some idiom for "death" that incorporates that preposition
17:23 TimToady your time's up, you're going down, I'm gonna off you, going on to a higher plane, etc
17:24 IOninja heh
17:24 [Coke] that might have something more to do with the thinker's state of mind.
17:24 TimToady had think a while to get "before the pearly gates"...
17:25 TimToady haven't got one for "around yet", since "around the bend" means something a little different...
17:25 TimToady *"around" yet
17:25 TimToady weird, delayed endquote is a strange sort of typo
17:27 samcv 🇼🇦🇷🇳🇮🇳🇬
17:28 samcv Regional indicators anyone?
17:28 samcv totally misused
17:28 TimToady looks like a bed of tulips here
17:28 perigrin_ around the end, around his time
17:29 perigrin_ no longer around becomes adjectival doesn't it ...
17:29 TimToady close enough :)
17:29 ilmari for some reason firefox parses that from the rear, so it becomes (W), Argentina, Nicaragua, Nigeria when I paste it into the search bar
17:30 TimToady six feet under, over the river, between this life and the next...
17:30 ilmari I guess it goes "WA isn't valid" and advances one codepoint and tries again
17:30 perigrin_ TimToady: abeam ... that should take a while to find the death-idiom
17:31 [Coke] m: '΁'.uninames.say
17:31 camelia rakudo-moar 2b1eb6: OUTPUT«(<reserved>)␤»
17:31 TimToady perigrin_: I'll ask my neighborhood pirate...
17:31 perigrin_ yar!
17:31 jme` joined #perl6
17:32 TimToady 'cept I think he's abaft this life
17:33 perigrin_ probably shouldn't have stood afront the cannon
17:33 cgfbee joined #perl6
17:34 TimToady and now the bits of him are in Davy Jones' Locker
17:36 Geth ¦ doc: 290223265e | (Jonathan Worthington)++ | htmlify.p6
17:36 Geth ¦ doc: Correct method name.
17:36 Geth ¦ doc: review: https://github.com/perl6/doc/commit/290223265e
17:36 itaipu joined #perl6
17:40 cdg_ joined #perl6
17:48 pyrimidine joined #perl6
18:06 llfourn joined #perl6
18:09 donaldh joined #perl6
18:17 * [Coke] fixes https://github.com/coke/p6-unicode-mangler so the combination generated doesn't generate invalid combos.
18:17 Mithaldu might be interesting to some here https://www.nu42.com/2017/02/unicode-windows-command-line.html
18:18 * IOninja already saw it
18:20 jdmmmmm joined #perl6
18:29 jme` joined #perl6
18:38 Cabanossi joined #perl6
18:44 rurban joined #perl6
18:55 AlexDaniel joined #perl6
18:55 AlexDaniel IOninja: are you serious about 🙼 ?
18:56 cdg joined #perl6
18:59 pyrimidine joined #perl6
19:00 TimToady u: ꃑ
19:00 unicodable6 TimToady, U+A0D1 YI SYLLABLE FAT [Lo] (ꃑ)
19:00 AlexDaniel u: FAT
19:00 unicodable6 AlexDaniel, U+0618 ARABIC SMALL FATHA [Mn] (◌ؘ)
19:00 unicodable6 AlexDaniel, U+064B ARABIC FATHATAN [Mn] (◌ً)
19:00 unicodable6 AlexDaniel, https://gist.github.com/44edfd2e3d2f22e8ec4db17e44e7e013
19:01 IOninja AlexDaniel: I was, until I used it and found it makes code unaligned in my editor because it's not fixed-width (in my font)
19:02 itaipu joined #perl6
19:02 IOninja lol "U+2F57 KANGXI RADICAL FATHER [So] (⽗)"
19:02 * IOninja wonders if there's also a radical mother
19:03 IOninja u: radical mother
19:03 unicodable6 IOninja, U+2E9F CJK RADICAL MOTHER [So] (⺟)
19:03 * IOninja giggles
19:03 sena_kun 父 & 母. :)
19:04 TimToady well, "fat" in chinese is just 太
19:04 AlexDaniel u: 太
19:04 unicodable6 AlexDaniel, U+592A <CJK Ideograph> [Lo] (太)
19:04 TimToady unicode does not attempt to name ideographs
19:05 TimToady though in my character database, it happens to have the name "fat"  :)
19:05 AlexDaniel except radicals?
19:05 TimToady there's not even agreement on radicals
19:05 llfourn joined #perl6
19:05 sena_kun u: 癶
19:05 unicodable6 sena_kun, U+7676 <CJK Ideograph> [Lo] (癶)
19:06 sena_kun u: 彑
19:06 unicodable6 sena_kun, U+5F51 <CJK Ideograph> [Lo] (彑)
19:07 TimToady u: ⺟
19:07 unicodable6 TimToady, U+2E9F CJK RADICAL MOTHER [So] (⺟)
19:07 TimToady u: ⽏
19:07 unicodable6 TimToady, U+2F4F KANGXI RADICAL DO NOT [So] (⽏)
19:10 IOninja AlexDaniel: oh, you seen comments on https://github.com/rakudo/rakudo/pull/1017 ? You mentioned wanted an RFC ticket... is the described behaviour OK or did you want to discuss more stuff?
19:10 IOninja basically if RHS range is a string range => use string comparison, if RHS is numeric range => use numeric comparison
19:11 IOninja and instead of exploding just return False
19:11 IOninja (for explosions caused by string ranges ~~ numeric ranges)
19:11 IOninja when the strings fail to coerce to numerics
19:12 AlexDaniel well, to be honest I barely had time to leave a comment today… but I'm slowly catching up now
19:12 AlexDaniel the concept of string ranges is still over my head a bit
19:12 IOninja yeah, they feel iffy
19:13 IOninja And I feel like we need something like... role Ranged[TypeStart,TypeEnd]
19:16 AlexDaniel .oO( … or RT #129131 )
19:16 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129131
19:16 IOninja instead of doing .is-int ?? and nqp::type(..Numeric) all over the place
19:17 IOninja :D
19:18 AlexDaniel mch: ‘-5’.succ
19:18 committable6 AlexDaniel, ¦«2015.12,HEAD»:
19:18 IOninja m: 'aaaaaaaaaa' ~~ 'a'..'z'
19:18 camelia rakudo-moar 2b1eb6: ( no output )
19:18 AlexDaniel mch: ‘-5’.succ.say
19:18 IOninja m: say 'aaaaaaaaaa' ~~ 'a'..'z'
19:18 camelia rakudo-moar 2b1eb6: OUTPUT«True␤»
19:18 committable6 AlexDaniel, ¦«2015.12,HEAD»: -6
19:18 IOninja m: say eager '-5'..'-7'
19:18 camelia rakudo-moar 2b1eb6: OUTPUT«(-5 -6 -7)␤»
19:18 IOninja That's fairly amusing
19:23 TimToady m: say '-9'.succ
19:23 camelia rakudo-moar 2b1eb6: OUTPUT«-10␤»
19:23 chansen_ joined #perl6
19:23 TimToady it's consistent, anyway :)
19:23 IOninja :)
19:23 AlexDaniel :S
19:23 TimToady and I think it's fine as it is
19:24 AlexDaniel what exactly? .succ counting down or the whole stringy range thing?
19:24 TimToady it's not counting down, it's doing a string increment
19:24 TimToady it has no idea what you mean by "counting"
19:24 SmokeMachine joined #perl6
19:24 AlexDaniel ok-ok, so .succ is correct, I'm fine with that
19:25 TimToady m: say "anything-9".succ
19:25 camelia rakudo-moar 2b1eb6: OUTPUT«anything-10␤»
19:25 TimToady m: say "anything-9.5".succ
19:25 camelia rakudo-moar 2b1eb6: OUTPUT«anything-10.5␤»
19:25 IOninja m: say "-9".succ.pred
19:25 camelia rakudo-moar 2b1eb6: OUTPUT«-09␤»
19:25 TimToady you get what you pay for :P
19:25 IOninja :D
19:25 TimToady perl5 doesn't even have string decrement, last I knew
19:26 AlexDaniel m: say ‘-0’.pred
19:26 camelia rakudo-moar 2b1eb6: OUTPUT«Decrement out of range␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
19:26 TimToady m: say "anything-f.5".succ
19:26 camelia rakudo-moar 2b1eb6: OUTPUT«anything-g.5␤»
19:26 TimToady m: say "anything-z.5".succ
19:26 camelia rakudo-moar 2b1eb6: OUTPUT«anything-aa.5␤»
19:27 AlexDaniel m: say ‘&’.pred
19:27 camelia rakudo-moar 2b1eb6: OUTPUT«&␤»
19:27 AlexDaniel m: say ‘’.pred
19:27 camelia rakudo-moar 2b1eb6: OUTPUT«␤»
19:27 AlexDaniel m: say ‘a’.pred
19:27 camelia rakudo-moar 2b1eb6: OUTPUT«Decrement out of range␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
19:27 ggherdov joined #perl6
19:28 IOninja AlexDaniel: well, I'm starting to implement the proper Range ~~ Range :)
19:28 TimToady m: say '000' ... '377'
19:28 camelia rakudo-moar 2b1eb6: OUTPUT«(000 001 002 003 004 005 006 007 010 011 012 013 014 015 016 017 020 021 022 023 024 025 026 027 030 031 032 033 034 035 036 037 040 041 042 043 044 045 046 047 050 051 052 053 054 055 056 057 060 061 062 063 064 065 066 067 070 071 072 073 074 075 076 077…»
19:28 mindos joined #perl6
19:28 AlexDaniel IOninja: what does it mean? What's “proper”?
19:29 pnu__ joined #perl6
19:29 IOninja m: say 0..10 ~~ '0'..'3'
19:29 camelia rakudo-moar 2b1eb6: OUTPUT«False␤»
19:29 IOninja AlexDaniel: ^ that will say True, because stringfully '10' is before '3' and after '0'
19:30 IOninja m: say 'b'..'c' ~~ 'a'..'z'
19:30 camelia rakudo-moar 2b1eb6: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5b' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
19:30 IOninja AlexDaniel: ^ and that's meant to say True
19:30 mithaldu_ joined #perl6
19:30 IOninja And I think those are the only shifts from current behaviour...
19:30 gdonald joined #perl6
19:31 IOninja Basically right now Range ~~ Range always does numeric comparison. But we'll add a case where if the RHS range is stringy, then we do a string comparison instead
19:32 IOninja m: say '0'..'10' ~~ 0..3 # as counter example to the earlier one, this one will say False, because RHS range is numeric and not stringy
19:32 camelia rakudo-moar 2b1eb6: OUTPUT«False␤»
19:32 IOninja s/will//;
19:33 IOninja Or, in a test form, proper is: https://github.com/perl6/roast/commit/e152a0ff3a
19:33 AlexDaniel IOninja: so what is the meaning of this operation?
19:34 AlexDaniel $charA..$charB ~~ $charX..$charY ?
19:34 IOninja $char* being all strings?
19:34 AlexDaniel yea, let's say one char strings
19:36 IOninja AlexDaniel: A ge X and A le Y and B ge X and B le Y
19:36 BuildTheRobots joined #perl6
19:37 IOninja "are the boundaries of LHS range within boundaries of RHS range"
19:37 perlpilot IOninja++
19:37 IOninja and it doesn't care about what elements you'd actually get if you reify that range, only about endpoints and whether they are included or excluded
19:38 AlexDaniel hmmm… X le A le Y and X le B le Y
19:38 IOninja (same as any smartmatch against numeric range)
19:38 IOninja Yeah, that's a clearer way to write it :D
19:39 IOninja m: say 'a' le 'a' le 'b'
19:39 camelia rakudo-moar 2b1eb6: OUTPUT«True␤»
19:39 AlexDaniel IOninja: I'm not sure I know any case where reifying a numeric range will make a difference
19:39 IOninja cool
19:39 IOninja m: say eager 2..5
19:39 camelia rakudo-moar 2b1eb6: OUTPUT«(2 3 4 5)␤»
19:39 IOninja m: say 2.5 ~~ 2..5
19:39 camelia rakudo-moar 2b1eb6: OUTPUT«True␤»
19:39 amalia__ joined #perl6
19:39 AlexDaniel ooooooooh…
19:39 IOninja ^ smartmatch is True even though it ain't one of the elements if you reify it
19:39 AlexDaniel I guess it makes sense then
19:40 IOninja \o/
19:40 AlexDaniel maybe
19:40 IOninja :)
19:42 perlpilot As long as it works out to change ge,le to gt,lt for exclusions (I haven't thought it through yet)
19:42 AlexDaniel that shouldn't be a problem
19:43 perlpilot A^..B ~~ X^..B  seems like it might be.
19:43 kipd joined #perl6
19:43 perlpilot er, s:2nd/B/Y/
19:44 perlpilot It looks like you'd have to call .succ or .pred depending on which side the exclusion is on.
19:44 pyrimidine joined #perl6
19:45 perlpilot (or reify stuff, but that's icky)
19:45 IOninja nah
19:45 AlexDaniel yea, just eq that thing and see if ^ is on both sides
19:45 AlexDaniel no need for pred or whatever
19:46 IOninja topic.max lt $!max || topic.max eq $!max && !(!topic.excludes-max && $!excludes-max))
19:46 AlexDaniel yup
19:46 perlpilot oh, yeah.  excellent.
19:47 perlpilot IOninja++ again :)
19:47 AlexDaniel IOninja: OK, well, if I can understand this, then perhaps there's some hope
19:47 IOninja :D
19:47 perlpilot (I don't know of a use-case for Range ~~ Range right off, but it feels right for it to be there)
19:49 pyrimidi_ joined #perl6
19:49 AlexDaniel perlpilot: thing is, I'm not even sure if there is any use case for string ranges at all… besides the one about versions (but it could've been in Version itself)
19:50 IOninja stringy range even delegates to sequence operator when the strings aren't 1-char (or the opposite, when they are, I forget)
19:50 girafe joined #perl6
19:50 olinkl joined #perl6
19:51 IOninja it does feel like it has the "but it works in Perl 5" reasoning behind it
19:51 perlpilot m: 'alpha' ... 'beta'
19:51 camelia rakudo-moar 2b1eb6: OUTPUT«Potential difficulties:␤    Useless use of ... in sink context␤    at <tmp>:1␤    ------> 3'alpha' ...7⏏5 'beta'␤»
19:51 AlexDaniel it's sounds great when you're dealing with something in ASCII range, then it all breaks up once you go further
19:51 perlpilot m: say 'alpha' ... 'beta'
19:51 camelia rakudo-moar 2b1eb6: OUTPUT«(alpha)␤»
19:51 perlpilot huh
19:51 IOninja haha
19:51 imcsk8 joined #perl6
19:51 AlexDaniel joined #perl6
19:52 perlpilot oh, i'm just slow today
19:52 w4and0er96 joined #perl6
19:52 perlpilot m: say 'alph' ... 'beta'
19:52 camelia rakudo-moar 2b1eb6: OUTPUT«(alph alpg alpf alpe alpd alpc alpb alpa alqh alqg alqf alqe alqd alqc alqb alqa alrh alrg alrf alre alrd alrc alrb alra alsh alsg alsf alse alsd alsc alsb alsa alth altg altf alte altd altc altb alta akph akpg akpf akpe akpd akpc akpb akpa akqh akqg akqf …»
19:52 IOninja Hm, with the big exception that you can do some stuff with stringy ranges without reifying them, but with sequences you gotta
19:52 AlexDaniel s/‘'s’// :S
19:54 perlpilot As long you don't need the sequence endpoint, reifying might not be too bad  :)
19:54 IOninja Except there are infinite loops inside the reification range :)
19:55 perlpilot So ... what does all of this have to do with IO?  ;)
19:55 IOninja heh
19:55 IOninja I'm off the clock... This is bonus ;)
19:56 bjz joined #perl6
19:56 AlexDaniel and you can also suddenly go out of the range too
19:56 El_Che hacker radio on perl @fosdem: https://twitter.com/nxadm/status/829417989309018112
19:59 IOninja So there's no way to reach 'alpha' from 'beta' or vice-versa?
19:59 notbenh_ joined #perl6
19:59 IOninja m: say eager "bc" .. "ba" # cause it does do reverse ranges...
19:59 camelia rakudo-moar 2b1eb6: OUTPUT«()␤»
19:59 IOninja m: say eager "bc" ... "ba" # cause it does do reverse ranges...
19:59 camelia rakudo-moar 2b1eb6: OUTPUT«(bc bb ba)␤»
20:00 AlexDaniel m: .say for (9000.chr)...(12298.chr)
20:00 camelia rakudo-moar 2b1eb6: OUTPUT«⌨␤〈␤〉␤《␤»
20:00 moritz sequences, not ranges
20:00 IOninja yeah
20:00 AlexDaniel m: .say for (9000.chr)..(12298.chr) # I'm not sure how this works by the way
20:00 camelia rakudo-moar 2b1eb6: OUTPUT«⌨␤〈␤〉␤⌫␤⌬␤⌭␤⌮␤⌯␤⌰␤⌱␤⌲␤⌳␤⌴␤⌵␤⌶␤⌷␤⌸␤⌹␤⌺␤⌻␤⌼␤⌽␤⌾␤⌿␤⍀␤⍁␤⍂␤⍃␤⍄␤⍅␤⍆␤⍇␤⍈␤⍉␤⍊␤⍋␤⍌␤⍍␤⍎␤⍏␤⍐␤⍑␤⍒…»
20:01 IOninja m: say eager "a" ... "aa"
20:01 camelia rakudo-moar 2b1eb6: OUTPUT«(a)␤»
20:01 AlexDaniel does generate the values based on codepoints?
20:01 AlexDaniel it
20:04 IOninja last I looked at the code it did lots of magicks
20:06 IOninja m: say (0..'3').perl
20:06 camelia rakudo-moar 2b1eb6: OUTPUT«0..3␤»
20:06 IOninja huh?
20:06 IOninja m: say (0..'a').perl
20:06 camelia rakudo-moar 2b1eb6: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5a' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
20:06 llfourn joined #perl6
20:06 IOninja awww, dammit
20:07 IOninja Looks like many of the tests I wrote are wrong 'cause I thought 0..'a' was the same as '0'..'a'
20:07 jkva_ joined #perl6
20:09 peteretep joined #perl6
20:09 IOninja kinda weird that one. Given choices of DWIM and explode, we choose to explode?
20:09 IOninja m: say ('a'..0).perl # and not in this case
20:09 camelia rakudo-moar 2b1eb6: OUTPUT«"a"..0␤»
20:10 IOninja m: dd WHAT ('a'..0).max
20:10 camelia rakudo-moar 2b1eb6: OUTPUT«Int␤»
20:11 * IOninja pouts
20:11 IOninja m: say eager '3'..5
20:11 camelia rakudo-moar 2b1eb6: OUTPUT«(3 4 5)␤»
20:11 IOninja m: say WHAT ('3'..5).min
20:11 camelia rakudo-moar 2b1eb6: OUTPUT«(Str)␤»
20:11 IOninja m: say WHAT ('3'..5).is-int
20:11 camelia rakudo-moar 2b1eb6: OUTPUT«(Bool)␤»
20:11 IOninja m: say ('3'..5).is-int
20:11 camelia rakudo-moar 2b1eb6: OUTPUT«False␤»
20:13 IOninja m: say (eager '3'..5).map: {.WHAT}
20:13 camelia rakudo-moar 2b1eb6: OUTPUT«((Str) (Str) (Str))␤»
20:13 IOninja .oO( just coerce the endpoint when you create the Range... :/ )
20:14 gdonald joined #perl6
20:15 andrzejku_ joined #perl6
20:15 zostay joined #perl6
20:16 IOninja m: say eager '.' .. 4
20:16 camelia rakudo-moar 2b1eb6: OUTPUT«Cannot convert string to number: radix point must be followed by one or more valid digits in '3.⏏' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
20:16 IOninja ?
20:16 IOninja man shit's broke
20:17 IOninja m: say eager '.' .. '4'
20:17 camelia rakudo-moar 2b1eb6: OUTPUT«(. / 0 1 2 3 4)␤»
20:18 RabidGravy joined #perl6
20:18 IOninja wow there's a whole bunch of weird candidates in Range.new; like List and Match :S
20:20 IOninja m: say Match ~~ Cool
20:20 camelia rakudo-moar 2b1eb6: OUTPUT«True␤»
20:20 IOninja They're just treated like numerics tho
20:21 patrickz joined #perl6
20:22 jjido_ joined #perl6
20:22 IOninja m: say ((2,) .. 'a').minmax.map({"$_ {.^name}"}).join: '..'
20:22 camelia rakudo-moar 2b1eb6: OUTPUT«1 Int..a Str␤»
20:23 IOninja And that don't roundtrip in .perl.EVAL
20:23 IOninja m: say ((2,) .. 'a').perl.EVAL
20:23 camelia rakudo-moar 2b1eb6: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5a' (indicated by ⏏)␤  in block <unit> at EVAL_0 line 1␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at EVAL_0 line 1␤ …»
20:23 IOninja hehehe..
20:25 patrickz Hey, I'm currently doing bitfiddling with perl6.
20:25 patrickz m: use NativeCall; my $var = CArray[uint8].new; $var[0] = 0b1111_1111; say $var[0];
20:25 camelia rakudo-moar 2b1eb6: OUTPUT«-1␤»
20:25 patrickz Why is this giving me a negative number?
20:26 IOninja m: say 0b1111_1111
20:26 camelia rakudo-moar 2b1eb6: OUTPUT«255␤»
20:26 IOninja m: my uint8 $x = 0b1111_1111; say $x
20:26 camelia rakudo-moar 2b1eb6: OUTPUT«255␤»
20:26 IOninja patrickz: seems a bug and I vaguelly recall seeing a ticket for it
20:26 * IOninja looks for it
20:26 geekosaur probably another spot in nqp, possibly related to arrays, that used the wrong formatter
20:27 geekosaur because at nqp level uint and int are the same and it has to use different functions when it wants to treat as signed/unsigned
20:27 IOninja ahah
20:27 IOninja patrickz: https://rt.perl.org/Ticket/Display.html?id=130267#ticket-history
20:27 AlexDaniel mch: use NativeCall; my $var = CArray[uint8].new; $var[0] = 0b1111_1111; say $var[0];
20:27 committable6 AlexDaniel, ¦«2015.12,HEAD»: -1
20:28 * IOninja sees a few more CArray-related tickets on http://perl6.fail/
20:28 pyrimidine joined #perl6
20:28 Sound joined #perl6
20:28 patrickz IOninja: Thanks for the quick response!
20:28 patrickz Do I as a total perl6 noob with some C experience have any chance in killing that bug?
20:29 IOninja patrickz: no idea, but the code's here: https://github.com/rakudo/rakudo/blob/nom/lib/NativeCall.pm6 plus these bits: https://github.com/rakudo/rakudo/tree/nom/lib/NativeCall
20:30 tony-o_ jnthn: question about IO::Socket::Async when you get a moment -
20:30 IOninja patrickz: you should be able to just copy those files into some dir, say `blah` and run perl6 -Iblah ... and it'll pick up your version
20:31 IOninja patrickz: that's assuming the bug is in NativeCall and not deeper in the food chain
20:32 patrickz IOninja: Will give it a try!
20:33 IOninja Alright, well, my Range ~~ Range passes all my tests. Not sure about those weird cases that don't round trip eval
20:33 * IOninja saves that rabbit hole for another day
20:37 pyrimidine joined #perl6
20:37 tony-o_ .tell jnthn i'm looking at IO::Socket::Async and it looks like there is no way to tell if the socket is closed currently (either through that class or even through the nqp:: stuff) - is this an accurate assessment or did I miss something?
20:37 yoleaux tony-o_: I'll pass your message to jnthn.
20:37 labster joined #perl6
20:39 perlpilot Anyone with NativeCall experience know how to deal with arrays in structs?  I seem to recall having done it once before, but my brain-fu is low today.
20:40 perlpilot Also, is there some trick to handling a C function that you pass a struct* and it allocates the struct and returns a pointer to it?
20:41 tony-o_ perlpilot: https://github.com/tony-o/perl6-csv-parser-nc/blob/master/lib/CSV/Parser/NC.pm6#L7
20:41 tony-o_ at least for your first Q
20:42 perlpilot tony-o_: and the array allocation?
20:43 alimon joined #perl6
20:43 perlpilot I think that's my main hang-up today ... dealing with allocations on either side of the Perl 6/C boundary and sending pointers to those allocations to the other side.
20:43 tony-o_ are you creating the struct on the perl side?
20:44 perlpilot yeah.  Both really.
20:44 * [Coke] wonders why 'alph'...'beta' is going -backwards-
20:44 tony-o_ your second problem seems less tricky, if the C function is allocating and returning a pointer then your sub def is just going 'sub ... returns OpaquePointer'
20:44 IOninja [Coke]: 'alpha'...'beta'; I presume it's backwards 'cause alpha got more letters in it
20:44 tony-o_ and the C side handles allocation.
20:45 IOninja But either way, it doesn't seem to be going any way
20:45 IOninja m: say eager 'alpha' ... 'beta'
20:45 camelia rakudo-moar 2b1eb6: OUTPUT«(alpha)␤»
20:45 IOninja m: say eager 'blpha' ... 'beta'
20:45 camelia rakudo-moar 2b1eb6: OUTPUT«(blpha blpgz blpgy blpgx blpgw blpgv blpgu blpgt blpgs blpgr blpgq blpgp blpgo blpgn blpgm blpgl blpgk blpgj blpgi blpgh blpgg blpgf blpge blpgd blpgc blpgb blpga blpfz blpfy blpfx blpfw blpfv blpfu blpft blpfs blpfr blpfq blpfp blpfo blpfn blpfm blpfl blp…»
20:45 tony-o_ the array allocation on the perl6 side (although I don't think that's how that's intended to work) is a good question and I don't know the answer off hand
20:45 IOninja Ah, I see
20:45 tony-o_ perlpilot: i think on the p6 side the intention is create a p6 array, and pass that to C side method
20:46 perlpilot tony-o_: yeah, that sounds right ...  I think I need some working examples to play with.
20:46 tony-o_ perlpilot: if i were home I'd send you some, they're all on my local machine..i might have a few others on github somewhere
20:46 perlpilot or ... maybe I should not play with this today since my brain is clearly not working at an acceptable percentage  :-)
20:47 perlpilot tony-o_: that would be much appreciated.
20:48 AlexDaniel joined #perl6
20:57 jme` joined #perl6
21:01 kyan joined #perl6
21:03 donaldh joined #perl6
21:08 llfourn joined #perl6
21:09 kraih joined #perl6
21:10 kraih left #perl6
21:18 cdg joined #perl6
21:19 cdg_ joined #perl6
21:25 espadrine joined #perl6
21:25 [Coke] not 'alpha' - 'alph'
21:26 [Coke] ah, and it's because it's per position, for some reason.
21:26 IOninja m: say 'alph' ... 'beta'
21:26 camelia rakudo-moar 8477f3: OUTPUT«(alph alpg alpf alpe alpd alpc alpb alpa alqh alqg alqf alqe alqd alqc alqb alqa alrh alrg alrf alre alrd alrc alrb alra alsh alsg alsf alse alsd alsc alsb alsa alth altg altf alte altd altc altb alta akph akpg akpf akpe akpd akpc akpb akpa akqh akqg akqf …»
21:26 IOninja ah yeah
21:27 [Coke] so h-> a, p->t...
21:27 IOninja m: say 'zaza' ... 'azaz'
21:27 camelia rakudo-moar 8477f3: OUTPUT«(zaza zazb zazc zazd zaze zazf zazg zazh zazi zazj zazk zazl zazm zazn zazo zazp zazq zazr zazs zazt zazu zazv zazw zazx zazy zazz zaya zayb zayc zayd zaye zayf zayg zayh zayi zayj zayk zayl zaym zayn zayo zayp zayq zayr zays zayt zayu zayv zayw zayx zayy …»
21:27 IOninja m: say ('zaza' ... 'azaz')[*-20]
21:27 camelia rakudo-moar 8477f3: OUTPUT«azag␤»
21:28 tony-o_ perlpilot: i also pm'd it to you but here's a quickie for handling arrays p6 -> c, and structs from c -> p6
21:29 tony-o_ perlpilot: https://github.com/tony-o/demo-nativecall
21:38 TEttinger joined #perl6
21:38 cdg joined #perl6
21:39 TimToady m: say ('1111' ... '0000') eqv (reverse '0000' ... '1111')
21:39 camelia rakudo-moar 8477f3: OUTPUT«True␤»
21:41 IOninja :D
21:43 gdonald joined #perl6
21:43 cdg_ joined #perl6
21:47 pyrimidine joined #perl6
21:49 pyrimidi_ joined #perl6
21:56 labster joined #perl6
21:59 itcharlie2 left #perl6
22:02 patrickz s: nqp::atposref_i
22:02 SourceBaby patrickz, Something's wrong: â�¤ERR: [31m===[0mSORRY![31m===[0m Error while compiling -eâ�¤Could not find nqp::atposref_i, did you forget 'use nqp;' ?â�¤at -e:6â�¤------> [32m    put sourcery( nqp::atposref_i [33mâ��[31m)[1];[0mâ�¤    expecting any of:â�¤        argument listâ�¤
22:02 patrickz s: 'nqp::atposref_i'
22:02 SourceBaby patrickz, Something's wrong: ␤ERR: Cannot resolve caller sourcery(Str); none of these signatures match:␤    ($thing, Str:D $method, Capture $c)␤    ($thing, Str:D $method)␤    (&code)␤    (&code, Capture $c)␤  in block <unit> at -e line 6␤␤
22:02 patrickz s: 'atposref_i'
22:02 SourceBaby patrickz, Something's wrong: ␤ERR: Cannot resolve caller sourcery(Str); none of these signatures match:␤    ($thing, Str:D $method, Capture $c)␤    ($thing, Str:D $method)␤    (&code)␤    (&code, Capture $c)␤  in block <unit> at -e line 6␤␤
22:04 IOninja patrickz: nqp:: stuff is documented in https://github.com/perl6/nqp/blob/master/docs/ops.markdown and nqp::p6* are in https://github.com/rakudo/rakudo/blob/nom/docs/ops.markdown
22:05 IOninja patrickz: there are many undocumented ones unfortunately though, including the one you're looking for
22:05 IOninja atpos is usually an array item lookup by index; no idea what `ref_i` is about
22:05 pyrimidine joined #perl6
22:06 jnthn .
22:06 yoleaux 20:37Z <tony-o_> jnthn: i'm looking at IO::Socket::Async and it looks like there is no way to tell if the socket is closed currently (either through that class or even through the nqp:: stuff) - is this an accurate assessment or did I miss something?
22:07 tony-o_ oh hey jnthn
22:08 jnthn Oh, I don't need to .tell  :)
22:08 jnthn I don't think you're missing anything.
22:09 jnthn Though I thought that in the event of a close, then the Supply of incoming data would be done.
22:09 llfourn joined #perl6
22:11 tony-o is that the only way to tell that the socket is closed?
22:11 cdg joined #perl6
22:11 tony-o calling nqp::closefh on a closed socket seems to segfault
22:12 jnthn m: IO::Socket::Async.listen("localhost", 5001).tap: -> $conn { $conn.Supply.tap: done => { say "closed" } }; my $conn = await IO::Socket::Async.connect("localhost", 5001); $conn.close; sleep 1
22:12 camelia rakudo-moar 8477f3: OUTPUT«closed␤»
22:12 tony-o i've narrowed down the segfaults in H:S:A to the multiple calls to .close
22:12 jnthn Well, the .write will fail too
22:12 jnthn Oh...we shouldn't segfault on dupe close :/
22:12 tony-o the write fails but it doesn't seem to cause segfaults
22:12 jnthn I wonder if we do dupe cleanup without validation.
22:13 tony-o m: IO::Socket::Async.listen('localhost', 5001).tap(-> $c { $c.close; $c.close; }); my $x = await IO::Socket::Async.connect('localhost', 5001); sleep 2;
22:13 camelia rakudo-moar 8477f3: OUTPUT«Unhandled exception: cannot close a closed socket␤»
22:13 cdg__ joined #perl6
22:13 timotimo patrickz: i can explain atposref
22:14 tony-o weird, maybe it's because .close is being called from a thread differing from the one it was created on
22:14 timotimo and i can actually write a bit about it in the docs
22:14 IOninja timotimo++
22:14 patrickz I think atposref is not to blame. So no need for explanation here. But go for the docs! :-)
22:14 jnthn Shouldn't matter with IO::Socket::Async, in that we should be marshalling all operations over to the evenloop thread.
22:15 timotimo not to blame for what, if i may ask?
22:15 IOninja for CArray[uint8] having negative items
22:15 patrickz m: use NativeCall; my $var = CArray[uint8].new; $var[0] = 0b1111_1111; say $var[0];
22:15 camelia rakudo-moar 8477f3: OUTPUT«-1␤»
22:15 timotimo oh
22:15 patrickz I'm currently hunting that bug
22:15 tony-o jnthn: well, i can reproduce in H:S:A - it segfaults after one request at: https://github.com/tony-o/perl6-http-server-async/blob/master/lib/HTTP/Server/Async.pm6#L62
22:16 tony-o if you comment out L62 it will run indefinitely
22:16 nowan joined #perl6
22:16 patrickz currently in NativeCall/Types.pm6
22:17 patrickz which has a: multi method AT-POS(::?CLASS:D \arr: $pos) is raw {
22:17 jnthn tony-o: It's a bit late here, but will file a MoarVM issue noting the SEGV, so can look in to it.
22:19 jnthn There is a libuv-provided way to ask "is it closed" also
22:19 jnthn Well, closed or closing
22:19 tony-o jnthn: no worries - would i have to do some NC or inline-c to ask?
22:20 timotimo description pushed
22:20 jnthn tony-o: I think we should just figure out an API for it and expose it.
22:21 jnthn That said, if we fixed .close to be idempotent, would that be sufficient for you?
22:21 cdg joined #perl6
22:23 rurban joined #perl6
22:23 baest joined #perl6
22:24 tony-o yea that would be pretty excellent
22:24 timotimo tony-o: it occurs to me that we could totally have the $conn Supply as not binary but latin1 encoded and just cheat to find the separator between headers and body
22:25 timotimo since latin1 will accept anything
22:25 timotimo and then we can much more easily .contains("\n\r\n\r") (though we will want to spell that with codepoint numbers rather than \n and \r)
22:25 pyrimidine joined #perl6
22:25 timotimo though i must admit i do not know how costly our loop in there currently is
22:25 cdg_ joined #perl6
22:26 tony-o i don't know either, we'd have to run some benchmarks on it
22:27 tony-o not sure how often binary resources would be sent to us, either tbh - that seems like unless you're imgur or instagram then the requests to send binary data would be fairly low
22:27 timotimo oh, hold on
22:27 timotimo latin1 will still do a number on newlines, won't it?
22:27 timotimo i mean, on windows
22:28 timotimo i already forgot how newline translation works
22:28 tony-o speaking of all of this, i was going to create a GH org and put some of my stuff in it so that it can be maintained and managed by the community and we can kind of get specs/direction as a group rather than having everyone firing arrows at different targets and landing anywhere between 'production ready' and 'wtf is this doing'
22:29 timotimo :D
22:29 jnthn tony-o: OK, I can see what needs doing to make .close behave that way; it's a bit more effort to make it bulletproof than I can do when this sleepy, so I'll do it in the morning. :)
22:29 timotimo how many 6tuits have you planned for tomorrow, jnthn? :)
22:30 jnthn timotimo: Probably only a couple of hours, alas.
22:30 tony-o timotimo: jnthn you guys have any interest in this?  I'd like to call it zef but if there is something more official then i can roll with that too
22:31 timotimo understood
22:31 timotimo hm, zef "the module manager" will also get HTTP::Server::Async?
22:31 timotimo how about "zeffers" instead :P
22:31 timotimo "inzeffable"
22:31 jnthn tony-o: I'm guessing you'd rather not put it under the perl6 org?
22:32 jnthn Or is it a subset of your stuff that is focused on a particular area?
22:32 tony-o i can put it on the p6 org, i don't mind.  i just thought that maybe you wouldn't want to muddy the waters with where core begins and where some body of community modules starts
22:33 tony-o it was a suggestion for Matt Oates
22:33 patrickz m: use NativeCall; my $var = CArray[uint8].new; $var[0] = 0b1111_1111; say $var[0].^name;
22:33 camelia rakudo-moar f85978: OUTPUT«Int␤»
22:33 patrickz ^ Is that also a bug or expected?
22:34 diegok joined #perl6
22:34 timotimo it likely gets boxed on the way out
22:34 jnthn If you're doing . you're always going to be boxing
22:34 jnthn And .^ doubly so; it's a meta-*object* protocol after all :)
22:35 patrickz So it's impossible for .^name to ever return uint8?
22:35 jnthn tony-o: Looking at what's under perl6 org already, DBIish and GTK::Simple are already there, for example.
22:35 jnthn patrickz: It'll only do it on the type object
22:35 jnthn m: say uint8.^name
22:35 camelia rakudo-moar f85978: OUTPUT«uint8␤»
22:35 jnthn But only on that
22:36 jnthn Well, technically it's possible through some concontion of NQP ops to end up with a boxed instance of uint8 but...it'll mostly just confuse everything :)
22:37 jnthn tony-o: And I don't really consider those to be "core" in any sense.
22:41 jnthn Sleep time; 'night
22:41 timotimo sleep time for me, too
22:42 ocbtec joined #perl6
22:44 pyrimidine joined #perl6
22:47 LeCamarade joined #perl6
22:48 tony-o sounds good, let's chat more about it tomorrow jnthn
22:48 tony-o night
22:50 LeCamarade joined #perl6
22:56 cdg joined #perl6
22:57 [particle] joined #perl6
22:59 cdg__ joined #perl6
23:00 llfourn joined #perl6
23:02 pyrimidine joined #perl6
23:05 kaare__ joined #perl6
23:11 john51 joined #perl6
23:22 pyrimidine joined #perl6
23:30 pmurias joined #perl6
23:33 lep-delete joined #perl6
23:37 espadrine joined #perl6
23:40 pyrimidine joined #perl6
23:40 john51 joined #perl6
23:44 cibs joined #perl6
23:49 pyrimidine joined #perl6
23:50 Ven joined #perl6
23:57 llfourn joined #perl6
23:57 cdg joined #perl6
23:58 pyrimidine joined #perl6

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

Perl 6 | Reference Documentation | Rakudo