Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-11-28

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 timotimo so ... trivial thread safety i suppose
00:06 * TimToady wonders if there's a way to partition and recompile the libraries such that different subsystems could use different "GILs" and scale better
00:07 TimToady when there are disjoint sets of libraries
00:07 TimToady and maybe we have a similar problem with P5 modules
00:08 TimToady where instead of a GIL we have a global interpreter crash :)
00:08 timotimo enctype application/json for html formulars \o/
00:11 * lizmat has banged her head against the settings enough for one day
00:11 lizmat sleep&
00:23 KCL_ joined #perl6
00:25 TimToady incipient meleagris gallopavo consumption &
00:33 Mouq joined #perl6
00:50 raydiak re my earlier questions about inputting ∈ and other non-altgr/compose-accessible chars on a US keyboard, fwiw I ended up installing ibus which un-broke ctrl-shift-u, installed ibus-table-compose to get the compose key back, and ibus-table-latex for added awesome ("\in" is easier to remember and type than "ctrl-shift-u 2208")
00:52 ssqq joined #perl6
00:53 ssqq_ joined #perl6
01:02 cognominal joined #perl6
01:29 cognominal joined #perl6
01:37 dayangkun joined #perl6
01:38 ssqq_ joined #perl6
01:47 Akagi201 joined #perl6
01:50 lue joined #perl6
01:53 cognominal joined #perl6
02:12 JimmyZ joined #perl6
02:23 d4l3k_ joined #perl6
02:24 silug joined #perl6
02:25 breinbaas joined #perl6
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:,  niecza:, std:, or /msg camelia perl6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
03:00 noganex joined #perl6
03:08 eternaleye joined #perl6
03:18 noganex_ joined #perl6
03:19 Mso150 joined #perl6
03:34 chenryn joined #perl6
04:17 hobbs just out of curiosity, can anyone improve my golf? http://codegolf.stackexchange.com/a/41960/1683
04:17 hobbs it's probably about as good as it gets, but it's possible there's a shorter synonym for the split, or a way to use an implicit variable to tighten it up
04:17 hobbs (this challenge counts the function body but not the signature)
04:27 kaleem joined #perl6
04:28 Mouq s/split('')/comb
04:30 hobbs ah nice
04:31 hobbs I saw that comb existed, but didn't pay enough attention to see that that was its default behavior
04:33 hobbs new score is 16 :)
04:34 hobbs which is only 2 more than J, and dare I say, more readable
04:37 Mouq Doesn't change the char count, but %%all (divisible by all) might be more readable still :)
04:38 hobbs interesting :)
04:39 hobbs yeah, it improves my explanation, I'll do that
04:39 raydiak m: sub golf($n, $r = ?($n%none $n.comb)) { $r }; say golf 123 # if they don't count the signature :)
04:39 camelia rakudo-moar 2b2857: OUTPUT«False␤»
04:41 hobbs not gonna abuse like that
04:42 hobbs but I didn't realize I could lose the parens on the junction, that seems to save me 1
04:42 raydiak yep
04:43 hobbs from 21 to 15 thanks to you both
04:45 Mouq m: my &golf = {$_%%.comb.all}; say golf 123 # signatures are so overrated ;9
04:45 camelia rakudo-moar 2b2857: OUTPUT«all(True, False, True)␤»
04:46 raydiak nice
04:46 * Mouq was a little disappointed there's not a contortion of * that'll do it, though
04:48 hobbs can I do that as sub golf ($_) ? Looks like.
04:57 Timbus its amazing how readable that is for 13 bytes
04:58 hobbs the 15 byte version is clearer, but yeah, it's not bad :)
04:59 hobbs beats the pants off of the APL/J/Pyth/CJam versions
04:59 Timbus yep
04:59 hobbs (Pyth and CJam are basically golf languages)
05:00 Timbus yeah I saw. no idea who keeps making them, but they should stop
05:00 Timbus :I
05:04 Timbus ..wait, since when did perl6 not automagically put a $_* into subs without signatures
05:04 Timbus uh, *$_
05:04 hobbs I dunno, but I did sub golf { ... } in perl6-m and it rejected it, said I was calling a 0-ary sub with 1 arg
05:04 kaare_ joined #perl6
05:05 Mouq n: say sub{$_}(42)
05:05 camelia niecza v24-109-g48a8de3: OUTPUT«42␤»
05:05 Mouq r: say sub{$_}(42)
05:05 camelia rakudo-moar 2b2857: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤  in sub  at /tmp/tmpfile:1␤  in block <unit> at /tmp/tmpfile:1␤␤»
05:05 camelia ..rakudo-parrot 2b2857: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤  in sub  at /tmp/tmpfile:1␤  in block <unit> at /tmp/tmpfile:1␤␤»
05:05 Timbus and I never noticed
05:06 hobbs I expected it to work too
05:08 Mouq r: say sub{@_}(42)
05:08 camelia rakudo-{parrot,moar} 2b2857: OUTPUT«42␤»
05:09 hobbs the mention of @_ makes it variadic?
05:10 Timbus makes sense
05:10 Mouq r: say sub{EVAL '@_'}(42)
05:10 camelia rakudo-parrot 2b2857: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤  in sub  at /tmp/tmpfile:1␤  in block <unit> at /tmp/tmpfile:1␤␤»
05:10 camelia ..rakudo-moar 2b2857: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤  in sub  at /tmp/tmpfile:1␤  in block <unit> at /tmp/tmpfile:1␤␤»
05:17 hobbs I'm off to bed, thanks and good night
05:21 Mouq 'night hobbs! :)
05:31 chenryn joined #perl6
06:15 ssqq joined #perl6
06:16 ssqq joined #perl6
06:17 ssqq m: my $capture = \( 1, named => 1); sub foo($a, :$named) { "args is $a and $named" }; foo(|$capture);
06:17 camelia rakudo-moar 2b2857: OUTPUT«use of uninitialized value $named of type Any in string context  in sub foo at /tmp/nJhN2pbICj:1␤␤»
06:18 ssqq m: my $capture = \(1, named => 1); sub foo($a, :$named) { "args is $a and $named" }; foo(|$capture);
06:18 camelia rakudo-moar 2b2857: ( no output )
06:18 ssqq why a space before *1* would make output different?
06:20 ssqq What difference with git repo: *star* and *rakudo*?
06:20 moritz \o
06:21 moritz ssqq: 'rakudo' is the compiler; 'star' is a distribution (it bundles the compiler, some docs, and several modules)
06:22 ssqq moritz: I see, start == 'rakudo' ~ 'some doc' ~ 'several modules'
06:22 kaare_ joined #perl6
06:23 ssqq moritz: I see, 'star' == 'rakudo' ~ 'some doc' ~ 'several modules'
06:26 ugexe m: my $capture = \(1, named => 1); sub foo($a, :$named) { "args is $a and $named" }; say $capture.perl;
06:26 camelia rakudo-moar 2b2857: OUTPUT«Capture.new(list => (1,), hash => {"named" => 1})␤»
06:26 ugexe m: my $capture = \( 1, named => 1); sub foo($a, :$named) { "args is $a and $named" }; say $capture.perl;
06:26 camelia rakudo-moar 2b2857: OUTPUT«Capture.new(list => (1, "named" => 1,))␤»
06:27 ugexe that does seem strange
06:30 TimToady m: say (\(1, named => 1)).perl
06:30 camelia rakudo-moar 2b2857: OUTPUT«Capture.new(list => (1,), hash => {"named" => 1})␤»
06:30 TimToady m: say (\( 1, named => 1)).perl
06:30 camelia rakudo-moar 2b2857: OUTPUT«Capture.new(list => (1, "named" => 1,))␤»
06:30 TimToady quite odd
06:34 TimToady I see the problem
06:35 chenryn joined #perl6
06:36 dalek rakudo/nom: c079105 | TimToady++ | src/Perl6/Grammar.nqp:
06:36 dalek rakudo/nom: allow whitespace inside capture
06:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c079105180
06:36 TimToady ssqq++
06:49 gfldex joined #perl6
06:51 grondilu joined #perl6
07:07 chenryn joined #perl6
07:17 sjn \
07:21 sjn \o
07:22 kaleem joined #perl6
07:24 anaeem1_ joined #perl6
07:32 anaeem1_ joined #perl6
07:35 jluis joined #perl6
07:40 lue joined #perl6
07:55 FROGGS joined #perl6
08:03 jimmy__ joined #perl6
08:10 rurban joined #perl6
08:14 kaare__ joined #perl6
08:16 darutoko joined #perl6
08:17 virtualsue joined #perl6
08:21 denis_boyun_ joined #perl6
08:23 rurban1 joined #perl6
08:29 lizmat joined #perl6
08:49 Alina-malina joined #perl6
09:02 telex joined #perl6
09:03 lizmat good *, #perl6 on day #2 of the Patch -p2 hackathon in Lyon, France
09:04 jnthn morning, all
09:06 lizmat jnthn: if I'm binding a PIO to a variable, does that variable need to be Mu, or doesn't it matter ?
09:06 rindolf joined #perl6
09:06 lizmat aka: my Mu \thePIO := nqp::openpipe( or my \thePIO := nqp::openpipe(
09:06 JimmyZ_ \o
09:07 lizmat JimmyZ_ o/
09:07 jnthn lizmat: Mu is default var type constraint
09:07 JimmyZ_ what's the diference? \x = ... vs \x := ...
09:07 jnthn JimmyZ_: None.
09:08 lizmat ok
09:08 jnthn uh, hmm
09:08 jnthn Maybe actually = deconts the RHS
09:08 jnthn I'd have to look at the compiler to remember :P
09:08 JimmyZ_ :)
09:10 JimmyZ_ what does the spec say about it?
09:14 brrt joined #perl6
09:16 masak antenoon, #perl6
09:17 moritz \o masak
09:17 jnthn .oO( what happens when a noon and an antenoon collide? )
09:17 moritz anoohiliation
09:18 * masak .oO( that's not a noon, it's a space nation! )
09:18 lizmat jnthn: if you can spare a minute, could you look at https://gist.github.com/li​zmat/67c4ed2e0640b11dbc1f
09:18 jnthn .oO( and a lunch particle is emitted )
09:18 brrt \o
09:18 lizmat am I doing something wrong ?
09:18 lizmat brrt o/
09:18 * brrt checks it
09:20 jnthn I have a suspicion that an optimization in the class case skips emitting the type check, and we dont' do that with the role one
09:20 jnthn And PIO doesn't strictly do Mu.
09:21 jnthn If working with VM-level handles, nqp::bindattr is always safer.
09:21 woolfy joined #perl6
09:21 jnthn Or actually even nqp::bind($!PIO, thePIO) may cut it.
09:22 lizmat trying that
09:22 lizmat that doesn't bomb, indeed, jnthn++
09:22 lizmat checking further
09:23 woolfy left #perl6
09:24 lizmat jnthn++ again
09:24 lizmat I was banging my head against that most of yesterday...
09:24 fhelmberger joined #perl6
09:24 lizmat I can finally go on...
09:24 lizmat yeh!
09:24 jnthn ah...sorry if I missed a question on it yesterday
09:24 * jnthn only sorta follows here while teaching :)
09:27 JimmyZ_ speaking nqp::bind, I was wondering why there is not a Perl 6 way...
09:27 JimmyZ_ I saw some Perl 6 module uses it too
09:28 kjs_ joined #perl6
09:29 moritz there's :=, which should work in almost all non-CORE cases
09:29 jnthn Yeah, := compiles into that plus a type check first
09:30 jnthn At some point in the near-ish future I'm going to make us require a use statement for nqp::
09:30 JimmyZ_ oh, the Slang module uses nqp::bind
09:30 jnthn So you'll have to declare up front if using it.
09:30 jnthn Well, the Slang module is prototyping a core feature, so it's kinda legit :)
09:30 JimmyZ_ yeah
09:34 woolfy joined #perl6
09:38 yeahnoob joined #perl6
09:38 brrt jnthn++ for not-having-nqp-namespace-by-default
09:39 brrt would it be really bad if we didn't have macro's for rakudo perl6.0.0
09:39 JimmyZ_ we does have :)
09:39 JimmyZ_ do
09:39 brrt or 'not the macros your grandchildren will use'
09:39 brrt true
09:40 JimmyZ_ Just not good
09:40 jnthn brrt: It's not the end of the world. I've written a lot of Perl 6 modules and only one of them uses macros...
09:41 jnthn If we are really uncomfortable with the design not being final but want to ship some macro support anyway, we do have options there.
09:41 jnthn (Like an opt-in pragma, on the understanding there are likely to be changes down the line.)
09:42 brrt hmm yes
09:44 dalek specs: 9057025 | (Elizabeth Mattijsen)++ | S99-glossary.pod:
09:44 dalek specs: Add lemma for PIO
09:44 dalek specs: review: https://github.com/perl6/specs/commit/9057025dd2
09:44 dalek rakudo/newio: 58f79c1 | (Elizabeth Mattijsen)++ | src/core/IO/Pipe.pm:
09:44 dalek rakudo/newio: Finally found the magic incantation, jnthn++
09:44 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/58f79c192e
09:44 dalek rakudo/newio: a6b3d5d | (Elizabeth Mattijsen)++ | src/core/PIO.pm:
09:44 dalek rakudo/newio: Make PIO attribute private again
09:44 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/a6b3d5daf3
09:46 Mso150 joined #perl6
09:49 lizmat Is there a reason we don't have a .print and .say on IO::Socket ?
09:52 zakharyas joined #perl6
09:55 dalek rakudo/newio: c079105 | TimToady++ | src/Perl6/Grammar.nqp:
09:55 dalek rakudo/newio: allow whitespace inside capture
09:55 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/c079105180
09:55 dalek rakudo/newio: 9e57f55 | (Elizabeth Mattijsen)++ | src/Perl6/Grammar.nqp:
09:55 dalek rakudo/newio: Merge branch 'nom' into newio
09:55 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/9e57f551c8
10:24 sergot joined #perl6
10:24 Ven joined #perl6
10:25 sergot hi o/
10:25 Ven the thing that's the most difficult when jumping from one language to another is remember the truthiness/falsiness rules
10:25 Ven o/, #perl6
10:25 smls joined #perl6
10:26 smls m: say Buf.HOW
10:26 camelia rakudo-moar c07910: OUTPUT«Perl6::Metamodel::Par​ametricRoleGroupHOW.new()␤»
10:26 smls is Buf supposed to be a role or a class?
10:29 smls S32/Containers:1142 suggests a class, but Rakudo^^ seems to consider it a role...
10:29 synopsebot Link: http://perlcabal.org/syn/S3​2/Containers.html#line_1142
10:29 dalek rakudo/newio: 0520651 | (Elizabeth Mattijsen)++ | src/core/PIO.pm:
10:29 dalek rakudo/newio: Add SeekType enum, deprecate seek(x,Int)
10:29 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/0520651007
10:30 virtualsue joined #perl6
10:33 smls p6doc is confused about Buf as well, calling it a class on its own type page but a role in the type graph / type index.
10:34 lizmat I think it was originally a class, but became a role later
10:35 abraxxa joined #perl6
10:36 Ugator joined #perl6
10:36 smls m: say Buf.new([256]).WHAT
10:36 FROGGS because we only have parametrized roles, not classes, right?
10:36 camelia rakudo-moar c07910: OUTPUT«(Buf)␤»
10:37 smls FROGGS: Are parametrized classes just NYI, or not part of the design?
10:37 FROGGS smls: I dunno... I just know that the Buf roles gets punned into a class when you use it like one
10:38 smls So how is it different from instantiating a class?
10:38 Ven it's not (not really)
10:40 itz whats newio?
10:40 Ven itz: new s17 I guess
10:41 Ven erm, not s17...
10:41 Ven It's s16.
10:41 dalek rakudo/nom: 28cfa02 | (Elizabeth Mattijsen)++ | src/core/Inc.pm:
10:41 dalek rakudo/nom: Fix warning on unset HOME env variables
10:41 dalek rakudo/nom:
10:41 dalek rakudo/nom: Inspired by pull request #334 (carbin++).  This approach has fewer dynamic
10:41 dalek rakudo/nom: variable lookups than the pull request.
10:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/28cfa024f3
10:41 Ven lizmat++ # rewriting s16
10:43 danwyn joined #perl6
10:44 denis_boyun joined #perl6
10:46 smls m: say Buf.new([2, 4]).WHAT;    say buf8.new([2, 4]).WHAT
10:46 camelia rakudo-moar c07910: OUTPUT«(Buf)␤(Buf[uint8])␤»
10:47 smls ^^ in what way are these different?
10:47 yeahnoob joined #perl6
10:47 Ven smls: internal representation, I guess
10:47 smls m: my $x = buf8.new([2, 4]); $x[0] = 257; say $x
10:47 camelia rakudo-moar c07910: OUTPUT«Buf:0x<01 04>␤»
10:49 smls According to the spec I linked above, "Buf.new([195, 182])   [...]  returns a buf8 containing two uint8 items"
10:52 smls Spec and Rakudo don't seem to be very much in sync in this area... :(
10:53 smls From lizmat's and FROGGS's answers I take it that the spec is just outdated here and Rakudo implements the intended semantics for Buf?
10:53 smls Or are they still in flux?
10:54 lizmat I think that's a yes and a yes
10:54 FROGGS I also think that the spec needs adoption
10:55 ptc_p6 joined #perl6
11:08 TuxCM joined #perl6
11:24 chenryn joined #perl6
11:28 louisch joined #perl6
11:34 Ugator m: my $t=(1.1+2.2).Num.base(*); $t(16).say
11:34 camelia rakudo-moar 28cfa0: OUTPUT«Type check failed in binding $base; expected 'Int' but got 'Whatever'␤  in method base at src/gen/m-CORE.setting:4719␤  in block <unit> at /tmp/Bu7tChLVPh:1␤␤»
11:34 Ugator :-( why doesnt this work?
11:34 lizmat what do expect Whatever to be?
11:34 Ugator Int?
11:35 jnthn * doesn't mean auto-closure in that context
11:36 jnthn m: my $t={(1.1+2.2).Num.base($_)}; $t(16).say
11:36 camelia rakudo-moar 28cfa0: OUTPUT«3.4CCCCC␤»
11:36 Ugator what's the rule for auto-closure?
11:37 jnthn Happens to operands or invocants
11:37 jnthn *.foo is an invocant example, *+1 is an operand one.
11:37 dalek rakudo/newio: 832bfac | (Elizabeth Mattijsen)++ | src/core/ (2 files):
11:37 dalek rakudo/newio: Introduce internal set-PIO-attributes method
11:37 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/832bfacd53
11:37 dalek rakudo/newio: 584a583 | (Elizabeth Mattijsen)++ | src/core/ (2 files):
11:37 dalek rakudo/newio: Deprecate :enc in favour of :encoding
11:37 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/584a5839e9
11:38 Ugator ok... thx :-)
11:38 lizmat so I have a role with 2 multi methods "foo"
11:39 lizmat and I have a class in which I compose that role, and want to have a single method "foo" masking the multi's from the role
11:39 lizmat how do I do that ??
11:40 jnthn Does a "method foo() { ... }" in the class not do that?
11:40 lizmat I get the impression it doesn't, lemme write a test case
11:40 jnthn I think we auto-upgrade to multi in the role => class direction, but I think not in the other one...
11:41 jnthn (as in, if the class has a multi and the roles dont', I think we auto-multi the role methods...put another way, writing a proto in a class can serve as a "let's have both and decide at runtime" disambig approach)
11:42 jnthn m: role R { multi method m() { }; multi method m($a) { } }; class C does R { method m() { say "class" } }; C.m
11:42 camelia rakudo-moar 28cfa0: OUTPUT«===SORRY!===␤Cannot have a multi candidate for 'm' when an only method is also in the package 'C'␤»
11:42 jnthn Ah...
11:43 jnthn I wonder if the spec says anything on this.
11:43 jnthn Mebbe it does and we match it...
11:43 jnthn Though the behavior you want would make sesne to me.
11:43 lizmat specific case: providing a better error message when doing a .seek on an IO::Pipe
11:44 jnthn *nod*
11:44 lizmat I guess we could also argue that seek should only work on IO::Handle
11:44 jnthn See if the spec says anythign on it.
11:44 jnthn If we're out of line with spec then it's probably an easy fix I can do on the train home.
11:44 jnthn This evening.
11:44 lizmat cool
11:45 jnthn Distracted with teaching again for a little bit... :)
11:45 lizmat okidoki  :-)
11:48 dalek rakudo/newio: cf051eb | (Elizabeth Mattijsen)++ | src/core/IO/Pipe.pm:
11:48 dalek rakudo/newio: Cannot mask a multi method from a role (yet)
11:48 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/cf051eb9c5
12:03 dalek rakudo/newio: e364b33 | (Elizabeth Mattijsen)++ | src/core/ (2 files):
12:03 dalek rakudo/newio: Add SLURP-PATH primitive
12:03 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/e364b33602
12:04 FROGGS m: role R { multi method _m() { say 1 }; multi method _m($a) { say 2 } }; class C does R { method m($a?) { $a ?? self.R::_m($a) !! self.R::_m() } }; C.m
12:04 camelia rakudo-moar 28cfa0: OUTPUT«Cannot invoke this object (REPR: P6opaque, cs = 0)␤  in method dispatch:<::> at src/gen/m-CORE.setting:1292␤  in method m at /tmp/TXvydmaqEc:1␤  in block <unit> at /tmp/TXvydmaqEc:1␤␤»
12:05 woolfy left #perl6
12:05 FROGGS hmmm, was that invalid syntax?
12:05 lizmat dunno, getting some air&
12:11 raydiak good extra-early morning, #perl6
12:14 FROGGS hi raydiak
12:14 |Tux| joined #perl6
12:15 raydiak \o FROGGS
12:16 JimmyZ_ joined #perl6
12:24 KCL joined #perl6
12:28 raydiak is there a way to test whether or not something is mutable? not as in "is ro/rw", but as in ".WHICH defined by value vs memory address"
12:29 JimmyZ_ I think it depends on the type?
12:31 moritz raydiak: unfortuantely not
12:33 raydiak ah well, won't be doing it that way in the end anyway...thanks JimmyZ_++ and moritz++
12:37 colomon can't you just assign to it and catch any errors?  ;)
12:39 smls m: sub is-immutable (Any:D $x) { $x.clone === $x }; say is-immutable "foo"; say is-immutable [2, 4]
12:39 camelia rakudo-moar 28cfa0: OUTPUT«True␤False␤»
12:40 smls raydiak: ^^ (although I have no idea how robust or efficient it is...)
12:42 raydiak smls++: thanks, that might be workable at least for the purpose of development
12:42 raydiak colomon: :)
12:42 kaare__ joined #perl6
12:45 raydiak reading Int's source, we don't really have an explicit concept of mutability in that way, do we? it's just the end result of overriding a few methods like .WHICH?
12:51 bjz joined #perl6
13:00 moritz raydiak: right, we just don't provide any mutators
13:01 ggoebel111111113 joined #perl6
13:02 raydiak oic
13:03 moritz and overriding WHICH tells operators like === that it's considered a value type
13:09 raydiak looks like it overrides most of the comparison operators itself in this case, but I get what you mean...am just working on ideas for .perl(), and wanted to get it to do something reasonable with value types without writing a new implementation for each type that needs it, so was just gonna do "<call old .perl> unless .is-mutable" for the moment
13:13 guru joined #perl6
13:18 prime joined #perl6
13:20 timotimo hmm
13:25 * raydiak finds int.Range and wonders if it shouldn't be officially specced and documented
13:26 raydiak m: say uint8.Range
13:26 camelia rakudo-moar 28cfa0: OUTPUT«0..255␤»
13:33 colomon ugh, module failures did not go away magically overnight: http://host08.perl6.com:8080/report
13:34 psch joined #perl6
13:35 kaleem joined #perl6
13:35 psch hi #perl6 o/
13:35 kaleem joined #perl6
13:36 raydiak \o psch
13:36 psch hey raydiak
13:38 psch i'm kinda-sorta starting to find my way into jvm-interop, i.e. i can point to one spot in the source that's at least partly responsible for why we can't have overloaded foreign methods as multis in perl6-land
13:39 psch but i can't find a spot to compare differences.  as in, a STable always has a hash as method cache, but for perl6-classes we can have multis because the MOP-role MultiMethodContainer does something
13:40 psch but we don't get many MOP-roles for the JavaHOW and i'm not sure stuffing MultiMethodContainer in there does what i mean, seeing as JavaHOW doesn't have MethodContainer either but methods still work...
13:40 prime joined #perl6
13:42 psch so i was thinking solving it lower, i.e. having a MethodCache that's not a hash on the STable would likely do what i mean, but that probably needs to run through the binder somewhere
13:43 psch or rather, a MethodCache that maps multiple CodeRefs to a short name of non-perl6-object methods
13:44 psch although maybe that's a suboptimal way of trying to get there in the first place.  if anyone has a hint i'd appreciate it :)
13:53 masak why does "hackathon" seem to have the meaning of "lame corporate-arranged one-day coding competition" in some circles?
13:55 brrt uh, my $job also has given that meaning to it
13:55 masak :(
13:55 masak at least I'm glad I went to the good type of hackathon before becoming aware of that meaning.
13:55 brrt no, actually, for my $job it means: 'lame corporate-arranged one-day unpayed implementation of $manager's idea'
13:55 arnsholt masak: Same here
13:56 Alina-malina joined #perl6
13:57 arnsholt Bah. The Python docs are very unorganized about speccing what attributes and methods various classes are supposed to have
13:58 arnsholt Also, the inheritance hierarchy
13:58 brrt arnsholt: in python, you're supposed to run the code, or step through it using a debugger
13:59 brrt eh s/run/read/ :-)
13:59 timotimo it's called "duck typing"
13:59 arnsholt timotimo: No, I mean the spec documents =)
13:59 timotimo if you're relying on the internals of classes, or their methods and attributes, you're doing it wrong
13:59 smls arnsholt: So are the Perl 6 specs, unfortunately...
14:00 arnsholt timotimo: For example a snippet aobut object(): "[The returned object] has the methods that are common to all instances of Python classes."
14:00 smls in fact it looks like a lot in info on which class is supposed to do which role and which method is supposed to be in which class/role, isn't covered in the synopses at all.
14:00 arnsholt But nowhere I've found specifies *what methods* are common to all Python object instances =)
14:01 timotimo yeah, you're expected to use python's superb introspective capabilities in combination with the set type
14:01 brrt if you're relying on sanity, you're doing it wrong
14:01 brrt :-p
14:01 timotimo so, what is perl 6 going to be doing for black friday?
14:01 brrt sleep
14:01 timotimo i heard that's today
14:02 timotimo sleep? 'k! i'll chip in a few minutes
14:02 arnsholt timotimo: Yeah, that's what I'm doing. It's just annoying that the spec doesn't spec everything =)
14:03 brrt in python russia, spec specs you!
14:04 * raydiak is taking advantage of having driven his g/f to work @ the mall @ 4 AM by not going back to bed
14:05 * masak thinks about macros and pattern matching
14:07 * jnthn thinks about marco and pasta eating
14:08 jnthn psch: iirc, the method cache is populated by the Java interop code written in Java
14:08 psch jnthn: yes, it is. in BootJavaInterop.java:278-321
14:08 * moritz thinks about strangelyconsistent.org and the distinct lack of new blog post(s)
14:09 jnthn Maybe it's because masak is too busy writing hate mail to people who call their macros marco :D
14:09 psch jnthn: i'm mostly unsure how i can resolve overloaded methods to multis.
14:09 davido___ joined #perl6
14:09 jnthn psch: Right, and we subclass that
14:09 jnthn psch: Hm, I'm not entirely sure... :)
14:10 dayangkun joined #perl6
14:10 timotimo i bet there's some people who deserve hate mail for calling their macros macro ...
14:10 psch jnthn: one thing i thought of was doing it at runtime, inspecting the capture which the method gets and checking if we have a spec that fits on the jvm-side
14:10 jnthn psch: I can see a few ways. One is to code-gen the Java method adapter to do the type matching.
14:11 jnthn But that's...a lot of code-gen and not that fast maybe
14:11 psch but my way is probably error-prone and maybe slow
14:11 jnthn Probably a better way is to code-gen something that uses invokedynamic
14:11 jnthn And put the real interesting logic inside there
14:11 jnthn Then we can start caching it and probably be way faster.
14:14 psch do the abstraction layers fit for a trial bind?  i'm still a bit fuzzy on what exactly happens where...
14:14 psch what i see is that we have a p6-y CodeRef which corresponds to the jvm-native, overloaded method
14:14 psch that CodeRef has a MethodContext which knows the sig
14:15 psch oh, but we need a SixModelObject for trialbinding, don't we, because Signature is from perl6-land
14:15 jnthn The trial bind is all about compile-time optimization
14:15 jnthn I wouldn't do it at that level
14:15 psch okay
14:18 psch i'll do some more thinking, thanks so far jnthn++
14:18 b2gills Slightly OT I just came accross "TWiT Coding 101 Perl", I wonder if someone could help them write or host a Perl6 version https://www.youtube.com/watch?v=FEtI4BLzzp8&​amp;list=PLTmR6HsT7005r9J50_HCOGkyGc8dDYu7J
14:32 timotimo huh. one thing the dude in the religious outfit says is that perl is "more structured like C#" as compared to python ... i don't really get it
14:34 smls m: say (1, 2, 3)>>.WHAT
14:34 camelia rakudo-moar 28cfa0: OUTPUT«(Parcel)␤»
14:34 smls :(
14:35 smls Why does hyper does not work with .WHAT? And if it is not supposed to work because WHAT is too special, why doesn't it at least throw an error when used with >> ?
14:36 timotimo WHAT is special
14:36 mr-foobar joined #perl6
14:36 lizmat joined #perl6
14:37 psch m: say Any.^can('WHAT')[0].perl
14:37 camelia rakudo-moar 28cfa0: OUTPUT«Mu␤»
14:37 * psch .oO( Mu is the sound of one hand clapping )
14:38 timotimo b2gills: it seems like these twit coding people aren't up to date. didn't anybody tell them perl is dead?
14:38 woolfy joined #perl6
14:41 smls timotimo: But is there a reason it can't be made to work with >> ?
14:41 timotimo not really, no
14:41 timotimo m: say (1, 2, 3).map: *.WHAT
14:41 camelia rakudo-moar 28cfa0: OUTPUT«1 2 3␤»
14:41 timotimo m: say (1, 2, 3).map: { $_.WHAT }
14:41 camelia rakudo-moar 28cfa0: OUTPUT«(Int) (Int) (Int)␤»
14:42 timotimo even with whatevercode it doesn't work properly
14:42 smls For context, I wanted to include these two demo snippets in p6doc: https://gist.github.com/smls/4ff13592041879b218d2
14:42 timotimo i'd personally go with .WHAT.say for (1 ,2, 3) in that case
14:42 timotimo m: .WHAT.say for (1 ,2, 3)
14:42 camelia rakudo-moar 28cfa0: OUTPUT«(Int)␤(Int)␤(Int)␤»
14:43 smls I went with   say (.WHAT for $n.keys);  for now, but it looks more distracting and less cute than the >> version... :(
14:46 dalek joined #perl6
14:47 timotimo b2gills: i've wanted to work on screencasts for perl6 introductory stuff (since i have such a beautiful and soothing voice), but i didn't get far at all whatsoever
14:49 timotimo b2gills: do you know what the machine in the background is?
14:49 timotimo the one to the viewer's left, specifically
14:50 timotimo my first thought was perhaps a 3d printer or CNC machine of some description
14:52 itz I did wonder about a monthly (or whatever) podcast
14:54 timotimo heh heh, he almost mis-said "scalar variables" as "scary variables"
14:56 timotimo i'm not terribly happy about them not declaring variables with "my"
14:56 raydiak twit's examples look like bad mass-churned 90s perl...no strict, warnings, my, modern features like say, etc
14:57 timotimo well, it's easy to complain about the content from our perspective, but the presentation is pretty great
14:58 raydiak I like what they're trying to do and recognize the need for simplicity...unfortunately omitting those things is a terrible way for people to start learning perl imo
14:59 raydiak unless your reason for learning it is one-liners :)
14:59 timotimo aye
15:02 b2gills psch: I can clap with one hand and actually produce sound, I know I'm weird.
15:02 psch b2gills: i actually can do that as well :)
15:02 timotimo i can, too
15:03 psch with both hands, even
15:03 psch as in, with each hand
15:04 timotimo huh. their explanation of the hashbang line is *very* weird
15:04 timotimo and the person they have as the "guest" says on a windows server he had to put C: into that line, too ... ?!?
15:04 b2gills timotimo: I hadn't watched even the first episode until just now ( I also paused it a few times )
15:05 * psch back later &
15:06 b2gills There are some instances where you have to write that on Windows, for example msys or possibly Cygwin. (maybe a web-server or two)
15:06 timotimo oh
15:06 timotimo i've actually bought a quite decent microphone a long-ish time ago
15:07 timotimo in order to start screencasting or something like that
15:08 timotimo now he's explaining case sensitivity of variable names as "a quirk of perl" ...
15:08 raydiak I think the main thing that bothered me about strictures/warnings wasn't actually that they omitted it, but that they explicitly advertised lack of those checks as a primary feature of the language when we've spent the last 15 or 20 years afaik explicitly trying to get people to stop doing that :)
15:08 timotimo and nobody points out that python and c# have the same thing, and also nobody mentions that use strict will help you defend against accidentally writing the same variable name differently when using it
15:08 timotimo right, that's even worse
15:09 raydiak they did a decent job of making sigil variance seem less scary though
15:09 timotimo that's very true
15:11 timotimo hmmm
15:11 timotimo i wonder how a slang would fare that forces you to write "beginning of string" and "end of string" as \"
15:12 osfameron timotimo: I'm really frustrated by python's lack of use strict and -c (syntax check)
15:12 gfldex joined #perl6
15:13 b2gills That reminds me `no strict` actually prevents you from using `my` in Rakudo (which it shouldn't imho)
15:14 timotimo i'm pretty sure python has a syntax check commandline argument
15:14 timotimo um, really?
15:14 guru joined #perl6
15:14 brrt left #perl6
15:14 timotimo m: my $fo = 10; $foo = 20; say $foo; say $fo
15:14 camelia rakudo-moar 28cfa0: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tHxi2Rudklâ�¤Variable '$foo' is not declared. Did you mean '$fo'?â�¤at /tmp/tHxi2Rudkl:1â�¤------> [32mmy $fo = 10; $foo[33mâ��[31m = 20; say $foo; say $fo[0mâ�¤    expecting any of:â�¤        p…»
15:14 timotimo m: 6; my $fo = 10; $foo = 20; say $foo; say $fo
15:14 camelia rakudo-moar 28cfa0: OUTPUT«20␤10␤»
15:14 timotimo m: no strict; my $fo = 10; $foo = 20; say $foo; say $fo
15:14 camelia rakudo-moar 28cfa0: OUTPUT«20␤10␤»
15:14 timotimo seems to work fine on camelia
15:15 b2gills Maybe it's just -e at the command line thats wonky
15:15 raydiak that works here, too
15:15 raydiak (here as in wfm)
15:16 timotimo works on my system, too
15:16 smls m: say (1, 2, 3).map(&WHAT);   # timotimo: The subroutine form of WHAT doesn't seem magical though...
15:16 camelia rakudo-moar 28cfa0: OUTPUT«(Int) (Int) (Int)␤»
15:16 timotimo oh
15:16 timotimo i didn't know we actually had a little sub for that
15:16 timotimo in that case, check this out:
15:16 timotimo m: say (1, 2, 3)>>.&WHAT
15:16 camelia rakudo-moar 28cfa0: OUTPUT«(Int) (Int) (Int)␤»
15:18 b2gills Maybe it's that I have a shell script named `perl6` instead of a symlink
15:18 timotimo make install will actually install a shell script for you
15:19 timotimo ooooh, this coincidence is weeeiird
15:19 timotimo last night i finally saw the movie Frozen for the first time over at a friend's house. the next day i watch the twit coding perl 101 introductory video which ends in a little out-take-like segment where they sing sons from that exact movie adapted to the show
15:19 smls timotimo: Cute, but I'd say the punctuation density is a little too high for unsuspecting doc readers... :P
15:20 b2gills never mind switching to a symlink fixed it
15:21 b2gills I use rakudobrew and now a symlink in ~/bin/
15:21 timotimo smls: if you really want to scare people with punctuation, how about a brainfuck slang ...
15:21 timotimo m: say (1, 2, 3)>>&WHAT
15:21 camelia rakudo-moar 28cfa0: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ibgN9LAABIâ�¤Missing << or >>â�¤at /tmp/ibgN9LAABI:1â�¤------> [32msay (1, 2, 3)>>&[33mâ��[31mWHAT[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤        infix or meta-in…»
15:22 timotimo right, that doesn't work.
15:23 b2gills instead of a bf slang how about an APL slang
15:25 chenryn joined #perl6
15:26 smls m: say 3 (&) 1..4;   # Huh...Why do the set operators have such tight precedence?
15:26 camelia rakudo-moar 28cfa0: OUTPUT«set()..4␤»
15:27 timotimo instead of an APL slang how about a prolog slang?
15:29 Ugator Why not Lisp :P
15:30 b2gills APL has a lot of characters you can't type on a normal keyboard
15:30 arnsholt Because many Lisps are actually kind of complicated. Especially Common Lisp
15:31 raydiak .oO(a Whitespace slang would be nice and clean...)
15:32 anaeem1_ joined #perl6
15:34 smls you mean like Acme::Bleach? :)
15:34 chenryn joined #perl6
15:36 raydiak is that what it does?  I always wondered, never tried it
15:37 * [Coke] cranks up the daily test to get some heat on this laptop. very cold :|
15:43 chenryn joined #perl6
15:45 lizmat it was close to 18C here in Lyon today
15:51 [Coke] it's -1C right here.
15:51 * timotimo has multiple hundred kelvin over here
15:56 sorear joined #perl6
15:57 jnthn decommute &
15:59 timotimo FROGGS: could you rename the Inline module "Inline::C"?
16:00 FROGGS timotimo: it was meant to be a base for other Inline modules
16:00 timotimo oh?
16:00 woolfy joined #perl6
16:00 FROGGS since is defines the 'is inline' trait
16:01 timotimo oh
16:01 timotimo and at the same time it implements C
16:01 FROGGS yes, like the P5 module does IIRC
16:02 timotimo it doesn't really offer a method of extending the inline trait for other languages
16:02 timotimo you could just as well define the inline C trait as:
16:02 timotimo multi sub trait_mod:<is>(Routine $r, :$inline! = "C") { ... }, no?
16:03 FROGGS m: multi sub trait_mod:<is>(Routine $r, :$inline! = "C") { ... }; sub foo is inline("bar") { }; say "alive"
16:03 camelia rakudo-moar 28cfa0: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/GvlXp7OzFr�Cannot put default on required parameter $inline�at /tmp/GvlXp7OzFr:1�------> [32mait_mod:<is>(Routine $r, :$inline! = "C"[33m�[31m) { ... }; sub foo is inline("bar") { };[0m…»
16:03 timotimo hm. we'd need a "where" clause, which would kind of suck
16:03 timotimo but since it's run at compile time anyway ... maybe that's fine
16:05 timotimo but that'd make it extensible somewhat easily
16:06 jluis_ joined #perl6
16:08 chenryn joined #perl6
16:09 anaeem1_ joined #perl6
16:10 * [Coke] gives up trying to make jnthn's macro-ized like work for now.
16:13 dalek rakudo/newio: abef531 | (Elizabeth Mattijsen)++ | src/core/IO/File.pm:
16:13 dalek rakudo/newio: IO::File can now slurp
16:13 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/abef5318f4
16:13 dalek rakudo/newio: 937b277 | (Elizabeth Mattijsen)++ | src/core/io_operators.pm:
16:13 dalek rakudo/newio: Some further slurp/spurt updates / fixes
16:13 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/937b27795a
16:13 dalek rakudo/newio: 58f0e4d | (Elizabeth Mattijsen)++ | src/core/Deprecations.pm:
16:13 dalek rakudo/newio: Don't need to make it an IO object
16:13 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/58f0e4da56
16:26 dalek rakudo/newio: bb40426 | (Elizabeth Mattijsen)++ | src/core/IO/Pipe.pm:
16:26 dalek rakudo/newio: Use the proper way for closing a pipe
16:26 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/bb40426359
16:28 telex joined #perl6
16:53 dalek rakudo/newio: 9d568c7 | (Elizabeth Mattijsen)++ | src/core/PIO.pm:
16:53 dalek rakudo/newio: Made (PIO).say a bit faster
16:53 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/9d568c7368
16:53 dalek rakudo/newio: ad27de1 | (Elizabeth Mattijsen)++ | src/core/PIO.pm:
16:53 dalek rakudo/newio: Make sure we always close on destruction
16:53 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/ad27de1c1f
16:54 anaeem1 joined #perl6
16:56 anaeem1_ joined #perl6
16:58 guru joined #perl6
17:03 timotimo perl5i seems cute
17:03 timotimo they can't fix method call syntax, though :P
17:03 timotimo and references
17:06 timotimo does perl5i get multiple dispatch somehow?
17:07 smls m: say Date.new;
17:07 camelia rakudo-moar 28cfa0: OUTPUT«2014-12-24␤»
17:07 smls Christmas as default? :P
17:07 timotimo yup
17:07 kjs_ joined #perl6
17:08 tony-o that is when perl6 is official for production, isn't it?
17:09 timotimo yes, every christmas
17:13 tony-o timotimo: i'm going to change the hijack example up a little bit and remove the pluggable depends from http-server-async
17:24 woolfy left #perl6
17:30 dalek panda: 0741200 | (Nick Logan)++ | bin/panda:
17:30 dalek panda: example exit status for 'bin/panda'
17:30 dalek panda: review: https://github.com/tadzik/panda/commit/0741200935
17:30 dalek panda: 5a09463 | (Nick Logan)++ | bin/panda- (4 files):
17:30 dalek panda: basic exit codes for remaining bin/ scripts
17:30 dalek panda: review: https://github.com/tadzik/panda/commit/5a0946325c
17:30 dalek panda: af294db | tadzik++ | bin/panda (5 files):
17:30 dalek panda: Merge pull request #118 from ugexe/exit_status
17:30 dalek panda:
17:30 dalek panda: /bin scripts exit status
17:30 dalek panda: review: https://github.com/tadzik/panda/commit/af294db64f
17:30 tadzik ugexe++
17:31 tony-o label out
17:33 Isp-sec joined #perl6
17:33 lizmat day 2 shutting down&
17:36 timotimo tony-o: sounds good to me
17:39 tadzik smoketest reports down?
17:40 rindolf joined #perl6
17:42 tadzik oh, works now
17:52 jnthn evening, #perl6
17:54 tadzik sergot: ping
17:56 Sqirrel joined #perl6
18:16 Mso150 joined #perl6
18:16 xinming joined #perl6
18:20 TimToady smls: we used to think of sets as more listy, but got into trouble with it, so sets are more biased towards being scalars now
18:21 TimToady so, for instance, if we turned setops into list infixes, you would have to parenthesize my $set = (3 (&) 1..4);
18:22 TimToady and creating two new precedence levels won't fly either
18:22 TimToady if we put them at the logical ops level, then .. would DWYM but , wouldn't
18:23 TimToady plus at the time, we actually moved them from the math ops, which were even tighter
18:23 TimToady we noted their resemblance to the junctions as well, and figured that was a good mnemonic for which precedence level they live at
18:25 TimToady but as weird hybrids of scalar-on-the-outside with components-on-the-inside, there isn't really going to be a perfect precedence level
18:25 TimToady precedence levels are very waterbeddy
18:26 TimToady another consideration is that the set operators are primarily aimed at working between sets, and the coercive aspects of the operands is only a secondary consideration
18:27 timotimo i must have been doing it wrong, then
18:27 timotimo i used to like the coercive aspect of sets
18:27 TimToady when we tried to make sets listier, we ended up making it really difficult to include sets into other sets
18:27 timotimo well, i suppose putting an @blah on one side of a set-op to make it coerce is still acceptable
18:27 TimToady yes
18:28 TimToady smls++ was complaining about the need for parens around ..
18:30 timotimo right, of course
18:32 FROGGS joined #perl6
18:35 beastd joined #perl6
18:40 TimToady there's no way to fix the parens around (^$foo).map either, since people also expect -$x.sin to work without having to say -($x.sin)
18:41 timotimo well, there's now map ^$foo:;
18:42 TimToady well, yeah...but someone will certainly get mad at the use of that for anything more complicated than a variable invocant :)
18:43 timotimo fair enough :)
18:49 psch joined #perl6
18:49 psch hey #perl6 o/
18:50 TimToady yo
18:51 TimToady heh, that kind of looks like a back and forth wave with my right hand
18:52 psch it does.  would work better with the other hand on the font i'm using
18:52 TimToady pity there are no animated unicodes
18:52 TimToady oy
18:53 colomon oY
18:53 jnthn TimToady: shhh, you'll giveses them ideas!
18:54 jnthn CAT FACE WITH COMBINING FLOWING TEARS OF JOY
18:56 TimToady
18:56 TimToady speed lines help
18:57 raydiak reminicent of a peace sign, or maybe a vulcan salute
18:57 TimToady yeah, they should've made the animal composable with the expressions as combining chars
18:58 TimToady and the face color as another dimension
18:58 raydiak like this that someone else noticed before? http://www.unicode.org/rep​orts/tr51/#Emoji_Modifiers
19:01 TimToady discriminates against martians
19:04 raydiak definitely not universal enough...
19:10 silug joined #perl6
19:17 kjs_ joined #perl6
19:21 rindolf joined #perl6
19:22 anaeem1_ joined #perl6
19:24 kurahaupo joined #perl6
19:27 guru joined #perl6
19:33 tony-o btyler: (http-server-async) im working on how to timeout async sockets but im getting cross thread probs right now  . other than that it should be working a lot better  . and current master is passing all tests
19:46 dj_goku joined #perl6
20:04 Mso150_f joined #perl6
20:24 Mso150 joined #perl6
20:27 btyler tony-o: cool!
20:46 tony-o btyler: https://gist.github.com/to​ny-o/de74e2111b2e65802cff
20:52 tony-o btyler: this is my error trying to close connections wit the $*SCHEDULER : https://gist.github.com/to​ny-o/6de78fe91379a2501415
20:52 denis_boyun joined #perl6
21:00 raiph joined #perl6
21:00 btyler tony-o: same error here
21:02 anaeem1_ joined #perl6
21:03 alesk joined #perl6
21:03 anaeem1_ joined #perl6
21:06 ennio joined #perl6
21:06 alesk m: grammar G { regex TOP { bar }}; G.parse('bar').perl.say; G.parse('foobar').perl.say
21:06 camelia rakudo-moar 28cfa0: OUTPUT«Match.new(orig => "bar", from => 0, to => 3, ast => Any, list => ().list, hash => EnumMap.new())␤Any␤»
21:07 jnthn Grammars implicitly anchor to string start.
21:08 pmurias joined #perl6
21:08 pmurias jnthn: is it possible in nqp for things from the setting of the *compiler* to contaminated the code I'm compiling
21:09 jnthn pmurias: There are ways of getting things wrong that can lead to that, yes.
21:09 jnthn pmurias: I had such bugs in the JVM port.
21:10 pmurias jnthn: while working on getting nqpmo support in nqp-js, when I have a 'my class NQPMu {...}' in the setting I get a dependency on the moar setting
21:10 jnthn pmurias: Far less in the MoarVM port, maybe 'cus I was still vaguely concious of them. :)
21:10 jnthn Yeah.
21:10 rurban joined #perl6
21:10 pmurias jnthn: would it be possible to add a "generation" to the serialization contexts so such things would be caught while serializing?
21:11 jnthn Are you passing --bootstrap to NQP in your build like we do in the existing backend's makefiles?
21:11 pmurias what does --bootstrap do?
21:11 jnthn Also, do you have a compiler/compilee HLL config mechanism in place?
21:11 jnthn I can't remember. But if you are missing it...I'd start looking there :)
21:12 pmurias thanks for the pointers, I'm tired after a train journey now but I'll look into those tomorrow
21:12 * jnthn is sstill doing the train journey :)
21:13 jnthn Lemme know if you need some more specific pointers after taking a glance at those two bits, anyway
21:16 kurahaupo1 joined #perl6
21:24 erkan joined #perl6
21:24 erkan joined #perl6
21:27 Khisanth joined #perl6
21:35 alesk m: 'a,b,c,d' ~~ / (\w+) % ',' /
21:35 camelia rakudo-moar 28cfa0: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex metacharacter % (must be quoted to match literally)�at /tmp/UbW5b2gXnc:1�------> [32m'a,b,c,d' ~~ / (\w+) [33m�[31m% ',' /[0m�Unable to parse regex; couldn't find final '/'�at /tmp/UbW5b2gXn…»
21:35 alesk m: 'a,b,c,d' ~~ / (\w+)+ % ',' /
21:35 camelia rakudo-moar 28cfa0: ( no output )
21:35 tony-o any help with this error?  . im receiving it trying to close a socket from withint $*SCHEDULER.cue https://gist.github.com/to​ny-o/6de78fe91379a2501415
21:36 tony-o should i be trying to close it from within the same block as my .tap?
21:37 * masak *drum roll*
21:37 tony-o uh oh
21:37 TimToady finally...
21:38 masak lol! I blogged! http://strangelyconsistent.org/blog/​macros-define-your-own-literals-day
21:39 tony-o slang sql is out there :)
21:40 tony-o though not with that syntax yet
21:40 masak url?
21:42 tony-o https://github.com/tony-o/perl6-slang-sql
21:42 masak ooh
21:42 masak well, that certainly deserves an edit/mention in the blog post :)
21:43 tony-o perljam and a few other folks had some good suggestions but im currently cleaning up and making http server async better
21:44 tony-o by better i mean usable
21:44 masak *nod8
21:44 masak *nod*
21:44 masak well, looking at your Slang::SQL, it does look very promising.
21:44 masak my first thought is "if I have interpolation, I don't want to do prepared statements", though.
21:45 masak at least not in 90% of the cases.
21:45 tony-o why is that?
21:45 masak something like this: the '?' syntax is there to *safely* inject parameters into the SQL query.
21:46 masak but if I control the slang, I can already do that behind the scenes.
21:46 masak so it's much more direct to just write the value I want right there, in the query.
21:46 masak it gets rid of one level of indirection necessitated by the parametrization of the prepared statements.
21:47 masak which in turn was necessitated by people doing stupid things with string concatenation -- which is not a problem in Perl 6 slangs, because that's not how we do it, ideally.
21:47 masak does that make sense?
21:48 tony-o ahh yea i see what ythat is the plan
21:48 masak \o/
21:48 masak then consider me all aboard! :)
21:48 * masak edits his post
21:48 tony-o i misunderstood what you meant :)
21:53 lue masak: Unless ideas have changed since I last saw, I still see slangs as "grammar without a nice way to do actions" and macros as "actions without a nice way to do grammar". I think they could be two halves of the same thing, so I'm not surprised if you have trouble figuring out which you're talking about :) .
21:54 masak lue: :D
21:54 masak lue: I like your problem statement, even though I'm not 100% sure I agree yet.
21:55 tony-o lue: what do you mean "without a nice way to do actions"
21:55 masak lue: perhaps I would frame it as macros being *mostly* action-y, slangs being *mostly* grammar-y, and both of them being aspects of a common, unified thing that we haven't dug out of the sands of confusion yet.
21:56 masak lue: reming me to take you aside one day and tell you all the awesome/crazy plans for Qtrees.
21:56 masak remind*
21:56 lue tony-o: You can insert action-y statements in grammar rules, which I'm fine with, it just feels less structured/defined than the usual grammar + action class procedure.
21:56 tony-o ah
21:58 lue It's macros' "is parsed" trait that I don't like; I can see very long function openers because of it (or people writing a  my token ruleformacro  just so they can shorten it to  macro foo is parsed(/<ruleformacro>/)  )
21:59 masak that parenthetical solution doesn't sound half-bad.
22:00 kurahaupo1 joined #perl6
22:02 TimToady all the macro is doing is supplying an action method there, basically
22:02 jnthn reming: to make something ming yet again...
22:02 TimToady so maybe it ought to look more like an action method
22:02 masak jnthn: it's form people who miss that dynasty.
22:02 masak for*
22:03 lue masak: It's what I would do with long parsing rules, though when thinking about it I can't help but wonder if Perl 6 couldn't do the  is parsed(/<ruleformacro>/)  part for me :) .
22:03 * TimToady refrains from making a pun on vase-ectomy
22:03 masak TimToady: thanks for politely snipping that pun.
22:04 TimToady it's just a non-series of tubes
22:04 * masak .oO( and the backlog turned into so many snippy remarks )
22:05 jnthn Cut it out, guys! :P
22:06 masak eh, vas the big deferens.
22:07 masak lue: maybe in some very arranged cases, Perl 6 could figure out the `is parsed` part for you. (though that sounds to me like something a helpful module could provide if one wanted.)
22:09 * lue realizes the major difference between slangs and macros is that slangs are a container with grammar rules, while macros are simply stray action-y functions.
22:14 dalek nqp: 6f86799 | TimToady++ | src/QRegex/P6Regex/Grammar.nqp:
22:14 dalek nqp: better message for missing quant on %
22:14 dalek nqp: review: https://github.com/perl6/nqp/commit/6f86799df8
22:14 dalek nqp: f619a5e | TimToady++ | src/QRegex/NFA.nqp:
22:14 dalek nqp: some nfa timing code (commented out)
22:14 dalek nqp: review: https://github.com/perl6/nqp/commit/f619a5e086
22:20 TimToady > perl6 -e '/ (\w+) %% \, /'
22:20 TimToady ===SORRY!=== Error while compiling -e
22:20 TimToady Missing quantifier on the left argument of %%
22:21 TimToady alesk++
22:27 Mso150_p joined #perl6
22:29 pmurias masak: have you seen the quasi-quoting in haskell, it seems to be the same thing you are proposing
22:30 masak pmurias: I have not. do you have a reference I can look at?
22:33 pmurias masak: https://www.haskell.org/haskellwiki/Quasiquotation
22:35 masak oh, I thought it sounded familiar: I remember when au++ made http://hackage.haskell.org/pac​kage/interpolatedstring-perl6
22:36 masak yes, it looks quite similar.
22:37 masak they call it "antiquoting" when they break out of the slang. we might want to steal that terminology.
22:38 TimToady the trick is knowing the syntactic category of the unquote so you know what parser state to enter/leave with
22:40 ennio m: grammar G { token TOP { foo } }; class C { method TOP($/) { 'ba' ~~ /bar/ } }; G.parse('foo', :actions(C.new));
22:40 camelia rakudo-moar 28cfa0: OUTPUT«Cannot assign to a readonly variable or a value␤  in method ACCEPTS at src/gen/m-CORE.setting:14222␤  in method TOP at /tmp/e63CHQE8ST:1␤  in any !reduce at gen/moar/stage2/QRegex.nqp:850␤  in any !cursor_pass at gen/moar/stage2/QRegex.nqp:811␤  …»
22:40 ennio no regex possible in action methods?
22:41 jnthn ennio: Not if you bind $/ as a parameter.
22:43 ennio jnthn: so, how to do that?
22:43 jnthn ennio: method TOP($a-name-that-is-not-dollar-slash) { }
22:43 masak 'night, #perl6
22:44 ennio jnthn: ah, simple :) thanks
22:45 psch that loses the easy access to named captures though, which might be inconvenient
22:45 psch at least with $a-name-that-is-not-dollar-slash :)
22:45 lue ♞ masak o/
22:46 psch ...where easy just means "few characters"
22:48 jnthn Yes, though it's better that it fails outright if you try right now rather than overwriting $/ with the regex you just matched.
22:48 Mouq joined #perl6
22:48 jnthn I'd probably consider factoring the regex in question out into a private method or a sub, and calling that.
22:48 jnthn (from the action method)
22:49 psch localizing $/ in a block still works, which might be ok if it's just about matching and not capturing
22:49 psch if the use case is again capturing in the actions there's probably some redesigning to do
22:50 jnthn Well, yes...that is also very true
22:51 jnthn It's quite rare to do regex matches in action methods because the grammar usually has already pulled out the interesting bits :)
22:51 ennio yeah I finally moved this regex to the grammar itself :)
22:51 jnthn \o/
22:51 jnthn That's a much better way to go.
22:53 psch i'm wondering if leaking ACCEPTS is ok or 'too internal'.  on the one hand infix:<~~> is designed as a call to ACCEPTS with localized $_, on the other hand the error looks a bit LTA
22:54 psch maybe something along the lines of "Trying to assign to non-rw parameter" would be nice
22:54 psch m: sub foo ($a) { $a = 23 }; foo
22:54 camelia rakudo-moar 28cfa0: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/gKVI1l4E6Sâ�¤Calling 'foo' requires arguments (if you meant to operate on $_, please use .foo or use an explicit invocant or argument)â�¤    Expected: :(Any $a)â�¤at /tmp/gKVI1l4E6S:1â�¤------> [32…»
22:54 psch m: sub foo ($a) { $a = 23 }; foo(1)
22:54 camelia rakudo-moar 28cfa0: OUTPUT«Cannot assign to an immutable value␤  in block <unit> at /tmp/VvwtXtLU9p:1␤␤»
22:54 psch well, we don't even ===SORRY!===, that's definitely LTA
22:55 jnthn That one is a runtime error.
22:55 jnthn We could catch it at compile time here, though...
22:55 psch oh, is that a distinction i didn't realize? SORRYs are compile time?
22:58 jnthn Yes
23:02 psch i probably did know that at one point... hopefully it sticks this time around :)
23:04 psch re jvm-interop via invokedynamic: from what i understand i need something similar to IndyBootstrap:methcall{,Resolve}_noa but with caching on top? afaiu, the hard linking the jvm would do doesn't work for us because we have multiple candidates
23:08 lizmat joined #perl6
23:11 jnthn psch: Forget the caching in the begining.
23:11 jnthn psch: The trick for multi-dispatch is to use the bootstrap method to install a call to something that will do the dispatch.
23:18 psch jnthn: rereading methcall_noa looked more like the call goes through there anyway.  i guess methcallResolve_noa is what calls the bootstrap method which i have to install?
23:18 psch jnthn: as for installing the call, i'll have to figure out how exactly asm does invokedynamic, but i think i have an idea how to set up the surrounding at least
23:19 psch i do have to generate the something dynamic, right?  i'm getting a bit tired
23:22 psch i'll also have to have a closer look at what exactly the CodeRef knows and what else i need for dispatching
23:23 psch but i have that noted down and a (in the editor) sensible looking way of gathering things i need to dispatch written down as well
23:23 jnthn psch: Take a read through http://jnthn.net/papers/2013-bs-invoke-dynamic.pdf (maybe when less tired :))
23:23 psch i
23:23 psch i'll do that tomorrow or so though...
23:23 jnthn psch: I'm also pretty tired, and I suspect my slides explain it better than I can right now :)
23:24 psch jnthn: i'm okay with that, i do need rest about right now :)
23:24 dalek rakudo/newio: 9151432 | (Elizabeth Mattijsen)++ | src/core/IO/Handle.pm:
23:24 dalek rakudo/newio: The new IO::Handle, consuming the PIO role
23:24 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/9151432000
23:24 dalek rakudo/newio: 2b592c9 | (Elizabeth Mattijsen)++ | src/core/io_operators.pm:
23:25 dalek rakudo/newio: Simplifications since we have the new IO::Handle
23:25 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/2b592c9501
23:25 psch jnthn: thanks for the slides
23:25 denis_boyun_ joined #perl6
23:31 psch well, i did read half of the slides before realizing again i wanted to put away the laptop and turn of the lights...
23:31 psch i'll do the latter two things now though o/
23:32 [Sno] joined #perl6
23:36 denis_boyun_ joined #perl6
23:46 ennio :q
23:46 * hugme hugs ennio, good vi(m) user!
23:47 ennio well, yes good night perl6 :)
23:47 jnthn :)
23:47 jnthn 'night, ennio
23:47 lizmat gnight ennio
23:47 * lizmat also calls it a night
23:47 lizmat cu 2morrow
23:49 * [Coke] waves from the highway.
23:51 rmgk_ joined #perl6
23:53 jnthn o/ [Coke]
23:56 [Coke] parametrization - on oracle, you actually want this deferred to the DB level so the DB optimizer can play.
23:59 kurahaupo1 joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo