»ö« 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:02 captain-adequate left
japhb nebuchadnezzar: Can you explain "it's forbidden to modify upstream directly"? 00:06
00:06 tinyblak joined 00:07 tinyblak_ joined 00:11 tinyblak left 00:14 BenGoldberg joined, smls_ left 00:20 sjn_phone_ left, uncleyear left 00:21 uncleyear joined 00:22 laouji left, laouji joined 00:23 tinyblak_ left 00:24 tinyblak joined 00:25 tinyblak left 00:27 laouji left 00:29 laouji joined 00:30 jack_rabbit joined 00:33 cognominal left 00:39 laouji left, tinyblak joined 00:42 laouji joined 00:54 zacts left 00:55 FROGGS[mobile] left 00:56 Akagi201 joined 00:57 FROGGS[mobile] joined 01:00 rurban joined 01:01 rurban left 01:03 gfldex left 01:07 lizmat joined 01:10 FROGGS[mobile] left 01:11 ilbelkyr left 01:13 FROGGS[mobile] joined 01:15 Gardner joined
lizmat waves from Portland, OR 01:19
TimToady got through the gorge, didja?
01:21 ilbelkyr joined, AlexDaniel left
lizmat yup, unscathed :-) 01:27
amazing how everything before The Dalles is yellow and desert like
and everything after that is green and lush 01:28
we even got hit by two dust devils on the highway, an amazing experience 01:32
(near Spokane)
TimToady yeah, I don't suppose you get many of those in .nl :) 01:33
lizmat nope, although I have seen one once on a very hot windless day 01:35
lizmat will try to get through the GLR speculation when I'm a bit less tired 01:36
01:45 ilbot3 left 01:47 ilbot3 joined
skids gist.github.com/skids/5d7a9cdd20bf6c303eb6 # please add to RT. RT won't let me edit tickets. 01:51
01:53 aborazmeh joined, aborazmeh left, aborazmeh joined
lizmat skids: if you mail to [email@hidden.address] with "[perl #117043]" in the subject, it should be added automagically to the RT ticket 01:54
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=117043
skids OK I'll try but it has not worked for me in the past.
lizmat if it doesn't work for you, I'll try it as well, ok? 01:56
timotimo hmm ... isn't "samewith" sort of like recursion as a tail-call? 02:03
(and with that thought i leave towards bed)
lizmat good night, timotimo! 02:05
skids lizmat: OK I sent it, and sometime tonight when mx.develooper.com actually bothers to take my connection, we'll see whether RT just ignores it. 02:06
lizmat :-)
02:12 nys left 02:21 noganex_ joined 02:24 noganex left 02:27 mattp_ joined 02:28 mattp- left 02:33 uncleyear left, uncleyear joined 02:34 spider-mario left 02:38 rmgk_ joined, rmgk left, rmgk_ is now known as rmgk
lizmat dinner& 02:38
02:39 araujo_ joined 02:41 araujo left 02:48 yqt left 02:54 Gardner left 03:11 bin_005 joined 03:31 amurf joined 03:35 BenGoldberg left 03:40 zacts joined 03:42 laouji left 03:46 tinyblak left 03:51 bin_005 left 04:02 kst` joined 04:06 kst left 04:13 aborazmeh left 04:26 laouji joined 04:38 diana_olhovik_ joined
labster www.perlfoundation.org/perl6/index....e_released 04:38
04:47 baest_ joined 04:53 araujo_ left
labster m: say(class X { } X.new) 04:54
camelia rakudo-moar d6430c: OUTPUT«(X) Any.new␤»
labster whaaaa?👻
TimToady that's not doing what it appears to be doing
try putting a semicolon where you need one 04:55
labster indeed. I'm playing with RT#76236, so I expected it to do something wrong.
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...l?id=76236
TimToady 2nd X is cross operator there
m: say class X {} X .new 04:56
camelia rakudo-moar d6430c: OUTPUT«(X) Any.new␤»
TimToady m: say class Y {} X .new
camelia rakudo-moar d6430c: OUTPUT«(Y) Any.new␤»
labster so is this notabug/DIHWIDT territory? 04:57
TimToady we never intuit ; after } except at the end of a line, where we always do
yes, notabug
just happens to not detect the problem this time 04:58
it means something wonky, but it does mean something
.oO(Code is too wonky at line 42...)
labster We really need that feature, TimToady 04:59
That operator you keep using, it does not mean what you think it means at line 67. 05:00
TimToady Heh, that's an ancient page... "Created...on Dec 30." no year given... 05:02
dalek ast: 58f6cd1 | usev6++ | S05-metasyntax/regex.t:
Fix test for RT #125302
05:03
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125302
TimToady maybe we should rename FatRat to ROUS 05:05
.oO(Well, I also have a surprise. I am not left associative either!)
05:07
labster m: say( class X { has Int $.id; method BUILD { $.id = 666 } } X.new ) 05:08
camelia rakudo-moar d6430c: OUTPUT«(X) Any.new␤»
TimToady Y.new would also work :) 05:09
labster wait, is it crossing the class keyword? 05:10
TimToady yes, with a $_.new 05:11
labster m: say( class X { has Int $.id; method BUILD { $.id = 666 } } Y.new )
camelia rakudo-moar d6430c: OUTPUT«Error while constructing error object:Could not locate compile-time value for symbol Comp::AdHoc␤===SORRY!===␤Error while compiling, type X::Comp::AdHocpayload: Unable to parse expression in argument list; couldn't find final ')' ␤ at line 2, ne…»
TimToady er, I meant Z 05:12
labster Ah, right, that would.
In summary: don't do this. 05:13
TimToady in summary, P6 has very consistent rules for use of closing braces that will surprise you if you expect inconsistency 05:14
labster and since we're expecting an operator and not a term, we don't see X as a term.
TimToady right
m: my @x := flat 1, [\*] 1..*; say @x[^10] 05:20
camelia rakudo-moar d6430c: OUTPUT«1 1 2 6 24 120 720 5040 40320 362880␤»
TimToady .tell smls see irclog.perlgeek.de/perl6/2015-06-17#i_10760273 for the real reason your expression wasn't lazy 05:22
yoleaux TimToady: I'll pass your message to smls.
05:25 diana_olhovik_ left 05:27 kaare_ joined 05:28 kurahaupo1 left, skids left 05:43 Sqirrel left
TimToady .tell smls thing is, 1, [\*] 1..* is now considered 2 elements, and you asked for 10, so of course it was trying to completely evaluate the second element of your list, which happens to be infinite 05:47
yoleaux TimToady: I'll pass your message to smls.
05:48 rindolf joined 05:50 Sqirrel joined
psch o/ 05:57
not sure how to get Failure seen in moars p6typecheckrv
apparently i can't stuff a QAST::Op that does the lookup in there, because that doesn't get serialized correctly..? 05:58
05:58 kurahaupo1 joined 05:59 tinyblak joined, tinyblak left 06:00 tinyblak joined 06:02 tinyblak_ joined
psch on the jvm i just called getlexcaller and it was fine :P 06:03
although probably slow :/
06:03 diana_olhovik_ joined
zacts so, does perl6 support functional programming styles? 06:04
and higher order functions and things?
I hope this isn't too naive of a question... o_O
lizmat m: "I think so".say
camelia rakudo-moar d6430c: OUTPUT«I think so␤»
06:05 tinyblak left
psch m: reduce(&infix:<+>, ^5).say 06:05
camelia rakudo-moar d6430c: OUTPUT«10␤»
psch m: say [+] ^5 # or this
camelia rakudo-moar d6430c: OUTPUT«10␤»
psch reduce is my knee-jerk "that's functional, right?" :S
zacts was that a reduce using + as an input function / operator?
vendethiel m: sub myadd($a, $b) { $a+$b+$a }; [[&myadd]] ^10; # or that 06:06
camelia ( no output )
vendethiel m: sub myadd($a, $b) { $a+$b+$a }; say [[&myadd]] ^10; # or that
camelia rakudo-moar d6430c: OUTPUT«1013␤»
vendethiel zacts: yes
zacts oh cool
neat!
thanks
psch zacts: to expand, ^5 is equivalent to 0..^5, i.e. a range from 0 excluding the endpoint
zacts psch: so how about any form of lazy eval? 06:07
psch m: my @fibs = 1, 1 ... * + *; say @fibs[^10]
camelia rakudo-moar d6430c: OUTPUT«1 1␤»
psch oh
m: my @fibs = 1, 1, * + * ... *; say @fibs[^10]
camelia rakudo-moar d6430c: OUTPUT«1 1 2 3 5 8 13 21 34 55␤»
zacts oh cool
so you can represent the set of all fibonacci numbers in perl6
as an abstraction? 06:08
06:08 Sqirrel left
zacts and use lazy eval on them? 06:08
psch zacts: sorta, yeah. it's a sequence
zacts ah ok
that's neat
psch zacts: the ... form the sequence, with 1, 1 being the initial elements
zacts anyway, that's all my questions for now. thanks!
psch zacts: and * + * is a WhateverCode that takes two elements from the sequence, until * which is Whatever, i.e. as many as you need, lazily
zacts oh cool 06:09
psch "the previous two elements", to be precise 06:10
dalek kudo/nom: 90bbe0b | lizmat++ | src/core/control.pm:
Not sure why it wasn't a sub in the first place
06:13
06:25 gfldex joined 06:27 kurahaupo1 left
nebuchadnezzar japhb: hello, sure, any modification to upstream source must be made by patches in debian/patches, building the source package will complain about modification to upstream source: www.debian.org/doc/manuals/maint-g...ixupstream 06:27
japhb: otherwise, you need to build a new orig.tar.gz, like in some packages which provide a _dfsg.orig.tar.gz because they remove non DFSG compliant files 06:30
06:36 baest_ is now known as baest
dalek kudo/nom: 2c58ee1 | lizmat++ | src/core/ (2 files):
Remove samewith() usage from core

Looking at how samewith() works, it felt better to not use in the core from a performance pov. Also, maybe samewith() should be implemented as a macro, or perhaps as a statement in the grammar. Or maybe not at all. In any case, it still feels wrong having to specify the name of the method inside the method in general, so maybe we do need something like samewith() (but better performing).
06:36
06:38 RabidGravy joined
RabidGravy marnin' 06:40
06:40 [Sno] left
masak \o 06:40
labster Well, a car is on fire next door, don't see that every day. Did $sports_team win? 06:41
lizmat labster: 100% it's not yours? 06:42
labster No, not my car.
06:42 _mg_ joined
labster The air smells like dioxin though. 06:42
lizmat well, close the windows, switch off the airco, stop breathing! 06:43
btw, how *do* you know how dioxins smell?
moritz
.oO( I love the smell of dixone in the morning )
en.wikipedia.org/wiki/Seveso_disas...th_effects 06:45
labster It's the smell of magic smoke leaving the computer.
In this case, the magic smoke was making the car run. 06:46
06:46 SevenWolf joined
labster Fire is extinguished now, don't want to leave you hanging. 06:51
lizmat gets some shuteye 06:52
labster good night lizmat 06:54
06:55 FROGGS joined 06:56 gfldex left
masak 'night, lizmat 06:56
06:58 tinyblak_ is now known as akakcolin 06:59 araujo joined 07:02 darutoko joined 07:03 FROGGS[mobile] left 07:13 _mg_ left
psch welp, i need this explained to me /o\ 07:13
"At Frame 1, Instruction 5, op 'wval', operand 0, MAST::Local of wrong type (4) specified; expected 8"
gist.github.com/peschwa/f399cf10914f1d287a74
masak sounds a bit like a #moarvm question.
psch trying to port the jvm change to moar
07:14 amurf left
psch masak: yeah, i guess you're right 07:14
both backends are involved, though, as evident from the gist
RabidGravy would a thing that takes a bunch of "get_/set_" methods and turns them into a single attribute be sensibly called an "Attribute Adapter", "Accessor Facade" or some such? 07:18
moritz yes 07:20
or "Accessor Condensor"
RabidGravy hardest part of making software is making up names for things for me
masak making up names is non-trivial, yes. 07:21
moritz as they say, the two hardes parts of making software are naming, cache invalidatoin and off-by-one errors :-)
RabidGravy :-)
moritz *hardest
masak a slight consolation is that you don't have to get it right the first time :)
07:24 laouji left, laouji joined 07:30 SevenWolf left 07:34 zakharyas joined 07:40 Ven joined
moritz (off-topic) for $work, I'm building some continuous deployment pipelines. Here's an example dependency graph: moritz.faui2k3.org/tmp/continuous-deployment.png 07:40
it's quite some fun 07:41
masak moritz: oh, so you're one of those "dev ops" I keep hearing about? :)
Ven \o, #perl6!
masak o/ 07:42
moritz masak: kinda. For some time now I've managed the dev team <-> ops team interface 07:43
masak: and I'm trying to drive automation of our most unnerving, repetitive tasks
I guess that makes the devops, yes
masak moritz++ 07:44
sitting at an interface in a workplace is often very educational.
moritz and so far, we've managed to automate deployment to our staging environment ("qsu" in that picture, for "Qualitätssicherungsumgebung") 07:45
07:45 aindilis` left
moritz though DB schema changes still must be done manually 07:45
07:46 lolisa joined
masak "Quality assurance context"? 07:46
moritz umgebung = environment
masak ah, ok. yeah, that sounds better.
moritz: for DB schema changes -- though I know it might not be an option in this case -- have you seen sqitch.org/ ? 07:47
moritz masak: yes, I have 07:48
masak: "but it's not so simple" :/
we have some tooling to automatically generate SQL/DDL diffs
but sometimes, custom migrations are also needed; so we'd have to integrate switch with that tooling
then, rollbacks
masak *nod*
moritz we have changes that can't meaningfully be rolled back 07:49
so we'll have to develop some checkpointing mechanism
and make sure we don't automatically migrate over a checkpoint
or at least don't roll back over a checkpoint
masak "checkpoint" here seemingly meaning "something that shan't be rolled back over" 07:50
moritz yes 07:51
and maybe even two types of checkpoint
one for not rolling back over
one for not even upgrading automatically over
(though the latter is more rare)
masak ok.
moritz and maybe a third one for "only do this at night" :-) 07:52
masak :)
reify those types. will make you happy.
huh. I've heard and used the term "pipe dream" for many years, but I've never connected it back to its 1900-era opium etymology. until now.
moritz masak++ # bringing up "pipe dream" in connection with Continuous Delivery 07:53
it must be possible to mold that into a talk title 07:54
"Continuous Delivery: Pipe Dreams and Reality"
masak haha 07:56
masak is skimming S07-glr-draft 07:58
RabidGravy I'm having my regular daily stupid:
m: my @a = sub {}, sub {}; say all(@a) ~~ Callable
camelia rakudo-moar 2c58ee: OUTPUT«all(True, True)␤»
masak I'm not 100% sure I *want* a list concat operator in core Perl 6 -- it's easy to create one, just like with postfix:<!> -- but has infix:<++> been considered? there's prior art, in Haskell and probably other languages. 07:59
RabidGravy er, ook, it gives me False here
DrForr survived the trip from hell, and is *even* back at work the day after.
masak RabidGravy: think that changed recently.
wow. 0b60530645545b0ed893edc5ce6778fb16656209 marks *another* bug in the code I kvetched about in my latest blog post! 08:03
I missed the discussion around that.
masak backlogs
...no discussion, it seems. 08:04
FROGGS disagrees 08:05
now we can discuss :o)
08:06 abraxxa joined
masak actually, TimToady made two commits to the method that day. 08:06
08:09 yqt joined, yqt left 08:10 yqt joined 08:13 davido__ left 08:16 davido__ joined 08:20 uncleyear left 08:21 uncleyear joined 08:26 rindolf left
masak FROGGS: well, I think TimToady's changes are both for the better. 08:27
unlike the thing I blogged about, though, they don't make me smack my forehead and go "d'oh! we should have known better than to walk into this one!" 08:30
rather the reverse, actually. connection sign() to Order seems to be a very creative process. 08:31
I would say that the current code relies on the (rather safe) assumption that every orderable, numifiable type has only one zero.
08:33 pat_js joined 08:34 [Sno] joined 08:37 bin_005 joined
moritz says the one who argued for distinct -0e0 and +0e0 :-) 08:38
masak hah! 08:40
touché.
those two *are* distinct value objects, yes. but they are the same *number*.
*that* was the subtle distinction I was arguing for.
since we're numifying here, the difference between -0e0 and +0e0 doesn't come into play. 08:41
moritz I know, just wanted to taunt you a bit
DrForr True, they are near positive and negative epsilon :)
masak DrForr: hie the hence with your nonstandard analysis! :P 08:42
masak hugs the Archimedian property ever so tightly
thee*
08:42 uncleyear left 08:43 uncleyear joined
masak dean* 08:47
[Tux] koffie 08:48
moritz only knows the Archaeopteryx 08:49
08:51 espadrine joined
masak the Archimedean property says that if you lay enough copies of a shorter interval end-to-end, you can always exceed a given longer interval. 08:51
with things like epsilons, or infinitesimals, or infinities, this property does not hold on the number line.
moritz and neither does it in 3D :-) 08:52
masak modern calculus prefers to phrase things in terms of limits.
08:53 _mg_ joined 08:54 larion joined 08:55 abraxxa left 08:59 abraxxa joined 09:02 aindilis joined, amurf joined
masak ...but (to bring it back to Perl 6) IEEE 754's consideration of +0e0 and -0e0 as being different *is* more reminiscient of infinitesimals than of anything else. 09:04
09:04 lolisa left
masak well, different but numerically equivalent :) 09:04
as far as I've been able to understand, the two major uses for -0e0 in the standard are limits/underflows, and cuts in the complex plane. 09:05
09:06 mrf joined 09:07 laouji left, amurf left 09:09 laouji joined 09:13 bin_005_l joined 09:14 bin_005 left, MilkmanDan left 09:17 larion left 09:18 larion joined 09:26 abraxxa left, abraxxa joined 09:27 Ven left 09:32 uncleyear left 09:33 uncleyear joined 09:50 akakcolin left 09:55 diana_olhovik_ left 10:04 diana_olhovik_ joined 10:07 uncleyear left, uncleyear joined 10:08 Akagi201 left 10:16 bin_005_l left 10:17 bin_005_l joined 10:33 davido__ left 10:34 davido__ joined 10:38 andreoss joined 10:45 RabidGravy left
andreoss m: subset Y of Int where 1..10; my Y @x; @x.push: 10; @x[0]++ ; @x.perl.say 10:48
camelia rakudo-moar 2c58ee: OUTPUT«Array[Y].new(11)␤»
andreoss m: subset Y of Int where 1..10; my Y @x; @x[0] = 10; @x[0]++ ; @x.perl.say
camelia rakudo-moar 2c58ee: OUTPUT«Type check failed in assignment to '@x'; expected 'Y' but got 'Int'␤ in block <unit> at /tmp/1211Xh_ZOc:1␤␤»
andreoss why pushed value is not type checked?
moritz because bug 10:49
I guess that push doesn't create the right Scalar container for the new elemnt
10:52 amurf joined
andreoss reported 10:52
10:53 gagalicious left
moritz andreoss++ 10:54
10:56 amurf left 10:59 uncleyear left, uncleyear joined
itz_ I suppose error messages are more likely to be interactive and p6doc processing batch driventop 11:00
oops command line history-- 11:02
11:05 larion left 11:07 larion joined 11:08 bin_005_l left 11:09 _mg_ left, telex left, smls joined 11:10 telex joined
smls good * 11:10
yoleaux 05:22Z <TimToady> smls: see irclog.perlgeek.de/perl6/2015-06-17#i_10760273 for the real reason your expression wasn't lazy
05:47Z <TimToady> smls: thing is, 1, [\*] 1..* is now considered 2 elements, and you asked for 10, so of course it was trying to completely evaluate the second element of your list, which happens to be infinite
smls TimToady: ah :) 11:11
Hm, but why does it need to completely evaluate the elemant just to say/gist it? 11:12
doesn't postcirfumfix:[] preserve the lazyness of the List element it returns?
11:13 Akagi201 joined 11:16 _mg_ joined 11:21 _mg__ joined, _mg_ left, _mg__ is now known as _mg_ 11:35 cognominal joined
DrForr modules.perl6.org has two entries for 'Readline' (one is for 'ReadLine'), seeing if that's something wrong in the github repo. 11:37
Oh, interesting, just noted the different synopses. 11:39
11:46 uncleyear left, uncleyear joined 11:48 lolisa joined 11:54 FROGGS left 11:56 luc3 is now known as coffee` 12:00 emperiz joined 12:02 coffee` left 12:03 coffee` joined 12:08 yqt left
smls I think postfix:<++> doing .succ instead of +=1 is kind of a WAT 12:11
++ looks like + which coerces to Numeric 12:12
hoelzro o/ #perl6 12:14
12:15 larion left 12:16 larion joined
colomon smls: postfix:<++> working on strings to give you non-numeric result is very well-established Perl behavior. but I do see your point... 12:19
12:19 Ven joined, Sqirrel joined 12:20 larion left, uncleyear left 12:21 uncleyear joined
DrForr The 'successor' does give you a hint that it's more generic than just integer types, S(x) works on more general sets. 12:21
12:22 larion joined 12:27 aborazmeh joined, aborazmeh left, aborazmeh joined 12:28 laouji left
hoelzro bartolin: I figured out that chained assignment bug, if you're curious: rt.perl.org/Ticket/Display.html?id=125407 12:34
smls m: my Real() $x; 12:37
camelia rakudo-moar 2c58ee: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3nYmT_9ElY␤Coercion Real(Any) is insufficiently type-like to qualify a variable␤at /tmp/3nYmT_9ElY:1␤------> 3my Real() $x7⏏5;␤ expecting any of:␤ constraint␤»
smls ^^ why is this not allowed?
hoelzro m: Regex.new
camelia rakudo-moar 2c58ee: OUTPUT«Cannot make a Regex object using .new␤ in block <unit> at /tmp/MgJYU_9yW8:1␤␤»
hoelzro is Regex.new supposed to do anything? a roast test is failing because it's expecting Regex.new to not fail 12:38
12:41 amurf joined 12:45 amurf left 12:50 gagalicious joined, yoleaux left, yoleaux joined, ChanServ sets mode: +v yoleaux
dalek kudo-star-daily: d5e0154 | coke++ | log/ (2 files):
today (automated commit)
12:51
12:53 itz joined
[Coke] moritz: I am being transitioned into devops here. I may rely on you for mental health. :) 12:55
smls What's the difference between submethod BUILD($!attr) {*} and submethod BUILD($!attr) {} 12:59
is the * meaningful to the parser in some way?
also, why are we not allowed to leave off the block completely and terminate with a semicolon: 13:00
submethod BUILD($!attr);
hoelzro so the release is coming up tomorrow, and I happen to be the release manager 13:05
does this month's release have a name yet?
smls m: say pi.WHAT 13:10
camelia rakudo-moar 2c58ee: OUTPUT«(Num)␤»
smls didn't pi use to be a Rat?
13:10 akakcolin joined
moritz nope 13:10
[Coke]: congratulations, condolences, whatever you feel is appropriate :-) 13:11
[Coke]: fwiw I found "Continuous Delivery" by Humble and Farley very helpful 13:12
nwc10 no, not even in Indiana 13:13
hoelzro also, I'm supposed to go through RT tickets that "might need resolving". Could any past release managers clue me in on the criteria they used to select these? 13:18
moritz hoelzro: the question you have to ask yourself is "would this bug prevent me from use the compiler?" 13:20
if yes, it needs resovling
hoelzro ok, good metric
I take it going through tickets filed since the last release is probably far back enough?
moritz yes 13:21
hoelzro alright, cool
how do we decide on a release name? 13:22
or has that been decided already?
moritz I don't know of such a decision yet
and you can decide it
13:22 aborazmeh left
moritz usually, you look for conference with P6 content (YAPC::NA!), and if there was one, the closes perl mongers group would be a good release name :-) 13:23
if not, just pick any pm group you want, which hasn't had a release named after it
hoelzro oh, that's easy then, assuming we don't have a SaltLakeCity release =)
andreoss m: my %h{Int}; %h = 1=>"x" || 4=>"y"; say %h.perl; 13:25
camelia rakudo-moar 2c58ee: OUTPUT«Hash[Any,Int].new(1 => :x("y"))␤»
andreoss m: my %h{Int}; %h = (1=>"x)" // (4=>"y"); say %h.perl; 13:26
camelia rakudo-moar 2c58ee: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vyGAF0p8qO␤Unable to parse expression in parenthesized expression; couldn't find final ')' ␤at /tmp/vyGAF0p8qO:1␤------> 3 %h = (1=>"x)" // (4=>"y"); say %h.perl;7⏏5<EOL>␤»
andreoss m: my %h{Int}; %h = (1=>"x") // (4=>"y"); say %h.perl;
camelia rakudo-moar 2c58ee: OUTPUT«Hash[Any,Int].new(1 => "x")␤»
moritz hoelzro: seems we don't. saltlake.pm.org/
andreoss m: my %h{Bool}; %h = (True=>"x") // (4=>"y"); say %h.perl;
camelia rakudo-moar 2c58ee: OUTPUT«Type check failed in binding key; expected 'Bool' but got 'Str'␤ in block <unit> at /tmp/KCdOEtmcWG:1␤␤»
andreoss how do i prevent hash key from stringification here? 13:27
besides of Bool::True
geekosaur andreoss, %h{Bool} means Str keys and Bool values. I think you want %h{Str,Bool} or something like that? 13:28
moritz or just "my Bool %h" 13:29
andreoss m: my %h{Bool, *}; %h = (True=>"x") // (4=>"y"); say %h.perl;
camelia rakudo-moar 2c58ee: OUTPUT«Hash[Any].new("True" => "x")␤»
andreoss m: my %h{Bool, *}; %h = (True=>"x") // (4=>"y"); say %h.keys».perl;
camelia rakudo-moar 2c58ee: OUTPUT«"True"␤»
moritz which automatically constrains the value type to Bool, and leaves the keys to be coercing Strs
andreoss my Y %h{Z}; keys are Z? 13:30
so I can't have typed keys (not just constrained against some type) inside Hash? 13:37
TimToady yes, you can have typed keys
Ven just spent an hour "teaching" perl6 to some school peeps
I should've gotten a bottle of water. my throat... But it all went well, and people were impressed by how it looks :) (even if they were scared by "perl" before) 13:38
masak Ven: \o/
Ven++
13:38 skids joined
masak Ven: let me tell you, I'd come to one of your Perl 6 classes. :) 13:38
Ven (live coded during an hour, I just failed on the grammars for some reason, dunno what went wrong) 13:39
andreoss TimToady: but they end up as Strs with .keys
Ven masak: you'd just be correcting my mistakes all over the place :P
hoelzro \o/
andreoss m: my %h{Bool, *}; %h = True=>"x"; say %h.keys[0].WHAT;
camelia rakudo-moar 2c58ee: OUTPUT«(Str)␤»
TimToady that's not how you write it
andreoss m: my Str %h{Bool}; %h = True=>"x"; say %h.keys[0].WHAT; 13:40
camelia rakudo-moar 2c58ee: OUTPUT«Type check failed in binding key; expected 'Bool' but got 'Str'␤ in block <unit> at /tmp/efCAknMRAw:1␤␤»
moritz => autoquotes
m: my Str %h{Bool}; %h{True} = 'x'; say %h.keys[0].^name 13:41
camelia rakudo-moar 2c58ee: OUTPUT«Bool␤»
PerlJam good morning
masak Ven: ...probably. but I'd do it in a very appreciative way. :P
Ven :P
Ven showed moritz++'s json::tiny, the blogs, jnthn++'s debugger, jnthn++'s oo-{monitors,actors}, and rosettacode at the end 13:42
andreoss moritz: it does when i use just True, with Bool::True it doesn't 13:43
or i'm wrong
PerlJam andreoss: Bool::True isn't a bareword
TimToady m: my Str %h{Bool}; %h = (True) => "x"; say %h.keys[0].WHAT;
camelia rakudo-moar 2c58ee: OUTPUT«(Bool)␤»
masak how do you define a bareword? something that isn't quoted but parses as a string? 13:44
TimToady m: my Str %h{Bool}; %h = True, "x"; say %h.keys[0].WHAT;
camelia rakudo-moar 2c58ee: OUTPUT«(Bool)␤»
masak in that case, I posit that the only place where Perl 6 allows barewords is before '=>'
TimToady I try to avoid the term "bareword", since that has a technical meaning in P5 13:45
it's just an identifier
and => quotes it retroactively here
masak it was that technical meaning I was curious about
TimToady "If a bare identifier has no other interpretation in the grammar, it is taken as a string."
masak o.O 13:46
TimToady it actually relies on a reduce/reduce error in yacc
masak O.O
Ven ooh, I used parse instead of subparse -.- 13:47
[Coke] hoelzro: if you do the nqp release, note that there's a PortFile in there for macports, but it's not part of ports yet, so if you do update it, there's no place to submit it yet.
(whereas the moarvm port does need to be updated and submitted) 13:48
hoelzro [Coke]: so update the PortFile for NQP, but don't submit?
but *do* submit the MoarVM PortFile?
TimToady anyway, by the P5 definition, P6 has no barewords.
[Coke] hoelzro: yes and yes, I think. 13:50
hoelzro alright
[Coke] I am happy to submit the moarvm file if needed. directions are in the moarvm repo.
(nqp doesn't have anything in the release guide, but does have standalone directions, just wanted to prevent confusion) 13:51
PerlJam m: say (foo'bar => 42).perl 13:52
camelia rakudo-moar 2c58ee: OUTPUT«:foo'bar(42)␤»
PerlJam I guess I just need to update my idea of "identifier" to be more in line with perl 6 so that I will stop using the term "bareword"
(or something ... I still think of them as barewords) 13:53
masak m: say (don't-stop-me-now => "I'm having such a good time").perl 13:54
camelia rakudo-moar 2c58ee: OUTPUT«:don't-stop-me-now("I'm having such a good time")␤»
masak say (:I'm-having-a-ball).perl
m: say (:I'm-having-a-ball).perl
camelia rakudo-moar 2c58ee: OUTPUT«:I'm-having-a-ball␤»
masak .u ⛹ 13:55
yoleaux U+26F9 PERSON WITH BALL [So] (⛹)
PerlJam heh
13:55 Ven left
TimToady o_O how come I never saw that character before? 13:55
masak maybe it's new? 13:56
TimToady at 26F9?
PerlJam still hasn't seen it as my terminal isn't smart enough to be able to show it.
TimToady shows up here, so can't be that new... 13:57
m: say uniprop('⛹', 'age')
camelia rakudo-moar 2c58ee: OUTPUT«5.2␤»
TimToady I love that property :) 13:58
masak wow. 13:59
don't know if I've said it before, but vim commands are strangely consistent.
[Coke] m: say uniprop('a','age');
camelia rakudo-moar 2c58ee: OUTPUT«1.1␤»
[Coke] no one uses 1.0
TimToady 1.0 didn' thave ASCII yet
14:03 Ven joined
masak 1.0 only had '1'. not even '0', only the NUL character. :P 14:04
those were hard, bleak times. uphill both ways. 14:05
PerlJam English is hard sometimes. It's taken me 30 minutes to write a 3 sentence email because I reread the email I'm responding to and realized that they may have asked a different question than what I originally thought, so I re-read the thread to make sure that I understood what they were asking in context. 14:09
andreoss is there something better than .Bag.Hash.invert to get a hash of counted values? 14:10
TimToady a bag is supposed to be a hash already, from the standpoint of .invert; if not, it's a bug 14:11
m: say bag(<a b b c c c>).invert.perl 14:12
camelia rakudo-moar 2c58ee: OUTPUT«(1 => "a", 3 => "c", 2 => "b")␤»
hoelzro if I prepare MoarVM, NQP, and Rakudo tarballs tonight (my time), will someone help me upload them tomorrow morning?
smls Can someone double-check if this looks sensible? rosettacode.org/wiki/Vector#Perl_6
andreoss m: say bag(1.1, 2.3, 1.1).invert.perl 14:13
camelia rakudo-moar 2c58ee: OUTPUT«(2 => 1.1, 1 => 2.3)␤»
[Coke] hoelzro: I can help with the rakudo/nqp ones at least.
PerlJam hoelzro: me too if Coke's not around
[Coke] not sure I have moarvmprivs
andreoss m: say bag(True, False, True).invert.perl
camelia rakudo-moar 2c58ee: OUTPUT«(2 => Bool::True, 1 => Bool::False)␤»
hoelzro \o/
TimToady smls: re semi vs block stubbing, P6 reserves semicolon forms for declaring things that take the rest of the block as the body of the declarand
hoelzro I'll be honest, I'm a little nervous about doing this release =/
TimToady and {...} is clearer to the reader
hoelzro first time for everything, though 14:14
PerlJam hoelzro: why nervous? What's the worst that could happen?
hoelzro PerlJam: I guess that the release doesn't go out on time
TimToady we could cut your pay in half :P
PerlJam smls: "substract" seems to have one too many esses
TimToady we could say "hoelzro is a froo froo!" 14:15
we could, I dunno, have a party
hoelzro TimToady: no, don't cut my pay! =P
smls PerlJam: fixed
TimToady we could, like, delay Christmas by a corresponding amount...
[Coke] Oh, we already have "is required" in one place. huh. 14:16
PerlJam half expects to reload and see "ubstract" now ;)
14:16 Begi joined
smls :P 14:16
TimToady: But isn't that what the unit keyword is for? 14:17
TimToady is being hounded to pack so we can --> Jackson, WY
smls: well, unit has an extra meaning of hoisting the name declaration to the outside of the file, as it were
dalek kudo/2015.06-prep: 0934682 | hoelzro++ | docs/ (2 files):
Add first draft of release announcement for 2015.06
14:18
14:18 emperiz left 14:19 zoosha left 14:20 zoosha joined
PerlJam hoelzro++ you've gotten the hard part of the release out of the way (picking a name) 14:20
smls m: class A; has $.a 14:21
camelia rakudo-moar 2c58ee: OUTPUT«Saw 1 occurrence of deprecated code.␤================================================================================␤Semicolon form of 'class' without 'unit' seen at:␤ /tmp/yAJXM4rRjA, line 1␤Deprecated since v2015.4, will be removed with release…»
14:21 Ven left
masak TimToady: re "rest of the block as the body of the declarand" -- where can I read more about this? should I think of semicolon almost as a right-associative infix operator? 14:21
smls TimToady: But the semicolon form without 'unit' has no meaning at all after the deprecation, does it? 14:22
masak oh, it was in the context of module declarations. never mind then.
[Coke] m: my bool $a;
camelia rakudo-moar 2c58ee: OUTPUT«5===SORRY!5===␤Type 'bool' is not declared. Did you mean any of these?␤ Bool␤ Cool␤␤at /tmp/65xBHpR5gT:1␤------> 3my bool7⏏5 $a;␤Malformed my␤at /tmp/65xBHpR5gT:1␤------> 3my7⏏5 bool $a;␤␤»
smls masak: routines too :P
PerlJam wait ... what? 14:23
smls m: sub a;
camelia rakudo-moar 2c58ee: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4ugZqJXdkm␤A unit-scoped sub definition is not allowed except on a MAIN sub;␤Please use the block form.␤at /tmp/4ugZqJXdkm:1␤------> 3sub a;7⏏5<EOL>␤»
hoelzro PerlJam: =)
masak m: class Cat {}; say "I was bitten by a ", Bat # :)
camelia rakudo-moar 2c58ee: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9Je_QoROEu␤Undeclared name:␤ Bat used at line 1. Did you mean 'Rat', 'Bag', 'Cat'?␤␤»
PerlJam ah, only on MAIN really
masak m: sub MAIN(); 14:24
camelia ( no output )
masak needs to be `unit sub MAIN();`, no? 14:25
should be an error, no?
smls Haven't seen anyone write a brace-less sub MAIN, but seen lots and lots of {*} dangling at the end of routine declarations (nativecall code, submetod BUILD, ...)
14:26 uncleyear left
masak smls: that's different. 14:26
andreoss m: sub xxx returns Hash[Int,Int] { Hash[Int,Int].new(1,2) }; xxx().perl.say
camelia rakudo-moar 2c58ee: OUTPUT«Hash[Int,Int].new(1 => 2)␤»
smls Doesn't that make the meaning of ; terminated declarations incorrectly huffmanized?
:)
masak smls: but it's interesting that you conflate those. as a Perl 6 person, I don't.
smls I don't conflate, I contrast
andreoss m: sub xxx returns Hash[Int,Int] { 1 => 2 }; xxx().perl.say
camelia rakudo-moar 2c58ee: OUTPUT«Type check failed for return value; expected 'Hash[Int,Int]' but got 'Pair'␤ in any return_error at src/vm/moar/Perl6/Ops.nqp:639␤ in sub xxx at /tmp/1sR7gqq3hS:1␤ in block <unit> at /tmp/1sR7gqq3hS:1␤␤»
smls I think?
cognominal $a.?method calls method if it exists for $a. What is the chainable idiom for the expression to return False if $a gives False in boolean context?
14:26 uncleyear joined
PerlJam smls: I don't get your point in that case. 14:27
masak cognominal: `$a && $a.method`
cognominal that's not chainable
masak could you specify what you mean by "chainable" here? 14:28
smls The point was that by no longer allowing "sub MAIN;" to mean what it does, one could instead allow submethod BUILD($!attr); to mean submethod BUILD($!attr) {*};
masak it's possible to chain `&&`s
cognominal masak: $a.?amethod.?another.?yetanother
smls "sub MAIN;" would then have to be written "unit sub MAIN;" or similar
14:29 domidumont joined
andreoss can i avoid such repetition as above? 14:29
cognominal that syntax is used for that in some languages : coffeescript I think and langs derived from it.
[Coke] is there a hook that is run after an object goes through new/BUILD ?
cognominal m: say Nil?.foo 14:30
camelia rakudo-moar 2c58ee: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Jee_hgnMVA␤Bogus postfix␤at /tmp/Jee_hgnMVA:1␤------> 3say Nil7⏏5?.foo␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ statement m…»
masak cognominal: well, having a `&.` dotty for that would make sense to me.
andreoss [Coke]: you could use ENTER {} and LEAVE {}
masak I don't think dotty ops can be defined in user space yet.
[Coke] andreoss: I need it for -all- objects, all BUILDs. 14:31
smls masak: $foo&.method is currently parsed as all($foo, $_.method) I think
[Coke] (trying to add a trait to attributes, need a place to deal with the trait during object creation)
masak smls: only because there is no dotty op that would win the LTM. 14:32
smls cognominal: .?method exists, but it means "call the method if it can be found on the object", not "call the method if the object is defined"
which is subtly different
14:33 domidumont left
cognominal I am wrong, lsc uses ?. for that. So there is no conflict with .? 14:33
smls ah, you already said that.
14:34 domidumont joined
cognominal I think ?. would be used way more often than .? But anyway, there is not conflict. 14:34
smls m: say ($_ andthen *.uc) for Any, "foo" 14:35
camelia rakudo-moar 2c58ee: OUTPUT«(Any)␤FOO␤»
cognominal On the other hand, you must not be dyslexic, but that is true in many other places
smls yeah, the .? .+ .* method call forms don't seem to be used that much 14:36
masak there was something with them that I felt made them much less useful than they could be. I forget the details, though.
cognominal I also miss |> and <| in Perl 6 also I don't know what should be the exact precedence. 14:37
[Coke] seen jnthn?
.seen jnthn?
yoleaux I haven't seen jnthn? around.
[Coke] .seen jnthn
yoleaux I saw jnthn 16 Jun 2015 17:58Z in #perl6: <jnthn> dinner &
14:37 AlexDaniel joined
masak famous last words. 14:40
14:40 skids left 14:42 _mg_ left
PerlJam gah, english is hard part 2. Despite my (IMHO) perfectly clear 3 sentence email, now they're asking for something that I said in sentence #1 again. 14:43
PerlJam responds with a one sentence email that uses the same sentence structure as the querent.
tadzik try to resist sending the same email with reordered sentences :P
masak just re-send sentence #1. 14:44
but in all-caps this time.
masak , life coach
tadzik on hoge
masak yes, send them a hoge.
14:45 lolisa left
dalek p: 9852c9e | hoelzro++ | src/HLL/Grammar.nqp:
Don't clobber prec in precedence hash

Fixes RT #80614 Fixes RT #120704 Fixes RT #125407
The issue is that the operator precedence table from HLL::Grammar (used for both Grammar.O and Grammar.EXPR) has a hash of hashes, the values of which specify things like precedence and associativity. For example, the hash contains something like the following for the key '%list_assignment':
   { :prec<i=>, :assoc<right>, :sub<e=> }
The 'sub' key is the...umm, key here. After handling some things with
  %inO<prec> in HLL::Grammar.EXPR, %inO<sub> is assigned to %inO<prec> -
changing the precedence of list assignment from 'i=' to 'e=' *globally*.
Instead of modifying the precedence hashes returned through the matches, this patch checks subprecedence ('sub') before precedence ('prec') when fetching the precedence for an operator in the precedence table.
14:46
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...l?id=80614
Link: rt.perl.org/rt3/Public/Bug/Display...?id=120704
Link: rt.perl.org/rt3/Public/Bug/Display...?id=125407
kudo/nom: 0934682 | hoelzro++ | docs/ (2 files):
Add first draft of release announcement for 2015.06
kudo/nom: 9b1e856 | hoelzro++ | tools/build/NQP_REVISION:
Bump NQP revision to take advantage of precedence fix
ast: 07da8c0 | hoelzro++ | S03-operators/assign.t:
RT #80614 is no longer TODO

It's TODONE!
14:47
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...l?id=80614
tadzik TODONE!
PerlJam while I'm slightly annoyed at the amount of stuff dalek just sent, I'm at the same time intrigued by it and want to know more :)
[Coke] ok, I have "is required" parsing on attributes, setting a new "required" flag on the Attribute itself. Just need a place to hook in the check. 14:49
14:50 elimik31 joined, maettu left
geekosaur todo/tada 14:51
DrForr Has Perl6::Grammar been exposed appropriately yet?
masak what's a subprecedence? 14:52
DrForr: no :( 14:53
DrForr: I think it may well be exposed inappropriately, though. with some work.
dalek kudo/attr-isrequired: 212c0c0 | coke++ | src/ (3 files):
Add a required attr to Attributes

If "is required" is present, set the attr.
not yet enforced
DrForr That sounds fragile. I was going to try to finish up the last grammar bits this week so I could move on to perl6tidy. 14:54
14:55 uncleyear left 14:56 uncleyear joined
masak DrForr: if you could wave a magic wand and make any API appear without any work on your part involved, what would it look like? 14:57
14:57 zoosha left
PerlJam Coke: maybe look how attribute initialization happens? like when you've said "has $.foo = blah;" Since blah would have to run each time the object is created, seems like that would be about the time to check for "is required" 14:57
14:57 zoosha joined 14:58 domidumont left
DrForr Uh, I'd have to be more awake than I am now in order to think about that. 14:58
[Coke] PerlJam: build_closure looked promising, but I didn't see where it was used. 15:01
hoelzro masak: something I didn't know about until I dug into those tickets
I'm still not sure what it is =/
it's something like precedence when considering something as a postfix/prefix operator, I think
masak hoelzro: if you find out, let me know.
DrForr I'd just as soon build my own AST, so just exposing the match tree would make me happy.
masak anyway, hoelzro++ 15:02
hoelzro jnthn may know more, he wrote it =)
PerlJam hoelzro++ but you should have some extra karma for tracking down that bug! :)
15:02 gfldex joined
masak DrForr: I can't help but think you might be very happy dealing with the future hypothetical Qtree for what you want to do. 15:02
hoelzro [Coke]++ # required trait
[Coke] ah, can make a closure that dies and then use --ll-exception, I guess. 15:03
DrForr masak: Link to an idea?
masak DrForr: hold on. maybe.
hoelzro is surprised that "hoge" doesn't come up in Google Images with a Shiba wearing a pig costume 15:04
masak DrForr: strangelyconsistent.org/blog/macros...long-break -- grep for "Secondly"
DrForr reads the IRC log. 15:05
masak is glad he wrote that post, but also wants to write more about this 15:06
it's like a brain/blog bottleneck right now.
DrForr QAST::Op sounds like the right level of abstraction for what I'm after, that way I can "just" return a decorated string, but that feels too low-level for macro use. 15:07
[Coke] ah, src/Perl6/Metamodel/BUILDPLAN.nqp looks promising
Begi my @liste = 'a', 'b', 'c'; my $letter = 'a'; first-index(@liste $letter); 15:09
15:09 JimmyZ_ joined
Begi Where is the problem ? Thanks. 15:09
PerlJam Begi: I believe that the compiler tells you where. 15:10
m: my @liste = 'a', 'b', 'c'; my $letter = 'a'; first-index(@liste $letter);
camelia rakudo-moar 2c58ee: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2INDpAgOhJ␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/2INDpAgOhJ:1␤------> 3c'; my $letter = 'a'; first-index(@liste7⏏5 $letter);␤ expecting any of:␤ …»
itz m: say $*IN.t
camelia rakudo-moar 2c58ee: OUTPUT«Cannot find method 'isatty': no method cache and no .^find_method␤ in block <unit> at /tmp/ulzq4EfffT:1␤␤»
masak Begi: looks like there should be a comma (`,`) after @liste, before $letter 15:12
Begi: generally, when you call a sub, there should be a comma between arguments you pass in. 15:13
PerlJam Begi: also, assuming the lack of comma is a transcription error, you've got the args to first-index() reversed.
JimmyZ_ masak: Do you know what Qtree is? And what will it improve?😊 15:14
timotimo [Coke]: yes, buildplan is a good place to start
DrForr JimmyZ_: I don't think he means Quadtrees :)
[Coke] is pretty sure he has a plan, but will have to finish this up post dayjob. woot 15:15
sjn notes that "rakudobrew build parrot" doesn't work any more
It bails with the error "Unknown option: gen-parrot" 15:16
JimmyZ_ sjn: it is known
sjn perhaps turn off the parrot option in rakudobrew?
tadzik Please open a ticket :) 15:17
sjn or at least add a short statement that it's for people who want to hack on it to make it work again :)
tadzik And query me, because I want to query you but my mobile client can't
DrForr masak: QAST already seems to exist and it looks ... at least viable. I'll check that out tonight.
moritz .tell colomon you seem to have several cron-started smoker instances running on hack.p6c.org. Please use something like "flock -n smoker.lock -c /home/colomon/SmokeResults/smoke_test" to protect against multiple executions 15:18
yoleaux moritz: I'll pass your message to colomon.
colomon moritz: sorry about that
yoleaux 15:18Z <moritz> colomon: you seem to have several cron-started smoker instances running on hack.p6c.org. Please use something like "flock -n smoker.lock -c /home/colomon/SmokeResults/smoke_test" to protect against multiple executions
moritz colomon: no problem :-)
colomon the problem is it seems to be completely impossible to actually run a full smoke test at the moment.
so they keep adding up 15:19
I suppose I should say, actually *complete* a full smoke test
moritz the oldest is from 1st of June
ugexe perhaps youd do better testing 1 module at a time
15:19 diana_olhovik_ left
moritz so, protect with flock and/or set a timeout 15:19
colomon ugexe: that wouldn’t help
setting a timeout is probably the thing. 15:20
but that’s an area I don’t really know anything about.
ugexe colomon: it would keep naughty threads from certain modules that seem to always ruin the smoke test run from affecting the rest
colomon ugexe: no, the smoke test is not in parallel now
ugexe im well aware
that doesnt stop the perl6 process from being loaded the entire time to run panda 15:21
moritz colomon: man 1 timeout
flussence moritz++ # wow, I had *no* idea that existed and I've wanted something like it so often 15:22
moritz timeout -k 10m 5h yoursmokerprocess
colomon moritz++ indeed
ugexe: I’m completely failing to see how that would help? so you create a fresh p6 to run panda for just that module, which hangs. that p6 is still loaded for the duration of the hang. 15:23
ugexe no, you are preventing a ton of modules from being loaded into the currently running perl6 process running panda
moritz flussence: I googled, and came across an SO answer
flussence every so often I find out about something I've already got installed that I never knew about :) 15:24
15:24 uncleyear left
hoelzro since test 7 in t/spec/S17-lowlevel/lock.rakudo.moar always seems to fail, should I fudge that for the 2015.06 release? 15:25
moritz it's in coreutils (on Debian at least)
15:25 uncleyear joined
flussence (last month I found out `findmnt` existed, which is way more readable than `mount`) 15:25
moritz wow, flussence++ # findmnt 15:26
arnsholt Oh, neat!
flussence++ indeed
PerlJam flussence++ indeed (learn something new every day) 15:27
flussence I'm guessing that's a "new" thing, cause it uses fancy unicode lines...
moritz so, probably not more than 10 years old :-)
PerlJam docs on my system are from 2010 15:28
colomon ugexe: I’m not sure that’s an accurate description of how the smoker works? If you use panda to install a module, it doesn’t actually load the module in the process, does it?
generally speaking, what’s hanging is a shelled call out to prove 15:30
ugexe have you ever noticed teters.perl6.org will get strings of 'N/A' tests always after the exact same modules sometimes?
colomon no, I don’t really look at testers.perl6.org 15:31
15:31 larion left
flussence is testers.perl6.org using the same data as smoke.perl6.org? 15:32
ugexe no, testers uses many different hardware/machines
it is the 'cpan testers' equivilent 15:33
Begi Why can't I use the first-index() sub ? My error is the following : 'Undeclared routine'. Sorry, I'm a beginner. 15:34
15:34 pat_js left 15:35 coffee` is now known as luc2`, luc2` is now known as coffee`, zakharyas left
PerlJam Begi: are you sure you're using Perl 6 to execute the code? 15:36
15:36 coffee` is now known as coffee, coffee is now known as Guest61597
Begi PerlJam : Yes. I think I should restart my installation ? 15:36
15:37 Guest61597 is now known as coffee`
ugexe is there even a subroutine for first-index? 15:37
Begi doc.perl6.org/routine/first-index 15:38
ugexe im talking about existing in the codebase
i see the method, but not the sub
flussence well I can't tab-complete it either, if that's any indication...
15:39 coffee` left, coffee` joined
[Coke] begi: you have some sample code you can put in a gist somewhere? 15:42
ugexe ah there it is 15:43
[Coke] m: say first-index { $^a % 2 }, 1..10;
camelia rakudo-moar 9b1e85: OUTPUT«0␤»
[Coke] m: my @a = 1..10; say first-index { $^a % 2 }, @a 15:44
camelia rakudo-moar 9b1e85: OUTPUT«0␤»
15:44 skids joined
PerlJam m: say first-index { $^a %% 2 }, 1..10; # wonder how often someone will use % when they mean %% ? 15:44
camelia rakudo-moar 9b1e85: OUTPUT«1␤»
Begi Coke : Sorry ? 15:46
15:46 uncleyear left
ugexe he is asking you to show an example that does not work 15:47
15:47 uncleyear joined
Begi my @liste = 'a', 'b', 'c'; my $letter = 'a'; first-index(@liste, $letter); 15:49
m: my @liste = 'a', 'b', 'c'; my $letter = 'a'; first-index(@liste, $letter);
camelia ( no output )
PerlJam Begi: again, you've got the parameter order switched.
[Coke] PerlJam: pulled it from S32-list/first-index.t 15:50
ugexe strange he would get an undeclared routine error though
instead of complaining about the signature
grondilu moritz++ (timeout) 15:51
15:51 yqt joined
PerlJam m: my @liste = 'a', 'b', 'c'; my $letter = 'a'; say first-index($letter, @liste); # Begi 15:51
camelia rakudo-moar 9b1e85: OUTPUT«0␤»
Begi m: my @liste = 'a', 'b', 'c'; my $letter = 'a'; say first-index($letter, @liste); 15:52
camelia rakudo-moar 9b1e85: OUTPUT«0␤»
ugexe maybe try the method version as well on your machine?
m: "abcde".comb.first-index("c").say
camelia rakudo-moar 9b1e85: OUTPUT«2␤»
Begi It works here, but it doesn't work at home... 15:53
PerlJam Begi: what version of rakudo are you running at home?
ugexe first-index was added over a year ago... so i hope its not *that* :)
PerlJam never can tell 15:54
15:54 diana_olhovik joined
Begi Perl6 version 2013.12 built on parrot 5.9.0 15:54
ugexe ouch
PerlJam ugexe: see? :)
[Coke] if it was 2015.04 it'd be ancient. :)
Begi Oups,... 15:55
ugexe how did you install rakudo by the way... was it a package manager?
Begi Yes, but I don't remember which... 15:56
ugexe for another couple months it would probably be best to use 'rakudobrew' for installing perl6
the distro packaging stuff is being worked on i think but isnt there yet
Begi Ok. I'll try to install perl6 with rakudobrew 15:58
colomon moritz: hmm, timeout doesn’t seem to work? 16:00
ugexe *puts note in calender to run and report smoke test on 3 year old rakudo*
moritz colomon: can you be more specific? I just tried it with a small test script, and it worked fine 16:02
colomon moritz: tried it, it kept running past the 5m I specified 16:03
moritz perlpunks.de/paste/show/55819a51.559c.305 # timeout example
colomon trying it again at the moment with different options
ah, got it to work that time 16:04
timeout -k 2m 1m sh SmokeResults/smoke_test
ugexe but that one datetime module takes like 10 minutes! :)
colomon testing purposes only 16:05
ugexe we really need to fix pandas --exclude option so it will exlude its arguments as dependencies as well
16:06 dha joined
colomon I’ve been thinking of expanding emmentaler with a blacklist, to try to skip these modules which are always hanging 16:06
ugexe panda has that already but it only ignores the base module 16:07
but yes, a proper blacklist would save some of our CPU cycles 16:08
colomon right, which means if someone else’s module uses the hanging module, you still get the hang
16:08 Psyche^ is now known as Patterner
ugexe hanging isn't even the worst. when they compeltely screw up the test run for all subsequent modules it makes working modules look like their health is bad 16:08
colomon ugexe: example? 16:10
ugexe colomon: is it always the same modules that do this on your smoke testers? or is it seemingly random
colomon historically it’s been reliably the same, but I haven’t really checked out the current batch of failures
ugexe you cant see the pattern because you can tlist by date. but here is what it looks like for a single module when it gets screwed up: testers.perl6.org/reports/45193.html 16:11
basically what happens is panda will bang through the tests (seemingly running them instantly, so probably just returning 0 instantly) 16:12
colomon how can you tell that from that report?
16:12 uncleyear left
ugexe because under 'most recent reports' you get a chronilogical list 16:12
and when that report came in you could see the pattern
16:13 dha left, uncleyear joined
[Coke] i have done nothing with this yet, but this seems like a timewaster that will get most folks here: boingboing.net/2015/06/09/tis-100-game.html 16:13
16:14 Ven joined
ugexe colomon: on testers.perl6.org/recent.html look at Net::Curl for 2015.5.130.g.2.fdef.2.e If you look above it, you can see something went wrong (although Pod::Strip slipped through) 16:17
they show no build or test output. i know many of those modules work fine
16:18 amurf joined 16:19 uncleyea1 joined, uncleyear left 16:23 amurf left
colomon ugexe: I am not at all convinced, based on poking about a bit. 16:23
ugexe: however, this is actually kind of easy to test. give me a few.... 16:24
16:25 Begi left 16:26 kst` left 16:29 muraiki joined 16:30 cognominal left
muraiki have you all seen the announcement about webassembly? brendaneich.com/2015/06/from-asm-j...bassembly/ 16:30
I don't quite know what it means for p6, but does this mean if you got rakudo+nqp to work in webassembly, then p6 should "just work" on top of that?
psch doesn't it just mean we have to get moar working in webassembly? 16:31
i mean, the p6 working on top of rakudo and nqp is rakudo, and rakudo needs nqp, and nqp needs one of moar or jvm 16:32
muraiki yeah, this is where I have begun talking about things I don't understand :)
oh I see
16:36 rafaalata joined 16:37 rafaalata left 16:38 domidumont joined
ugexe you only have to watch testers.perl6.org most recent list regularly to be convinced 16:39
i would see froggs smoking giving these patterns, which would be reproduced if i did a smoke test. at least until froggs randomized his test order 16:40
Ven muraiki: oh wow :o)
16:43 japhb_ joined, salv00 joined 16:44 vendethiel- joined, akakcolin left 16:45 vendethiel left, japhb left, Alina-malina left, salv0 left, dj_goku left
itz design.perl6.org/S32/IO.html#.fileno seems defunct .. how do I get the file descriptor? 16:47
16:47 uncleyea1 left 16:48 dj_goku joined, dj_goku left, dj_goku joined, uncleyear joined
colomon hurm, emmentaler seems to be completely broken now? 16:48
wait, needed to pull update 16:50
16:55 Alina-malina joined
colomon well, not what I was looking at before, but emmentaler still seems pretty broken-ish 16:58
16:58 lucasb joined
lucasb m: my %h = 'a'..'z' Z=> 1..26; say [+] %h<t w o h u n d r e d a n d f i f t y n i n e> 16:59
camelia rakudo-moar 9b1e85: OUTPUT«259␤»
colomon gist.github.com/colomon/0934919e1e2ef147693d
afk # noms
lucasb m: my %h = 'a'..'z' Z=> 1..26; say [+] %h<t w o h u n d r e d a n d f i f t y o n e>
camelia rakudo-moar 9b1e85: OUTPUT«251␤»
lucasb ^^ saw this on reddit :)
dalek pan style="color: #395be5">perl6-examples: 60a7653 | (Steve Mynott)++ | categories/cookbook/15interactivity/15-0 (5 files):
a few more simple examples
17:00
17:04 abraxxa left 17:06 _mg_ joined, uncleyear left, Patterner left 17:07 uncleyear joined 17:08 dakkar joined, lilgreen joined 17:09 itz left, dakkar left, dakkar joined
andreoss m: sub xxx returns Hash[Int,Int] { Hash[Int,Int].new(1,2) }; xxx().perl.say 17:10
camelia rakudo-moar 9b1e85: OUTPUT«Hash[Int,Int].new(1 => 2)␤»
andreoss how can i avoid such repetition of code?
jnthn What repetition?
Oh, mentioning the typename twice? 17:11
andreoss yes
jnthn Maybe use constant to create an alias?
andreoss m: sub xxx returns Hash[Int,Int] { my %h = 1,2 }; xxx().perl.say 17:13
camelia rakudo-moar 9b1e85: OUTPUT«Type check failed for return value; expected 'Hash[Int,Int]' but got 'Hash'␤ in any return_error at src/vm/moar/Perl6/Ops.nqp:639␤ in sub xxx at /tmp/HnSIu6hlMB:1␤ in block <unit> at /tmp/HnSIu6hlMB:1␤␤»
jnthn The error is correct; tye types are nominal.
*the
If you don't like the ceremony then don't write the "returns". It's
Just 'cus you *can* put type constraints into the code doesn't mean you're obligated to. 17:14
dalek rl6-roast-data: b2e42cf | coke++ | / (9 files):
today (automated commit)
jnthn bah, where'd the stray "It's" come from... 17:15
17:15 dakkar left
flussence if we can use ::T for the input side of the signature, why not on the output side too? 17:16
jnthn flussence: Uh...you could but it's a bit vacuous? "returns ::T" means "bind a type variable T at the point I return to the type of what I'm returning", but I'm not sure at that point how you're ever going to use it... ) 17:17
You normally use ::T in a sig so you can use it to ensure another parameter has a matching type or to use it in the body of the sub.
flussence std: sub xxx(--> Hash[Int,Int] ::T) { T.new(1 => 2) } # I mean, kinda like how S02:1820 uses it 17:20
synbot6 Link: design.perl6.org/S02.html#line_1820
camelia std 28329a7: OUTPUT«ok 00:00 146m␤»
17:20 brrt joined
jnthn oh.. 17:20
huh, that parses? :)
flussence only in std apparently :)
17:21 brrt left
jnthn I'm still curious when such a thing would bind :) 17:21
Maybe it's possible to do
sub xxx(--> Int %h{Int}) { %h{1} = 2 } 17:22
std: sub xxx(--> Int %h{Int}) { %h{1} = 2 }
camelia std 28329a7: OUTPUT«ok 00:00 145m␤»
jnthn That I can understand how could work (though it ain't impl'd)
ugexe apple open sourcing swift tho gonna hel 17:27
oops
17:31 uncleyear left, uncleyear joined 17:32 JimmyZ_ left
dalek kudo/nom: f97f9ad | lizmat++ | src/core/Array.pm:
Add typed Array versions of .push/.unshift

