»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by sorear on 25 June 2013. |
|||
00:04
hoverboard left
00:10
salv0 left
00:13
logie_ joined,
rurban joined
00:18
rurban left
00:20
dayangkun joined
00:27
salv0 joined
00:28
logie_ left
00:29
gdey_ left
00:40
kbaker joined
00:51
ivan`` joined
|
|||
TimToady | rosettacode.org/wiki/Handle_a_signal#Perl_6 :-) | 00:58 | |
01:03
klapperl_ joined
01:06
klapperl left
01:12
logie_ joined
01:14
rurban joined,
btyler joined
01:18
gdey joined
01:19
rurban left
01:24
logie_ left
01:28
Sqirrel left
01:29
Sqirrel joined
01:33
gdey left
01:39
rurban joined
01:43
atroxaper joined
01:49
atroxaper left
01:50
hoverboard joined
|
|||
timotimo | apparently not sleeping :| | 01:51 | |
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:52 | ||
01:54
atroxaper joined
|
|||
timotimo | i don't actually know if there's an operation to turn a lazy list into a supply | 02:02 | |
02:05
atroxaper left
02:08
WJB joined
02:17
Alula_ left
02:18
Alula_ joined
02:25
kbaker left
02:26
gdey joined,
gdey left
|
|||
avuserow | r: say Buf.new eq "" | 02:31 | |
camelia | rakudo-{jvm,moar} cc017e: OUTPUT«(timeout)» | 02:32 | |
..rakudo-parrot cc017e: OUTPUT«maximum recursion depth exceededcurrent 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…» | |||
avuserow | n: say Buf.new eq "" | 02:33 | |
camelia | niecza v24-109-g48a8de3: OUTPUT«False» | ||
timotimo | Buf.new.Stringy returns a buf | 02:34 | |
so eq trying to coerce Buf into a str and call eq on the result will call the very same eq candidate | |||
yeah, the Stringy method of Buf just returns self | 02:35 | ||
02:35
xragnar_ joined,
xragnar left,
xragnar_ is now known as xragnar
|
|||
timotimo | though technically ... a Buf is Stringy already, because it "does Stringy" | 02:35 | |
hrm. | |||
avuserow | thanks for looking at it timotimo++ :) | 02:36 | |
I don't need that to work, I just accidentally hit it with Test's "is" function | |||
timotimo | what's the right solution then? :\ | ||
it could give the same error as this: | 02:37 | ||
r: say Buf.new(25, 26, 27, 28).Str | |||
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» | ||
..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» | |||
..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» | |||
avuserow | m: say Buf.new eq Buf.new # is this also bad? | ||
camelia | rakudo-moar cc017e: OUTPUT«True» | ||
avuserow | huh. | ||
02:38
Sqirrel left
|
|||
BenGoldberg | I think you have to call .decode(something) to turn a Buf into a Str | 02:38 | |
timotimo | oh | ||
Buf.pm also defines eq for Buf to B\= | |||
Buf* | |||
avuserow | yeah, that makes sense, cause that's similar to comparing arrays | 02:39 | |
so yeah maybe comparing Bufs and most things with eq is wrong... | 02:40 | ||
timotimo | okay, so a Buf + Any and an Any + Buf eq candidate may be acceptable | 02:41 | |
just to throw an exception rather than infinilooping on coercion | 02:42 | ||
avuserow | sounds good to me | ||
02:47
BenGoldberg left
02:48
raiph left
|
|||
timotimo | if you want to, you can patch it and propose it as a pull request :) | 02:49 | |
i'd like to get comments from people "higher up" before merging it, though | |||
02:50
thou left
|
|||
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) | ||
02:58
WJB left
03:12
raiph joined
03:22
SamuraiJack_ joined
|
|||
lue | (The best solution would be to not declare Buf as doing Stringy ...) | 03:37 | |
03:40
cxreg joined
03:43
kaare_ joined
03:54
btyler left,
thou joined
03:58
slavik joined
03:59
thou left
04:03
todell is now known as segomos,
segomos left,
segomos joined
04:11
plobsing joined
|
|||
segomos | i dunno i can't remember ever missing or wanting autocomplete | 04:16 | |
04:18
anaeem1_ joined
04:23
anaeem___ joined
04:27
anaeem1_ left
04:31
wbill joined
|
|||
dalek | osystem: 0bfe389 | segomos++ | META.list: Update META.list |
04:32 | |
moritz | m: say 42 | 04:34 | |
camelia | rakudo-moar cc017e: OUTPUT«42» | ||
04:34
Psyche^ left
|
|||
segomos | m: 42.say | 04:34 | |
camelia | rakudo-moar cc017e: OUTPUT«42» | ||
moritz was just interested in the rakudo revision | |||
04:36
Psyche^ joined
|
|||
raiph | m: say 42.WHY # to entertain segomos | 04:38 | |
camelia | rakudo-moar cc017e: OUTPUT«Life, the Universe and Everything» | ||
04:38
kaare_ left
|
|||
segomos | lol, nice | 04:38 | |
i'm enjoying the shit out of perl6, just an fyi for you folks developing it | 04:39 | ||
04:48
woosley left
|
|||
avuserow | segomos++ # adding more modules | 04:48 | |
raiph | segomos: you've done more p6 dev than i have :) | ||
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:52 | |
raiph | just started a grammar to parse www.cpan.org/MIRRORED.BY | 04:53 | |
04:58
xenoterracide_ left
|
|||
segomos | what should it produce? i've been playing around a lot with grammars | 04:58 | |
raiph | Just a simple parse tree would do as a start | 04:59 | |
m: grammar G { rule TOP { <foo>* }; rule foo { \N* \n }; }; say G.parse("xxx\nyyy\n") | |||
camelia | rakudo-moar cc017e: OUTPUT«(Any)» | ||
segomos | what is it for? | 05:00 | |
raiph | FROGGS needs to pull something out of it for his CPAN integration work | 05:03 | |
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:05 | ||
05:06
woosley joined
|
|||
raiph | segomos: why do I get the (Any) response to the evalbot line I just did above? | 05:07 | |
05:07
woosley left
|
|||
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,
woosley left
|
|||
raiph | m: say Grammar.WHAT | 05:12 | |
camelia | rakudo-moar cc017e: OUTPUT«(Grammar)» | ||
avuserow | "say G.parse("xxx\nyyy\n").say" ? | ||
raiph | m: say Any | ||
camelia | rakudo-moar cc017e: OUTPUT«(Any)» | ||
05:13
kaare_ joined
|
|||
segomos | it returns Any because it doesn't parse | 05:13 | |
m:grammar G { rule TOP { <foo>* }; regex foo { <data> \n }; regex data { \N* }; }; say G.parse("xxx\nyyy\n").say | 05:14 | ||
m: grammar G { rule TOP { <foo>* }; regex foo { <data> \n }; regex data { \N* }; }; say G.parse("xxx\nyyy\n").say | |||
camelia | rakudo-moar cc017e: OUTPUT«「xxxyyy」 foo => 「xxx」 data => 「xxx」 foo => 「yyy」 data => 「yyy」True» | ||
raiph | segomos: thanks. why does regex work and not rule? isn't the difference that rule does backtracking and sigspace? | 05:17 | |
05:19
wbill left,
denis_boyun_ joined
|
|||
segomos | i believe, but am probably wrong, that doing <data> \n requires look ahead | 05:20 | |
05:20
woosley joined
|
|||
raiph | huh. looks like i got it the wrong way round -- its regex that backtracks, which is obvious in retrospect | 05:22 | |
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 | ||
and eat the newline, so \n can' tmatch | |||
segomos | TimToady++ | ||
05:23
woosley left
|
|||
TimToady | rule foo { <data>\n } would work | 05:23 | |
(as long as you don't also make data a rule) | 05:24 | ||
segomos | indeed it does | ||
TimToady | in which case teh space after \N* would also eat <ws> | ||
raiph | TimToady++, segomos++ # thanks | 05:25 | |
segomos | raiph: use Grammar::Trace..it has helped me quite a bit | 05:26 | |
05:26
xinming__ joined
|
|||
segomos | grammar::Tracer | 05:26 | |
raiph | I tried both that and the full debugger; tools can help but can't stop me being me :) | 05:27 | |
05:29
xinming_ left
05:32
darutoko joined
05:35
xinming_ joined
05:37
xinming__ left
05:43
thou joined
05:47
SHODAN left,
thou left
05:49
SHODAN joined
05:52
btyler joined
05:54
rurban left
05:55
btyler left,
xinming__ joined
05:58
xinming_ left
06:05
kaleem joined
06:08
denis_boyun_ left,
IllvilJa left
06:15
xinming__ left
06:16
xinming_ joined,
IllvilJa joined
06:21
hummeleB1 joined
|
|||
sergot | morning o/ | 06:39 | |
masak | morning, sergot, #perl6 | 06:46 | |
06:47
denis_boyun_ joined
06:48
cooper joined
|
|||
sergot | hi masak :) | 06:48 | |
06:59
FROGGS joined
|
|||
moritz | \o | 07:03 | |
07:05
hummeleB1 left
|
|||
dalek | osystem: b4a9da0 | Adrian++ | META.list: Add Compress::Snappy |
07:05 | |
osystem: 9a272fa | moritz++ | META.list: Merge pull request #29 from avuserow/patch-2 Add Compress::Snappy |
|||
07:05
hummeleB1 joined,
zakharyas joined
|
|||
FROGGS | morning | 07:08 | |
07:10
hummeleB1 left,
hummeleB1 joined
07:11
denis_boyun_ left,
hummeleB1 left
07:13
Ven joined
|
|||
dalek | kudo/nom: 280736a | (Elizabeth Mattijsen)++ | src/core/signals.pm: Supply.merge(@s) reverts to noop on 1 Supply |
07:28 | |
07:28
dmol joined
07:31
thou joined
|
|||
lizmat | and good *, #perl6! | 07:31 | |
lizmat still feels signal() should be Supply.signal(), as it returns a Supply | 07:33 | ||
07:35
sqirrel joined,
thou left
|
|||
Ven | o/, lizmat | 07:37 | |
dalek | kudo/nom: 383ba3b | (Elizabeth Mattijsen)++ | src/core/signals.pm: Further simplification of signal() |
||
arnsholt | o/ | 07:38 | |
07:48
fhelmberger joined
07:51
kivutar joined,
hoverboard left
|
|||
jnthn | lizmat: And file watchers too? And sockets? And async file operations? | 07:52 | |
Just because something returns a Supply doesn't mean it should have a method in Supply... | |||
dir returns a list of files, but we don't write List.dir :) | 07:53 | ||
07:53
btyler joined
|
|||
Ven | [\op] gets a lazy reduction ? nice | 07:56 | |
FROGGS | fwiw, I do not really like constructor methods other than .new | ||
because these usually do not mix well with methods that are not constructors | 07:57 | ||
in SDL (P5 module) we ended up with ->from_surface or ->video_surface which kinda implies being a constructor | 07:58 | ||
but only kinda | |||
07:58
btyler left
|
|||
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:02 | |
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» | ||
Ven | m: my @a = (0..5).roll(5) xx 5; say @a[*] eqv @a; | 08:05 | |
camelia | rakudo-moar cc017e: OUTPUT«False» | ||
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:06 | |
lizmat | jnthn: fair enough :-) | 08:10 | |
08:10
rindolf joined
|
|||
lizmat | (wrt to signal not being in Supply) | 08:11 | |
Ven | m: sub a($a, $b) { say $a.perl ~ $b.perl; }; say 5.&a(5); | 08:12 | |
camelia | rakudo-moar cc017e: OUTPUT«55True» | ||
Ven | m: sub a($a, $b) { say $a.perl ~ $b.perl; }; say 5.&a('fo'); # ;_; | ||
camelia | rakudo-moar cc017e: OUTPUT«5"fo"True» | ||
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. | ||
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 | ||
how would you take off the onlystar flag? | |||
jnthn | It's just an attribute declared in Routine iirc | 08:16 | |
So I think you'd just bindattr_i it. | |||
lizmat | ok, will check | ||
Ven | (not sure what's going on with @a VS @a[] vs @a[*]) | 08:18 | |
08:19
atroxaper joined
|
|||
nwc10 | jnthn: t/spec/S17-concurrency/promise.t failed test 64 for me when run in parralel | 08:26 | |
ok 64 - got the right order | 08:27 | ||
twice now when running on its own | |||
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 | ||
nwc10 | more accurately, while it passes, do it again | ||
jnthn | lizmat: I've never actually been able to observe that happen. | ||
lizmat | nwc10: you're on OSX as well, right? | 08:29 | |
nwc10 | that's C<my> machine. | ||
most real work is done by C<"my"> machine | |||
and many of those are Linux | |||
jnthn | I wonder if it's that under pthreads, join can return spuriously? | 08:30 | |
nwc10 | and this "my" machine is linux | ||
lizmat | afk for a few hours& | ||
nwc10 | not ok 64 - got the right order | 08:31 | |
# got: '1 0 2 3 4 5 6 7 8 9' | |||
# expected: '0 1 2 3 4 5 6 7 8 9' | |||
# Looks like you failed 1 tests of 64 | |||
And, botherit, tests seem to return exit success even when they fail | |||
jnthn | The documentation doesn't suggest so | ||
08:41
denis_boyun joined
08:46
thilp joined
08:48
LLamaRider left
08:52
Ven left
09:09
spider-mario joined
09:11
daniel-s joined
09:19
thou joined,
kivutar left
09:24
thou left
|
|||
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:25 | |
synopsebot | Link: perlcabal.org/syn/S02.html#line_1064 | 09:26 | |
FROGGS | TimToady: if I had the choice I'd make * in signatures behave like $ | 09:27 | |
jnthn | FROGGS: I don't think we can make * do that in sigs... | 09:30 | |
ferry & | |||
FROGGS | hmmm | 09:31 | |
but it would fit... "Slurp one thing to nowhere" | 09:32 | ||
09:36
sqirrel left,
donaldh joined
|
|||
tadzik | FROGGS: hey, what's the status of creating moarvm fakexecutables? How far did you take the idea/ | 09:47 | |
I'm very interested in this, for the gmaes on steroids purposes | |||
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 | |
currently it needs a "-e 1" to not run the repl | |||
and, it still tries to load things like Perl6/BOOTSTRAP.moarvm and other internal modules, even when they are bundled | 09:52 | ||
tadzik | ah, I stumbled upon that BOOTSTRAP too | 09:53 | |
and it insisted on looking for it in /home/tadzik/blablaabla | |||
FROGGS | so, currently I have made branchen in MoarVM, nqp and rakudo called "execname" | 09:54 | |
and two unpushed diffs for MoarVM and rakudo | |||
tadzik: these need to applied to the execname branches gist.github.com/FROGGS/3e5bee1ef8e122c9b6fe | 09:56 | ||
in the gist you can see how the .moarvm files are embedded in the your-game.c file | 09:57 | ||
but somehow we need to trick rakudo's module loader | |||
(and disable the repl) | |||
tadzik | I see | 09:58 | |
FROGGS | brb | 10:00 | |
10:03
Ven joined
|
|||
Ven | m: say $bool = True but False; if $bool { say 'hello'; } | 10:04 | |
camelia | rakudo-moar 383ba3: OUTPUT«===SORRY!=== Error while compiling /tmp/ac6p8xKgiYVariable '$bool' is not declaredat /tmp/ac6p8xKgiY:1------> say $bool⏏ = True but False; if $bool { say 'hello expecting any of: postfix» | ||
Ven | m: my $bool = True but False; if $bool { say 'hello'; } | ||
camelia | ( no output ) | ||
masak | FROGGS: the '$' syntax was introduced way back when because '*' couldn't do that. | ||
10:07
salv0 left
10:08
dalek left,
dalek joined,
ChanServ sets mode: +v dalek
|
|||
Ven | m: say first Int, ("a", 1, 2); | 10:14 | |
camelia | rakudo-moar 383ba3: OUTPUT«1» | ||
10:15
telex left
10:16
rindolf left
10:20
salv0 joined
10:26
telex joined,
telex left
10:28
Alina-malina left,
telex joined
10:32
rindolf joined
10:44
prevost joined
10:53
eternaleye joined
10:59
rindolf left
|
|||
dalek | kudo/nom: d2dfb68 | (Elizabeth Mattijsen)++ | src/core/Routine.pm: is cached now resets the "onlystar" flag if needed So that proto's with "is cached" will not be optimized away. |
11:04 | |
lizmat | jnthn: ^^^ this doesn't regress anything, but am not sure this is what you meant | 11:05 | |
afk for another hour or so | |||
11:08
thou joined
|
|||
Ven | lizmat++ # fixing stuff I just asked | 11:08 | |
11:12
thou left
11:14
rindolf joined
11:25
atroxaper left
11:36
kurahaupo joined
|
|||
Ven | p6: say (^Inf)[*-10..*-5].perl | 11:38 | |
camelia | rakudo-{parrot,moar} d2dfb6: OUTPUT«()» | ||
..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…» | |||
..rakudo-jvm d2dfb6: OUTPUT«Unhandled exception: java.lang.RuntimeException: Missing or wrong version of dependency 'src/Perl6/Grammar.nqp' in (gen/jvm/main.nqp)» | |||
Ven | m: say Inf - 5 | 11:39 | |
camelia | rakudo-moar d2dfb6: OUTPUT«Inf» | ||
Ven | m: say (^5)[Inf..Inf] | ||
camelia | rakudo-moar d2dfb6: OUTPUT«» | ||
11:40
Bucciarati joined
11:45
ivanshmakov left,
ivanshmakov joined
|
|||
FROGGS | m: say Inf cmp Inf | 11:49 | |
camelia | rakudo-moar d2dfb6: OUTPUT«Same» | ||
11:54
a3gis joined
|
|||
Ven | there's no shortcut for ^$x X ^$x (or with Z), right ? | 12:03 | |
m: say (gather for ^5 { take 'line' => $_ })[3].perl | 12:04 | ||
camelia | rakudo-moar d2dfb6: OUTPUT«"line" => 3» | ||
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
|
|||
Ven | m: say do given False { when True { 5 } } | 12:07 | |
camelia | rakudo-moar d2dfb6: OUTPUT«5» | ||
Ven | m: sub foo(True) { 5 }; foo(False) | ||
camelia | ( no output ) | ||
Ven | m: sub foo(True) { 5 }; say foo(False) # just checking, but that should DWIM | ||
camelia | rakudo-moar d2dfb6: OUTPUT«5» | ||
Ven | Is there a HTML generation lib in p6 yet ? | 12:10 | |
12:12
SamuraiJack_ left
|
|||
Ven | Can I generate names to export ? ie `for <a b c> -> $as { sub foo is export(:$as) {} }` | 12:17 | |
lizmat | lotrrotk | 12:19 | |
oops, ww :-) | |||
Ven | wut | ||
12:19
kbaker joined
|
|||
Ven | m: anon sub($) { 5 } | 12:20 | |
camelia | rakudo-moar d2dfb6: OUTPUT«===SORRY!===Type 'sub' is not declared. Did you mean 'Sub'?at /tmp/KlhtG8oJBL:1------> anon sub⏏($) { 5 }Malformed anonat /tmp/KlhtG8oJBL:1------> anon ⏏sub($) { 5 } expect…» | ||
Ven | m: say (anon($) { 5 }).() | 12:21 | |
camelia | rakudo-moar d2dfb6: OUTPUT«===SORRY!=== Error while compiling /tmp/x2hg380uPiUnsupported use of $) variable; in Perl 6 please use $*EGIDat /tmp/x2hg380uPi:1------> say (anon($)⏏ { 5 }).()» | ||
Ven | m: say (anon($a) { 5 }).() | ||
camelia | rakudo-moar d2dfb6: OUTPUT«===SORRY!=== Error while compiling /tmp/2FcONxHaGTVariable '$a' is not declaredat /tmp/2FcONxHaGT:1------> say (anon($a⏏) { 5 }).() expecting any of: postfix» | ||
Ven | m: say (sub ($a) { 5 }).() | ||
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» | ||
Ven | m: my @closed = <a img>; say any(@closed) eq 'a'; | 12:22 | |
camelia | rakudo-moar d2dfb6: OUTPUT«any(True, False)» | ||
Ven | r-p: my @closed = <a img>; say so any(@closed) eq 'a'; | ||
camelia | rakudo-parrot d2dfb6: OUTPUT«True» | ||
12:23
SamuraiJack joined
|
|||
Ven | r-p: my @closed = <a img>; say so any(@closed) eq 'h1'; | 12:23 | |
camelia | rakudo-parrot d2dfb6: OUTPUT«False» | ||
Ven | I'm getting some WATs from parrot. | 12:26 | |
p: my Str $foo; say "Hey $foo"; | |||
camelia | rakudo-parrot d2dfb6: OUTPUT«use of uninitialized value of type Str in string context in block at /tmp/5QFjS4wghV:1Hey » | ||
Ven | p: my Str $foo = 'abc'; say "Hey $foo"; | ||
camelia | rakudo-parrot d2dfb6: OUTPUT«Hey abc» | ||
Ven | p: my Str $foo = 'abc'; say "Hey <a>$foo</a>"; | ||
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…» | ||
Ven | p: my Str $foo = 'abc'; say "Hey <a>{$foo}</a>"; | 12:27 | |
camelia | rakudo-parrot d2dfb6: OUTPUT«Hey <a>abc</a>» | ||
Ven | p6-- # too agressive interpolation :( | ||
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
sftp left
|
|||
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:30
raiph left
12:31
sftp joined
|
|||
Ven | m: gist.github.com/Nami-Doc/15ac60bb18fb1914ba04 | 12:32 | |
camelia | rakudo-moar d2dfb6: OUTPUT«===SORRY!=== Error while compiling /tmp/xLIvQEvJBTSlurpy positionals with type constraints are not supported.at /tmp/xLIvQEvJBT:18------> my multi sub htmlize(Str *@content⏏, *%attrs) { expecting any o…» | ||
12:33
treehug88 joined
|
|||
FROGGS | masak: perl6-m -e 'my (*, *, $x) = (1, 2, 3); say $x' | 12:33 | |
3 | |||
12:34
salv0 left
|
|||
Ven | Wtf perl 6 ._. | 12:35 | |
FROGGS | Ven: problems? | ||
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» | ||
Ven | FROGGS: gist.github.com/Nami-Doc/15ac60bb18fb1914ba04 | ||
FROGGS | typo in the second multi name | ||
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"); | ||
FROGGS | my multi sub(Int $n) <-- subname is missing | ||
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» | ||
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» | ||
FROGGS | ahh | ||
Ven | better. | ||
12:38
cogno joined
|
|||
Ven | still incorrect, though, mmh | 12:38 | |
12:38
xenoterracide_ joined,
cogno is now known as Guest898
|
|||
Ven | m: sub h(%h) { %h.perl } sub xd(*%a) { say h(%a) }; xd(); | 12:39 | |
camelia | rakudo-moar d2dfb6: OUTPUT«===SORRY!=== Error while compiling /tmp/vwL1T8wWWcTwo terms in a rowat /tmp/vwL1T8wWWc:1------> sub h(%h) { %h.perl } ⏏sub xd(*%a) { say h(%a) }; xd(); expecting any of: method arguments …» | ||
Ven | m: sub h(%h) { %h.perl }; sub xd(*%a) { say h(%a) }; xd(); | ||
camelia | rakudo-moar d2dfb6: OUTPUT«().hash» | ||
Ven | r-p: sub h(%h) { %h.perl }; sub xd(*%a) { say h(%a) }; xd(); | ||
camelia | rakudo-parrot d2dfb6: OUTPUT«().hash» | ||
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«===SORRY!=== Error while compiling /tmp/hMLDJ_NWKQRedeclaration of routine xdat /tmp/hMLDJ_NWKQ:1------> same(|%a); }; sub xd(*%a) { say h(%a) }⏏; xd(5); expecting any of: postfix …» | ||
Ven | r-p: sub h(%h) { %h.perl }; multi sub xd(Int, *%a) { callsame(|%a); }; multi sub xd(*%a) { say h(%a) }; xd(5); | ||
camelia | ( no output ) | ||
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 | ( no output ) | ||
FROGGS | that is too much spam for me to see what is going on :o) | ||
you could talk with camelia in privmsg, and then only paste stuff here for discussion | |||
Ven | FROGGS: ha, sorry. 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:42 | |
12:43
treehug88 left
|
|||
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» | ||
FROGGS | m: for { a => 1, b => 2 }.kv -> $k, $v { say "$k $v" } | ||
camelia | rakudo-moar d2dfb6: OUTPUT«a 1b 2» | ||
FROGGS | Ven: ^^ | 12:44 | |
Ven | m: gist.github.com/Nami-Doc/15ac60bb18fb1914ba04 | 12:45 | |
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:46 | |
Ven | s/same/with/, I guess. | 12:47 | |
m: gist.github.com/Nami-Doc/15ac60bb18fb1914ba04 | |||
camelia | rakudo-moar d2dfb6: OUTPUT«Nil» | ||
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«hellofoobarhello» | ||
12:50
salv0 joined
|
|||
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«foobarfoobarfoobar» | ||
Ven | ^ is that a bug ? | ||
or is it "declare vs compile-time" stuff again ? | |||
(and if so -- fair enough, but I'm not sure how I can get a multi anonymous sub to be returned) | 12:51 | ||
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 ...) | ||
lizmat: check my previous paste. | 12:53 | ||
it doesn't correctly close over variables, it seems | |||
12:54
Guest898 left
|
|||
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«foobarfoobarfoobar» | ||
Ven | Nope, same thing. | ||
FROGGS | Ven: that seems to about the lexpads, yes | ||
that seems to be exactly what masak++ blogged about | |||
Ven | yes. | ||
12:55
anaeem___ left,
pochi joined
|
|||
Ven | A workaround would be a class overriding postcircumfix:<( )> I guess, but ew. | 12:56 | |
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: gist.github.com/Nami-Doc/15ac60bb18fb1914ba04 that's my use-case | ||
colomon: and because I keep hitting "weird edge cases" it seems, considering how much I spam `r:` and friends | 12:59 | ||
lizmat just had a déjà vu experience | 13:00 | ||
Ven | lizmat: what do you mean ? | 13:01 | |
lizmat | your gist reminded me a lot of CGI.pm | 13:03 | |
at least, some of it | 13:04 | ||
Ven doesn't know CGI.pm | |||
Ven github searched but only got on p5 stuff | |||
lizmat | metacpan.org/pod/CGI | ||
indeed, perl 5 | |||
it's one of the oldest Perl 5 modules | 13:05 | ||
13:05
kaare_ left
|
|||
lizmat | cpanratings.perl.org/dist/CGI | 13:05 | |
you seem to be doing 2. generating HTML using function calls. | |||
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" | ||
Ven will probably port HAML later ... | |||
lizmat | but if it gets the job done for you, more power to you :-) | 13:07 | |
Ven | with masak++'s indent parser | ||
lizmat | need to run some errands and pick someone up & | ||
Ven | Actually, even with that p6 bug which seems unfixable, I still don't get the correct result | 13:08 | |
13:09
guru joined
13:10
guru is now known as Guest59030,
Guest59030 is now known as ajr_
|
|||
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:12 | |
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 | ||
's return value when I use {call,next}with | |||
13:21
kshannon joined
|
|||
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:23 | |
[Coke] | what advantage is there to having the 2 multi subs over a single sub that takes a slurpy arg? | 13:24 | |
(I'm not saying it shouldn't work the way you're doing it, of course) | 13:25 | ||
just wondering why it's preferable to go that route. | 13:26 | ||
13:26
SamuraiJack left
|
|||
FROGGS | TimToady / jnthn / masak: this makes * in signatures work: gist.github.com/FROGGS/a78ff92ec5e7ce2f8fda | 13:37 | |
TimToady / jnthn / masak: no breaking spectests btw | |||
13:38
cogno joined
13:39
cogno is now known as Guest15734,
xenoterracide_ left
|
|||
Ven | [Coke]: no idea. You'd ~~ List and .join if so ? | 13:40 | |
m: my s(*$slurp){ say $slurp.perl }; s(1, 2); | 13:42 | ||
camelia | rakudo-moar d2dfb6: OUTPUT«===SORRY!===Type 's' is not declaredat /tmp/4ef0fx8NgR:1------> my s⏏(*$slurp){ say $slurp.perl }; s(1, 2);Malformed myat /tmp/4ef0fx8NgR:1------> my ⏏s(*$slurp){ say $slurp.perl }; …» | ||
Ven | m: sub s(*$slurp){ say $slurp.perl }; s(1, 2); | ||
camelia | rakudo-moar d2dfb6: OUTPUT«===SORRY!=== Error while compiling /tmp/zCCKp7S9SqCalling 's' will never work with argument types (Int, Int) Expected: :(Any $slurp)at /tmp/zCCKp7S9Sq:1------> sub s(*$slurp){ say $slurp.perl }; ⏏s(1, 2);[…» | ||
Ven | m: sub s(*@slurp){ say @slurp.perl }; s(1, 2); | ||
camelia | rakudo-moar d2dfb6: OUTPUT«Array.new(1, 2)» | ||
Ven | (what's *$ supposed to do ?) | ||
13:42
bluescreen10 joined
13:43
Guest15734 left
|
|||
[Coke] | I dunno, *@ slurps positions, *% slurps named. | 13:43 | |
*positionals | |||
so I'd use *@, get a list of args, and then .join it and use the logic from the first multi sub. | 13:44 | ||
I'm just wondering if you're expecting a performance benefit from doing it the other way. | |||
Ven | [Coke]: yeah, but I just changed it to do that | ||
[Coke] | (given that slurps all the time can be slow if the main path is single arg) | ||
Ven | I didn't want to use slurpy params for the main usage which is more often than not only one arg | ||
[Coke] | fair enough. Just curious. | ||
Ven | but I'll leave it the "slow" way since the "fast" one doesn't work (yet ?) | 13:45 | |
[Coke] | also fair. :) | 13:47 | |
13:48
btyler joined
|
|||
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:49 | |
PerlJam | Ven: with EVAL ;) | 13:50 | |
Ven | I'd really, really, really, really like not to use EVAL or anything like that. | ||
[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" | ||
Maybe that'd be possible with a macro, but I can't picture how | 13:52 | ||
Ulti | are there any modules using LibraryMake I can take a look at? | 13:57 | |
retupmoca | Ulti: the simplest one I'm aware of is Auth::PAM::Simple | 13:58 | |
Ulti | okedoke I will take a look | 14:00 | |
thinking of trying for a libccv binding | |||
14:05
logie_ joined
|
|||
timotimo | you can programmatically apply is export to a function by calling trait_mod:<is>($routine, :export) i believe | 14:11 | |
14:11
kaare_ joined
|
|||
Ven | timotimo: yeah. but how can I name `our sub` programmatically ? | 14:12 | |
timotimo | Routine.new? :) | 14:13 | |
hm, though the package is runtime read-only | 14:14 | ||
but you can have an export sub that generates stuff on the fly | |||
and not have to rely on the package | |||
PerlJam | Why does it need to be an "our" sub? | ||
14:17
cognominal left
|
|||
Ven | It doesn't need to. I need to give it a name | 14:18 | |
m: $MY::a = 5; say $a; | 14:19 | ||
camelia | rakudo-moar d2dfb6: OUTPUT«===SORRY!=== Error while compiling /tmp/cNdjfe2uB1Variable '$a' is not declaredat /tmp/cNdjfe2uB1:1------> $MY::a = 5; say $a⏏; expecting any of: postfix» | ||
14:19
treehug88 joined
14:20
donaldh left
|
|||
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:20 | |
and there's apparently set_name | 14:21 | ||
Ven | m: my &s = sub { 5 }; s.set_name: 'foo'; say foo(); | ||
camelia | rakudo-moar d2dfb6: OUTPUT«===SORRY!===Unrecognized regex metacharacter ; (must be quoted to match literally)at /tmp/qeHo1Gd73N:1------> my &s = sub { 5 }; s.set_name: 'foo'⏏; say foo();Couldn't find terminator .at /tmp/qeHo1Gd73…» | ||
Ven | m: my &s = sub { 5 }; s.set_name('foo'); say foo(); | ||
camelia | rakudo-moar d2dfb6: OUTPUT«===SORRY!===Unrecognized regex metacharacter ; (must be quoted to match literally)at /tmp/pTmHBDsbK_:1------> my &s = sub { 5 }; s.set_name('foo')⏏; say foo();Couldn't find terminator .at /tmp/pTmHBDsbK…» | ||
timotimo | hehe | 14:22 | |
calling things "s" is problematic :P | |||
the problem is, that set_name will not cause the package that used to contain it to change | |||
you'll still need to have a custom sub EXPORT to assign the things | 14:23 | ||
that would be much more convenient for you in any case | |||
Ven | m: my &bazbar = sub { 5 }; bazbar.set_name('foo'); say foo(); | ||
camelia | rakudo-moar d2dfb6: OUTPUT«===SORRY!=== Error while compiling /tmp/OyhJcAAwEgUndeclared routine: foo used at line 1» | ||
Ven | didn't read, my bad | ||
14:24
donaldh joined
|
|||
timotimo | m: my &bazbar = sub { 5 }; &bazbar.set_name('foo'); say &bazbar.name | 14:25 | |
camelia | rakudo-moar d2dfb6: OUTPUT«foo» | ||
timotimo | you also forgot an & there | ||
bazbar.set_name('foo') would have tried to call set_name on 5 | |||
14:25
benabik joined
14:26
rurban joined
|
|||
Ven | m: my &bazbar = sub { 5 }; &bazbar.set_name('foo'); say foo(); | 14:27 | |
camelia | rakudo-moar d2dfb6: OUTPUT«===SORRY!=== Error while compiling /tmp/Ds6EnkO5lkUndeclared routine: foo used at line 1» | ||
Ven | timotimo: seems to be the same | ||
timotimo | well, yeah | ||
these things operate on different levels | |||
you can't expect set_name (run time) to change the lookup of foo (compile time) | |||
14:27
thou joined
|
|||
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» | ||
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 :) | ||
yeah | |||
Ven: as i said, sub EXPORT will give you exactly the flexibility you're going to need | |||
also, i don't think EVAL would let you modify the package either | |||
14:40
cognominal joined
|
|||
Ven | timotimo: I'd rather not do a project than using EVAL - that's to say how much I hate it ! | 14:41 | |
(A side-project of course ...) | 14:44 | ||
timotimo | yeah | ||
hence the tip to use sub EXPORT. | |||
it seems to me you've been ignoring that hint :P | |||
so, please acknowledge it? or ask me how exactly it works? | 14:49 | ||
14:50
FROGGS left
14:55
Exodist joined
14:58
thou left
|
|||
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:58 | |
timotimo | oh | 14:59 | |
Ven | (unless you have a doc to point me to, since synsearch doesn't yield anything) | 15:00 | |
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:01 | |
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 | ||
15:02
Alina-malina left,
Alina-malina joined
|
|||
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 | ||
Ven | m: sub foo($x) { $x x 5; }; my @tags = 'a'..'f'; say (@tags Z=> foo).perl; | 15:04 | |
camelia | rakudo-moar d2dfb6: OUTPUT«===SORRY!=== Error while compiling /tmp/WwRAK9Wvc7Calling '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…» | ||
Ven | m: sub foo($x) { $x x 5; }; my @tags = 'a'..'f'; say (@tags Z=> @tags>>&foo).perl; | ||
camelia | rakudo-moar d2dfb6: OUTPUT«===SORRY!=== Error while compiling /tmp/9QVSVq9ArdMissing << or >>at /tmp/9QVSVq9Ard:1------> tags = 'a'..'f'; say (@tags Z=> @tags>>&⏏foo).perl; expecting any of: postfix infix stop…» | ||
Ven | m: sub foo($x) { $x x 5; }; my @tags = 'a'..'f'; say (@tags Z=> @tags>>.&foo).perl; | ||
camelia | rakudo-moar d2dfb6: OUTPUT«("a" => "aaaaa", "b" => "bbbbb", "c" => "ccccc", "d" => "ddddd", "e" => "eeeee", "f" => "fffff").list» | ||
Ven | p6++ | 15:05 | |
is there a module which contains the list of HTML tags? | |||
15:05
denis_boyun left
|
|||
Ven | timotimo: gist.github.com/Nami-Doc/15ac60bb18fb1914ba04 whew. I got it. | 15:06 | |
15:06
thou joined
15:07
FROGGS joined
|
|||
Ven | m: sub are-if-statements-or-expressions { return if True { 1 } else { 0 } } | 15:07 | |
camelia | rakudo-moar d2dfb6: OUTPUT«===SORRY!=== Error while compiling /tmp/rvV1WM9wrtUnexpected block in infix position (two terms in a row, or previous statement missing semicolon?)at /tmp/rvV1WM9wrt:1------> tements-or-expressions { return if True ⏏…» | ||
Ven | m: sub are-if-statements-or-expressions { return (if True { 1 } else { 0 }) } | ||
camelia | ( no output ) | ||
15:07
PerlJam joined
|
|||
Ven | alrighty. that's cool. | 15:07 | |
timotimo | you can put a "do" in front instead of parenthesis around | 15:08 | |
btw: | 15:09 | ||
r: say <a href="google.com/"> | |||
camelia | rakudo-{parrot,jvm,moar} d2dfb6: OUTPUT«a href="google.com/"» | ||
timotimo | %) | ||
15:09
salv0 left
|
|||
Ven | timotimo: ha ! | 15:09 | |
timotimo: and yeah, I should know better, I use `do for` in several places | 15:10 | ||
timotimo | r: say <a href="google.com/"\> what is this sorcery </a>.perl | ||
camelia | rakudo-{parrot,jvm,moar} d2dfb6: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfileUnable to parse expression in quote words; couldn't find final '>' at /tmp/tmpfile:1------> e.com/"\> what is this sorcery </a>.perl⏏<EOL>…» | ||
timotimo | aaw | ||
r: say <a href="google.com/"\> what is this sorcery \</a>.perl | |||
camelia | rakudo-{parrot,jvm,moar} d2dfb6: OUTPUT«("a", "href=\"google.com/\">", "what", "is", "this", "sorcery", "</a")» | 15:11 | |
FROGGS | r: say <body><blink>WAT</blink></body> # synopsebot is funny :o) | ||
camelia | rakudo-{parrot,jvm,moar} d2dfb6: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfileTwo terms in a rowat /tmp/tmpfile:1------> say <body><blink>⏏WAT</blink></body> # synopsebot is funny expecting any of: postfix …» | ||
FROGGS | m: say <body><blink>WAT</blink></body> # synopsebot is funny :o) | ||
camelia | rakudo-moar d2dfb6: OUTPUT«===SORRY!=== Error while compiling /tmp/RV5UlKDWMPTwo terms in a rowat /tmp/RV5UlKDWMP:1------> say <body><blink>⏏WAT</blink></body> # synopsebot is funny expecting any of: postfix i…» | ||
timotimo | ? | ||
FROGGS | m: say <body><blink>WAT</blink></body> | ||
camelia | rakudo-moar d2dfb6: OUTPUT«===SORRY!=== Error while compiling /tmp/9HZOGTgjoqTwo terms in a rowat /tmp/9HZOGTgjoq:1------> say <body><blink>⏏WAT</blink></body> expecting any of: postfix infix stopper …» | ||
FROGGS | damn | ||
see #moarvm | |||
I pasted there instead of privmsging camelia | |||
timotimo | yeah, depends on the filename | ||
FROGGS | seems I am confused too -.- | 15:12 | |
Ven | FROGGS: it just works in timotimo++'s case because of <words syntax>, y'know :P ? | ||
FROGGS | Ven: yes, sure :o) | 15:13 | |
m: say <blink>..</blink> | 15:14 | ||
camelia | rakudo-moar d2dfb6: OUTPUT«"blink".."/blink"» | ||
FROGGS | m: say <blink>...</blink> | ||
camelia | rakudo-moar d2dfb6: OUTPUT«(timeout)» | ||
FROGGS | ahh, now I know why it times out | ||
15:16
plobsing left
|
|||
timotimo | %) | 15:16 | |
this is pretty terrible. | |||
Ven doesn't know why | 15:18 | ||
15:19
kaleem left,
treehug88 left
|
|||
timotimo | r: class List { method new(*@foo) { say "created a list with @foo[]" } }; <a href="test">; | 15:19 | |
camelia | ( no output ) | ||
timotimo | r: say <a href="test">.WHAT | 15:20 | |
camelia | rakudo-{parrot,jvm,moar} d2dfb6: OUTPUT«(Parcel)» | ||
timotimo | r: class Parcel { method new(*@foo) { say "created a list with @foo[]" } }; <a href="test">; | ||
camelia | ( no output ) | ||
timotimo | not quite doable apparently | ||
15:20
Alina-malina left,
Alina-malina joined
15:21
atroxaper joined
15:22
kurahaupo left
15:23
salv0 joined
15:27
kurahaupo joined
|
|||
hoelzro | morning #perl6 | 15:29 | |
did I hear that all of the star modules test ok on mokudo now? =) | 15:30 | ||
15:32
treehug88 joined
|
|||
tadzik | yup :) | 15:32 | |
15:33
donaldh left
15:37
hoverboard joined
15:38
Vlavv left,
zakharyas left
|
|||
TimToady | Ven: True always indicates a successful smartmatch, so you'd have to write that signature (Bool where .so) or some such | 15:38 | |
Ven | TimToady: I know. I just find it very weird | 15:39 | |
`given $bool { when True {}; when False {} }` definitely doesn't DWIM | |||
TimToady | yes, but at least that usually warns | 15:40 | |
std: given my $bool { when True {}; when False {} } | |||
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:------> given my $bool { when ⏏True {}; when False {} } Smartmatch against False always fail…» | ||
TimToady | or is supposed to | ||
std: sub foo (True) {} | |||
camelia | std ec3d853: OUTPUT«ok 00:01 125m» | ||
TimToady | probably should there too | ||
but smartmatches wouldn't be very smart if they couldn't use booleans to return success | 15:42 | ||
15:43
atroxaper left
|
|||
masak | Ven: we basically need it for file tests et al. | 15:45 | |
er, etc.* | |||
15:45
atroxaper joined
15:46
SamuraiJack joined
|
|||
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 | |
how long will tag syntax last? probably a good while yet, so might be worth dwimming that one | |||
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 left,
SamuraiJack_ joined
|
|||
TimToady | that's also a valid approach | 15:48 | |
std: sub ($) {} | 15:49 | ||
camelia | std ec3d853: OUTPUT«ok 00:01 125m» | ||
TimToady | m: sub ($) {} | ||
camelia | ( no output ) | ||
15:52
Vlavv joined
|
|||
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:54 | ||
15:55
pecastro joined
|
|||
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? | ||
Ven | qc//++ then. | ||
TimToady | timotimo: that, or what masak++ suggests | 15:56 | |
Ven | m: qc/<a href="/">hey</a>/; | ||
camelia | rakudo-moar d2dfb6: OUTPUT«===SORRY!=== Error while compiling /tmp/iRR40isthiTwo terms in a rowat /tmp/iRR40isthi:1------> qc/<a href="/⏏">hey</a>/; expecting any of: postfix infix stopper infix or m…» | ||
Ven | m: qc//<a href="/">hey</a>//; | ||
camelia | rakudo-moar d2dfb6: OUTPUT«===SORRY!=== Error while compiling /tmp/OHGYxz5hWMTwo terms in a rowat /tmp/OHGYxz5hWM:1------> qc//<a href="/">⏏hey</a>//; expecting any of: postfix infix stopper infix or…» | ||
Ven | ^ that's what I'm wary of | ||
TimToady | you can't doubled // like that | ||
Ven | Too bad :p | 15:57 | |
TimToady | only brackets can double/triple... | ||
15:57
atroxaper left
|
|||
flussence | m: qc\<a href="/">hey</a>\; | 15:57 | |
camelia | ( no output ) | ||
TimToady | but that's a LTA error message | ||
timotimo | which was what exactly? | ||
TimToady | std: qc//<a href="/">hey</a>// | 15:58 | |
camelia | std ec3d853: OUTPUT«===SORRY!===Two terms in a row at /tmp/rIFUOqtR2p line 1:------> qc//<a href="/">⏏hey</a>// expecting any of: POST feed_separator infix or meta-infix infixed function postcircumfix postfix po…» | ||
15:58
atroxaper joined
|
|||
TimToady | oh, it's not a regex, so // is legal, nevermind | 15:58 | |
timotimo: masak++ was suggesting a warning rather than a dwim | 15:59 | ||
Ven | ah nice, flussence | ||
15:59
treehug8_ joined
|
|||
TimToady thinks backslash is kind of bad to use for delimiters | 15:59 | ||
flussence | m: say 'foobar' ~~ /b/ | ||
camelia | rakudo-moar d2dfb6: OUTPUT«「b」» | ||
flussence | m: qc「<a href="/">hey</a>」; | 16:00 | |
camelia | ( no output ) | ||
Ven thinks backslash is better than having to escape slash everytime in html | |||
TimToady | m: say qc[<a href="/">hey</a>] | ||
camelia | rakudo-moar d2dfb6: OUTPUT«<a href="/">hey</a>» | ||
flussence thinks not having to write raw html in the first place is better-er... | |||
TimToady | less worser, anyway | 16:01 | |
Ven plans to port Jade or HAML | |||
16:01
treehug88 left
16:03
thou left
|
|||
timotimo | okay, so how do you get away from that warning? use {' '} instead of < >? | 16:04 | |
16:04
btyler left
|
|||
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 | ||
the web is a ghetto | 16:06 | ||
masak | FROGGS++ # 4a8dac6 | ||
Ven | At least we ought to do our job better with HTML stuff | ||
masak | flussence: oh, and JavaScript is all pure and perfect? :P | ||
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. | ||
Ven | hahahahahha | ||
"hey".blink(), anyone ? | 16:08 | ||
FROGGS | masak: No such commit 4a8dac6 without a repository or gist reference at -e line 1 # :P | ||
Ven | (js' cool, dom is pretty bad) | ||
FROGGS | (I found the moarvm commit btw) | ||
16:09
thou joined
16:10
Rotwang joined
|
|||
timotimo | r: say "foo" ~~ <baz bar foo> | 16:13 | |
camelia | rakudo-{parrot,jvm,moar} d2dfb6: OUTPUT«False» | ||
16:13
btyler joined
|
|||
timotimo | r: say "quux" ~~ <baz bar foo> | 16:13 | |
camelia | rakudo-{parrot,jvm,moar} d2dfb6: OUTPUT«False» | ||
timotimo | sadly, "foo" eq any(@list) is rather slow in rakudo :\ | ||
seems like it's somewhat of a pattern, though | |||
Ven | timotimo: should be stopping after first occurence though | 16:15 | |
what'd be the "other" way to do it ? | |||
timotimo | i don't know | ||
FROGGS | Ven: it should not stop | ||
timotimo | i thought smartmatch against a list would do it. otherwise, a set probably would do it | ||
Ven | FROGGS: in boolean context | ||
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
treehug8_ left
|
|||
timotimo | r: say "foobar" ~~ set <foobar bazquux plopp> | 16:16 | |
camelia | rakudo-{parrot,jvm,moar} d2dfb6: OUTPUT«False» | ||
Ven | FROGGS: and the optimizer should be doing it :p | ||
timotimo | hmm. | ||
i thought about that very optimization in the past | |||
sadly, it's not quite as easy as you might think; especially since there's some flattening involved | 16:17 | ||
maybe if the @self-closing-tags were a constant ... | |||
r: my constant @sct = <img a>; push @sct, "test"; say @sct; | |||
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» | ||
..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…» | |||
..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» | |||
Ven | timotimo: github.com/rakudo/rakudo/blob/45e2...ion.pm#L11 | ||
the optimization is there | 16:18 | ||
timotimo | that's not the part that is slow :) | ||
r: my constant @sct = <img a>; @sct.push("test") | |||
camelia | rakudo-moar d2dfb6: OUTPUT«Cannot call 'push'; none of these signatures match::(Any:U \SELF: *@values, *%_) in block at /tmp/tmpfile:1» | ||
..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» | |||
..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» | |||
timotimo | well, that's good i suppose. | ||
the problem is that generating junction objects just to call .bool on them over and over again is very costly | |||
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 | ||
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. | ||
FROGGS | timotimo: and it is that hard to turn an any junction into infix:<||> when .Bool is called on it? | ||
timotimo | we already do it in some cases | ||
FROGGS | timotimo: I mean, do we know that .Bool is called on it and that it is a Junction? | 16:20 | |
ahh, cool | |||
timotimo | currently, we're only looking for | and & infixes, though | ||
the method form has the problem that it may be doing some kind of flattening | |||
Ven | but the same worry applies to all of a codebase self-hosted, I think .. | ||
16:21
Alina-malina left
16:26
hoverboard left,
anaeem1 joined
16:30
logie_ left
16:31
Alina-malina joined
16:32
logie_ joined
|
|||
tadzik | oh, gpw talks online | 16:32 | |
colomon | what does gpw say? | ||
16:33
atroxaper left
|
|||
tadzik | :D | 16:35 | |
16:43
treehug88 joined
|
|||
dalek | kudo-star-daily: f1935e1 | coke++ | log/ (5 files): today (automated commit) |
16:44 | |
kudo-star-daily: 77bd29e | coke++ | log/ (5 files): today (automated commit) |
|||
rl6-roast-data: bc216c0 | coke++ | / (6 files): today (automated commit) |
16:45 | ||
rl6-roast-data: f86eabc | coke++ | / (6 files): today (automated commit) |
|||
16:55
ajr_ left
|
|||
[Coke] | $ ./perl6 | 16:58 | |
Error occurred during initialization of VM | |||
Could not reserve enough space for the card marking array | |||
whoops. | |||
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 | |
let's be massively better than perl5 in this regard | |||
16:59
Ven left
17:04
atroxaper joined
17:05
anaeem1 left,
anaeem1 joined
17:08
treehug8_ joined,
treehug8_ left,
atroxaper left,
treehug88 left,
treehug88 joined
17:09
benabik left,
anaeem1 left
17:15
anaeem1_ joined
17:16
dmol left
17:17
dmol joined
17:20
hoverboard joined
17:26
fhelmberger left,
kaleem joined,
guru joined
17:27
guru is now known as Guest70170,
Guest70170 is now known as ajr_
17:28
rurban left
|
|||
[Coke] | fixed java build issue. (runner didn't have enough memory to even launch ./perl6) | 17:29 | |
may try to re-push today's commit once this java run finishes. | 17:30 | ||
s/build/daily roast/ | 17:31 | ||
17:39
denis_boyun_ joined
17:45
kaleem left
17:49
bjz left
|
|||
ponbiki | ol | 17:55 | |
17:55
a3gis left
17:56
a3gis joined
18:00
a3gis left
18:03
benabik joined
|
|||
segomos | how do i get the line numbers causing warnings in perl6? | 18:06 | |
moritz | segomos: you mean, programmatically? | 18:08 | |
r: say 42 + Any | |||
18:08
a3gis joined
|
|||
camelia | rakudo-{jvm,moar} d2dfb6: OUTPUT«use of uninitialized value of type Any in numeric context42» | 18:08 | |
..rakudo-parrot d2dfb6: OUTPUT«use of uninitialized value of type Any in numeric context in block at /tmp/tmpfile:142» | |||
moritz | you use rakudo-p :-) | 18:09 | |
segomos | moritz: nah, is there a way to get more verbose just through 'perl6' flags? | 18:10 | |
moritz | segomos: no | ||
FROGGS | at least not for warnings | 18:11 | |
moritz | segomos: but you can catch the exception, and inspect $!.backtrace | ||
segomos | try {} will catch warns? | ||
i'll read about it :) | |||
moritz | [Coke]: could you please add brrt-to-the-future.blogspot.nl/ to the planeteria.org/perl6/ feed? kthxbye | 18:12 | |
segomos | once i'm done making this thing turn poorly formed html into xml | ||
18:12
kurahaupo left,
kurahaupo joined
|
|||
moritz | segomos: nah, you need CONROL blocks to catch warnings | 18:12 | |
18:19
SamuraiJack_ left
|
|||
nwc10 | is jnthn still on a Ferry? :-/ | 18:28 | |
18:29
rurban joined
18:34
rurban left
18:37
raiph joined
|
|||
tadzik | aargh | 18:38 | |
I want MooseX::Strictconstructor for P6 | |||
REWARD | |||
colomon | seems like it ought to be easy to write… | 18:39 | |
nwc10 | "REWARD" is how many hugs? | 18:40 | |
18:41
Sqirrel joined
|
|||
tadzik | at least 5 | 18:41 | |
"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:42 | ||
masak | :/ | 18:43 | |
18:47
darutoko left
|
|||
colomon | tadzik: you still game programming in p6? :) | 18:47 | |
tadzik | colomon: you bet :) | ||
I have spritesheets and animations going | |||
colomon is now peering at Mu.BUILDALL, trying to see how it works.... | 18:52 | ||
segomos | tadzik: damn..thought i was going hard in p6 with stuff like html to xml parsers and web scrapin | 18:53 | |
18:53
raiph left
18:54
rindolf left,
raiph joined
|
|||
tadzik | segomos: oh, it's easier than it sounds | 18:54 | |
and sometimes harder than it sounds :) | |||
moritz | XML? HTML? that's just text :-) | 18:55 | |
FROGGS | tadzik: especially when it comes to sounds :o) | ||
tadzik | today I learned that for proper collision detection I'm gonna need self-balancing binary, or bi-binary trees | ||
FROGGS | tadzik: do yourself a flavor and do bindings to Box2d | ||
tadzik | FROGGS: bah, and miss all the fun? | ||
but yeah, I may do that and some point : | 18:56 | ||
:) | |||
FROGGS | tadzik: Box2D does it properly, that is the point :o) | ||
segomos | moritz: lol.. i received markup from a client that had several iterations of: <td/>some crap</td> | ||
tadzik | but those collision trees sounded exciting when I read about them today, now I want to implement them for the fun of it | ||
FROGGS | tadzik: then you perhaps should have a look at P5's Alien::Box2D / Box2D | ||
moritz | tadzik: so, start by writing a balanced tree data structure module? | 18:57 | |
tadzik: masak++ will love you for it :-) | |||
tadzik | :) sounds like a good start | ||
FROGGS | because we made our own Makefile instead of using Box2D's cmake crap | ||
tadzik | oooh, regular makefiles :) | ||
colomon | tadzik: don't you really want quadtrees? Or am I misunderstanding the problem? | 18:58 | |
tadzik | colomon: I suppose I could maybe get away with binaries, but quadtrees would probably be best | 19:00 | |
colomon has dreamed of implementing quadtrees for yes. …. and will not be doing it any time soon due to insane schedule. | 19:01 | ||
*years | |||
19:02
fhelmberger joined
19:04
kurahaupo left,
kurahaupo joined
19:05
atroxaper joined
|
|||
vendethiel | m: say 1 if 1 == 1 == 1 | 19:06 | |
camelia | rakudo-moar d2dfb6: OUTPUT«1» | ||
segomos | does 1 equate to True ? | 19:07 | |
m: say 1 if 1 == True | |||
camelia | rakudo-moar d2dfb6: OUTPUT«1» | ||
FROGGS | m: say 2 if 2 == 2 == 2 | ||
camelia | rakudo-moar d2dfb6: OUTPUT«2» | ||
segomos | m: say 1 if 0 == 0 == 0 | ||
camelia | rakudo-moar d2dfb6: OUTPUT«1» | ||
segomos | say 0 if 0 == True | ||
m: say 0 if 0 == True | |||
camelia | ( no output ) | ||
FROGGS | m: say +True # segemos, that answers your question | 19:08 | |
camelia | rakudo-moar d2dfb6: OUTPUT«1» | ||
19:08
anaeem1_ left
19:10
atroxaper left
19:11
Rotwang left
|
|||
dalek | ast: c6d9377 | (David Warring [email@hidden.address] | integration/advent2012-day13.t: test ∉ ∌ ⊈ ⊄ ⊉ ⊅ |
19:16 | |
19:17
prevost left
|
|||
dalek | rl6-most-wanted: b101595 | segomos++ | most-wanted/modules.md: added options for a TSV && CSV |
19:18 | |
19:18
fhelmberger left
19:21
dwarring joined
|
|||
dalek | rl6-most-wanted: b4fa47e | segomos++ | most-wanted/modules.md: Added another option for parsing html -> xml |
19:28 | |
19:30
rurban joined
19:35
rurban left
|
|||
[Coke] | moritz: done | 19:35 | |
moritz | [Coke]++ # thanks | 19:39 | |
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? | ||
FROGGS | yes | 19:44 | |
segomos | is that not broken into True == 0 ? | ||
FROGGS | you an chain it | ||
can* | |||
m: say 1 < 3 < 5 | |||
camelia | rakudo-moar d2dfb6: OUTPUT«True» | ||
FROGGS | m: say 1 < 6 < 5 | ||
camelia | rakudo-moar d2dfb6: OUTPUT«False» | ||
FROGGS | m: say 8 > 4 < 5 | ||
camelia | rakudo-moar d2dfb6: OUTPUT«True» | ||
FROGGS | m: say 8 > 6 > 5 | ||
camelia | rakudo-moar d2dfb6: OUTPUT«True» | ||
FROGGS | m: say 8 > 6 > 7 | 19:45 | |
camelia | rakudo-moar d2dfb6: OUTPUT«False» | ||
FROGGS | see | ||
segomos | so..no more 8 > 4 && 8 < 12 | ||
FROGGS | it is awesome :o) | ||
correct | |||
segomos | i've wanted that since the great 90s | ||
retupmoca | moritz: Could I get you to look at LWP::Simple PR #29? | 19:46 | |
colomon | m: say 0 == 0 == 0 | 19:48 | |
camelia | rakudo-moar d2dfb6: OUTPUT«True» | ||
FROGGS | ohh, you asked about how... | 19:50 | |
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» | ||
FROGGS | the ast is like: | ||
- QAST::Op(call &say) say 0 == 0 == 0 | |||
- QAST::Op(chain &infix:<==>) == | |||
- QAST::Op(chain &infix:<==>) == | |||
moritz | retupmoca: I have looked, but I don't really understand what's going on | ||
FROGGS | the inner == gets two elems, and the outer the gets the chained thing and another elem | ||
19:52
rurban joined
|
|||
FROGGS | in nqp is a very nice bit of code that is responsible for the chaining | 19:52 | |
vendethiel | nqp++ # being nice to code | 19:53 | |
colomon hadn't realized that == chained, but is glad that it does | |||
FROGGS | I think you can see which infix can do that by looking in the Perl6::Grammar | ||
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 | ||
FROGGS | there is a chainy attribute me thinks | 19:54 | |
retupmoca | moritz: (was causing random/rare test failures for me) | ||
20:12
kaare_ left
20:13
labster joined
20:27
rindolf joined
20:30
Sqirrel_ joined
20:33
Sqirrel left
20:34
Sqirrel joined
20:35
Sqirrel_ left
20:36
benabik left
|
|||
retupmoca | moritz++ # PR merge | 20:38 | |
20:38
BenGoldberg joined
|
|||
lue | r: say <A B C> (-) <A C> | 20:45 | |
camelia | rakudo-{parrot,jvm,moar} d2dfb6: OUTPUT«set(B)» | ||
lue | ^ I know it's not .perl, but should strings really be unquoted like that in the output? | 20:46 | |
FROGGS | lue: you got a Set bag, so .gist shows you that | 20:48 | |
r: print <A B C> (-) <A C> | |||
camelia | rakudo-{parrot,jvm,moar} d2dfb6: OUTPUT«B» | ||
FROGGS | s/bag/back/ | ||
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 | ||
and I think it does it in this case | |||
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:50 | |
FROGGS | hmmmm | 20:51 | |
lue | r: say set(1,2,3); # it even *is* code! | ||
camelia | rakudo-jvm d2dfb6: OUTPUT«set(2, 1, 3)» | ||
..rakudo-{parrot,moar} d2dfb6: OUTPUT«set(1, 2, 3)» | |||
FROGGS | m: say lines.words | ||
camelia | rakudo-moar d2dfb6: OUTPUT«No such method 'words' for invocant of type 'List' in block at /tmp/XwAN0jMazR:1» | ||
20:51
bluescreen10 left
|
|||
FROGGS | m: say lines>>.words | 20:51 | |
camelia | rakudo-moar d2dfb6: OUTPUT«(signal )» | 20:52 | |
FROGGS | gah+ | ||
m: say lines[0].words | |||
camelia | rakudo-moar d2dfb6: OUTPUT«There were three men came out of the West» | ||
FROGGS | there are no quotes either | ||
lue | yes, but nothing about that seems like code :) | ||
FROGGS | bah | ||
:P | |||
20:53
rindolf left
|
|||
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 | ||
camelia | rakudo-{parrot,jvm,moar} d2dfb6: OUTPUT«(List)» | ||
colomon | m: say lines.map(*.words) | 20:56 | |
camelia | rakudo-moar d2dfb6: OUTPUT«(timeout)» | ||
colomon | m: say lines | ||
BenGoldberg | Lines is infinite-ish. | ||
camelia | rakudo-moar d2dfb6: OUTPUT«(timeout)» | ||
BenGoldberg | m: say .chars for lines | 20:57 | |
camelia | rakudo-moar d2dfb6: OUTPUT«(signal )41253724055263724040353822042324619043264228043284830047263323043254838042284232035304327000…» | ||
BenGoldberg | jp: say .chars for lines | ||
colomon | BenGoldberg: how is that possible? | 20:58 | |
colomon doesn't think there are that many lines to "John Barleycorn" | |||
raydiak | it loops, I'd assume | ||
BenGoldberg | For some reason, when it reaches the end-of-file, it's just producing empty strings, instead of ending the list. | ||
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…» | ||
colomon | oh, so moarbug | ||
BenGoldberg | p: say .chars for lines | ||
camelia | rakudo-parrot d2dfb6: OUTPUT«41253724055263724040353822042324619043264228043284830047263323043254838042284232035304327» | ||
BenGoldberg | j: say .chars for lines | ||
camelia | ( no output ) | ||
BenGoldberg headscratches | 21:00 | ||
vendethiel | r-j is a bit... funny. | ||
BenGoldberg | Funny haha, or funny uh oh? | 21:01 | |
vendethiel | funny WAT | ||
BenGoldberg | :) | ||
BenGoldberg ponders a programming language with -Ohumor | |||
21:02
dayangkun left
|
|||
avuserow | thanks for adding me to the perl6 org, moritz++ | 21:03 | |
(sadly I'm at work when most others are hacking here) | |||
21:06
kbaker left
21:14
nebuchadnezzar joined
21:18
dayangkun joined
21:20
myfree joined
21:21
myfree left
21:25
kurahaupo_mobile joined
21:26
kurahaupo left
21:36
ajr_ left
21:39
Sqirrel left
21:54
denis_boyun_ left
21:56
go|dfish joined
21:58
kurahaupo_mobile left
22:01
treehug88 left
22:20
d4l3k_ joined,
dalek left
22:21
d4l3k_ is now known as dalek
22:26
spider-mario left
22:41
pochi left,
pochi joined
22:47
atroxaper joined
22:53
rurban left
23:02
thou left
23:05
xenoterracide_ joined
|
|||
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. | ||
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:14
btyler left
23:22
anaeem1 joined
23:24
rurban joined
23:26
anaeem1 left
23:28
Juerd joined
23:30
rurban left
23:40
bjz joined
23:47
dmol left
23:51
benabik joined
23:52
synopsebot joined,
Util joined,
[Coke] joined
23:54
Juerd left,
Juerd joined
|