»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by masak on 12 May 2015.
00:00 margeas left, RaTTuS|BIG left, Guest33524 left, bpmedley left 00:02 advwp joined 00:04 rindolf left, leont left
gfldex m: my $i = 1; my $max; loop { $max = $max max chars(chr($i++)); last if $i > 33500 }; say $max; 00:05
camelia rakudo-moar 271e84: OUTPUT«1␤»
gfldex m: my int $i = 1; my int $max; loop { $max = $max max chars(chr($i++)); last if $i > 33500 }; say $max;
camelia rakudo-moar 271e84: OUTPUT«1␤»
gfldex star-m: my constant @a := map { .chr.chars }, 1..33500; [max] @a; 00:07
camelia star-m 2015.09: OUTPUT«(signal SEGV)»
00:10 hohoho joined
daxim .tell lizmat > even though there are officially no words starting with ßpaste.scsys.co.uk/500285 00:13
yoleaux 14 Oct 2015 22:16Z <lizmat> daxim: if you can give me a paragraph about why my statement re ß in the P6W was wrong, I will add it as an erratum next week
daxim: I'll pass your message to lizmat.
00:14 CurtisOvidPoe_ joined 00:15 hohoho left 00:16 CurtisOvidPoe left, CurtisOvidPoe_ is now known as CurtisOvidPoe 00:19 softmoth left 00:27 azawawi joined
azawawi hi :) 00:27
00:27 n0tjack joined
azawawi automated browser testing for Perl 6 is here, enjoy github.com/azawawi/perl6-selenium-...es/ex01.p6 :) 00:28
azawawi sleep & 00:29
00:29 azawawi left
n0tjack is there any value to the return values of match actions? 00:30
outside of calling $/.make
00:34 yeltzooo left 00:43 hohoho joined 00:45 yeltzooo joined 00:46 tokuhirom joined 00:48 Celelibi joined, adhoc left, SADTHUH joined, CAA0P2B joined 00:51 tokuhirom left
dalek ecs: 9742c39 | (Stéphane Payrard)++ | S32-setting-library/Basics.pod:
fossil eval replaced with EVAL
00:51
hohoho m: my %e := EnumMap.new('a', 1, 'b', 2); 00:58
camelia rakudo-moar 271e84: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gC6dvjLYvu␤Undeclared name:␤ EnumMap used at line 1␤␤»
hohoho is this synopsys broken? doc.perl6.org/type/EnumMap 00:59
gfldex some parts are a little outdated
m: my %e := Map.new('a', 1, 'b', 2);
camelia ( no output )
n0tjack m: rammar G { token TOP { <digit> <alpha> } }; class A { method TOP((:$digit, :$alpha)) { say $digit; say $alpha; } }; G.parse('1a', actions => A) 01:00
camelia rakudo-moar 271e84: OUTPUT«5===SORRY!5===␤Undeclared name:␤ G used at line 1␤Undeclared routine:␤ rammar used at line 1␤␤Other potential difficulties:␤ Useless declaration of a has-scoped method in mainline (did you mean 'my token TOP'?)␤ at /tmp/mQNJ…»
n0tjack m: grammar G { token TOP { <digit> <alpha> } }; class A { method TOP((:$digit, :$alpha)) { say $digit; say $alpha; } }; G.parse('1a', actions => A)
camelia rakudo-moar 271e84: OUTPUT«「1」␤「a」␤»
n0tjack hmm, wonder what I'm doing wrong in my actual impl
01:07 bjz joined 01:15 AlexDaniel left 01:16 bjz_ joined, bjz left, llfourn joined, EricMobiel left, EricMobiel joined, bpmedley joined 01:21 aborazmeh joined, aborazmeh left, aborazmeh joined 01:22 llfourn left 01:24 kid51 left 01:26 Guest93853 left 01:33 llfourn joined 01:42 bjz_ left, bjz joined 01:45 ilbot3 left 01:46 ilbot3 joined 01:47 softmoth joined
gtodd m: pick(3, ^9) 01:49
camelia ( no output )
gtodd m: pick(3, ^9).say
camelia rakudo-moar 271e84: OUTPUT«(1 4 0)␤»
gtodd m: pick(3, ^9).perl 01:50
camelia ( no output )
gtodd pick(3, ^9).gist
oops
lizmat m: dd pick(3, ^9)
yoleaux 00:13Z <daxim> lizmat: > even though there are officially no words starting with ßpaste.scsys.co.uk/500285
camelia rakudo-moar 271e84: OUTPUT«(7, 2, 8).Seq␤»
gtodd wheee dd :-) 01:51
01:51 softmoth left 02:05 cognominal left
gtodd tries to compare a perl6 oneliner that picks 3 numbers in the range 1-9 whose product == 4 with an approach that uses SQL 02:05
llfourn thinks that there should be a way to use junctions 02:10
02:17 noganex joined
gtodd ... y 02:19
es
llfourn are you allowed duplicate numbers?
i mean it's impossible without them like, [4,1,1] 02:20
02:20 noganex_ left
lizmat llfourn: if gtodd uses .pick, there will be no duplicates, aver 02:21
*ever
llfourn lizmat: yep so it will never work
lizmat if gtodd would use .roll, then yes, there could be duplicates
llfourn: that would be my assessment as well :-)
maybe gtodd meant 42 ? 02:22
_sri is Crust not installable with panda yet? 02:26
or is my rakudo installation just borked?
lizmat well, could be, I have seen some reports earlier today
atm I'm more focussing on getting the install module fiunctionality working for the future 02:27
_sri allright, what module should absolutely be installable that i can use to test?
lizmat Slang::Tuxic ? 02:29
_sri look at that, it installs
thanks
lizmat yw
_sri too bad, i wanted to do some testing with Crust 02:30
02:34 n0tjack left
_sri oh my, lots of failing tests in the dependencies too 02:34
lizmat we're in a fragile phase wrt to installing modules at the moment... 02:35
02:35 adhoc_ joined
lizmat working hard to get this a. thought out well, b. get it ready before xmas (we won't make the next compiler release for that, I don;t think) 02:36
02:37 gtodd left, gtodd joined 02:40 llfourn left 02:42 llfourn joined 02:43 bjz left 02:45 bjz joined, bjz left 02:48 tokuhirom joined
lizmat sleep again& 02:48
02:49 bjz joined 02:53 tokuhirom left, araujo left 02:54 bjz left 02:55 bjz joined, araujo joined, araujo left, araujo joined
uruwi ho, my mouse is broken 02:56
(the scroll wheel)
02:59 llfourn left
japhb .tell timotimo I see in the backlog some complaints that perl6-bench is broken, but I'm not entirely clear how, given that you did post benchmark results -- and I don't see any new commits in the repo, either. 03:12
yoleaux japhb: I'll pass your message to timotimo.
japhb .ask timotimo What's the actual problem, and do you still need help? 03:13
yoleaux japhb: I'll pass your message to timotimo.
japhb That was slow, yoleaux.
timotimo hey japhb
yoleaux 03:12Z <japhb> timotimo: I see in the backlog some complaints that perl6-bench is broken, but I'm not entirely clear how, given that you did post benchmark results -- and I don't see any new commits in the repo, either.
03:13Z <japhb> timotimo: What's the actual problem, and do you still need help?
timotimo one problem was the regex that removes the beginning of the path from the component string wasn't interpolating that path
japhb Up at the crack of dawn, timotimo
?
timotimo another problem was many .push had to be replaced with .append
japhb timotimo: That's ... goofy.
In the tests, or in the bench code? 03:14
timotimo in the bench code
actually in the "bench" file :)
japhb OK, fair enough.
timotimo though perhaps "pushme" wants to get append instead of push for newer rakudos?
not sure.
japhb If you've got it all working, can you push your fixes?
timotimo someone just told me "you have a symptom of meningitis, go to the hospital RIGHT NOW"; that isn't helping me feel better at all
japhb Yeah, I'm thinking that some of the finer points of the GLR made some of the tests difficult to make work both before and after with the same work profile. 03:15
Oh dear
Well, go and get yourself healed!
timotimo i don't think i've slept a minute since i laid down
03:15 aborazmeh left
japhb That SUCKS. 03:15
Been there, hated that.
timotimo yeah, i'm looking up the earliest hour of my closest docs and i'll try to get an appointment 03:16
japhb nodnod
timotimo seems like docs open at 8am, which is in 3 hours 03:17
but there's an actual hospital nearby; i don't really know how this kind of thing works, but i suspect i can just go there and say "i may be in serious danger" and they'll be able to treat me soon-ish? 03:18
03:20 EricMobiel left 03:21 EricMobiel joined 03:23 Hotkeys joined, captain-adequate left, jojotus left
timotimo doc at the hospital says "if you suspect meningitis, go to the central hospital's neurology department ASAP" 03:24
03:24 captain-adequate joined 03:25 jojotus joined, Hotkeys left 03:28 Hotkeys joined 03:30 Hotkeys left, Hotkeys joined 03:34 Hotkeys left, Hotkeys joined 03:35 softmoth joined 03:39 softmoth left 03:43 n0tjack joined 03:48 n0tjack left 04:00 adhoc_ is now known as adhoc 04:04 xinming joined 04:16 vendethiel joined 04:28 khw left, Hotkeys left 04:29 Hotkeys joined, Hotkeys left, Hotkeys joined 04:34 Hotkeys left 04:35 Hotkeys joined 04:36 llfourn joined 04:37 Hotkeys left 04:49 tokuhirom joined 04:51 vendethiel left 04:54 tokuhirom left 04:57 xvcds joined 04:59 finanalyst joined 05:00 telex left 05:02 telex joined, Hotkeys joined 05:06 adu joined 05:09 atta left, skids left
japhb hopes timotimo is getting taken care of ... 05:15
nine Wow...just got up and timotimo's last message is the first I read. I hope it's really a false alarm 05:16
05:23 softmoth joined 05:27 softmoth left 05:33 cognominal joined 05:34 Kogurr left 05:37 cognominal left 05:39 atta joined 05:43 xfix joined 05:55 hohoho left 06:16 EricMobiel left, EricMobiel joined 06:17 jkva joined 06:18 diana_olhovik_ joined 06:19 cognominal joined 06:27 firstdayonthejob joined 06:30 jkva_ joined 06:32 hohoho joined, hohoho left, hohoho joined 06:33 jkva left 06:35 llfourn left
Hotkeys does anyone know if there is a package for perl 6 syntax/etc. for atom? 06:37
06:39 abraxxa joined
Hotkeys nevermind the perl 5 package also does perl 6 06:39
cognominal m: sub infix:<~~~>(Str(Cool) \s, Regex $r) is equiv(&infix:<~~>) { s ~~ / ^ $r $ /; $/ }; say ('a' ~~~ /$<a>=a/) 06:40
camelia rakudo-moar 271e84: OUTPUT«「a」␤»
06:41 tokuhirom joined 06:42 bjz left
cognominal This user defined operator anchors the match but loose the $<a> capture. What is the way to not loose it? 06:42
06:42 bjz joined, domm joined
cognominal I already have run in this problem in the past, don't remember the solution if any :( 06:43
m: sub infix:<~~~>(Str(Cool) \s, Regex $r) is equiv(&infix:<~~>) { s ~~ / ^ <$r> $ /; $/ }; say ('a' ~~~ /$<a>=a/) 06:44
camelia rakudo-moar 271e84: OUTPUT«「a」␤»
06:45 tokuhirom left 06:47 Ven joined 06:48 adu left
[Tux] test 50000 39.763 39.648 06:49
test-t 50000 40.812 40.698
06:54 Ven_ joined, Ven left 06:57 llfourn joined 06:58 Ven_ left
timotimo was a false alarm 07:05
no worries
Woodi hallo #perl6 :) 07:10
07:11 Ven joined, softmoth joined 07:14 FROGGS joined, larion left 07:15 softmoth left
Woodi few days ago I found little tutorial about "cleaning" Twitter pages apparence using Chrome extetensions written in JavaScript. and that make me feel scared or "outdated" even... so there is Twitter page and there are messgages there... That means HTTP is used as "messaging" protocol. AMQP or XMPP are just little, funny things :) 07:18
also, if HTTP is layer 7 protocol and browser are layer 7 apps then we have unoficial layer 8 there... 07:19
07:22 Ven_ joined, bjz_ joined, Ven left 07:23 n0xff left 07:24 bjz left 07:25 zakharyas joined, firstdayonthejob left 07:27 bjz joined 07:28 bjz_ left 07:33 TimToady left 07:35 TimToady joined
lizmat morning, #perl6! 07:35
moritz \o lizmat, * 07:36
lizmat I wonder whether ca25b0f98dcc7ebc95d125ab is causing the slowdown that [Tux] saw between yesterday and today
dalek c: 10d485d | (Lloyd Fournier)++ | / (9 files):
s/EnumMap/Map/
07:37
c: 559de0b | moritz++ | / (9 files):
Merge pull request #165 from LLFourn/master