This should fix #125428
17:33
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125428
17:39 zakharyas joined
moritz Daughter No. 2 will be a big command line fan; she just opened 12 xterm instances on my workstation :-) 17:40
17:43 Ven left
dalek kudo/nom: dc41e61 | lizmat++ | src/core/List.pm:
Remove type checks from List.push/unshift

They are only needed for typed arrays anyway, right?
17:45
17:47 lucasb left
hoelzro is Regex.new supposed to do anything? 17:47
m: Regex.new
camelia rakudo-moar 9b1e85: OUTPUT«Cannot make a Regex object using .new␤ in block <unit> at /tmp/9KlzlSl0iK:1␤␤»
17:47 uncleyear left
hoelzro er, nevermind, that test was updated 17:47
17:48 uncleyear joined
lizmat hoelzro: that was a side-effect of Sub.new failing now 17:48
m: Code.new
camelia rakudo-moar 9b1e85: OUTPUT«Cannot make a Code object using .new␤ in block <unit> at /tmp/tLWwBdgJ_i:1␤␤»
hoelzro lizmat: ah, ok 17:49
lizmat I'm not sure what Regex.new would need to do
if It *would* need something, it would need to make its own .new I guess
jnthn I've no idea what they should do, and I can't imagine anything easy and meaningful for them to do, so I'd just have them fail for now. :) 17:50
s/fail/die/
Which it appears they are doing.
lizmat m: my Int @a; @a.push("a")
camelia rakudo-moar f97f9a: OUTPUT«Type check failed in assignment to '@a'; expected 'Int' but got 'Str'␤ in block <unit> at /tmp/dxfEZxOYKS:1␤␤»
lizmat m: my Int @a = 0; @a[0] = "a"
camelia rakudo-moar f97f9a: OUTPUT«Type check failed in assignment to '@a'; expected 'Int' but got 'Str'␤ in block <unit> at /tmp/8tBrHkGDlp:1␤␤»
lizmat yeah!
m: my Int @a; @a[0] = "a" 17:51
camelia rakudo-moar f97f9a: OUTPUT«Type check failed in assignment to '@a'; expected 'Int' but got 'Str'␤ in block <unit> at /tmp/YlRD1T1Pnj:1␤␤»
jnthn m: my Int @a; @a.push(0); @a[0] = 'oops'
camelia rakudo-moar f97f9a: OUTPUT«Type check failed in assignment to '@a'; expected 'Int' but got 'Str'␤ in block <unit> at /tmp/cU9yBLWjz2:1␤␤»
jnthn yay
lizmat m: my Int @a = 0; @a.push(1); @a[0] = "foo"
camelia rakudo-moar f97f9a: OUTPUT«Type check failed in assignment to '@a'; expected 'Int' but got 'Str'␤ in block <unit> at /tmp/y7ZoKjBEiT:1␤␤»
17:51 telex left
lizmat same for unshift :-) 17:51
hoelzro jnthn: did you see masak's earlier question about subprecedence? that was something we were wondering about, and I thought you may be able to shed some light on it 17:52
lizmat m: my Int @a; @a.unshift(1); @a[0] = "foo"
camelia rakudo-moar f97f9a: OUTPUT«Type check failed in assignment to '@a'; expected 'Int' but got 'Str'␤ in block <unit> at /tmp/a8G27eO6Uo:1␤␤»
17:52 telex joined 17:53 akakcolin joined
dalek ast: c2ace96 | lizmat++ | S09-typed-arrays/arrays.t:
Fudge wonky test that got borked by fixing #125428
17:53
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125428
dalek kudo/nom: 02c791e | lizmat++ | docs/ChangeLog:
Mention fixing #125428
17:54
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125428
jnthn hoelzro: I don't see any mention of subprecedence in the code...where'd you find that? 17:55
hoelzro jnthn: github.com/rakudo/rakudo/blob/nom/....nqp#L3496 17:56
18:01 espadrine left
jnthn I...have no idea o.O 18:02
18:04 larion joined 18:05 uncleyear left 18:06 uncleyear joined 18:07 kaare_ left
[Coke] local university just hit a y2k problem. lovely. 18:14
18:14 RabidGravy joined 18:15 rindolf joined
rindolf Hi all. 18:15
itz_ there is a leap second soon 18:19
18:23 uncleyear left 18:24 FROGGS joined, dha joined 18:25 uncleyear joined
[Coke] rakudo's release process has that covered. 18:26
18:27 _mg_ left
sergot hi ho \o 18:31
18:31 shmibs left
FROGGS o/ 18:34
dha So... if I have a suggestion of something that should be added to the Perl 5 to Perl 6 translation guide (assuming it's actually not there and I'm just not seeing it), where would I send such a suggestion? 18:35
18:35 zakharyas left
lizmat dha o/ 18:36
mentioning it here would be a start
then someone should pick it up and add it to the todo for documentation ?
18:37 shmibs joined
psch dha: doc.perl6.org has the link to the corresponding github file at the bottom 18:37
dha: you could create a PR there
(assuming you're talking about doc.perl6.org/language/5to6 as the translation guide)
FROGGS dha: are you talking about this? github.com/perl6/doc/blob/master/l...e/5to6.pod
dha: you can pull request changes to that file
psch o/ FROGGS 18:38
FROGGS hi psch
dha That link takes me to a page that yells at me POD ERRORS. :-)
psch github doesn't know POD6
18:39 [Sno] left
dha My question is, how does one handle undef values when porting from 5 to 6. doc.perl6.org/language/5to6 only tells me I can no longer undef &foo, nothing about using undef as a value. 18:39
bartolin good evening, #perl6 18:40
lizmat dha: undef has many shapes in Perl 6
bartolin hoelzro++ # fixing that strange precedence bug
lizmat usually it is just Any
m: my $a; say $a.WHAT
camelia rakudo-moar 02c791: OUTPUT«(Any)␤»
dha Ah. See, I would have thought it would be Nil.
At least in some contexts. 18:41
like "my (undef, $file, $line) = caller();"
lizmat Nil is a special value that will revert any container to its original state
18:41 lolisa joined
lizmat m: my ($,$a,$b) = 1,2,3); say $a; say $b 18:41
camelia rakudo-moar 02c791: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mMOT5Gzx6x␤Unexpected closing bracket␤at /tmp/mMOT5Gzx6x:1␤------> 3my ($,$a,$b) = 1,2,37⏏5); say $a; say $b␤»
lizmat m: my ($,$a,$b) = 1,2,3; say $a; say $b 18:42
camelia rakudo-moar 02c791: OUTPUT«2␤3␤»
lizmat m: my (Nil,$a,$b) = 1,2,3; say $a; say $b
camelia rakudo-moar 02c791: OUTPUT«Type check failed in assignment to 'anon'; expected 'Any' but got 'Int'␤ in block <unit> at /tmp/eauWVBSElI:1␤␤»
lizmat specifying an anonymous scalar works best in that case
Nil also doesn't disappear in a List 18:43
dha ok. I also see that caller() may not still exist. So on to shaving another yak.
lizmat m: my @a = (1,2,Nil,4); say @a.perl
camelia rakudo-moar 02c791: OUTPUT«[1, 2, Any, 4]<>␤»
smls Util: Isn't "0 ^.. 20" a somewhat strange way to say "1..20" ? 18:44
lizmat m: my $a is default(42) = 666; say $a; $a = Nil; say $a
camelia rakudo-moar 02c791: OUTPUT«666␤42␤»
rindolf bartolin: evening. 18:45
lizmat: hi! Are you in Portland currently?
lizmat rindolf: yes
dha Hm, also, what's an "anonymous scalar". And/or where would I find that information?
itz_ $ 18:46
18:46 bin_005 joined
lizmat m: my $ = 42 # an anonymous scaar 18:46
camelia ( no output )
lizmat $scalar
dha: good question, I hope someone else knows where this is documented 18:47
masak m: my $mark-twain = 42 # a pseudonymous scalar
camelia ( no output )
dha masak++
rindolf lizmat: ah, I see.
masak m: my $rasputin = 42 # an infamous scalar 18:48
camelia ( no output )
dha Yeah, I'm now trying to figure out how to replicate the functionality of caller(). I assume it's now some kind of method or set of methods on... something.
lizmat what do you want to know of the caller ? 18:49
dha Darn good question. Lemme look...
Apaprently the filename and the line. i.e. the second and third items returned by caller (in p5) 18:50
18:51 spider-mario joined
psch m: sub f { say callframe(1) }; f 18:51
camelia rakudo-moar 02c791: OUTPUT«CallFrame.new(level => 3, annotations => {:file("/tmp/pmJV1KqBWT"), :line("1")}<>, my => EnumMap.new("!UNIT_MARKER" => Mu, "\$!" => Mu, "\$/" => Mu, "\$=finish" => Mu, "\$=pod" => Mu, "\$?PACKAGE" => Mu, "\$_" => Mu, "\&f" => Mu, "::?PACKAGE" => Mu, "\@?IN…»
psch i *think* that's somewhat the right direction 18:52
although i remember callframe being underimplemented
i'm not sure if that's still true
dha Granted, what I'm working on may be better done in an entirely different way in p6, but I'm going bit by bit here...
18:52 SHODAN joined
lizmat callframe(1)<annotations><file> seem to be a good candidate 18:53
dha Ah... And this is documented... where? :-)
18:53 uncleyear left
lizmat actually: 18:54
Util smls: Deliberate, to point up that the code as posted creates an array that, taken in its entirety, is off-by-one.
I ran out of time before either A) writing text to that effect, or B) changing the code to remove the need for text.
psch S06:The_callframe_and_caller_functions
synbot6 Link: design.perl6.org/S06.html#The_callf..._functions
Util Good eye!
psch that's design, not docs though
so might have spots that aren't working as designed yet
Util (re: rosettacode.org/wiki/Sequence_of_pr...mes#Perl_6 )
18:54 uncleyear joined
lizmat callframe(1).annotations<file> # no {} access to callframe 18:54
18:54 TEttinger joined
psch lizmat: oh, did i confuse the levels? i.e. callframe(1) is the current one? 18:55
lizmat no, callframe(1) is ok
m: my ($file,$line) = callframe(1).annotations<file line>;
camelia ( no output )
lizmat dha: ^^^
dha yeah, that looks right. 18:56
lizmat wrt to documentation, this is a work in progress, so atm please check here so we can now what needs to be documented sooner rather than later :-)
*know
smls Util: Also, is there a benefit to defining @primorials using the sequence operator like that, as opposed to @primorials := [\*] 1, @primes 18:57
In both cases, it will keep around the whole list reified portion in memory right?
dha yep. I think there's a lot more that needs to be done documentation-wise, at least for the purposes of people trying to move from 5 to 6 - particularly trying to port things from 5 to 6.
And, for what it's worth, I don't see where docs for callframe are at all. 18:58
TEttinger p6: say "Hello, ${<friends romans countrymen countryfolk perlers camelia>.roll}" 18:59
camelia rakudo-moar 02c791: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Non-variable $ must be backslashed␤at /tmp/tmpfile:1␤------> 3say "Hello, 7⏏5${<friends romans countrymen countryfolk␤ expecting any of:␤ argument list␤ double quotes…»
lizmat actually, it appears that callframe(1).file and callframe(1).line also work
18:59 run4flat joined
TEttinger fancy 18:59
lizmat m: say "Hello, {<friends romans countrymen countryfolk perlers camelia>.roll}" # no need for $ 19:00
camelia rakudo-moar 02c791: OUTPUT«Hello, camelia␤»
lizmat m: say "Hello, {<friends romans countrymen countryfolk perlers camelia>.roll}" # no need for $
camelia rakudo-moar 02c791: OUTPUT«Hello, friends␤»
literal W/ 4 19:01
lizmat sightseeing&
Util smls: I wrote that sequence when writing for Primorial_numbers (which you beat me to; Congrats!). 19:02
I had written `sub primorial(Int $n) { [*] @primes[^$n] }`, and was trying for better performance in the 100_000 range.
I got so focused, that I completely forgot about [\*]. Thanks!
TEttinger nice, thanks lizmat
smls Util: I had to abandone the "@primorials as a lazy list" approach for the Primorial_numbers task, because that exhausted my RAM very quickly :P 19:03
TEttinger I'm juuuust starting out with Perl, though not with programming. a quick first question, the $/ argument that methods get, is it analogous to a self or this parameter? can it be elided in a method parameter list if the body doesn't use it? 19:05
does it need to be called $/ ?
moritz TEttinger: not every method gets a $/ parameter 19:06
TEttinger: action methods (that the grammar engine calls for you) get a Match object as parameter, and it's custom to call that $/; but you can call it anyway you want
TEttinger: and all methods have a 'self' implicilty
TEttinger ah ok
19:09 andreoss left
jnthn The thing you get if you call it $/ is that you can access positional captures with $0, $1, ... and named ones with $<foo> 19:09
Which in action methods is exceptionally convenient.
FROGGS is happy that porting the run()/shell() changes is making progress
*to jvm 19:10
Util smls: The [\*] change eeds to be `1, [\*]`, which triggers a GLR bug.
s/eeds/needs/
smls why?
bartolin FROGGS++
ugexe froggs++ indeed
FROGGS :o)
smls [\*] 1, @primes should do the same
dha I don't suppose there's a way to get the file and line from callframe in one call, is there?
smls or flat 1, [\*] @primes as TimToady explained earlier today 19:11
psch dha: lizmat wrote that above, callframe(1).annotations<file line> gives you a file and line in two elements 19:12
Util m: constant @primes = grep *.is-prime, 2..*; constant @primorials = 1,[\*] @primes; say @primorials.elems;
camelia rakudo-moar 02c791: OUTPUT«2␤»
psch dha: callframe(1).annotations is a hash, and multi-element lookup inside postfix:«< >» doesn't call the function again
smls m: constant @primes = grep *.is-prime, 2..*; constant @primorials = flat 1, [\*] @primes; say @primorials[^10];
camelia rakudo-moar 02c791: OUTPUT«1 2 6 30 210 2310 30030 510510 9699690 223092870␤»
Util smls: That is the GLR bug. As for re-writing as [\*] 1, @primes, ... DOH!
dha Ah. Ok. I think I parsed that wrong.
psch or Attribute rather, instead of function
muraiki I'm passing a variable gotten by a slurpy parameter into Proc::Async.new but the new proc object ends up with the whole slurpy param inside of its path, instead of putting the first element of the slurpy param in the path and the rest in args. I suppose I'm passing the slurpy param wrong somehow 19:13
masak DrForr: if QAST works for you already, then go ahead with QAST. if you have any notions of how Qtrees might help you better, I'll be all ears :) 19:14
dha And, just to make sure I'm not getting this all wrong, to imitate @_ in p6, I'd do something like 'sub foo ( *@args ) {" and then use @args as I would have @_ in p5? 19:15
muraiki p6: sub foo(*@cmd) { say Proc::Async.new(@cmd).perl; }; foo(<ls -al>);
camelia rakudo-moar 02c791: OUTPUT«Proc::Async is disallowed in restricted setting␤ in sub restricted at src/RESTRICTED.setting:1␤ in method new at src/RESTRICTED.setting:32␤ in sub foo at /tmp/tmpfile:1␤ in block <unit> at /tmp/tmpfile:1␤␤»
masak JimmyZ: I know on a general level what Qtrees are, yes. I'm not just waving hands at this point. I've seen them work. but Perl 6 does not yet have a Qtree implementation -- not even a prototype one.
19:15 uncleyear left
psch dha: you can get @_ as in perl5 if you use it in the body 19:15
muraiki doh, I can't demonstrate it via the p6 command, but that code snippet illustrates the problem
psch m: sub f { [+] @_ }; say f 1..5
camelia rakudo-moar 02c791: OUTPUT«15␤»
psch dha: note though that you can't declare a different signature 19:16
19:16 uncleyear joined
dha So, I can use @_ in a function as I used to as long as the function has no signature? 19:16
TEttinger is @_ the list of all parameters, and [+] a sum sub? 19:17
psch TEttinger: [+] is the reduction operator on infix:<+>
TEttinger m: [*] [2 3 4] 19:18
camelia rakudo-moar 02c791: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ovND39K5S6␤Two terms in a row␤at /tmp/ovND39K5S6:1␤------> 3[*] [27⏏5 3 4]␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤ statement modifier␤ …»
psch dha: yes, using @_ in the body supplies *@_ automagically as signature
TEttinger m: [*] [2 3 4] ;
camelia rakudo-moar 02c791: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7k8wJQfRR4␤Two terms in a row␤at /tmp/7k8wJQfRR4:1␤------> 3[*] [27⏏5 3 4] ;␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤ statement modifier␤ …»
dha Ah. Good to konw.
TEttinger I'm guessing I need a sigil in there
psch TEttinger: no, commas :)
TEttinger ah
m: [*] [2, 3, 4] ; 19:19
camelia ( no output )
TEttinger m: say [*] [2, 3, 4] ;
camelia rakudo-moar 02c791: OUTPUT«3␤»
TEttinger that's odd
psch nah, [2, 3, 4] in numeric context is number of elements
and you're multiplying that
TEttinger oh ok
dha And, would "shift;" shift off the first item in @_ as it used to, or do I need to do [email@hidden.address]
psch (2, 3, 4) is the list of 2, 3 and 4
TEttinger how do I reduce * over a list of 2, 3, 4 ?
ok 19:20
m: say [*] (2, 3, 4) ;
camelia rakudo-moar 02c791: OUTPUT«24␤»
TEttinger woo!
psch m: sub f { .shift.say }; f ^3
camelia rakudo-moar 02c791: OUTPUT«5===SORRY!5=== Error while compiling /tmp/y2NOR_nXrw␤Calling f(Mu) will never work with declared signature ()␤at /tmp/y2NOR_nXrw:1␤------> 3sub f { .shift.say }; 7⏏5f ^3␤»
TEttinger little victories
psch dha: you need to use @_ to get the signature
dha: &shift itself doesn't auto-assume $_ or @_ 19:21
dha: .shift assumes $_, but not @_ iirc
FROGGS correct
the rules are simpler now
dha ok, so @_.shift it is. :-)
19:21 kaare_ joined
jnthn There's almost certainly a better way 19:22
m: sub foo { say $^first; say @_; }; foo 1, 2, 3
camelia rakudo-moar 02c791: OUTPUT«1␤2 3␤»
FROGGS m: sub foo { say $^flubber; say $^blubber; }; foo 1, 2, 3 19:23
camelia rakudo-moar 02c791: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3cXMyD1tIJ␤Calling foo(Int, Int, Int) will never work with declared signature (Any $blubber, Any $flubber)␤at /tmp/3cXMyD1tIJ:1␤------> 3 foo { say $^flubber; say $^blubber; }; 7⏏5foo 1, 2, 3␤»
FROGGS ahh, yeah
but there you can see how the autogenerated signature looks
TEttinger wow, camelia is a fancy bot 19:24
run4flat Hello everyone, I'm a PDL user. I would like to start putting Perl6's multidimensional numeric array support through some paces.
Are there any tests out there for PDL-like functions and/or signatures? 19:25
i.e. design.perl6.org/S09.html#PDL_signatures
or is there any roadmap for writing such tests?
19:25 oetiker left
dha ok, so in p5 caller in scalar context returns the caller's package name. Is that stuffed into callframe somewhere? 19:28
run4flat I see this one tests native ints: github.com/perl6/roast/blob/master...tive-int.t 19:29
vendethiel- run4flat: not sure PDL is totally implemented yet :) 19:30
PerlJam run4flat: if you're looking for PDL-like performance, you'll be disappointed. :)
run4flat PerlJam, I knew that
:-)
vendethiel, I also knew that
I don't know if I can help with implementation, but I can probably write some tests, at least 19:31
I figured that might help things along
PerlJam run4flat: I'm also a PDL user, but I've never thought much about PDL tests. Maybe there are some tests that could be "ported" to Perl 6? 19:32
run4flat: (and yes, tests would be awesome)
19:34 uncleyear left, akakcolin left, uncleyear joined
dha So, for instance, if I wanted to turn this bit of p5 code into p6, how would I do that? "my ( $pack, $filename, $line ) = caller;" 19:36
or "$package = caller;" 19:37
FROGGS run4flat: jnthn probably knows best about PDL releated items and their place on the roadmap... so maybe he can suggest what tests would be needed in what order...
dha I see how to get the filename and line out of callframe, but I'm unsure about the package name.
FROGGS m: sub foo { say caller }; foo() 19:38
camelia rakudo-moar 02c791: OUTPUT«5===SORRY!5=== Error while compiling /tmp/n3A3EvNSrL␤Undeclared routine:␤ caller used at line 1␤␤»
FROGGS m: sub foo { say callframe }; foo()
camelia rakudo-moar 02c791: OUTPUT«CallFrame.new(level => 2, annotations => {:file("/tmp/yrXSUWWv3e"), :line("1")}<>, my => EnumMap.new("\$!" => Mu, "\$*DISPATCHER" => Mu, "\$/" => Mu, "\$_" => Mu, "\&?ROUTINE" => Mu, :RETURN(Mu)))␤»
run4flat FROGGS: thanks
PerlJam, I thought I'd seen you around, but I couldn't recall where
19:39 domidumont left
dha So, yeah, is what's in "my" the package? Or, I suppose, class? class is pretty much the equivalent of package in p6, right? 19:40
jnthn Multi-dim packed arrays are nearing the top of my todo list. :) 19:41
run4flat jnthn, which mailing list should I join to keep abreast of such work?
skids dha: classes are a subclass of packages :-)
dha You're just trying to confuse me now. :-) 19:42
19:42 smls_ joined
dha Oh. Looking ahead, I see this is just going to cause me pain. 19:43
(in case anyone's wondering, I thought it might be a good p6 learning project to port Test::Simple. HAHAHA)
jnthn run4flat: I write regular progress reports on my blog, and I guess there's an RSS feed for that...
run4flat: Perl 6 development is not very centered around mailing lists. 19:44
19:44 maettu joined
skids dha: That's a bit meta of a thing to choose to port as a learning excercise :-) 19:44
19:44 smls left
dha Meta? "crazy" I could understand, but "meta"? :-) 19:45
jnthn run4flat: 6guts.wordpress.com/ is the blog url, anyways
skids m: sub foo { ::CALLER<&callframe>().say }; sub bar {foo()}; bar() # ?
camelia rakudo-moar 02c791: OUTPUT«Cannot find method 'Any'␤ in sub foo at /tmp/YXGc5UE6Yf:1␤ in sub bar at /tmp/YXGc5UE6Yf:1␤ in block <unit> at /tmp/YXGc5UE6Yf:1␤␤»
skids Eh, I guess that would just do it in the current scope even if it worked. 19:46
dha Maybe I should just find a simpler module to port. 19:47
PerlJam dha: good plan :)
dha Test::Simple sounded... simple. And if it didn't require porting Test::More & co. it might have been...
PerlJam - Now I just have to think of one. 19:48
skids github.com/perl6/perl6-most-wanted...modules.md
That page might need an update though. 19:49
PerlJam skids: and I think very few of those qualify as "simple"
hoelzro is it a fair metric that NativeCall-related bugs (like some of the segfaults that some people have been able to produce) should not fall under the "review RT tickets before release" umbrella? 19:50
19:50 firefish5000 joined
dha Yeah, right off the bat, I see that Text::CSV and CSV::Parser seem to already have been done. 19:51
skids Term::Progressbar?
skids wonders what makes Geo::Ellipsoid important 19:52
19:52 uncleyear left 19:53 uncleyear joined
PerlJam skids: I think it's the big, wet rock we live on. ;) 19:53
skids :) I meant what use case makes it a "most wanted" module. 19:55
19:56 amurf joined
ugexe tony-o did a progressbar in perl6. dont think he made it a module though 19:57
dha Any point to porting Carp? Or does p6 already do stuff that makes that redundant?
dalek ast: c9c2900 | usev6++ | S03-operators/assign.t:
Extend tests for RT #80614 nd RT #125407
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...l?id=80614
ugexe perl6 has exception handling 19:59
dha Ok, then.
Maybe I should just go through all the commands in perl5 and document how to do what they used to do in p6.
ugexe someone still needs to get the flappy bird clone together for hackernews 20:00
skids Do we have a multi-os terminal askpass yet?
ISTR someone playing with the Win side of that.
PerlJam dha: TAP::Parser might be a good one to port.
20:00 amurf left
dha Thanks, I'll take a look. 20:01
20:01 uncleyear left, uncleyear joined
dha And then probably just give the hell up and shoot myself. 20:01
20:01 nys joined
hoelzro PerlJam, dha: I believe leont started a TAP::Parser 20:01
tony-o who is looking for progressbar?
ugexe its on the most wanted module list. i dont think anyone was looking for it 20:02
skids We were just browsing the "most wanted" list and finding most stuff there to be started or implemented.
hoelzro DrForr++ # really good LTA error message RT tickets
dha TAP::Harness seems to be done, but not TAP::Parser.
ugexe just depends. maybe not in name, but in spirit github.com/tony-o/perl6-green 20:03
dont let prior existence stop you though 20:04
20:04 dwarring joined
tony-o mine doesn't do the same crap Prove does, it handles testing in more of a mocha approach instead of parsing $*OUT 20:04
20:05 oetiker joined 20:06 elimik31 left
hoelzro I've always liked the simplicity and flexibility of TAP 20:06
dha I may be getting to the point where I don't like anything anymore. But I'm having one of those weeks. 20:07
tony-o hoelzro: i like it too but with async stuff, printing out to a terminal and trying to parse that can cause some issues 20:08
PerlJam Was someone working on a module starter?
hoelzro hmm, good point
ugexe there is a Module::Minter or something
PerlJam ah, yes, that's what I was thinking of 20:09
tony-o i think perl6-green might actually be okay for some initial testing
hoelzro I would really like a Test::Tester (which I started as Test::Meta) 20:12
I just get distracted by fixing bugs or adding NYI things rather than working on modules =)
[ptc] hoelzro++ # Cannot invoke null object bug fix
yoleaux 16 Jun 2015 17:16Z <japhb> [ptc]: Your calculation for the implementation which takes a $tol parameter (the second one) will always fail if $expected == 0 and $tol < 1, because then $abs-diff == $abs-max == $got and $rel-diff == 1.
16 Jun 2015 17:19Z <japhb> [ptc]: The implementation which takes a :$rel_tol and :$abs_tol (the third one) allows *either* tolerance to succeed, and there doesn't seem to be a way to require both; that may or may not matter. Also, using Numeric for the tolerances leaves me wondering about the exact behavior if the tolerances are Complex instead of Real.
16 Jun 2015 22:39Z <nebuchadnezzar> [ptc]: Ok, now I figure out you are Paul Cochrane, I revert your patch on Configure.pl since it's forbidden to modify upstream directly and you arleady provided a patch for this
skids Maybe something Data::Printer-like (colorized better-than-"say" dumping too crazy for the core) would be a good starter project. 20:13
PerlJam skids: oh, that would be nice
tony-o skids: ++ 20:14
20:16 colomon left
hoelzro Data::Printer++ 20:16
zacts hello #perl6 20:17
skids o/
tony-o something like a colorized Data::Dumper ?
zacts I have a question...
so can rakudo compile perl6 into binaries?
such that
20:17 [Sno] joined
zacts one doesn't need rakudo or a perl6 interpreter to run the binaries? 20:17
[ptc] .tell nebuchadnezzar do you mean to modify upstream sources in the `upstream` branch, or do you mean the upstream sources in the `master` branch?
yoleaux [ptc]: I'll pass your message to nebuchadnezzar.
zacts (the use case for this would be to distribute perl6 apps to people who don't have the skills on how to install perl6) 20:18
(say, like I wrote a vi-clone in perl6, and wanted to be able to package it for users)
s/vi-clone/insert whatever app you want here/
hoelzro zacts: I think a lot of people here want that, but no one's stepped up and made it yet
skids zacts: I think psch(?) is working on self-contained jars for the JRE backend.
[ptc] .tell nebuchadnezzar I believe the terminology and branch names might be confusing me slightly... 20:19
yoleaux [ptc]: I'll pass your message to nebuchadnezzar.
zacts ok
cool
so it is a potentail, just not there yet?
I mean is it a _planned_ feature?
ugexe perl6 is not even there yet :)
zacts or just something that would be cool to have?
ugexe: well yeah 20:20
ugexe it was one of the (canceled) projects for the GSoC i believe
zacts oh
ok, well bbl
run4flat jnthn: so if I wrote a bunch of tests for S09's PDLish features... should I just do that in a github fork of roast and submit a pull request? 20:24
jnthn run4flat: Tests for the multi-dimensional array stuff are welcome, though on my recent read through S09 I know some of the things in there will have to change. 20:25
(Because we worked out various other details of Perl 6, and now they're a bit out of line with it)
It's probably "mostly right" though 20:26
20:26 darutoko left
dalek ast: 25d7195 | usev6++ | S (3 files):
Remove duplicate tests for RT #119061
20:26
ast: e9694a7 | usev6++ | S09-typed-arrays/arrays.t:
Add test for RT #125428
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=119061
Link: rt.perl.org/rt3/Public/Bug/Display...?id=125428
run4flat jnthn, sounds good, thanks 20:27
20:27 kaare_ left, run4flat left 20:30 uncleyear left, uncleyear joined
[Coke] I think giving us a target to shoot at (tests) is a good first pass. Just be prepared that jnthn will come back and say "oh, this has to change because <implementation>" 20:31
(for PDLish stuff)
muraiki can somebody help me with this code? I'm trying to create an object of one of two different classes that each take the same constructor arguments: gist.github.com/muraiki/0669a14564d22cf8766d
20:32 FROGGS left
PerlJam muraiki: |%args 20:32
muraiki PerlJam: Thanks! what is that called? 20:33
skids a capture flattener.
muraiki thank you
tony-o m: sub a (:$b, :$c) { "$b $c".say; }; %c = (b=>5, c=>6); a(|%c);
camelia rakudo-moar 02c791: OUTPUT«5===SORRY!5=== Error while compiling /tmp/921793hSkn␤Variable '%c' is not declared␤at /tmp/921793hSkn:1␤------> 3sub a (:$b, :$c) { "$b $c".say; }; 7⏏5%c = (b=>5, c=>6); a(|%c);␤»
tony-o m: sub a (:$b, :$c) { "$b $c".say; }; my %c = (b=>5, c=>6); a(|%c); 20:34
camelia rakudo-moar 02c791: OUTPUT«5 6␤»
20:34 colomon joined
garu_ skids PerlJam tony-o hoelzro: I'd be totally up for porting Data::Printer to perl6 if it's something people would benefit from :) 20:37
hoelzro garu_: I think it goes without saying that people would use it! 20:38
TEttinger is there any standard lib or 3rd party lib support for common functional programming subs? stuff like map (aka foldl), reduce, filter 20:39
skids garu_: I think everyone here dumps lots of complicated data structures -- AST trees for example.
colomon TEttinger: most of that stuff is in Perl6’s core. 20:40
moritz TEttinger: filter, reduce, map are in core
TEttinger good good
PerlJam garu_: make it so :)
moritz filter is spelled "grep" though
colomon wrote this today: my $filtered = $json.grep({ $_<name> ∈ $projects });
[ptc] colomon++ 20:43
TEttinger ok, I see reduce at doc.perl6.org/routine/reduce -- is there any way to get the intermediate results of reduce, and not just the last element? this is called scan in haskell, reductions in clojure
moritz we have that as a meta operator
skids That's triangle.
TEttinger sweet.
moritz m: .say for [\+] 1..10
camelia rakudo-moar 02c791: OUTPUT«1␤3␤6␤10␤15␤21␤28␤36␤45␤55␤»
colomon TEttinger: there’s definitely a way to do it, because we have a meta-op for that. I forget if/what the function/method version is
PerlJam TEttinger: go on ... ask for something else ;) 20:44
20:46 diana_olhovik left
TEttinger a common thing in clojure is "mapcat", which typically is called with a function that returns a sequence, calls that function on each element in a sequence as per map, but then concatenates the results (not flattening, only one level of nesting is eliminated) 20:47
20:48 bin_005 left, bin_005_w joined
TEttinger it's useful when you have a function that produces a sequence but you don't want to use it as a sequence, you really want the values it produces 20:48
colomon doesn’t think the intermediate results (“triangle” in p6 talk) version of reduce is there for method/sub reduce. Fells like an oversight.
hoelzro I think map just does that 20:49
m: say for (^5).map: { $_, $_ * 2 }
camelia rakudo-moar 02c791: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zQTCtvSB5Y␤Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument␤at /tmp/zQTCtvSB5Y:1␤------> 3say7⏏5 for (^5).map: { $_, $_ * 2 }␤»
hoelzro m: .say for (^5).map: { $_, $_ * 2 }
camelia rakudo-moar 02c791: OUTPUT«0 0␤1 2␤2 4␤3 6␤4 8␤»
hoelzro hmm, nevermind.
TEttinger it's easy enough to replicate by mapping and then concatenating the results 20:50
hoelzro m: .say for (^5).flatmap: { $_, $_ * 2 }
camelia rakudo-moar 02c791: OUTPUT«0 0␤1 2␤2 4␤3 6␤4 8␤»
TEttinger looks pretty similar
colomon m: say [~] (^5).map: { $_, $_ * 2 }
camelia rakudo-moar 02c791: OUTPUT«0012243648␤»
hoelzro yeah...
TEttinger is [~] a meta operator? 20:51
colomon It’s reduce on string concat
20:51 uncleyear left
colomon so yes 20:51
moritz [] is the meta part
and ~ is what it acts on
TEttinger ah, I meant sequence concat
colomon turning the results into a sequence? 20:52
TEttinger well it was one
PerlJam clojuredocs.org/clojure.core/mapcat
20:52 uncleyear joined
colomon isn’t that what map does by default? 20:52
hoelzro colomon: I think the GLR is changing that
moritz m: say (flat map { $_, $_ * 2 }, ^ 5).perl
camelia rakudo-moar 02c791: OUTPUT«(0, 0, 1, 2, 2, 4, 3, 6, 4, 8)␤»
hoelzro ah, moritz++
vendethiel- mapcat is .map + .flat one level
TEttinger it returned <<0 0␤1 2␤2 4␤3 6␤4 8>>, and moritz got it on the money
vendethiel- moritz: mapcat flattens one level only IIRC 20:53
moritz m: say (map { $_, $_ * 2 }, ^ 5).perl
camelia rakudo-moar 02c791: OUTPUT«((0, 0), (1, 2), (2, 4), (3, 6), (4, 8))␤»
TEttinger yes
moritz vendethiel-: I don't think flat flattens recursively, does it?
colomon moritz: pretty sure it’s not supposed to
skids m: say (flat (^5).map: { $_, [ $_ * 2, 0 ] }).perl
camelia rakudo-moar 02c791: OUTPUT«(0, [0, 0], 1, [2, 0], 2, [4, 0], 3, [6, 0], 4, [8, 0])␤»
masak we have insufficient terminology for the constituent parts of metaops. how about this: `[~]` is the metaop. `[ ]` is the upper op. `~` is the lower op.
vendethiel- skids: that's itemized, though :) . but yes
masak can anyone find a better metaphor than upper/lower?
maybe host/guest?
PerlJam masak: for some reason that makes me think of unicode combining characters. 20:54
moritz masak: meta and metee ops :-)
masak we can't go with outer/inner, because some ops like `Z~` don't really do the surrounding thing.
TEttinger m: say (map { { $_, $_ * 2 }, { $_ * 5 } }, ^ 5).perl
camelia rakudo-moar 02c791: OUTPUT«((-> ($_? is parcel) { #`(Block|39914512) ... }, -> ($_? is parcel) { #`(Block|39914576) ... }), (-> ($_? is parcel) { #`(Block|39914640) ... }, -> ($_? is parcel) { #`(Block|39914704) ... }), (-> ($_? is parcel) { #`(Block|39914768) ... }, -> ($_? is parc…»
TEttinger oh what
masak moritz: no, meta should go for the whole thing.
both upper and lower.
that's how we use the term in practice. 20:55
skids metador and metarand
masak :D
TEttinger I'd go by the order they appear in
moritz composer, composed and compound :-)
TEttinger primary/secondary
masak .oO( Metatlas Shrugged )
moritz: I could live with meta, composer and composee 20:56
for `[~]`, `[ ]` and `~`
moritz or we could call it "victim" instead of "composee"
20:56 dolmen joined
moritz isn't up for serious naming discussions tonight 20:57
masak or, if you don't require one-word terms: "composing op" and "composed op".
TEttinger meta for the whole, catalyst, base?
masak with "composer" and "composee" being the slightly lighter/more slangy denominations.
PerlJam masak: and what would you call the combinatoric ones? SRZ~ (or whatever)
sjn opcomposition # one word
masak PerlJam: that's just applying the metaop thing recursively.
moritz TEttinger: in chemistry, catalysts never change reaction behavior, just reactioni speed
TEttinger biology maybe? 20:58
skids actualy spent a half hour last month trying to figure out multiplier : multiplicand :: ?? : ?? for composition and came up empty.
masak PerlJam: so on one level `S` is the composer and `RZ~` is the composee, but on another it's `R` and `Z~`, or `Z` and `~`
jnthn Hm, curious, I've not tended to think about "meta-op" as being the whole thing, but rather the parameterizable thing. 20:59
"the reduce meta-op", "the zip meta-op", etc.
skids (The mathemeticians have let us down.)
colomon skids: sorry
TEttinger hm, it isn't the best analogy, but a virus takes an existing cell's functionality and alters it to work on the virus' terms 21:00
so biologists may have better terms
naming a language feature "virus" is the worst idea I've had all month though 21:01
skids "meta-op-op?" :-)
masak jnthn: well, ok. it's a little bit of both. 21:04
TEttinger task and title?
masak jnthn: when someone sees `[+]` and asks what it is, we immediately go "oh, that's a metaop". 21:05
TEttinger a task is what you do, a title, like "sir" or "war criminal" in real life, affects what you affect with that task
masak anyway. I'm not insisting that we arrive on a terminology. I was mostly curious if one could be extracted cheaply.
'night, #perl6
21:06 bin_005_w left
hoelzro night masak 21:06
psch colomon: triangle reduce works with [\[&sub]] for binary subs, not sure about methods though
TEttinger nn
psch m: sub add-plus-two { $^x + $^y + 2 }; say [\[&add-plus-two]] ^5 # if i'm not misunderstanding
camelia rakudo-moar 02c791: OUTPUT«0 3 7 12 18␤»
colomon psch: true
but by that logic, why do we have a reduce method? ;) 21:07
TEttinger psch, looks like exactly what I was after
21:07 skids left
TEttinger colomon, it's a surprisingly good question 21:07
psch colomon: there's TimToady..? :P
TEttinger normally you think of reduce as being more useful...
psch ...actually "there's mToady", i suppose :) 21:08
TEttinger but it's really just getting part of the sequence of reductions
smls_ colomon: I think the reduce method is mostly used with anonymous blocks
like map and grep
jnthn masak: You're right, which means I'm punning the meaning. Typical :)
PerlJam Do we yet have a way to export multiple subs to a give tag without repeating "is export(:tag)" over and over again on each sub?
jnthn figures he'll also get some rest :)
o/
colomon smls_: and there’s no way as far as I know to use [&sub] on an anonymous sub 21:09
psch ISTR seeing it, tbh 21:10
somewhat like [&{$^a + $^b}] or similar...
although that exactly doesn't work
TEttinger yeah, I'd be surprised if perl6 lacked a feature at this point :)
21:10 dolmen left
smls_ colomon: I don't think there should be 21:11
TEttinger or a way of naming an anonymous sub temporarily?
colomon smls_: then we need a triangle version of the reduce method/sub
smls_ maybe
TEttinger what does [&sub] do?
colomon TEttinger: sub temporarily into an infix operator 21:12
*makes sub
smls_ but the [ ] meta-op is coming already pushing the line of parsing ambiguity vs infix:<[ ]> (array constructor) as it is
colomon smls_: I don’t see what that has to do with anything?
TEttinger can you define an infix anonymous sub? 21:13
smls_ well, adding a form like [{ ... }] or [&{ ... }] would make it even more consusing how to separate between the two meanings of "[..." in term position, for both compiler and human readers
tony-o m: class A { method b { $^x + $^y + 2; }; }; my A $a .=new; say [\[$a.b]] ^5;
camelia rakudo-moar 02c791: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jXaax1hNkV␤Placeholder variables cannot be used in a method␤at /tmp/jXaax1hNkV:1␤------> 3class A { method7⏏5 b { $^x + $^y + 2; }; }; my A $a .=new;␤»
21:14 colomon left
smls_ maybe 'reduce' just needs an :all flag 21:15
japhb_ TEttinger: Yes, you can give anonymous subs names in two different senses: By binding the sub to a name, so that the sub does *not* know it's own name via introspection, but code in the scope of the bound name *does*. 21:18
TEttinger: And also by saying 'anon sub foo', which says that the sub knows its own name via introspection, but the scope around it does *not*. 21:19
It just falls out of the fact that introspection and naming are decomposed, but most users don't need to know that, because the default behaviors DWYM. 21:20
psch m: say 2 [&(sub { $^a + 2 * $^b })] 2 # anon infix 21:26
camelia rakudo-moar 02c791: OUTPUT«6␤»
psch i do remember that you could stuff that into a reduce somehow, but can't find how right now
dalek ast: 841ebd8 | usev6++ | S05-interpolation/regex-in-variable.t:
Change two skipped tests to todo
psch i.e. into the reduce operator
TimToady++ did show that a few months back... :s 21:27
hm, maybe calling that an "infix anon" is more apt :) 21:28
AlexDaniel m: say 'test' ~~ / te ^ st /;
camelia rakudo-moar 02c791: OUTPUT«Nil␤»
AlexDaniel what string would match 'te^st' regex?
21:29 RabidGravy left
psch m: say 'te^st' ~~ / te \^ st/ 21:29
camelia rakudo-moar 02c791: OUTPUT«「te^st」␤»
psch oh
the other way around
AlexDaniel psch: yup
b2gills m: say 5 [&({ $^a + $^b })] 6 21:30
camelia rakudo-moar 02c791: OUTPUT«11␤»
psch AlexDaniel: none, i think. ^ is "beginning of string", not "beginning of line"
AlexDaniel if none, then where is the warning? :)
TEttinger m: .say [\[&(sub { $^a + 2 * $^b })]] ^5;
camelia rakudo-moar 02c791: OUTPUT«5===SORRY!5=== Error while compiling /tmp/fFTuG285_O␤Missing infix inside []␤at /tmp/fFTuG285_O:1␤------> 3.say [7⏏5\[&(sub { $^a + 2 * $^b })]] ^5;␤ expecting any of:␤ bracketed infix␤ infix␤ infix stopper␤»
AlexDaniel psch: well, if that regex does not make any sense then it should produce a warning 21:31
psch: I'll submit it then
psch AlexDaniel: i don't neccessarily agree, but i don't have the capacity to argue that at the moment
TEttinger so... what did I do wrong with that triangle infix sub thing?
AlexDaniel psch: well, you are always free to leave a comment :)
psch TEttinger: something about how to put the infix anon into reduce, mostly
TEttinger m: say [\[&(sub { $^a + 2 * $^b })]] ^5 # did the opening . change it?
camelia rakudo-moar 02c791: OUTPUT«one(\([sub (Any $a, Any $b) { #`(Sub|65758848) ... }]), 5)␤»
psch TEttinger: i'm not sure if TimToady++ 21:32
's example from whenever still works
because i can't find it :)
21:33 dolmen joined
psch the second one parses weirdly, in my understanding. it puts the sub as the only element of an array and junctions that with the 5 21:33
TEttinger runs screaming
psch instead of taking the [] as reduce and the ^ as sequence operator
i'd bug the aforementioned TimToady if i were you. i need to get some rest o/ 21:34
b2gills m: .say for [\[&({$^a+2*$^b})]] ^5;
camelia rakudo-moar 02c791: OUTPUT«0␤2␤6␤12␤20␤»
b2gills m: .say for [\[&( {$^a+2*$^b} )]] ^5;
camelia rakudo-moar 02c791: OUTPUT«\([-> ($a, $b) { #`(Block|51178768) ... }])␤5␤»
TEttinger oh damn 21:35
psch ..yup, parsing weirds :)
psch actually leaves now to sleep o/
TEttinger I did not know whitespace was that significant here
AlexDaniel psch: good night!
b2gills It shouldn't be significant afaik
TEttinger .msg camelia .say for[\[&({$^a+2*$^b})]]^5; 21:36
yoleaux TEttinger: Sorry, this command is admin-only.
b2gills camelia: commands
TEttinger no worries, I meant /msg 21:37
b2gills ( it worked in the other window )
dalek kudo-star-daily: 85e0825 | coke++ | log/ (2 files):
today (automated commit)
hoelzro is there a star release happening this month?
21:37 larion left
[Coke] doubtful, unless someone fixed module installs to follow panda. 21:39
(or, probably better, use panda)
japhb_ TEttinger: IIRC whitespace is forbidden in a couple places in the crazy construct y'all have been playing with precisely because otherwise parsing gets crazy otherwise. I think for this edge case it was mostly "least surprise". 21:41
Star really should just bootstrap panda and use it. 21:42
21:42 espadrine joined
TEttinger panda? 21:44
[ptc] TEttinger: panda is the package manager for Rakudo 21:46
TEttinger oh! that's a good thing to have 21:47
21:48 dolmen left
hoelzro [Coke]: ah, true 21:49
21:51 colomon joined 21:54 larion joined 22:05 smls_ left 22:07 muraiki left, dolmen joined 22:11 rindolf left 22:14 yqt left, yqt joined 22:18 kurahaupo joined 22:19 uncleyear left, uncleyear joined 22:22 Sqirrel left 22:23 kurahaupo left 22:25 Sqirrel joined 22:34 espadrine left 22:37 MilkmanDan joined 22:38 lilgreen left
dha Ok, getting a bit punchy here... 22:45
my $self = bless {}, $class; in p5 would be... my $self = $class.bless({}); in p6?
22:50 uncleyear left, uncleyear joined
hoelzro dha: you very seldom have to call bless in Perl 6 22:51
dha I was wondering about that.
ugexe and when you do, your class methods already provide a 'self'
japhb_ dha: More like ... that's something where exact conversion is Doing It Wrong. Perl 5 did not have proper OO support in the way that Perl 6 does. You really don't want to try to do it that way in Perl 6, you want to use real classes.
22:51 japhb_ is now known as japhb
dha Sadly, this particular function doesn't do much more than that. I'll have to try to look at the bigger picture and see how the object's used elsewhere and try to figure out how to make that work in a p6 idiom. 22:54
Juerd I wouldn't call these implementations "proper" or "improper". OO isn't a specific implementation per se. 22:55
dha Alternately, I could just give the hell up on this and do something more productive, like hitting myself in the face with a trout repeatedly.
Juerd Even exposing things that we now think of as internals doesn't make it any less proper OO. 22:56
japhb Mmmm, trout ... 22:57
Juerd Object orientation has to do with how state is passed around between a set of functions that operate on that state. An unpopular view is that any language supports object orientation in its most bare form (without inheritance or composition, or even classes) because OO syntax is just that anyway: syntax. 22:58
dha Oh, ok. So Test::Builder is insane. new gives you a new Test object... which it creates by calling a separate create method. 22:59
japhb Juerd: blessed references, method calls, and inheritance do not proper OO make ... but that may just mark me as being a bit of a snob at this point -- I think I've gotten too used to having a real metamodel and OO syntax that isn't forced into the wrong shaped hole.
Juerd int fd = fopen("/etc/passwd", "r"); /* fd is an object, fopen is a constructor. */
japhb Juerd: My eye *literally* twitched when I read that. 23:00
Juerd Good. Glad to make an impact :)
japhb runs to a meeting 23:01
23:01 cognominal joined
Juerd Have fun 23:01
23:02 dha left
Juerd When you're back, consider Javascript's OO. 23:02
No classes, no inheritance, no composition, but definitely OO.
(It might have inheritance depending on the definition of that.) 23:03
hoelzro lizmat, PerlJam: are either of you around? 23:10
I have release questions, and I think most of the Europeans (that aren't currently in the US =)) have gone to sleep
23:15 kurahaupo joined 23:22 akakcolin joined 23:30 amurf joined, dolmen left, Akagi201 left
b2gills .tell dha I sure hope you aren't trying to re-implement the Test::Builder module from Perl 5, which they are currently trying to replace with a better model 23:34
yoleaux b2gills: I'll pass your message to dha.
23:51 gfldex left
profan it's been a while since i poked at perl6, it seems like the startup time for the MoarVM variant has dropped dramatically since a few months back? 23:58
japhb profan: Yes.
profan was part of the reason why i stopped a while back, it's great to see some friction removed :) 23:59
japhb We'd like it to be still better, but it's already a significant improvement.
profan I assume parity with perl5 or better is where you want to be?