»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:03 meept left, gdonald left 00:05 gdonald joined 00:06 pyrimidine joined 00:08 espadrine left 00:09 Eddward left, japhb joined 00:15 meept joined 00:22 jeffythedragonsl joined
jeffythedragonsl Hey I wanted some feedback on the MVM rename 00:23
If anyone is online 00:25
00:33 japhb left 00:35 jeffythedragonsl left 00:36 japhb joined 00:40 ocbtec left
tony-o let's hear it 00:41
00:44 agentzh left
IOninja I think they were asking *for* feedback. 00:54
github.com/MoarVM/MoarVM/pull/522 00:56
00:58 girafe left
sammers jeffythedragonsl, I haven't been following, what is the motivation behind renaming MVMArray* to VMArray*? 01:02
geekosaur they left 01:04
01:05 zacts left
SmokeMachine IOninja: Eddward: aren't the backslashes to scape the hash's %? 01:05
01:06 zakharyas joined, japhb left 01:07 lukaramu left 01:08 japhb joined
IOninja SmokeMachine: yes, but originally it wasn't indicated it was the output of .perl 01:08
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
01:19 cibs left, adu joined 01:20 AJ_ joined 01:21 cibs joined, adu left 01:23 cdg_ left, cdg joined, zacts joined
samcv good * #perl6 01:26
timotimo heyo samcv
samcv hi :)
i'm going to transfer github.com/samcv/Atom-as-a-Perl6-IDE/ to be a perl 6 repo 01:30
so more people can edit it without PR
done 01:31
01:31 sufrostico left 01:33 jeffythedragonsl joined, japhb left
jeffythedragonsl hey 01:35
01:35 japhb joined
timotimo hey jeffythedragonsl 01:35
i ... have kind of bad news for you
irclog.perlgeek.de/moarvm/2017-02-07#i_14059465 01:36
jeffythedragonsl it's ok 01:37
these things happen
MasterDuke jeffythedragonsl: you can join my club, my first moarvm PR was rejected also
jeffythedragonsl haha 01:38
timotimo we might want to give the issues list a good once-over ...
jeffythedragonsl I just really would like to see perl 6 succeed
01:38 meept left
jeffythedragonsl well i did find that missing "Mu " bug so that's a start 01:40
timotimo the one that made the repl unhapy?
jeffythedragonsl ya
timotimo that was a good one
timotimo clickbaits p6weekly.wordpress.com/2017/02/07/...fter-math/ 01:41
01:41 AlexDaniel joined 01:43 mrdside joined
mrdside hi! how can i open file with "KOI8-R Cyrillic" encoding? 01:43
01:43 jeffythedragonsl left
timotimo oh yikes 01:43
01:44 jeffythedragonsl joined
jeffythedragonsl nice 01:44
timotimo mrdside: you can read it in as binary and copy-paste the table from en.wikipedia.org/wiki/KOI8-R to turn it into a list of unicode characters (with the chr sub)
mrdside maybe i can convert it in shell? 01:45
i need fast solution
convert and than read in perl 01:46
timotimo yeah, a program called "iconv" can help you here
kind of like iconv -f koi8-r -t utf8 my_file_with_cyrillic.txt
might want to put a -o output_file.txt in there, too
so it'll end up in a file rather than in your shell
samcv i like koi fish 01:47
nice KOI is so old it was designed by the soviet union 01:48
01:48 cdg left 01:49 cdg joined
jeffythedragonsl well if you see another easy moarvm issue send me an email 01:49
01:50 meept joined 01:51 meept left
MasterDuke jeffythedragonsl: i would think github.com/MoarVM/MoarVM/issues/513 is approachable 01:51
01:51 labster1 left
mrdside don't work with Cyrillic 01:51
only KIOR-8
timotino: i need collect data from two text files in this encoding 01:52
01:52 zacts left
IOninja reads new GitHub terms of service 01:52
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
01:54 BenGoldberg joined
timotimo mrdside: isn't that exactly what you need? 01:54
i'm confused
samcv IOninja, link to changes for github TOS?
01:54 AJ_ left
samcv mrdside, i would just convert using some utility to unicode and then work with it 01:54
IOninja samcv: github.com/blog/2314-new-github-te...of-service 01:55
samcv what i don't get a diff of the changes?
thanks github
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?
to check if equal?
mrdside compare by people names
timotimo if you don't care what the actual strings are, you can just compare them byte-by-byte and not decode at all
samcv hah timotimo 01:57
01:57 mempko left
mrdside timotimo: sound good, and, i think, enough for me 01:59
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.
timotimo my suggestion, though, is to decode the files as latin1 02:01
IOninja goes to bed
timotimo so you can use string functions then
mrdside Malformed UTF-8
timotimo decode it as latin-1 02:02
i.e. open with :enc<latin-1>
mrdside abracadabra
but, at least, more symbols )) 02:03
timotimo yeah, you'll see a bit of crap
BenGoldberg m: use experimental :macros; macro twice($q) { return quasi { {{{$q}}}, {{{$q}}} } }; twice say 42;
camelia rakudo-moar 51b0ab: OUTPUT«42␤42␤»
BenGoldberg m: use experimental :macros; macro prefix:<twice>($q) { return quasi { {{{$q}}}, {{{$q}}} } }; twice say 42;
camelia rakudo-moar 51b0ab: OUTPUT«42␤42␤»
BenGoldberg m: use experimental :macros; macro postfix:<twice>($q) { return quasi { {{{$q}}}, {{{$q}}} } }; say 42 twice;
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
BenGoldberg Can anyone well me why that third one doesn't work?
s/well/tell/ 02:05
mrdside timotimo: work after `iconv` to `utf-8` 02:06
timotimo: and read `my $fh = open("1-utf.txt", :r)`
02:08 cibs left 02:09 labster joined, cibs joined
timotimo ah 02:10
sammers timotimo, thanks 02:12
02:13 labster left
samcv nice mrdside 02:16
.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?
samcv what?
02:17 jeffythedragonsl left
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:18
02:19 pyrimidine left, mrdside left
samcv could be very significant if you are sorting names which have normal latin letters with ones that have cyrillic letters 02:21
02:21 gdonald left 02:22 gdonald joined
samcv m: say ('Бруно','Вадим').sort 02:23
camelia rakudo-moar 51b0ab: OUTPUT«(Бруно Вадим)␤»
samcv m: use experimental :collation; say ('Бруно','Вадим').collate
camelia rakudo-moar 51b0ab: OUTPUT«(Бруно Вадим)␤»
samcv hmm not sure why .sort sorts that way. but i guess that B is not a latin b?
the capitac lB
capital B
m: 'В'.uniname.say 02:24
camelia rakudo-moar 51b0ab: OUTPUT«CYRILLIC CAPITAL LETTER VE␤»
AlexDaniel Б is b :)
samcv that would do it
no i know that
m: use experimental :collation; say ('Brian', 'Бруно','Вадим').collate
camelia rakudo-moar 51b0ab: OUTPUT«(Brian Бруно Вадим)␤»
samcv m: use experimental :collation; say ('Applesauce', 'Brian', 'Бруно','Вадим').collate
camelia rakudo-moar 51b0ab: OUTPUT«(Applesauce Brian Бруно Вадим)␤»
samcv m: use experimental :collation; say ('Applesauce', 'Brian', 'Бруно','Вадим').sort
camelia rakudo-moar 51b0ab: OUTPUT«(Applesauce Brian Бруно Вадим)␤»
02:24 pyrimidine joined
samcv m: use experimental :collation; say ('ZZZ', 'Applesauce', 'Brian', 'Бруно','Вадим').sort 02:25
camelia rakudo-moar 51b0ab: OUTPUT«(Applesauce Brian ZZZ Бруно Вадим)␤»
samcv m: use experimental :collation; say ('ZZZ', 'Applesauce', 'Brian', 'Бруно','Вадим').collate
camelia rakudo-moar 51b0ab: OUTPUT«(Applesauce Brian ZZZ Бруно Вадим)␤»
AlexDaniel m: use experimental :collation; say ('Applesauce', 'Brian', 'Бруно','Вадим', 'Ананас').sort
camelia rakudo-moar 51b0ab: OUTPUT«(Applesauce Brian Ананас Бруно Вадим)␤»
samcv m: use experimental :collation; say ('ZZZ', 'Applesauce', 'Brian', 'Бруно','Вадим').collate
camelia rakudo-moar 51b0ab: OUTPUT«(Applesauce Brian ZZZ Бруно Вадим)␤»
samcv hmm interesting
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
AlexDaniel m: use experimental :collation; say ('Applesauce', 'Brian', 'Бруно','Вадим', 'Ананас').collate 02:27
camelia rakudo-moar 51b0ab: OUTPUT«(Applesauce Brian Ананас Бруно Вадим)␤»
samcv m: use experimental :collation; say ('ZZZ', 'zephyer', 'Applesauce', 'Brian', 'Бруно','Вадим').sort
camelia rakudo-moar 51b0ab: OUTPUT«(Applesauce Brian ZZZ zephyer Бруно Вадим)␤»
samcv m: use experimental :collation; say ('ZZZ', 'zephyer', 'applesauce', 'Applesauce', 'Brian', 'Бруно','Вадим').sort
camelia rakudo-moar 51b0ab: OUTPUT«(Applesauce Brian ZZZ applesauce zephyer Бруно Вадим)␤»
samcv m: use experimental :collation; say ('ZZZ', 'zephyer', 'applesauce', 'Applesauce', 'Brian', 'Бруно','Вадим').collate
camelia rakudo-moar 51b0ab: OUTPUT«(applesauce Applesauce Brian zephyer ZZZ Бруно Вадим)␤»
samcv the rusian letters just seem to be in the correctish order 02:28
unlike the ascii latin letters
tho might change when you put russian lowercase in there i'm not sure if lowercase comes before uppercase or the converse in unicode
AlexDaniel m: use experimental :collation; say ('ZZZ', 'zephyer', 'applesauce', 'Applesauce', 'Brian', 'Бруно','Вадим', 'бруно', 'вадим').collate
camelia rakudo-moar 51b0ab: OUTPUT«(applesauce Applesauce Brian zephyer ZZZ бруно вадим Бруно Вадим)␤»
02:30 pyrimidine left, adu joined
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 бруно вадим Бруно Вадим)␤»
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 Бруно Вадим бруно вадим)␤»
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 бруно вадим Бруно БРУНО Вадим ВАДИМ)␤»
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 БРУНО Бруно ВАДИМ Вадим бруно вадим]␤»
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 Бруно БРУНО Вадим ВАДИМ)␤»
samcv nice. it sorted by case
irrespective of what the letters where
02:36 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
samcv fancy! 02:37
i have been meaning to test my implementation of UCA against the UCA test provided by unicode 02:39
i think i'll do that today
BenGoldberg It seems so strange that you use a global, $*COLLATION ...
samcv well it's a dynamic variable
BenGoldberg What if two threads want to do it differently?
samcv well not sure if we have it this way yet, but the plan is to do $*COLLATION = Collation.new; 02:40
inside a block
02:40 mrdside joined
mrdside timotimo: i solved with service `2cyr.com/decode/` 02:40
BenGoldberg Personally, I'd be more comfortable doing: my $collation = Collation.new; $collation.sort(@array) 02:41
timotimo thing is that with the dynamic var you can tell routines that live outside your "jurisdiction" how to sort stuff 02:43
but it'd be interesting to have the .sort or .collate method on the Collation, too 02:46
02:46 samcv joined 02:47 labster joined
adu hi all 02:48
02:55 user__ joined 02:59 user_ left
samcv hello 02:59
03:01 LeCamarade left
samcv omg gather take is amazing 03:01
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
and that's the short file ;) 03:02
03:03 labster1 joined, labster left 03:07 AlexDaniel left 03:13 circ-user-Bpuqu joined
circ-user-Bpuqu I'm just want to know if it valid: 03:17
say ('a'..'c') ~~ ('a'..'c'); 03:24
MasterDuke m: say ('a'..'c') ~~ ('a'..'c');
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␤␤»
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
because it's not just single codepoints that can have collation weights, but series of codepoints
m: say ('a'..'c') eqv ('a'..'c'); 03:26
camelia rakudo-moar 51b0ab: OUTPUT«True␤»
MasterDuke m: say ('a'..'c').list ~~ ('a'..'c').list; 03:27
camelia rakudo-moar 51b0ab: OUTPUT«True␤»
MasterDuke m: say ('a'..'c').list ~~ ('a'..'z').list;
camelia rakudo-moar 51b0ab: OUTPUT«False␤»
03:28 agentzh joined 03:30 cdg left
samcv m: ('a'.. 'c').WHAT 03:33
camelia ( no output )
samcv m: ('a'.. 'c').WHAT.say 03:34
camelia rakudo-moar 51b0ab: OUTPUT«(Range)␤»
samcv what would smart match do for Ranges?
m: say ('a'..'c').list ~~ ('a'..'d').list
camelia rakudo-moar 51b0ab: OUTPUT«False␤»
MasterDuke m: say (1..3) ~~ (1..3); 03:36
camelia rakudo-moar 51b0ab: OUTPUT«True␤»
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:41 adu left 03:54 Lucas_One left 03:58 gdonald left
samcv m: say 'a' before 'c' 03:58
camelia rakudo-moar 51b0ab: OUTPUT«True␤»
04:00 gdonald joined 04:02 wamba joined
MasterDuke m: say 'a' gt 'c' 04:03
camelia rakudo-moar 51b0ab: OUTPUT«False␤»
masak m: say 'bros' before 'garden hoes' 04:04
camelia rakudo-moar 51b0ab: OUTPUT«True␤»
masak or is that 'garden hoses'? not sure.
samcv m: say 'Z' gt 'a' 04:05
camelia rakudo-moar 51b0ab: OUTPUT«False␤»
04:06 skids joined
samcv lameo 04:06
Error encoding UTF-8 string: could not encode codepoint 55296
in sub proclaim at /home/samantha/perl6/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 605
odd that the error happens in Test module and not in my own code... 04:07
m: 55296.uniname.say
camelia rakudo-moar 51b0ab: OUTPUT«<Non Private Use High Surrogate>␤»
samcv not sure to deal with these High Surrogates 04:09
i wonder if i can just remove them and it should be fine? 04:10
m: 55296.base(16).say
camelia rakudo-moar 51b0ab: OUTPUT«D800␤»
samcv m: Uni.new(0xD800, 0x0021) 04:11
camelia ( no output )
samcv m: Uni.new(0xD800, 0x0021).say
camelia rakudo-moar 51b0ab: OUTPUT«Uni:0x<d800 0021>␤»
samcv m: Uni.new(0xD800, 0x0021).Str
camelia ( no output )
samcv m: Uni.new(0xD800, 0x0021).Str.say
camelia rakudo-moar 51b0ab: OUTPUT«Error encoding UTF-8 string: could not encode codepoint 55296␤ in block <unit> at <tmp> line 1␤␤»
samcv m: Uni.new(0xD800, 0x0021).Str.ords
camelia ( no output )
samcv m: Uni.new(0xD800, 0x0021).Str.ords.say
camelia rakudo-moar 51b0ab: OUTPUT«(55296 33)␤»
samcv hmmmmm
04:12 mrdside left, jdmmmmm joined
samcv m: 55296.uniprop('MVM_Collation_Primary').say 04:12
camelia rakudo-moar 51b0ab: OUTPUT«0␤»
samcv m: 'a'.uniprop('MVM_Collation_Primary').say
camelia rakudo-moar 51b0ab: OUTPUT«0␤»
samcv forget the name of that property 04:13
04:14 Eddward joined
samcv m: 'a'.uniprop('MVM_COLLATION_PRIMARY').say 04:14
camelia rakudo-moar 51b0ab: OUTPUT«7240␤»
samcv m: 55296.uniprop('MVM_COLLATION_PRIMARY').say
camelia rakudo-moar 51b0ab: OUTPUT«0␤»
samcv m: 0021.chr.say
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␤ ------> 0300217⏏5.chr.say␤␤»
samcv m: 0x0021.chr.say
camelia rakudo-moar 51b0ab: OUTPUT«!␤»
samcv ok i guess i can just ignore those
is there a way i can grep -v in perl 6? 04:15
i never figured out how to grep OUT things
MasterDuke m: say ^9 .grep({ not $_ > 3}) 04:16
camelia rakudo-moar 51b0ab: OUTPUT«(0 1 2 3)␤»
MasterDuke m: say ^9 .grep({ $_ > 3})
camelia rakudo-moar 51b0ab: OUTPUT«(4 5 6 7 8)␤»
samcv that is lta 04:17
should be an easy way to do that
we need a named parameter please 04:18
Eddward Is there a trick to getting at the bytes behind a string? 04:20
samcv yes
do you want to encode it as utf-8? or uh
what do you want, the codepoints? 04:21
what are you doing with these bytes. do you want the bytes the string would be in if you wrote it to a file?
Eddward I'm trying to find the difference between "Più" & "Piu􏿽xCC􏿽x80" and why it gets changed passing through p6
samcv m: "Più".uninames.say; "Piu􏿽xCC􏿽x80".uninames.say
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)␤»
samcv Eddward, are they not the same? 04:22
tell me what the differences are between the two
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 "Piu􏿽xCC􏿽x80".ords
camelia rakudo-moar 51b0ab: OUTPUT«(80 105 249)␤(80 105 249)␤»
Eddward In a file processed by p5 the u is 3 bytes. The version processed by p6 is 2 bytes.
MasterDuke i get a different result on my machine
samcv perl 5 doesn't care about unicode though
MasterDuke (80 105 249) vs (80 105 117 1114109 120 67 67 1114109 120 56 48) 04:24
samcv they are equivelant unicode strings
wtf
Eddward, what are you trying to do? are you reading from a file that is not normalized unicode?
MasterDuke, what is perl's equivilant of ords? 04:25
Eddward, i can help you if you can tell me the codepoints of both strings
Eddward I'm reading an sqlite db generated by a mono program. I read out a file URI with the characters (mostly) uri escaped.
samcv from what perl 5 sees
04:26 Actualeyes left
MasterDuke samcv: don't know 04:26
Eddward Will the output of a hex editor help?
samcv sprintf '%2.2x', unpack('U0U*', $char)
Eddward 00000000: 4164 6167 696f 202d 2050 6975 cc80 2061 Adagio - Piu.. a
samcv Eddward, can you do that for both strings?
Eddward 00000000: 4164 6167 696f 202d 2050 69c3 b920 616e Adagio - Pi.. an
samcv no i don't want hex of the file. that's utf-8 encoded
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
04:27 pyrimidine joined
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
Does p6 not write utf8 by default on linux?
samcv no it writes utf8
but perl 6 normalizes all unicode to the canonical representation
Eddward I can't generate the 3 byte version in perl6.
That's my problem. 04:29
samcv because that's not the proper unicode representation?
i'm not sure why you want to generate it
Eddward I need the 3 byte version because that's the file name in the fs. perl6 is creating a 2 byte version.
samcv oh....
crap
fug
this makes me sad then 04:30
Eddward Sorry to share sadness. :(
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
though it might
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".
samcv i think mac os x saves the canonical representation or something
can you rename the files? 04:32
Eddward I could rename it, but I'm not super keen on renaming files because a toy script can't handle it. 04:33
Is that a linux bug or an arbitrary decision?
04:33 pyrimidine left
samcv linux doesn't do anything with unicode, it just saves the filename exactly how it was specified 04:33
unlike mac os x
Eddward I'm just trying to translate a perl5 script to learn perl6 and I'm able to declare defeat.
samcv well that's the source of the issue, the filenames are not saved with their proper unicode codepoint sequences 04:34
so i'm guessing these files were generated with perl 5?
Eddward The file is from the openmus project. I'd think they'd have caught heck for making files with corrupt names.
samcv unlikely Eddward
Eddward The file is Symphony No. 1 in C Minor, Op. 68 - IV. Adagio - Piu􏿽xCC􏿽x80 andante - Allegro non troppo, ma con brio.mp3 04:35
I just unzipped it.
samcv link to it?
Eddward well, not just now....
Let me go find it....
samcv oh thanks!
i'm guessing it's saved decomposed 04:36
m: say 'u􏿽xCC􏿽x80'.ords
camelia rakudo-moar 51b0ab: OUTPUT«(249)␤»
samcv m: say 'u􏿽xCC􏿽x80'.NFD.say
camelia rakudo-moar 51b0ab: OUTPUT«NFD:0x<0075 0300>␤True␤»
samcv m: say 'u􏿽xCC􏿽x80'.NFD
camelia rakudo-moar 51b0ab: OUTPUT«NFD:0x<0075 0300>␤»
samcv yeah it's probbaly saved as 0x75, 0x300
which is what causes it to be stored in more bytes 04:37
i think os x 04:38
will allow you to access a file as 0x75, 0x300, even if on disk it's codepoint 249 04:39
which is pretty smart
04:39 Actualeyes joined
samcv Eddward, will you be here in 20 minutes 04:39
Eddward I think 04:40
04:40 Cabanoss- joined
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 archive.org/download/musopen-dvd/M...20brio.mp3
ok 04:41
The dvd is probably bigger than you want: archive.org/details/musopen-dvd 04:43
04:43 Cabanossi left, Cabanoss- is now known as Cabanossi
Eddward But the single file download was saved as a 3 byte code by firefox. I'll check back... 04:43
04:45 skids left 04:49 LeCamarade joined, LeCamarade left 04:51 LeCamarade joined, LeCamarade left 04:53 LeCamarade joined
samcv ok i'm back 04:56
04:57 alt1LeCamarade joined 04:58 altLeCamarade left 04:59 alt1LeCamarade left
samcv Eddward, it seems to read the file name properly i think 04:59
with the non-normalized unicode
04:59 alt1LeCamarade joined
Eddward Perl6 reads it? 05:00
samcv maybe. i'm investigating
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
If I do an ls with the normalized version created by p6, ls fails.
samcv idk i get
"Symphony No. 1 in C Minor, Op. 68 - IV. Adagio - Piu􏿽xCC􏿽x80 andante - Allegro non troppo, ma con brio.mp3".IO
Eddward I'm guess mpd will fail to, but I haven't tested that.
samcv let me try and move the file 05:02
or something
05:02 khw left
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
Eddward I should probably be dealing with buffers or something.
samcv ok so what are you doing again? making a playlist?
05:02 alt1LeCamarade left
samcv from a folder of music files? 05:03
05:04 alt1LeCamarade joined
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
05:04 alt1LeCamarade left
Eddward err banshee 05:04
samcv hm 05:05
Eddward I have a working version written in perl5. I'm testing against it.
samcv ok it seems to be reading it oddly 05:06
05:06 altLeCamarade joined
samcv the filename. it's possible it has invalid unicode characters in it 05:06
or there's a bug
i get "Symphony No. 1 in C Minor, Op. 68 - IV. Adagio - Piu􏿽xCC􏿽x80 andante - Allegro non troppo, ma con brio.mp3".IO
and i get a private use character in it
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
The file maybe invalid, but so far, perl6 is thing only thing on any of my systems that has called foul.
It seems right in an "I don't care" kind of way. 05:08
For what it's worth, this page shows the 2 byte version. musopen.org/music/1564/johannes-br...nor-op-68/ 05:09
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
05:10 pyrimidine joined 05:11 wamba left
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
which is not what perl 6 says
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
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…»
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
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)
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␤------> 031,46,32,49,32,105,110,32,67,32,77,105,117⏏5<EOL>␤ expecting any of:␤ statement en…»
samcv i think irc cut me off oh well will try on my computer
Eddward I suspect URI::escape maybe be changing it, but I don't know that.
05:13 pyrimidine left 05:14 pyrimidine joined
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␤------> 0312,51).Str.ords eq (83,121,109,112,104,17⏏5<EOL>␤ expecting any of:␤ statement en…»
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)
Did it to me too.
# todo - automatic invalid UTF-8 detection 05:15
# see www.w3.org/International/questions/...orms-utf-8
# find first sequence of %[89ABCDEF]<.xdigit>
# use algorithm from url to determine if it's valid UTF-8 05:16
sub uri-unescape(*@to_unesc, Bool :$no-utf8 = False) is export {
my @rc = @to_unesc.flatmap: {
.trans('+' => ' ')\
.subst(:g, / [ '%' (<.xdigit> ** 2 ) ]+ /, -> $/ {
$no-utf8
?? $0.flatmap({ :16(~$_).chr }).join
!! Buf.new($0.flatmap({ :16(~$_) })).decode('UTF-8')
})
};
return |@rc;
}
I wonder if I need that utf8 flag.
samcv where is that stuff you just pasted from? 05:18
the uri code?
yeah it may be invalid utf-8. i suspect it may be
for filenames it converts invalid utf-8 to synthetic codepoints 05:19
so that it doesn't 'lose' them
05:19 pyrimidine left
samcv since it can't convert to a normal unicode string 05:19
05:19 jeffythedragonsl joined
samcv Eddward, make sure to enable unicode strings and utf8, always as a matter of policy 05:20
otherwise odd things can happen
i don't think this is related to that, i'm sure your script will work with them (most likely)
Eddward rakudo-star-2017.01/modules/uri/lib/URI/Escape.pm 05:21
samcv ah that's the one you're using?
though i think the problem is invalid utf-8
Eddward I was told to use that by IOninja.
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
get the wrong URI if you're using the filename
maybe there's some utility we can use to batch rename files in valid utf-8?
Eddward I'm using uri_unescape to decode the URI in the DB file. 05:23
I'm not super eager to change a bunch of files on my system for this.
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
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.
samcv i suspend they have some way to handle invalid utf-8 and convert it to valid utf-8
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.
samcv gfldex, it won't throw if the filename is invalid utf-8 05:27
it just uses utf8-c8 to decode filenames regardless
gfldex, if you want to try and download the file yourself: archive.org/download/musopen-dvd/M...20brio.mp3
and see what you think
Eddward So is it safe to say perl6 can't handle this data? 05:28
gfldex takes notes
samcv yes it would seem supposing this is invalid utf-8, perl 6 is unable to correct it to what it should beq
Eddward I'm just processing path data.
gfldex it's safe to say Rakudo can't handle it and it may or may not be a bug
may be worth a bugreport 05:29
samcv afaik moarvm retains all invalid utf-8
either that or it's a bug in utf8-c8 and it is valid but it's not decoding it right 05:31
one of the two
though i'm inclined to think more likely it's slightly invalid in some way
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
Thanks anyway. I think this is where I give up.
samcv well it can preverse it due to round trip
but it cannot pull out what other things are seeing the filename is
*preserve
Eddward :-) 05:33
samcv heh
but if i do qx{ls}.trim.IO.s
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
Eddward ooh, I'll try that. I'm curious.
samcv i'm going to open a ticket for MoarVM 05:35
Eddward OK. Should I gather other/better data? 05:36
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
and then try and check filename.IO.e
which checks if it exists 05:39
Eddward How do I get codepoints from a string?
samcv .ords
m: say "hello".ords
camelia rakudo-moar 51b0ab: OUTPUT«(104 101 108 108 111)␤»
samcv m: say "hello".ords.perl
camelia rakudo-moar 51b0ab: OUTPUT«(104, 101, 108, 108, 111).Seq␤»
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
Eddward 80, 105, 249 is what I get from the qx{ls ...} 05:41
samcv Eddward, github.com/MoarVM/MoarVM/issues/525
should subscribe to that if you have a github account
Eddward, `say $_.IO.e for qx{find .}.lines` 05:42
in a folder with the problem file that has two other files as well i get "True␤False␤True" 05:43
that is how you can see if there's any more files that have this issue
Eddward > say $_.IO.e for qx{find .}.lines 05:45
Unable to read from 'find .'
in block <unit> at <unknown file> line 1
samcv my @list;
$_.IO.e or @list.push($_.IO) for qx{find .}.lines;
say @list;
this is what i would do
not sure why you would get that error
Eddward Unable to read from 'find .' 05:46
samcv gist.github.com/c658da51e0cdc4a5bb...0d13796650
Eddward let me play with it...
samcv can you try downloading this into the folder that has the file and run it?
Eddward qx{ls .} works. qx{find .} doesn't 05:47
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␤␤»
Eddward perl6 /tmp/find_bad_files.p6 05:49
Unable to read from 'find .'
in block <unit> at /tmp/find_bad_files.p6 line 2
Actually thrown at:
in block <unit> at /tmp/find_bad_files.p6 line 2
05:49 BenGoldberg left
Eddward qx{find . | head} works 05:50
My library is very large.
Let me subset this.
samcv i'm making a recursive version now 05:51
Eddward, can you run 'find .' on the command line?
Eddward yep 05:52
find . | wc -l
69946
05:52 jdmmmmm left
Eddward qx{find /tmp}.lines works 05:53
qx{find 'mp3/Musopen DVD/Brahms - Symphony No 1 in C Major'}.lines works, 05:54
samcv Eddward, my new recursive version gist.github.com/samcv/c658da51e0cd...0d13796650
05:55 curan joined
samcv hmm then 05:55
does qx{find} work?
should do the same thing
Eddward qx{find} doesn't work. Trying new script....
samcv really? wtf 05:56
Eddward perl6 /tmp/find_bad_files.p6
samcv Eddward, how about `run 'find'`
Eddward Unable to read from 'find .'
in sub MAIN at /tmp/find_bad_files.p6 line 4
in block <unit> at /tmp/find_bad_files.p6 line 1
Actually thrown at:
in sub MAIN at /tmp/find_bad_files.p6 line 4
in block <unit> at /tmp/find_bad_files.p6 line 1
samcv can you: run 'find'
Eddward bingo. That works... 05:57
samcv ok :) modifying my script
Eddward I'm trying to figure out something like say $_.IO.e for run("find .").split("\n") 05:59
Is there a perldoc6 ?
samcv docs.perl6.org 06:00
you want .lines
but i'm almost done making this work
06:02 jeffythedragonsl left
samcv Eddward, got it! gist.github.com/samcv/c658da51e0cd...0d13796650 06:03
06:03 circ-user-Bpuqu left
Eddward :-/ 06:04
perl6 /tmp/find_bad_files.p6
Malformed UTF-8
in sub MAIN at /tmp/find_bad_files.p6 line 4
in block <unit> at /tmp/find_bad_files.p6 line 1
I think we knew that. 06:05
Running /tmp with the copy I downloaded.... 06:06
perl6 /tmp/find_bad_files.p6 /tmp
["/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]
samcv where do you get the malformed utf-8?
wait. so in this case the shell is outputting malformed utf-8 too? 06:07
weird...
so that file is maybe double bad?
the one file you gave me i don't get malformed utf-8
do you get that error with JUST that file?
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.
samcv only that one mp3? 06:09
weird about the emacs files
Eddward That's the only mp3 in /tmp. 06:10
samcv runs it on my whole home directory
goddamit malformed utf-8 and it died
Eddward perl6 /tmp/find_bad_files.p6 ~ 06:11
Unable to read from 'find /home/hursh'
in sub MAIN at /tmp/find_bad_files.p6 line 4
in block <unit> at /tmp/find_bad_files.p6 line 1
Actually thrown at:
in sub MAIN at /tmp/find_bad_files.p6 line 4
in block <unit> at /tmp/find_bad_files.p6 line 1
06:12 gdonald left
samcv gonna try putting some try blocks in there 06:13
hmm it still dies
06:14 gdonald joined, circ-user-Bpuqu joined
samcv probably because that exception happens in moarvm 06:15
sammers hi #perl6 06:16
how does Thread.yield work? 06:17
samcv well. commenting out that exception throwing in moarvm and trying again. XD
06:17 elisdg joined
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
sammers: have you looked at the Rakudo source code? it's pretty authoritative.
sammers yeah, good point.
thanks, I will take a look. there weren't any examples on docs.perl6.org 06:19
masak now, *that's* good feedback ;)
maybe open a github issue at github.com/perl6/doc ? 06:20
sammers ok, will do
masak, this is the file you were referring to? rakudo/src/core/Thread.pm 06:22
06:24 wamba joined 06:27 bwisti left
Eddward samcv: Needs to handle white space in names. 06:28
perl6 /tmp/find_bad_files.p6 ogg/
find: `ogg/Aesop': No such file or directory
find: `Rock': No such file or directory
find: `ogg/Aesop': No such file or directory
find: `Rock/big_ones': No such file or directory
/bin/sh: 1: Soldiers: not found
find: `ogg/game/Swords': No such file or directory
quote $dir on line 4. 06:29
and $path on line 10 06:30
samcv ah
thanks you 06:31
Eddward so far I have offensive mp3s and mod files. The oggs, flacs, wavs, and rm files are good. 06:34
I'm checking the sids.
samcv kk
thank you
06:37 CIAvash joined 06:41 kyan left
Eddward The quoting's not enough. I have files with singles quotes and $. 06:41
Still looks like that's the only file. 06:42
find /space/pub/music/mp3/ -type d -print0 | xargs -l -0 perl6 /tmp/find_bad_files.p6 06:43
samcv if it is invalid utf-8 i'll contact archive.org but regardless seems other things can handle it 06:45
06:45 wamba left
Eddward yep 06:45
samcv though i'm not sure how that would work. currently it saves all bad utf-8
i don't think it has a mechanism for save this bad utf-8 but also pull out a good name
Eddward There'll be other problem files.
06:45 falafel joined
samcv but i will ask jnthn about it 06:45
Eddward ok. Thanks for looking at it. 06:46
samcv no problem :)
06:47 elisdg left
samcv Eddward, i'll try and update the script so we don't have to quote anything 06:47
and use 'run'
Eddward Sounds good. 06:49
06:49 Eddward left, Eddward joined
samcv Eddward, updated gist.github.com/samcv/c658da51e0cd...0d13796650 06:52
06:53 RabidGravy joined
Eddward perl6 /tmp/find_bad_files.p6 06:54
Malformed UTF-8
in sub MAIN at /tmp/find_bad_files.p6 line 4
in block <unit> at /tmp/find_bad_files.p6 line 1
06:54 rurban joined
Eddward doesn't matter which path we take on line 4. 06:56
samcv omg Eddward www.j3e.de/linux/convmv/man/
converts filename encoding
gonna install it and try on that file
Eddward :-)
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/
["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]
samcv Eddward, interestingly if i tab complete that file
Eddward There's something worse than that file in my tree.
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␤»
samcv m: say 0x0300.uniname
camelia rakudo-moar 51b0ab: OUTPUT«COMBINING GRAVE ACCENT␤»
samcv the combining grave accent mark doesn't render
and my terminal just shows Piu<0300>
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
and back
Eddward I'm en_US.utf8 for everything but LANGUAGE LC_ALL 07:00
samcv what do you know 07:01
Eddward those are blank.
samcv converting it to another format and back, now can read the filename fine in perl 6 :P
Eddward ?
samcv "Symphony No. 1 in C Minor, Op. 68 - IV. Adagio - Più andante - Allegro non troppo, ma con brio.mp3"
Eddward Is it 2 byte or 3?
samcv uh
dunno but it seems to be fixed 07:02
and visually it looks exactly the same
still has the u with the ` on it
probably 2 bytes
since that's what it should be
you want 2 bytes right? 07:03
not sure exactly what it is.
but try installing convmv
Eddward It's 3 byte in the filesystem.
samcv convmv -f utf-8 -t ISO-8859-1 filename.mp6
convmv -f utf-8 -t ISO-8859-1 filename.mp6 --notest (to actually move) 07:04
then convmv -f ISO-8859-1 -t utf-8
Eddward Changing the filename would remove the problem.
samcv then just reindex it i guess?
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.
The original problem was that perl6 can't handle it as is when everything else in the pipeline can.
samcv yeah
agreed
time to get back to working on unicode collation algorithm :P 07:08
Eddward sounds good. It's way past my bed time. I'm going to shutdown for the night. 07:09
Thanks again.
samcv night!
07:09 pyrimidine joined, zacts joined 07:14 pyrimidi_ joined, pyrimidine left 07:16 darutoko joined 07:18 raiph left 07:19 pyrimidi_ left 07:20 Eddward left 07:21 raiph joined 07:22 raiph left, raiph joined 07:23 falafel left, jjido joined 07:25 LeCamarade left 07:28 jjido left 07:29 mr-foobar left 07:32 jjido joined 07:37 wamba joined 07:44 circ-user-Bpuqu left
nine samcv: maybe you could even do convmv -f utf-8 -t utf-8? 07:46
samcv nope that doesn't change it
I tried
08:03 jjido left 08:05 abraxxa left 08:08 mr-foobar joined 08:11 abraxxa joined 08:15 pyrimidine joined 08:20 pyrimidine left 08:23 kst`` joined 08:28 nebuchadnezzar joined 08:30 ufobat joined 08:40 noganex joined 08:41 grumble joined
samcv MasterDuke, nice PR 08:43
merged
08:46 AlexDaniel joined 09:00 wamba left 09:02 rindolf joined 09:03 wamba joined 09:04 labster1 left 09:09 AlexDaniel left 09:10 pyrimidine joined 09:15 pyrimidi_ joined, pyrimidine left 09:19 andrzejku joined 09:20 pyrimidi_ left 09:22 neuron joined 09:28 LeCamarade joined 09:31 labster joined
DrForr pkes his head in. 09:36
*pokes
09:37 zakharyas left 09:38 thdr|2 left, peteretep_ joined 09:39 dakkar joined 09:40 sergot_ joined, KotH_ joined, ufobat left, ranguard_ joined, [Coke]_ joined, cibs_ joined, literal_ joined, effbiai_ joined, effbiai_ left, effbiai_ joined 09:41 tony-o_ joined, Kaffe_ joined, sivoais_ joined, jferrero_ joined, rumble joined, bhm_ joined, shmibs_ joined 09:42 mxco86_ joined 09:43 KotH_ is now known as KotH 09:44 adrusi_ joined, gabiruh_ joined, xxpor_ joined, matt_ joined, matt_ is now known as Guest32345 09:45 grumble left, cibs left, Guest62047 left, effbiai left 09:46 mtj_ left, gabiruh left, adrusi left, peteretep left, tony-o left, shmibs_ is now known as shmibs 09:47 peteretep_ is now known as peteretep 09:48 dg joined
samcv hey DrForr 09:50
09:50 laouji joined 09:51 gdonald left, CIAvash left 09:52 movl joined, araujo joined, araujo left, araujo joined 09:53 gdonald joined, mtj_ joined 09:57 TEttinger left 10:00 pyrimidine joined 10:02 jonas1 joined, shadowpaste0 joined 10:04 pyrimidine left 10:06 wamba left 10:10 wamba joined
DrForr samcv: Howdy. I ended up with 94 people on Safari last night. 10:11
samcv nice!
DrForr Yep. People even hung around afterward to ask questions, for about half an hour. 10:13
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:21
moritz \o/ 10:23
El_Che DrForr: after fosdem I went to cfgmgmtcamp conference (2 days) and chatter with some people about Perl 6 10:26
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)
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)
(not ranting here, just passing along what I heard) 10:29
DrForr Nod. 10:32
10:33 TimToady left 10:34 TimToady joined
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 10:47 labster left 10:49 pyrimidine joined 10:53 pyrimidine left 10:57 inokenty joined 10:58 laouji left 11:09 LeCamarade left 11:13 pyrimidine joined 11:15 bjz joined, pyrimidine left, pyrimidine joined 11:17 gdonald left 11:18 gdonald joined 11:21 pyrimidine left 11:25 cibs_ left, cibs joined 11:29 sena_kun joined 11:34 pyrimidine joined, garo left 11:36 cibs left, garo joined 11:37 cibs joined 11:39 pyrimidine left 11:40 espadrine joined 11:44 thdr|2 joined 11:59 wamba left 12:15 bjz_ joined, bjz left
ilmari watches lizmat's talk at 1.5x speed 12:16
faster, faster!
samcv link to talks pls ilmari 12:17
faster!
ilmari video.fosdem.org/2017/K.4.201/
samcv not fast enough!
ilmari speeds it up to 2x (fastest firefox will let me)
gregf__ any Perl6 talks? 12:19
ilmari yes
gregf__ ah - theyre all in there
cheers ilmari
ilmari fosdem.org/2017/schedule/track/perl/
bah, lizmat's is cut short :( 12:23
ilmari goes for lunch instead 12:24
dalek rl6-bench: 18f45b1 | timotimo++ | microbenchmarks.pl:
don't use smartmatch in perl5 microbenchmark
12:34
yoleaux 2 Feb 2017 22:15Z <[Coke]> dalek: update that repo to use Geth instead: Change the webhook to geth.perl6.party/?chan=#perl6-dev (or #moarvm for moarvm), Content-type: application/json and "Send me everything."
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!
\o/
timotimo hooray!
samcv so that 8% are all caused by being starters in the coll sequence weights 12:35
samcv does a dance
timotimo .tell dalek ahoi, please update that repo to use geth instead: Change the webhook to geth.perl6.party/?chan=#perl6-dev (or #moarvm for moarvm), Content-type: application/json and "Send me everything."
yoleaux timotimo: I'll pass your message to dalek.
samcv dalek? lol. is that a joke
timotimo we do love puns and references in here
samcv :) 12:36
12:36 pyrimidine joined
timotimo geth is a reference, too, but a much less widely known one 12:36
japhb: could you do the geth setup for perl6-bench? and we might want to consider moving reporting to #perl6-dev instead? 12:37
samcv i don't know dalek or geth 12:38
please tell me! then we have both ^5 afterward
timotimo sure
samcv since that's what perl 6 people do all day right
timotimo all day and night
daleks are the ones from doctor who who scream "EXTERMINATE" all the time 12:39
samcv is that a video game?
timotimo doctor who is one of the longest-running sci-fi TV shows, the BBC makes it
samcv doctor who?
timotimo yes, doctor who
samcv oh sorry i just read over that as if it was a mis-repeated word 12:40
timotimo doctorwhotoys.net/dalekprogenitorgu...20copy.jpg - you might have seen one of them somewhere on the 'net before
samcv so i totally missed it
damn you human grep function
timotimo :)
bloom filters, eh?
IOninja And Geth are AI made by Qunarians to serve as tools and later turned on their creators
samcv bloom filters:? 12:41
IOninja from mass effect games
timotimo bloom filters are a really cool data structure
12:41 pyrimidine left
samcv oh looked it up 12:41
i blame you for not putting a comma or something
timotimo you configure them up front for "how bad do you want your false positive rate to be?"
and then you can fit knowledge about billions of individual thingies into a few kilobytes of data
and get no false negatives ever
for membership tests 12:42
samcv wow
howwww
12:42 rindolf left
samcv m: "Bloom Filter".HOW.say 12:42
camelia rakudo-moar 39c517: OUTPUT«Perl6::Metamodel::ClassHOW.new␤»
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:43
"putting a value in" means turning these four or five bits to 1 12:44
"testing if something's already in" means checking that *all* of the corresponding bits are set to 1
if one or more of these bits are 0, it's guaranteed to not have been put in
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
"how many indices you calculate"* 12:45
samcv timotimo, www.unicode.org/versions/corrigendum3.html
heh
they changed the decomposition for a character. take that os x
timotimo oh jesus christ
samcv they didn't change the normalized version 12:46
timotimo someone accidentally typed F when they meant Four
jast it's almost as if there are downside to storing things decomposed
samcv heh jast
hope that was sarcasm
i think NFC changes less
jast your hope shall go fulfilled ;)
samcv i mean they have changed these www.unicode.org/versions/corrigendum4.html 12:47
jast I only discovered this particular atrocity in osx last year
samcv but i think that was changing the mapping of already non-nfc form characters
12:47 pyrimidine joined
samcv how did you discover it jast 12:47
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
samcv so people were probalby already typing 36FC
and i doubt anybody used 2F868 except for some weird circumstances
so i think it's best to store in NFC
jast and when people created links to files uploaded by osx users, somehow the links didn't work
samcv can you just convert it to NFC? 12:49
also it's sad that they give the NFD form if you request the directory name
jast I don't remember the ultimate decision that was made, I was mostly focused on other issues
samcv that's what you are implying?
programs see NFD names?
timotimo so ... can i have some help with perl5 here? 12:50
samcv maybe
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
timotimo my $s = join ", " => 1 .. 512; my @s = split /\s*,\s*/ => $s for 1 .. 512; say scalar @s
does this code seem wrong?
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 ,
jast yep
timotimo anyway, this prints out 0, when it should print out 511 instead
jast what exactly is the 'for' supposed to be doing? 12:52
12:52 rindolf joined, pyrimidine left, faraco joined
faraco howdy 12:53
timotimo make it run for longer
samcv jast, then the links are wrong? 12:54
jast samcv: links in which other users manually typed the filename for a link 12:55
samcv ah
i see
yeah just convert them all to nfc then
timotimo then the users are wrong! 12:56
samcv heh
also does perl 5 have a REPL
timotimo yeah, but you get it via a package 12:57
samcv what is this package good sir
timotimo Devel::REPL or something
timotimo definitely not a perl5 programmer
samcv heh
timotimo it might even come with typical perl5 installations
12:58 sergot_ is now known as sergot
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
timotimo perl -MDevel::REPL i'd imagine
oh, so putting the "my" in the "scope" of the for loop made it not exist afterwards?
jast that's what I thought, but the code works even if I 'use strict' and 'use warnings' 12:59
I can't fully explain what's going on :)
("works" as in "doesn't die")
timotimo *shrug*
the only thing that matters to me is that we can get these benchmarks again :)
moarvm.org/measurements/perl6-bench...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
(i already fixed charrange)
(and charrange_ignorecase)
samcv did perl 5 change?
timotimo well, for one of these, yes
jast bit short on time right now, unfortunately
timotimo no problem! thanks for your help! 13:01
jast you're welcome
timotimo the charrange one used ~~ to do regex matching, which got deprecated a loooong time ago
13:01 Sound joined
jast that's easy enough to fix 13:01
timotimo yeah, =~ instead of ~~
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 ~~
timotimo whoops
13:06 lukaramu joined
timotimo fixed create_and_iterate_hash_kv 13:06
it used %h{$_} = $_ instead of $h{$_} = $_ 13:07
IOninja chuckles at #LetLizSpeak trending on Twitter 13:08
lizmat having troubles with her FOSDEM talks? :)
13:09 vike joined
faraco looking at Perl 6 capability to run on BEAM vm. 13:09
13:12 llfourn joined 13:14 Actualeyes left 13:16 wamba joined
dalek rl6-bench: 98e29f8 | timotimo++ | microbenchmarks.pl:
fix split_string_regex for perl5, thanks jast++
13:26
rl6-bench: de5b2af | timotimo++ | microbenchmarks.pl:
fix create_and_iterate_hash_kv for perl5
rl6-bench: 0029b74 | timotimo++ | microbenchmarks.pl:
fix loop_object_accessor (maybe?)
yoleaux 12:35Z <timotimo> dalek: ahoi, please update that repo to use geth instead: Change the webhook to geth.perl6.party/?chan=#perl6-dev (or #moarvm for moarvm), Content-type: application/json and "Send me everything."
timotimo bam
timotimo .tell dalek ahoi, please update that repo to use geth instead: Change the webhook to geth.perl6.party/?chan=#perl6-dev (or #moarvm for moarvm), Content-type: application/json and "Send me everything."
yoleaux timotimo: I'll pass your message to dalek.
13:30 lukiramu joined 13:31 bjz_ left, llfourn left 13:33 Actualeyes joined 13:34 lukaramu left
[Coke]_ .tell japhb please update perl6-bench to use geth. 13:37
yoleaux [Coke]_: I'll pass your message to japhb.
timotimo i already told 'em :)
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:38
IOninja cool 13:39
timotimo sweet 13:40
13:40 hartenfels joined 13:43 Actualeyes left 13:45 pmurias left 13:46 pmurias joined
jdv79 IOninja: i guess the signup barrier on CPAN, well PAUSE, is a valid critism 13:47
*criticism 13:48
jdv79 needs to wake up
timotimo yeah, modern services for developers ought to give at least "sign in with github" and "sign in with google"
not sure if bitbucket give you a single-sign-on thing
13:49 pyrimidine joined
jdv79 i think if there was just a way to signup without involving another human it'd be fine 13:49
13:50 [Coke]_ is now known as [Coke]
timotimo oh, what, you have to get your account verified or something? 13:50
jdv79 its always been like that
IOninja Unless they changed it yes, you have to wait for human to setup your account.
Geth doc: 5c93398657 | (Jonathan Worthington)++ | 2 files
Make Perl6::Documentable::Registry a monitor.

