»ö« 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:01 spider-mario left
dalek kudo/nom: a190b23 | (Geoffrey Broadwell)++ | src/core/Proc.pm:
Fix QX('/bin/false'), previously a spawn failure
00:17
Sgeo Is there an easy way to make an array of one element out of an array? 00:19
e.g. what I assume @a[0] did in Perl5 (I don't actually know Perl5)
japhb m: my @a = ^5; say @a[0,]; 00:20
camelia rakudo-moar 0dcbba: OUTPUT«0␤»
japhb m: my @a = ^5; say @a[0,].perl; 00:21
camelia rakudo-moar 0dcbba: OUTPUT«(0,)␤»
japhb Sgeo: ^^
Sgeo ty
japhb np
Sgeo Wonder if I should try implementing smartmatch in Haskell 00:23
It would have the advantage (due to static typing) that unless you use existentials, you're not going to put something silly like input whose type is user-determined on the RHS 00:24
geekosaur but since smartmatch is type-driven, you may need an existential to *implement* it 00:26
Sgeo MPTC (and maybe type families if I want to replicate the regex thing of returning something other than a Bool sometimes) should be sufficient I think 00:27
00:49 jjido left
AlexDaniel “Fix getting ugly low-level backtrace when sinking last statement in a program” 00:53
hmmm, that's one of my reports that should be marked as done
rt.perl.org/Public/Bug/Display.html?id=125680 00:55
this one
unless the “running code from file and with -e is different” is not fixed yet 00:56
if it has to be fixed, of course
00:58 lucasb joined
AlexDaniel m: ... 00:58
camelia ( no output )
AlexDaniel looks correct 00:59
m: …
camelia ( no output )
AlexDaniel nice
lucasb It feels wrong to me 01:00
AlexDaniel lucasb: why?
m: !!! 01:01
camelia rakudo-moar a190b2: OUTPUT«Stub code executed␤ in block <unit> at /tmp/W6eKHDoQJY:1␤␤»
AlexDaniel m: ???
camelia rakudo-moar a190b2: OUTPUT«Stub code executed in block <unit> at /tmp/EtcdaLGf9U:1␤»
lucasb It should not be silent
I think this is related to the latest Failure changes
m: fail; say 'hi' 01:02
camelia ( no output )
AlexDaniel well, jnthn wrote that thing in his blog
and it was exactly the issue with …
whether it is the Failure changes you are talking – I have no idea 01:03
lucasb if I understood the ticket correctly, you just didn't want to see the huge backtrace 01:05
but something must be printed, otherwise the user won't know the program failed 01:06
AlexDaniel I'm not sure. Maybe
you could use !!! as well
[Coke] m: exit ... 01:07
camelia ( no output )
[Coke] m: +... 01:08
camelia rakudo-moar a190b2: OUTPUT«WARNINGS:␤Useless use of "+" in expression "+..." in sink context (line 1)␤»
lucasb perl6 -e fail #=> Failed 01:09
echo fail | perl6 - && echo ok #=> ok
^^ I think this is a tiny inconsistency :)
AlexDaniel lucasb: which is also mentioned in my ticket 01:10
unfortunately I've brought two issues in one ticket, my bad
01:20 lucasb left
ugexe zef will now run Build.pm files as if they were a hooks/build-*.pl6 hook. unfortunately the `isa.(Panda::Builder)` requirement in panda has led to doing `use Panda::Builder; class Build is Panda::Builder { }` even though it looks like most Build.pm files have no need for anything provided by any of the panda classes. 01:22
so you have to have panda installed still. the alternative route would be to write my own Panda:: classes to emulate (which seems silly). If the Build.pm stays, perhaps builder should instead be checking .^can('build'), not .isa(External::Dependency)
01:24 rmgk left, rmgk joined 01:40 jkva joined
Sgeo m: say *.WHAT 01:45
camelia rakudo-moar a190b2: OUTPUT«(Whatever)␤»
01:45 ilbot3 left
Sgeo That's not a WhateverCode that calls .WHAT? 01:45
01:45 jkva left 01:47 ilbot3 joined
Sgeo m: say (1,2,3)<<.succ 01:48
camelia rakudo-moar a190b2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dLHFlWYID0␤Unable to parse quote-words subscript; couldn't find right double-angle quote␤at /tmp/dLHFlWYID0:1␤------> 3say (1,2,3)<<.succ7⏏5<EOL>␤ expecting any of:␤ postfix␤ …»
Sgeo m: say (1,2,3)>>.succ 01:49
camelia rakudo-moar a190b2: OUTPUT«2 3 4␤»
Sgeo Is there a similar operator for non-methods?
japhb m: sub foo($a) { say "$a!" }; (1,2,3)>>.&foo 01:51
camelia rakudo-moar a190b2: OUTPUT«3!␤1!␤2!␤»
japhb Sgeo: ^^ 01:52
Sgeo ty
japhb np
:-)
colomon how does that work? 02:09
02:10 cognominal left 02:13 dayangkun joined 02:14 davido___ joined
colomon I don’t see any trace of .& in S03? 02:14
02:16 davido__ left
japhb colomon: It's not a special operator, it's saying I want to use the &foo Callable instead of a method looked up by name. 02:22
And since invocant is just first argument ... it works.
Sgeo Seems like that... D thing where a method call is just a kind of function call? 02:23
ddili.org/ders/d.en/ufcs.html
Not... quite, since you need to indicate to it, but surely it at least reduces temptation to monkey patch?
japhb We simultaneously dissuade monkey patching, and provide really powerful ways to monkey patch. :-) 02:24
.tell jnthn For the first time, I can run one of my highly-parallel programs reliably under r-m if I only turn it up part way. Still can't handle it when I turn it all the way up, though. 02:25
yoleaux japhb: I'll pass your message to jnthn.
colomon japhb: huh. I get the invocant thing, but I’m still kind of surprised .&foo works.
japhb .tell jnthn (That was meant as a "Yay! Happy Day!" moment, BTW. :-) )
yoleaux japhb: I'll pass your message to jnthn.
japhb bus stop # & 02:26
ugexe use MONKEY-TYPING; augment MONKEY-TYPING { use MONKEY-TYPING; }
02:26 yqt left
Sgeo What's the difference between : and , for indicating the invocant, what does that actually give you? 02:28
And when?
colomon japhb: hmm… my mandelbrot script which tries to create 51 threads is still completely unreliable. 02:37
02:41 kaare_ joined 02:42 AlexDaniel left 02:43 noganex_ joined 02:46 noganex left
Sgeo :m say Mu.WHAT.WHAT.WHAT.WHAT; 02:48
m: say Mu.WHAT.WHAT.WHAT.WHAT;
camelia rakudo-moar a190b2: OUTPUT«(Mu)␤»
Sgeo m: say 5.WHAT.WHAT.WHAT.WHAT; 02:49
camelia rakudo-moar a190b2: OUTPUT«(Int)␤»
colomon japhb: … actually, it’s unreliable even with just 3 threads 02:54
ShimmerFairy colomon: surprised me too, but it was nice when uniname didn't exist as a method, so for a while "*".&uniname was how you had to do it. 02:58
colomon m: say "*".&uniname
camelia rakudo-moar a190b2: OUTPUT«ASTERISK␤»
colomon m: say "*".uniname 02:59
camelia rakudo-moar a190b2: OUTPUT«ASTERISK␤»
03:02 Mhoram left
Sgeo WHEN will .WHEN be defined? 03:03
03:04 Mhoram joined
Sgeo m: say 1.HOW; say Int.HOW; 03:05
camelia rakudo-moar a190b2: OUTPUT«Perl6::Metamodel::ClassHOW.new␤Perl6::Metamodel::ClassHOW.new␤»
Sgeo m: say 1.HOW === say Int.HOW;
camelia rakudo-moar a190b2: OUTPUT«Perl6::Metamodel::ClassHOW.new␤False␤»
Sgeo oops
colomon m: say <4 -2 3>.map(*.?abs) 03:08
camelia rakudo-moar a190b2: OUTPUT«4 2 3␤»
colomon m: say <4 -2 3>.map(&abs)
camelia rakudo-moar a190b2: OUTPUT«4 2 3␤»
colomon m: say <4 -2 3>.map(*.&abs)
camelia rakudo-moar a190b2: OUTPUT«4 2 3␤»
colomon m: say <4 -2 3>.map(abs)
camelia rakudo-moar a190b2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dJUAqZCKML␤Unsupported use of bare "abs"; in Perl 6 please use .abs if you meant $_, or use an explicit invocant or argument␤at /tmp/dJUAqZCKML:1␤------> 3say <4 -2 3>.map(abs7⏏5)␤»
03:14 Mhoram left 03:16 laouji joined 03:22 laouji left 03:24 FatalNIX left 03:25 abaugher joined 03:30 FatalNIX joined 03:37 gfldex left 03:40 nys left 03:42 jkva joined 03:46 jkva left
japhb colomon: URL for your mandelbrot script? 03:49
04:16 dustinm` left, coffee` left 04:20 dustinm` joined 04:27 laouji joined 04:30 davido__ joined 04:32 davido___ left 04:34 mr-foobar left 04:50 [Sno] left
skids .tell AlexDaniel The message for "..." still has to be fixed; it is a separate issue ("..." implicity tries to "return" from the mainline code, not just sink a Failure) What was fixed was there is no longer a different backtrace when a Failure is sunk in the last statement. 05:00
yoleaux skids: I'll pass your message to AlexDaniel.
05:04 skids left 05:14 ChoHag joined 05:22 fungle joined 05:26 fungle left 05:28 jkva joined 05:32 jkva left 05:40 mr-foobar joined 05:57 brrt joined 06:05 leedo joined 06:06 diana_olhovik_ joined
dalek line-Perl5: 5dbc3cb | ugexe++ | META.info:
Build.pm depends on `panda`

Unfortunately modules that use `Build.pm` also have a requirement on `panda`
06:07
line-Perl5: e90710d | niner++ | META.info:
Merge pull request #37 from ugexe/patch-1

Build.pm depends on `panda`
06:08 [Sno] joined 06:21 FROGGS joined 06:40 llfourn joined 06:41 telex left 06:42 telex joined 06:49 yeahnoob joined 07:06 TEttinger left 07:13 darutoko joined 07:23 rurban joined 07:28 rurban_ joined 07:36 llfourn left 07:37 pnu left, pnu joined
brrt when was 'our' syntax introduced? which perl5's have it? 07:40
07:41 rindolf joined
DrForr Back to at least 5.8.9, probably 5.005. 07:47
brrt hmm, ok
afk
07:47 brrt left 07:54 zakharyas joined 08:03 TEttinger joined
breinbaas can someone kick bruncol (junk pm) 08:03
oops, wrong channel - sorry 08:04
jdv79 re-implementing stuff is kind of a PITA 08:26
thank god I::P5 exists
rather, thank nine i guess 08:27
DrForr There's also Perl::ToPerl6 :)
jdv79 well, that's kinda pointless if you're trying to be idiomatic and 6ish 08:28
08:29 espadrine left
jdv79 i imagine its valuable in certain cases. i just can't think of any. 08:29
08:30 zakharyas left
jdv79 DrForr: what is hard to do? 08:31
DrForr It's not *hard* to convert per se, it's just time better spent fixing up code and changing things to be more idiomatic. 08:32
jnthn I'd imagine getting test suites translated can be pretty useful 08:34
yoleaux 02:25Z <japhb> jnthn: For the first time, I can run one of my highly-parallel programs reliably under r-m if I only turn it up part way. Still can't handle it when I turn it all the way up, though.
02:25Z <japhb> jnthn: (That was meant as a "Yay! Happy Day!" moment, BTW. :-) )
jnthn .tell japhb What're the failure modes you're seeing of turning it up to 11?
yoleaux jnthn: I'll pass your message to japhb.
08:38 laouji left
jdv79 that assumes the tests are applicable but, yeah, that's a good one. 08:39
08:40 laouji joined
jdv79 btw the <!Foo::token> is working now 08:41
timotimo thank god for nine!
jdv79 i was getting something about a bad big int op with <-Foo::token> and something about couldn't find '>' with the <! form - idk 08:42
coding while not fully awake--
08:44 baest left, baest joined 08:47 mr-foobar left 08:49 mr-foobar joined 08:50 RabidGravy joined 08:53 espadrine joined
RabidGravy marning 09:04
09:13 llfourn joined 09:16 pecastro joined 09:22 yeahnoob left
jdv79 what's a good way to get the hex values of encoded utf? 09:25
utf8 i mean
ShimmerFairy m: say "string".encode("utf8") 09:26
camelia rakudo-moar a190b2: OUTPUT«utf8:0x<73 74 72 69 6e 67>␤»
jdv79 but that obj isn't positional
not sure how to get at the individual bits well
timotimo m: say "string".encode("utf8").Buf.perl.say
camelia rakudo-moar a190b2: OUTPUT«Method 'Buf' not found for invocant of class 'utf8'␤ in block <unit> at /tmp/POm4yXklEg:1␤␤»
timotimo m: say "string".encode("utf8").list.perl.say 09:27
camelia rakudo-moar a190b2: OUTPUT«[115, 116, 114, 105, 110, 103]<>␤True␤»
ShimmerFairy m: say "string".encode("utf8")[1]
camelia rakudo-moar a190b2: OUTPUT«116␤»
jdv79 what is a utf8 obj - the docs are sparse
timotimo m: say "string".encode("utf8").list.fmt("%x").perl,say
camelia rakudo-moar a190b2: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at /tmp/4OMXEtzz71:1␤------> 3".encode("utf8").list.fmt("%x").perl,say7⏏5<EOL>␤Other potential difficulties:␤ Unsupported use of bare "say"; in Perl 6 please use .say if you mean…»
timotimo m: say "string".encode("utf8").list.fmt("%x").perl.say
camelia rakudo-moar a190b2: OUTPUT«"73 74 72 69 6e 67"␤True␤»
timotimo oops, a say too many
m: say "string".encode("utf8").list.>>fmt("%x").perl 09:28
camelia rakudo-moar a190b2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/u6oGm7CwYd␤Missing dot on method call␤at /tmp/u6oGm7CwYd:1␤------> 3say "string".encode("utf8").list.>>7⏏5fmt("%x").perl␤ expecting any of:␤ method arguments␤ postfix␤»
timotimo m: say "string".encode("utf8").list>>.fmt("%x").perl
camelia rakudo-moar a190b2: OUTPUT«("73", "74", "72", "69", "6e", "67")␤»
timotimo typing isn't my forte right now
jdv79 NO! list? i tried map/for/join/etc:(
geez
ShimmerFairy It's positional enough, though I personally would say Buf types not doing Positional is a bug :)
jdv79 thanks
09:28 araujo joined
timotimo ShimmerFairy++ # here to keep us honest 09:28
09:28 brrt joined
ShimmerFairy timotimo: just part of my opinion that Bufs for the last time are not strings and should in no way be designed as such :P 09:29
timotimo :)
i also think utf8 ought to support things like map/for/join/etc directly
ShimmerFairy unless you see a reason for just utf8, there's a reason I've been generalizing to Buf so far :) 09:30
timotimo no reason for that
i think we also should have things like split for Buf and friends 09:31
how do you feel about that?
ShimmerFairy timotimo: honestly, I'd rather see Buf being interpreted as a sort of "binary-data-based Positional type" rather than the "encoded Stringy type" it currently is :) 09:32
timotimo: not sure about split, lemme think for a moment
timotimo split into sub-bufs; seems useful to me
ShimmerFairy timotimo: on the one hand I don't see a problem with .split on Bufs, but then I wonder why other Positional types shouldn't have it too :P 09:34
I will admit that Bufs are in a weird middle between Stringy things and Positional things. I just think it's far too weighted towards the Stringy side as it stands (though IIRC it was worse in the past).
timotimo mhm 09:37
jdv79 the use case here is to %-encode utf8
09:37 mr-foobar left
itz morning 09:37
timotimo ShimmerFairy: oh, imagine a subbuf-rw-powered split 09:38
jnthn The utf8 type is a Blob rather than a Buf 09:39
Meaning it's immutable 09:40
So you can't make it invalid utf8
m: say "string".encode("utf8")[0]
camelia rakudo-moar a190b2: OUTPUT«115␤»
jnthn You can index it
timotimo ah, of course
ShimmerFairy That does sound potentially useful, despite the fact that I don't like -rw methods :P (It's not that I think they're wrong, just something about the look of .substr-rw(...) feels wrong, like we shouldn't need the -rw part. I don't know, just me)
jnthn So I suspect it not doing Positional may be an oversight
timotimo if we don't have the -rw parts, we'll have .copy instead on the ones that didn't have -rw so far :) 09:44
09:45 smls joined
|Tux| test 50000 42.725 42.636 09:45
test-t 50000 41.682 41.593
:)
FROGGS |Tux|: we are moving in the right direction again?
|Tux| yep
FROGGS awesome
|Tux| under 42
|Tux| pokes lizmat to look at the HLL ticket 09:46
FROGGS isnt 42.000 what we should aim for?
ShimmerFairy timotimo: sure, I'm not doubting that they're there for a good reason, but for some weird reason it almost feels like Perl 6 should do better than having to stick -rw after a method name :P (I guess it reminds me of languages without overloading, or something)
|Tux| 0.016 is what we should aim for :P
FROGGS |Tux|: I can also look into it
jdv79 m: say sprintf("%X",123) # ok
camelia rakudo-moar a190b2: OUTPUT«7B␤»
jdv79 m: say 123.sprintf("%X") # huh?
camelia rakudo-moar a190b2: OUTPUT«Directives specify 0 arguments, but 1 argument was supplied␤␤»
ShimmerFairy m: say "%X".sprintf(123)
camelia rakudo-moar a190b2: OUTPUT«7B␤»
ShimmerFairy m: say 123.fmt("%X") 09:47
camelia rakudo-moar a190b2: OUTPUT«7B␤»
FROGGS what was it again...
ShimmerFairy jdv79: ^ hopefully one of those is what you were after :)
FROGGS m: use NQPHLL:from<NQP>; use NativeCall
camelia rakudo-moar a190b2: OUTPUT«===SORRY!===␤Merging GLOBAL symbols failed: duplicate definition of symbol HLL␤»
FROGGS ahh, yeah
jdv79 format as inv seems very oddd 09:48
i'll use fmt then
09:54 mr-foobar joined 09:59 araujo left
RabidGravy eek a little buglet in Panda::Builder.build-order - the regular expression used to get the module names in the use and require lines won't match names with a '-' in them 09:59
10:00 TEttinger left
timotimo ouch 10:02
RabidGravy github.com/tadzik/panda/pull/197 - if anyone has commit on panda 10:15
10:18 virtualsue joined 10:29 laouji left, WizJin joined 10:34 laouji joined
dalek ast: a93ea8e | lizmat++ | S (7 files):
Remove tests for Index
10:40
10:42 g4 left
colomon japhb: github.com/colomon/mandelbrot/blob...arallel.pl 10:43
10:44 brrt left
tadzik RabidGravy: thanks, merged 10:47
RabidGravy yay! 10:48
10:48 g4 joined
RabidGravy on a related note is there or should there be a character class that matches a valid perl identifier? 10:49
nine RabidGravy: would be hard since there are different rules for the first character 10:50
ShimmerFairy there should be <ident> IIRC 10:56
10:57 brrt joined 11:04 RabidGravy left
itz m: say :a<b>.perl 11:12
camelia rakudo-moar a190b2: OUTPUT«:a("b")␤»
itz m: say :a<b>.gist
camelia rakudo-moar a190b2: OUTPUT«a => b␤»
itz are those different for a reason?
11:12 Begi joined 11:14 espadrine left 11:15 rindolf left 11:16 Psyche^ joined 11:21 Psyche^_ left, Begi1 joined 11:23 espadrine_ joined 11:24 WizJin left, Begi left 11:27 rindolf joined 11:28 pmurias joined
dalek kudo/nom: 7200905 | lizmat++ | src/core/ (3 files):
Eradicate Index in favour of something else

As discussed at irclog.perlgeek.de/perl6/2015-08-05#i_11010199
Please note that this revert somehow breaks $::("PROCESS")::OUT notation but keeps PROCESS::<$OUT> working. I have *no* idea how reverting Index has an effect on parsing at that level. Have been banging my head for a while now, and think this just uncovered some deeper issue that needs more eyes. Hence this commit.
11:29
ChoHag c 11:33
Sorry. Left arm no longer works.
pmurias :( 11:37
nine lizmat: sounds like a real WTF 11:38
lizmat yeah... 11:40
hope it unveils some deeper underlying issue
11:40 dayangkun left
DrForr www.flickr.com/photos/ooraa/sets/7...361108138/ # *so* going this year. 11:40
11:41 brrt left
ChoHag Agh! It's my coffee-drinking arm! 11:43
lizmat somebody call 26333-11 ! 11:44
11:45 mr-foobar left
ChoHag <banal masturbation joke> 11:45
I'm sure that number signifies something relevant but I don't know what. 11:47
lizmat COFFEE-11 11:48
oops, 263333-11 :-)
nine No wonder, we didn't get it :)
11:48 darutoko- joined
lizmat Ka-Tsjing! 11:49
11:50 darutoko left
llfourn Is there a way of declaring class with a custom HOW? 11:54
class Foo is_meta CustomMetaClass { } # or something 11:55
11:56 brrt joined
lizmat perhaps using World.nqp's add_package_declarator... but that's getting really into the core guts 11:59
llfourn I think I could do a slang to do it but I was wondering if there was a more friendly way 12:01
like myclass Foo {}
ShimmerFairy I thought I saw a keyword like 'is' and 'does' once, but I'm not sure now. 12:02
ChoHag It's easy to apply a trait to an attribute, I guess it's similarly easy to apply one to a class.
12:02 pochi left 12:03 pochi joined
ChoHag Those are for inheritence and consumption. 12:03
Not the disease.
llfourn ChoHag: Yep I could do Foo.HOW does CustomMetaClass
CustomMetaRole*
I actually don't know how to apply trait to class 12:04
ChoHag Nor do I :)
llfourn ie override class Foo is mytrait {}
ChoHag Traits are basically black magic I think.
llfourn well I think class is declaration somehow gets in the way of traits
12:06 sunnavy joined
ChoHag Looking at traits.pm I wouldn't say 'gets in the way'. Seems like inheritence is implemented using traits. 12:06
12:06 gfldex joined
llfourn ChoHang: But I don't seem to be able to override it 12:07
ChoHag multi sub trait_mod:<is>(Mu:U $child, Mu:U $parent) {
Any time somebody who knows what they're talking about wants to chime in is fine by me.
llfourn ChoHag: Yep I tried that once with sub trait_mod:<is>(Mu:U $child, MyClass:U $parent) { ... } 12:08
I think
hang on
ChoHag multi sub trait_mod:<is>(Mu:U $clas, :$funky!) { ... }; class Foo is funky { ... } 12:09
m: multi sub trait_mod:<is>(Mu:U $clas, :$funky!) { say "Implement funky class" }; class Foo is funky { has $!something }; say "Compiled"; Foo.new.say 12:10
camelia rakudo-moar 720090: OUTPUT«Implement funky class␤Compiled␤Foo.new␤»
jnthn llfourn: See Grammar::Tracer, OO::Monitors and OO::Actors for examples on how to do custom meta-objects 12:11
llfourn ChoHag: you're right it works
jnthn: kk thanks
jnthn You basically have to introduce a new package declarator or tweak the meaning of an existing one. 12:12
Grammar::Tracer does the first (changes what "grammar" uses for its meta-object), the second two introduce new package declarators (monitor and actor respectively)
Such changes are lexically scoped. 12:13
llfourn jnthn: I just did this which seesm to work: BEGIN { constant Foo = CustomMetaClass.new_type(:name('Foo')) }
but a package declarator would be nice! 12:14
ChoHag How can I see if something's a Failure without throwing or handling it? 12:17
llfourn jnhtn: This is excellent. It's much easier than expected. Thanks.
jnthn ChoHag: sub f() { fail 'whale' }; say f() ~~ Failure 12:18
m: sub f() { fail 'whale' }; say f() ~~ Failure 12:19
camelia rakudo-moar 720090: OUTPUT«True␤»
jnthn m: sub f() { 'whale' }; say f() ~~ Failure
camelia rakudo-moar 720090: OUTPUT«False␤»
jnthn Like that
ChoHag Hmm that seems to be throwing it.
I must be doing something wrong...
[Coke] m: sub f() returns Str { fail 'whale' }; say f() ~~ Failure 12:20
camelia rakudo-moar 720090: OUTPUT«True␤»
[Coke] jnthn++ ISTR that didn't work at some point.
12:23 xinming joined, espadrine_ is now known as espadrine
jnthn It wasn't me how fixed that one :) 12:25
12:26 xinming_ left
itz is there a simple way of having a hash with case insensitive keys? 12:29
dalek p/js: bacd46f | (Pawel Murias)++ | t/nqp/77-curlexpad.t:
Test for binding using nqp::curlexpad.
12:39
12:42 lucasb joined
[Coke] "use coldfusion" is probably not a reasonable answer. 12:45
lucasb I don't understand why 'sub f returns Str { fail }' works. Shouldn't it respect the return type check? 12:47
Failure is not an Option 12:48
er, I mean... Failure is not a Str
12:51 skids joined
Begi1 itz: my %hash; %hash{'key'} = 'value'; say %hash{'Key'}; and would retrun 'value' ? 12:51
lizmat m: class Foo is Hash { method AT-KEY($a) { nextwith lc $a } }; my %h := Foo.new; %h<a> = 42; say %h<A>.perl # itz
camelia rakudo-moar 720090: OUTPUT«42␤»
[Coke] lucasb: failure is special.
smls Everyone who cares qbout p6doc, please read (and comment) this: github.com/perl6/doc/issues/114 12:52
lizmat itz: depending on your needs, you would probably need to do ASSIGN-KEY and friends as well
12:53 rurban_ left
itz lizmat: ty 12:54
lizmat and perhaps make it a role rather than a subclass :-) 12:56
dalek p/js: bf3601d | (Pawel Murias)++ | src/vm/js/ (5 files):
Pass test 77.

Implement nqp::curlexpad.
13:00
pmurias nqp-js: say("Has it bitrotted?") 13:01
camelia nqp-js: OUTPUT«/bin/sh: node: command not found␤»
13:01 LLamaRider joined, LLamaRider left
pmurias :/ 13:01
lizmat m: class Foo {}; my %h is Foo # too bad this isn't implemented
camelia rakudo-moar 720090: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Aw6poyYJXA␤Variable trait 'is TypeObject' not yet implemented. Sorry. ␤at /tmp/Aw6poyYJXA:1␤------> 3is Foo # too bad this isn't implemented7⏏5<EOL>␤ expecting any of:␤ constraint␤»
lizmat pmurias: moritz could be of help perhaps 13:02
13:04 skids left
ChoHag Remember that case-insensitive means a vastly different thing in the post-ascii modern world than it used to. 13:06
What's the advantage in using proto? 13:10
Is it of more concern in core than regular code?
nebuchadnezzar lizmat: shouldn't the eject symbol be at “Foo”, since the “#” introduce comment? 13:15
jnthn ChoHag: If your candidates would all have some common prelude/postlude it can be useful also 13:16
(to factor it out)
13:16 brrt left
lizmat m: class Foo {}; my %h is Foo; # too bad this isn't implemented 13:16
camelia rakudo-moar 720090: OUTPUT«5===SORRY!5=== Error while compiling /tmp/MUhiRdZnHD␤Variable trait 'is TypeObject' not yet implemented. Sorry. ␤at /tmp/MUhiRdZnHD:1␤------> 3class Foo {}; my %h is Foo7⏏5; # too bad this isn't implemented␤ expecting any of:␤ …»
lizmat nebuchadnezzar: yeah, but eof parsing issues we're not going to fix any time soon, I think 13:17
nebuchadnezzar ok 13:18
13:20 diana_olhovik_ left
lizmat ChoHag: regarding case-insensitive, lc() should take care of unicode lowercasing. If it doesn't we hez a bug 13:26
13:27 diana_olhovik_ joined
ChoHag Including weird corner cases? 13:28
Humans are a strange bunch and languages are very human.
13:30 baest left
ChoHag When creating an instance, is there an easy way to ensure methods are called with self as an instance without 'multi method foo (::?CLASS:U:) { ::?CLASS.instance.foo(|%_) } 13:30
13:30 baest joined
ChoHag And if not, what's the right syntax for calling the instance's foo? |%_ looks like it'll ignore positional parameters. 13:30
FROGGS ChoHag: our unicode implementation should (does) take care of special cases for lower-, upper- and titlecase 13:31
ChoHag FROGGS: I like your confidence.
FROGGS :o)
I know there is a titlecase bug fwiw
ChoHag s/an instance/a singleton/
13:37 rindolf left
[Coke] there is an RT for a few of the casing issues that are not doable based simply on the unicode metadata. 13:39
jnthn We don't do the SpecialCasing stuff yet 13:41
tony-o FROGGS is back
FROGGS O.o 13:42
jnthn Which iirc includes some Turkish final thingy, and the German Scheiße... 13:43
FROGGS :P
ShimmerFairy jnthn: just took a peek at SpecialCasing, that's the first time I've seen ß referred to as "es-zed" O_o
(though I'm glad it takes care of ß->ẞ ☺)
(or wait, I think it does precisely the wrong thing e_e) 13:45
13:46 rindolf joined
DrForr ess-tzet I thought it was :) 13:47
[Coke] rt.perl.org/Ticket/Display.html?id=121377 13:49
ShimmerFairy [Coke]: as far as I'm concerned, ẞ is the capital of ß, and none of this "SS" business unless you're using one of the NFK forms :) . Sadly nothing in current Unicode reflects this (ẞ has ß mapped as its lowercase, but heaven forbid they do the other direction) 13:52
13:54 yqt joined 13:55 Begi1 left
ShimmerFairy fwiw "ß" ~~ m:i/SS/ looks like something that should only work if you asked for a compatibility decomposition (NFKD/NFKC), so I'd really rather not see that working otherwise. 13:55
m: say "ß" ~~ m:i/ẞ/ # this works, however :) 13:56
camelia rakudo-moar 720090: OUTPUT«「ß」␤»
13:57 muraiki joined 13:58 rurban_ joined
lucasb m: my $*x = 42; say $*x 14:03
camelia rakudo-moar 720090: OUTPUT«42␤»
lucasb m: $*x = 42
camelia rakudo-moar 720090: OUTPUT«Dynamic variable $*x not found␤ in block <unit> at /tmp/VXYMOFAnJD:1␤␤Actually thrown at:␤ in any at src/gen/m-Metamodel.nqp:2867␤ in block <unit> at /tmp/VXYMOFAnJD:1␤␤»
14:04 brrt joined
lucasb ^^ Is everything fine with this? Isn't it strange to need 'my' (lexical scoping) to declare a dynamic scope var? 14:04
jnthn dynamic variables are lexicals, just looked up differently, and falling back to also looking in GLOBAL and PROCESS
[Coke] some of the tests predate NFG 14:05
ShimmerFairy As I understand it, dynamic variables simply differ in that they're looked up through the chain of CALLERs, rather than OUTERs (to put it roughly) 14:07
[Coke]: doesn't surprise me. Which ones, ooc?
14:08 RabidGravy joined
lucasb jnthn, ShimmerFairy: ok, thanks 14:09
14:16 Begi1 joined
dalek p/js: 5681981 | (Pawel Murias)++ | src/vm/js/ (4 files):
Pass test 74.

Implement nqp::nfarunproto and nqp::nfafromstatelist.
14:23
p/js: 7160de9 | (Pawel Murias)++ | src/vm/js/nqp-runtime/curlexpad.js:
Fix bug
FROGGS pmurias++ 14:31
14:34 laouji left
nine nqp-js: say("Has it bitrotted?") 14:36
camelia nqp-js: OUTPUT«Has it bitrotted?␤»
nine pmurias: ^^^ fixed it :) 14:37
[Coke] pmurias++ # welcome back! :) 14:40
14:45 g4 left
itz rt.perl.org/Ticket/Display.html?id=125761 should be closed and removed if anyone has RT access 14:48
[Coke] marked as spam, gone 14:55
(press the big S in the menu bar) 14:56
also killed 125759
up to 1,036 tickets. 14:57
pmurias nine: nice nice :) 14:59
15:02 Sqirrel joined 15:04 mr_ron joined
mr_ron m: grammar G {token TOP { <B> }; token B { 'b'+ }}; my $parse-rc = G.parse('bbbb'); my $parse-rc2 = G.parse('bb', :rule<B>); $parse-rc<B> = $parse-rc2; 15:04
camelia rakudo-moar 720090: OUTPUT«Cannot modify an immutable Match␤ in block <unit> at /tmp/D8bdDJcb_k:1␤␤»
mr_ron any way around the immutable match? 15:05
15:06 telex left
arnsholt mr_ron: Any particular reason you want to modify the match? Sounds like something there might be a better way to achieve 15:07
itz hmm it's a small overlooked grey S in my browser which I never noticed :)
maybe grey either because a web designer has got their hands on it or maybe a function I don't have access to
15:08 telex joined
mr_ron arnsholt: I really want to reparse the authority (host and port) of a URI without having to reparse the whole URI. This was a smaller example. 15:08
FROGGS m: grammar G {token TOP { <B> { make {'B' => $<B>.made} }}; token B { 'b'+ { make ~$/ }}}; my $parse-rc = G.parse('bbbb').made; my $parse-rc2 = G.parse('bb', :rule<B>).hash; $parse-rc<B> = $parse-rc2;
camelia ( no output )
FROGGS mr_ron: you might want to move the 'make's into action methods and build a hash/structure there 15:09
15:10 diana_olhovik_ left, Ven joined
mr_ron FROGGS: thanks - I have to learn more about action methods ... 15:14
15:16 mr-foobar joined
Ven waves from the country side 15:16
dalek p/js: 385b139 | (Pawel Murias)++ | src/vm/js/ (3 files):
Implement nqp::composetype, the reprs still don't do anything at composition time
15:17
p/js: 0d6e537 | (Pawel Murias)++ | src/vm/js/bin/run_tests:
Add passing test 61 to run_tests.
Ven or I guess that's one word only, err?
nine mr_ron: there's little to learn and it's well worth it :)
15:18 FROGGS left
jnthn Ven: Yeah, countryside is one :) 15:20
15:35 rurban left 15:37 yqt left
japhb *yawn* 15:45
yoleaux 08:34Z <jnthn> japhb: What're the failure modes you're seeing of turning it up to 11?
japhb is still not 100% awake
15:46 brrt left, virtualsue left
japhb jnthn: It varies. Sometimes just exiting silently during the phase where I'm building up a giant pile of tasks, sometimes "Object does not exist in serialization context" while waiting on the promises; sometimes binding errors for types that aren't used anywhere in my code, like UInt; and sometimes, if I'm quite lucky, it Just Works. 15:48
jnthn Ugh 15:49
That middle one is especially weird 15:50
japhb jnthn: The code is structured in a way that produces M * N tasks: I start M tasks that each starts N subtasks, and then I loop doing 'await Promise.anyof(@output-promises)'. For M=1, it's been solid so far. For M>1, it's immediately in the unstable territory. 15:52
jnthn: FWIW, N == 14, and I create a thread pool scheduler large enough to handle all M * N tasks in separate threads.
(dynamically at program start, because M can be determined from MAIN's args) 15:53
jnthn Do you actually have M * N CPU cores? :)
japhb I WISH.
jnthn Well, I'm asking mostly 'cus if you start that many real OS threads then you'll end up with over-subscription
15:54 Psyche^_ joined
jnthn (If M * N is much greater than number of CPU cores) 15:54
15:54 virtualsue joined
jnthn Still shouldn't explode, of course. 15:54
japhb This structure is partly because >6 months ago, the Rakudo concurrency code could deadlock when there was no user-level reason for it. That may well be fixed now, but ... I'm just dusting this code off after having it unchanged for quite a while. 15:55
15:55 FROGGS joined
japhb Oh, I mean, could deadlock if the threadpool was smaller than the task count. 15:55
15:56 Psyche^ left
jnthn ah, ok 15:56
15:56 rurban joined
japhb When you say over-subscription, are you hinting at something other than the literal meaning? It sounds like you're saying that's a known failure mode, rather than just something that reduces performance slightly 15:56
15:57 llfourn left
jnthn I just mean it can be a performance reduction 15:57
japhb Ah, OK, that's fine then. :-)
TimToady well, and maybe it'll tend to bring out different sorts of problems on average
jnthn Though I'm not sure how slight it is :) 15:58
15:58 pippo joined
japhb I initially wanted to set the thread pool size to (CORES - 2) or so, so that I could use my computer for other things responsively, but as I said back when I wrote it, that just begged stability issues. :-/ 15:58
pippo o/ #perl6
japhb o/
pippo m: @a = 2014,1,1; my $date = Date.new(@a); #does not work 15:59
camelia rakudo-moar 720090: OUTPUT«5===SORRY!5=== Error while compiling /tmp/T04C16FimY␤Variable '@a' is not declared␤at /tmp/T04C16FimY:1␤------> 3<BOL>7⏏5@a = 2014,1,1; my $date = Date.new(@a); ␤»
pippo why?
m: @a = 2014,1,1; my $date = Date.new(@a[0], @a[1], @a[2]);
camelia rakudo-moar 720090: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1453RYG_xG␤Variable '@a' is not declared␤at /tmp/1453RYG_xG:1␤------> 3<BOL>7⏏5@a = 2014,1,1; my $date = Date.new(@a[0]␤»
TimToady Read the error message 16:00
japhb pippo: You need a 'my' on the variable decl, and I'm guessing Date.new(|@a)
TimToady that too
pippo m: my @a = 2014,1,1; my $date = Date.new(|@a);
camelia ( no output )
pippo m: my @a = 2014,1,1; my $date = Date.new(|@a);say $date;
camelia rakudo-moar 720090: OUTPUT«2014-01-01␤»
pippo Thaaaaaaaaaaaaaaaaaaanks :-))
TimToady arrays don't autoflatten like they do in P5 16:01
smls jnthn: re your gist, line 64 "The [...] array constructor does not flatten, but respects Slips.": Wouldn't it be easier if the comma operator takes care of interpolating Slips?
pippo OK
smls Instead of letting downstream operators like [ ] decide whether or not to respect the Slip's.
pippo TY
TimToady or to look at it the other way, P6 arrays are implicitly references without the \ 16:02
so you can pass multiple arrays as single arguments
but that means you have to do something like | when you really want the other thing
japhb jnthn: In your GLR gist, the three lines of comment starting at gist.github.com/jnthn/aa370f8b32ef...glr-p6-L86 seem out of place ... or maybe I'm just confused. 16:03
16:05 zakharyas joined
TimToady smls: that's just a manner of speaking, since [] delegates the work to the list subsystem, which is what handles the commas too 16:05
smls ah, ok 16:06
nine It's shocking how much productivity time I waste by blocking on the decision of what I should make for dinner...
smls TimToady: Did anything become of your idea to use prefix | for both .Slip and agrument interpolation? 16:07
TimToady we might try it and see if it's worth it
jnthn smls: At the moment my [a,b] is a call to GLRArrayCircumfix(a,b) because I really didn't want to have to write a GLR, b there too :) 16:08
TimToady it would basically be taking currently illegal | and turning it into slip()
smls I'm not thrilled about having to write "my @b = 1, @a.Slip;" or "my @b = flat 1, @a;" but "my @b = 1, |@a" wouldn't be so bad.
jnthn will probably write the flat variant of it
smls: It's up for grabs whether we'll call [...] always with one arg or whether we'll call it with a bunch of args 16:09
smls: I may do the latter for performance reasons.
Oh, and I think we have to 16:10
Because
[(1, 2, 3)] != [1, 2, 3]
So yeah, it'll stay largely as it is.
japhb: Yeah, I think they somehow were attached to the previous bullet point once... :) 16:11
Either way, most of the interesting work of handling the Slip is shared over exactly the same code 16:12
16:13 lucasb left 16:19 spider-mario joined 16:21 Ven left
JimmyZ what is the difference between ' my $x := self.CREATE' and ' my \x = self.CREATE' ? 16:25
jnthn Nothing much 16:26
They probably even compile into the same thing
TimToady you can rebind $x, can you rebind \x?
jnthn Oh
Yeah, true :)
TimToady it's really partly intended for explicit SSA programming
jnthn *nod*
jnthn writes SSA code generally 16:27
TimToady I had a thought on distinguishing named vs pair notation: if we made the named form a :> 123 and reserved a => 123 for pairs, then all of the named parameters have a colon somewhere
though :> would take some getting used to
jnthn :/
I don't see it as a problem that needs fixing, tbh. 16:28
And I really don't feel like the echosystem upheavel
*ecosystem
JimmyZ I saw the glr gist some is \x =,and some is $x :=
:P
jnthn JimmyZ: Yeah, I've probably been inconsistent. It really doesn't matter.
I tend to think in semantics rather than syntax. 16:29
JimmyZ so I thought there are some difference .
jnthn Well, if I'll rebind it later than it'll be $x
But no, don't read too deeply into that :)
pippo o/ 16:30
16:30 pippo left
jnthn TimToady: I'd sooner outlaw 42 => ... in an argument list as "must have an identifier here" and demand parens around it in that context, than change the operator. 16:31
Using => to pass named args is deeply culturally embedded in Perl for a long, long while
TimToady trew
16:32 mr_ron left
JimmyZ Did the design docs say about rebind or difference? 16:32
TimToady not sure
jnthn Well, my \x = ... is documented as SSA
iirc
JimmyZ it is nice to have, if it is not there 16:33
16:35 zakharyas left
JimmyZ I didn't find it talks about SSA in the specs repo... 16:38
good night
TimToady I didn't either, good night 16:39
jnthn 'night, JimmyZ 16:40
16:41 virtualsue left 16:45 zakharyas joined
jdv79 Null regex not allowed? 16:46
hmm, i was going to so /[$re_constant | $re_opt] and have the default for re_opt be // 16:47
is there some way to do something like that?
TimToady match '' 16:48
or <?>
jdv79 oh, thanks 16:49
smls m: say key : "value"; 16:52
camelia rakudo-moar 720090: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7YDKbEeIuc␤Preceding context expects a term, but found infix : instead␤at /tmp/7YDKbEeIuc:1␤------> 3say key :7⏏5 "value";␤»
smls ^^ bare colon with surrounded by whitespace isn't taken either :P 16:53
though I'm kinda hoping that in some future Perl 6.x, that will be allowed for python-like control statements... 16:55
given ... { when 1 { ... }; default { ... } } has too high brace density
given ... { when 1 : ... ; default : ... } would be prettier
16:55 cognominal joined
dalek ecs: dfad561 | TimToady++ | S06-routines.pod:
mention that \x is SSA semantics
16:57
TimToady smls: we can't use it for that and the invocant colon at the same time 16:58
smls isn't preceding whitespace forbidden for the invocant colon? 16:59
TimToady no, it's just a funny comma
smls
.oO( damn you, incocant comma! *shakes fist* )
TimToady plus autoquoting the left side is problematic with such an ambiguous character 17:00
smls right 17:01
though the control statements usage would not do that
TimToady plus people will try to leave out the space on the left, and get confused
and it's just not really visual enough for a directional relationship
(though to be fair, colon is a directional relationship in English, generally) 17:02
one other minor point, while => requires two characters, ' : ' is really requiring three 17:03
17:11 cognominal left
dalek rl6-roast-data: bd19963 | coke++ | / (9 files):
today (automated commit)
17:12
nine smls: wishing for Python syntax to write prettier one-liners is...ironic :) 17:13
TimToady if we really want something that's one character, we should use something like ≘ 17:15
.u ≘
yoleaux U+2258 CORRESPONDS TO [Sm] (≘)
17:22 rangerprice joined 17:23 rurban left 17:28 kjs_ joined
jnthn It looks like a cheezburger... 17:28
rangerprice cheezburger is delicious
17:31 rurban_ left
timotimo i'm really hungry :S 17:32
17:34 baest_ joined 17:36 baest left
japhb jnthn: 🍔 17:40
17:40 brrt joined
ChoHag 🐍 17:44
17:52 skids joined 17:59 kjs_ left
ChoHag How do you create a Pair where the key isn't a Str? 18:06
Or: How do I not autostringify the LHS of foo => bar? 18:07
timotimo m: my $test = Pair.new(:key(1), :value(10)); say $test.value.WHAT
camelia rakudo-moar 720090: OUTPUT«(Int)␤»
timotimo that's how
ChoHag No shorter syntax?
timotimo m: say ((1) => "hi").key.WHAT 18:08
camelia rakudo-moar 720090: OUTPUT«(Int)␤»
timotimo m: say (1 => "hi").key.WHAT
camelia rakudo-moar 720090: OUTPUT«(Int)␤»
timotimo m: say ($_ => "hi").key.WHAT
camelia rakudo-moar 720090: OUTPUT«(Any)␤»
timotimo m: $_ = 100; say ($_ => "hi").key.WHAT
camelia rakudo-moar 720090: OUTPUT«(Int)␤»
ChoHag Ah so it's just because my variable is sigilless.
So since I'm cargo-culting that, what's the significance of sigilless variables?
I recalled doing 'my \r = foo' from before as a way to keep the return value entirely unaffected, down to the container. Is that the way to do it? 18:09
timotimo ah yes, sigilless variables will do that for you
18:13 espadrine left 18:34 spider-mario left 18:41 Sqirrel left, lucasb joined 18:42 brrt left
lucasb m: say Pair.new 18:44
camelia rakudo-moar 720090: OUTPUT«(Any) => (Mu)␤»
18:44 Sqirrel joined
lucasb Would it be better if Pair.new() was an error? 18:45
18:45 rurban joined
lucasb Also, would it be easier to have a Pair.new($k,$v) constructor too? 18:45
m: class P is Pair { submethod BUILD {} }; say P.new(:key<a>,:value(1)) 18:47
camelia rakudo-moar 720090: OUTPUT«Too many positionals passed; expected 1 argument but got 3␤ in submethod BUILD at /tmp/MIVaQaO4Dl:1␤ in block <unit> at /tmp/MIVaQaO4Dl:1␤␤»
18:47 zakharyas left
lucasb ^^ I would like to try fixing these 3 things, if someone can confirm and agrees with me 18:49
18:50 abaugher left, rangerprice left 18:54 nys joined 19:00 rurban left
lucasb m: say Pair.new.antipair 19:04
camelia rakudo-moar 720090: OUTPUT«Type check failed in binding $key; expected 'Any' but got 'Mu'␤ in block <unit> at /tmp/ISI3i5C5yc:1␤␤»
smls I do think having to write Pair.new(key => ..., value => ...) has a certain irony to it :P 19:05
lucasb I don't know why key must be Any and value can be Mu. Either both are Mu or both are Any? 19:06
nine lucasb: Pair.new($key, $value); has been tossed around a couple days ago and it was the first thing I tried. I think the idea has merit.
lucasb: I'm not sure what banning Pair.new would buy us though.
smls yeah, if Date.new can have a positional constructor, why not Pair.new
lucasb: Regarding key and value having different default type constraints, I don't see that as an issue 19:08
Hash also has Str for keys and Mu for values, by default.
jnthn It's funny we call them sigilless variables, when they can't vary... :) 19:09
19:09 jjido joined
smls should we call them "lexical constants"? 19:10
lucasb m: my %h; %h<a> = all(1,2,3); say %h; say %h.antipairs # this is a little funny :)
camelia rakudo-moar 720090: OUTPUT«a => all(1, 2, 3)␤all(1 => a, 2 => a, 3 => a)␤»
lucasb sure, with 'my %h{Mu}' it works as I would expect :) 19:12
oops, *no*, it doesn't work as I would expect
TimToady jnthn: well, they vary in the sense that any rebindable symbol can vary 19:13
rebindable-on-reentry, I mean 19:14
ribasushi <jnthn> [(1, 2, 3)] != [1, 2, 3] 19:15
ab5tract_ m: sub new-pair( *@a, :$k, :$v ) { die if ($k || $v) && +@a; +@a ?? ( @a[0] => @a[1] ) !! ( $k => $v ) }; say new-pair( :k('k'), :v('v')); say new-pair( 'k','v' ); say new-pair( :k('nok'), 'v')
camelia rakudo-moar 720090: OUTPUT«k => v␤k => v␤Died␤ in sub new-pair at /tmp/TOQix5GFz9:1␤ in block <unit> at /tmp/TOQix5GFz9:1␤␤»
ribasushi out of curiosity what is the difference in the above?
ab5tract_ (even without mmd ;)
jnthn ribasushi: Array with one item that's a list of 3 Ints, vs. array of 3 Ints. 19:17
TimToady: Yes, true. :) I wasn't being especially serious... :) 19:18
ChoHag Seriousness is overrated. 19:21
ab5tract_ I feel like it would make a bit more sense to approach 'Pair.new' as 'pair', which could be a sub implemented much as I just did, with either positional or named parameters, but not both at the same time.
ChoHag Much as it annoys me when people say its like to me, mostly because it's correct, core/Pair.pm exists. 19:22
ab5tract_ though, come to think of it, 'pair' would just be analogous to the constructor form anyway, if it were to keep with convention?
ChoHag And at 20 lines it's ripe for the editing.
TimToady we certainly privilege other constructors, like set()
ribasushi jnthn: is there a writeup on the basic difference?
or is the latter a basic type? 19:23
TimToady are you talking about [(1,2,3)]?
ChoHag On a meta note, while you're here TimToady, I think more noise could be made about the easy hackability of perl 6 the language.
TimToady we'll make more noise after Christmas
jnthn TimToady: yes
TimToady: Did I confuse myself on the difference? :) 19:24
TimToady: oh dammit, we settled on single item rule, didn't me...
*we
TimToady I was asking ribasushi
ChoHag Yeah I know I bitch here more and patch/bug-report less than I should, but the code in core/ and Perl6/ looks particularly editable.
ribasushi TimToady: yes, that
jnthn TimToady: Yeah, but I think I mighta confused things...
ab5tract_ ChoHag: one of my absolute must-haves now that I've hacked on Rakudo is being able to code the implementation in the language itself 19:25
Though of course I would say that.. I'm a Perl hacker, so of course I couldn't hack in the implementation language until Perl got written in Perl ;) 19:26
ChoHag Same.
mst TimToady: basically, we both saw [(1,2,3)] != [1,2,3], went "eh what huh?!", and came over here to ask, and he was faster 19:27
jnthn mst: It woulda been justifiable, but we ended up not going that way.
mst: Note that [(1, 2, 3),] *would* be different. 19:28
ChoHag I'm ignoring list/array oddities until jnthn's hackery is merged.
ribasushi oh, I didn't realize this is WIP, carry on then
jnthn ribasushi: Well, the fact it's WIP is why I got confused.
mst jnthn: trailing comma?
significant?
jnthn mst: Yes.
TimToady yes, but we're transitioning to a "one-arg" rule, which is gonna be a little disconcerting to us and everyone else :)
mst adjusts the 'python footgun-ometer' one step up
DrForr WIP it good?
ChoHag Because the whole thing's Weird As Fuck (which is saying something considering Perl 6 : Perl 5 ~~ Weird : Normal) and it looks like that's going to change. 19:29
jnthn DrForr: Well, hopefully not WIP it back and forth... :) 19:31
ab5tract_ ',' is a list constructor, no?
DrForr Devo-lves.
19:31 spider-mario joined
jnthn ab5tract_: Correct 19:32
ab5tract_ Then trailing without effect would actually be the unexpected behavior here 19:33
jnthn Indeed.
It's totally logical once you understand that. 19:34
ab5tract_ Though I suspect at some point I might not be able to deal and hack up a pragma for trailing commas ('use explicit-list' ?)
;)
jnthn Well, thing is, if you're writing my @a = 1, 2, 3,; style things, there's no parens needed at all
So you don't even get to make the mistake of putting the comma the wrong side of the parens and getting a surprise. 19:35
As if you're especially likely to do that and not notice it anyways...
mst this is actually kinda prologish ;) 19:36
my @a = 1, 2, 3.
ab5tract_ jnthn: that is a very good point. the most appropriate of all trailing commas, is the traling comma at the end of a List! :)
jnthn mst: As I said, it's logical :P
19:37 Guest37893 joined
mst jnthn: right up until somebody takes [(1,2),(3,4)] and removes the second element and ends up with [(1,2)] at which point apeiron eats a kitten 19:38
jnthn: note that this happens a lot with people editing python tuple constructors and results in much cursing
ab5tract_ mst: [ ] should already behave as if it had ',' inside it, iirc 19:39
jnthn mst: But you can't have that *and* have [1,2,3] *and* [(1, 2, 3)] be the same thing.
mst I'm aware. basically you need a keyboard with more sorts of bracket 19:40
ChoHag You mean a unikeyboard?
ab5tract_ just a sub circumfix:<<$unused-unicode-char>> away 19:42
jnthn mst: Then you end up with more sorts of list-related type, which people will also complain about.
mst: The only thing that's a cert is you can't win... :)
19:42 xinming left
ChoHag Welcome to reality. 19:42
mst jnthn: right, I'm just not entirely sure whether this is the right trade-off 19:43
maybe the real answer here is to forbid [(1, 2, 3)] entirely as ambiguous
I mean, nobody would complain about that, right?
mst hides
19:44 brrt joined
jnthn mst: Well, the argument is for consistency between [...] and my @a = ...; 19:45
smls You could always have a linter that detects such cases. 19:46
ChoHag Consistency, like seriousness, is also overrated.
Else what's the point in irregular verbs?
mst o/ I'd love to stay here and be normal / but it was always overrated o/
19:47 Begi1 left
mst jnthn: yeah, and my thought is if you encourage people to the idea of 19:47
ChoHag Normality's another one.
mst my @a = (...); is consistent with [...]
then [(1, 2, 3)] is weird and makes no sense and don't do that
jnthn You don't need the parens in the first one
ab5tract_ mst: then we might as well code in Perl 5?
(I saw that as an undying fan of Perl 5) 19:48
*say
mst the *idea* doesn't imply you use the parens all the time
ChoHag What do different types of bracket *mean* (where mean != do)?
mst only that you use that as a heuristic
ChoHag Programming aside, what's their purpose? 19:49
mst jnthn: eh, I can always use a slang to forbid [(1, 2, 3)], can't I :P
ab5tract_ mst: in a dozen lines or so, I would expect
mst use grumpy::mst; 19:50
ab5tract_ mst: if you've seen the style that Slang::Tuxic accomodates, you might see that implementing grumpy::mst is a trivial (and by all relative metrics completely sane) feat for Perl 6 19:58
(said with all respect to [TuxCM]++ :) )
ChoHag Amusingly/Ironically: Square brackets ([ ]) are used inside of parentheses to denote something subordinate to the subordinate clause.
ab5tract_ ChoHag: IIUC, () implies 'flatten away' while [] implies 'flattening is only gonna happen explicitly' 19:59
ChoHag "Programming aside"
ab5tract_ ChoHag: EDOESNOTCOMPUTE ;)
ChoHag :) 20:00
ab5tract_ ChoHag: if we rephrase that as, what is the linguistic significance of [] vs (), we might be able to /summon TimToady
(though there are no guarantees in linguistics, as I understand it) 20:01
[TuxCM] :)
ChoHag Pratchett put it best, and I can't remember the exact quote, but it's something about using a language formed for the purpose of telling each other where the best fruit is. 20:02
mst [TuxCM]: where would I be best looking for Slang::Tuxic and an example of its use? 20:03
[TuxCM] panda install Slang::Tuxic
modules.perl6.org <= type "slang" in the search box
github.com/FROGGS/p6-Slang-Tuxic/ 20:04
tux.nl/Talks/CSV6/slang2.html
localhost:8089/Talks/CSV6/slang.html <= causes for my griefs before I got it my way ( FROGGS++ ) 20:05
mst thank you
ChoHag localhost?
I love that site!
mst hahahahaha hadn't noticed that last one :D 20:06
[TuxCM] sorry :)
just replace with tux.nl
[TuxCM] has to go now
20:09 noganex joined, darutoko joined, colomon_ joined 20:10 colomon left, colomon_ is now known as colomon, gfldex_ joined 20:11 darutoko- left, noganex_ left 20:12 gfldex left, Woodi left, pmurias left, Woodi_ joined, pmurias joined 20:16 spider-mario left 20:17 spider-mario joined 20:18 FROGGS left, lucasb left 20:29 diana_olhovik_ joined
ChoHag How can I restrict the key and/or value of a Pair in a method Signature? 20:29
(..., Pair(what?) :$foo, ...) ? 20:30
20:30 muraiki left, darutoko left
RabidGravy "where" 20:38
lizmat m: sub a(:$foo where .key eq "bar") { say $foo }; a :foo(bar=>42) # ChoHag 20:40
camelia rakudo-moar 720090: OUTPUT«bar => 42␤»
lizmat m: sub a(:$foo where .key eq "bar") { say $foo }; a :foo(zip=>42) # ChoHag
camelia rakudo-moar 720090: OUTPUT«Constraint type check failed for parameter '$foo'␤ in sub a at /tmp/NlgkZoudad:1␤ in block <unit> at /tmp/NlgkZoudad:1␤␤»
20:41 cognominal joined
ChoHag Thanks. 20:42
20:43 ChoHag left 20:44 kjs_ joined 20:45 rindolf left, kaare_ left 20:46 espadrine joined 20:54 brrt left 20:56 cognominal left 20:57 skids left 21:00 kjs_ left 21:04 rurban joined 21:07 [Sno] left 21:11 rurban left, diana_olhovik_ left 21:21 pyrimidine joined 21:26 beastd joined, rurban joined 21:34 yqt joined 21:37 pmurias left 21:39 yqt left, telex left 21:40 telex joined 21:43 rurban left 21:58 yqt joined 21:59 TEttinger joined, spider-mario left, rurban joined 22:03 rurban left 22:11 skids joined 22:15 kjs_ joined, kjs_ left 22:18 cognominal joined 22:20 [Sno] joined 22:31 smls left 22:48 cognominal left 22:52 Hurricane joined
Hurricane Hello, I have a question regarding installation of perl modules: Is there a way to edit the code after it downloaded the package, but before it compiles it? 22:53
skids Hurricane: I belive if you get the mod into a dir there is a panda option to install from dirs. 22:56
Hurricane Ah okay, because I have a module that won't install, so I need to apply this fix before it tries to compile it: github.com/tsee/extutils-cppguess/issues/9 22:57
22:58 RabidGravy left
skids Oh, that's perl5. 22:58
So you wouldn't be using panda, and might be better off asking on perl5 channels.
Hurricane Oh okay, sorry I didn't notice the difference, I am pretty new to perl yet 22:59
skids No problem at all. 23:01
23:08 AlexDaniel joined
jnthn *sigh* Finally, I get to rest. :) Will be back to work on the GLR stuff tomorrow. 'night 23:09
skids o/ 23:10
23:20 Hurricane left 23:24 DarthGandalf left 23:25 DarthGandalf joined, _sri left, _sri joined 23:26 mephinet joined 23:31 baest joined 23:33 baest_ left 23:44 cognominal joined
dalek c: ff84848 | skids++ | lib/Language/5to6.pod:
Quickly clarify that items use dereferencing under sigil invarience
23:46
23:58 Possum left