s/EnumMap/Map/
07:39 jax left 07:40 ely-se joined 07:42 n0tjack joined, DrForr joined 07:45 CIAvash joined, larion joined, rurban joined 07:46 n0tjack left 07:49 leont joined 08:04 s_kilk joined 08:05 anaeem1 joined, anaeem1 left 08:06 pyrimidi_ joined 08:07 jsnathan left 08:08 pyrimidine left 08:09 iv_ is now known as iv 08:10 darutoko joined 08:11 Alina-malina left
Ven_ > game.player.creatures ~= game.fight.creature; 08:12
lizmat [Tux]: I don't really have a smoking gun between yesterday and today :-(
Ven_ whoops 08:13
08:15 s_kilk left
timotimo nine: courtesy highlight; doc says it's not dangerous, the thing i have 08:17
lizmat timotimo++ # taking care of himself
timotimo easier to do in germany than it is in the US of A :) 08:18
i also won't get an invoice over multiple thousand moneys
lizmat
.oO( but with fewer plot twists )
Breaking Bad in DE: teacher finds out he has cancer: he gets treated: everybody lives happily ever after 08:19
timotimo and now i'll see if i can get a bit of sleep
lizmat good sleep, timotimo!
DrForr I'm still a little boggled that I can spend 2 weeks in two Spanish hospitals, have two fairly major surgeries and just walk out with my wallet intact.
08:19 leont left
ely-se Why? 08:22
DrForr iggerant American :)
timotimo and the doctors that treated me were all super nice to me, too :)
ely-se oh :P
timotimo i remember a picture that details the story of how you could break your hip, fly to spain (or whatever), get it treated, spend a year on holiday there, break your hip again, get it treated again, fly back to america and still pay less than you would in an american hospital 08:23
2static.fjcdn.com/pictures/Vamonos+...607755.jpg - this thing, i think 08:24
ely-se I heard a full health insurance is like 2000 USD/month in the US, whereas here it's less than 100 EUR/month and people still complain.
timotimo and then there's the whole "dental plan" stuff, too 08:25
anyway, i'll suspend my computer
see you in the afternoon!
ely-se goodbye timotimo 08:26
timotimo i won't be gone for good! :)
ely-se good! 08:27
DrForr timotimo: Having done exactly that (minus the flying) I can sympathize.
08:27 CJKinni_ left 08:29 Ven_ left 08:31 margeas joined 08:35 jsnathan joined
lizmat afk for a few hours& 08:37
08:40 tokuhirom joined 08:42 dakkar joined
Woodi ely-se: look health insurance is a lottery ;) so meybe reverse things: if I get sick they pay doctors and then I, monthly, pay them ? :) 08:44
08:44 tokuhirom left 08:46 jsnathan left, jsnathan joined
ely-se Woodi: then you'd have to pay gambling tax on top of it. 08:47
08:50 Ven joined 08:54 jsnathan1 joined 08:55 jsnathan left 08:57 jsnathan1 left
Woodi ely-se: pretty sure it is included :) [+] @company-employee-payments < [+] @company-employees-mandatory-insurances in here... 08:57
08:58 RabidGravy joined
ely-se health insurance is required here 08:59
Woodi ely-se: +1 anyway :)
ely-se m: [+]
camelia ( no output )
08:59 softmoth joined
ely-se m: say [+] 08:59
camelia rakudo-moar 271e84: OUTPUT«0␤»
ely-se nice
09:03 llfourn left 09:04 softmoth left
masak good antenoon, #perl6 09:10
ely-se: operators know their own unit.
m: say [*]
camelia rakudo-moar 271e84: OUTPUT«1␤»
masak m: say [&&] 09:11
camelia rakudo-moar 271e84: OUTPUT«True␤»
masak m: say [min]
camelia rakudo-moar 271e84: OUTPUT«Inf␤»
masak m: say [^^]
camelia rakudo-moar 271e84: OUTPUT«False␤»
masak m: say [~|]
camelia rakudo-moar 271e84: OUTPUT«␤»
masak m: say [~&]
camelia rakudo-moar 271e84: OUTPUT«No zero-arg meaning for infix:<~&>␤ in block <unit> at /tmp/WLNtCbna5K:1␤␤Actually thrown at:␤ in block <unit> at /tmp/WLNtCbna5K:1␤␤»
ely-se what is ~|? 09:12
masak m: say "ABC" ~| "DDD"
camelia rakudo-moar 271e84: OUTPUT«EFG␤»
masak it does bitwise or on codepoints
ely-se :( 09:13
masak well, you asked
FROGGS ~| clearly does something... but nobody was able to show me its use actually 09:14
ely-se Is it an operator composed from two operators ~ and |?
Or is it an actual separate operator?
FROGGS no, it is a single operator implementation wise
ely-se why ;_;
FROGGS but meaning wise it is ~ for 'string' and | for '-wise or' 09:15
like ^| is bitwise or
ohh no
+| numeric (bitwise) or 09:16
Timbus i saw it once used to apply a strange cipher thingy on a string
FROGGS ^| is about junctions
Timbus not in perl6, but in php
;/
FROGGS hmmm, so there could be a use for it... nice
masak it's not a very common operator, for sure
ShimmerFairy ~| and friends are really more sensible on buffers. I really can't imagine them being useful on high-level strings, without wanting a lower-level buffer type for other things already.
masak but less useless than ?| and ?& ;) 09:17
09:17 ponzellus joined
ShimmerFairy After all, if you're using ~|, ~&, or ~^, then you're ultimately caring about the numbers underlying a string (be it codepoints or UTF-8 encoding bytes or whatever), so you're already thinking about the data in a buffer-like fashion, not a string-like fashion. 09:18
FROGGS aye
masak aye
09:19 espadrine joined
ShimmerFairy so really, the buffer bitwise ops should die on strings, and be defined on Blob as its most basic sensible type :) 09:19
FROGGS hmmm 09:21
I'm not a fan of forbidding things that do not seem to make sense
masak same
ShimmerFairy FROGGS: well, when I wrote my S32::Stringy draft, I did lay out some possibilities if people absolutely insisted on bitwise ops for strings, but I think it's too high-level a type for it to make sense without requiring an explicit .encode 09:22
masak m: say "ABC".Buf ~| "DDD".Buf
camelia rakudo-moar 271e84: OUTPUT«Method 'Buf' not found for invocant of class 'Str'␤ in block <unit> at /tmp/jbOJ7kkh8j:1␤␤»
masak hrm
ShimmerFairy (like we do in other contexts one might expect a magical autoconversion to buffers)
m: say "ABC".encode ~| "DDD".encode
camelia rakudo-moar 271e84: OUTPUT«utf8:0x<45 46 47>␤»
masak m: say "ABC".encode ~| "DDD".encode
camelia rakudo-moar 271e84: OUTPUT«utf8:0x<45 46 47>␤»
FROGGS I mean, some of the inventive things would not be there if you limited the things they are grown out of
masak would it make sense to have .Buf as a synonym for .encode ? 09:23
FROGGS +1 I guess
ShimmerFairy masak: if so, it should be called .Blob, since that's the most generic role (just like you have .Numeric for the general numeric context)
FROGGS : say "ABC".encode.Str
09:23 adhoc left
FROGGS m: say "ABC".encode.Str 09:23
camelia rakudo-moar 271e84: OUTPUT«ABC␤»
FROGGS the pendant is there
masak I'm fine if it's called .Blob, but .Buf was what I reached for as an uninitiated user :) 09:24
FROGGS ShimmerFairy: then again you have .Int delegate to .Numeric or so
ShimmerFairy Sure, I'm not saying .Buf couldn't be allowed, just that the generic name would be .Blob :)
09:25 llfourn joined, adhoc joined
jnthn morning, #perl6 09:25
yoleaux 14 Oct 2015 21:12Z <lizmat> jnthn: couldn't we just not put a $no-sink in IterationBuffer.push ?
FROGGS about forbidding things that we think are not sensible or so... lizmat wants to disallow CURLI for production uses to she is against implementing .install on CURLI 09:26
and I say that there will be or are scenarios where that is very very valid to do
morning jnthn
so, let's not be restricted like, say, Python (not that I have no clue about Python, so, sorry Python) 09:27
jnthn .tell lizmat Thing is that we aren't promised to have an IterationBuffer, but *something* you can .push to...
yoleaux jnthn: I'll pass your message to lizmat.
masak jnthn: morning!
ShimmerFairy FROGGS: I still think _bit_wise ops on strings are nonsensical. How should synthetics interact with it, for example? What if you meant to base your operations in a particular encoding? 09:28
m: say "_" ~| "¥"
camelia rakudo-moar 271e84: OUTPUT«ÿ␤»
ShimmerFairy m: say "_̈" ~| "¥"
camelia rakudo-moar 271e84: OUTPUT«_̈␤»
FROGGS ShimmerFairy: I can't give you an example of its usefulness right now
ShimmerFairy with that "underscore with umlaut" synthetic, is that the right output, no change? Should it be different? Should it be just on the base char, on each char individually, something else? 09:29
09:29 Psyche^ joined, Psyche^_ left
ShimmerFairy FROGGS: unless you can convince me that bitwise ops aren't inherently low-level, and that they thus aren't at odds with strings' high-level nature, I'll still say string-based bitwise ops are useless :) 09:29
09:30 adhoc left
FROGGS ShimmerFairy: I don't deny that 09:31
ShimmerFairy: I just don't want them to be disallow because I *think* they are useless
ShimmerFairy points out that S03 has always said that the coercion of strings to a "non-variable-encoding" buffer type "probably indicates a design error, however"
09:31 adhoc joined, ponzellus left
ShimmerFairy FROGGS: I get that; masak's one time wanting certain arithmetic ops on DateTime comes to mind. But unlike that situation, I can't fathom a possible use case. 09:31
09:32 bigrattus left, rotcpy left
ShimmerFairy FROGGS: To me, your suggestion to keep allowing bitwise ops on strings is like defining infix:«<» on Complex numbers, just because someone might possibly find a use for it. I can't see a really sensible definition of infix:«<» for Complex numbers, nor can I bitwise ops for strings :) 09:33
FROGGS yes, being unsure of the result is another thing
09:35 llfourn left, gonz_ left
masak ShimmerFairy: it was infix:<**> on Instant 09:35
ShimmerFairy What I find particularly unfortunate is that we don't have a dedicated symbol for "buffer" distinct from our ~ for strings. I'd change the buffer bitwise ops' spellings in a heartbeat if there was such a symbol.
masak ShimmerFairy: I was taking the standard deviation of a bunch of timings 09:36
ShimmerFairy masak: yes, I faintly recall it was about statistics calculations :)
09:37 TEttinger left
masak I don't foresee myself being a heavy user of ~| on any data type... but as far as I'm concerned, I'm fine with them staying on Str. 09:38
when TimToady materializes, he will tell you that string literals are probably a little allomorphic anyway. :) 09:39
09:39 breinbaas left
Ulti ShimmerFairy: something like this is why bit wise operations on strings are not nonsensical en.wikipedia.org/wiki/Bitap_algorithm 09:40
jnthn I think they're only probably going to see much use in the ASCII range :)
Ven ~|, uh?
ShimmerFairy masak: A bit of déjà vu here, but I don't think we can (or should) distinguish literals like that, certainly not in behavior. :) 09:42
jnthn FROGGS: (disallow CURLI) did you mean CURLF? :)
09:42 mattprelude joined
FROGGS jnthn: ohh, yes 09:42
Ulti though granted the concept of a string in the bitap algorithm is much more like a buf than a Str in Perl 6
ShimmerFairy Ulti: the pseudocode and especially C examples don't tell me that they're bitwise ops on high-level string types. The C idea of a string is really a Blob for us, yes :) 09:43
jnthn FROGGS: What's your particular use case?
masak ShimmerFairy: what jnthn said about mostly-ASCII.
09:43 ely-se left
FROGGS jnthn: for what? 09:43
jnthn FROGGS: (Or key use cases)
FROGGS: CURLF
ShimmerFairy jnthn, masak: I figure ASCII would be most common (as it almost always is for all kinds of string things), but if can't have a sensible definition on all strings, it should not be allowed. 09:44
FROGGS jnthn: CURLF is mostly about dev stuff I think, having not the need to install stuff to be able to use it
ShimmerFairy (And then you could have an ASCIIStr subtype in module space for people who desperately insist that I'm wrong ☺)
jnthn FROGGS: Right. It's for -Ilib
ShimmerFairy: It's defined just fine, afaik: the bitwise of the codepoints. 09:45
FROGGS jnthn: I can also -Ilib a CURLI
Ulti ShimmerFairy well the definition is always sensible its something that operates on the string bytes at a time as binary data even non ASCII still tends to be byte aligned at least :S
09:45 gonz_ joined
ShimmerFairy jnthn: it didn't work when I turned the underscore into a synthetic with a combining umlaut, though. 09:45
09:46 breinbaas joined
Ulti why not just always have promotion/demotion to a blob if someone does binary ops on a string? 09:46
ShimmerFairy Ulti: that's the fundamental issue: in Perl 6, there is no definite encoding of the string until you convert it to a buffer via .encode .
jnthn ShimmerFairy: "Didn't work" in what sense? :)
ShimmerFairy jnthn: it didn't change, unlike the umlaut-less variant
09:47 ely-se joined
ShimmerFairy m: say "_" ~| "¥" 09:47
camelia rakudo-moar 271e84: OUTPUT«ÿ␤»
09:47 tokuhirom joined
ShimmerFairy m: say "_̈" ~| "¥" 09:47
camelia rakudo-moar 271e84: OUTPUT«_̈␤»
ShimmerFairy as a synthetic, it comes back untouched, which doesn't make sense to me on that "by codepoints" definition.
jnthn ShimmerFairy: Me either. Maybe the code didn't get an update :)
ShimmerFairy I would've expected at least ÿ̈, by that definition of bitwise or on strings :P 09:48
jnthn ShimmerFairy: Feel free to ticket it
FROGGS: How would you specify it? 09:49
FROGGS -Ifile:lib IIRC
err
-Iinst:lib
jnthn ok
So why do you want to be able to .install into a CURLF?
ShimmerFairy probably shouldn't ticket it, unless you want the ticket to be about how buffer bitwise ops on strings don't die :) 09:50
FROGGS because a CURLF has other properties which might fit my needs better...
jnthn ShimmerFairy: OK, then just ignore it.
FROGGS I can imagine installing my own middleware codebase to a CURLF but its deps to a CURLI
jnthn I'd rather ship with the bug than listen to you rant abou this topic further :P 09:51
FROGGS so I keep my codebase in git and just need to check it out on the test/dev/prod servers
09:51 tokuhirom left
FROGGS err, I don't install in this scenario, duh 09:51
jnthn FROGGS: If you just check it out why do you need a .install step at all?
FROGGS psst!
jnthn Right
:) 09:52
FROGGS I WILL MAKE UP A SCENARIO, RIGHT!
:P
jnthn Where I'm kinda going is breaking up the CompUnitRepo API over 3 roles (CompUnitRepo, which just knows how to locate a module, Installable that supports .install, and Precompiling which provides most of the precomp infrastructure) 09:53
So that decouples the notion of precomp and install at the API level
I hope that'll allow us enough flexibility for the various combinations of semantics.
FROGGS what I can imagine though is that, as currently, the dev/test/prod services run from the same CURLF repo, but are potentially different compiler versions... 09:54
09:54 llfourn joined
FROGGS then again, I might not need to .install, but sharing a CURLI sounds troublesome 09:54
so, I might want to .install to the used CURLI, when I have several repositories/dists it originates from 09:55
ShimmerFairy What I find frustrating is that when I mentioned why the buffer bitwise ops make more sense on buffers because you're always thinking on a buffer level with those ops, people agreed with me. The second I suggest actually codifying that by making buffer bitwise die on strings, I'm the only one in the world who sees buffers and strings that way :/
FROGGS grr, /used CURLF/
ShimmerFairy I don't know why people are always so opposed to the idea of a better separation between objects representing text, and objects representing how things such as text are specifically stored on a computer, a separation that makes people think more about what they're doing. 09:56
09:56 rotcpy joined
FROGGS ShimmerFairy: I think you are probably right 09:57
ShimmerFairy: if these stringwise ops cannot do the right thing on strings, but only on blobs, they should not be allowed to be used on strings 09:58
09:59 finanalyst left
masak I'm not yet convinced they *cannot* be made to be sane on strings. 10:00
also, ShimmerFairy, weren't you the one who complained some weeks ago about operators not returning the (container) type of the operands? well, that's what you have here, with strings :) 10:01
ShimmerFairy masak: I don't recall that, I'm not even sure what that complaint means :)
masak: closest thing I can think is that sub foo(Stringy ::STRING $a, STRING $b --> STRING) { } doesn't enforce that $a and $b are the exact same type, and that the returned value is guaranteed to be also of that exact same type, IIRC how that actually works 10:03
10:04 ely-se left 10:07 ely-se joined 10:09 n0tjack joined
ShimmerFairy masak: I did come up with some possible definitions of stringy bitwise ops for completeness' sake in my draft, in the event that everybody demands them for some reason. I believe I went by codepoint numbers, though I found ~< and ~> particularly weird (and useless for strings) 10:10
10:13 n0tjack left
ShimmerFairy masak: while there can be a definition on them that's encoding-independent (based on codepoint numbers), I don't think they'd be useful, nor would they do what they expect for everyone. Like I said earlier, those bitwise ops are inherently a buffer-ish thing when people try to use them. And we don't auto-convert strings to buffers in P6 :) 10:14
FROGGS m: say "foo" ~> 1
camelia rakudo-moar 271e84: OUTPUT«infix:«~>» not yet implemented. Sorry. ␤ in block <unit> at /tmp/i31G0sovBm:1␤␤»
FROGGS what would be the result? "fo"?
ShimmerFairy FROGGS: I came up with three possibilities, let me see... 10:15
FROGGS my example could be handy...
I can't think of anything else 10:16
ShimmerFairy m: say "foo".chop; say "foo".encode('ascii').list.map( {($_ +> 1).chr} ).join; say "foo".encode('ascii').list.map( {($_ + 1).chr} ).join 10:18
camelia rakudo-moar 271e84: OUTPUT«fo␤377␤gpp␤»
ShimmerFairy FROGGS: I thought of either 1) chop, 2) shift individual codepoints, or 3) add/subtract individual codepoints (the oddball idea, think of "shifting" through a unicode chart or something) 10:19
FROGGS: oh, but the "chop" idea would probably have to pad on the left, since right shift technically pads integers on the left with 0s (not doing sign preservation) 10:21
(and inverse for left shift, of course)
FROGGS hmmm, since this would be something high level on strings I would not mind if it didnt pad on the left 10:22
left shift would put whitespace on the right... 10:23
:o)
ShimmerFairy FROGGS: I guess it depends on what people expect from variable-width integers (aka bigints)
10:23 EricMobiel left
FROGGS though, having the same op (~>) on strings and on bufs when they do two totally different things is also a nogo 10:23
ShimmerFairy m: say Buf.new(1,2,3) ~> 1
camelia rakudo-moar 271e84: OUTPUT«Cannot call infix:«~>»(Buf, Int); none of these signatures match:␤ (Str:D \a, Int:D \b --> Str:D)␤ (str $a, int $b)␤ in block <unit> at /tmp/PIDxFY9unS:1␤␤»
ShimmerFairy FROGGS: Currently they aren't defined on buffers, probably a mistake. My initial idea was to shift the individual bits in the buffer (since S03 compares buffer bitwise to the integer bitwise ops), but I'd also be fine with an element-based shift 10:25
FROGGS yeah, might make sense to define them on blobs only..
10:26 Ven left
FROGGS mixing strings and blobs/bufs was a mistake we did not want to re-do anyway 10:26
ShimmerFairy FROGGS: and while I don't think "if some of the ops don't make sense, then none of them do" would be a very convincing argument, I can't help but think the special uselessness of ~< and ~> for strings is a pointer to my opinion on these buffer bitwise ops :)
FROGGS aye 10:27
consistency and all taht
10:28 ely-se left
ShimmerFairy the "element-based" idea, if transplanted to strings, would only really be useful if you applied :rotate, and even then I can't help but think that would just be a non-indicative "clever trick" 10:28
m: say 43 +> 1 :rotate; # though apparently that adverb is NYI 10:29
camelia rakudo-moar 271e84: OUTPUT«Unexpected named parameter 'rotate' passed␤ in block <unit> at /tmp/Rl8wf9DNl4:1␤␤»
ShimmerFairy for the shifts in general, I mean :) 10:30
10:35 llfourn left, rindolf joined
ShimmerFairy er, I really should've said "would be redundant unless you applied :rotate", which is taking into consideration things like .chop and .substr 10:42
10:45 llfourn joined, ely-se joined 10:48 softmoth joined 10:50 yakudza left 10:51 weihan joined 10:52 softmoth left
pink_mist is there an idiomatic way to get an infinite supply of shuffled values from a range where once every value in the range has been returned, it then reshuffles and gives a new order for the range, while at the same time ensuring that within the range, no value is returned twice? 10:58
(if that makes sense?)
moritz m: my @feed = flat( <a b c>.pick(*) xx * ); say @feed[^9] 10:59
jnthn m: say ((^10).pick xx *)[^10] 11:00
camelia rakudo-moar 271e84: OUTPUT«(timeout)»
rakudo-moar 271e84: OUTPUT«(6 7 7 5 2 1 0 9 6 5)␤»
jnthn m: say ((^10).pick(*) xx *)[^10] # d'oh
camelia rakudo-moar 271e84: OUTPUT«This Seq has already been iterated, and its values consumed␤ in block <unit> at /tmp/1FgpbvrJo7:1␤␤»
jnthn uh...
moritz m: my \feed = flat( <a b c>.pick(*) xx * ); say feed[^9]
camelia rakudo-moar 271e84: OUTPUT«(b c a c b a b c a)␤»
jnthn moritz++
pink_mist nice! =) 11:01
thanks moritz++
11:04 Alina-malina joined 11:11 ely-se left 11:13 Ven joined 11:15 apotheon left
vytas Does Perl6 have Perl5 like coroutines [ Coro ] ? 11:15
jnthn vytas: gather/take is coroutine-powerful, and await basically is too 11:17
(Don't confuse either with various language's generator functions or .Net's async/await, both of which are routine-local CPS transforms; the Perl 6 gather/take can have the "take" happen as many frames deep as you wish) 11:18
11:20 brrt joined
dalek c: 9061364 | (Lloyd Fournier)++ | doc/ (2 files):
document Attribute traits 'rw' and 'required'
11:25
vytas thanks 11:27
chenryn_ no doc about gather/take? 11:29
moritz in the design docs
user-level docs very welcome
llfourn chenryn_: docs.perl6.org/language/control#gather%2Ftake 11:30
doh. There isn't actually anything there sorry lol
chenryn_ llfourn: your link show nothing now.
~~ 11:31
11:35 jkva joined
ShimmerFairy m: say ?($_ ~~ /^. <|s>/) for " ", " b", "a ", "ab" # this should come out as (False, True, True, False) , right? 11:36
camelia rakudo-moar 271e84: OUTPUT«True␤True␤True␤True␤»
11:37 jkva_ left, kid51 joined
psch m: say ?($_ ~~ /^. <wb> /) for " ", " b", "a ", "ab" 11:41
camelia rakudo-moar 271e84: OUTPUT«False␤True␤True␤False␤»
11:42 margeas left
psch m: say ?($_ ~~ /^. <!wb> /) for " ", " b", "a ", "ab" 11:42
camelia rakudo-moar 271e84: OUTPUT«True␤False␤False␤True␤»
psch m: say ?($_ ~~ /^. <|w> /) for " ", " b", "a ", "ab"
camelia rakudo-moar 271e84: OUTPUT«False␤True␤True␤False␤»
psch m: say ?($_ ~~ /^. <|h> /) for "\t ", "\tb", "a\t", "ab" 11:44
camelia rakudo-moar 271e84: OUTPUT«True␤True␤True␤True␤»
psch well, something about <| > is definitely amiss
11:44 apotheon joined, WizJin left
ShimmerFairy psch: my suspicion is that it's only implemented for the specific examples in S05 (and maybe it's always true on others as a lazy way of doing <|g>) 11:46
11:46 kid51 left
psch ShimmerFairy: but <|h> is an example in S05 11:47
ShimmerFairy: oh, but it's not the "example list" as code, so yeah, maybe
ShimmerFairy psch: it's not in the code block, so I imagine a quick browsing would've only caught... yeah, what you said :) 11:48
11:48 Ven left, tokuhirom joined 11:49 WizJin joined
dalek c: a271ba5 | moritz++ | doc/Language/control.pod:
Add some basic gather/take docs
11:50
psch ShimmerFairy: nqp/src/QRegex/P6Regex/Actions.nqp:504
ShimmerFairy: only <|c> and <|w> are implemented at all
ShimmerFairy <|c> looks outdated, btw. <|g> would be useful once we have non-NFG modes for regex 11:52
llfourn moritz++ (slight typo on line 349 s/withint/within/)
11:53 tokuhirom left
ShimmerFairy psch: fwiw, my interpretation of <|...> is that it should work on any rule (like any other assertion), and on any backslash-able sequence 11:53
11:53 ely-se joined
ShimmerFairy (whether that means stuff like <!h> or <-d> is supposed to work too, I can't say) 11:54
11:55 rurban left, weihan_ joined 11:56 weihan left, Ven joined
psch ShimmerFairy: <| > is the only one that says "You can refer to backslash sequences with this syntax" 11:57
ShimmerFairy: it doesn't exclude all the other kinds of saying "this contains what i want to match", though
ShimmerFairy: so i take that as <| &foo> should work, but <!h> doesn't imply backslash sequence 11:58
dalek c: a42fc61 | moritz++ | doc/Language/control.pod:
Fix typo, llfourn++
11:59 spider-mario joined 12:02 bjz left 12:03 bjz joined
gfldex m: my constant @a := map { .chr.chars }, 1..33500; [max] @a; 12:04
camelia rakudo-moar 271e84: OUTPUT«(signal SEGV)»
gfldex masak: could you apply your superior golf skills to the example above please?
12:04 hohoho left 12:05 diana_olhovik_ left
psch m: my constant @a := map { .chr.chars }, 1..(2**15 - 1); [max] @a; 12:05
camelia ( no output )
psch gfldex: you found a magic number :)
m: my constant @a := map { .chr.chars }, 1..(2**15); [max] @a; 12:06
camelia ( no output )
psch m: my constant @a := map { .chr.chars }, 1..(2**15 + 1); [max] @a;
camelia rakudo-moar 271e84: OUTPUT«(signal SEGV)»
ely-se LOL
gfldex i would say it's black magic :)
jnthn That's already RT'd afaik
ely-se retweeted?
12:06 chenryn_ left
ilmari m: my constant @a := 1..(2**15 + 1); [max] @a 12:07
camelia rakudo-moar 271e84: OUTPUT«(signal SEGV)»
jnthn m: my constant @a := 1..(2**15 + 2); [max] @a
camelia rakudo-moar 271e84: OUTPUT«(signal SEGV)»
psch m: my constant @a := 1..(2**15 + 1);
camelia ( no output )
jnthn m: my constant @a := 1..(2**15 + 5); [max] @a
camelia rakudo-moar 271e84: OUTPUT«(signal SEGV)»
jnthn m: my constant @a := 1..(2**16); [max] @a
camelia rakudo-moar 271e84: OUTPUT«Too many arguments in flattening array.␤ in block <unit> at /tmp/E9U0WYXusf:1␤␤»
psch m: [max] 1..(2 ** 15 + 2)
camelia rakudo-moar 271e84: OUTPUT«(signal SEGV)»
psch j: [max] 1..(2 ** 15 + 2)
camelia ( no output )
psch jvm++ :P 12:08
jnthn guesses there's an off-by-something somewhere such that we don't throw that error eagerly enough
masak m: [max] 1..(2**15 + 1)
camelia rakudo-moar 271e84: OUTPUT«(signal SEGV)»
masak m: [max] 2**15..(2**15 + 1)
camelia ( no output )
masak m: [max] 1..(2**15 + 1)
camelia rakudo-moar 271e84: OUTPUT«(signal SEGV)»
masak m: [max] 2..(2**15 + 1)
12:08 larion left
camelia ( no output ) 12:08
masak m: 1..(2**15 + 1)
camelia rakudo-moar 271e84: OUTPUT«WARNINGS:␤Useless use of ".." in expression "1..(2**15 + 1)" in sink context (line 1)␤»
masak m: [min] 1..(2**15 + 1)
camelia rakudo-moar 271e84: OUTPUT«(signal SEGV)»
jnthn m: sub f(*@x) { } f |(1..(2**15 + 1))
camelia rakudo-moar 271e84: OUTPUT«5===SORRY!5=== Error while compiling /tmp/D4MIyaZ_3T␤Strange text after block (missing semicolon or comma?)␤at /tmp/D4MIyaZ_3T:1␤------> 3sub f(*@x) { }7⏏5 f |(1..(2**15 + 1))␤ expecting any of:␤ infix␤ infix stopper…»
jnthn m: sub f(*@x) { }; f |(1..(2**15 + 1)) 12:09
camelia rakudo-moar 271e84: OUTPUT«(signal SEGV)»
jnthn There's the golf
As I said, already in rT
*RT
12:09 rarara left, diana_olhovik_ joined 12:12 CIAvash left 12:14 rotcpy left
jdv79 the current Pod::Coverage report is easy: < 1% 12:17
moritz there'll be a google summer of code 2016 12:18
I wonder if we should apply.
(and who would do the application) 12:19
12:20 Suzeanne joined 12:22 jkva_ joined 12:23 jkva left
dalek kudo/nom: e1890f4 | lizmat++ | src/core/Supply.pm:
Add :control, :status, :bleed to Supply.throttle

  :control indicates a Supply that can be used to send control messages
