»ö« 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.
HoboWithAShotgun m: multi sub infix:«𝄇»(Any \obj is copy, Callable \code) { $_ = &(code)(obj); return $_.defined ?? ($_ 𝄇 code) !! obj; }; my $c = 10; say $c :| { $_+= 2; $++ > 10 ?? Any !! $_ }; say $c; 00:03
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 3 𝄇 code) !! obj; }; my $c = 10; say $c :7⏏5| { $_+= 2; $++ > 10 ?? Any !! $_ }; say
expecting any of:
colon pair
HoboWithAShotgun multi sub infix:«𝄇»(Any \obj is copy, Callable \code) { $_ = &(code)(obj); return $_.defined ?? ($_ 𝄇 code) !! obj; }; my $c = 10; say $c 𝄇 { $_+= 2; $++ > 10 ?? Any !! $_ }; say $c;
m: multi sub infix:«𝄇»(Any \obj is copy, Callable \code) { $_ = &(code)(obj); return $_.defined ?? ($_ 𝄇 code) !! obj; }; my $c = 10; say $c 𝄇 { $_+= 2; $++ > 10 ?? Any !! $_ }; say $c;
camelia 34
12
HoboWithAShotgun see that second value? the LHS changes 00:04
that's bad
ipatrol HoboWithAShotgun: 𝄇 is an operator?
HoboWithAShotgun yes, it's defined right there 00:05
ipatrol oh, I see
HoboWithAShotgun why doesn't it obey the is copy directive?
00:12 HoloIRCUser1 left 00:13 ryn1x joined
ipatrol HoboWithAShotgun: do you know what infix:<$?> actually is? 00:13
geekosaur ipatrol, re regex adverbs, I'm pretty sure they're just reused syntax. And the root syntax isn't even 'adverb', it's 'colonpair' 00:15
ipatrol geekosaur: I thought adverb was a nickname for colon pairs
00:16 darkmorph joined
geekosaur no, adverb is one semantic use of the syntax 00:16
m: say :a(3)
camelia Unexpected named argument 'a' passed
in block <unit> at <tmp> line 1
geekosaur hm, right, thats another use :)
m: say (:a(3))
camelia a => 3
geekosaur that;s not adverbial, it's just constructing a Pair 00:17
ipatrol m: sub ident:<a> () {say 'me!';}
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot add tokens of category 'ident'
at <tmp>:1
------> 3sub ident:<a>7⏏5 () {say 'me!';}
ipatrol so something of the form `name:<string>` is a token
of some kind
00:18 ryn1x left
geekosaur the grammar sublanguage recognizes them as such, yes 00:18
ipatrol "Identifiers can contain colon pairs. The entire colon pair becomes part of the name of the identifier." 00:19
m: my $ident:<foo> = 'me'; say $ident:<foo>; 00:20
camelia me
geekosaur right. that just discusses what an identifier can be, though; "token" is a concept of the grammar sublanguage
ipatrol geekosaur: but attempting to create a sub with a colon pair identifier is automatically construed as a token?
geekosaur specifically, how grammars will interpret (say) <term> by trying every sub term:...
00:21 cpage_ left
geekosaur and, while in theory you could define an arbitrary name like that, the perl 6 grammar specifically treats those as tokens so that it can make use of the <term> -> try every sub starting with 'term:' bit 00:23
which gets you a kind of extra extensibility since you don't have to mutate the grammar directly in many cases, just add a new sub term:<whatever> 00:24
ipatrol geekosaur: but as far as I know, ident is not a Perl grammar rule
geekosaur but if you define them directly via the MOP I suspect it takes them and just can't use them (unless you again access them directly the same way)
ipatrol m: sub pastry:<a> () {say 'me!';}
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot add tokens of category 'pastry'
at <tmp>:1
------> 3sub pastry:<a>7⏏5 () {say 'me!';}
00:26 ryn1x joined
ipatrol m: &pastry:<a> = sub () {say 'me!';} 00:26
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
pastry:<a> used at line 1
00:26 void1 joined
ipatrol m: my &pastry:<a> = sub () {say 'me!';} 00:27
camelia ( no output )
00:27 HoboWithAShotgun left
ipatrol m: my &pastry:<a> = sub () {say 'me!';} pastry:<a>; 00:27
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3my &pastry:<a> = sub () {say 'me!';}7⏏5 pastry:<a>;
expecting any of:
infix
infix stopper…
ipatrol m: my &pastry:<a> = sub () {say 'me!';}; pastry:<a>;
camelia me!
ipatrol ok, so it just doesn't like regular declarations using that syntax
geekosaur right, as I said, it special cases those so it can use the way grammars match them 00:29
00:29 strangemk2 left 00:30 HoboWithAShotgun joined, Cabanossi left
ipatrol geekosaur: can I possibly override that using the dispatch keyword for protos? 00:31
geekosaur I *think* you'd have to intervene in the actual implementation of the Grammar class 00:32
HoboWithAShotgun ipatrol: no i don't know what $? is but i am eager to learn
geekosaur or possibly the Match class, which is Grammar's superclass
ipatrol HoboWithAShotgun: oh, just my meta-syntax for a variable with an arbitrary name
00:33 Cabanossi joined
HoboWithAShotgun does it have to do with is copy? 00:37
ipatrol not at all 00:38
if it means anything else, that's my mistake 00:39
00:40 Rawriful left
ipatrol geekosaur: is dispatch a keyword the user can access, or is it internal only? 00:45
geekosaur it's not even a keyword 00:50
Grammars can have Actions associated with them. the way you attach an Action to a token is to define a sub dispatch:<tokenname> 00:52
'dispatch' is not used by itself, only by looking up these subs given a token 00:53
ipatrol geekosaur: not what I was talking about. design.perl6.org/S06.html#Routine_modifiers 00:54
geekosaur I don't think that got implemented that way 00:56
ipatrol geekosaur: I would guess not 00:57
geekosaur more to the point, I did a grep over the rakudo source and 'dispatch' is never used or defined in a standalone wauy
what did get implemented is what I described, using Actions instead.
ipatrol so it's an NYI?
geekosaur design.perl6.org was an early notion of how perl 6 might be implemented. 00:58
er, it describes, not 'was'
it's sometimes called the 'speculations'
as opposed to specifications 00:59
ipatrol geekosaur: and it was never replaced with anything other than an inscrutable test suite 01:00
01:00 ryn1x left
ipatrol and docs which are never prioritized 01:00
01:02 Cabanossi left 01:03 Cabanossi joined 01:10 tejr left 01:16 mempko joined
ipatrol geekosaur: do protoregexes use longest match alternation, or first match alternation? 01:17
geekosaur I am not entirely sure what you are asking, but in general longest match is preferred unless you specifically ask for something else (for example, compare || to |) 01:19
ipatrol geekosaur: docs.perl6.org/language/grammars#Protoregexes 01:21
which form of alternation does the protoregex create? 01:22
geekosaur if I read that example literally then it claims it's | 01:24
but I don't know the implementation
geekosaur is far from expert on the details of Grammars
01:31 Cabanossi left 01:33 Cabanossi joined 01:35 [equa] left 01:38 bitrauser joined 01:41 bitrauser_ left 01:45 ilbot3 left 01:46 kyan left 01:53 mempko left 01:55 ilbot3 joined, ChanServ sets mode: +v ilbot3, BenGoldberg joined 02:00 Cabanossi left 02:02 ryn1x joined 02:03 Cabanossi joined, ggoebel left 02:06 araraloren joined 02:13 pilne joined 02:17 ggoebel joined 02:20 cpage left 02:28 darkmorph left 02:32 Cabanossi left, noganex joined 02:33 Cabanossi joined 02:35 noganex_ left 02:36 ryn1x left, ufobat___ joined 02:37 ryn1x joined 02:39 ufobat_ left 02:43 HoboWithAShotgun left 03:03 evalable6 left, benchable6 left, coverable6 left, greppable6 left, bisectable6 left, statisfiable6 left, unicodable6 left, squashable6 left, releasable6 left, committable6 left, quotable6 left, bloatable6 left, nativecallable6 left, bloatable6 joined, ChanServ sets mode: +v bloatable6, nativecallable6 joined, ChanServ sets mode: +v nativecallable6, coverable6 joined, quotable6 joined, ChanServ sets mode: +v coverable6, ChanServ sets mode: +v quotable6, evalable6 joined, bisectable6 joined, greppable6 joined, ChanServ sets mode: +v bisectable6, ChanServ sets mode: +v greppable6, benchable6 joined, ChanServ sets mode: +v benchable6, releasable6 joined, unicodable6 joined, squashable6 joined, statisfiable6 joined 03:06 darkmorph joined, wamba joined 03:21 Bijju joined
Bijju How to create a JAR reqivalent in perl 6 for distribution ? 03:22
can i also embed the p6 interpreter ? so that the client machine does not need p6 installation ? standalone executable with built in lib files
?
Any help would be gr8 .. even JAR equivalent should work 03:23
03:25 Bijju left 03:28 darkmorph left 03:30 Cabanossi left 03:31 mr-foobar joined 03:33 Cabanossi joined, mr-fooba_ left
ipatrol too late, but, I doubt it'd be possible with the current implementation 03:40
03:41 strangemk2 joined 03:44 void1 left 03:45 Cabanossi left 03:47 Cabanossi joined 03:54 wander joined 03:55 aborazmeh joined, aborazmeh left, aborazmeh joined 04:03 mr-foobar left
wander ipatrol, the first match, I think 04:03
gist.github.com/W4anD0eR96/db0d6d5...7237130385 04:06
04:06 mr-foobar joined
ipatrol ok, so doesn't do what I wanted 04:07
04:13 xinming left, xinming joined 04:16 Cabanossi left 04:17 Cabanossi joined 04:18 AlexDaniel- left 04:20 aborazmeh left
wander I'm expecting Parsing with Perl 6 Regexes and Grammars, by moritz 04:21
04:26 jeek left 04:31 BenGoldberg left 04:36 pilne left 04:46 stux|RC left 04:47 preaction left, strangemk2 left 04:48 stux|RC joined, napo1eon joined 04:51 strangemk2 joined, preaction joined 04:53 mson left
ryn1x I am working on the "SixFix" learn perl6 challenges and have a question. I am supposed to join an array into a string and then "make a pattern from the string". What does this mean? Make a named regex or create a grammer maybe? 04:57
I came up with this solution, skipping that part: pastebin.com/Qk342DSL . What was I "supposed" to do? 04:58
04:58 troys_ is now known as troys 05:00 chakli joined, Cabanossi left, troys left 05:02 Cabanossi joined 05:03 mr-foobar left 05:07 mr-foobar joined 05:11 void1 joined 05:14 strangemk2 left
chakli Hi guys on "modules.perl6.org/" i see a few duplicate tags, like FASTCGI and FCGI, RPI,RASPBERRY PI and RAPBERRY Pi etc.. 05:16
05:20 chakli left 05:26 ryn1x_ joined 05:28 ryn1x_ left 05:31 mempko joined 05:33 mr-fooba_ joined 05:35 mr-foobar left 05:55 evalable6 left, evalable6 joined, ChanServ sets mode: +v evalable6 05:59 ryn1x left 06:04 andrzejku joined 06:05 committable6 joined, committable6_ joined, committable6_ left 06:07 committable6 left, committable6 joined 06:09 committable6 left, committable6 joined 06:14 Cabanossi left 06:17 Cabanossi joined 06:21 chakli joined 06:25 ryn1x joined 06:28 strangemk2 joined 06:29 chakli left 06:30 ryn1x left 06:31 void1 left 06:32 strangemk2 is now known as void1, andrzejku left 06:45 traxex_ joined, traxex left 06:52 BenGoldberg joined 07:01 ryn1x joined 07:03 traxex_ left 07:08 thunktone joined 07:12 AlexDaniel- joined, darutoko joined 07:32 ipatrol left 07:33 domidumont joined 07:34 ryn1x left 07:35 rindolf joined, ryn1x joined 07:38 domidumont left 07:39 domidumont joined 07:40 ryn1x left 07:43 strangemk2 joined 07:46 BenGoldberg left, void1 left 07:55 araraloren_ joined 07:57 Zoffix joined, thunktone left 07:58 araraloren left
Zoffix chakli: that can be fixed by adding those to aliases file: github.com/perl6/modules.perl6.org...es.json#L3 07:58
with '[REBUILD]' as the first thing in commit title when committing it
07:59 strangemk2 left 08:00 thunktone joined 08:01 Cabanossi left 08:02 Cabanossi joined 08:04 Zoffix left 08:05 void1 joined 08:06 void1 left 08:10 PeterMortensen_ left 08:13 ryn1x joined 08:17 rindolf left, espadrine joined, ryn1x left 08:35 mempko left 08:39 araralonre__ joined 08:41 mson joined 08:42 araraloren_ left 08:49 kaare_ left, mr-fooba_ left, ryn1x joined
ChoHag That patch (github.com/perl6/specs/commit/1c97...217219df98 adds confusion rather than clearing it up. When I saw "ASCII quotes" I assumed (erroneously) one of ' or ", but when I saw "Texas quotes" it made me go 'wtf' and look it up and the description was amusing enough to stick. 08:51
Since when did perl 6 become boring?
gfldex the sad part is that an americanism was replaced with American Standard Code for Information Interchange 08:52
ChoHag And if it is turning boring, « and » should be called by their proper name of guillemot. 08:53
08:53 mr-foobar joined
ChoHag Guillemets, sorry. 08:53
gfldex „“ <- we call these Gänsefüßchen 08:54
ChoHag Not least because according to wackypedia they're used in 25 locations which aren't France.
TEttinger like #perl6 08:55
ChoHag 26.
TEttinger gfldex: is that a word made from multiple sub-words? 08:56
like Zeitgeist
gfldex yes, in german we tend to glue words together
TEttinger "time ghost"
08:57 nadim joined
ChoHag You could even say they get gefüßed. 08:57
gfldex Straßenbahnfahrscheinabverkaufsstelle is a real word
TEttinger was
what
why is there one ß and one ss in the same word?
ChoHag German. The only language where camel case may actually be a good idea.
08:58 HoboWithAShotgun joined
gfldex good typesetting solves that problem because we add a little extra space inbetween word parts 08:58
works quite well actually 08:59
TEttinger No results found for Straßenbahnfahrscheinabverkaufsstelle
gfldex it's any place where you can buy tram tickets
before we got vending machines for them you could buy them at all sorts of places
09:00 Cabanossi left
ChoHag What was wrong with ticket office (suitably translated)? 09:00
Or _is_ that the suitable translations?
gfldex you could buy them in many stores where you would not expect them
TEttinger google suggests that as two words, the word for tram ticket and the word for point of sale
ChoHag Well I was going to do some coding but that patch has made me sad so I'm going to cook something instead. 09:01
09:02 Cabanossi joined 09:05 rba_ joined 09:07 rba left
geekosaur TEttinger, if I parse that correctly it's because the two s-s come from different words whereas the ß is inside one word 09:08
gfldex geekosaur: you parsed right
TEttinger ah 09:09
wow. I was going to install some updates. nope. www.computerworld.com/article/3232...-more.html 09:12
gfldex found it! 09:13
Rindfleischetikettierungsüberwachungsaufgabenübertragungsgesetz
that's the longest name of any law in germany 09:14
09:16 rba joined 09:17 TEttinger left 09:19 rba_ left, mr-foobar left 09:21 ryn1x left 09:22 ryn1x joined 09:26 mr-foobar joined 09:27 ryn1x left 09:31 rba_ joined 09:33 rba left 09:47 rba joined 09:48 rba_ left 09:49 mr-foobar left 09:52 mr-foobar joined
Geth whateverable/master: 4 commits pushed by (Aleks-Daniel Jakimenko-Aleksejev)++ 09:57
09:57 ryn1x joined 09:58 nadim left, araraloren_ joined 10:00 Cabanossi left, araralonre__ left 10:01 rba_ joined 10:02 ryn1x left, Cabanossi joined 10:03 rba left 10:04 wamba left 10:16 rba joined 10:19 rba_ left 10:20 wander left, mr-foobar left 10:24 mr-foobar joined 10:25 wander joined 10:31 nadim joined, thunktone left, rba_ joined 10:33 rba left, thunktone joined
HoboWithAShotgun m: multi sub infix:«:|»(Any \obj, WhateverCode \code) { .say }; "1" |: *.chars 10:35
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing required term after infix
at <tmp>:1
------> 3bj, WhateverCode \code) { .say }; "1" |:7⏏5 *.chars
expecting any of:
colon pair
10:35 ryn1x joined
AlexDaniel- HoboWithAShotgun: makes sense? 10:36
HoboWithAShotgun: it's :| vs |:
wander m: multi sub infix:«:|»(Any \obj, WhateverCode \code) { .say }; "1" :| *.chars 10:38
camelia ( no output )
10:39 nadim left
HoboWithAShotgun see? the op code doesnt execute 10:39
but if i do
m: 1 |: *.foo 10:40
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing required term after infix
at <tmp>:1
------> 031 |:7⏏5 *.foo
expecting any of:
colon pair
HoboWithAShotgun and it doesnt throw a signature error either 10:41
so, WTF?
10:45 notbenh left, notbenh joined 10:46 rba joined 10:47 wamba joined 10:49 rba_ left 10:59 domidumont left 11:02 rba_ joined 11:04 rba left 11:08 ryn1x left 11:16 Cabanossi left, margeas joined, rba joined 11:17 Cabanossi joined 11:18 rba_ left 11:19 mr-foobar left 11:23 mr-foobar joined 11:25 HoboWithAShotgun left 11:31 rba_ joined 11:33 rba left 11:34 Aaronepower left
AlexDaniel- looks at raw.githubusercontent.com/easysid/...mon-10.png 11:42
it feels like tiny fonts have bad long-term effects on eyes, but the convenience overweights potential blindness… 11:43
MasterDuke AlexDaniel-: do you have a high-dpi screen? 11:44
AlexDaniel- MasterDuke: no 11:45
which is why I like bitmap fonts, they're much more crips 11:46
crisp
11:46 rba joined
MasterDuke i feel like a bloods pun is in order, but it goes beyond my early morning ability to make one about fonts 11:47
11:49 rba_ left, mr-foobar left 11:53 mr-foobar joined
MasterDuke .tell ryn1x it probably means something like 'my $terms-regex = rx/$terms/;' and then 'my $matching-line-number = $contents.lines.first($terms-regex, :k) + 1;' 11:54
yoleaux MasterDuke: I'll pass your message to ryn1x.
AlexDaniel-
.oO( this is great but what about emoji? :) raw.githubusercontent.com/josuah/m...enshot.png )
11:56
11:56 HoboWithAShotgun joined
Ulti ^H^H/win 4 11:57
timotimo hey, why did that not trigger the lottery thing? 11:59
AlexDaniel- u: ^H 12:00
unicodable6 AlexDaniel-, U+007F <control-007F> [Cc] (control character)
AlexDaniel- it had these
timotimo that should still count, imo 12:01
AlexDaniel- sure
/win test
/win 4
buggable AlexDaniel-, Thank you for entering Accidental /win Lottery! The next draw will happen in 2 weeks, 2 days, 11 hours, 58 minutes, and 33 seconds
12:01 rba_ joined
AlexDaniel- buggable: source 12:01
buggable AlexDaniel-, See: github.com/zoffixznet/perl6-buggable
AlexDaniel- github.com/zoffixznet/perl6-buggable/issues/13 12:02
12:03 jeromelanteri joined 12:04 rba left, wander left 12:05 ryn1x joined 12:07 nadim joined 12:16 rba joined 12:18 rba_ left 12:20 mson left 12:22 phluks_ joined 12:23 ShalokShalom_ joined 12:26 ShalokShalom left 12:31 ShalokShalom_ is now known as ShalokShalom, rba_ joined 12:33 rba left 12:38 ryn1x left 12:46 telex left, rba joined, telex joined 12:48 rba_ left 12:51 mr-foobar left 12:54 mr-foobar joined 12:59 Cabanossi left 13:01 rba_ joined 13:02 Cabanossi joined, HoboWithAShotgun left 13:03 rba left 13:10 kaare_ joined 13:16 rba joined 13:18 rba_ left 13:20 pilne joined 13:21 mr-foobar left 13:28 mr-foobar joined 13:31 rba_ joined, Cabanossi left 13:32 Cabanossi joined 13:33 rba left 13:40 ryn1x joined, cdg joined 13:46 darkmorph joined, rba joined 13:49 rba_ left 13:51 mr-foobar left, cdg left 13:54 mr-foobar joined, phluks_ left 14:01 Cabanossi left 14:02 rba_ joined, Cabanossi joined 14:04 rba left 14:08 cdg joined 14:13 ryn1x left 14:17 rba joined 14:19 rba_ left, mr-fooba_ joined 14:20 mingdao joined 14:21 mr-foobar left 14:31 rba_ joined 14:33 rba left 14:42 eliasr joined 14:47 rba joined 14:48 setty1 joined 14:49 rba_ left 14:58 zakharyas joined 15:00 rba_ joined 15:03 ryn1x joined, rba left 15:05 darkmorph left, ChoHag left 15:07 ryn1x left 15:12 araraloren_ left 15:14 andrzejku joined, andrzejku left 15:15 andrzejku joined, Cabanossi left 15:16 mingdao left, andrzejku left, mingdao joined 15:17 andrzejku joined, Cabanossi joined 15:20 rindolf joined 15:22 ryn1x joined 15:27 ChoHag joined 15:47 unicodable6 left, statisfiable6 left, evalable6 left, committable6 left, bloatable6 left, coverable6 left, bisectable6 left, nativecallable6 left, quotable6 left, benchable6 left, releasable6 left, squashable6 left, greppable6 left, quotable6 joined, coverable6 joined, nativecallable6 joined, evalable6 joined, ChanServ sets mode: +v quotable6, ChanServ sets mode: +v coverable6, ChanServ sets mode: +v nativecallable6, ChanServ sets mode: +v evalable6, bloatable6 joined, greppable6 joined, committable6 joined, ChanServ sets mode: +v committable6, unicodable6 joined, ChanServ sets mode: +v unicodable6, benchable6 joined, ChanServ sets mode: +v benchable6, releasable6 joined, bisectable6 joined, ChanServ sets mode: +v releasable6, ChanServ sets mode: +v bisectable6, squashable6 joined, ChanServ sets mode: +v squashable6 15:48 darkmorph joined 15:52 ryn1x left 15:58 skids joined 16:01 buggable left, buggable joined, ChanServ sets mode: +v buggable 16:08 Zoffix joined
Zoffix .tell HoboWithAShotgun your WhateverCode is closing over your op. So you're not calling it ever. You're just making one WhateverCode in sink context. If you want just .chars to be the WhateverCode use parens: sub infix:«:|»(Any \obj, WhateverCode \code) { dd 423 }; "1" :| ((*.chars)) 16:09
yoleaux Zoffix: I'll pass your message to HoboWithAShotgun.
Zoffix .tell HoboWithAShotgun also awhile back you said `\foo is copy` was copying something... `\foo` means "is raw". Not sure `is copy` even makes sense on it (so compiler might wanna be made to throw there). Use `$foo is copy` or whatever if you want a copied container. 16:11
yoleaux Zoffix: I'll pass your message to HoboWithAShotgun.
16:12 thunktone left 16:14 thunktone joined, cdg left 16:15 cdg joined
Zoffix ChoHag: we changed "Texas" to "ASCII" not to have "perl6 turning boring" but to avoid ingraining language terminology that is based on cultural stereotypes. This happened after people extended the "Texas" naming to call Unicode ops "Mexico" ops because it's opposite Texas: RT#132179 16:15
synopsebot RT#132179 [resolved]: rt.perl.org/Ticket/Display.html?id=132179 Don't put Mexico and Texas in opposition in Perl 6 jargon
16:15 Cabanossi left
Zoffix Control chars now accepted in lottery strings 16:16
16:16 Zoffix left 16:17 Cabanossi joined 16:19 cdg left, pmurias joined 16:21 HoboWithAShotgun joined 16:22 domidumont joined, thunktone left, rba joined 16:23 andrzejku left, thunktone joined 16:25 rba_ left, andrzejku joined 16:30 ryn1x joined 16:32 rba_ joined 16:34 rba left
ChoHag That sounds rather boring to me. 16:39
16:46 mempko joined
ryn1x .tz 16:48
yoleaux 11:54Z <MasterDuke> ryn1x: it probably means something like 'my $terms-regex = rx/$terms/;' and then 'my $matching-line-number = $contents.lines.first($terms-regex, :k) + 1;'
ryn1x: I don't currently have a timezone preference set for you.
ryn1x .tz America/Denver 16:53
yoleaux ryn1x: Changed your timezone to America/Denver. (Current date and time: 2017-10-15 10:53:26)
16:56 mempko left
ugexe is there a proper way to get specific elements (like subscript `[2,3,4]`) with a pipe operator? e.g. `(1..10) ==> grep { .so } ==> grep { 2 <= $++ <= 4 }` but safe if pipe operators happen to parallelize in the future 16:59
feed operator^ 17:06
timotimo m: <foo bar baz quux> ==> .[2,3] ==> say 17:07
camelia 5===SORRY!5===
Argument to "say" seems to be malformed
at <tmp>:1
------> 3<foo bar baz quux> ==> .[2,3] ==> say7⏏5<EOL>
Only routine calls or variables that can '.push' may appear on either side of feed operators.
at <tmp>:1
---…
timotimo m: <foo bar baz quux> ==> .[2,3] ==> say()
camelia 5===SORRY!5=== Error while compiling <tmp>
Only routine calls or variables that can '.push' may appear on either side of feed operators.
at <tmp>:1
------> 3<foo bar baz quux> ==> 7⏏5.[2,3] ==> say()
ugexe or even something like ^10 ==> grep { $_ > 5 } ==> head(2)
timotimo m: ((^10) ==> grep * > 5)[2,3] ==> say() 17:09
camelia (8 9)
timotimo :P
ugexe yeah but the entire reason i'm even using feed operator is to line things up nicely! 17:11
timotimo aye
m: (^10) ==> &postcircumfix:<[ ]>(2, 3) ==> say() 17:12
camelia WARNINGS for <tmp>:
Useless use of constant value [ ] in sink context (lines 1, 1)
Index out of range. Is: 3, should be in 0..0
in any at <tmp> line 1
in block <unit> at <tmp> line 1
timotimo yeah, it'd put the array in the wrong spot in the args
or maybe it's wrong in a different way
ugexe m: ^10 ==> grep { $_ > 5 } ==> splice(2) ==> my @a; say @a.perl 17:13
camelia Type check failed in binding to parameter '@arr'; expected Positional but got Int (2)
in any at <tmp> line 1
in block <unit> at <tmp> line 1
17:13 zakharyas left
timotimo yeah, having the data put in as a slurpy at the end doesn't make this much easier 17:14
you can define you rown sub, that'll give you the line-up stuff at least
17:15 Cabanossi left
timotimo m: sub takethese(@indices, *@values) { @values.[@indices] }; ^10 ==> takethese [2, 4] ==> say() 17:16
camelia (2 4)
timotimo m: sub takethese(@indices, *@values) { @values.[@indices] }; <foo bar baz quux blorp> ==> takethese [3, 1, 4, 1] ==> say()
camelia (quux bar blorp bar)
ugexe another observation is it might be nice to have something like |==> or some such to reifiy/eager the list up until that point and cache, instead of having to do the ==> my @foo; @foo ==> ...
17:17 okl joined, Cabanossi joined
timotimo kind of the opposite of ==>> 17:18
ugexe yeah
17:19 Cabanossi left
timotimo this is what was called "silo" at one point during the GLR 17:19
17:19 Cabanossi joined
ugexe the feed operators? 17:19
or the concept of that refification point 17:20
timotimo no, the "gather all data, then continue"
fwiw, the "takethese" sub will silo up the data by virtue of postcircumfix:<[ ]> doing that
ugexe hmmm couldnt I inline a sub/block in the pipeline itself? 17:21
timotimo oh, hm, that sounds like something you should be able to do 17:22
will have to have the signature right, of course 17:23
ugexe m: ^10 ==> grep { $_ > 1 } ==> (sub (@indices, *@values) { @values.[@indices] })([2,3,4]) ==> my @a; say @a.perl 17:24
camelia [4, 5, 6]
17:25 BenGoldberg joined, kyan joined
ugexe of course i still wonder if this fits with the idealistic implementation of feeds 17:25
timotimo right 17:26
ugexe if i understand it correctly though it seems like ==> could be like hyper/race 17:27
timotimo a little bit; it's supposed to run each block in its own worker thread and have them communicate with channels 17:28
m: ^10 ==> grep { $ > 1 } ==> -> *@v { @v[2,3,4] } ==> my @a; say @a.perl
camelia 5===SORRY!5=== Error while compiling <tmp>
Only routine calls or variables that can '.push' may appear on either side of feed operators.
at <tmp>:1
------> 3^10 ==> grep { $ > 1 } ==> 7⏏5-> *@v { @v[2,3,4] } ==> my @a; say @a.p
timotimo m: ^10 ==> grep { $ > 1 } ==> (-> *@v { @v[2,3,4] }) ==> my @a; say @a.perl
camelia 5===SORRY!5=== Error while compiling <tmp>
Only routine calls or variables that can '.push' may appear on either side of feed operators.
at <tmp>:1
------> 3^10 ==> grep { $ > 1 } ==> 7⏏5(-> *@v { @v[2,3,4] }) ==> my @a; say @a
timotimo :(
m: ^10 ==> grep { $ > 1 } ==> (-> *@v { @v[2,3,4] })() ==> my @a; say @a.perl
camelia Use of uninitialized value of type Any in numeric context
[Any, Any, Any]
in block at <tmp> line 1
Use of uninitialized value of type Any in numeric context
in block at <tmp> line 1
Use of uninitialized value of type Any in numeric con…
timotimo m: ^10 ==> grep { $ > 1 } ==> (-> $, *@v { @v[2,3,4] })(1) ==> my @a; say @a.perl 17:29
camelia Use of uninitialized value of type Any in numeric context
[Any, Any, Any]
in block at <tmp> line 1
Use of uninitialized value of type Any in numeric context
in block at <tmp> line 1
Use of uninitialized value of type Any in numeric con…
ugexe m: ^10 ==> grep { $_ > 1 } ==> (-> $i, *@v { @v[|$i] })([1,2,3]) ==> my @a; say @a.perl 17:32
camelia [3, 4, 5]
ugexe s/$/$_/ 17:33
timotimo but why?
ugexe m: (1,2,3).grep: { say $ } 17:34
camelia (Any)
(Any)
(Any)
timotimo but i didn't use $ in there at all?
only in the signature?
ugexe the grep
timotimo oh!
i was looking in the absolute wrong spot
17:45 evalable6 left, evalable6 joined, statisfiable6 joined, ChanServ sets mode: +v statisfiable6
Geth ecosystem: holli-holzer++ created pull request #375:
Add Operator::grandpa
17:50
18:00 Cabanossi left 18:02 okl left, Cabanossi joined
Geth ecosystem: ff4c543b89 | holli-holzer++ (committed by Zoffix Znet) | META.list
Add Operator::grandpa (#375)
18:04
18:07 MasterDuke left, rindolf left 18:08 setty1 left 18:11 ryn1x left 18:18 Morfent joined 18:22 bitrauser left 18:24 ufobat___ is now known as ufobat 18:26 cdg joined
ufobat i am just playing around with IO::Socket::Async::SSL, and i am wondering how error handling works. I've written a server similar to the one in the example amd whenever the client does something wrong regarding TLS for example, the server crashes with "Tried to get the result of a broken Promise" reported in the "react {" line 18:28
18:28 mempko joined
timotimo you can have a QUIT { } block inside a whenever that gets called when the thing you're whenevering has an exception 18:29
if i'm not mistaken
HoboWithAShotgun or you catch the error and emit something special to the consumer if neccessary 18:30
yoleaux 16:09Z <Zoffix> HoboWithAShotgun: your WhateverCode is closing over your op. So you're not calling it ever. You're just making one WhateverCode in sink context. If you want just .chars to be the WhateverCode use parens: sub infix:«:|»(Any \obj, WhateverCode \code) { dd 423 }; "1" :| ((*.chars))
16:11Z <Zoffix> HoboWithAShotgun: also awhile back you said `\foo is copy` was copying something... `\foo` means "is raw". Not sure `is copy` even makes sense on it (so compiler might wanna be made to throw there). Use `$foo is copy` or whatever if you want a copied container.
timotimo if you catch it with a CATCH outside, the whole react will be torn down, whereas you can do fine-grained per-whenever stuff with QUIT
i'm fuzzy on the details 18:31
18:31 darutoko left
ufobat the QUIT didnt work :( 18:31
timotimo then i'm wrong! :)
18:31 Cabanossi left, cdg left
ufobat CATCH outside? with try? 18:31
timotimo have you looked at jnthn's supplies talk?
18:31 Aaronepower joined
ufobat try {CATCH { ... } react { ... }} like that? 18:32
no not right now
18:32 Cabanossi joined
timotimo the one that introduced cro was quite good, from the SPW 18:32
18:33 spider-mario left
ufobat I viewed this one half, then i got sick for 2 days :( (not because of the talk of course) 18:34
timotimo yeah, that would be a pretty strong impact for a talk to have
18:34 spider-mario joined
ufobat i am having no clue but, one thing confuses me. if the error handling is supposed to be outside of the react block and a react block can hat several whenever's in it, doing completly different stuff.. 18:36
how can you easily know which one caused the troubles
well the try catch outside caught the error but the react block is terminated as well. :/ 18:38
ufobat is going to watch the talk now
18:42 rindolf joined, nebuchadnezzar left
gfldex ufobat: I had the same problem with the golfed httpd and adding loads of `try` until the error went away help to narrow down the cause. 18:42
18:42 nebuchadnezzar joined
Geth DBIish: ecdf870494 | (Jonathan Stowe)++ | lib/DBDish/mysql.pm6
Make the arguments to MySQL connect explicitly typed

This makes the message more obvious when the user makes a mistake with the arguments.
Closes #105
18:43
DBIish: c9fb7dde55 | (Jonathan Stowe)++ | 2 files
Up version
ufobat gfldex, the error went went away? 18:47
18:51 Rawriful joined 18:55 u-ou left 18:59 darkmorph left
gfldex ufobat: I actually had a bug in my code that was hard to spot. So it didn't went away by itself. 19:01
HoboWithAShotgun zoffix: I merged your fixes. Thanks for taking the time.
ufobat ah :-) but for your example it works as expected if you http onto a https server? 19:04
19:05 u-ou joined, ryn1x joined
gfldex ufobat: this may be helpful gist.github.com/gfldex/044cdfa4e6b...39e7b95e23 19:06
ufobat: I sticked `try` in from of the lines that start with `@msg.push:` to try and error my way to the root cause. 19:07
19:09 ryn1x left
ufobat thanks :) 19:14
19:15 domidumont left 19:17 ryn1x joined 19:21 mr-fooba_ left 19:24 mr-foobar joined 19:40 wander joined 19:43 wander_ joined, wander_ left 19:45 wander left
ufobat only the try outside of the react {} is catching it.. i am doing something wrong :-( 19:49
19:50 ryn1x left
gfldex ufobat: maybe you want to put the source on the intarwebs so you can laugh … err … help you 19:50
:-> 19:51
ufobat okay :D
i am afraid ;)
19:52 wander joined
wander doc of functions says `Introspection on subroutines is provided via Routine.' 19:53
whlie
m: sub f { }; &f.^name.say
camelia Sub
gfldex m: say Sub ~~ Routine;
camelia True
gfldex m: say Method ~~ Routine; 19:54
camelia True
wander m: Routine ~~ Sub
camelia ( no output )
ufobat gfldex, github.com/ufobat/HTTP-Server-Ogre...re.pm6#L86
wander m: say Routine ~~ Sub
camelia False
wander or i'm misunderstanding what `introspection' means 19:55
19:56 kurahaupo left 20:00 mempko left
gfldex ufobat: what is the error message you get? 20:01
ufobat just a warning 1 error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number 20:02
in block at /home/martin/.workspace/p6/Bailador/examples/https/../../../HTTP-Server-Ogre/lib/HTTP/Server/Ogre.pm6 (HTTP::Server::Ogre) line 85
20:02 ryn1x joined
ufobat i am doing http on the https server 20:02
without that try catch i am getting ..
Tried to get the result of a broken Promise in method run ... line 84 20:03
gfldex ufobat: try to output `.backtrace` 20:04
ugexe are you sure you dont mean to use QUIT { } instead of CATCH { } 20:06
20:06 ryn1x left
ufobat i dont know? 20:07
gfldex ufobat: a CATCH block with a default will handle the exception and the program will just contine. That's why the promise is reported as broken. 20:08
20:09 TEttinger joined, BenGoldberg left
ufobat i dont understand :( 20:11
20:16 wander left
ufobat shoudn't the `whenever $listener -> $conn` throw the exception so i should be able to catch it around this one? 20:17
gfldex ufobat: very unlikely, there Failure will come from lines that call Routines outside the react block 20:19
timotimo no, CATCH is for handling "local" problems whereas QUIT is for handling "remote" problems
ufobat the error itself is from here (IO::Socket::Async::SSL) line 525 20:21
20:22 mr-foobar left
timotimo m: sub setup-some-listenable() { die "oh no, it didn't work" }; react { whenever setup-some-listenable { QUIT { say "quit inside whenever" }; CATCH { "catch inside whenever" } }; QUIT { say "quit outside whenever" }; CATCH { say "catch outside whenever" } } 20:22
camelia 5===SORRY!5===
Function 'setup-some-listenable' needs parens to avoid gobbling block
at <tmp>:1
------> 3" }; CATCH { "catch inside whenever" } }7⏏5; QUIT { say "quit outside whenever" };
Missing block (apparently claimed by 'setup-…
timotimo m: sub setup-some-listenable() { die "oh no, it didn't work" }; react { whenever setup-some-listenable() { QUIT { say "quit inside whenever" }; CATCH { "catch inside whenever" } }; QUIT { say "quit outside whenever" }; CATCH { say "catch outside whenever" } } 20:23
camelia catch outside whenever
An operation first awaited:
in block <unit> at <tmp> line 1

Died with the exception:
oh no, it didn't work
in sub setup-some-listenable at <tmp> line 1
in block <unit> at <tmp> line 1
ufobat the QUIT within the whenever $listener -> $conn gets called with that error
timotimo m: sub setup-some-listenable() { supply { die "oh no, it didn't work" } }; react { whenever setup-some-listenable() { QUIT { say "quit inside whenever" }; CATCH { "catch inside whenever" } }; QUIT { say "quit outside whenever" }; CATCH { say "catch outside whenever" } }
camelia quit inside whenever
An operation first awaited:
in block <unit> at <tmp> line 1

Died with the exception:
oh no, it didn't work
in block <unit> at <tmp> line 1
timotimo ufobat: maybe these two examples clarify things a tiny bit?
20:25 mr-foobar joined
ufobat ah 20:26
then my last stupid question maybe, the $_ in QUIT is failure and i just need to handle it in order to keep my program up and running? 20:27
nope :( 20:33
20:33 darkmorph joined 20:34 MasterDuke joined 20:38 |oLa| left 20:39 wander joined, gigavinyl joined, |oLa| joined
wander how about macro in perl6? 20:40
timotimo wander: we have experimental "old-style" macros that aren't feature-complete and will be replaced completely, and you can define a slang to change parsing however you want
20:40 ryn1x joined, gigavinyl left
wander m: constant aname = 'foo'; sub ::(aname) { say 'bar' }; foo.say; 20:41
camelia bar
True
wander any usage of macro? 20:44
20:45 ryn1x left
MasterDuke greppable6: macro 20:48
greppable6 MasterDuke, gist.github.com/6d3e24427e9d2749b3...1dfcc56200
MasterDuke greppable6: ' macro ' 20:49
greppable6 MasterDuke, Found nothing!
20:51 mr-foobar left 20:52 mr-foobar joined
timotimo wander: on github you can find "007" which is the project in which masak is figuring out exactly how perl6 macros should work and be implemented 20:55
github.com/masak/007 i believe 20:56
wander k
timotimo it's its own language and compiler, though 21:01
i don't think there's a way to mix 007 and perl6 code
tyil yet
buggable New CPAN upload: App-Bob-0.5.1.tar.gz by TYIL cpan.metacpan.org/authors/id/T/TY/...5.1.tar.gz
tyil aww yis 21:02
timotimo what does bob do? 21:03
ugh, modules.perl6.org/repo/App::Bob gives me the cpan zip file, not the repo
tyil timotimo: its intended to help making new modules, set up the directories, create a META6.json, make dists and upload them 21:05
add dependencies to the META6 without having to manually edit, or add new files without having to edit the META6
I'm looking for the best module to send a http form encoded post request with http credentials to PAUSE 21:06
github.com/scriptkitties/perl6-App-Bob is the source repo
(I didn't like mi6, since upload never worked for me, so I'm trying to make my own alternative for it with some additions to make my life easier) 21:07
once I get a v1.0.0 I'll add a tutorial on my site, guiding a new user through the entire process of making a new module, adding some files, depending on something else, packaging it up and possibly releasing it on CPAN 21:08
gfldex tyil: you want to look at META6::bin for features to steal 21:09
21:09 konsolebox left
tyil nice 21:09
yours basically does most of the local stuff I want bob to do 21:10
fork and pr commands might be a nice bonus after 1.0.0 21:11
AlexDaniel- MasterDuke: fwiw I think you wanted \bmacro\b 21:12
21:13 ryn1x joined
MasterDuke AlexDaniel-: yeah, i couldn't remember whether it is Perl 5 or 6 style (and then i got distracted) 21:14
21:15 konsolebox joined
gfldex tyil: github tends to timeout. You may want to handle that early on or you get really odd errors. 21:18
tyil gfldex: I'll focus on getting the features I wanted and make a tutorial available 21:19
partly because I want to be able to use it to deal with all my module building needs
partly because its good for my ego to see my name appear in the p6 weekly all the time :p
21:28 cdg joined 21:31 cdg left 21:32 bitrauser joined 21:42 mson joined 21:46 ryn1x left, pmurias left 21:47 cdg joined 21:50 BenGoldberg joined 21:51 ryn1x joined 21:52 mr-foobar left 21:55 mr-foobar joined 21:56 ryn1x left 21:57 rindolf left, MasterDuke_ joined
tyil modules.perl6.org/dist/App::Bob:cpan:TYIL, this shows there's two dists, both by me, both from cpan, is this because I have multiple versions available on cpan right now? 21:59
22:00 MasterDuke left 22:01 MasterDuke_ is now known as MasterDuke, Cabanossi left
timotimo i see it show up twice in the "from:cpan" search, too 22:01
22:02 Cabanossi joined
tyil it is technically correct, since v0.2.2 and v0.5.1 are both available on CPAN atm 22:03
but I'm not sure this is the intended effect
22:05 thunktone left, robertle left 22:06 MasterDuke left 22:14 Rawriful left
ufobat could anyone send me PR with a fix that dosn't shut down the hole server as soon as HTTP traffice arives for github.com/ufobat/HTTP-Server-Ogre...server.pl6 22:15
i am to stupid :( i cant get it work
sorry and thankyou and good night :( 22:16
22:17 Mrofnet joined 22:18 kurahaupo_ joined, kurahaupo_ left
HoboWithAShotgun what is the correct way to write a getter/setter pair properly by hand? 22:18
22:19 kurahaupo_ joined 22:20 Morfent left, kurahaupo_ left
HoboWithAShotgun most importantly, how do i do actually what the docs say is possible: Methods can return mutable containers, in which case you can assign to the 22:20
return value of a method call.
22:20 cdg left, Zoffix joined
HoboWithAShotgun hands cate to zoffix++ 22:21
*cake
Geth modules.perl6.org: 6e90124ead | (Zoffix Znet)++ (committed using GitHub Web editor) | use-me-for-commit-triggers
[REBUILD] to clear buggy CPAN cache
22:22 mr-foobar left
AlexDaniel- HoboWithAShotgun: maybe this is what you need? docs.perl6.org/type/Proxy 22:22
just guessing, I don't really know
Zoffix tyil: yeah, it's due to second version. The bug is due to cache clearer clearing by meta URL and I think CPAN metas still have version in them. Gonna take a look on Tuesday, unless I forget or someone beats me to it
tyil Zoffix: alright, awesome! 22:23
HoboWithAShotgun boy, that's ugly
Zoffix m: class Foo { has $!bar; method bar is rw { $!bar } }; with Foo.new { .bar = 42; say .bar; .bar = 70; say .bar } 22:24
camelia 42
70
Zoffix HoboWithAShotgun: ^ that's another way
22:24 Zoffix left 22:25 mr-foobar joined
HoboWithAShotgun ^^ 22:25
m: class Foo { has $!bar; method bar is rw { return $!bar } }; with Foo.new { .bar = 42; say .bar; .bar = 70; say .bar } 22:27
camelia Cannot assign to a readonly variable or a value
in block <unit> at <tmp> line 1
22:27 ryn1x joined
HoboWithAShotgun ?? why does "return" break it? 22:27
22:30 Zoffix joined
Zoffix HoboWithAShotgun: you're meant to use return-rw to return writable containers 22:30
HoboWithAShotgun uh, right
22:30 Zoffix left 22:31 MasterDuke joined
HoboWithAShotgun can you have mutable sigil-less variables? 22:35
AlexDaniel- not really, that's the whole point of sigilless vars 22:39
at least that's what I thought
HoboWithAShotgun yes, they "do not create containers" 22:41
22:42 Miller joined
Miller Hello 22:43
HoboWithAShotgun Miller! You here?? 22:44
AlexDaniel- o/ 22:45
HoboWithAShotgun How ya been dude? How's Danielle and the kids? All good?
22:48 kurahaupo joined 22:50 espadrine left, cdg joined 22:51 mr-foobar left 22:52 Miller left 22:54 mr-foobar joined 22:55 cdg left
BenGoldberg m: say 0 ** 0 23:00
camelia 1
23:00 Cabanossi left
AlexDaniel- hmmm… 23:01
23:02 Cabanossi joined
AlexDaniel- BenGoldberg: same behavior in other languages so I guess it's ok, but it's still weird 23:03
BenGoldberg m: say one(0, 1, NaN)
camelia one(0, 1, NaN)
23:04 mmcclimon joined
BenGoldberg m: say 0/0 23:04
camelia Attempt to divide by zero using div
in block <unit> at <tmp> line 1
BenGoldberg m: say <0/0> 23:05
camelia Attempt to divide by zero using div
in block <unit> at <tmp> line 1
BenGoldberg m: say 0e0/0e0
camelia Attempt to divide by zero using /
in block <unit> at <tmp> line 1
23:06 kurahaupo_ joined, kurahaupo_ left
BenGoldberg wonders why those don't produce NaN 23:06
23:06 kurahaupo_ joined, kurahaupo_ left 23:07 kurahaupo_ joined, kurahaupo_ left 23:08 kurahaupo left 23:09 kurahaupo joined, kurahaupo left 23:12 darkmorph left
geekosaur the first two don't because NaN is specific to IEEE floating point, but those are Rats. the third looks to me like a bug 23:12
23:14 MasterDuke left
geekosaur 0 ** 0 behavior: www.math.hmc.edu/funfacts/ffiles/1....3-5.shtml mathforum.org/dr.math/faq/faq.0.to.0.power.html 23:16
...and since you are often dealing with numerical methods / approximate results via application of limits when you run into it, 1 is the most useful value because it agrees with the expected result per theory of limits 23:20
23:21 cdg joined 23:23 mr-foobar left 23:26 cdg left 23:27 kurahaupo joined, kurahaupo left, mr-foobar joined 23:29 cdg joined 23:31 andrzejku left
tyil I'm trying to upload a file to PAUSE using a HTTP POST request, code cry.nu/p/778z/ (around the bottom, denoted with "# this thing here") 23:32
but I'm getting an error in the module I'm using to do the request (HTTP::Client), giving the following error
Cannot use a Buf as a string, but you called the Stringy method on it 23:33
the offending line in the module would be github.com/supernovus/perl6-http-c...t.pm6#L218
23:33 cdg left
tyil could I fix this in my module somehow by altering the input I give to the module, or is this a bug in the module 23:33
geekosaur you would have to work around it by encoding the file to a string representation and adding a header indicating which encoding. HTTP::Client claims to support binary and tries to, but it's doing it wrong 23:38
(and its developer is going to have to think a bit hrder if they intend to do binary support properly, since they seem to have assumed that Strs are perfectly fine containers for binary data.) 23:40
ugexe fine for headers at least 23:41
geekosaur tl;dr: if it hadn't crashed there, it would likely have produced garbage)
right, but it's concatenating the supplied binary data (the POST's content) and a final CRLF into a Str. which will treat it as Unicode in NFG and do things like trying to normalize it 23:42
ugexe ah i thought it was only concating 2 bufs or 2 strings, not one of each 23:45
geekosaur yeh, it's building an http request in a Str. I'd argue that's wrong from the very start; it should be using a buf8, any Str-s put into it should be encoded *as specified by encoding headers* or otherwise .. pedantically ought to reject but practically likely needs to use iso8859-1 23:47
more programmers who think encodings magically deal with themselves :( 23:48
tyil, anyway you should probably file a bug including what the above about using a buf8 against HTTP::Client. but that won't help you now; if you have to use that client the only safe way to do so with binary data is to base64-encode or otherwise make the data text-safe, and specify a Content-Transfer-Encoding header with the encoding 23:51
tyil geekosaur: can I do that by simply using :utf8 instead of :bin?
geekosaur NO 23:52
tyil thats a big no
geekosaur you're making exactluy the same mistake the author of HTTP::Client did
that will CORRUPT binary data
tyil Iwas considering using base64 first
but The Internet convinced me that was bad too
b2gills .tell lizmat I recommend just indenting code blocks by 4 spaces on StackOverflow (along with one 「<!-- language-all: lang-perl6 -->」 at the top of Perl 6 posts) stackoverflow.com/posts/46742643/revisions
.tell lizmat Also it might be a good idea to add one or more OpenID logins to maintain control over your answers.
yoleaux b2gills: I'll pass your message to lizmat.
geekosaur it's not great, but when the library you are using is going to corrupt binaru data you either need to find a non-broken library or base64 to work around the brokenness 23:53
23:53 evalable6 left, evalable6 joined
geekosaur or accept that binary data will sometimes get trashed 23:53
tyil I've looked at other libs, but documentation is either lacking or they really dont implement the things I want (setting headers, adding a tarbal to the request) 23:54
I could depend on curl being available and let that handle the upload :'D 23:55
geekosaur that might be your best bet. I'd still file the bug; this is a trap that's going to bite someone eventually 23:57
sadly, encodings are a sewer and, while it might be possible to design a language that helps work with them, it will always require programmer support because current OSes do not carry an encoding description along with data automatically 23:58
And programmers always think they can just slap data with different encodings together without even talking about encoding, and somehow the right thing will happen.
tyil I mean 23:59
usually in perl the right thing happens
geekosaur And... maybe 90% of the time the binary data won't have anything that happens to look like a unicode combining sequence or etc. and it will work
then you hit that 10% and the file gets trashed