When we are using --parallel=n with n > 1, we can add to this from multiple threads. This causes problems. Making it a monitor seems to cause no pain for the --parallel=1 case, and gets rid of a race in the real parallel case, bringing us closer to --parallel=2 working.
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:51
timotimo for example doesn't know Perl 5. I know it, but I'm very unmotivated to write it. 13:52
And I'd even say "know" it by know. I forgotten a good bit in a year.
s/by know/by now/; 13:53
13:54 pyrimidine left
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:55
jdv79 afaik there is no issue with auth but haven't dug into that part yet 13:57
13:57 imcsk8_ joined
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: metacpan.org/pod/JSON::Meth
jdv79 though ranguard_ and mst have been a lot of help
13:59 Actualeyes joined
jdv79 i'm not saying its implemented, just that there wasn't any known blockers back when last we talked about it 13:59
i think there wasn't even any clarity as to what that would do 14:00
14:01 wamba left
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?
IOninja Make auth part of the name, while decopling it enough that for example 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 isn't sure if that's a good idea
14:08 gdonald left 14:10 gdonald joined, abraxxa left 14:14 Eddward joined 14:17 itcharlie joined 14:19 abraxxa joined
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:19
14:22 faraco left 14:24 abraxxa left 14:36 rumble is now known as grumble
IOninja cool 14:40
"jdv79 │ aparrently getting people that are motivated to help is a real issue" 14:41
There were a few poeople who had desire to improve ecosystem
But we don't have anything concrete to point them to, like a TODO list or a list of Issues or something.
I think there's a repo somewhere, but what needs to be done?
14:43 awwaiid joined, khw joined 14:46 wamba joined 14:47 curan left, abraxxa joined
[Coke] samcv: is "perl6 htmlify.p6" supposed to just die now on OS X? 14:49
samcv why would it be supposed to die?
[Coke] I don't know, that's why I'm asking you if that was your intention. 14:50
samcv no it was not
[Coke] one sec
samcv btw you can run htmlify.p6 --no-proc-async --parallel=2
and it will still run the code that causes the crashing
[Coke] gist.github.com/coke/574de54eb3b00...b04021ebb9 14:51
14:51 pyrimidine joined, gdonald left
samcv welp 14:51
shouldn't die
it worked fine when i tested it 14:52
timotimo never say die
samcv and basically forced the condition to check whether it was running on macos
shouldn't be fired?
timotimo m: say die 14:53
camelia rakudo-moar a63d82: OUTPUT«Died␤ in block <unit> at <tmp> line 1␤␤»
samcv lol
[Coke] the problem is assigning to $no-proc-async, apparently.
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
process that is determined to be too offensive. Likewise, killall is now fireall.
14:53 gdonald joined
samcv we should change die to 'fire-self' 14:54
or maybe just `panic`
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.
samcv boo 14:56
14:56 pyrimidine left
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
lol.
the whole thing is here: gitlab.com/femsf/toleranux 14:57
14:57 donaldh joined
huf ewww, i can smell the fedoras 14:58
samcv can you get the fedora dry cleaned?
15:03 g4 left 15:12 hartenfels left 15:14 llfourn joined 15:20 itcharlie2 joined 15:22 itcharlie left 15:26 wamba left 15:29 skids joined 15:30 neuron left 15:31 llfourn left 15:32 bwisti joined
Geth perl6-most-wanted: 8a89be19ef | (Tom Browder)++ | most-wanted/modules.md
more cgi modules wanted
15:35
15:35 llfourn joined 15:39 pyrimidine joined 15:41 FROGGS joined 15:43 cdg joined, pyrimidine left
IOninja can't imagine people using CGI::Session in this day and age; especially with Perl 6 15:45
$ /usr/bin/time perl6 -e '' 15:46
0.13user 0.04system 0:00.17elapsed 97%CPU (0avgtext+0avgdata 220416maxresident)k
Does this mean perl6 -e '' uses 220MB of RAM? 15:47
timotimo seems to be the case
IOninja :o
timotimo it uses just 61 on my machine
0.07user 0.01system 0:00.08elapsed 96%CPU (0avgtext+0avgdata 61728maxresident)k
IOninja 7024maxresident for Perl 5
15:47 cdg left
timotimo yeah, it's not ideal by far 15:47
15:48 cdg joined
[Coke] IOninja: here, it's 54272000 maximum resident set size 15:48
vs 2818048 maximum resident set size for perl5'
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
timotimo version, compile flags, etc etc?
any diffs in any of the repos?
IOninja It's really all outdated, so I'd guess some 3rdparty lib we include is bigger when older?
timotimo shouldn't be that much bigger 15:52
outdated how?
maybe it's a version that still uses parrot?
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 leanpub.com/perl6. Enjoy!
timotimo or that, yeah
IOninja heh, no, the same version as the 32-bit box with 40MB 15:54
timotimo that's pretty strange. 15:55
IOninja Here's the perl6 -V for 220MB one: gist.github.com/zoffixznet/a5d5bc8...3615315655
And here's the diff for it and the 40MB one: gist.github.com/zoffixznet/e62e122...eb513d966d
-moar::jit=$(JIT_POSIX_X64)
+moar::jit=$(JIT_STUB)
Could that be it?
timotimo throwing out the jit should make it smaller, not bigger
IOninja The +moar::jit=$(JIT_STUB) is for 40MB 15:56
though it's moar::jit=$(JIT_POSIX_X64) on my 64-bit debian that uses 61MB 15:57
15:58 gdonald left
SmokeMachine What happens if a distro/module was written by more than 1 person? 15:58
Is there :auth<auth1 auth2>?
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
IOninja m: use Test:auth<perl> 16:00
camelia ( no output )
IOninja m: use Test:auth<perl not-perl>
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␤ …»
IOninja I think it just uses it as one thing
SmokeMachine IOninja: so, :auth would be next to GitHub' concept of "organization"? 16:01
timotimo auth is like "github:timo" 16:02
i.e. "github has the authority over the namespace in which i'm called timo"
tbrowder IOninja: and what do you recommend instead of CGI?
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?
timotimo organizations are "just" special users, aren't they? 16:05
16:05 ocbtec joined
SmokeMachine Idk 16:06
16:09 llfourn left
jdv79 what? 16:09
donaldh is $class.^perl something that once existed but got excised? 16:10
e.g. github.com/samuraisam/p6-pb/blob/m...able.t#L27
Oh, no ignore me, it's a custom .perl method 16:11
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
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.
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, Eddward left
jdv79 one place where i worked each apache kid took maybe 200-300M a pop 16:15
mem is cheap:)
IOninja heh 16:16
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:17
16:18 FROGGS_ joined
tbrowder but i'm always open to suggestions... 16:19
especially to good books on the subject...
16:21 FROGGS left 16:22 FROGGS_ left
tbrowder what i need is mod_perl6! 16:24
16:24 rurban left
IOninja shudders 16:25
tbrowder: have you seen Bailador?
buggable: eco bailador
buggable IOninja, Found 5 results: Bailador, Bailador::Dev::AutoRestarter, Bailador::Plugin::Static, Bailador::Plugin::AssetPack::SASS, Bailador::Template::Mojo::Extended. See modules.perl6.org/#q=bailador
16:25 pyrimidine joined
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
Here's an example that uses sessions: github.com/ufobat/Bailador/blob/ma...ssions.pl6 16:27
16:28 abraxxa left, abraxxa1 joined
tbrowder i have looked at Bailador, not sure about using on Apache, https? 16:29
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: gist.github.com/zoffixznet/1cdc555...0c12f7f1a8 16:32
so app runs on local port 3000 and apache receives all the connections and just forwards them to your app 16:33
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:34
16:35 pyrimidine left
IOninja It's Perl 5 innit? If you're willing to use it, check out www.mojolicious.org/ It's pretty easy to pick up. 16:35
perl6.party uses it: github.com/zoffixznet/perl6.party
mst I should really try perl6+catalyst at some point 16:36
since catalyst is designed to support roles and etc.
16:36 rurban joined 16:37 Sound left
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:38
timotimo the good thing is that you can put your app anywhere you please 16:42
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
so your file and directory layout can be whatever works best for you 16:43
16:45 wamba joined 16:46 jdmmmmm left 16:47 pyrimidine joined
tbrowder okay guys, you convinced me. i'll try Bailador first i think...thanks! 16:50
timotimo bailador is single-threaded, but since your stuff is low-use anyway, that shouldn't be a problem 16:51
though i'd recommend serving static files like images and css through apache itself rather than your bailador app
16:52 gdonald left, pyrimidine left 16:55 abraxxa1 left
samcv why apache? 17:04
why not nginx??
17:05 cibs left, llfourn joined
IOninja years of experience with apache; no experience with nginx 17:05
tbrowder because i'm very comfy with its security, configuration, and tls handling 17:06
17:07 cibs joined 17:08 hartenfels joined 17:10 llfourn left
IOninja m: sub infix:<🙼> { FatRat.new: $^a, $^b }; say 2🙼1 17:13
camelia rakudo-moar 2b1eb6: OUTPUT«2␤»
IOninja AlexDaniel, ^ my contribution to your Unicode Ops file :)
17:13 eroux left
TimToady u: 🙼 17:14
unicodable6 TimToady, U+1F67C VERY HEAVY SOLIDUS [So] (🙼)
IOninja or maybe not... it's not very fixed widthy... 17:15
TimToady u: heavy solidus
unicodable6 TimToady, U+1F67C VERY HEAVY SOLIDUS [So] (🙼)
TimToady, U+1F67D VERY HEAVY REVERSE SOLIDUS [So] (🙽)
TimToady what happened to not quite so heavy solidus?
17:15 rurban left
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?
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
u: solidus
unicodable6 samcv, U+002F SOLIDUS [Po] (/)
samcv, U+005C REVERSE SOLIDUS [Po] (\)
samcv, gist.github.com/b7a2d49268ab7e1b3d...f30562c7c0
IOninja m: say 42/0e0
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␤␤»
samcv TimToady, well we have big? ⧹
IOninja ^ so that would give Inf
samcv it's very tall
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␤␤»
IOninja That would give NaN
Geth doc: a20595e7bb | (Jonathan Worthington)++ | htmlify.p6
Fix a couple of data races in parallel mode.
samcv 🙼 ← Eraser emoji 17:19
🙼🙼𝗪𝗔𝗥𝗡𝗜𝗡𝗚🙽🙽 17:20
[Coke] Wͬ͒🄐ℝǸ̸𝕀ℕ⅁ 𝐁Ë́̀E̫̜Ⓟ ̎͞🄑OͣͥO̬ͫԀ 17:21
TimToady just seems odd to have a "very heavy solidus" without a "heavy solidus" to be "very" with respect to... 17:22
language is weird
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
your time's up, you're going down, I'm gonna off you, going on to a higher plane, etc
IOninja heh 17:24
[Coke] that might have something more to do with the thinker's state of mind.
TimToady had think a while to get "before the pearly gates"...
haven't got one for "around yet", since "around the bend" means something a little different... 17:25
*"around" yet
weird, delayed endquote is a strange sort of typo
samcv 🇼🇦🇷🇳🇮🇳🇬 17:27
Regional indicators anyone? 17:28
totally misused
TimToady looks like a bed of tulips here
perigrin_ around the end, around his time
no longer around becomes adjectival doesn't it ... 17:29
TimToady close enough :)
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
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
perigrin_ TimToady: abeam ... that should take a while to find the death-idiom
[Coke] m: '΁'.uninames.say 17:31
camelia rakudo-moar 2b1eb6: OUTPUT«(<reserved>)␤»
TimToady perigrin_: I'll ask my neighborhood pirate...
perigrin_ yar!
17:31 jme` joined
TimToady 'cept I think he's abaft this life 17:32
perigrin_ probably shouldn't have stood afront the cannon 17:33
17:33 cgfbee joined
TimToady and now the bits of him are in Davy Jones' Locker 17:34
Geth doc: 290223265e | (Jonathan Worthington)++ | htmlify.p6
Correct method name.
17:36
17:36 itaipu joined 17:40 cdg_ joined 17:42 cdg left 17:48 pyrimidine joined 17:53 donaldh left 17:56 pyrimidine left 17:58 dakkar left 18:06 llfourn joined 18:09 donaldh joined 18:11 llfourn left
[Coke] fixes github.com/coke/p6-unicode-mangler so the combination generated doesn't generate invalid combos. 18:17
Mithaldu might be interesting to some here www.nu42.com/2017/02/unicode-windo...-line.html
IOninja already saw it 18:18
18:20 jdmmmmm joined 18:29 jme` left, jme` joined 18:35 w4and0er96 left 18:37 peteretep left 18:38 Cabanossi left, Cabanossi joined 18:44 rurban joined 18:45 olinkl left 18:55 AlexDaniel joined
AlexDaniel IOninja: are you serious about 🙼 ? 18:55
18:56 cdg joined 18:59 pyrimidine joined, cdg_ left
TimToady u: ꃑ 19:00
unicodable6 TimToady, U+A0D1 YI SYLLABLE FAT [Lo] (ꃑ)
AlexDaniel u: FAT
unicodable6 AlexDaniel, U+0618 ARABIC SMALL FATHA [Mn] (◌ؘ)
AlexDaniel, U+064B ARABIC FATHATAN [Mn] (◌ً)
19:00 cdg left
unicodable6 AlexDaniel, gist.github.com/44edfd2e3d2f22e8ec...7e44e7e013 19:00
19:01 itaipu left, ocbtec left
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:01
19:02 itaipu joined
IOninja lol "U+2F57 KANGXI RADICAL FATHER [So] (⽗)" 19:02
IOninja wonders if there's also a radical mother
u: radical mother 19:03
unicodable6 IOninja, U+2E9F CJK RADICAL MOTHER [So] (⺟)
IOninja giggles
sena_kun 父 & 母. :) 19:04
TimToady well, "fat" in chinese is just 太
AlexDaniel u: 太
unicodable6 AlexDaniel, U+592A <CJK Ideograph> [Lo] (太)
TimToady unicode does not attempt to name ideographs
though in my character database, it happens to have the name "fat" :) 19:05
19:05 pyrimidine left
AlexDaniel except radicals? 19:05
TimToady there's not even agreement on radicals
19:05 llfourn joined
sena_kun u: 癶 19:05
unicodable6 sena_kun, U+7676 <CJK Ideograph> [Lo] (癶)
sena_kun u: 彑 19:06
unicodable6 sena_kun, U+5F51 <CJK Ideograph> [Lo] (彑)
TimToady u: ⺟ 19:07
unicodable6 TimToady, U+2E9F CJK RADICAL MOTHER [So] (⺟)
TimToady u: ⽏
unicodable6 TimToady, U+2F4F KANGXI RADICAL DO NOT [So] (⽏)
IOninja AlexDaniel: oh, you seen comments on 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
19:10 llfourn left
IOninja basically if RHS range is a string range => use string comparison, if RHS is numeric range => use numeric comparison 19:10
and instead of exploding just return False 19:11
(for explosions caused by string ranges ~~ numeric ranges)
when the strings fail to coerce to numerics
AlexDaniel well, to be honest I barely had time to leave a comment today… but I'm slowly catching up now 19:12
the concept of string ranges is still over my head a bit
IOninja yeah, they feel iffy
And I feel like we need something like... role Ranged[TypeStart,TypeEnd] 19:13
AlexDaniel
.oO( … or RT #129131 )
19:16
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129131
IOninja instead of doing .is-int ?? and nqp::type(..Numeric) all over the place
:D 19:17
AlexDaniel mch: ‘-5’.succ 19:18
committable6 AlexDaniel, ¦«2015.12,HEAD»:
IOninja m: 'aaaaaaaaaa' ~~ 'a'..'z'
camelia ( no output )
AlexDaniel mch: ‘-5’.succ.say
IOninja m: say 'aaaaaaaaaa' ~~ 'a'..'z'
camelia rakudo-moar 2b1eb6: OUTPUT«True␤»
committable6 AlexDaniel, ¦«2015.12,HEAD»: -6
IOninja m: say eager '-5'..'-7'
camelia rakudo-moar 2b1eb6: OUTPUT«(-5 -6 -7)␤»
IOninja That's fairly amusing
19:19 rurban left 19:20 jme` left
TimToady m: say '-9'.succ 19:23
camelia rakudo-moar 2b1eb6: OUTPUT«-10␤»
19:23 chansen_ joined
TimToady it's consistent, anyway :) 19:23
IOninja :)
AlexDaniel :S
TimToady and I think it's fine as it is
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
it has no idea what you mean by "counting"
19:24 darutoko left 19:25 SmokeMachine joined
AlexDaniel ok-ok, so .succ is correct, I'm fine with that 19:25
TimToady m: say "anything-9".succ
camelia rakudo-moar 2b1eb6: OUTPUT«anything-10␤»
TimToady m: say "anything-9.5".succ
camelia rakudo-moar 2b1eb6: OUTPUT«anything-10.5␤»
IOninja m: say "-9".succ.pred
camelia rakudo-moar 2b1eb6: OUTPUT«-09␤»
TimToady you get what you pay for :P
IOninja :D
TimToady perl5 doesn't even have string decrement, last I knew
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␤␤»
TimToady m: say "anything-f.5".succ
camelia rakudo-moar 2b1eb6: OUTPUT«anything-g.5␤»
TimToady m: say "anything-z.5".succ
camelia rakudo-moar 2b1eb6: OUTPUT«anything-aa.5␤»
AlexDaniel m: say ‘&’.pred 19:27
camelia rakudo-moar 2b1eb6: OUTPUT«&␤»
AlexDaniel m: say ‘’.pred
camelia rakudo-moar 2b1eb6: OUTPUT«␤»
AlexDaniel m: say ‘a’.pred
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
IOninja AlexDaniel: well, I'm starting to implement the proper Range ~~ Range :) 19:28
TimToady m: say '000' ... '377'
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
AlexDaniel IOninja: what does it mean? What's “proper”? 19:28
19:28 donaldh left 19:29 pnu__ joined
IOninja m: say 0..10 ~~ '0'..'3' 19:29
camelia rakudo-moar 2b1eb6: OUTPUT«False␤»
IOninja AlexDaniel: ^ that will say True, because stringfully '10' is before '3' and after '0'
19:29 itaipu left
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␤␤»
IOninja AlexDaniel: ^ and that's meant to say True
19:30 mithaldu_ joined
IOninja And I think those are the only shifts from current behaviour... 19:30
19:31 gdonald joined
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:31
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␤»
IOninja s/will//;
Or, in a test form, proper is: github.com/perl6/roast/commit/e152a0ff3a 19:33
AlexDaniel IOninja: so what is the meaning of this operation?
$charA..$charB ~~ $charX..$charY ? 19:34
IOninja $char* being all strings?
AlexDaniel yea, let's say one char strings
IOninja AlexDaniel: A ge X and A le Y and B ge X and B le Y 19:36
19:36 BuildTheRobots joined
IOninja "are the boundaries of LHS range within boundaries of RHS range" 19:37
perlpilot IOninja++
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
AlexDaniel hmmm… X le A le Y and X le B le Y 19:38
IOninja (same as any smartmatch against numeric range)
Yeah, that's a clearer way to write it :D
m: say 'a' le 'a' le 'b' 19:39
camelia rakudo-moar 2b1eb6: OUTPUT«True␤»
AlexDaniel IOninja: I'm not sure I know any case where reifying a numeric range will make a difference
IOninja cool
m: say eager 2..5
camelia rakudo-moar 2b1eb6: OUTPUT«(2 3 4 5)␤»
IOninja m: say 2.5 ~~ 2..5
camelia rakudo-moar 2b1eb6: OUTPUT«True␤»
19:39 amalia__ joined
AlexDaniel ooooooooh… 19:39
IOninja ^ smartmatch is True even though it ain't one of the elements if you reify it
AlexDaniel I guess it makes sense then 19:40
IOninja \o/
AlexDaniel maybe
IOninja :)
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
perlpilot A^..B ~~ X^..B seems like it might be. 19:43
19:43 kipd joined
perlpilot er, s:2nd/B/Y/ 19:43
It looks like you'd have to call .succ or .pred depending on which side the exclusion is on. 19:44
19:44 pyrimidine joined
perlpilot (or reify stuff, but that's icky) 19:45
IOninja nah
AlexDaniel yea, just eq that thing and see if ^ is on both sides
no need for pred or whatever
IOninja topic.max lt $!max || topic.max eq $!max && !(!topic.excludes-max && $!excludes-max)) 19:46
AlexDaniel yup
perlpilot oh, yeah. excellent.
IOninja++ again :) 19:47
AlexDaniel IOninja: OK, well, if I can understand this, then perhaps there's some hope
IOninja :D
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
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:49
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
19:50 girafe joined, olinkl joined
IOninja it does feel like it has the "but it works in Perl 5" reasoning behind it 19:51
19:51 imcsk8_ left
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'␤»
AlexDaniel it's sounds great when you're dealing with something in ASCII range, then it all breaks up once you go further
perlpilot m: say 'alpha' ... 'beta'
camelia rakudo-moar 2b1eb6: OUTPUT«(alpha)␤»
perlpilot huh
19:51 AlexDaniel left
IOninja haha 19:51
19:51 imcsk8 joined, AlexDaniel joined
perlpilot oh, i'm just slow today 19:52
19:52 w4and0er96 joined
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 …»
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 pyrimidine left
AlexDaniel s/‘'s’// :S 19:52
19:53 pyrimidi_ left
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 kst`` is now known as kst
perlpilot So ... what does all of this have to do with IO? ;) 19:55
IOninja heh
I'm off the clock... This is bonus ;)
19:56 bjz joined
AlexDaniel and you can also suddenly go out of the range too 19:56
El_Che hacker radio on perl @fosdem: twitter.com/nxadm/status/829417989309018112
IOninja So there's no way to reach 'alpha' from 'beta' or vice-versa? 19:59
19:59 notbenh_ joined
IOninja m: say eager "bc" .. "ba" # cause it does do reverse ranges... 19:59
camelia rakudo-moar 2b1eb6: OUTPUT«()␤»
IOninja m: say eager "bc" ... "ba" # cause it does do reverse ranges...
camelia rakudo-moar 2b1eb6: OUTPUT«(bc bb ba)␤»
AlexDaniel m: .say for (9000.chr)...(12298.chr) 20:00
camelia rakudo-moar 2b1eb6: OUTPUT«⌨␤〈␤〉␤《␤»
moritz sequences, not ranges
IOninja yeah
AlexDaniel m: .say for (9000.chr)..(12298.chr) # I'm not sure how this works by the way
camelia rakudo-moar 2b1eb6: OUTPUT«⌨␤〈␤〉␤⌫␤⌬␤⌭␤⌮␤⌯␤⌰␤⌱␤⌲␤⌳␤⌴␤⌵␤⌶␤⌷␤⌸␤⌹␤⌺␤⌻␤⌼␤⌽␤⌾␤⌿␤⍀␤⍁␤⍂␤⍃␤⍄␤⍅␤⍆␤⍇␤⍈␤⍉␤⍊␤⍋␤⍌␤⍍␤⍎␤⍏␤⍐␤⍑␤⍒…»
IOninja m: say eager "a" ... "aa" 20:01
camelia rakudo-moar 2b1eb6: OUTPUT«(a)␤»
AlexDaniel does generate the values based on codepoints?
it
IOninja last I looked at the code it did lots of magicks 20:04
20:05 RabidGravy left
IOninja m: say (0..'3').perl 20:06
camelia rakudo-moar 2b1eb6: OUTPUT«0..3␤»
IOninja huh?
m: say (0..'a').perl
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
IOninja awww, dammit 20:06
Looks like many of the tests I wrote are wrong 'cause I thought 0..'a' was the same as '0'..'a' 20:07
20:07 jkva_ joined 20:09 peteretep joined
IOninja kinda weird that one. Given choices of DWIM and explode, we choose to explode? 20:09
m: say ('a'..0).perl # and not in this case
camelia rakudo-moar 2b1eb6: OUTPUT«"a"..0␤»
IOninja m: dd WHAT ('a'..0).max 20:10
camelia rakudo-moar 2b1eb6: OUTPUT«Int␤»
IOninja pouts 20:11
m: say eager '3'..5
camelia rakudo-moar 2b1eb6: OUTPUT«(3 4 5)␤»
IOninja m: say WHAT ('3'..5).min
camelia rakudo-moar 2b1eb6: OUTPUT«(Str)␤»
IOninja m: say WHAT ('3'..5).is-int
camelia rakudo-moar 2b1eb6: OUTPUT«(Bool)␤»
IOninja m: say ('3'..5).is-int
camelia rakudo-moar 2b1eb6: OUTPUT«False␤»
20:11 llfourn left 20:12 gdonald left
IOninja m: say (eager '3'..5).map: {.WHAT} 20:13
camelia rakudo-moar 2b1eb6: OUTPUT«((Str) (Str) (Str))␤»
IOninja
.oO( just coerce the endpoint when you create the Range... :/ )
20:14 gdonald joined 20:15 andrzejku_ joined, zostay joined
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␤␤»
IOninja ?
man shit's broke
20:16 jonas1 left
IOninja m: say eager '.' .. '4' 20:17
camelia rakudo-moar 2b1eb6: OUTPUT«(. / 0 1 2 3 4)␤»
20:18 RabidGravy joined
IOninja wow there's a whole bunch of weird candidates in Range.new; like List and Match :S 20:18
m: say Match ~~ Cool 20:20
camelia rakudo-moar 2b1eb6: OUTPUT«True␤»
IOninja They're just treated like numerics tho
20:21 patrickz joined 20:22 jjido_ joined
IOninja m: say ((2,) .. 'a').minmax.map({"$_ {.^name}"}).join: '..' 20:22
camelia rakudo-moar 2b1eb6: OUTPUT«1 Int..a Str␤»
IOninja And that don't roundtrip in .perl.EVAL 20:23
m: say ((2,) .. 'a').perl.EVAL
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␤ …»
IOninja hehehe..
patrickz Hey, I'm currently doing bitfiddling with perl6. 20:25
m: use NativeCall; my $var = CArray[uint8].new; $var[0] = 0b1111_1111; say $var[0];
camelia rakudo-moar 2b1eb6: OUTPUT«-1␤»
patrickz Why is this giving me a negative number?
IOninja m: say 0b1111_1111 20:26
camelia rakudo-moar 2b1eb6: OUTPUT«255␤»
IOninja m: my uint8 $x = 0b1111_1111; say $x
camelia rakudo-moar 2b1eb6: OUTPUT«255␤»
IOninja patrickz: seems a bug and I vaguelly recall seeing a ticket for it
IOninja looks for it
geekosaur probably another spot in nqp, possibly related to arrays, that used the wrong formatter
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
patrickz: rt.perl.org/Ticket/Display.html?id...et-history
AlexDaniel mch: use NativeCall; my $var = CArray[uint8].new; $var[0] = 0b1111_1111; say $var[0];
committable6 AlexDaniel, ¦«2015.12,HEAD»: -1
IOninja sees a few more CArray-related tickets on perl6.fail/ 20:28
20:28 pyrimidine joined, Sound joined
patrickz IOninja: Thanks for the quick response! 20:28
Do I as a total perl6 noob with some C experience have any chance in killing that bug?
IOninja patrickz: no idea, but the code's here: github.com/rakudo/rakudo/blob/nom/...veCall.pm6 plus these bits: github.com/rakudo/rakudo/tree/nom/...NativeCall 20:29
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
patrickz: that's assuming the bug is in NativeCall and not deeper in the food chain 20:31
20:32 pmurias left
patrickz IOninja: Will give it a try! 20:32
20:32 pyrimidine left
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:35 bjz left 20:37 pyrimidine joined
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, labster left 20:39 Guest32345 is now known as matt_
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:39
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:40
tony-o_ perlpilot: github.com/tony-o/perl6-csv-parser.../NC.pm6#L7 20:41
at least for your first Q
perlpilot tony-o_: and the array allocation? 20:42
20:42 pyrimidine left 20:43 alimon left, alimon joined
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?
perlpilot yeah. Both really. 20:44
[Coke] wonders why 'alph'...'beta' is going -backwards-
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'
IOninja [Coke]: 'alpha'...'beta'; I presume it's backwards 'cause alpha got more letters in it
tony-o_ and the C side handles allocation.
IOninja But either way, it doesn't seem to be going any way 20:45
m: say eager 'alpha' ... 'beta'
camelia rakudo-moar 2b1eb6: OUTPUT«(alpha)␤»
IOninja m: say eager 'blpha' ... 'beta'
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…»
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
IOninja Ah, I see
tony-o_ perlpilot: i think on the p6 side the intention is create a p6 array, and pass that to C side method
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
perlpilot or ... maybe I should not play with this today since my brain is clearly not working at an acceptable percentage :-)
tony-o_: that would be much appreciated. 20:47
20:48 AlexDaniel left, AlexDaniel joined 20:57 jme` joined 21:01 kyan joined 21:03 donaldh joined 21:04 espadrine left 21:08 llfourn joined 21:09 kraih joined 21:10 kraih left 21:13 llfourn left 21:18 cdg joined 21:19 cdg_ joined 21:22 gdonald left 21:23 cdg left 21:25 espadrine joined
[Coke] not 'alpha' - 'alph' 21:25
ah, and it's because it's per position, for some reason. 21:26
21:26 jjido_ left
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 …»
IOninja ah yeah
[Coke] so h-> a, p->t... 21:27
IOninja m: say 'zaza' ... 'azaz'
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 …»
IOninja m: say ('zaza' ... 'azaz')[*-20]
camelia rakudo-moar 8477f3: OUTPUT«azag␤»
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:28
perlpilot: github.com/tony-o/demo-nativecall 21:29
21:38 TEttinger joined, cdg joined
TimToady m: say ('1111' ... '0000') eqv (reverse '0000' ... '1111') 21:39
camelia rakudo-moar 8477f3: OUTPUT«True␤»
21:41 cdg_ left
IOninja :D 21:41
21:42 andrzejku_ left 21:43 gdonald joined, cdg_ joined 21:47 cdg left, pyrimidine joined, sena_kun left 21:49 pyrimidi_ joined, pyrimidine left 21:53 pyrimidi_ left 21:56 labster joined 21:59 itcharlie2 left
patrickz s: nqp::atposref_i 22:02
SourceBaby patrickz, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Could not find nqp::atposref_i, did you forget 'use nqp;' ?␤at -e:6␤------> put sourcery( nqp::atposref_i ⏏)[1];␤ expecting any of:␤ argument list␤
patrickz s: 'nqp::atposref_i'
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␤␤
patrickz s: 'atposref_i'
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:03 skids left
IOninja patrickz: nqp:: stuff is documented in github.com/perl6/nqp/blob/master/d...s.markdown and nqp::p6* are in github.com/rakudo/rakudo/blob/nom/...s.markdown 22:04
patrickz: there are many undocumented ones unfortunately though, including the one you're looking for 22:05
atpos is usually an array item lookup by index; no idea what `ref_i` is about
22:05 pyrimidine joined
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 RabidGravy left
tony-o_ oh hey jnthn 22:07
22:07 tony-o_ is now known as tony-o
jnthn Oh, I don't need to .tell :) 22:08
I don't think you're missing anything.
Though I thought that in the event of a close, then the Supply of incoming data would be done. 22:09
22:09 llfourn joined 22:10 wamba left 22:11 pyrimidine left
tony-o is that the only way to tell that the socket is closed? 22:11
22:11 cdg joined
tony-o calling nqp::closefh on a closed socket seems to segfault 22:11
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␤»
tony-o i've narrowed down the segfaults in H:S:A to the multiple calls to .close
jnthn Well, the .write will fail too
Oh...we shouldn't segfault on dupe close :/
tony-o the write fails but it doesn't seem to cause segfaults
jnthn I wonder if we do dupe cleanup without validation.
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
timotimo patrickz: i can explain atposref 22:13
22:14 cdg_ left
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
IOninja timotimo++
patrickz I think atposref is not to blame. So no need for explanation here. But go for the docs! :-)
jnthn Shouldn't matter with IO::Socket::Async, in that we should be marshalling all operations over to the evenloop thread.
22:14 llfourn left
timotimo not to blame for what, if i may ask? 22:15
IOninja for CArray[uint8] having negative items
patrickz m: use NativeCall; my $var = CArray[uint8].new; $var[0] = 0b1111_1111; say $var[0];
camelia rakudo-moar 8477f3: OUTPUT«-1␤»
timotimo oh
patrickz I'm currently hunting that bug
tony-o jnthn: well, i can reproduce in H:S:A - it segfaults after one request at: github.com/tony-o/perl6-http-serve...nc.pm6#L62
if you comment out L62 it will run indefinitely 22:16
22:16 nowan joined
patrickz currently in NativeCall/Types.pm6 22:16
22:17 cdg left
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:17 donaldh left
jnthn There is a libuv-provided way to ask "is it closed" also 22:19
Well, closed or closing
tony-o jnthn: no worries - would i have to do some NC or inline-c to ask?
22:20 Sound left
timotimo description pushed 22:20
jnthn tony-o: I think we should just figure out an API for it and expose it.
That said, if we fixed .close to be idempotent, would that be sufficient for you? 22:21
22:21 cdg joined 22:23 rurban joined, baest joined
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:24 cdg__ left
timotimo since latin1 will accept anything 22:25
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
timotimo though i must admit i do not know how costly our loop in there currently is 22:25
22:25 cdg_ joined
tony-o i don't know either, we'd have to run some benchmarks on it 22:26
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
latin1 will still do a number on newlines, won't it?
i mean, on windows
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:28 cdg left
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. :)
timotimo how many 6tuits have you planned for tomorrow, jnthn? :)
22:30 pyrimidine left
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
timotimo understood 22:31
hm, zef "the module manager" will also get HTTP::Server::Async?
how about "zeffers" instead :P
"inzeffable"
jnthn tony-o: I'm guessing you'd rather not put it under the perl6 org?
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
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;
camelia rakudo-moar f85978: OUTPUT«Int␤»
patrickz ^ Is that also a bug or expected?
22:34 diegok joined
timotimo it likely gets boxed on the way out 22:34
jnthn If you're doing . you're always going to be boxing
And .^ doubly so; it's a meta-*object* protocol after all :)
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.
patrickz: It'll only do it on the type object
m: say uint8.^name
camelia rakudo-moar f85978: OUTPUT«uint8␤»
jnthn But only on that
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:36
tony-o: And I don't really consider those to be "core" in any sense. 22:37
Sleep time; 'night 22:41
timotimo sleep time for me, too
22:42 ocbtec joined 22:44 pyrimidine joined 22:46 jme` left 22:47 LeCamarade joined
tony-o sounds good, let's chat more about it tomorrow jnthn 22:48
night
22:49 pyrimidine left, rindolf left 22:50 LeCamarade left, LeCamarade joined 22:56 cdg joined 22:57 [particle] joined 22:59 cdg__ joined 23:00 cdg_ left, llfourn joined 23:02 pyrimidine joined, cdg left 23:05 kaare__ joined, llfourn left 23:06 kaare_ left 23:07 pyrimidine left 23:11 john51 joined 23:14 rurban left 23:22 pyrimidine joined 23:26 john51 left 23:27 pyrimidine left, AlexDaniel left 23:30 pmurias joined, lep-delete left 23:33 lep-delete joined, ocbtec left 23:36 espadrine left 23:37 espadrine joined 23:39 patrickz left 23:40 pyrimidine joined, john51 joined 23:42 cibs left 23:44 girafe left, cibs joined 23:45 agentzh left, pyrimidine left 23:49 pyrimidine joined 23:50 Ven joined 23:52 espadrine left 23:54 pyrimidine left 23:57 llfourn joined, cdg joined 23:58 pyrimidine joined