to the throttler. Supported control messages are:
   limit => N # set new number of elements per time unit limit
   bleed => N # emit maximally N values to the :bleed supply
   status => x # send status to :status supply
  :bleed supply to which elements will be emitted with "bleed" control
  :status supply to which a status hash will be emitted for "status" control
12:30
ast: 73a2182 | lizmat++ | S17-supply/throttle.t:
Initial test of :control message
12:31
12:32 s_kilk joined
lizmat afk for the rest of the day& 12:35
yoleaux 09:27Z <jnthn> lizmat: Thing is that we aren't promised to have an IterationBuffer, but *something* you can .push to...
12:36 softmoth joined, n0tjack joined
psch hm, i appear to have had the jvm-SC problem the wrong way around 12:36
the Attribute.^compose call repossesses Attribute to CORE 12:37
and *that* causes the breakage
not the fact that the classHandle is from BOOTSTRAP - that's apparently fine
FROGGS hmmmm 12:40
interesting
12:40 softmoth left, bjz left, bjz_ joined 12:41 n0tjack left
psch i'm building with disabling the scwb around the compose call right now... 12:41
the other approach would be ensuring we reposses at every compose, which we currently apparently don't 12:42
otherwise the classHandle would be owned by CORE
12:44 jkva joined 12:46 jkva_ left
psch yeah, wrapping Attribute.^compose in scwb{dis,en}able compiles 12:46
12:47 gtodd left
psch but that's still the wrong kind of solution, isn't it? 12:47
as in, every class that gets composed in CORE should have the CORE SC, and that should be pretty much every class, except maybe BOOTSTRAPATTR
RabidGravy does anyone here use blogger and has successfully embedded a gist into a post? It just isn't working for me at all
12:49 sufrostico joined
psch kinda wishes to be more comfortable around moar and gdb, to see if Attribute on moar has an SC that points at CORE.setting... 12:49
although i don't even know what an SC looks like on moar and if it even knows which file it's from... :s 12:50
12:51 s_kilk left
jdv79 is there a way to install a module and its deps temporarily? 12:55
or install and uninstall or install into a seperate CUR or something along those lines?
12:55 ofzyh__ joined
jdv79 can't parse objects starting in p yet - that's not ambiguous or anything 12:56
what is this magic "p"? 12:57
12:58 ofzyh_ left 13:05 hohoho joined 13:08 sufrostico left, sufrostico joined 13:09 hohoho left 13:13 hohoho joined, hohoho_ joined, hohoho left 13:14 sufrostico left, ely-se left, rurban joined 13:16 ely-se joined 13:18 ecocode joined 13:21 skids joined, Ven left 13:23 weihan_ left
hohoho_ m: class P { }; class C is P { }; P.^add_method('hello', method () { say "hello"; }); C.new.hello; 13:25
camelia rakudo-moar 271e84: OUTPUT«Method 'hello' not found for invocant of class 'C'␤ in block <unit> at /tmp/ObSOG4gUtu:1␤␤»
hohoho_ hmm
Why i can't call the method?
jnthn hohoho_: You'd need to re-compose P, and for now also C
hohoho_ hm 13:26
how do i re-compose these classes?
jnthn (Because classes don't track their subclasses, so can't notify them to clear their caches)
.^compose
hohoho_ i see
thanks!
psch m: class P { }; class C is P { }; P.^add_method('hello', method () { say "hello"; }); C.^compose; P.^compose; C.new.hello;
camelia rakudo-moar 271e84: OUTPUT«hello␤»
psch err, order up for debate :)
m: class P { }; class C is P { }; P.^add_method('hello', method () { say "hello"; }); C.^compose; C.new.hello; 13:27
camelia rakudo-moar 271e84: OUTPUT«hello␤»
psch ^ that wouldn't have it in P afaiu?
m: class P { }; class C is P { }; P.^add_method('hello', method () { say "hello"; }); C.^compose; C.new.hello; P.new.hello
camelia rakudo-moar 271e84: OUTPUT«hello␤hello␤»
psch oh
uhm
jnthn psch: .^add_method at present does force local cache invalidation
psch: That may not always be the case.
psch jnthn: ah, i see 13:28
jnthn You'll also slow down every method call on instnaces of P if you don't re-compose it.
Probably by a factor of 10-100
So there's some incentive to do so ;)
13:29 Woodi left 13:32 sufrostico joined 13:33 margeas joined 13:34 Shozan is now known as SHODAN 13:36 ely-se left 13:39 sufrostico left 13:40 ely-se joined
RabidGravy solved the blogger/gist thing - the "Dynamic View" templates don't play nicely with embedded javascript 13:41
ely-se Is the Perl 6 to JS compiler thing still a thing? If so, how does it deal with continuations? 13:42
13:44 pmurias joined
pmurias ely-se: hi, I'm still working on it 13:44
ely-se: it doesn't support continuations
ely-se :'( 13:45
13:47 ely-se left
masak .oO( ragequit ) :P 13:49
13:49 sufrostico joined
FROGGS I was about to say that pmurias should run after him/her to excuse :o) 13:49
13:50 tokuhirom joined
FROGGS .oO( Ohh noes! Don't leave crying! ) 13:50
psch hrm
brrt thinks continuations are overrated
psch so i've added a bit of debug output to see what scwbObject actually does
FROGGS and?
psch and that gives me an NPE during CORE compilation
FROGGS / NYI ? 13:51
err
'// NYI ?
hmpf
psch FROGGS: // in nqp-j backend code? :)
FROGGS psch: aye :o)
psch FROGGS: that's a comment :P
FROGGS we be fun to spot that :o)
psch well, i keep adding null checks... 13:52
13:52 llfourn left 13:54 tokuhirom left
awwaiid pmurias: how are you doing said js backend? 13:55
13:57 llfourn joined
[Coke] awwaiid: you can see the WIP in nqp. 13:57
colomon is interested to see that in spec, TrigBase has changed significantly sometime in the last few years, but it is not present in Rakudo at all. 14:00
colomon is looking at design.perl6.org/S32/Numeric.html#T..._functions 14:02
awwaiid [Coke]: er... I don't know where nqp "lives"
14:03 brrt left
jdv79 i'm with Zoffix on the docs situation - its pretty abysmal in the ecosystem 14:05
wonder how much of the reason is because gh doesn't support pod6
ShimmerFairy jdv79: I'm sure it's entirely because Pod6 has been neglected compared to other parts of Perl 6 (I've been trying to fix that as best as I can, though) 14:06
[Coke] awwaiid: github's perl6/nqp 14:07
14:07 ely-se joined
[Coke] I wouldn't say it's neglected. I'd say that most places can't figure out the difference between pod5 and pod6 and therefore displaying things becomes messy. 14:08
jdv79 ShimmerFairy: any progress? 14:09
ShimmerFairy jdv79: yeah, my current idea is that when I get table parsing sorted out, I'll feel OK making my work on a new parser public. That's because tables are the last Big Thing™ in terms of parsing for me :) 14:10
pmurias awwaiid: the code itself lives in src/vm/js
ShimmerFairy (there's also stuff concerning ambient blocks, declarator blocks, and so on, but all that's pretty minor compared to tables) 14:11
pmurias awwaiid: I'm taking QAST and turning it into js+source maps (mostly using a tree traversal)
jnthn wonders how much of the doc situation is also because plenty of folks would rather write their docs in Markdown than Pod6
jnthn has never written Pod6 docs for his modules, but gave them all a README.markdown 14:12
awwaiid thanks pmurias. Mostly I'm just curious
jdv79 well, a single readme isn't "CPAN" quality
DrForr m: 2+(1/5).WHAT
camelia rakudo-moar 271e84: OUTPUT«WARNINGS:␤Useless use of "+" in expression "2+(1/5).WHAT" in sink context (line 1)␤Invocant requires an instance of type Rat, but a type object was passed. Did you forget a .new?␤ in block <unit> at /tmp/DxlT4sEdoN:1␤␤»
DrForr m: (2+(1/5)).WHAT
camelia ( no output )
14:12 Ven joined 14:13 n0tjack joined
ShimmerFairy jnthn: I've lamented the preference of markdown over making Pod6 work better before :) 14:13
jdv79 why don't we support markdown better then?
14:13 softmoth joined
awwaiid I didn't realize nqp was a separate repo; thought it was either part of rakudo or the vms. interesting 14:13
pmurias awwaiid: it's NQP only for this moment, it should support Rakudo (and be more interesting) in a few weeks
RabidGravy is there a markdown parser in the ecosystem?
ShimmerFairy jdv79: you can always substitute your own doc parser for processing inline documentation. Using a DOC INIT that parses markdown and then exits before the Pod parser has a go would work for perl6 --doc usage. 14:14
RabidGravy but I tend to document my modules in the same way that I document my Perl 5 modules on CPAN, with inline POD
jdv79 ditto
awwaiid pmurias: has anyone looked at cross-compiling moarvm itself? I've seen that work for other languages. 14:15
ShimmerFairy For having markdown mixed with code, you'd need to write a slang of some sort.
jdv79 ShimmerFairy: i don't know much about pod6 but that sounds second or third class
awwaiid oh. jit.
jdv79 perhaps it could be easier
ShimmerFairy jdv79: well, markdown is "second-class" in the same way Python or C++ code is; you can add in the support to use that language/markup instead, but it's not meant to be provided by core :) 14:16
pmurias awwaiid: you can turn off the jit for moarvm
ShimmerFairy Honestly, I think the biggest hurdle for Pod6 is that there aren't a lot of good tools. I wonder how difficult it is to add support to GitHub, now that I think of it...
pmurias awwaiid: re cross-compiling moarvm, it shouldn't be that hard but I haven't seen cross-compiled language interpreters be used for thing besides repls
jdv79 well, its pretty suboptimal to have to install a module and its runtimme deps to be able to render its pod 14:17
n0tjack what are the rules for action method unpacking of $/ ?
I want to set up multi subs for when a particular token exists or not, and have the compiler work out which to call with MMD 14:18
pmurias awwaiid: I don't plan to attempt to enscripten compile moarvm myself, as it seems to be really unfun work dealing with build systems (and other such disgusting things) for no real benefit
ShimmerFairy jdv79: you need to do that for POD in Perl 5 too (and rakudo comes with a basic Pod::To::Text, so that --doc has a default)
n0tjack m: grammar G { token TOP { <digit> <alpha> } }; class A { method TOP((:$digit, :$alpha)) { say $digit; say $alpha; } }; G.parse('1a', actions => A) 14:19
camelia rakudo-moar 271e84: OUTPUT«「1」␤「a」␤»
jdv79 ShimmerFairy: no you don't
n0tjack that works as a simple example, but I can't it to work "in real life" in my code
jdv79 i can render pod in a .pm without running it iirc
PerlJam n0tjack: maybe show the "real life"? 14:20
jdv79 i'm up against it a little with MetaCPAN but installing 400 dists isn't too bad but it will become more of a problem as that gets larger
ShimmerFairy jdv79: ah, that's what you meant. If you're using a dedicated tool for parsing pod, then sure. But if `perl` is the one that processes docs, then it's no different to what Perl 6 does
14:20 pat_js joined
jdv79 no, perl5 uses perldoc - seperate 14:20
ShimmerFairy jdv79: in terms of just processing files for documentation, I don't see why it should be different between Perl 5 and Perl6 -- you still need to get the files and process them. 14:21
[Tux] test 50000 37.935 37.821
test-t 50000 40.329 40.216
awwaiid pmurias: ahh. I was thinking of ocamljs and js_of_ocaml, but I just checked and neither work that (llvm->js) way; ocamljs translates the AST to js, js_of_ocaml translates the ocaml bytecode to js.
jdv79 in p5 i can just perldoc -F Foo.pm
[Tux] so reproducible the same as this morning
jdv79 in p6 i have to install it and then perl6 --doc it
that's a significant diff if you ask me
n0tjack multi method numeric-atom((:$val)) 14:22
multi method numeric-atom((:$val, :$alNUM))
#=> error: Cannot call numeric-atom(j-numeric-interpreter: Match); none of these signatures match:
jdv79 not a huge deal. just something that has to be dealt with differently
also, is it possible to do the p5 equiv of "perldoc Foo::Bar"? 14:24
well, the p6 equiv of that p5 example
14:25 khw joined
jdv79 which means show me the docs for that installed pkg 14:25
instead of supplying a path like perl6 --doc .../Foo/Bar.pm
ShimmerFairy jdv79: wha? perl6 --doc Foo.pm is the p6 equivalent. You don't need to "install" it, you just need to have the file. 14:26
n0tjack PerlJam: pasted above: I have a rule which can potentially but not alwys match two tokens. I want to handle the one-token an two-token cases separately.
PerlJam m: grammar G { token TOP { <digit> <alpha>? } }; class A { multi method TOP((:$digit)) { say "one token"; }; multi method TOP((:$digit, :$alpha)) { say "two tokens"; }; }; G.parse('1a', actions => A); G.parse('5', actions => A);
camelia rakudo-moar 271e84: OUTPUT«two tokens␤one token␤»
jdv79 but what if i want the docs on the installed on
*one 14:27
which is the normal use case in p5
perldoc DateTime
for instannce
PerlJam n0tjack: I think I'd need even more context to help debug whatever is going on in your code. But, my example shows that it works (At least as I expect :) 14:28
ShimmerFairy I think reading docs is the domain of p6doc . perl6 --doc is just for rendering the Pod6 in a file to some kind of output format (HTML, man page, etc.)
n0tjack PerlJam: yeah, learning to debug these things is part of my aim here. Was really asking where I should look to understand $/ unpacking. For example, it took me a while to notice the doubled parens in the method signature 14:29
jdv79 moritz: is that true? 14:30
the p6 equiv to perldoc DateTime is p6doc DateTime?
PerlJam jdv79: It should be IMHO. 14:31
14:31 FROGGS left
cognominal hi, I ask again my questionof this morning : 14:31
m: sub infix:<~~~>(Str(Cool) \s, Regex $r) is equiv(&infix:<~~>) { s ~~ / ^ $r $ /; $/ }; say ('a' ~~~ /$<a>=a/)
camelia rakudo-moar 271e84: OUTPUT«「a」␤»
n0tjack jdv79: I don't know if you're asking theoretically or practically, but practically speaking, p6doc produces nothing but errors on my system
cognominal This user defined operator anchors the match but loose the $<a> capture. What is the way to not loose it?
jdv79 so, looks like docs need some work:)
docs always come last - forgot that gem 14:32
ShimmerFairy jdv79: the --doc switch tells the compiler to process the file in a different, "DOC" mode. It just says "parse the file as Pod6, don't run $~MAIN language stuff (except for use statements and phasers prefixed with DOC), output the render result"
jdv79 i realize that's what it does. but tat's not what i want.
i want the tools people are used to
14:33 zoosha joined
jdv79 maybe there should be a mode where it looks at the CUR stuff 14:33
perl6doc maybe wraps that up 14:34
ShimmerFairy jdv79: yeah, for 'perldoc' the equivalent should (eventually) be p6doc
jdv79 perl6doc Foo::Bar
ok
ShimmerFairy imagines it's waiting for Pod::To::Man, among other things :P
jdv79 though perl6doc is a guessable name 14:35
w/e
yes, and the html module is not cool either
14:35 sufrostico left
PerlJam I want p6doc to be like perldoc only better. For instance, p6doc shouldn't require the -f, -q , -v, and -a switches to search for the equivalent p6 bits. They should be available to constrain the search perhaps, but p6doc should be smart(er) about how it looks for docs 14:36
n0tjack I want p6doc to have a NLP parser and a snarky attitude. "Didn't you ask me that last night? It's ~~, not ==. Sheesh." 14:37
PerlJam n0tjack: that would be available as a module to enhance p6doc, of course ;)
14:38 jkva left 14:39 jkva joined 14:40 TEttinger joined
masak PerlJam: +1 on optional flags but available for contraining 14:41
that sounds like it could be useful for both newcomers and more experienced users
PerlJam n0tjack: btw, unpacking the Match object is just like unpacking any other data structure, see the text starting at S06:1714
synbot6 Link: design.perl6.org/S06.html#line_1714
n0tjack PerlJam: Thanks! 14:42
[Coke] ShimmerFairy: it is very hard to get github to support pod6. There was a huge effort to make that happen at one point. 14:44
n0tjack ugh this is driving me nuts. Doesn't help that I've long since lost my proficiency in vim .
14:44 sufrostico joined
ShimmerFairy [Coke]: was there? Is there a link perchance? 14:44
[Coke] "irclogs"
ShimmerFairy oh, so it was never brought up with github? 14:45
[Coke] I think hoelzro was involved. github uses a 3rd party tool. getting support into that tool was challenging to write, difficult to get upstream, and then you had to convince github to use the newer version.
ShimmerFairy [Coke]: afaict, the biggest hurdle would be to get github to run Perl 6. Their parsing tool is apparently able to dispatch to, say, perl6 --doc=HTML file.pod6 14:46
[Coke] the third party tool didn't use perl6 to extract the docs. 14:47
and if we want perl6 pod to be usable in more places, forcing sites to run perl 6 to parse it isn't going to help. 14:48
ShimmerFairy Oh? That's odd, it should. (Since it apparently uses perl for Pod5)
[Coke] getting people to use p5 is a much lower bar than getting them to use p6. 14:49
anyway, talk to hoelzro. if it wasn't him, perhaps he remembers who it was.
I wasn't involved, I've just been sitting here in the corner longer than you have.
ShimmerFairy [Coke]: I'm personally of the opinion that running Perl 6 shouldn't be any more demanding of people than running Perl 5, but I of course get why it'll be hard to make happen until at least a while after Christmas :) 14:50
14:51 tokuhirom joined
[Coke] "good luck" 14:51
jonadab To do that, you have to get every OS distributor except Microsoft to ship a working p6 out of the box, pretty much.
14:51 sufrostico left
n0tjack ShimmerFairy: the playing field won't be even until a least a couple popular linux distros include p6 by default 14:51
So 2018 by the very earliest
PerlJam I'm pretty sure it was hoelzro, but that was when github was using pygments.
jdv79 maybe because there aren't pkgs out there yet and it changes so fast pkgers won't keep up 14:52
n0tjack probably more like 2020+
PerlJam I dunno if hoelzro did anything when github switched to linguist
ugexe jdv79 hit the nail on the head
n0tjack PerlJam: Well, I'm nto getting anywhere, and you asked for "even more context", so: gist.github.com/anonymous/396f416800ffb4693fec 14:53
ShimmerFairy Like I said, I've no delusions about how resistant people are to change. But I also think Perl 6 is no stranger to bootstrapping, so we'll figure it out :)
RabidGravy Fedora 22 has 2015.07 - I'm sure they'll catch up to .09 before long
n0tjack PerlJam: check out "method numeric-atom". I want to make it a multi. P6 does not.
ShimmerFairy anyway, ♘ P6 o/ :) 14:54
n0tjack what's that little horse?
.u ♘
yoleaux U+2658 WHITE CHESS KNIGHT [So] (♘)
[Coke] aka "good night, p6" 14:55
n0tjack haha
14:55 tokuhirom left
PerlJam n0tjack: random thought ... you renamed "decimal" as "val" and "alNUM" as "dig". In the sig you used "val" and "alNUM". Did you try "val" and "dig" / 14:56
?
n0tjack PerlJam: no, lemme try that 14:57
PerlJam doesn't remember when you do <foo=bar> if you get both a "foo" and "bar" keys in $/
n0tjack you do
nope, that doesn't seem to improve the situation 14:58
what's weird is I'm passing a simple '123' as the command line parameter 14:59
so $<alNUM> / $<dig> / $<xtnd> shouldn't come in to play
it should be simply $<val>
jdv79 what is the p6 equiv of "perl -MDateTime -e 'print $INC{"DateTime.pm"}'"
something CURish maybe?
15:00 ely-se left
ugexe ComUnitRepo::Local::File.candidates("DateTime")[0].Str or something 15:00
PerlJam yikes.
I'd hope it could be something simpler
ugexe you could use the short-ids 15:01
i think
n0tjack m: join "", ('0'..'9'),('A'..'Z');
camelia ( no output )
n0tjack m: join "", ('0'..'9'),('A'..'Z'); my @digits = map {$digits.index($_)}, $dig.com
camelia rakudo-moar 271e84: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hUlBUvRcsH␤Variable '$digits' is not declared. Did you mean '@digits'?␤at /tmp/hUlBUvRcsH:1␤------> 3'0'..'9'),('A'..'Z'); my @digits = map {7⏏5$digits.index($_)}, $dig.com␤»
n0tjack argh, paste fail 15:02
15:02 ely-se joined
ugexe @*INC.grep( { .starts-with("inst#") } ).map: { CompUnitRepo::Local::Installation.new(PARSE-INCLUDE-SPEC($_).[*-1]) }; 15:02
flat $.curlis.map: {.candidates($.name, :auth($.authority), :ver($version // '*')).grep(*)} 15:03
thats how the CURLI wrappers do it
bin wrappers
Ven m: my %a = a => 1, b => 2; say %a.invert{2};
camelia rakudo-moar 271e84: OUTPUT«Type Seq does not support associative indexing.␤ in block <unit> at /tmp/e3n5RnMKU2:1␤␤Actually thrown at:␤ in block <unit> at /tmp/e3n5RnMKU2:1␤␤»
Ven :[
PerlJam Ven: you can always turn the Seq into a Hash 15:04
m: my %a = a => 1, b => 2; say %a.invert.hash{2}
camelia rakudo-moar 271e84: OUTPUT«b␤»
Ven I'd expect the inverse of a hash to be a hash, though 15:05
15:05 rurban left 15:06 diana_olhovik_ left 15:07 spider-mario left
n0tjack Is it possible to write a proto which calls .made on all named parameters to a function, and also calls $/.make on the return value of any function? 15:10
I'd like to be able to express method foo((:$a, :$b)) { ($a, $b) = $a.made, $b.made; ... $/.make( $blah )} as method foo((:$a, :$b)) { ...; $blah;} 15:11
jdv79 so do we have an equiv to Task::Kensho? 15:12
there are 2 spots where metacpan points to it
Task::Star has no docs so that's lame for this
rindolf jdv79: hi, sup? 15:14
jdv79 not much
how's things with you?
15:16 FROGGS joined 15:17 risou is now known as risou_awy 15:18 ecocode left
PerlJam n0tjack: my guess right now is that none of the multis match because when you say <foo=bar> you get both foo and bar keys in the match. try <val=.decimal> to only get a val key in $/ 15:18
15:18 hohoho_ left 15:19 ely-se left
PerlJam (and i've realized there's bunches of details about P6 that I seem to have forgotten) 15:20
15:20 jkva left, risou_awy is now known as risou
pmurias jdv79: you are working on a metacpan for perl6? 15:21
n0tjack PerlJam: cool, lemme give that a shot
jdv79 yes
n0tjack PerlJam: that definite improved things. 15:22
s/definite/definitely/
pmurias jdv79: awesome, IMHO that's one of the most important things for Perl 6 right now 15:27
15:27 Ven left
uruwi test 15:28
n0tjack hmm, but now my calls to $/.make seem to not get passed back upstack
maybe I should prefix the $/ still
jdv79 what should the name be and the url?... 15:29
n0tjack PerlJam: Yes, so the answer is precisely that I have to suppress the extra hash keys with the ., as you say, but I also have to use the signature pattern method foo($/ (:$a, :$b)), with the explicit $/, or my .makes get swallowed 15:30
PerlJam++ # thanks
15:32 telex left 15:34 pmurias_ joined, telex joined
tony-o_ HTTP::Server::Async works with the GLR stuff now 15:36
15:37 pmurias left
mrf jdv79: surely 'MetaPanda' :P 15:41
jdv79 in META6.json - authors - is the first entry "the" author and the rest contribs? 15:44
in other words, what is used for the auth if there is a list of authors? my guess is the first in the authors list. 15:45
japhb .tell timotimo When you're feeling better, please push your perl6-bench fixes. :-)
yoleaux japhb: I'll pass your message to timotimo.
tony-o_ Zoffix: the module overtakes should eventually be a lot easier, once CUR obeys the supercedes or specifying author/version stuff 15:47
jdv79 except panda has nothing to do with cpan per se
metacp6an or metacpan6 are more likely i think 15:48
tony-o_ jdv79: i assume that wasn't directed at me
jdv79 no, mrf
[Coke] FROGGS is now an rt perl 6 bug admin admin. 15:49
15:49 n0xff joined
tony-o_ getting froggy with the rt 15:50
15:50 jkva joined 15:53 zakharyas left
tony-o_ .tell Zoffix the other thing to check out, one step more removed from hiker is HTTP::Server::Router - github.com/tony-o/perl6-http-server-router 15:53
yoleaux tony-o_: I'll pass your message to Zoffix.
15:56 jkva left
psch okay, apparently there's literally no repossession towards CORE.setting SC happening 15:56
oh, no, that's wrong 15:57
there's two, for NQPArray
15:57 jkva joined
psch well, BOOTHash, Hash, NQPArray, NQPClassHOW, Perl6::Metamodel::ClassHOW, Perl6::Metamodel::NativeRef and Stash 15:58
that's all i see repossessed in scwbObject 15:59
when compiling rakudo
(most of them more than once, which i'm not sure makes sense or no...)
15:59 uruwi left
mrf jdv79: MetaCP6AN and MetaCPAN6 both seem cluncky. Though I can see the benifit of the continuity. As a newish perl dev I have always assciated MetaCPANs name as being such due to the CPAN tool. Whilst I am aware this isn't the case it is a nice connection. 16:02
vytas where can i find source code for perl6 REPL 16:05
psch vytas: github.com/perl6/nqp/blob/master/s...er.nqp#L64 16:06
vytas thanks psch 16:07
psch vytas: note though that's the parent class of the Perl6::Compiler
jnthn Also that Perl6::Compiler overrides some REPL-related methods
n0tjack Wow, this MMD stuff *really* lets you declutter functions. This is something I've wanted in a language for years.
psch right, what jnthn++ says
n0tjack don't need branches and sentinels and ifs, ands, or buts everywhere
psch the core functionality is declared there, but some called methods are overriden 16:08
+d
16:08 pmurias_ left
TimToady m: sub infix:<~~~>(Str(Cool) \s, Regex $r) is equiv(&infix:<~~>) { s ~~ / ^ <inner=$r> $ /; $/ := $<inner> }; say ("a" ~~~ /$<a>=a/) 16:09
camelia rakudo-moar 271e84: OUTPUT«「a」␤ a => 「a」␤»
TimToady cognominal: ^^^
cognominal thx TimToady++. Obvious... retrospectively :) 16:11
16:16 wollmers_ joined 16:18 Ven joined
nine timotimo: thanks for the heads up! I'm glad it's not as dire as it sounded. Hope you're better soon! 16:21
16:21 ^elyse^ joined 16:23 FireFly left
Ven TimToady: can I make a point again for dynamically-named dynamical values? :-) 16:26
vytas can i modify my system Compiler.nqp inplace or do i have to recompile it ?
16:31 uruwi joined
n0tjack is there some way to use a proto or something to DRY this section of code: gist.github.com/anonymous/c0f7a60cfedcf1214c3a ? 16:32
16:32 edehont joined
n0tjack hmm, maybe forget the numeric-atom method, that doesn't perfectly fit the pattern, has an extra optional param 16:33
psch n0tjack: you should be able to reach <val> from a method above e.g. rational, iirc 16:35
n0tjack: something like method TOP($/) { make $<rational><val> } 16:36
vytas recompile is the answer. Compiler.nqp was left by rakudobrew...
psch or method TOP($/) { $<rational><val>.made } # or somesuch
n0tjack psch: thanks, I'll poke around there
psch vytas: if you're fiddling with internals it's probably more convenient to not rely on rakudobrew and operate on a checkout of rakudo directly 16:38
n0tjack psch: on second thought, what I want is $val .made *before* any of the methods are invoked. I can't .make it in TOP, by then it's too late
psch n0tjack: well, is val a token with an action method?
n0tjack no, it's a cover name for a bunch of different patterns 16:39
lemme find the other gist
vytas psch++
n0tjack psch: gist.github.com/anonymous/396f416800ffb4693fec
TimToady Ven: you mean, kinda like poking new entries into your parent process's env? That sounds like a really great way to have magical action at a distance...so at best I would only allow such a thing if a given lexical scope allowed it explicitly 16:42
Ven TimToady: not at all – I meant what I evoked at SPW. $*Foo::Debug = True; – having the value be dynamically bound, but the name be namespaced 16:43
so that "it could scale"
(code-wise, obviously. it could get really confusing otherwise, or would need "manual" namespacing)
TimToady just put Foo_ or Foo- on the front then, since the :: doesn't buy you anything 16:44
and, in fact, if the :: has nothing to do with packages, people would find it more confusing than _ or - 16:47
tony-o_ HTTP::Server::Router (github.com/tony-o/perl6-http-server-router) is also running on HTTP::Server::Async and working with GLR now ..
psch n0tjack: i don't really see the same kind of duplication in the second gist as in the first, fwiw 16:48
16:48 dakkar left
n0tjack psch: yeah, thanks to PerlJam I was able to refactor it, which was a good improvement but led to some duplication 16:49
psch n0tjack: you could install a FALLBACK i guess, but that's a bit spooky for my tastes
n0tjack: as in, "any method that's unknown calls a method that does 'make $<val>'" 16:50
n0tjack psch: that's a little .. yuck. What I'd like is the notional equivalent of multi method any(qw<numeric-atom decimal complx rational scientific j-int>) ($/ ($val) ) { $/.make( $val ); } 16:51
so I can be explicit about which names I'm defaulting, but not repeat the logic
psch n0tjack: right, but that's the method table that you want the Junction for. your FALLBACK could have a condition that says "only those names fall back to this method here" 16:52
doc.perl6.org/routine/add_fallback
not sure where the "method FALLBACK" way is documented, though
16:53 tokuhirom joined
n0tjack psch: It's a lead either way, thanks. 16:53
16:53 llfourn left
n0tjack psch: Any thoughts about a method wrapper that lets me call .make on all named params, and calls $/.make( $return_value ) implicitly ? 16:53
psch m: class A { method FALLBACK($name where any(qw<numeric-atom decimal>)) { say "making \$val" } }; A.new.numeric-atom; A.new.magic
camelia rakudo-moar 271e84: OUTPUT«making $val␤Constraint type check failed for parameter '$name'␤ in method FALLBACK at /tmp/t4xn7d9tEY:1␤ in any at gen/moar/m-Metamodel.nqp:2864␤ in block <unit> at /tmp/t4xn7d9tEY:1␤␤»
psch n0tjack: ^^^ like that (from roast) 16:54
16:54 abraxxa left
psch n0tjack: i'd still say FALLBACK with the latest question... no idea if there's another solution 16:54
n0tjack psch: That is helpful, but as you say, also a little spooky for my taste. One day I'm going to forget to make a "special case" function and I won't notice that it's just returning $val and get confused
I think what I'm wanting is macros, honestly 16:55
psch yeah, sounds a bit like it :)
n0tjack: the good bit is, the FALLBACK with a where on $name only ever works for names that you explicitly allow
so being surprised by returning $<val> probably wont happen
instead, not getting a "method not found" error will happen :) 16:56
jnthn n0tjack: You could write a routine trait that .wrap's the method
16:57 tokuhirom left 17:00 Ven left 17:03 uruwi left
n0tjack psch: that sounds promising 17:03
17:04 firstdayonthejob joined
n0tjack do traits have access to the Capture objects (i.e. function signatures) of their methods? 17:04
psch jnthn: ooc, should CORE compilation repossess every BOOTSTRAP stub?
FROGGS n0tjack: traits on routines can have access to the params/args, yes 17:05
n0tjack FROGGS: So I could, theoretically, loop over all the args passed, callwith .make on them, and then $/.make ( ) the return value of the routine? 17:06
17:07 wollmers_ left 17:10 Kogurr joined 17:11 SuzieQueue joined
n0tjack what's the notation for "any and all arguments" 17:12
psch m: sub f(|) { say "ok" }; f 1,2,3; f :foo, 42; f [1,2,3] 17:13
camelia rakudo-moar 271e84: OUTPUT«ok␤ok␤ok␤»
n0tjack will this work? 17:14
multi sub trait_mod:<is> (Routine $r, :$made) { $/.make( $r.wrap( { callsame() } ) }
so that way what I want is to say multi method foo($/ (:$a, :$b) ) is made { ... } and have the result of &foo passed to $/.make 17:15
17:15 Suzeanne left
psch n0tjack: i think you want $r() instead of callsame() 17:16
oh no
that doesn't really make sense...
17:16 Peter_R joined
psch m: sub f { "foo" }; &f.wrap( { say callsame } ); f 17:17
camelia rakudo-moar 271e84: OUTPUT«foo␤»
psch yeah, i was wrong, should work as-is, from what i understand
n0tjack cool, so you don't even need the ()
17:19 uruwi joined
uruwi Connection is a bit spotty here; don't be surprised if something happens 17:20
FROGGS I'd be surprised if nothing happened :o) 17:22
n0tjack m: class boo { multi sub trait_mod:<is> (Routine $r, :$made!) { say "Made man"; $r.wrap( callsame ) ); method foo($a) is made { say "Heyo!";} }
camelia rakudo-moar 271e84: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7SYyGu6BY0␤Missing block␤at /tmp/7SYyGu6BY0:1␤------> 3{ say "Made man"; $r.wrap( callsame ) 7⏏5); method foo($a) is made { say "Heyo!"␤ expecting any of:␤ statement end␤ s…»
n0tjack when I try to add a trait "is made" locally, I get "Can't use unknown trait 'is made' in a method declaration." 17:23
even though it's the first declaration in my class
17:24 uruwi left
FROGGS m: class boo { multi sub trait_mod:<is> (Routine $r, :$made!) { say "Made man"; $r.wrap( callsame ) }; method foo($a) is made { say "Heyo!";} } 17:25
camelia rakudo-moar 271e84: OUTPUT«Made man␤5===SORRY!5=== Error while compiling /tmp/tFsYUFas8o␤Can't use unknown trait 'is made' in a method declaration.␤at /tmp/tFsYUFas8o:1␤ expecting any of:␤ rw raw hidden-from-backtrace hidden-from-USAGE␤ cached pure d…»
psch m: class boo { multi sub trait_mod:<is> (Routine $r, :$made!) { $r.wrap( { say "man made!"; callsame } ) }; method foo($a) is made { say "Heyo!";} }
camelia ( no output )
psch .wrap takes a block
m: class boo { multi sub trait_mod:<is> (Routine $r, :$made!) { $r.wrap( { say "man made!"; callsame } ) }; method foo($a) is made { say "Heyo!";} }; boo.new.foo
camelia rakudo-moar 271e84: OUTPUT«man made!␤Too few positionals passed; expected 2 arguments but got 1␤ in method foo at /tmp/t7LNXbq74Q:1␤ in any call_with_capture at gen/moar/m-Metamodel.nqp:3625␤ in block at /tmp/t7LNXbq74Q:1␤ in any enter at gen/moar/m-Metamodel.nqp:3717…»
psch *that* i don't know how to deal with :) 17:26
n0tjack psch: thanks, that made some progress 17:27
psch: though in my case I get "cnnot invoked object with invocation.."
".. handler in this context"
so, in real-life grammars you guys write, you just pepper $<foo>.made and $/.make ( ... ) everhwere? 17:28
doesn't that feel repetitive?
17:29 ofzyh__ left, ofzyh__ joined 17:33 ^elyse^ left
psch n0tjack: github.com/peschwa/H6809/blob/mast...embler.pm6 is the only somewhat-involved non-CORE grammar i wrote as of now 17:33
actions start at line 105 17:34
(also almost a year old and neglected for about 10 months or so...)
so it could probably be improved by a lot... :) 17:35
17:35 Hor|zon left
n0tjack psch: I see. A few makes in there, mostly at function endpoints, but not too many .mades 17:37
maybe I'm overthinking this then.
timotimo hm, so much sleep, so much backlog 17:40
yoleaux 15:45Z <japhb> timotimo: When you're feeling better, please push your perl6-bench fixes. :-)
17:41 margeas left
psch m: class boo { multi sub trait_mod:<is> (Routine $r, :$made!) { $r.wrap( sub (|c) { say "man made!"; callsame } ) }; method foo($a) is made { say "Heyo, $a!";} }; boo.new.foo("bar") # correct invocation for the "Too few positionals..." a bit higher 17:41
camelia rakudo-moar 271e84: OUTPUT«man made!␤Heyo, bar!␤»
psch m: class boo { multi sub trait_mod:<is> (Routine $r, :$made!) { $r.wrap( -> |c { say "man made!"; callsame } ) }; method foo($a) is made { say "Heyo, $a!";} }; boo.new.foo("bar") # and different WTDI 17:42
camelia rakudo-moar 271e84: OUTPUT«man made!␤Heyo, bar!␤»
n0tjack psch: I'm glad you got it working, but I have no clue why that worked ;) 17:45
dalek rl6-bench: be0e4c1 | timotimo++ | bench:
recent rakudo changed .push's semantics; we need .append instead
17:46
rl6-bench: 10a8649 | timotimo++ | lib/Bench/Handling.pm6:
work around a strange bug in rakudo

regarding interpolation of vars in regex
timotimo japhb: ^
psch n0tjack: the routine as argument to .wrap has to have a signature compatible with the wrapped routine
(or supply correct arguments itself, but that doesn't work with {call,next}same)
timotimo right, if you have different arguments, you'll need callwith or nextwith 17:47
psch n0tjack: the "(|c)" as signature means "just capture the arguments"
n0tjack psch: I see
psch: yeah, that does make sense
psch i guess another WTDI could be *@, *%? 17:48
although that probably doesn't work anymore due to the single arg rule..?
not sure :)
jnthn psch: (repossess) Yes, though note that it probably wouldn't repossess the type object 'cus that doesn't change, but ratehr the STable and meta-object
n0tjack Unfortunately, in my context, I'm still getting "Cannot invoke object with invocation handler in this context"
psch jnthn: oh. so i should be looking at scwbSTable instead...
jnthn: ClassHOW does get repossessed, so that doesn't seem to be the problem, which is good i suppose... :) 17:49
17:50 ^elyse^ joined, EricMobiel joined
n0tjack it's funny, the trait does get invoked, I get my side-effects 17:52
but when it tries to actually call the action method, it croaks "cannot invoked object with invocation handler"
17:53 tokuhirom joined 17:58 tokuhirom left 17:59 n0tjack left
FROGGS jnthn: if .subst would not set the lexical $/, this would not work, right? "a".subst(/(.)/,{$0~$0}) # aa 18:02
jnthn: which means, the subst method *needs* to have side effects...
jnthn FROGGS: That's been a sort-of-not-resolved design issue for a long while... 18:03
FROGGS aye
18:03 EricMobiel left
FROGGS jnthn: I fixed the subst-in-a-for-loop bug and also cleaned up stuff about setting $/... which now strikes back :S 18:04
okay, seems I have no choice but to set $/ again... 18:05
m: my @a = <a b c>; for @a { say s[(.)] = "<$0>" }; say @a 18:06
camelia rakudo-moar 271e84: OUTPUT«Use of Nil in string context in code at /tmp/iMSYfNc4IN:1␤「a」␤ 0 => 「a」␤「b」␤ 0 => 「b」␤「c」␤ 0 => 「c」␤[<> <a> <b>]␤»
FROGGS s[(.)] = "<$0>" itself now returns the changed string, rather than the match, but $_ ~~ s[(.)] = "<$0>" returns the match as usual
feels more useful especially when it is about S[(.)] = "<$0>" 18:07
18:07 jkva left 18:10 EricMobiel joined 18:11 EricMobiel left 18:13 spider-mario joined
FROGGS it's a pity... 18:13
18:14 sufrostico joined 18:17 andreoss joined 18:19 espadrine left
FROGGS m: my @a = <a b c>; for @a { say S[(.)] = "<$0>" }; say @a 18:22
camelia rakudo-moar 271e84: OUTPUT«Use of Nil in string context in code at /tmp/ooKGrT9rME:1␤<>␤<<>>␤<<<>>>␤[a b c]␤»
FROGGS heh
^elyse^ m: 1 ~> 2 18:27
camelia rakudo-moar 271e84: OUTPUT«Cannot call infix:«~>»(Int, Int); none of these signatures match:␤ (Str:D \a, Int:D \b --> Str:D)␤ (str $a, int $b)␤ in block <unit> at /tmp/1k3SJE_mCU:1␤␤»
^elyse^ no jizz operator :(
oh wait there is one, just passed the wrong arguments
FROGGS aye
^elyse^ m: "A" ~> 2
camelia rakudo-moar 271e84: OUTPUT«infix:«~>» not yet implemented. Sorry. ␤ in block <unit> at /tmp/WRgUk6y0Qj:1␤␤»
^elyse^ :P 18:28
FROGGS :P
^elyse^ gotta love the guillemets 18:29
psch hrm, the Attribute STable gets repossessed..? 18:30
18:30 rurban joined
psch unless i'm misinterpreting something 18:30
18:32 Hor|zon joined
FROGGS jnthn said it gets a new one, no? 18:32
18:33 Effilry joined
psch FROGGS: well, "System.err.println(" repossessing STable for " + typeName(st.WHAT, tc));" prints Attribute once in scwbSTable... 18:34
the list looks pretty comprehensive, too
gist.github.com/peschwa/514e27f17b8fadf006ba 18:35
18:35 itz_stmu1 is now known as stmuk
psch oh 18:35
i still have the scwb{dis,en}able calls in Any-iterable-method.pm
FROGGS but IIRC compose installs a new st...
and we call Attribute.^compose 18:36
psch yeah, i'll add a note at the compose call and recompile
ugexe why does the $_.say output differ when i switch grep and map at the end in this example:
m: class Foo { has @.a = (1,2,3),(4,5,6); }; my $x = Foo.new; my $y = Foo.new; my @z = $x, $y; say @z>>.a>>.grep({ say $_.perl })
camelia rakudo-moar 271e84: OUTPUT«$(1, 2, 3)␤$(4, 5, 6)␤$(1, 2, 3)␤$(4, 5, 6)␤(((1 2 3) (4 5 6)) ((1 2 3) (4 5 6)))␤»
ugexe m: class Foo { has @.a = (1,2,3),(4,5,6); }; my $x = Foo.new; my $y = Foo.new; my @z = $x, $y; say @z>>.a>>.map({ say $_.perl }) 18:37
camelia rakudo-moar 271e84: OUTPUT«1␤2␤3␤4␤5␤6␤1␤2␤3␤4␤5␤6␤[[((True) (True) (True)) ((True) (True) (True))] [((True) (True) (True)) ((True) (True) (True))]]␤»
18:37 Hor|zon left
psch ugexe: &say returns True, so you grep all elements, but you return True when you map 18:37
ugexe i mean the say $_.perl inside the map and grep
the first part of the output
TimToady why are you using both >> and .map? 18:38
18:38 rindolf left
ugexe want to call map on a list of lists 18:38
18:38 sufrostico left
TimToady looks like grep is paying attention to the itemization and not iterating the sublist 18:40
18:40 espadrine joined 18:43 rindolf joined
hoelzro o/ #perl6 18:44
long time no see =)
FROGGS hi hoelzro :o)
18:45 espadrine_ joined
hoelzro o/ FROGGS 18:45
18:45 espadrine left
hoelzro ShimmerFairy: I was the one who added perl6 support for pygments, but GH has since switched linguist to use textmate bundles 18:46
18:46 andreoss left
hoelzro either way, POD rendering isn't linguist's purview 18:47
we would have to add POD6 support to whichever GH gem renders POD5
(if I understand your question correctly)
18:49 llfourn joined 18:50 Effilry is now known as FireFly
PerlJam hoelzro: github.com/github/linguist/tree/master/samples has an entry for pod, why not also pod6? 18:50
hoelzro PerlJam: it's a matter of highlighting vs rendering
PerlJam (granted I don't know exactly what they do with the samples)
hoelzro the samples are used to train a naive bayesian classifier for guessing which language a file is 18:51
18:52 uruwi joined
uruwi nya 18:52
psch FROGGS: right, the recomposition of Attribute happens after repossession of the STable 18:54
FROGGS: and after that the classHandle still holds onto the BOOTSTRAP SC
FROGGS: which is why we die in resolveAttribute
18:54 llfourn left
FROGGS psch: that sounds like you understand it :o) 18:55
TimToady ugexe: actually, I suspect it's a difference in 'is nodal' 18:56
psch FROGGS: ...kind of? i can read the signs, but i have no idea where i am - so to speak
TimToady wonders why method map isn't marked nodal...
ugexe TimToady: are both the map and grep output expected?
im mostly using it to do instead of using a grep/map instead a grep/map, like @array.grep: { @$_.grep(*.so).Slip } 18:58
grep/map inside a grep/map ^
TimToady I think the map is probably wrong, and you need .deepmap to ignore nodal-ness 18:59
but map is mismarked currently
testing to see what happens if we also mark method map as nodal...
uruwi gist.github.com/bluebear94/30ec8e8c3c10d7f80fc8 19:01
^ this script currently reacts badly to arrow keys; it makes the keypresses become out of phase
how to solve this?
timotimo uruwi: i suggest you use "END shell 'stty cooked echo'" instead of just putting it at the end, so you'll also survive things like ctrl-c 19:02
uruwi thanks timotimo
Replacing getc with get just waits for a string input forever 19:03
ugexe i thought $*IN to read key presses was broke due to data crossing thread barriers or something
TimToady yes, putting 'is nodal' on map makes it behave the same as grep 19:04
uruwi ugexe what do you suggest? 19:05
timotimo "get" will read a full line, yeah 19:06
TimToady I currently use something like this: repeat { $buf ~= $TTY.read(1) } until try my $s = $buf.decode;
timotimo i think since "getc" is about reading string characters, it may be that it has to wait for a grapheme boundary so it can reliably give one to you
19:06 danstoner left
timotimo you probably want .read instead 19:06
19:07 lucs left
uruwi It works perfectly, thanks timotimo 19:07
timotimo you're welcome :) 19:08
sometimes it's hard to appreciate our rightness when it comes to graphemes :P
19:08 espadrine_ left
TimToady if roast is to serve as a language spec, we need tests for every operator to lock down whether they are nodal or not 19:11
19:11 spider-mario left, uruwi left
TimToady (he says, after noticing that changing 'nodal' on method map had No Effect on the test outcomes...) 19:12
doubtless there are are other similar things that are currently "specified" only by the current implementation 19:13
at Christmas, we'll have to put a big note on it saying "We reserve the right to break anything that isn't tested in the spec tests."
which means, currently, that you're not allowed to use map :P 19:14
timotimo you're not allowed to rely on map; big difference! :P 19:15
dalek kudo/nom: f0d4820 | TimToady++ | src/core/Any-iterable-methods.pm:
map should be nodal

Indeed, map is very nearly almost the prototypical nodal operation.
19:16
19:17 retupmoca left
TimToady hah, there's a comment after the 3 (count 'em) nodal tests, that says: # XXX need to test all the things 19:18
jnthn ++TimToady ;) 19:19
TimToady who came up with this 'nodal' thing, anyway?!?
jnthn Somebody who wanted things to DWTM, probably... :P 19:20
19:21 danstoner joined, diana_olhovik joined, lucs joined 19:23 khw left 19:29 jkva joined 19:30 grondilu left 19:32 grondilu joined 19:33 Hor|zon joined, uruwi joined
uruwi did my message get through? 19:33
19:34 margeas joined
uruwi Can you specify a timeout for a read operation? I tried using promises but apparently you can read a socket only from its thread of origin. 19:34
Apologies for anyone who received this message 3 times.
jnthn uruwi: You may want to try using IO::Socket::Async 19:35
uruwi I might sound like a noob... but how do I create one from $*STDIN? 19:36
If at all, of course. 19:37
19:37 Hor|zon left
psch i don't really get it 19:38
the repossession for Attribute shows it being owned by CORE afterwards
then the ^compose call happens 19:39
and after that, the classHandle that arrives in bindattr_s still belongs to BOOTSTRAP
uruwi I messed up; I actually want to read $*STDIN with a timeout
[Coke] wonders what psch is testing. 19:40
19:40 jkva left
psch [Coke]: i want to be able to revert nqp/52e409ec because it's a bandaid 19:41
[Coke]: the underlying problem is "something with repossession is weird", as far as i can tell...
19:42 gtodd joined, margeas left 19:44 retupmoca joined
psch [Coke]: and it's probably been weird for a long time, but never came to the surface until the GLR added an "BEGIN Attribute.^compose" in Any-iterable-methods.pm 19:45
uruwi So I'd like to read $*STDIN asynchronously
19:47 maziar joined, maziar left
jnthn uruwi: Ah, that's not supported yet. 19:48
(On the pre-xmas todo list, though)
jnthn did a progress report: 6guts.wordpress.com/2015/10/15/las...much-more/ 19:49
uruwi Wait, maybe I can read into a supply on the main thread and run other tasks on a scheduler
jnthn uruwi: Yes, true
jnthn gotta go...bbl, or tomorrow...
uruwi But if that's so, then I'll wait for that.
19:50 rindolf left
uruwi See you 19:50
gfldex jnthn++ # for progress and report
[Coke] RT: 1030; nom: 8; glr: 4; weird: 11; lta: 87; tests: 9; xmas: 75
19:51 murre joined
[ptc] Does anyone else see Linenoise failing to install via rebootstrap in panda, whereas 'panda install Linenoise' works fine? 19:54
I keep getting "Could not find file 'Build.pm' for module Build.pm" in the test step
it's basically repeatable for me (Debian, jessie, amd64)
tadzik interesting
please report that as a github bug, I may get around to seeing what's going on in there :)
19:55 tokuhiro_ joined
[ptc] ok, will do :-) 19:55
19:56 uruwi left 19:57 Hor|zon joined 19:58 darutoko left 19:59 tokuhiro_ left 20:02 skids left
psch i suppose a different, more involved bandaid could be running the classHandles (which, afaiu, correspond to type object) through scwbObject or scwbSTable before calling obj.bind_attribute_* in all the bindattr_* on jvm, but i'm pretty sure that'll have horrible or weird consequences (or both) 20:03
dalek kudo-star-daily: a73f8fd | coke++ | log/ (9 files):
today (automated commit)
20:05
kudo-star-daily: fe3bf43 | coke++ | log/ (9 files):
today (automated commit)
kudo-star-daily: c951d83 | coke++ | log/ (9 files):
today (automated commit)
kudo-star-daily: ca71b9c | coke++ | log/ (8 files):
today (automated commit)
kudo-star-daily: edf9933 | coke++ | log/ (9 files):
today (automated commit)
rakudo-star-daily: 82b3db3 | coke++ | log/ (9 files):
rakudo-star-daily: today (automated commit)
20:05 dalek left
[Coke] oh, is panda working at all? it died horribly for me over the past few days. 20:05
20:05 dalek joined, ChanServ sets mode: +v dalek
[ptc] works for me atm 20:05
[Coke] \o/ 20:06
Wonder if it's a new manifestation of my old issue with http proxy.
[ptc] maybe I need to update and try again, to see if it fails :-)
nope, was already up to date
20:07 rindolf joined
[ptc] which is authoritative? smoke.perl6.org or testers.p6c.org? (or both maybe?) 20:07
20:10 espadrine_ joined
jdv79 fatal: remote error: awwaiid/p6-lrep.git@master is not a valid repository name 20:10
smooth move awwaid 20:11
;)
20:11 skids joined
[Coke] is still getting about a dozen of: 20:11
Calling make-default-ecosystem(Str) will never work with declared signature ()
at bin/panda:16
(with different line numbers) 20:12
flussence [ptc]: both are equally useful in different ways imo
jdv79 .tell awwaiid LREP's meta source-url is borked 20:13
yoleaux jdv79: I'll pass your message to awwaiid.
[Coke] has a sad panda.
flussence (smoke.* seems to be bitrotting though; there's no author for half these modules...)
jdv79 oO( if someone would help perhaps we could get on cpan testers faster ) 20:14
20:14 virtualsue joined
[ptc] wonders if SAD PANDA is a unicode symbol... 20:14
jdv79: what would need to be done?
jdv79 whatever it takes 20:15
i don't know yet cause i'm bogged down in metacpan
talk to xdg. last i tried to raise him he was busy.
20:16 kmel joined
hoelzro @perl6-users.grep(*.involved-with-website-redesign)>>++ # don't know if that really works, but I just saw the redesign! 20:16
[Coke] tadzik: opened github.com/tadzik/panda/issues/237 20:17
jdv79 Zoffix++ # JFDI basically
20:17 pat_js left
stmuk Zoffix++ # should be put on perl6.org/about 20:17
cd
[ptc] agreed, Zoffix++ has been doing sterling work recently
20:18 Suzeanne joined 20:19 PsuzeannePsy joined
[Coke] tadzik: um, if panda is installed, which copy of Panda.pm is it using when you run bin/panda? 20:20
20:20 walfisch joined
tadzik [Coke]: well, the one that 'use Panda' picks up :| 20:20
which does cause weird problems sometimes 20:21
[Coke] in p5, I could dump %INC to see that. how in p6?
jdv79 ugexe pasted something about that earlier
[Coke] but it seems like panda bootstrap should be using everything locally before install.
20:21 Kogurr left 20:22 SuzieQueue left 20:23 Suzeanne left
[Coke] jdv79: his send from 15:00 yields a "cannot lookup up attributes in a type object" for me. 20:23
jdv79 oh 20:24
that stuff seems underexplored
[Coke] and the one at 15:02 dies with a "cannot use . as string concat"
[Coke] supposes he's going to have to add "destroy panda from orbit whenever upgrading". :| 20:25
flussence that's what I usually do... after copying the state file somewhere safe
ugexe you can to change it to use CompUnitRepo::Local::File 20:26
[Coke] destroy panda insufficient. adding "just nuke entire install directory". :|
20:27 rindolf left
ugexe you can also use RAKUDO_MODULE_DEBUG and see exactly what gets loaded 20:27
[Coke] ... too late now
[Coke] will try to remember that for next time.
20:29 spider-mario joined
[Coke] a complete nuke of my install directory works. 20:29
ugexe sounds like the cwd gets changed somewhere during the rebootstrap so the relative path `lib` doesn't point at anything
[Coke] that shouldn't be required.
20:32 sufrostico joined
[Coke] did panda move from being installed in languages/ to not recently? 20:35
any chance panda can add HTTP::UserAgent to the modules it ships with? 20:37
because if you need it, you can't install it.
jdv79 moritz: i'm getting too many open files on hack 20:39
can we up it to 32K or 64K?
that's what googling says elasticsearch likes
or anyone else with root on hack 20:40
[Coke] tadzik: even with HTTP::UserAgent installed, it's not respecting my http proxy setting. 20:41
... ah, because it's using git protocols. *sigh* 20:42
btyler_ I also had this problem 20:43
jdv79 you can around that
[Coke] People in big companies are just going to give up and switch to python at this point.
btyler_ yeah, GIT_PROTOCOL or something
but default to https is way easier I think
20:43 dbron_ joined, dbron_ is now known as n0tjack
jdv79 i have this in my .gitconfig: 20:43
[url "ssh://git@github.com/"] insteadOf = "git://github.com/"
maybe you can http that?... 20:44
20:45 diana_olhovik left 20:46 xfix left 20:48 btyler_ is now known as btyler 20:50 llfourn joined
n0tjack is pretty sure his cat is thinking about eating him 20:50
20:50 bjz_ left 20:52 bjz joined, bjz left
huf you must be about 20 cm tall... 20:52
20:53 spider-mario left
huf unless by cat you mean your pet tiger 20:53
20:54 kmel left 20:55 jkva joined 20:56 llfourn left 20:57 espadrine joined 20:58 skids left, espadrine_ left 21:01 walfisch left 21:02 n0xff left
japhb .tell timotimo Thank you for the perl6-bench push. That second commit is a weird one. Is there an RT for the bug it fixes already? (I like to annotate workarounds with a comment pointing to an RT or irclog URL.) 21:02
yoleaux japhb: I'll pass your message to timotimo.
japhb s/fixes/works around/
21:02 bjz joined 21:05 espadrine left 21:06 espadrine joined, bjz_ joined 21:08 bjz left
grondilu "unless by cat you mean pet tiger" 21:08
^made me think of s-media-cache-ak0.pinimg.com/736x/...e4bb5e.jpg
21:12 dwarring joined 21:13 n0tjack left, bjz_ left 21:16 jkva left
dwarring r: my $x = 42; $x = :$x; say $x.perl 21:17
camelia ( no output )
..rakudo-moar 271e84: OUTPUT«(my \Pair_140034859548832 = :x(Pair_140034859548832))␤»
dwarring weird 21:18
japhb What's the most idiomatic way to save the return value of a function call, returning it if it's a Failure? In other words, what's the best way to say: { my $result = foo(); return $result if $result ~~ Failure; # $result safe to use after this point... } 21:20
21:21 edehont left
dwarring r: my $x = 42; $x = (:$x); say $x.perl 21:21
camelia rakudo-jvm 271e84: OUTPUT«(my \Pair_1677829811 = :x(Pair_1677829811))␤» 21:22
..rakudo-moar 271e84: OUTPUT«(my \Pair_139757510868552 = :x(Pair_139757510868552))␤»
japhb It's important that the calling function receive the Failure in *NON* defanged form
TimToady m: say [[2, [3,4]], [4, [5, 6]]]».[1;1]
camelia rakudo-moar 271e84: OUTPUT«Cannot call postcircumfix:<[; ]>(Array, Int, Int); none of these signatures match:␤ (\SELF, @indices)␤ (\SELF, @indices, :$exists!)␤ (\SELF, @indices, :$delete!)␤ (\SELF, @indices, :$BIND! is rw)␤ in block <unit> at /tmp/P_Lu9S_jyb:1…»
dwarring r: my $x = 42; my $y = (:$x); say $y.perl
camelia rakudo-{moar,jvm} 271e84: OUTPUT«:x(42)␤» 21:23
TimToady m: say [[2, [3,4]], [4, [5, 6]]]».[1]».[1] 21:24
camelia rakudo-moar 271e84: OUTPUT«(4 6)␤»
TimToady m: say [[2, [3,4]], [4, [5, 6]]].map: *.[1;1] 21:28
camelia rakudo-moar 271e84: OUTPUT«Earlier failures:␤ Index out of range. Is: 1, should be in 0..0␤ in block <unit> at /tmp/DoPDvKBb3e:1␤␤Final error:␤ Cannot call map(Array: Failure); none of these signatures match:␤ (\SELF: &block;; :$label, :$item, *%_)␤ (HyperIterab…»
TimToady m: say [[2, [3,4]], [4, [5, 6]]].map: *.[1]».[1]
camelia rakudo-moar 271e84: OUTPUT«Cannot call map(Array: List); none of these signatures match:␤ (\SELF: &block;; :$label, :$item, *%_)␤ (HyperIterable:D $: &block;; :$label, *%_)␤ in block <unit> at /tmp/aRKWOhea2j:1␤␤»
21:29 virtualsue left 21:33 n0tjack joined 21:34 rurban left 21:43 margeas joined 21:49 n0tjack left 21:51 e1f joined 21:52 bjz joined 21:53 kid51 joined
e1f i was reading this pdf perl6 slideshow; the one with the bright green borders, and i have a question about hashes: to delete a hash element you use: %capitals<UK>:delete; 21:55
(that : notation seems rather odd) so i was wondering whether i can do %capitals.delete<UK>; 21:56
21:56 tokuhiro_ joined
e1f or does that even make sense 21:56
21:59 espadrine left, bjz left, s_kilk joined
dalek ast: a9a89b4 | (David Warring)++ | S02-types/pair.t:
adding fudged test for RT#126369 - pair assignment quirk
22:00
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=126369
22:00 tokuhiro_ left
ugexe well, theres this 22:04
m: my %x; %x<F> = 1; %x.DELETE-KEY('F'); say %x.perl
camelia rakudo-moar 271e84: OUTPUT«{}␤»
e1f ok, that's easier to remember, and i guess '.delete' is ambiguous hence '.delete-key'? 22:05
ugexe its in all caps because its meant for internal use for the most part 22:06
e1f oh
i just found the colon-notation rather ... incongruous 22:07
i suppose, there's probably a clever mnemonic to remember it 22:08
thank you for the response 22:10
22:17 s_kilk left
ugexe its easier to remember when you start using %h<x>:exists and :k :v etc 22:19
psch elf: irclog.perlgeek.de/perl6/2015-10-04#i_11316102 has some insightful discussion about why we use an adverb for deleting hash elements
22:21 jkva joined
dalek kudo/nom: dd51f8a | TimToady++ | src/core/ (2 files):
more nodal cleanup
22:21
ast: 7ea9ae0 | TimToady++ | S03-metaops/hyper.t:
test most nodal functions
22:23 leont joined 22:25 jkva left 22:26 skids joined
e1f in this context, is "adverb" the colon-action that goes after the ... "thing" rather than before the "thing", like dot-notation? 22:26
TimToady elf: thing is, what if you want to delete a slice, how would you write that with a method? what if you want to delete from a hash with multidimensional subscripts, how would you write that? using a subscript modifier, these are both obvious
yes, an adverb modifies some previous operator
"please subscript this deletingly" :) 22:27
e1f oh i see, yes, with the multi-dimensional aspect, it makes more sense now 22:28
TimToady m: my %h = :a(1), :b(2), :c(3), :d(4); say %h<b c>:delete; say %h 22:29
camelia rakudo-moar 271e84: OUTPUT«(2 3)␤a => 1, d => 4␤»
TimToady especially since delete returns values exactly like a subscript does
timotimo .tell japhb i haven't taken the time yet to golf the exact thing, but it should be easy-ish to do. i'll do it at some point, or perhaps someone else will 22:34
yoleaux 21:02Z <japhb> timotimo: Thank you for the perl6-bench push. That second commit is a weird one. Is there an RT for the bug it fixes already? (I like to annotate workarounds with a comment pointing to an RT or irclog URL.)
timotimo: I'll pass your message to japhb.
dalek ecs: 70209e8 | (Stéphane Payrard)++ | S04-control.pod:
tyop
22:36
22:36 dpk left, yoleaux left 22:38 edehont joined
japhb Thanks, timotimo 22:42
Anyone have any better way of writing the return-failures-or-use-result snippet I brought up at irclog.perlgeek.de/perl6/2015-10-15#i_11382649 ? 22:44
22:45 firstdayonthejob left 22:48 edehont left
TimToady something like: with foo() -> $result {...} else { .return } 22:48
22:48 khw joined
TimToady assuming you want to return on any undefined value 22:48
timotimo or perhaps "use fatal" :P
TimToady that's antisocial
timotimo even if just inside the routine? 22:49
TimToady the idea is to propagate the failure to your caller
22:50 tokuhiro_ joined
RabidGravy right beddy byes 22:51
TimToady m: with Failure.new("foo") -> $result {...} else { say $result }
camelia rakudo-moar 271e84: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tbmDSA9EDs␤Variable '$result' is not declared␤at /tmp/tbmDSA9EDs:1␤------> 3.new("foo") -> $result {...} else { say 7⏏5$result }␤»
22:51 yoleaux joined, ChanServ sets mode: +v yoleaux
TimToady m: with Failure.new("foo") -> $result {...} else -> $result { say $result } 22:51
camelia rakudo-moar 271e84: OUTPUT«foo␤␤»
TimToady I guess the else won't automatically bind the value yet 22:52
22:52 dpk joined
TimToady m: my $result = Failure.new("foo") orelse .say 22:52
camelia rakudo-moar 271e84: OUTPUT«foo␤␤»
TimToady you can use orelse, I guess
22:53 llfourn joined
TimToady m: sub foo() { my $result = Failure.new("foo") orelse .return }; say foo 22:53
camelia rakudo-moar 271e84: OUTPUT«foo␤ in block <unit> at /tmp/sglEAJeInu:1␤␤»
TimToady m: sub foo() { .return without my $result = Failure.new("foo"); }; say foo 22:54
camelia rakudo-moar 271e84: OUTPUT«foo␤ in block <unit> at /tmp/ZQXgFt92cj:1␤␤»
22:55 tokuhiro_ left 22:56 RabidGravy left
ugexe looks like jvm is broke 22:57
looks like it might be this: 22:58
github.com/rakudo/rakudo/commit/e1...caf59dR875
22:59 llfourn left
ugexe Error while constructing error object:Could not locate compile-time value for symbol X::Syntax::ConditionalOperator::PrecedenceTooLoose 22:59
23:02 SuzieQueue joined
japhb m: say Failure.new("foo"); 23:03
yoleaux 22:34Z <timotimo> japhb: i haven't taken the time yet to golf the exact thing, but it should be easy-ish to do. i'll do it at some point, or perhaps someone else will
camelia rakudo-moar 271e84: OUTPUT«foo␤␤Actually thrown at:␤ in block <unit> at /tmp/Un9SSPMXkU:1␤␤»
23:03 ^elyse^ left 23:05 PsuzeannePsy left
japhb Why does the simple 'say Failure.new("foo")' output an "Actually thrown at:"? 23:05
(And thank you, TimToady, for the 'orelse .return' and '.return without' constructions.) 23:06
23:12 skids left 23:26 margeas left, baest_ joined 23:28 raiph joined 23:29 ilbelkyr_ joined, jordman_ joined, ilbelkyr left, ilbelkyr_ is now known as ilbelkyr, Juerd_ joined, danstone1 joined, breinbaa1 joined 23:30 Gothmog__ joined, dalek left, breinbaas left, danstoner left, diakopter left, Juerd left, diakopter joined, Juerd_ is now known as Juerd, boegel|quassel joined, Gothmog__ is now known as Gothmog_ 23:31 dalek joined, ChanServ sets mode: +v dalek 23:32 jevin joined, baest left 23:33 Util left, leedo left 23:34 jdv79 left, woodruffw left, bbarker`` left, tony-o_ left, mprelude left, sergot left, sergot_ joined, tony-o joined, zoosha left, jevin_ left, |Tux| left, agentzh left, ssflying left, revdiablo left, ingy left 23:35 Util joined, jdv79 joined, Peter_R left 23:36 revdiablo joined, ssflying joined, zoosha joined 23:38 ilbelkyr left, ilbelkyr_ joined 23:39 Zoffix joined, ilbelkyr_ is now known as ilbelkyr, hohoho joined, woodruffw joined 23:40 leont left 23:42 agentzh joined 23:54 jordman_ left, dpk left, yoleaux left, Hor|zon left, softmoth left, apotheon left, crux left, confuseAcat left, avar left, literal left, wtw left, Humbedooh left, sjohnson left, burnersk left, hohoho left, ssflying left, Util left, noganex left, [Sno] left, Exodist left, Juerd left, SuzieQueue left, kid51 left, ofzyh__ left, telex left, SHODAN left, kfo left, Jonis left, eiro left, revdiablo left, breinbaa1 left, baest_ left, khw left, e1f left, FireFly left, FROGGS left, TEttinger left, WizJin left, atta left, Hotkeys left, jojotus left, captain-adequate left, lsm-desktop left, kipd left, SmokeMachine_ left, erdic left, avuserow1 left, Debolaz left, [Tux] left, zemmihates left, xenu left, Fluor left, raiph left, sufrostico left, lucs left, bpmedley left, iv left, olinkl left, jferrero left, nine left, Gothmog_ left, danstone1 left, retupmoca left, gtodd left, DrForr left, domm left, go|dfish left, doublec left, sivoais left, nowan left, KotH left, b2gills left, samb1 left, robinsmidsrod left, bartolin left, jdv79 left, diakopter left, dalek left, boegel|quassel left, ilbot3 left, oha left, synbot6 left, DarthGandalf left, erxeto_ left, preyalone left, timbunce left, mattprelude left, pierrot left, mst left, awwaiid left, inokenty left 23:55 xiaomiao left, Psyche^ left, xinming left, PerlJam left, lea left, ambs left, obra left, xnrand left, zoosha left, tony-o left, jevin left, murre left, pyrimidi_ left, Celelibi left, colomon left, jantore left, f3ew left, intrigue left, tadzik left, oahong left, avalenn left, geekosaur left, rudi_s_ left, BinGOs left, cxreg2 left, daxim left, Zoffix left, gonz_ left, sQuEE` left, AW3i left, felher left, woodruffw left, sergot_ left, Alina-malina left, CurtisOvidPoe left, spacebat left, krakan left, sftp left, Upasaka_ left, ShimmerFairy left, vytas left, pochi_ left, mrsolo left, japhb left, JimmyZ left, El_Che left, mls left, skaji left, ilmari left, raydiak left, agentzh left, ilbelkyr left, grondilu left, TimToady left, advwp left, [particle]1 left, mrf left, btyler left, pRiVi_ left, labster left, rhr left, Timbus left, Sgeo__ left, stmuk left, huf left, tinita left, garu left, hahainternet left, jercos left, cognominal left, ggoebel left, Grrrr left, freeze left, aindilis left, Guest72901 left, cibs left, MilkmanDan left, dustinm` left, dwarring left, xvcds left, cgfbee left 23:56 cgfbee joined