»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by masak on 12 May 2015. |
|||
00:10
tinyblak joined
|
|||
raydiak | good afternoon, #perl6 | 00:11 | |
vendethiel | o/ raydiak | 00:13 | |
raydiak | \o vendethiel; working on anything interesting? | 00:14 | |
vendethiel | raydiak: not really, no, I was playing games with friends :P | ||
raydiak | what game? I ought to try one again some time... | 00:15 | |
vendethiel | raydiak: borderlands 2 :) | 00:18 | |
raydiak realizes his age as he has no idea what borderlands is, and goes to read :) | 00:19 | ||
00:19
TEttinger left
00:20
mohij joined
00:22
rurban left
00:23
mohij_ left
|
|||
raydiak | neat, I think my laptop might even handle it once I clean out the fan again (scorching summer here, setting records for my city) | 00:24 | |
haven't been very active here lately myself, got some work painting a house for a few weeks, so spending part of a day off checking to see if all my modules still work on latest rakudo and so forth | 00:29 | ||
00:35
amurf joined
|
|||
ugexe | m: my $path1; my $path2 = ''; say $path1.?IO.is-absolute; say $path2.?IO.is-absolute; # could it be more useful if $path2.?IO did not die? | 00:36 | |
camelia | rakudo-moar 2e612a: OUTPUT«NilMust specify something as a path: did you mean '.' for the current directory? in block <unit> at /tmp/7i2MBik27k:1» | ||
cognominal | ...travelling to see the World.nqp instead of sleeping | 00:42 | |
raydiak | ugexe: that die for '' is something lizmat++ put in after one of my projects rm -rf'd itself due to a GLR change...so I'd argue that it'd be better if $path1 *did* die :) | 00:43 | |
ugexe | i dont want to actually do anything. i want to check if a path is absolute, but not being able to check "" doesnt seem correct | 00:47 | |
00:47
tinyblak left
|
|||
ugexe | or a better way than saying !$path || $path.IO.is-absolute ?? $path !! $path.IO.abspath | 00:49 | |
vendethiel | raydiak: well, I did manage to get a few more compile-time NULLRepr | 00:55 | |
01:00
BenGoldberg joined
01:01
laouji joined
01:04
tinyblak joined
01:05
dayangkun left
01:15
Hor|zon joined
01:16
rmgk_ joined,
rmgk is now known as Guest36324,
rmgk_ is now known as rmgk
01:20
Guest36324 left,
Hor|zon left
01:26
vendethiel left
|
|||
raydiak | ugexe: myself, I'd rather that any attempt to treat an empty string or undefined value as a path died immediately...if I'm seeing any of those things where I should see a path string, something has probably gone wrong upstream | 01:29 | |
though I can see an argument for wanting to treat it as the current directory (which is how my project self-destructed) | 01:30 | ||
but I wouldn't be in favor of it working for certain operations (like .is-relative), but not others | |||
01:39
amurf left
01:46
yeahnoob joined
01:56
TEttinger joined
02:09
yeahnoob left
02:13
noganex_ joined
02:14
aborazmeh joined,
aborazmeh left,
aborazmeh joined
02:15
noganex left
02:17
atroxaper joined
02:21
atroxaper left
02:23
dayangkun joined
02:24
dayangkun left
02:25
laouji left,
dayangkun joined,
dayangkun left,
dayangkun joined,
dayangkun left
02:28
dayangkun joined
02:35
yeahnoob joined
02:37
laouji joined
02:48
colomon left,
vendethiel joined
|
|||
ugexe | in this case the string is going to get absolute-ified one way or another, which involves $*CWD during the $*SPEC. methods (since a string cant carry its $*CWD around with it) | 02:50 | |
02:50
colomon joined
03:04
Hor|zon joined
03:09
Hor|zon left
03:11
telex left
03:12
telex joined
03:14
xinming joined
03:22
xinming left,
xinming joined
03:23
amurf joined
03:25
colomon left
03:28
amurf left
03:29
colomon joined
03:31
BenGoldberg left
03:39
colomon left
03:40
colomon joined
03:45
tinyblak left,
laouji left
03:47
colomon left,
nys left
03:51
amurf joined
03:55
molaf_ left
03:56
amurf left
03:59
kaare_ joined
04:03
vendethiel left
04:04
kaare__ joined
04:07
kaare_ left
04:53
atroxaper joined,
Hor|zon joined
04:55
aborazmeh left
04:57
khw left
04:58
Hor|zon left,
tinyblak joined
05:05
skids left
05:08
tinyblak left
05:20
baest_ is now known as baest
05:22
vendethiel joined
05:38
[Sno] left
05:43
raiph left
05:45
vendethiel left
05:59
araujo_ left
06:01
araujo joined,
araujo left,
araujo joined
06:04
rurban joined
06:09
dalek left,
dalek joined,
ChanServ sets mode: +v dalek
06:11
xinming left
06:21
geekosaur left
06:23
geekosaur joined
06:27
vendethiel joined
06:33
espadrine_ joined
06:40
FROGGS joined
06:42
Hor|zon joined
06:44
atroxaper left
06:46
FROGGS left
06:47
Hor|zon left
06:49
tinyblak joined,
vendethiel left
06:51
vendethiel joined
06:53
atroxaper joined
06:57
zakharyas joined
07:01
brrt joined
07:05
[Sno] joined
07:08
RabidGravy joined
|
|||
brrt | \o | 07:09 | |
cognominal | brrt o/ | 07:11 | |
brrt | good.. monday, i guess :-) | ||
cognominal | m: my token ws { \h* }; say qq|a\n| ~~ m:s/ a $ /; | 07:12 | |
「a | |||
camelia | rakudo-moar 2e612a: OUTPUT«「a」» | ||
07:12
atroxaper left
|
|||
cognominal | m: my token ws { \h* }; say qq|a\n| ~~ m:s/ a \n /; | 07:12 | |
camelia | rakudo-moar 2e612a: OUTPUT«False» | ||
cognominal | I wonder why the second does not match | 07:13 | |
07:14
vendethiel left
|
|||
moritz | cognominal: because the whitespace before the \n in the regex already slurped up the newline in the string | 07:14 | |
TEttinger | m: my token ws { \h* }; say qq|a\n| ~~ m:s/ a\n /; | ||
camelia | rakudo-moar 2e612a: OUTPUT«「a」» | ||
moritz wonders if the lexical ws is picked up | 07:15 | ||
ShimmerFairy | m: my token ws { <digit>* }; say qq|a3| ~~ m:s/a /; say qq|a3| ~~ m:s/a<digit>/ | ||
camelia | rakudo-moar 2e612a: OUTPUT«False「a3」 digit => 「3」» | ||
ShimmerFairy | m: my token ws { <digit>* }; say qq|a3| ~~ m:s/a /; say qq|a3| ~~ m:s/a<ws>/ | ||
camelia | rakudo-moar 2e612a: OUTPUT«False「a3」 ws => 「3」 digit => 「3」» | ||
ShimmerFairy | ^ lexical ws is not being picked up by :s whitespace | ||
moritz | m: grammar A { token ws { \h* }; token TOP { a \n } }; say A.parse("a\n") | ||
camelia | rakudo-moar 2e612a: OUTPUT«「a」» | ||
07:15
atroxaper joined
07:16
darutoko joined,
vendethiel joined
|
|||
moritz | cognominal: ^^ works fine inside a grammar | 07:16 | |
cognominal | ShimmerFairy diagnostic seems accurate. | 07:17 | |
07:17
xfix joined
|
|||
masak | good morning, #perl6! | 07:18 | |
cognominal | I waited masak to wake up to file the bug :) | ||
moritz isn't sure that's a bug | |||
moritz isn't sure it's not a bug either | 07:19 | ||
ShimmerFairy | on the one hand, it does feel a bit inconsistent with how it works in grammars, on the other hand it feels like this is the kind of thing where you should be using grammars already. | 07:20 | |
I'm not sure if non-grammar regex/token/rule declarations should "attach" to whatever implicit grammar regexes pull from when not in grammars, overriding declarations and such. | 07:23 | ||
cognominal | github.com/perl6/specs/blame/maste...x.pod#L342 | ||
masak | I'm too drowsy to backlog :) I'll leave that for later. | 07:24 | |
07:25
FROGGS joined
|
|||
cognominal | the given examples use m:s// so they are not grammars | 07:25 | |
could we blame the greeks for that too? | 07:26 | ||
ShimmerFairy | Said examples show how to _use_ sigspace, but I don't see any explicit example showing how to _change_ sigspace's behavior. | 07:27 | |
DrForr | Heh. I just fixed handling of RE modifiers in Perl-Mogrify last night. (with the exception of /x :) ) | 07:29 | |
07:30
abraxxa joined
07:39
vendethiel left,
nnms left
07:40
vendethiel joined
|
|||
masak | does Rakudo have something like Perl 5's `readlink`? | 07:42 | |
moritz | masak: resolve, I think | 07:43 | |
IO::Path.resolve | |||
07:43
Hor|zon joined
|
|||
moritz | m: say '/usr/bin/editor'.IO.resolve | 07:44 | |
camelia | rakudo-moar 2e612a: OUTPUT«"/usr/bin/editor".IO» | ||
masak | oh, nice. | 07:46 | |
japhb++ # implementation | |||
moritz | $ ./perl6-m -e ' say "/usr/bin/editor".IO.resolve' | ||
"/usr/bin/vim.gtk".IO | |||
07:48
Hor|zon left
07:54
Hor|zon joined
07:58
dakkar joined
07:59
dalek left
08:00
dalek joined,
ChanServ sets mode: +v dalek
08:02
vendethiel left
|
|||
[TuxCM] | Inline::Perl5 broken: Merging GLOBAL symbols failed: duplicate definition of symbol HLL | 08:04 | |
DrForr | Just as an aside I had good luck sending him a github issue as well :) | 08:05 | |
08:05
g4 joined,
g4 left,
g4 joined
08:24
vendethiel joined
08:30
espadrine_ left
|
|||
[TuxCM] | test 50000 46.251 46.162 | 08:47 | |
test-t 50000 46.427 46.337 | |||
there has been time that it was 36! | |||
09:06
verzz joined
09:11
brrt left
09:13
bin_005 joined
09:16
andreoss joined
09:20
brrt joined
|
|||
kanl | m: my @a = 1 .. 3; my @b = < a b c >; my @c = @a Z @b; for @c -> $a, $b { $a.say; $b.say; }; for @a Z @b -> $a, $b { $a.say; $b.say; } | 09:22 | |
camelia | rakudo-moar 2e612a: OUTPUT«1a2b3c1 a2 bToo few positionals passed; expected 2 arguments but got 1 in block <unit> at /tmp/TW7_7hQB4q:1» | ||
kanl | m: my @a = 1 .. 2; my @b = < a b >; my @c = @a Z @b; for @c -> $a, $b { $a.say; $b.say; }; for @a Z @b -> $a, $b { $a.say; $b.say; } | ||
camelia | rakudo-moar 2e612a: OUTPUT«1a2b1 a2 b» | ||
kanl | so Z seems to be buggy with odd sized lists | 09:23 | |
masak | nope. | 09:24 | |
kanl | masak: care to elaborate on that "nope"? :) | 09:25 | |
vendethiel | what's buggy here? | ||
kanl | am i misunderstanding the usage of Z then? | 09:26 | |
vendethiel | flattening, I think | ||
m: my @a = 1 .. 3; my @b = < a b c >; for @a Z @b -> ($a, $b) { $a.say; $b.say; } | |||
camelia | rakudo-moar 2e612a: OUTPUT«1a2b3c» | ||
vendethiel | kanl: for @a Z @b -> $a, $b {} will have $a = @a[0], @b[0] | 09:27 | |
and $b be @a[1], @b[1] (<- this comma is the lsit one) | |||
kanl | vendethiel: ic. so @c = @a Z @b flattened? | 09:28 | |
vendethiel | kanl: yes, list assignment flattens :) | 09:29 | |
kanl | got it, thanks! | ||
ShimmerFairy | But if list assignment flattens, then how come: | 09:30 | |
m: my @a = [0,1], [2,3]; my @b = @a[0]; say @b.perl; | |||
camelia | rakudo-moar 2e612a: OUTPUT«[[0, 1]]<>» | ||
vendethiel | ShimmerFairy: [] is an itemized list (currently) | 09:31 | |
GLR will (most probably) change this | |||
ShimmerFairy | That is the first time I have ever heard of [] being that. | 09:32 | |
vendethiel | m: for 1, [2, 3, 4], (5, 6) -> $a { say "hey $a" }; | ||
camelia | rakudo-moar 2e612a: OUTPUT«hey 1hey 2 3 4hey 5 6» | ||
vendethiel | m: my @a = 1, [2, 3, 4], (5, 6); for @a -> $a { say "hey $a" }; | 09:33 | |
camelia | rakudo-moar 2e612a: OUTPUT«hey 1hey 2 3 4hey 5hey 6» | ||
kanl | so then when is GLR happening? wouldn't it break tons of existing code? | ||
vendethiel | it probably will, yes | 09:34 | |
ShimmerFairy | I haven't seen an explicit description of GLR yet, but I'm _hoping_ it'll make lists sane in Perl 6. | ||
vendethiel much the same | |||
there's one draft, though | |||
DrForr | And just a few months before release :) | 09:35 | |
vendethiel | ShimmerFairy: github.com/perl6/specs/blob/master...-draft.pod | ||
DrForr: I'm ready to trade a bit of my time to fix my code for sanity | |||
DrForr | Oh, I am too, it's just the whole "just before release" bit. | 09:36 | |
ShimmerFairy | Well, I can't say I've kept quiet about how dumb lists can be in Perl 6 over the years :P | 09:37 | |
09:37
vendethiel left
|
|||
DrForr | Just stability issues, and worried that it's going to go in just before YAPC::EU and potentially break demo code when we should be touting successes :) | 09:39 | |
09:42
brrt left
09:45
yeahnoob left,
rindolf joined
09:46
Ven joined
09:51
andreoss left,
espadrine_ joined,
espadrine_ is now known as espadrine
09:59
bin_005 left,
bin_005_i joined
10:04
tinyblak left,
tinyblak joined
10:07
tinyblak left
10:09
brrt joined
10:15
vendethiel joined
10:20
xinming joined
|
|||
kanl | wouldn't it be nice to be able to @a Z -> [ $a, $b ] { } @b, directly? | 10:21 | |
otherwise have to overload an operator | 10:22 | ||
or, -> $a, $b {}, post GLR | 10:23 | ||
10:27
gfldex joined
10:31
dayangkun left
10:32
Ven left
10:33
virtualsue joined,
pecastro left
|
|||
dalek | kudo/nom: 6967186 | (Nick Logan)++ | .travis.yml: non-legacy travis-ci config buildtime-- |
10:36 | |
kudo/nom: 533d1a9 | lizmat++ | .travis.yml: Merge pull request #469 from ugexe/travis-nolegacy non-legacy travis-ci config |
|||
10:44
TEttinger left
|
|||
kanl | m: my %h = a => 1; %h.push: a => 1; %h.say; | 10:47 | |
camelia | rakudo-moar 2e612a: OUTPUT«a => 1» | ||
kanl | doc.perl6.org/routine/push | 10:48 | |
my %h = a => 1; %h.push: b => 1; %h.say; | 10:49 | ||
m: my %h = a => 1; %h.push: b => 1; %h.say; | |||
camelia | rakudo-moar 2e612a: OUTPUT«a => 1» | ||
kanl | so .push on hash no longer autovivify either? | 10:50 | |
moritz | m: my %h = a => 1; %h.push: (b => 1); %h.say; | ||
camelia | rakudo-moar 533d1a: OUTPUT«a => 1, b => 1» | ||
moritz | kanl: it's the named vs. positional argument thingy again | 10:51 | |
ShimmerFairy | m: my $a = a => 1; my %h = $a; say %h.perl; %h.push($a); say %h.perl | ||
camelia | rakudo-moar 533d1a: OUTPUT«{:a(1)}<>{:a([1, 1])}<>» | ||
ShimmerFairy | That example in the docs assumes that implicit *%_ doesn't exist (and it shouldn't) | ||
kanl | moritz: got it. thanks! i seem to keep falling over the same spot :p | 10:53 | |
nine | [TuxCM]: cannot reproduce an Inline::Perl5 failure here | 10:55 | |
[TuxCM] will retry | 10:58 | ||
10:58
verzz left
|
|||
kanl | m: my @a = < a b c >; my %h = a => 1; @a.map: { %h.push: $_ => 1 }; %h.say; | 11:01 | |
camelia | rakudo-moar 533d1a: OUTPUT«a => 1 1, b => 1, c => 1» | ||
kanl | so in $_ is not treated as named in this case? | 11:02 | |
lizmat | m: my @a = < a b c >; my %h = a => 1; @a.map: { %h.push: $_ => 1 }; %h.perl.say | 11:03 | |
yoleaux | 12 Jul 2015 22:49Z <japhb> lizmat: I was referring to the fact that perl6's command line options don't seem to affect the REPL (or at least, not all of them). In my particular class, -I wasn't affecting @*INC in the REPL, and ugexe seemed to indicate --ll-exception was problematic as well. | ||
camelia | rakudo-moar 533d1a: OUTPUT«{:a([1, 1]), :b(1), :c(1)}<>» | ||
lizmat | kanl: I'm not sure what you expected? Seems to work as planned to me | ||
kanl | further back, my %h = a => 1; %h.push: b => 1; %h.say; | 11:04 | |
[TuxCM] | nine, still got it | ||
ShimmerFairy | The question is why %thing.push(a => 1) goes to *%_ but %thing($_ => 1) doesn't. | ||
[TuxCM] prepares gist (waiting for test to finish) | 11:05 | ||
nine | [TuxCM]: I do see random test failures running make test in a loop. But they're very infrequent :/ And they are all of the "No subtests run" kind | 11:07 | |
kanl | lizmat: things like this confuse a newbie like me. because it _seems_ to be inconsistent, when actually there are actually sound reasons behind the seemingly inconsistency. | ||
[TuxCM] | but you run locally, not from an installed Inline::Perl5 | ||
11:08
tinyblak joined
|
|||
lizmat | kanl: yeah, I see what you mean, but I'm on record not to rant about that anymore | 11:08 | |
kanl | i'll shut up :) | ||
ShimmerFairy would argue the extent to which implicit *%_ is a sound reason :P | 11:09 | ||
[TuxCM] | gist.github.com/Tux/2a769f16bd5505be78b6 | ||
lizmat | kanl: please don't | 11:10 | |
you strengthen my point | |||
it's just that if you feel as strongly about it as I do, you should let yourself be heard | 11:11 | ||
nine | I see the same errors locally and with the installed Inline::Perl5. But not your's. Though considering the randomness of my failures, it looks like some memory corruption. Like the heisenbug I tracked a couple of months ago that turned out to be a GC bug in NativeCall | ||
ShimmerFairy | lizmat: oh, are you talking about that time you argued against the conflation of pairs and named parameters? If so, this is definitely a case where I'm left wondering why it's like this. | 11:12 | |
lizmat | there's nothing more *I* can say about it | ||
ShimmerFairy: indeed | |||
ShimmerFairy | m: sub foo(:$bar) { say $bar }; my $baz = "bar"; foo(bar => "Hello!"); foo($baz => "World!") | 11:13 | |
camelia | rakudo-moar 533d1a: OUTPUT«Hello!Too many positionals passed; expected 0 arguments but got 1 in sub foo at /tmp/oFlm1yBicd:1 in block <unit> at /tmp/oFlm1yBicd:1» | ||
ShimmerFairy | I've never encountered this before, but it feels very, very wrong. | 11:14 | |
FROGGS | jnthn: ping | 11:15 | |
kanl | lizmat: from a user adoption pov, these so-called inconsistencies may be offputting to people and turn some of them away, just saying. but speaking for myself, i'm not that easily frustrated/discouraged :) | ||
ShimmerFairy | Those two calls should definitely be consistent, though how so is another point :) | ||
11:15
tinyblak left
|
|||
FROGGS | jnthn: what does a for loop return in statement level? this here? github.com/rakudo/rakudo/blob/nom/...er.pm#L201 | 11:16 | |
lizmat | kanl ShimmerFairy : teaching and user adoption are the most important reasons to separate :a(42) and a => 42 in meaning | 11:17 | |
especially since you cannot use a => 42 as an adverb in @a[42]:exists and the like | 11:18 | ||
kanl | *nod* | ||
lizmat | so newbies are first taught to use :a(42) notation for slices and the like | ||
and then learn they can also use a => 42 for custom code to indicate a named parameter | 11:19 | ||
but not for slices | |||
ShimmerFairy | lizmat: I'm on board with not mixing pairs and named params. I've actually thought about it before, but never complained about it much (if at all). They're such different things, I wonder why they deserve to share syntax, and in a not-always-clear fashion to boot. | ||
11:19
rurban left
|
|||
kanl | as a user with some p5 experience, i'd have to agree with ShimmerFairy on that | 11:20 | |
ShimmerFairy | lizmat: And I mentioned a few days ago how my mind sees a => 42 as a Pair-ish thing, and :a(42) as a named param-ish thing. I'm not too likely to write foo(a => 42) , and I definitely wouldn't write %h = :a(42) | 11:21 | |
kanl | old p5 habbits can be quite harmful | ||
11:22
atroxaper left
|
|||
tadzik | 25 years from now we'll still be afraid to use $a and $b so we don't break sort | 11:25 | |
it'll be like with goto. "Ancients told us to never use goto!" "But it was completely different back then!" "LOL, doesn't matter, stay away from it anyway!" | 11:26 | ||
(yes, I'm pretty sure prefix:<LOL> will still be around in 25 years) | |||
(maybe for the same reason) | |||
ShimmerFairy | What's this about breaking sort? | ||
lizmat | $a and $b have a special meaning in P5 wrt to sort | 11:31 | |
11:31
bjz joined
|
|||
ShimmerFairy | Ah, that explains why I don't know about it :) | 11:31 | |
lizmat | in p5 one can say sort @a, { $a cmp $b } where $a and $b would be the two parameters to the code block | 11:32 | |
similar to P6's { $^a cmp $^b } | |||
except in P5 they are fixed to the names "$a" and "$b" | 11:33 | ||
hence you can use $a and $b anywhere in P5 code without defining them, even with "use strict" | |||
so they're really pretty magical | |||
in P5 | |||
itz__ | is compiling to mbc on OS X several times slower than a couple of days ago or is it me? | 11:35 | |
11:35
itz__ is now known as itz
|
|||
lizmat | itz: not sure, could be | 11:36 | |
11:36
FROGGS left
|
|||
itz | I'll nuke .rakudobrew just in case | 11:37 | |
11:42
tinyblak joined
11:52
pecastro joined
11:56
kurahaupo left
12:02
bin_005_i left
|
|||
itz | hmm it seems to affect certain modules only | 12:10 | |
jnthn | afternoon, #perl6 | 12:17 | |
yoleaux | 11 Jul 2015 21:02Z <japhb> jnthn: What are your thoughts on irclog.perlgeek.de/perl6/2015-07-11#i_10881267 and irclog.perlgeek.de/perl6/2015-07-11#i_10881334 ? Having no good resolution kinda gets in the way of a nice refactoring (for now, I'm copying the required private methods into each role that would want to consume them, and then changing the names to not collide between the roles which is ... blech.) | ||
12 Jul 2015 20:46Z <FROGGS> jnthn: I think MVMExceptionBody needs an MVMObject *label, so the payload can be used for: LABEL.leave(42) | |||
12:17
rurban joined
|
|||
jnthn | .tell japhb I think the one at irclog.perlgeek.de/perl6/2015-07-11#i_10881271 should indeed DWYM; feel free to file a ticket on that | 12:19 | |
yoleaux | jnthn: I'll pass your message to japhb. | ||
12:22
atroxaper joined
|
|||
lizmat tries to catch some more sleep | 12:25 | ||
12:26
rindolf left
12:27
atroxaper left
|
|||
arnsholt | jnthn: How accessible is the multi-dim stuff from Perl 6 currently? I've got an idea which might be a good fit for giving it a real-worldish spin | 12:28 | |
timotimo | o/ | ||
jnthn | arnsholt: It ain't yet, but I intend for it to be later this week. | ||
arnsholt | Spiffy! I'll keep an eye out for it =) | 12:29 | |
12:32
yakudza joined
12:35
itz is now known as _itz,
itz joined
|
|||
RabidGravy | remember kids, doing "sub trait_mod:<is> .... " without a multi will get you really confused ... | 12:38 | |
well the symptons are somewhat confusing to me anyway | |||
12:42
FROGGS joined
|
|||
FROGGS | $ perl6 -e 'say (FOO: for ^3 { FOO.leave(123); say "alive" }); say "ho!"' | 12:43 | |
123 | |||
ho! | |||
masak: ^^ | |||
dunno how sane my implementation is though | |||
jnthn: ^^ | |||
masak | woo! \o/ | 12:44 | |
FROGGS, you nice person you! | |||
FROGGS | :D | ||
jnthn | FROGGS++ | 12:45 | |
FROGGS | I'll push my stuff in a minute | ||
jnthn | Would be interested to see that stuf,f yes | ||
*stuff | |||
FROGGS | jnthn: please review then :o) | ||
12:51
telex left
12:52
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
telex joined
12:54
verzz joined
13:03
christovchristov joined
13:06
amurf joined
13:09
brrt left
13:10
amurf left
|
|||
dalek | p/leave: 10af152 | FROGGS++ | src/vm/moar/QAST/QASTOperationsMAST.nqp: map {get,set}label, and handle CONTROL_RETURN + label |
13:12 | |
masak looks, too | |||
13:14
raiph joined
|
|||
masak | so the handler name is called RETURN on the nqp level? even though it's a leave? | 13:14 | |
13:16
andreoss joined
|
|||
andreoss | with token { <line> ** 9 } what separator is assumed? | 13:18 | |
13:19
bjz left
13:20
bjz joined
|
|||
dalek | kudo/leave: 6744251 | FROGGS++ | src/core/ (2 files): and handle CONTROL_RETURN + label in MapIter |
13:20 | |
FROGGS | masak / jnthn: I pushed all the things | ||
13:20
lucasb joined
|
|||
FROGGS | masak: aye, CONTROL_RETURN already existed | 13:21 | |
andreoss: none | |||
masak | FROGGS: here my ignorance of the specifics is showing, but... | 13:23 | |
FROGGS | masak: I just can tell that it works for the one-liner I posted, I'm not sure the implementation is sensible | ||
13:23
kaare__ is now known as kaare_
|
|||
masak | FROGGS: ...it seems to me that a `return` and a `leave` might take you to different locations. how does that square with using CONTROL_RETURN for both? | 13:23 | |
oha | isn't LEAVE a phaser executed before exiting? like a guard? why for 1..3 { FOO.leave(); say "alive" } doesn't print "alive" 3 times? | 13:24 | |
FROGGS | return does not use CONTROL_RETURN AFAICS | ||
it invokes a lexical &RETURN or so | |||
oha | is leave in this context different than the phaser | ||
shouldn't be .last() ? | 13:25 | ||
masak | FROGGS: maybe make sure that the lexical &RETURN doesn't use CONTROL_RETURN...? | ||
m: sub foo { sub return(|c) { say "nuh-uh!" }; return 42; say "alive" }; foo | |||
camelia | rakudo-moar 533d1a: OUTPUT«nuh-uh!alive» | ||
jnthn | I don't think it uses it at the moment, but it maybe should eventually | 13:26 | |
dalek | ast: 570c8cc | (Steve Mynott)++ | S32-io/spurt.t: fix spurt on file handle deprecation |
||
jnthn | The history on this is that Parrot never got lexical exception handler lookup | ||
But it had a different, and rather convenient, way to implement it | |||
masak | if there is a CONTROL_RETURN, but only &leave uses it, maybe rename it CONTROL_LEAVE? :P | 13:27 | |
jnthn | And we've kinda carried that forward | ||
Path of least resistance and all that | |||
andreoss | FROGGS: why does it work with \n and whitespaces between <line>? | ||
FROGGS | andreoss: maybe your token/rule line allows it? | ||
andreoss | i specified nothing about whitespaces | 13:28 | |
FROGGS | andreoss: is line a rul? | ||
andreoss | some default rule is applied | ||
FROGGS | rule* | ||
or is it a token? | 13:29 | ||
andreoss | rule | ||
FROGGS | see | ||
andreoss | with token it's actually the same | ||
FROGGS | a rule allows arbitrary whitespace at the end | ||
hmm, should not be | |||
13:31
colomon joined
|
|||
andreoss | sorry, i've been mistaken and changed rule to token only for TOP | 13:32 | |
13:36
andreoss left
|
|||
dalek | p: cd7a532 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/MultiDimArray (3 files): Get multi-dim object arrays working on JVM. |
13:41 | |
13:43
jaffa4 joined
|
|||
jaffa4 | hi | 13:43 | |
How would you copy a hash? | |||
PerlJam | jaffa4: my %hash = %other-hash; | 13:44 | |
jaffa4 | as a reference? | ||
and make it a reference? | |||
my $h = %hash; | |||
El_Che | jercos: a reference is not a copy, but an alias (changes to the "copy" will change the original) | 13:45 | |
jaffa4 | I would ike to have reference to a copy | 13:46 | |
geekosaur | what | ||
why do you need a reference? for the most part references are a perl5-ism | 13:47 | ||
jaffa4 | my %h2 = %h; my $r = %h2; | ||
Is there an easier way? | |||
geekosaur | things you shouldn't need to do don;t generally come with easier ways | 13:48 | |
jnthn | $(my % = %h) probably works | ||
13:48
molaf joined
|
|||
El_Che | (lol this is the #perl6 tab, I thought I was in #perl) | 13:49 | |
jnthn | Well, but {%h} does copy too :) | ||
13:49
aborazmeh left
|
|||
jnthn | so my $r = {%h} or so | 13:49 | |
nine | m: my %a = a => 1, b => 2; my $b = $(my % = %a); $b<b> = 1; say %a.perl; say $b.perl; | 13:51 | |
camelia | rakudo-moar 533d1a: OUTPUT«{:a(1), :b(2)}<>{:a(1), :b(1)}» | ||
13:51
khw joined
|
|||
[Coke] | Note: the TPF grants committee is looking for grants to fund. Historically we haven't gotten many perl 6 grant requests. If someone has a good idea for a grant, don't let the fact that it's six instead of five stop you. | 13:51 | |
jaffa4 | like what? | 13:52 | |
Coke | |||
Coke, what is the url? | 13:54 | ||
PerlJam | jaffa4: news.perlfoundation.org/2015/07/cal...uly-1.html | 13:55 | |
jaffa4 | jnthn: I getr postcircumfix:<{ }> not defined for type Bloc | ||
jnthn: thanks for the other version, that works | 13:59 | ||
christovchristov | hey Im consideirng using perl for a webspider but concerned about performance vs using php.. does anyone have any performance info where I can read more? | ||
PerlJam | christovchristov: sounds like you want #perl rather than #perl6 | 14:00 | |
14:01
colomon left
|
|||
christovchristov | ah. my bad. Ofcourse it was a more generic question :) cheers | 14:01 | |
PerlJam | christovchristov: no worries | ||
christovchristov: though, if I were you, I would do some profiling myself :) | 14:02 | ||
14:04
colomon joined,
itz left
14:06
n0tjack joined
14:07
colomon left
|
|||
tadzik | I'm continually surprised that Perl is one of the very few languages apparently that get stuff like gist.github.com/tadzik/80987d58011eeff3d96f right | 14:09 | |
TIL that C# and Go don't either | |||
moritz | christovchristov: in general, web spidering is IO (network) limited, not performance limit | ||
tadzik | I thought only Python is like that | ||
moritz | christovchristov: so you don't have to worry much about the performance of the implementation language | ||
PerlJam | moritz: #perl is enthusiastically telling him that. :) | 14:10 | |
moritz | ok :-) | ||
jnthn | A language that lets you manage multiple concurrent requests easily is worth having for it, though :) | ||
nine | Which I guess would be pretty much any language except PHP | ||
14:11
christovchristov left
14:13
skids joined
|
|||
dalek | p: 11dd464 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/MultiDimArray (10 files): Support native/packed multi-dim arrays on JVM. |
14:15 | |
14:18
g4 left
|
|||
masak | nine: but PHP has other nice/redeeming features, such as... ah... | 14:21 | |
... | |||
arnsholt | It's not BrainFuck, I guess? | 14:24 | |
jaffa4 | I found some weird behaviour concerning and and && see codepaste.net/yier8s | 14:25 | |
Could anyone explain that? | |||
nine | But BrainFuck should be easily compilable to a very fast binary, shouldn't it? | ||
arnsholt | Not necessarily | 14:26 | |
14:26
lizmat left
|
|||
arnsholt | It can actually be harder to optimise very low-level stuff | 14:27 | |
masak | jaffa4: before I opened that link, I went "oh, I bet jaffa4 got precedence wrong" | ||
jaffa4: I was right :D | |||
DrForr | jaffa4: && and 'and' have differing precedence. | ||
masak | m: say True and False | ||
camelia | rakudo-moar 533d1a: OUTPUT«True» | ||
masak | m: say (True and False) | ||
camelia | rakudo-moar 533d1a: OUTPUT«False» | ||
masak | jaffa4: ^ | ||
jaffa4: if you don't understand precedence, and the differing precedence between `&&` and `and`, I would heartily recommend not using `and` | 14:28 | ||
14:28
VinceDee joined
|
|||
masak | jaffa4: it *has* a good use, but people who don't understand its precedence won't use it right. | 14:28 | |
14:29
colomon joined
|
|||
jaffa4 | masak: in the example, && gave bad result and, AND gave good one | 14:29 | |
DrForr | jaffa4: && is binding tighter than you expected. | ||
jaffa4 | a change from Perl 5? | 14:30 | |
DrForr | They're different languages, yes. | ||
dalek | p: 0da71d8 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/MultiDimArrayInstanceBase.java: Good errors for size-changing ops. |
14:31 | |
p: 0743f03 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/MultiDimArrayInstanceBase.java: Do rest of positional API in MultiDimArray on JVM. |
|||
jnthn | Phew, 140 out of 188 tests. :) | ||
jaffa4 | masak: I assumed it stayed the same for Perl6, some things did not change | 14:32 | |
tadzik | I think it's the same as in Perl 5, this particular thing | ||
vendethiel | tadzik: you'll be pleased to know C#5 fixes that :) | ||
tadzik | vendethiel: oh, I am :) | ||
vendethiel: I' | |||
vendethiel: I'm also sad to realize that Unity is not likely to adopt it any time soon :P | |||
vendethiel | tadzik: Unity uses a butchered version of C# already :) | 14:33 | |
tadzik | yeah, I noticed :P | ||
on ancient mono | |||
*shudder* | |||
vendethiel | .oO( "let's remove access modifiers, they look too confusing" ) |
||
RabidGravy | I thought that 'and' was lower precedence than '&&' in perl 5 too | ||
tadzik | access modifiers? | ||
masak | jaffa4: it did stay the same. | 14:34 | |
jaffa4: Perl 5 has exactly the same distinction between `&&` and `and`. I suggest you learn it. | |||
skids | jnthn++ cruising along on native multidim... guess I'd better dust off the Keccak specs. | ||
masak | jaffa4: or, if you don't feel like learning it (which is fine), I suggest only using `&&`. | ||
vendethiel | tadzik: "public void X()" <- only "void X()" works in unity# | ||
hoelzro | o/ #perl6 | 14:35 | |
lucasb | Good monday to everyone. I can use .subst directly, but sometimes I felt like wanting to use s/// with .subst semantics, not .subst-mutate. Do you think there is room for an adverb that does that, just like P5's s///r ? (I know that :r is already taken for something else) | ||
vendethiel | lucasb: I asked about the same some time ago :P | 14:36 | |
tadzik | vendethiel: nah, both work | ||
skids | Wasn't that S///? | ||
jaffa4 | masak: I used &&, that did not seem to work | ||
vendethiel | tadzik: really? there's something they changed wrt that, but I can't remember right now :). I only used unity for 2 weeks | ||
tadzik | I mean, I even think that the latter might not, if you expect it to be public | ||
vendethiel: certain magic methods do that, yeah :D | 14:37 | ||
like void Awake(), void Update() etc | |||
those Unity fetches via reflection and stuff | |||
jaffa4 | masak: as in Perl 5 | ||
ShimmerFairy | jaffa4: As I understand the code, you need parens around defined (stuff) , so (defined (stuff)) && morestuff | ||
tadzik | actually, not sure if they break if you make them public explicitely, but knowing Unity, they might :P | ||
vendethiel | tadzik: no, I was right. it doesn't work like that in c#. | ||
tadzik: in unity#, no access modifier = public, not in c# | 14:38 | ||
tadzik | oh | ||
huh | |||
class attributes for example don't show up in the editor if they're not public | |||
lucasb | vendethiel: I must read the logs more often. :) What was the answer when you asked about this? | ||
14:38
tinyblak left
|
|||
tadzik | I'd be surprised if it recognized private methods as public and callable then | 14:38 | |
14:39
lizmat joined
|
|||
masak | jaffa4: you're not 100% successful in providing golfed examples. this makes it harder to help you. | 14:39 | |
jaffa4: it also makes it harder for *you* to see what the problem is with your code, since it's still tangled with all these inessentials. | 14:40 | ||
jaffa4: if you put whitespace between `defined` and the `(...)` thing, that means something different than `defined(...)` | |||
jaffa4: *that* is the difference between Perl 5 and Perl 6 that's tripping you up. | |||
lucasb | skids: I tried S///, but I don't understand how it works | ||
masak | jaffa4: thanks to ShimmerFairy for putting me on the right track. I didn't see that before. | 14:41 | |
lucasb | skids: I didn't know it existed :) | ||
vendethiel | tadzik: not sure. but all the methods you define for unity are declared with "public" | ||