Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-04-22

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:13 logie_ joined #perl6
00:13 rurban joined #perl6
00:20 dayangkun joined #perl6
00:27 salv0 joined #perl6
00:40 kbaker joined #perl6
00:51 ivan`` joined #perl6
00:58 TimToady http://rosettacode.org/wiki/Handle_a_signal#Perl_6  :-)
01:03 klapperl_ joined #perl6
01:12 logie_ joined #perl6
01:14 rurban joined #perl6
01:14 btyler joined #perl6
01:18 gdey joined #perl6
01:29 Sqirrel joined #perl6
01:39 rurban joined #perl6
01:44 atroxaper joined #perl6
01:50 hoverboard joined #perl6
01:51 timotimo apparently not sleeping :|
01:52 timotimo that code is pretty. but it could just as well have used supply.zip to get the numbers to "line up" with an interval, right?
01:54 atroxaper joined #perl6
02:02 timotimo i don't actually know if there's an operation to turn a lazy list into a supply
02:08 WJB joined #perl6
02:18 Alula_ joined #perl6
02:26 gdey joined #perl6
02:31 avuserow r: say Buf.new eq ""
02:32 camelia rakudo-{jvm,moar} cc017e: OUTPUT«(timeout)»
02:32 camelia ..rakudo-parrot cc017e: OUTPUT«maximum recursion depth exceeded␤current instr.: 'print_exception' pc 145552 (src/gen/p-CORE.setting.pir:61201) (gen/parrot/CORE.setting:11309)␤called from Sub 'Stringy' pc 223521 (src/gen/p-CORE.setting.pir:91883) (gen/parrot/CORE.setting:1044)␤ca…»
02:33 avuserow n: say Buf.new eq ""
02:33 camelia niecza v24-109-g48a8de3: OUTPUT«False␤»
02:34 timotimo Buf.new.Stringy returns a buf
02:34 timotimo so eq trying to coerce Buf into a str and call eq on the result will call the very same eq candidate
02:35 timotimo yeah, the Stringy method of Buf just returns self
02:35 xragnar_ joined #perl6
02:35 timotimo though technically ... a Buf is Stringy already, because it "does Stringy"
02:35 timotimo hrm.
02:36 avuserow thanks for looking at it timotimo++ :)
02:36 avuserow I don't need that to work, I just accidentally hit it with Test's "is" function
02:36 timotimo what's the right solution then? :\
02:37 timotimo it could give the same error as this:
02:37 timotimo r: say Buf.new(25, 26, 27, 28).Str
02:37 camelia rakudo-moar cc017e: OUTPUT«Cannot use a Buf as a string, but you called the Str method on it␤  in method Str at src/gen/m-CORE.setting:5291␤  in block  at /tmp/tmpfile:1␤␤»
02:37 camelia ..rakudo-jvm cc017e: OUTPUT«Cannot use a Buf as a string, but you called the Str method on it␤  in method Str at gen/jvm/CORE.setting:5291␤  in block  at /tmp/tmpfile:1␤␤»
02:37 camelia ..rakudo-parrot cc017e: OUTPUT«Cannot use a Buf as a string, but you called the Str method on it␤  in method Str at gen/parrot/CORE.setting:5295␤  in method Str at gen/parrot/CORE.setting:1038␤  in block  at /tmp/tmpfile:1␤␤»
02:37 avuserow m: say Buf.new eq Buf.new # is this also bad?
02:37 camelia rakudo-moar cc017e: OUTPUT«True␤»
02:37 avuserow huh.
02:38 BenGoldberg I think you have to call .decode(something) to turn a Buf into a Str
02:38 timotimo oh
02:38 timotimo Buf.pm also defines eq for Buf to B\=
02:38 timotimo Buf*
02:39 avuserow yeah, that makes sense, cause that's similar to comparing arrays
02:40 avuserow so yeah maybe comparing Bufs and most things with eq is wrong...
02:41 timotimo okay, so a Buf + Any and an Any + Buf eq candidate may be acceptable
02:42 timotimo just to throw an exception rather than infinilooping on coercion
02:42 avuserow sounds good to me
02:49 timotimo if you want to, you can patch it and propose it as a pull request :)
02:49 timotimo i'd like to get comments from people "higher up" before merging it, though
02:52 avuserow maybe, we'll see. I'm hacking on a few modules at the moment
02:52 timotimo (if you patch that, also add candidates for ne)
03:12 raiph joined #perl6
03:22 SamuraiJack_ joined #perl6
03:37 lue (The best solution would be to not declare Buf as doing Stringy ...)
03:40 cxreg joined #perl6
03:43 kaare_ joined #perl6
03:54 thou joined #perl6
03:58 slavik joined #perl6
04:03 segomos joined #perl6
04:11 plobsing joined #perl6
04:16 segomos i dunno i can't remember ever missing or wanting autocomplete
04:18 anaeem1_ joined #perl6
04:23 anaeem___ joined #perl6
04:31 wbill joined #perl6
04:32 dalek ecosystem: 0bfe389 | segomos++ | META.list:
04:32 dalek ecosystem: Update META.list
04:32 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/0bfe38910d
04:34 moritz m: say 42
04:34 camelia rakudo-moar cc017e: OUTPUT«42␤»
04:34 segomos m: 42.say
04:34 camelia rakudo-moar cc017e: OUTPUT«42␤»
04:34 * moritz was just interested in the rakudo revision
04:36 Psyche^ joined #perl6
04:38 raiph m: say 42.WHY # to entertain segomos
04:38 camelia rakudo-moar cc017e: OUTPUT«Life, the Universe and Everything␤»
04:38 segomos lol, nice
04:39 segomos i'm enjoying the shit out of perl6, just an fyi for you folks developing it
04:48 avuserow segomos++ # adding more modules
04:48 raiph segomos: you've done more p6 dev than i have :)
04:52 segomos god, what a great next version from p5.  the module i just submitted is kind of a hack right now :-) i don't the proper way to do sgml
04:53 raiph just started a grammar to parse http://www.cpan.org/MIRRORED.BY
04:58 segomos what should it produce?  i've been playing around a lot with grammars
04:59 raiph Just a simple parse tree would do as a start
04:59 raiph m: grammar G { rule TOP { <foo>* }; rule foo { \N* \n }; }; say G.parse("xxx\nyyy\n")
04:59 camelia rakudo-moar cc017e: OUTPUT«(Any)␤»
05:00 segomos what is it for?
05:03 raiph FROGGS needs to pull something out of it for his CPAN integration work
05:05 raiph I (perhaps foolishly) thought I would try build a P6 grammar for it without worrying about what data/data structure is actually needed for his current use case
05:06 woosley joined #perl6
05:07 raiph segomos: why do I get the (Any) response to the evalbot line I just did above?
05:09 segomos m: grammar G { rule TOP { <foo>* }; rule foo { \N* \n }; }; say G.parse("xxx\nyyy\n").say;
05:09 camelia rakudo-moar cc017e: OUTPUT«(Any)␤True␤»
05:11 woosley joined #perl6
05:12 raiph m: say Grammar.WHAT
05:12 camelia rakudo-moar cc017e: OUTPUT«(Grammar)␤»
05:12 avuserow "say G.parse("xxx\nyyy\n").say" ?
05:12 raiph m: say Any
05:12 camelia rakudo-moar cc017e: OUTPUT«(Any)␤»
05:13 kaare_ joined #perl6
05:13 segomos it returns Any because it doesn't parse
05:14 segomos m:grammar G { rule TOP { <foo>* }; regex foo { <data> \n }; regex data { \N* };  }; say G.parse("xxx\nyyy\n").say
05:14 segomos m: grammar G { rule TOP { <foo>* }; regex foo { <data> \n }; regex data { \N* };  }; say G.parse("xxx\nyyy\n").say
05:14 camelia rakudo-moar cc017e: OUTPUT«「xxx␤yyy␤」␤ foo => 「xxx␤」␤  data => 「xxx」␤ foo => 「yyy␤」␤  data => 「yyy」␤␤True␤»
05:17 raiph segomos: thanks. why does regex work and not rule? isn't the difference that rule does backtracking and sigspace?
05:19 denis_boyun_ joined #perl6
05:20 segomos i believe, but am probably wrong, that doing <data> \n  requires look ahead
05:20 woosley joined #perl6
05:22 raiph huh. looks like i got it the wrong way round -- its regex that backtracks, which is obvious in retrospect
05:23 raiph ie regex works like p5 regex in that regard whereas rule ratchets
05:23 TimToady it's not the backtracking, it's that rule will match whitespace before your \n
05:23 TimToady and eat the newline, so \n can' tmatch
05:23 segomos TimToady++
05:23 TimToady rule foo { <data>\n } would work
05:24 TimToady (as long as you don't also make data a rule)
05:24 segomos indeed it does
05:24 TimToady in which case teh space after \N* would also eat <ws>
05:25 raiph TimToady++, segomos++ # thanks
05:26 segomos raiph: use Grammar::Trace..it has helped me quite a bit
05:26 xinming__ joined #perl6
05:26 segomos grammar::Tracer
05:27 raiph I tried both that and the full debugger; tools can help but can't stop me being me :)
05:32 darutoko joined #perl6
05:35 xinming_ joined #perl6
05:43 thou joined #perl6
05:49 SHODAN joined #perl6
05:52 btyler joined #perl6
05:55 xinming__ joined #perl6
06:05 kaleem joined #perl6
06:16 xinming_ joined #perl6
06:16 IllvilJa joined #perl6
06:21 hummeleB1 joined #perl6
06:39 sergot morning o/
06:46 masak morning, sergot, #perl6
06:47 denis_boyun_ joined #perl6
06:48 cooper joined #perl6
06:48 sergot hi masak :)
06:59 FROGGS joined #perl6
07:03 moritz \o
07:05 dalek ecosystem: b4a9da0 | Adrian++ | META.list:
07:05 dalek ecosystem: Add Compress::Snappy
07:05 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/b4a9da03be
07:05 dalek ecosystem: 9a272fa | moritz++ | META.list:
07:05 dalek ecosystem: Merge pull request #29 from avuserow/patch-2
07:05 dalek ecosystem:
07:05 dalek ecosystem: Add Compress::Snappy
07:05 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/9a272fa77d
07:05 hummeleB1 joined #perl6
07:05 zakharyas joined #perl6
07:08 FROGGS morning
07:10 hummeleB1 joined #perl6
07:13 Ven joined #perl6
07:28 dalek rakudo/nom: 280736a | (Elizabeth Mattijsen)++ | src/core/signals.pm:
07:28 dalek rakudo/nom: Supply.merge(@s) reverts to noop on 1 Supply
07:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/280736a3a7
07:28 dmol joined #perl6
07:31 thou joined #perl6
07:31 lizmat and good *, #perl6!
07:33 * lizmat still feels signal() should be Supply.signal(), as it returns a Supply
07:35 sqirrel joined #perl6
07:37 Ven o/, lizmat
07:37 dalek rakudo/nom: 383ba3b | (Elizabeth Mattijsen)++ | src/core/signals.pm:
07:37 dalek rakudo/nom: Further simplification of signal()
07:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/383ba3b7ec
07:38 arnsholt o/
07:48 fhelmberger joined #perl6
07:51 kivutar joined #perl6
07:52 jnthn lizmat: And file watchers too? And sockets? And async file operations?
07:52 jnthn Just because something returns a Supply doesn't mean it should have a method in Supply...
07:53 jnthn dir returns a list of files, but we don't write List.dir :)
07:53 btyler joined #perl6
07:56 Ven [\op] gets a lazy reduction ? nice
07:56 FROGGS fwiw, I do not really like constructor methods other than .new
07:57 FROGGS because these usually do not mix well with methods that are not constructors
07:58 FROGGS in SDL (P5 module) we ended up with ->from_surface or ->video_surface which kinda implies being a constructor
07:58 FROGGS but only kinda
08:02 Ven if you want to have a `is cached` sub, can you use it on the proto ? or do you have to is cached on every multi sub?
08:04 Ven m: my @a = (0..5).roll(5) xx 5; say @a[*]>>[0];
08:04 camelia rakudo-moar cc017e: OUTPUT«4 1 3 2 3 0 4 4 1 3 3 4 3 1 5 4 3 2 0 5 4 0 2 2 3␤»
08:05 Ven m: my @a = (0..5).roll(5) xx 5; say @a[*] eqv @a;
08:05 camelia rakudo-moar cc017e: OUTPUT«False␤»
08:06 jnthn Ven: For now I'd not try putting it on a proto. It'll interact rather badly with the fact that protos get optimized out in the common case if they're onlystar ones.
08:10 lizmat jnthn: fair enough  :-)
08:10 rindolf joined #perl6
08:11 lizmat (wrt to signal not being in Supply)
08:12 Ven m: sub a($a, $b) { say $a.perl ~ $b.perl; }; say 5.&a(5);
08:12 camelia rakudo-moar cc017e: OUTPUT«55␤True␤»
08:12 Ven m: sub a($a, $b) { say $a.perl ~ $b.perl; }; say 5.&a('fo'); # ;_;
08:12 camelia rakudo-moar cc017e: OUTPUT«5"fo"␤True␤»
08:14 lizmat jnthn: wrt is_cached on a proto: could the existence of the trait be the reason *not* to optimize it away?
08:14 jnthn lizmat: Yeah, but it doesn't convey that at present.
08:15 jnthn lizmat: I can't remember how is cached works; if it wraps, then we can maybe make wrap take off the onlystar flag.
08:15 lizmat it's a wrap
08:15 lizmat how would you take off the onlystar flag?
08:16 jnthn It's just an attribute declared in Routine iirc
08:16 jnthn So I think you'd just bindattr_i it.
08:16 lizmat ok, will check
08:18 Ven (not sure what's going on with @a VS @a[] vs @a[*])
08:19 atroxaper joined #perl6
08:26 nwc10 jnthn: t/spec/S17-concurrency/promise.t failed test 64 for me when run in parralel
08:27 nwc10 ok 64 - got the right order
08:27 nwc10 twice now when running on its own
08:28 * nwc10 runs it in a shell loop until it fails
08:28 lizmat I think it has to do with a thread being joined *before* it finishes running
08:28 nwc10 more accurately, while it passes, do it again
08:28 jnthn lizmat: I've never actually been able to observe that happen.
08:29 lizmat nwc10: you're on OSX as well, right?
08:29 nwc10 that's C<my> machine.
08:29 nwc10 most real work is done by C<"my"> machine
08:29 nwc10 and many of those are Linux
08:30 jnthn I wonder if it's that under pthreads, join can return spuriously?
08:30 nwc10 and this "my" machine is linux
08:30 lizmat afk for a few hours&
08:31 nwc10 not ok 64 - got the right order
08:31 nwc10 #      got: '1 0 2 3 4 5 6 7 8 9'
08:31 nwc10 # expected: '0 1 2 3 4 5 6 7 8 9'
08:31 nwc10 # Looks like you failed 1 tests of 64
08:31 nwc10 And, botherit, tests seem to return exit success even when they fail
08:31 jnthn The documentation doesn't suggest so
08:41 denis_boyun joined #perl6
08:46 thilp joined #perl6
09:09 spider-mario joined #perl6
09:11 daniel-s joined #perl6
09:19 thou joined #perl6
09:25 FROGGS TimToady: do we need to change S02:1064? there is an inconsistency between `my $x; (*, *, $x) = (1, 2, 3);` and `my ($, $, $x) = (1, 2, 3);`
09:26 synopsebot Link: http://perlcabal.org/syn/S02.html#line_1064
09:27 FROGGS TimToady: if I had the choice I'd make * in signatures behave like $
09:30 jnthn FROGGS: I don't think we can make * do that in sigs...
09:30 jnthn ferry &
09:31 FROGGS hmmm
09:32 FROGGS but it would fit... "Slurp one thing to nowhere"
09:36 donaldh joined #perl6
09:47 tadzik FROGGS: hey, what's the status of creating moarvm fakexecutables? How far did you take the idea/
09:47 tadzik I'm very interested in this, for the gmaes on steroids purposes
09:51 FROGGS tadzik: I can create a foo executable that is a maorvm binary that executes perl6.moarvm + your custom code as .moarvm files included
09:51 FROGGS currently it needs a "-e 1" to not run the repl
09:52 FROGGS and, it still tries to load things like Perl6/BOOTSTRAP.moarvm and other internal modules, even when they are bundled
09:53 tadzik ah, I stumbled upon that BOOTSTRAP too
09:53 tadzik and it insisted on looking for it in /home/tadzik/blablaabla
09:54 FROGGS so, currently I have made branchen in MoarVM, nqp and rakudo called "execname"
09:54 FROGGS and two unpushed diffs for MoarVM and rakudo
09:56 FROGGS tadzik: these need to applied to the execname branches https://gist.github.com/FROGGS/3e5bee1ef8e122c9b6fe
09:57 FROGGS in the gist you can see how the .moarvm files are embedded in the your-game.c file
09:57 FROGGS but somehow we need to trick rakudo's module loader
09:57 FROGGS (and disable the repl)
09:58 tadzik I see
10:00 FROGGS brb
10:03 Ven joined #perl6
10:04 Ven m: say $bool = True but False; if $bool { say 'hello'; }
10:04 camelia rakudo-moar 383ba3: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ac6p8xKgiYâ�¤Variable '$bool' is not declaredâ�¤at /tmp/ac6p8xKgiY:1â�¤------> [32msay $bool[33mâ��[31m = True but False; if $bool { say 'hello[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
10:04 Ven m: my $bool = True but False; if $bool { say 'hello'; }
10:04 camelia rakudo-moar 383ba3: ( no output )
10:04 masak FROGGS: the '$' syntax was introduced way back when because '*' couldn't do that.
10:08 dalek joined #perl6
10:14 Ven m: say first Int, ("a", 1, 2);
10:14 camelia rakudo-moar 383ba3: OUTPUT«1␤»
10:20 salv0 joined #perl6
10:26 telex joined #perl6
10:28 telex joined #perl6
10:32 rindolf joined #perl6
10:44 prevost joined #perl6
10:53 eternaleye joined #perl6
11:04 dalek rakudo/nom: d2dfb68 | (Elizabeth Mattijsen)++ | src/core/Routine.pm:
11:04 dalek rakudo/nom: is cached now resets the "onlystar" flag if needed
11:04 dalek rakudo/nom:
11:04 dalek rakudo/nom: So that proto's with "is cached" will not be optimized away.
11:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d2dfb68390
11:05 lizmat jnthn: ^^^ this doesn't regress anything, but am not sure this is what you meant
11:05 lizmat afk for another hour or so
11:08 thou joined #perl6
11:08 Ven lizmat++ # fixing stuff I just asked
11:14 rindolf joined #perl6
11:36 kurahaupo joined #perl6
11:38 Ven p6: say (^Inf)[*-10..*-5].perl
11:38 camelia rakudo-{parrot,moar} d2dfb6: OUTPUT«()␤»
11:38 camelia ..niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Cannot use value like WhateverCode as a number␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting line 300 (Any.Numeric @ 6) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecz…»
11:38 camelia ..rakudo-jvm d2dfb6: OUTPUT«Unhandled exception: java.lang.RuntimeException: Missing or wrong version of dependency 'src/Perl6/Grammar.nqp'␤  in  (gen/jvm/main.nqp)␤␤»
11:39 Ven m: say Inf - 5
11:39 camelia rakudo-moar d2dfb6: OUTPUT«Inf␤»
11:39 Ven m: say (^5)[Inf..Inf]
11:39 camelia rakudo-moar d2dfb6: OUTPUT«␤»
11:40 Bucciarati joined #perl6
11:45 ivanshmakov joined #perl6
11:49 FROGGS m: say Inf cmp Inf
11:49 camelia rakudo-moar d2dfb6: OUTPUT«Same␤»
11:54 a3gis joined #perl6
12:03 Ven there's no shortcut for ^$x X ^$x (or with Z), right ?
12:04 Ven m: say (gather for ^5 { take 'line' => $_ })[3].perl
12:04 camelia rakudo-moar d2dfb6: OUTPUT«"line" => 3␤»
12:05 Ven m: say (gather for ^5 { take 'line' => $_; take 'foo' => 3 })[3].perl
12:05 camelia rakudo-moar d2dfb6: OUTPUT«"foo" => 3␤»
12:06 Alina-malina joined #perl6
12:07 Ven m: say do given False { when True { 5 } }
12:07 camelia rakudo-moar d2dfb6: OUTPUT«5␤»
12:07 Ven m: sub foo(True) { 5 }; foo(False)
12:07 camelia rakudo-moar d2dfb6: ( no output )
12:07 Ven m: sub foo(True) { 5 }; say foo(False) # just checking, but that should DWIM
12:07 camelia rakudo-moar d2dfb6: OUTPUT«5␤»
12:10 Ven Is there a HTML generation lib in p6 yet ?
12:17 Ven Can I generate names to export ? ie `for <a b c> -> $as { sub foo is export(:$as) {} }`
12:19 lizmat lotrrotk
12:19 lizmat oops, ww :-)
12:19 Ven wut
12:19 kbaker joined #perl6
12:20 Ven m: anon sub($) { 5 }
12:20 camelia rakudo-moar d2dfb6: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Type 'sub' is not declared. Did you mean 'Sub'?â�¤at /tmp/KlhtG8oJBL:1â�¤------> [32manon sub[33mâ��[31m($) { 5 }[0mâ�¤Malformed anonâ�¤at /tmp/KlhtG8oJBL:1â�¤------> [32manon [33mâ��[31msub($) { 5 }[0mâ�¤    expect…»
12:21 Ven m: say (anon($) { 5 }).()
12:21 camelia rakudo-moar d2dfb6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/x2hg380uPi�Unsupported use of $) variable; in Perl 6 please use $*EGID�at /tmp/x2hg380uPi:1�------> [32msay (anon($)[33m�[31m { 5 }).()[0m�»
12:21 Ven m: say (anon($a) { 5 }).()
12:21 camelia rakudo-moar d2dfb6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/2FcONxHaGTâ�¤Variable '$a' is not declaredâ�¤at /tmp/2FcONxHaGT:1â�¤------> [32msay (anon($a[33mâ��[31m) { 5 }).()[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
12:21 Ven m: say (sub ($a) { 5 }).()
12:21 camelia rakudo-moar d2dfb6: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤  in sub  at /tmp/HOGrcbO1ne:1␤  in block  at /tmp/HOGrcbO1ne:1␤␤»
12:22 Ven m: my @closed = <a img>; say any(@closed) eq 'a';
12:22 camelia rakudo-moar d2dfb6: OUTPUT«any(True, False)␤»
12:22 Ven r-p: my @closed = <a img>; say so any(@closed) eq 'a';
12:22 camelia rakudo-parrot d2dfb6: OUTPUT«True␤»
12:23 SamuraiJack joined #perl6
12:23 Ven r-p: my @closed = <a img>; say so any(@closed) eq 'h1';
12:23 camelia rakudo-parrot d2dfb6: OUTPUT«False␤»
12:26 Ven I'm getting some WATs from parrot.
12:26 Ven p: my Str $foo; say "Hey $foo";
12:26 camelia rakudo-parrot d2dfb6: OUTPUT«use of uninitialized value of type Str in string context  in block  at /tmp/5QFjS4wghV:1␤␤Hey ␤»
12:26 Ven p: my Str $foo = 'abc'; say "Hey $foo";
12:26 camelia rakudo-parrot d2dfb6: OUTPUT«Hey abc␤»
12:26 Ven p: my Str $foo = 'abc'; say "Hey <a>$foo</a>";
12:26 camelia rakudo-parrot d2dfb6: OUTPUT«postcircumfix:<{ }> not defined for type Str␤  in method Str at gen/parrot/CORE.setting:12622␤  in method Str at gen/parrot/CORE.setting:1038␤  in method Stringy at gen/parrot/CORE.setting:1048␤  in method Stringy at gen/parrot/CORE.setting:1047…»
12:27 Ven p: my Str $foo = 'abc'; say "Hey <a>{$foo}</a>";
12:27 camelia rakudo-parrot d2dfb6: OUTPUT«Hey <a>abc</a>␤»
12:27 Ven p6-- # too agressive interpolation :(
12:30 Ven m: sub gensub($n) { my multi sub dispatch($ where * eq $n) { True }; my multi sub dispatch($) { False } }; my &l = gensub('foo'); say l('a'), l('foo');
12:30 camelia rakudo-moar d2dfb6: OUTPUT«FalseFalse␤»
12:30 Ven m: sub gensub($str) { my multi sub dispatch($ where { $_ eq $str}) { True }; my multi sub dispatch($) { False } }; my &l = gensub('foo'); say l('a'), l('foo');
12:30 camelia rakudo-moar d2dfb6: OUTPUT«FalseFalse␤»
12:31 sftp joined #perl6
12:32 Ven m: https://gist.github.com/Nami-Doc/15ac60bb18fb1914ba04
12:32 camelia rakudo-moar d2dfb6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/xLIvQEvJBTâ�¤Slurpy positionals with type constraints are not supported.â�¤at /tmp/xLIvQEvJBT:18â�¤------> [32m my multi sub htmlize(Str *@content[33mâ��[31m, *%attrs) {[0mâ�¤    expecting any o…»
12:33 treehug88 joined #perl6
12:33 FROGGS masak: perl6-m -e 'my (*, *, $x) = (1, 2, 3); say $x'
12:33 FROGGS 3
12:35 Ven Wtf perl 6 ._.
12:35 FROGGS Ven: problems?
12:36 Ven m: sub gen($name) { my multi sub d(Str $str) { "Hey $name - $str" }; my multi sub(Int $n) { callwith($n.Str) } }; my &g = gen('foo'); say g(5), g("navi");
12:36 camelia rakudo-moar d2dfb6: OUTPUT«Type check failed in binding $n; expected 'Int' but got 'Str'␤  in sub sub at /tmp/yoXMoq6lFV:1␤  in block  at /tmp/yoXMoq6lFV:1␤␤»
12:36 Ven FROGGS: https://gist.github.com/Nami-Doc/15ac60bb18fb1914ba04
12:36 FROGGS typo in the second multi name
12:36 Ven m: sub gen($name) { my multi sub d(Str $str) { "Hey $name - $str" }; my multi sub d(Int $n) { callwith($n.Str) } }; my &g = gen('foo'); say g(5), g("navi");
12:36 FROGGS my multi sub(Int $n) <-- subname is missing
12:36 camelia rakudo-moar d2dfb6: OUTPUT«Type check failed in binding $n; expected 'Int' but got 'Str'␤  in sub d at /tmp/1Vj8pFklFm:1␤  in block  at /tmp/1Vj8pFklFm:1␤␤»
12:37 Ven m: sub gen($name) { my multi sub d(Str $str) { "Hey $name - $str" }; my multi sub d(Int $n) { callwith($n.Str) }; return &d; }; my &g = gen('foo'); say g(5), g("navi");
12:37 camelia rakudo-moar d2dfb6: OUTPUT«NilHey foo - navi␤»
12:37 FROGGS ahh
12:37 Ven better.
12:38 cogno joined #perl6
12:38 Ven still incorrect, though, mmh
12:38 xenoterracide_ joined #perl6
12:39 Ven m: sub h(%h) { %h.perl } sub xd(*%a) { say h(%a)  }; xd();
12:39 camelia rakudo-moar d2dfb6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/vwL1T8wWWcâ�¤Two terms in a rowâ�¤at /tmp/vwL1T8wWWc:1â�¤------> [32msub h(%h) { %h.perl } [33mâ��[31msub xd(*%a) { say h(%a)  }; xd();[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤  â€¦Â»
12:39 Ven m: sub h(%h) { %h.perl }; sub xd(*%a) { say h(%a)  }; xd();
12:39 camelia rakudo-moar d2dfb6: OUTPUT«().hash␤»
12:39 Ven r-p: sub h(%h) { %h.perl }; sub xd(*%a) { say h(%a)  }; xd();
12:39 camelia rakudo-parrot d2dfb6: OUTPUT«().hash␤»
12:40 Ven r-p: sub h(%h) { %h.perl }; multi sub xd(Int, *%a) { callsame(|%a); }; sub xd(*%a) { say h(%a)  }; xd(5);
12:40 camelia rakudo-parrot d2dfb6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/hMLDJ_NWKQâ�¤Redeclaration of routine xdâ�¤at /tmp/hMLDJ_NWKQ:1â�¤------> [32msame(|%a); }; sub xd(*%a) { say h(%a)  }[33mâ��[31m; xd(5);[0mâ�¤    expecting any of:â�¤        postfixâ�¤       …»
12:40 Ven r-p: sub h(%h) { %h.perl }; multi sub xd(Int, *%a) { callsame(|%a); }; multi sub xd(*%a) { say h(%a)  }; xd(5);
12:40 camelia rakudo-parrot d2dfb6: ( no output )
12:41 Ven r-p: sub h(%h) { %h.perl }; multi sub xd(Int, *%a) { callwith(|%a); }; multi sub xd(*%a) { say h(%a)  }; xd(5);
12:41 camelia rakudo-parrot d2dfb6: ( no output )
12:41 FROGGS that is too much spam for me to see what is going on :o)
12:41 FROGGS you could talk with camelia in privmsg, and then only paste stuff here for discussion
12:42 Ven FROGGS: ha, sorry. https://gist.github.com/Nami-Doc/15ac60bb18fb1914ba04 -- fails with "not enough positional parameters, got 1 but expected 2 in sub attributes at Generate.pm:4"
12:43 FROGGS m: for { a => 1, b => 2 } -> $k, $v { say "$k $v" }
12:43 camelia rakudo-moar d2dfb6: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in block  at /tmp/lW1NBkRnxJ:1␤␤»
12:43 FROGGS m: for { a => 1, b => 2 }.kv -> $k, $v { say "$k $v" }
12:43 camelia rakudo-moar d2dfb6: OUTPUT«a 1␤b 2␤»
12:44 FROGGS Ven: ^^
12:45 Ven m: https://gist.github.com/Nami-Doc/15ac60bb18fb1914ba04
12:46 camelia rakudo-moar d2dfb6: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤  in block  at src/gen/m-CORE.setting:645␤  in sub htmlize at /tmp/7TD_BafJ8J:19␤  in sub htmlize at /tmp/7TD_BafJ8J:10␤  in block  at /tmp/7TD_BafJ8J:31␤␤»
12:47 Ven s/same/with/, I guess.
12:47 Ven m: https://gist.github.com/Nami-Doc/15ac60bb18fb1914ba04
12:47 camelia rakudo-moar d2dfb6: OUTPUT«Nil␤»
12:49 Ven m: sub gen-for($str) { sub { say $str; } }; my &hello = gen-for('hello'); my &bar = gen-for('foobar'); hello(); bar(); hello(); # I don't even ...
12:49 camelia rakudo-moar d2dfb6: OUTPUT«hello␤foobar␤hello␤»
12:50 salv0 joined #perl6
12:50 Ven m: sub gen-for($str) { my multi sub named { say $str; }; &named }; my &hello = gen-for('hello'); my &bar = gen-for('foobar'); hello(); bar(); hello(); # I don't even ...
12:50 camelia rakudo-moar d2dfb6: OUTPUT«foobar␤foobar␤foobar␤»
12:50 Ven ^ is that a bug ?
12:50 Ven or is it "declare vs compile-time" stuff again ?
12:51 Ven (and if so -- fair enough, but I'm not sure how I can get a multi anonymous sub to be returned)
12:52 lizmat sub a { multi sub foo { }; &foo } ?
12:52 Ven (I'm really starting to think I'm just not smart enough for p6 considering how much time I have to go back and how unhelpful web resources are ...)
12:53 Ven lizmat: check my previous paste.
12:53 Ven it doesn't correctly close over variables, it seems
12:55 Ven m: sub gen-for($str) { multi sub named { say $str; }; &named }; my &hello = gen-for('hello'); my &bar = gen-for('foobar'); hello(); bar(); hello(); # try without `my`
12:55 camelia rakudo-moar d2dfb6: OUTPUT«foobar␤foobar␤foobar␤»
12:55 Ven Nope, same thing.
12:55 FROGGS Ven: that seems to about the lexpads, yes
12:55 FROGGS that seems to be exactly what masak++ blogged about
12:55 Ven yes.
12:55 pochi joined #perl6
12:56 Ven A workaround would be a class overriding postcircumfix:<( )> I guess, but ew.
12:58 colomon Ven: why do you want an anonymous multi?  (or to put it another way, I'm not sure why not being able to figure out how to get a weird edge case to work would mean you're not smart enough for p6.)
12:58 Ven colomon: https://gist.github.com/Nami-Doc/15ac60bb18fb1914ba04 that's my use-case
12:59 Ven colomon: and because I keep hitting "weird edge cases" it seems, considering how much I spam `r:` and friends
13:00 * lizmat just had a déjà vu experience
13:01 Ven lizmat: what do you mean ?
13:03 lizmat your gist reminded me a lot of CGI.pm
13:04 lizmat at least, some of it
13:04 * Ven doesn't know CGI.pm
13:04 * Ven github searched but only got on p5 stuff
13:04 lizmat https://metacpan.org/pod/CGI
13:04 lizmat indeed, perl 5
13:05 lizmat it's one of the oldest Perl 5 modules
13:05 lizmat http://cpanratings.perl.org/dist/CGI
13:05 lizmat you seem to be doing 2. generating HTML using function calls.
13:06 Ven I'm not fond of this kind of html-generation, but it gets the job done to start with
13:06 lizmat "It seems to be fairly widely agreed that the HTML generation part is best forgotten about"
13:06 * Ven will probably port HAML later ...
13:06 lizmat but if it gets the job done for you, more power to you  :-)
13:07 Ven with masak++'s indent parser
13:07 lizmat need to run some errands and pick someone up &
13:08 Ven Actually, even with that p6 bug which seems unfixable, I still don't get the correct result
13:09 guru joined #perl6
13:12 Ven Actually, even with that p6 bug which seems unfixable, I still don't get the correct result. I'll just give up that one
13:13 Ven colomon: that's an actual example of what I mean. that strange lexpad "bug" aside, I don't understand at all why I don't get my other multi
13:14 Ven 's return value when I use {call,next}with
13:21 kshannon joined #perl6
13:23 Ven It looks like I can't find {next,call}{same,with} anymore, to add it. I'd expect it to be in S06
13:24 [Coke] what advantage is there to having the 2 multi subs over a single sub that takes a slurpy arg?
13:25 [Coke] (I'm not saying it shouldn't work the way you're doing it, of course)
13:26 [Coke] just wondering why it's preferable to go that route.
13:37 FROGGS TimToady / jnthn / masak: this makes * in signatures work: https://gist.github.com/FROGGS/a78ff92ec5e7ce2f8fda
13:37 FROGGS TimToady / jnthn / masak: no breaking spectests btw
13:38 cogno joined #perl6
13:40 Ven [Coke]: no idea. You'd ~~ List and .join if so ?
13:42 Ven m: my s(*$slurp){ say $slurp.perl }; s(1, 2);
13:42 camelia rakudo-moar d2dfb6: OUTPUT«[31m===[0mSORRY![31m===[0m�Type 's' is not declared�at /tmp/4ef0fx8NgR:1�------> [32mmy s[33m�[31m(*$slurp){ say $slurp.perl }; s(1, 2);[0m�Malformed my�at /tmp/4ef0fx8NgR:1�------> [32mmy [33m�[31ms(*$slurp){ say $slurp.perl }; …»
13:42 Ven m: sub s(*$slurp){ say $slurp.perl }; s(1, 2);
13:42 camelia rakudo-moar d2dfb6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/zCCKp7S9Sqâ�¤Calling 's' will never work with argument types (Int, Int)â�¤    Expected: :(Any $slurp)â�¤at /tmp/zCCKp7S9Sq:1â�¤------> [32msub s(*$slurp){ say $slurp.perl }; [33mâ��[31ms(1, 2);[…»
13:42 Ven m: sub s(*@slurp){ say @slurp.perl }; s(1, 2);
13:42 camelia rakudo-moar d2dfb6: OUTPUT«Array.new(1, 2)␤»
13:42 Ven (what's *$ supposed to do ?)
13:42 bluescreen10 joined #perl6
13:43 [Coke] I dunno, *@ slurps positions, *% slurps named.
13:43 [Coke] *positionals
13:44 [Coke] so I'd use *@, get a list of args, and then .join it and use the logic from the first multi sub.
13:44 [Coke] I'm just wondering if you're expecting a performance benefit from doing it the other way.
13:44 Ven [Coke]: yeah, but I just changed it to do that
13:44 [Coke] (given that slurps all the time can be slow if the main path is single arg)
13:44 Ven I didn't want to use slurpy params for the main usage which is more often than not only one arg
13:44 [Coke] fair enough. Just curious.
13:45 Ven but I'll leave it the "slow" way since the "fast" one doesn't work (yet ?)
13:47 [Coke] also fair. :)
13:48 btyler joined #perl6
13:49 Ven [Coke]: the other thing I wanted to do is generate a function for each tag and "export" it automatically. Can I do that ?
13:50 PerlJam Ven: with EVAL  ;)
13:50 Ven I'd really, really, really, really like not to use EVAL or anything like that.
13:51 [Coke] I don't know how to programmatically do "is export"
13:51 Ven That's basically saying "I'm defeated, the language can't do that for me"
13:52 Ven Maybe that'd be possible with a macro, but I can't picture how
13:57 Ulti are there any modules using LibraryMake I can take a look at?
13:58 retupmoca Ulti: the simplest one I'm aware of is Auth::PAM::Simple
14:00 Ulti okedoke I will take a look
14:00 Ulti thinking of trying for a libccv binding
14:05 logie_ joined #perl6
14:11 timotimo you can programmatically apply is export to a function by calling trait_mod:<is>($routine, :export) i believe
14:11 kaare_ joined #perl6
14:12 Ven timotimo: yeah. but how can I name `our sub` programmatically ?
14:13 timotimo Routine.new? :)
14:14 timotimo hm, though the package is runtime read-only
14:14 timotimo but you can have an export sub that generates stuff on the fly
14:14 timotimo and not have to rely on the package
14:14 PerlJam Why does it need to be an "our" sub?
14:18 Ven It doesn't need to. I need to give it a name
14:19 Ven m: $MY::a = 5; say $a;
14:19 camelia rakudo-moar d2dfb6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/cNdjfe2uB1â�¤Variable '$a' is not declaredâ�¤at /tmp/cNdjfe2uB1:1â�¤------> [32m$MY::a = 5; say $a[33mâ��[31m;[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
14:19 treehug88 joined #perl6
14:20 timotimo if you look at ADT, you'll see a way to dynamically create classes (and their methods) of arbitrary names; the metamodel probably offers something similar for creating routines with names
14:21 timotimo and there's apparently set_name
14:21 Ven m: my &s = sub { 5 }; s.set_name: 'foo'; say foo();
14:21 camelia rakudo-moar d2dfb6: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex metacharacter ; (must be quoted to match literally)�at /tmp/qeHo1Gd73N:1�------> [32mmy &s = sub { 5 }; s.set_name: 'foo'[33m�[31m; say foo();[0m�Couldn't find terminator .�at /tmp/qeHo1Gd73…»
14:21 Ven m: my &s = sub { 5 }; s.set_name('foo'); say foo();
14:21 camelia rakudo-moar d2dfb6: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex metacharacter ; (must be quoted to match literally)�at /tmp/pTmHBDsbK_:1�------> [32mmy &s = sub { 5 }; s.set_name('foo')[33m�[31m; say foo();[0m�Couldn't find terminator .�at /tmp/pTmHBDsbK…»
14:22 timotimo hehe
14:22 timotimo calling things "s" is problematic :P
14:22 timotimo the problem is, that set_name will not cause the package that used to contain it to change
14:23 timotimo you'll still need to have a custom sub EXPORT to assign the things
14:23 timotimo that would be much more convenient for you in any case
14:23 Ven m: my &bazbar = sub { 5 }; bazbar.set_name('foo'); say foo();
14:23 camelia rakudo-moar d2dfb6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/OyhJcAAwEgâ�¤Undeclared routine:â�¤    foo used at line 1â�¤â�¤Â»
14:23 Ven didn't read, my bad
14:24 donaldh joined #perl6
14:25 timotimo m: my &bazbar = sub { 5 }; &bazbar.set_name('foo'); say &bazbar.name
14:25 camelia rakudo-moar d2dfb6: OUTPUT«foo␤»
14:25 timotimo you also forgot an & there
14:25 timotimo bazbar.set_name('foo') would have tried to call set_name on 5
14:25 benabik joined #perl6
14:26 rurban joined #perl6
14:27 Ven m: my &bazbar = sub { 5 }; &bazbar.set_name('foo'); say foo();
14:27 camelia rakudo-moar d2dfb6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Ds6EnkO5lkâ�¤Undeclared routine:â�¤    foo used at line 1â�¤â�¤Â»
14:27 Ven timotimo: seems to be the same
14:27 timotimo well, yeah
14:27 timotimo these things operate on different levels
14:27 timotimo you can't expect set_name (run time) to change the lookup of foo (compile time)
14:27 thou joined #perl6
14:27 retupmoca m: our &foo is export = sub { 42 }; say foo(); # just set the name to begin with?
14:27 camelia rakudo-moar d2dfb6: OUTPUT«42␤»
14:30 retupmoca oh wait, I see what you're doing - nevermind
14:30 timotimo retupmoca: and now do that with a "foo" that is not known at compile time :)
14:30 timotimo yeah
14:30 timotimo Ven: as i said, sub EXPORT will give you exactly the flexibility you're going to need
14:30 timotimo also, i don't think EVAL would let you modify the package either
14:40 cognominal joined #perl6
14:41 Ven timotimo: I'd rather not do a project than using EVAL - that's to say how much I hate it !
14:44 Ven (A side-project of course ...)
14:44 timotimo yeah
14:44 timotimo hence the tip to use sub EXPORT.
14:44 timotimo it seems to me you've been ignoring that hint :P
14:49 timotimo so, please acknowledge it? or ask me how exactly it works?
14:54 Exodist joined #perl6
14:58 Ven timotimo: I'm doing some IRL stuff too, and since I know if I plan to find something in the "docs" it'll take me 3 hours, I'm not going through that yet :)
14:59 timotimo oh
15:00 Ven (unless you have a doc to point me to, since synsearch doesn't yield anything)
15:01 timotimo just put an "our sub EXPORT" in your module (actually ... at some point it actually had to be outside the package, but inside the compunit) and take a slurpy argument list and return a hash (or pseudostash)
15:02 timotimo when your compunit gets pulled in with "use", it'll pass over the arguments from the use line to the export sub and incorporate everything the export sub returns into its namespace
15:02 Alina-malina joined #perl6
15:03 Ven timotimo: our sub EXPORT { my @tags = <html head body title h1>; (do for @tags { $_ => create-tag($_) }).hash  }; ?
15:03 timotimo something like that should work
15:04 Ven m: sub foo($x) { $x x 5; }; my @tags = 'a'..'f'; say (@tags Z=> foo).perl;
15:04 camelia rakudo-moar d2dfb6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/WwRAK9Wvc7â�¤Calling 'foo' requires arguments (if you meant to operate on $_, please use .foo or use an explicit invocant or argument)â�¤    Expected: :(Any $x)â�¤at /tmp/WwRAK9Wvc7:1â�¤------> [32…»
15:04 Ven m: sub foo($x) { $x x 5; }; my @tags = 'a'..'f'; say (@tags Z=> @tags>>&foo).perl;
15:04 camelia rakudo-moar d2dfb6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/9QVSVq9Ardâ�¤Missing << or >>â�¤at /tmp/9QVSVq9Ard:1â�¤------> [32mtags = 'a'..'f'; say (@tags Z=> @tags>>&[33mâ��[31mfoo).perl;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stop…»
15:04 Ven m: sub foo($x) { $x x 5; }; my @tags = 'a'..'f'; say (@tags Z=> @tags>>.&foo).perl;
15:04 camelia rakudo-moar d2dfb6: OUTPUT«("a" => "aaaaa", "b" => "bbbbb", "c" => "ccccc", "d" => "ddddd", "e" => "eeeee", "f" => "fffff").list␤»
15:05 Ven p6++
15:05 Ven is there a module which contains the list of HTML tags?
15:06 Ven timotimo: https://gist.github.com/Nami-Doc/15ac60bb18fb1914ba04 whew. I got it.
15:06 thou joined #perl6
15:07 FROGGS joined #perl6
15:07 Ven m: sub are-if-statements-or-expressions { return if True { 1 } else { 0 } }
15:07 camelia rakudo-moar d2dfb6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/rvV1WM9wrt�Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?)�at /tmp/rvV1WM9wrt:1�------> [32mtements-or-expressions { return if True [33m�…»
15:07 Ven m: sub are-if-statements-or-expressions { return (if True { 1 } else { 0 }) }
15:07 camelia rakudo-moar d2dfb6: ( no output )
15:07 PerlJam joined #perl6
15:07 Ven alrighty. that's cool.
15:08 timotimo you can put a "do" in front instead of parenthesis around
15:09 timotimo btw:
15:09 timotimo r: say <a href="http://google.com/">
15:09 camelia rakudo-{parrot,jvm,moar} d2dfb6: OUTPUT«a href="http://google.com/"␤»
15:09 timotimo %)
15:09 Ven timotimo: ha !
15:10 Ven timotimo: and yeah, I should know better, I use `do for` in several places
15:10 timotimo r: say <a href="http://google.com/"\> what is this sorcery </a>.perl
15:10 camelia rakudo-{parrot,jvm,moar} d2dfb6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Unable to parse expression in quote words; couldn't find final '>'â�¤        â�¤at /tmp/tmpfile:1â�¤------> [32me.com/"\> what is this sorcery </a>.perl[33mâ��[31m<EOL>[0m…»
15:10 timotimo aaw
15:10 timotimo r: say <a href="http://google.com/"\> what is this sorcery \</a>.perl
15:11 camelia rakudo-{parrot,jvm,moar} d2dfb6: OUTPUT«("a", "href=\"http://google.com/\">", "what", "is", "this", "sorcery", "</a")␤»
15:11 FROGGS r: say <body><blink>WAT</blink></body> # synopsebot is funny :o)
15:11 camelia rakudo-{parrot,jvm,moar} d2dfb6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Two terms in a rowâ�¤at /tmp/tmpfile:1â�¤------> [32msay <body><blink>[33mâ��[31mWAT</blink></body> # synopsebot is funny[0mâ�¤    expecting any of:â�¤        postfixâ�¤  â€¦Â»
15:11 FROGGS m: say <body><blink>WAT</blink></body> # synopsebot is funny :o)
15:11 camelia rakudo-moar d2dfb6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/RV5UlKDWMPâ�¤Two terms in a rowâ�¤at /tmp/RV5UlKDWMP:1â�¤------> [32msay <body><blink>[33mâ��[31mWAT</blink></body> # synopsebot is funny[0mâ�¤    expecting any of:â�¤        postfixâ�¤        i…»
15:11 timotimo ?
15:11 FROGGS m: say <body><blink>WAT</blink></body>
15:11 camelia rakudo-moar d2dfb6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/9HZOGTgjoqâ�¤Two terms in a rowâ�¤at /tmp/9HZOGTgjoq:1â�¤------> [32msay <body><blink>[33mâ��[31mWAT</blink></body>[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤       …»
15:11 FROGGS damn
15:11 FROGGS see #moarvm
15:11 FROGGS I pasted there instead of privmsging camelia
15:11 timotimo yeah, depends on the filename
15:12 FROGGS seems I am confused too -.-
15:12 Ven FROGGS: it just works in timotimo++'s case because of <words syntax>, y'know :P ?
15:13 FROGGS Ven: yes, sure :o)
15:14 FROGGS m: say <blink>..</blink>
15:14 camelia rakudo-moar d2dfb6: OUTPUT«"blink".."/blink"␤»
15:14 FROGGS m: say <blink>...</blink>
15:14 camelia rakudo-moar d2dfb6: OUTPUT«(timeout)»
15:14 FROGGS ahh, now I know why it times out
15:16 timotimo %)
15:16 timotimo this is pretty terrible.
15:18 * Ven doesn't know why
15:19 timotimo r: class List { method new(*@foo) { say "created a list with @foo[]" } }; <a href="test">;
15:19 camelia rakudo-{parrot,jvm,moar} d2dfb6: ( no output )
15:20 timotimo r: say <a href="test">.WHAT
15:20 camelia rakudo-{parrot,jvm,moar} d2dfb6: OUTPUT«(Parcel)␤»
15:20 timotimo r: class Parcel { method new(*@foo) { say "created a list with @foo[]" } }; <a href="test">;
15:20 camelia rakudo-{parrot,jvm,moar} d2dfb6: ( no output )
15:20 timotimo not quite doable apparently
15:20 Alina-malina joined #perl6
15:21 atroxaper joined #perl6
15:23 salv0 joined #perl6
15:27 kurahaupo joined #perl6
15:29 hoelzro morning #perl6
15:30 hoelzro did I hear that all of the star modules test ok on mokudo now? =)
15:32 treehug88 joined #perl6
15:32 tadzik yup :)
15:37 hoverboard joined #perl6
15:38 TimToady Ven: True always indicates a successful smartmatch, so you'd have to write that signature (Bool where .so) or some such
15:39 Ven TimToady: I know. I just find it very weird
15:39 Ven `given $bool { when True {}; when False {} }` definitely doesn't DWIM
15:40 TimToady yes, but at least that usually warns
15:40 TimToady std: given my $bool { when True {}; when False {} }
15:40 camelia std ec3d853: OUTPUT«Potential difficulties:â�¤  Smartmatch against True always matches; perhaps you should use :so or *.so or ?* instead at /tmp/O5JUDDkAsK line 1:â�¤------> [32mgiven my $bool { when [33mâ��[31mTrue {}; when False {} }[0mâ�¤  Smartmatch against False always fail…»
15:40 TimToady or is supposed to
15:40 TimToady std: sub foo (True) {}
15:40 camelia std ec3d853: OUTPUT«ok 00:01 125m␤»
15:40 TimToady probably should there too
15:42 TimToady but smartmatches wouldn't be very smart if they couldn't use booleans to return success
15:45 masak Ven: we basically need it for file tests et al.
15:45 masak er, etc.*
15:45 atroxaper joined #perl6
15:46 SamuraiJack joined #perl6
15:46 TimToady as for interpolating things that look like $foo</a>, it's not clear how much we should pander to other languages' syntactic foibles
15:46 TimToady how long will tag syntax last?  probably a good while yet, so might be worth dwimming that one
15:47 TimToady and the wat is unlikely, and easy to work around
15:47 masak (or issuing a "probably not what you meant" warning)
15:48 SamuraiJack_ joined #perl6
15:48 TimToady that's also a valid approach
15:48 TimToady std: sub ($) {}
15:49 camelia std ec3d853: OUTPUT«ok 00:01 125m␤»
15:49 TimToady m: sub ($) {}
15:49 camelia rakudo-moar d2dfb6: ( no output )
15:52 Vlavv joined #perl6
15:53 Ven TimToady: I just think {} isn't so bad you want to try and recognize everything inside quotes
15:53 * Ven would even be okay for #{{}
15:55 pecastro joined #perl6
15:55 TimToady qc// will recognize *only* {}
15:55 timotimo TimToady: you're suggesting $foo</bar> would not be interpreted as accessing the key "/bar" in $foo, because that looks like a tag?
15:55 Ven qc//++ then.
15:56 TimToady timotimo: that, or what masak++ suggests
15:56 Ven m: qc/<a href="/">hey</a>/;
15:56 camelia rakudo-moar d2dfb6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/iRR40isthiâ�¤Two terms in a rowâ�¤at /tmp/iRR40isthi:1â�¤------> [32mqc/<a href="/[33mâ��[31m">hey</a>/;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤        infix or m…»
15:56 Ven m: qc//<a href="/">hey</a>//;
15:56 camelia rakudo-moar d2dfb6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/OHGYxz5hWMâ�¤Two terms in a rowâ�¤at /tmp/OHGYxz5hWM:1â�¤------> [32mqc//<a href="/">[33mâ��[31mhey</a>//;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤        infix or…»
15:56 Ven ^ that's what I'm wary of
15:56 TimToady you can't doubled // like that
15:57 Ven Too bad :p
15:57 TimToady only brackets can double/triple...
15:57 flussence m: qc\<a href="/">hey</a>\;
15:57 camelia rakudo-moar d2dfb6: ( no output )
15:57 TimToady but that's a LTA error message
15:57 timotimo which was what exactly?
15:58 TimToady std: qc//<a href="/">hey</a>//
15:58 camelia std ec3d853: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a row at /tmp/rIFUOqtR2p line 1:â�¤------> [32mqc//<a href="/">[33mâ��[31mhey</a>//[0mâ�¤    expecting any of:â�¤   POSTâ�¤   feed_separatorâ�¤ infix or meta-infixâ�¤    infixed functionâ�¤       postcircumfixâ�¤  postfixâ�¤        po…»
15:58 atroxaper joined #perl6
15:58 TimToady oh, it's not a regex, so // is legal, nevermind
15:59 TimToady timotimo: masak++ was suggesting a warning rather than a dwim
15:59 Ven ah nice, flussence
15:59 treehug8_ joined #perl6
15:59 * TimToady thinks backslash is kind of bad to use for delimiters
15:59 flussence m: say 'foobar' ~~ /b/
15:59 camelia rakudo-moar d2dfb6: OUTPUT«「b」␤␤»
16:00 flussence m: qc「<a href="/">hey</a>」;
16:00 camelia rakudo-moar d2dfb6: ( no output )
16:00 * Ven thinks backslash is better than having to escape slash everytime in html
16:00 TimToady m: say qc[<a href="/">hey</a>]
16:00 camelia rakudo-moar d2dfb6: OUTPUT«<a href="/">hey</a>␤»
16:00 * flussence thinks not having to write raw html in the first place is better-er...
16:01 TimToady less worser, anyway
16:01 * Ven plans to port Jade or HAML
16:04 timotimo okay, so how do you get away from that warning? use {' '} instead of < >?
16:05 flussence .oO( I read a fascinating article a while back that made me uncomfortably aware that HTML/CSS are just as much a big ball o' mud as PHP... )
16:05 huf no duuhu
16:06 huf the web is a ghetto
16:06 masak FROGGS++ # 4a8dac6
16:06 Ven At least we ought to do our job better with HTML stuff
16:06 masak flussence: oh, and JavaScript is all pure and perfect? :P
16:07 flussence JS has font/color formatting methods on strings too, but the article didn't mention it :)
16:07 huf yeah. in comparison to browserjs, yeah.
16:07 Ven hahahahahha
16:08 Ven "hey".blink(), anyone ?
16:08 FROGGS masak: No such commit 4a8dac6 without a repository or gist reference at -e line 1 # :P
16:08 Ven (js' cool, dom is pretty bad)
16:08 FROGGS (I found the moarvm commit btw)
16:09 thou joined #perl6
16:10 Rotwang joined #perl6
16:13 timotimo r: say "foo" ~~ <baz bar foo>
16:13 camelia rakudo-{parrot,jvm,moar} d2dfb6: OUTPUT«False␤»
16:13 btyler joined #perl6
16:13 timotimo r: say "quux" ~~ <baz bar foo>
16:13 camelia rakudo-{parrot,jvm,moar} d2dfb6: OUTPUT«False␤»
16:13 timotimo sadly, "foo" eq any(@list) is rather slow in rakudo :\
16:13 timotimo seems like it's somewhat of a pattern, though
16:15 Ven timotimo: should be stopping after first occurence though
16:15 Ven what'd be the "other" way to do it ?
16:15 timotimo i don't know
16:15 FROGGS Ven: it should not stop
16:15 timotimo i thought smartmatch against a list would do it. otherwise, a set probably would do it
16:15 Ven FROGGS: in boolean context
16:16 timotimo ah, i was refering only to boolean context at this moment
16:16 FROGGS Ven: ahh, okay, that is the job of the optimizer then
16:16 timotimo r: say "foobar" ~~ set <foobar bazquux plopp>
16:16 camelia rakudo-{parrot,jvm,moar} d2dfb6: OUTPUT«False␤»
16:16 Ven FROGGS: and the optimizer should be doing it :p
16:16 timotimo hmm.
16:16 timotimo i thought about that very optimization in the past
16:17 timotimo sadly, it's not quite as easy as you might think; especially since there's some flattening involved
16:17 timotimo maybe if the @self-closing-tags were a constant ...
16:17 timotimo r: my constant @sct = <img a>; push @sct, "test"; say @sct;
16:17 camelia rakudo-moar d2dfb6: OUTPUT«Cannot call 'push'; none of these signatures match:␤:(Any:U \SELF: *@values, *%_)␤  in sub push at src/gen/m-CORE.setting:8476␤  in block  at /tmp/tmpfile:1␤␤»
16:17 camelia ..rakudo-parrot d2dfb6: OUTPUT«Cannot call 'push'; none of these signatures match:␤:(Any:U \SELF: *@values, *%_)␤  in any  at gen/parrot/BOOTSTRAP.nqp:1219␤  in method push at gen/parrot/CORE.setting:1616␤  in sub push at gen/parrot/CORE.setting:8439␤  in sub push at gen/par…»
16:17 camelia ..rakudo-jvm d2dfb6: OUTPUT«Cannot call 'push'; none of these signatures match:␤:(Any:U \SELF: *@values, *%_)␤  in any  at gen/jvm/BOOTSTRAP.nqp:1212␤  in sub push at gen/jvm/CORE.setting:8417␤  in block  at /tmp/tmpfile:1␤␤»
16:17 Ven timotimo: https://github.com/rakudo/rakudo/blob/45e2308e2ecf28c99beb948e4168efd19e34bb77/src/core/Junction.pm#L11
16:18 Ven the optimization is there
16:18 timotimo that's not the part that is slow :)
16:18 timotimo r: my constant @sct = <img a>; @sct.push("test")
16:18 camelia rakudo-moar d2dfb6: OUTPUT«Cannot call 'push'; none of these signatures match:␤:(Any:U \SELF: *@values, *%_)␤  in block  at /tmp/tmpfile:1␤␤»
16:18 camelia ..rakudo-jvm d2dfb6: OUTPUT«Cannot call 'push'; none of these signatures match:␤:(Any:U \SELF: *@values, *%_)␤  in any  at gen/jvm/BOOTSTRAP.nqp:1212␤  in block  at /tmp/tmpfile:1␤␤»
16:18 camelia ..rakudo-parrot d2dfb6: OUTPUT«Cannot call 'push'; none of these signatures match:␤:(Any:U \SELF: *@values, *%_)␤  in any  at gen/parrot/BOOTSTRAP.nqp:1219␤  in method push at gen/parrot/CORE.setting:1616␤  in block  at /tmp/tmpfile:1␤␤»
16:18 timotimo well, that's good i suppose.
16:18 timotimo the problem is that generating junction objects just to call .bool on them over and over again is very costly
16:19 timotimo and if there's an array/list involved, you have to be very careful not to break the flattening semantics it's supposed to have
16:19 Ven well, if at one point rakudo/... gets that much inlining, it'll be free
16:19 timotimo if it's a constant @foo, the compiler could constant-fold it, though, and do the compile-time unfolding of junctions it already does.
16:19 FROGGS timotimo: and it is that hard to turn an any junction into infix:<||> when .Bool is called on it?
16:19 timotimo we already do it in some cases
16:20 FROGGS timotimo: I mean, do we know that .Bool is called on it and that it is a Junction?
16:20 FROGGS ahh, cool
16:20 timotimo currently, we're only looking for | and & infixes, though
16:20 timotimo the method form has the problem that it may be doing some kind of flattening
16:20 Ven but the same worry applies to all of a codebase self-hosted, I think ..
16:26 anaeem1 joined #perl6
16:31 Alina-malina joined #perl6
16:32 logie_ joined #perl6
16:32 tadzik oh, gpw talks online
16:32 colomon what does gpw say?
16:35 tadzik :D
16:43 treehug88 joined #perl6
16:44 dalek rakudo-star-daily: f1935e1 | coke++ | log/ (5 files):
16:44 dalek rakudo-star-daily: today (automated commit)
16:44 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/f1935e106a
16:44 dalek rakudo-star-daily: 77bd29e | coke++ | log/ (5 files):
16:44 dalek rakudo-star-daily: today (automated commit)
16:44 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/77bd29e00c
16:45 dalek perl6-roast-data: bc216c0 | coke++ | / (6 files):
16:45 dalek perl6-roast-data: today (automated commit)
16:45 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/bc216c0195
16:45 dalek perl6-roast-data: f86eabc | coke++ | / (6 files):
16:45 dalek perl6-roast-data: today (automated commit)
16:45 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/f86eabcf2b
16:58 [Coke] $ ./perl6
16:58 [Coke] Error occurred during initialization of VM
16:58 [Coke] Could not reserve enough space for the card marking array
16:58 [Coke] whoops.
16:59 timotimo one of the gpw14 lightning talks ended in "use python, ruby or java if you want to have something that supports ipv6"
16:59 timotimo let's be massively better than perl5 in this regard
17:04 atroxaper joined #perl6
17:05 anaeem1 joined #perl6
17:08 treehug8_ joined #perl6
17:08 treehug88 joined #perl6
17:15 anaeem1_ joined #perl6
17:17 dmol joined #perl6
17:20 hoverboard joined #perl6
17:26 kaleem joined #perl6
17:26 guru joined #perl6
17:29 [Coke] fixed java build issue. (runner didn't have enough memory to even launch ./perl6)
17:30 [Coke] may try to re-push today's commit once this java run finishes.
17:31 [Coke] s/build/daily roast/
17:39 denis_boyun_ joined #perl6
17:55 ponbiki ol
17:56 a3gis joined #perl6
18:03 benabik joined #perl6
18:06 segomos how do i get the line numbers causing warnings in perl6?
18:08 moritz segomos: you mean, programmatically?
18:08 moritz r: say 42 + Any
18:08 a3gis joined #perl6
18:08 camelia rakudo-{jvm,moar} d2dfb6: OUTPUT«use of uninitialized value of type Any in numeric context␤42␤»
18:08 camelia ..rakudo-parrot d2dfb6: OUTPUT«use of uninitialized value of type Any in numeric context  in block  at /tmp/tmpfile:1␤␤42␤»
18:09 moritz you use rakudo-p :-)
18:10 segomos moritz: nah, is there a way to get more verbose just through 'perl6' flags?
18:10 moritz segomos: no
18:11 FROGGS at least not for warnings
18:11 moritz segomos: but you can catch the exception, and inspect $!.backtrace
18:11 segomos try {} will catch warns?
18:11 segomos i'll read about it :)
18:12 moritz [Coke]: could you please add http://brrt-to-the-future.blogspot.nl/ to the http://planeteria.org/perl6/ feed? kthxbye
18:12 segomos once i'm done making this thing turn poorly formed html into xml
18:12 kurahaupo joined #perl6
18:12 moritz segomos: nah, you need CONROL blocks to catch warnings
18:27 nwc10 is jnthn still on a Ferry? :-/
18:29 rurban joined #perl6
18:37 raiph joined #perl6
18:38 tadzik aargh
18:38 tadzik I want MooseX::Strictconstructor for P6
18:38 tadzik REWARD
18:39 colomon seems like it ought to be easy to write…
18:40 nwc10 "REWARD" is how many hugs?
18:41 Sqirrel joined #perl6
18:41 tadzik at least 5
18:42 tadzik "what's wrong? My C library? My spritesheets? My makefiles? My animation engine? My renderer? Oh, no, I just changed variable names in one less place that I should have"
18:43 masak :/
18:47 colomon tadzik: you still game programming in p6?  :)
18:47 tadzik colomon: you bet :)
18:47 tadzik I have spritesheets and animations going
18:52 * colomon is now peering at Mu.BUILDALL, trying to see how it works....
18:53 segomos tadzik: damn..thought i was going hard in p6 with stuff like html to xml parsers and web scrapin
18:54 raiph joined #perl6
18:54 tadzik segomos: oh, it's easier than it sounds
18:54 tadzik and sometimes harder than it sounds :)
18:55 moritz XML? HTML? that's just text :-)
18:55 FROGGS tadzik: especially when it comes to sounds :o)
18:55 tadzik today I learned that for proper collision detection I'm gonna need self-balancing binary, or bi-binary trees
18:55 FROGGS tadzik: do yourself a flavor and do bindings to Box2d
18:55 tadzik FROGGS: bah, and miss all the fun?
18:56 tadzik but yeah, I may do that and some point :
18:56 tadzik :)
18:56 FROGGS tadzik: Box2D does it properly, that is the point :o)
18:56 segomos moritz: lol.. i received markup from a client that had several iterations of: <td/>some crap</td>
18:56 tadzik but those collision trees sounded exciting when I read about them today, now I want to implement them for the fun of it
18:56 FROGGS tadzik: then you perhaps should have a look at P5's Alien::Box2D / Box2D
18:57 moritz tadzik: so, start by writing a balanced tree data structure module?
18:57 moritz tadzik: masak++ will love you for it :-)
18:57 tadzik :) sounds like a good start
18:57 FROGGS because we made our own Makefile instead of using Box2D's cmake crap
18:57 tadzik oooh, regular makefiles :)
18:58 colomon tadzik: don't you really want quadtrees?  Or am I misunderstanding the problem?
19:00 tadzik colomon: I suppose I could maybe get away with binaries, but quadtrees would probably be best
19:01 * colomon has dreamed of implementing quadtrees for yes.  …. and will not be doing it any time soon due to insane schedule.
19:01 colomon *years
19:02 fhelmberger joined #perl6
19:04 kurahaupo joined #perl6
19:05 atroxaper joined #perl6
19:06 vendethiel m: say 1 if 1 == 1 == 1
19:06 camelia rakudo-moar d2dfb6: OUTPUT«1␤»
19:07 segomos does 1 equate to True ?
19:07 segomos m: say 1 if 1 == True
19:07 camelia rakudo-moar d2dfb6: OUTPUT«1␤»
19:07 FROGGS m: say 2 if 2 == 2 == 2
19:07 camelia rakudo-moar d2dfb6: OUTPUT«2␤»
19:07 segomos m: say 1 if 0 == 0 == 0
19:07 camelia rakudo-moar d2dfb6: OUTPUT«1␤»
19:07 segomos say 0 if 0 == True
19:07 segomos m: say 0 if 0 == True
19:07 camelia rakudo-moar d2dfb6: ( no output )
19:08 FROGGS m: say +True # segemos, that answers your question
19:08 camelia rakudo-moar d2dfb6: OUTPUT«1␤»
19:16 dalek roast: c6d9377 | (David Warring david.warring@gmail.com)++ | integration/advent2012-day13.t:
19:16 dalek roast: test ∉ ∌ ⊈ ⊄ ⊉ ⊅
19:16 dalek roast: review: https://github.com/perl6/roast/commit/c6d9377731
19:18 dalek perl6-most-wanted: b101595 | segomos++ | most-wanted/modules.md:
19:18 dalek perl6-most-wanted: added options for a TSV && CSV
19:18 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/b101595ebe
19:21 dwarring joined #perl6
19:28 dalek perl6-most-wanted: b4fa47e | segomos++ | most-wanted/modules.md:
19:28 dalek perl6-most-wanted: Added another option for parsing html -> xml
19:28 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/b4fa47e927
19:30 rurban joined #perl6
19:35 [Coke] moritz: done
19:39 moritz [Coke]++ # thanks
19:43 masak segomos: True numifies to 1. whether it *equals* 1 depends on your notion of equality :)
19:43 segomos how is 0 == 0 == 0 processed?
19:44 FROGGS yes
19:44 segomos is that not broken into True == 0 ?
19:44 FROGGS you an chain it
19:44 FROGGS can*
19:44 FROGGS m: say 1 < 3 < 5
19:44 camelia rakudo-moar d2dfb6: OUTPUT«True␤»
19:44 FROGGS m: say 1 < 6 < 5
19:44 camelia rakudo-moar d2dfb6: OUTPUT«False␤»
19:44 FROGGS m: say 8 > 4 < 5
19:44 camelia rakudo-moar d2dfb6: OUTPUT«True␤»
19:44 FROGGS m: say 8 > 6 > 5
19:44 camelia rakudo-moar d2dfb6: OUTPUT«True␤»
19:45 FROGGS m: say 8 > 6 > 7
19:45 camelia rakudo-moar d2dfb6: OUTPUT«False␤»
19:45 FROGGS see
19:45 segomos so..no more  8 > 4 && 8 < 12
19:45 FROGGS it is awesome :o)
19:45 FROGGS correct
19:45 segomos i've wanted that since the great 90s
19:46 retupmoca moritz: Could I get you to look at LWP::Simple PR #29?
19:48 colomon m: say 0 == 0 == 0
19:48 camelia rakudo-moar d2dfb6: OUTPUT«True␤»
19:50 FROGGS ohh, you asked about how...
19:51 masak m: say 0 == 0 == 0 == 0 == 0 # you would think eventually Rakudo would get tired of comparing the zeroes, going "I *told* you they're equal already!"
19:51 camelia rakudo-moar d2dfb6: OUTPUT«True␤»
19:51 FROGGS the ast is like:
19:51 FROGGS - QAST::Op(call &say) say 0 == 0 == 0
19:51 FROGGS - QAST::Op(chain &infix:<==>) ==
19:51 FROGGS - QAST::Op(chain &infix:<==>) ==
19:51 moritz retupmoca: I have looked, but I don't really understand what's going on
19:51 FROGGS the inner == gets two elems, and the outer the gets the chained thing and another elem
19:52 rurban joined #perl6
19:52 FROGGS in nqp is a very nice bit of code that is responsible for the chaining
19:53 vendethiel nqp++ # being nice to code
19:53 * colomon hadn't realized that == chained, but is glad that it does
19:53 FROGGS I think you can see which infix can do that by looking in the Perl6::Grammar
19:53 retupmoca moritz: if the end of the socket read buffer happens to end within the first byte or two of the next chunk header, the chunked-response parsing fails
19:54 FROGGS there is a chainy attribute me thinks
19:54 retupmoca moritz: (was causing random/rare test failures for me)
20:13 labster joined #perl6
20:27 rindolf joined #perl6
20:29 Sqirrel_ joined #perl6
20:34 Sqirrel joined #perl6
20:38 retupmoca moritz++ # PR merge
20:38 BenGoldberg joined #perl6
20:45 lue r: say <A B C> (-) <A C>
20:45 camelia rakudo-{parrot,jvm,moar} d2dfb6: OUTPUT«set(B)␤»
20:46 lue ^ I know it's not .perl, but should strings really be unquoted like that in the output?
20:48 FROGGS lue: you got a Set bag, so .gist shows you that
20:48 FROGGS r: print <A B C> (-) <A C>
20:48 camelia rakudo-{parrot,jvm,moar} d2dfb6: OUTPUT«B»
20:48 FROGGS s/bag/back/
20:49 lue yeah, I'm just not sure about output that looks an awful lot like code not quoting strings
20:49 FROGGS .gist should show you (as a human) what is going on
20:49 FROGGS and I think it does it in this case
20:50 lue FROGGS: I realize that, but I still don't like how strings are unquoted. It looks like code, so it seems tempting to use it as such.
20:51 FROGGS hmmmm
20:51 lue r: say set(1,2,3); # it even *is* code!
20:51 camelia rakudo-jvm d2dfb6: OUTPUT«set(2, 1, 3)␤»
20:51 camelia ..rakudo-{parrot,moar} d2dfb6: OUTPUT«set(1, 2, 3)␤»
20:51 FROGGS m: say lines.words
20:51 camelia rakudo-moar d2dfb6: OUTPUT«No such method 'words' for invocant of type 'List'␤  in block  at /tmp/XwAN0jMazR:1␤␤»
20:51 FROGGS m: say lines>>.words
20:52 camelia rakudo-moar d2dfb6: OUTPUT«(signal )»
20:52 FROGGS gah+
20:52 FROGGS m: say lines[0].words
20:52 camelia rakudo-moar d2dfb6: OUTPUT«There were three men came out of the West␤»
20:52 FROGGS there are no quotes either
20:52 lue yes, but nothing about that seems like code :)
20:52 FROGGS bah
20:52 FROGGS :P
20:53 lue (I'd prefer something kinda like Match objects, in that they need to convey extra information about themselves, but use corner quotes and generally not-code to do it. I suppose that's not easy to devise for Set though)
20:53 BenGoldberg r: say lines.WHAT
20:53 camelia rakudo-{parrot,jvm,moar} d2dfb6: OUTPUT«(List)␤»
20:56 colomon m: say lines.map(*.words)
20:56 camelia rakudo-moar d2dfb6: OUTPUT«(timeout)»
20:56 colomon m: say lines
20:56 BenGoldberg Lines is infinite-ish.
20:56 camelia rakudo-moar d2dfb6: OUTPUT«(timeout)»
20:57 BenGoldberg m: say .chars for lines
20:57 camelia rakudo-moar d2dfb6: OUTPUT«(signal )41␤25␤37␤24␤0␤55␤26␤37␤24␤0␤40␤35␤38␤22␤0␤42␤32␤46␤19␤0␤43␤26␤42␤28␤0␤43␤28␤48␤30␤0␤47␤26␤33␤23␤0␤43␤25␤48␤38␤0␤42␤28␤42␤32␤0␤35␤30␤43␤27␤0␤0␤0…»
20:57 BenGoldberg jp: say .chars for lines
20:58 colomon BenGoldberg: how is that possible?
20:58 * colomon doesn't think there are that many lines to "John Barleycorn"
20:58 raydiak it loops, I'd assume
20:58 BenGoldberg For some reason, when it reaches the end-of-file, it's just producing empty strings, instead of ending the list.
20:59 colomon p: say lines.map(*.words)
20:59 camelia rakudo-parrot d2dfb6: OUTPUT«There were three men came out of the West Their fortunes for to try And these three men made a solemn vow John Barleycorn must die They've ploughed, they've sewn, they've harrowed him in Threw clouds upon his head And these three men made a solemn vow Jo…»
20:59 colomon oh, so moarbug
20:59 BenGoldberg p: say .chars for lines
20:59 camelia rakudo-parrot d2dfb6: OUTPUT«41␤25␤37␤24␤0␤55␤26␤37␤24␤0␤40␤35␤38␤22␤0␤42␤32␤46␤19␤0␤43␤26␤42␤28␤0␤43␤28␤48␤30␤0␤47␤26␤33␤23␤0␤43␤25␤48␤38␤0␤42␤28␤42␤32␤0␤35␤30␤43␤27␤»
20:59 BenGoldberg j: say .chars for lines
20:59 camelia rakudo-jvm d2dfb6: ( no output )
21:00 * BenGoldberg headscratches
21:00 vendethiel r-j is a bit... funny.
21:01 BenGoldberg Funny haha, or funny uh oh?
21:01 vendethiel funny WAT
21:01 BenGoldberg :)
21:01 * BenGoldberg ponders a programming language with -Ohumor
21:03 avuserow thanks for adding me to the perl6 org, moritz++
21:03 avuserow (sadly I'm at work when most others are hacking here)
21:14 nebuchadnezzar joined #perl6
21:18 dayangkun joined #perl6
21:20 myfree joined #perl6
21:21 myfree left #perl6
21:25 kurahaupo_mobile joined #perl6
21:56 go|dfish joined #perl6
22:20 d4l3k_ joined #perl6
22:41 pochi joined #perl6
22:47 atroxaper joined #perl6
23:05 xenoterracide_ joined #perl6
23:08 lizmat .tell nwc10 jnthn and I found the problem that caused t/spec/S17-concurrency/promise.t to fail
23:08 yoleaux lizmat: I'll pass your message to nwc10.
23:09 lizmat .tell nwc10 the fix is going to need some thought in ThreadPoolScheduler
23:09 yoleaux lizmat: I'll pass your message to nwc10.
23:22 anaeem1 joined #perl6
23:24 rurban joined #perl6
23:28 Juerd joined #perl6
23:40 bjz joined #perl6
23:51 benabik joined #perl6
23:52 synopsebot joined #perl6
23:52 Util joined #perl6
23:52 [Coke] joined #perl6
23:54 Juerd joined #perl6

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

Perl 6 | Reference Documentation | Rakudo