»ö« 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 moritz on 25 December 2014.
masak lue: let's just say I'm glad I'm not facing that choice ;) 00:00
lue :)
00:02 kurahaupo left 00:03 Gruber joined 00:07 nyuszika7h_ joined, jantore joined, masak__ joined 00:09 Ugator left, nyuszika7h left, [Sno] left, woshty left, wtw left, leont left, davido_ left, Grrrr left, masak left, jantore_ left, avar left, leont joined 00:10 masak__ is now known as masak, davido_ joined 00:11 woshty joined 00:12 wtw joined 00:14 avar joined, avar left, avar joined
dalek kudo/nom: 4cd1668 | hoelzro++ | src/Perl6/Grammar.nqp:
Recommend attributes in addition to similar lexicals

We currently have a mechanism for suggesting similarly named lexical variables if someone mistypes a variable name:
   my $name = 'Rob';
   say "Hello, $nam!";
   # output: Variable '$nam' is not declared. Did you mean '$name'?
I personally often make the mistake of typing '$name' when I mean to refer to the member of an object '$!name'. This commit adds $!name as a suggestion if you're in a context that has member variables and has a member variable $name.
00:18
masak ooh, nice :)
00:20 clkao joined 00:21 rurban left
Mouq m: ole Bar { method foo {...} }; class Foo does Bar { has $.foo }; my Bar @a = Foo.new(foo => 5); say @a # :D 00:24
camelia rakudo-moar e2c18c: OUTPUT«Useless declaration of a has-scoped method in mainline (did you mean 'my method foo'?)␤===SORRY!=== Error while compiling /tmp/HSZ5T9Sc2l␤Invalid typename␤at /tmp/HSZ5T9Sc2l:1␤------> ar { method foo {...} }; class Foo does …»
Mouq m: role Bar { method foo {...} }; class Foo does Bar { has $.foo }; my Bar @a = Foo.new(foo => 5); say @a # :D
camelia rakudo-moar e2c18c: OUTPUT«Foo.new(foo => 5)␤»
Mouq m: role Bar { method foo {...} }; class Foo does Bar { has $.foo }; my @a = [Foo.new(foo => 5), Foo.new(foo => 42)], [Foo.new(foo => 12), Foo.new(foo => 73)]; @a.map(-> Bar @f { say @f }) # :(
camelia rakudo-moar e2c18c: OUTPUT«Unhandled exception: Type check failed in binding @f; expected 'Positional[Bar]' but got 'Array'␤ at <unknown>:1 (/home/camelia/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:13899 (/home/ca…»
Mouq m: role Bar { method foo {...} }; class Foo does Bar { has $.foo }; my @a = $(my Bar @ = Foo.new(foo => 5), Foo.new(foo => 42)), $(my Bar @ = Foo.new(foo => 12), Foo.new(foo => 73)); @a.map(-> Bar @f { say @f }) # :/
camelia rakudo-moar e2c18c: OUTPUT«Foo.new(foo => 5) Foo.new(foo => 42)␤Foo.new(foo => 12) Foo.new(foo => 73)␤»
Mouq Would 6pe fix that middle example? 00:25
00:25 gfldex left
Mouq *Is the goal of 6pe... 00:25
masak lue: here's my solution, commented: gist.github.com/masak/db655cb7ab27454cf15c 00:28
lue: it's slow. takes a few hours to run.
Mouq has a totally different idea for a solution, but has been taking a 'dialectical' approach to writing the program, so still hasn't actually gotten there 00:29
masak lue: I'm secretly proud of my idea to "melt" walls. my original impulse was to "flood-fill" cells, but melting is shorter to implement. 00:30
lue Looks nice and compact :) .
masak I kind of iterated my way there. 00:31
00:31 kaare__ left 00:33 clkao left 00:34 ggherdov left 00:35 timotimo left, kurahaupo joined, clkao joined 00:36 ggherdov joined
lue Yeah, I still have that weird duplicate entry issue with an updated rakudo. Hmm... 00:37
00:38 ab5tract left 00:41 Spot__ joined
lue Huh, I got something interesting running ».WHICH on the set I create. 00:41
It comes back as ("Parcel|(Int|0)(Scalar|81064920)", "Parcel|(Int|0)(Int|1)", "Parcel|(Int|0)(Int|2)", "Parcel|(Int|2)(Scalar|81064920)", "Parcel|(Int|2)(Int|1)", ... 00:42
(well, .keys».WHICH I should say) 00:43
00:46 ggherdov left
Mouq masak: Oh wait. Looking at your comments, your algorithm is exactly what I was going to do. I don't actually want to read the code it since I consider that cheating :P 00:46
masak: Though we're definitely going about the algorithm in different ways 00:47
00:51 bbkr joined, ggherdov joined 00:53 berekuk_ joined 00:55 berekuk left
lue Oh, I think those Scalar| things come from having return statements like return ($row, $col; $row, $col + 1); Anyone know how to deal with that? 00:55
Mouq +$row, +$col? 00:58
lue Yep, adding + 0 after every bare variable in those kinds of returns works, like I thought. (So the two C<$row>s and one C<$col> in that example line). That's... really bad.
00:58 dayangkun joined
lue Mouq: they're assigned things like my $row = +$1 % $GRID_SIZE; I don't think converting them to numeric is going to help. 00:59
00:59 dayangkun left
lue Oh, +$var works too. But still, that's terrible. 00:59
01:00 dayangkun joined 01:01 dayangkun left
adu hi lue 01:01
lue o/
I'm leaving them all as $var + 0 though, because that makes it more obviously that there's something really wrong happening.
01:01 dayangkun joined
lue *obvious 01:01
01:02 timotimo joined 01:03 dayangkun left, dayangkun joined 01:06 avalenn left 01:07 avalenn joined
hoelzro m: sub greet($name) { say "hello $name" } ; greet 'Rob' 01:15
camelia rakudo-moar e2c18c: OUTPUT«hello Rob␤»
hoelzro er
m: sub greet($name) { say "hello $nam" } ; greet 'Rob'
camelia rakudo-moar e2c18c: OUTPUT«===SORRY!=== Error while compiling /tmp/aCVKDKpy38␤Variable '$nam' is not declared␤at /tmp/aCVKDKpy38:1␤------> sub greet($name) { say "hello $nam⏏" } ; greet 'Rob'␤ expecting any of:␤ postfix␤»
hoelzro there we go 01:16
I'm trying to get that to other $name as a suggestion, but the suggestion code is trying to "force a value" out of $name, and it can't
I'm guessing because it doesn't have a value until that sub is called?
01:19 yeahnoob joined
TimToady the compiler shouldn't care about that 01:19
m: sub greet($namename) { say "hello $namenam" } 01:20
camelia rakudo-moar e2c18c: OUTPUT«===SORRY!=== Error while compiling /tmp/qjHdSawVYo␤Variable '$namenam' is not declared␤at /tmp/qjHdSawVYo:1␤------> b greet($namename) { say "hello $namenam⏏" }␤ expecting any of:␤ postfix␤»
TimToady m: sub greet($namename) { say "hello ", $namenam }
camelia rakudo-moar e2c18c: OUTPUT«===SORRY!=== Error while compiling /tmp/kWpJ7h8lv6␤Variable '$namenam' is not declared␤at /tmp/kWpJ7h8lv6:1␤------> reet($namename) { say "hello ", $namenam⏏ }␤ expecting any of:␤ postfix␤»
moritz m: my $namename; say $namenam
camelia rakudo-moar e2c18c: OUTPUT«===SORRY!=== Error while compiling /tmp/nW8qUlUwNx␤Variable '$namenam' is not declared. Did you mean '$namename'?␤at /tmp/nW8qUlUwNx:1␤------> my $namename; say $namenam⏏<EOL>␤ expecting any of:␤ p…»
TimToady well, that wouldn't be the only thing disabled inside subs 01:21
m: 42; 43;
camelia rakudo-moar e2c18c: OUTPUT«WARNINGS:␤Useless use of constant integer 42 in sink context (line 1)␤»
TimToady sub foo { 42; 43 }
masak 'night, #perl6
TimToady m: sub foo { 42; 43 }
camelia ( no output )
moritz huh.
bug.
TimToady wonders if it's related 01:22
moritz hoelzro: what do you mean by "but the suggestion code is trying to "force a value" out of $name,"? where is that code? 01:23
hoelzro moritz: walk_symbols in Perl6::Word
*World
moritz hoelzro: yes, that looks wrong-ish 01:26
01:27 dalek left 01:28 dalek joined, ChanServ sets mode: +v dalek
moritz hoelzro: fun fact: the value is being passed to the sub returned from make_lefenshtein_evaluator... 01:28
hoelzro: ... which promptly ignores it.
hoelzro: are you going to throw that out, or should I? 01:29
adu m: role R {}; enum E does R < e1 e2 >; my R $x = E::e1; say $x
01:29 lumimies left
camelia rakudo-moar e2c18c: OUTPUT«Type check failed in assignment to '$x'; expected 'R' but got 'E'␤ in block <unit> at /tmp/nI8ZG_ZR5D:1␤␤» 01:29
01:29 lumimies joined
adu so I can't specify enum roles 01:30
01:30 dayangkun left
TimToady why would you expect a trait on the enum type to distribute to its mappings? 01:38
I guess I can kinda see it...
m: role R {}; enum E (e1 => (0 but R), e2 => (1 but R)); my R $x = E::e1; say $x 01:40
camelia rakudo-moar 4cd166: OUTPUT«===SORRY!=== Error while compiling /tmp/hhazmEp9w_␤Type error in enum. Got 'Int+{R}' Expected: 'Int+{R}'␤at /tmp/hhazmEp9w_:1␤------> num E (e1 => (0 but R), e2 => (1 but R))⏏; my R $x = E::e1; say $x␤»
01:40 [particle] joined
TimToady weird 01:40
01:41 timotimo left, timotimo joined
TimToady m: role R {}; enum E does R < e1 e2 >; E::e1.WHAT.say 01:41
camelia rakudo-moar 4cd166: OUTPUT«(E)␤»
TimToady m: role R {}; enum E < e1 e2 >; my R $x = E::e1 but R; say $x 01:42
camelia rakudo-moar 4cd166: OUTPUT«No such method 'mixin' for invocant of type 'Perl6::Metamodel::EnumHOW'␤ in sub infix:<but> at src/gen/m-CORE.setting:19575␤ in block <unit> at /tmp/u7fr2FDFvj:1␤␤»
01:42 [particle]1 left
TimToady enums are kind of an odd corner of the language 01:42
they're really just a way to declare a bunch of constants, and don't unify easily with any other types of types 01:45
moritz hoelzro: ok, getting rid of the value entirely a bit trickier, because suggest_typename relies on the value to check if something is a type or not 01:49
hoelzro: a possible solution is to first check if $name starts with a sigil. If yes, it's not a type 01:50
hoelzro: and in the second step, check if there is a compile time value. If yes, check if it's concrete. If no, it's not a type 01:51
01:52 Mouq left, adu left
moritz nqp-m: say(nqp::substr('', 0, 1)) 01:54
camelia nqp-moarvm: OUTPUT«␤»
02:04 BenGoldberg joined, BenGoldberg left 02:05 BenGoldberg joined
moritz I have a local patch that does that, but it doesn't make the parameter appear in the "did you mean" :( 02:08
erm wait, I messed it up 02:10
no wonder
but now, sleep again&
dalek kudo/suggestion-cleanup: 239985e | moritz++ | src/Perl6/World.nqp:
Try to include parameters in "did you mean"-suggestions for mis-spelled lexicals
02:12
02:13 kurahaupo left 02:17 araujo left 02:18 araujo joined 02:21 Mouq joined
hoelzro moritz: I went to go exercise, I was going to see if passing symbols w/o a value would work anyway 02:29
thanks for putting the work in!
02:33 mr-foobar left 02:36 adu joined 02:41 Rounin joined 02:47 kurahaupo joined 02:48 integral left, hobbs left, mephinet left, woolfy left, [Tux] left, flussence left, lsm-desktop left, yogan left 02:49 woolfy joined 02:50 Spot__ left 02:51 [Tux] joined 02:52 Spot__ joined 02:54 eternaleye left, eternaleye joined
dalek kudo/suggestion-cleanup: 2aebe70 | hoelzro++ | src/Perl6/World.nqp:
Get lexical suggestions to include parameters
02:55
hoelzro moritz: I worked with your change to get parameters to be included in suggestions
I'm not sure how correct my change is, so I'd like you and others to vet it 02:56
hoelzro starts work on Mojo::DOM
02:57 integral joined, integral left, integral joined, hobbs joined, Juerd left 02:58 colomon left 03:00 colomon joined 03:02 lsm-desktop joined
tadzik heh. Couldn't sleep, started thinking about fosdem talk. "I'll just write down some thoughts I have so I don't forget about them overnight" 03:05
Turned into a 1100+ word essay :o
hoelzro heh
03:06 Juerd joined
adu can I specify roles on roles? 03:06
hoelzro adu: do you mean to ask if roles can consume other roles? 03:07
adu like "role A does B does C { ... }" 03:08
hoelzro yeah, you can
03:10 hobbs left 03:11 hobbs joined 03:13 woolfy left, mephinet joined 03:17 yogan joined
hoelzro if you make $obj; in your actions, that becomes the return value for Grammar.parse, right? 03:18
tadzik .parse.ast I think 03:20
03:20 flussence joined, Juerd left
adu I give up on ASTs 03:20
there are only 2 AST structures that seem to make sense, 1 or more classes for every production in the grammar, and the other is just using Op for everything, which reminds me too much of S-expressions 03:22
03:23 clkao left 03:24 woolfy joined 03:26 noganex_ joined 03:27 timotimo left
skids I think .ast is useful for pre-pruning to remove uneeded levels of the grammar tree mostly. 03:27
But yeah you pretty much have to have an action for every rule. 03:28
Some way to ameliorate that would be nice. 03:29
03:29 noganex left, clkao_ joined
adu skids: I think the default Match builder is pretty awsome 03:30
03:34 Juerd joined
adu hoelzro: kinda 03:40
hoelzro: I don't remember when I learned, or why, but I have method TOP($/) { make $/.values.[0].ast; } at the top of all of my Actions classes
03:42 timotimo joined
hoelzro ah, yes 03:43
thanks
03:59 hobbs left, BenGoldberg left 04:03 hobbs joined 04:09 colomon left 04:11 yogan left 04:13 leont left 04:15 colomon joined, yogan joined 04:16 hobbs left 04:28 kurahaupo left 04:34 hobbs joined 04:36 yoleaux left, yoleaux joined, ChanServ sets mode: +v yoleaux 04:37 kaleem joined 04:40 lumimies left, Alina-malina left, lumimies joined 04:41 Alina-malina joined 04:43 integral left, integral joined, integral left, integral joined 04:46 mephinet left, mephinet joined 04:54 Rounin left 05:08 kaleem left 05:25 hobbs left 05:30 hobbs joined 05:42 sirdancealot joined 05:51 dj_goku left 05:52 mephinet left 05:53 mephinet joined 05:55 dj_goku joined, dj_goku left, dj_goku joined 05:58 Mouq left 06:00 konsolebox joined 06:06 telex left 06:08 telex joined 06:11 hobbs left 06:13 Alina-malina left, Rounin joined, hobbs joined 06:18 nyuszika7h_ is now known as nyuszika7h 06:27 mephinet left, mephinet- joined 06:28 adu_ joined, adu left, adu_ is now known as adu 06:36 sirdancealot left 06:37 yeahnoob left 06:40 mr-foobar joined 06:44 nyuszika7h left 06:47 nyuszika7h_ joined, nyuszika7h_ is now known as nyuszika7h 06:52 Alina-malina joined 06:59 IllvilJa left, IllvilJa joined 07:00 dayangkun joined
moritz \o 07:02
07:04 FROGGS_ left 07:11 Psyche^ joined 07:14 adu left 07:15 dayangkun left, Patterner left 07:21 yeahnoob joined 07:22 yeahnoob left, yeahnoob joined 07:26 anaeem1 joined 07:29 kaleem joined, gfldex joined 07:33 Sqirrel left 07:37 kaleem left, kaleem joined 07:41 konsolebox left, grondilu joined
grondilu m: use MONKEY_TYPING; augment class Mu { method foo { } }; Mu.foo 07:42
camelia ( no output )
07:42 Juerd left 07:43 Juerd joined
grondilu got a weird error trying to something like, but can't reproduce it. Nevermind. 07:44
grondilu meant "trying somthing like that"
07:45 FROGGS joined, Alina-malina left, konsolebox joined
grondilu oh I see 07:45
m: use MONKEY_TYPING; augment role Mu { method foo { } }; Mu.foo
camelia rakudo-moar 4cd166: OUTPUT«===SORRY!===␤Cannot find method 'set_body_block'␤»
grondilu ^I wrote "role" instead of "class" 07:46
FROGGS m: use MONKEY_TYPING; augment role Int { method foo { } }; Int.foo
camelia rakudo-moar 4cd166: OUTPUT«===SORRY!===␤Cannot find method 'set_body_block'␤»
FROGGS nice :o)
jnthn augment role is meant to just say you canät 07:47
FROGGS jnthn: you've got a german keyboard O.o 07:48
jnthn no, Swedish dammit
FROGGS *g*
jnthn maps the keyboard with a UK layout so today's live coding demos will actually work out :)
FROGGS is the saying 'old Swede' something that works outside of Germany too? 07:49
jnthn I don't know it :) 07:50
FROGGS k :o)
dict.cc translates it to "Gosh!" :D 07:51
masak: so in Germany you've got to say "Alter Schwede!" instead of "Gosh!" :o)
07:52 [Sno] joined 07:58 Alina-malina joined 08:01 gfldex left 08:06 IllvilJa left 08:09 IllvilJa joined 08:10 konsolebox left 08:15 mvuets joined 08:19 kjs_ joined 08:20 darutoko joined 08:24 djanatyn left 08:30 kaleem left, kaleem joined 08:31 rurban joined 08:32 kjs_ left 08:38 djanatyn joined 08:39 mr-foobar left 08:48 zakharyas joined 09:04 andreoss joined
andreoss are traits are supposed to be used with destructuring signatures? 09:06
m: multi car($x, [$y, @ys] where $x == $y) {1}; say car 1, [1,2,3]; 09:07
camelia rakudo-moar 4cd166: OUTPUT«Cannot call 'infix:<==>'; none of these signatures match:␤:(Any $?)␤:(Any \a, Any \b)␤:(Real \a, Real \b)␤:(Int:D \a, Int:D \b)␤:(int $a, int $b)␤:(Num:D \a, Num:D \b --> Bool)␤:(num $a, num $b --> Bool)␤:(Rational:D \a, Rational:D \b)␤:(…»
09:07 kjs_ joined, kjs_ left 09:10 rindolf joined 09:20 dakkar joined 09:26 fhelmberger joined, mvuets left, mvuets joined 09:39 yeahnoob left
dalek kudo/nom: b78ed35 | (Yun SangHo)++ | src/core/IO/Socket/Async.pm:
It should be a Blob
09:44
kudo/nom: d694913 | jnthn++ | src/core/IO/Socket/Async.pm:
Merge pull request #352 from foollbar/nom

It should be a Blob
09:50 virtualsue joined 09:57 moritz left, moritz joined 10:02 Ovid joined, Ovid is now known as CurtisOvidPoe
CurtisOvidPoe Morning all. 10:03
10:06 lumimies left 10:07 mr-foobar joined, lumimies joined 10:13 abraxxa joined
moritz \o 10:22
tadzik 'morning
sergot hi o/ 10:23
10:26 Juerd left 10:27 Juerd joined 10:31 kjs_ joined 10:33 kjs_ left 10:36 kjs_ joined 10:38 Ugator joined, kjs_ left
dalek kudo/nom: 239985e | moritz++ | src/Perl6/World.nqp:
Try to include parameters in "did you mean"-suggestions for mis-spelled lexicals
10:44
kudo/nom: 2aebe70 | hoelzro++ | src/Perl6/World.nqp:
Get lexical suggestions to include parameters
kudo/nom: 5943c82 | moritz++ | src/Perl6/World.nqp:
Merge branch 'suggestion-cleanup' into nom
FROGGS ohh nice
moritz .tell hoelzro I merged branch suggestion-cleanup. Thanks for the nice collaboration.
yoleaux moritz: I'll pass your message to hoelzro.
moritz hoelzro++ did most of the debugging and tracing, I just refactored a bit 10:50
andreoss m: multi car($x, [$y, @ys] where $x == $y) {1}; say car 1, [1,2,3];
camelia rakudo-moar d69491: OUTPUT«Cannot call 'infix:<==>'; none of these signatures match:␤:(Any $?)␤:(Any \a, Any \b)␤:(Real \a, Real \b)␤:(Int:D \a, Int:D \b)␤:(int $a, int $b)␤:(Num:D \a, Num:D \b --> Bool)␤:(num $a, num $b --> Bool)␤:(Rational:D \a, Rational:D \b)␤:(…»
andreoss could that be a bug?
moritz m: say 1 == [1, 2, 3] 10:51
camelia rakudo-moar d69491: OUTPUT«False␤»
moritz m: multi car($x, [$y, *@ys] where $x == $y) {1}; say car 1, [1, 2, 3] 10:52
camelia rakudo-moar d69491: OUTPUT«Cannot call 'infix:<==>'; none of these signatures match:␤:(Any $?)␤:(Any \a, Any \b)␤:(Real \a, Real \b)␤:(Int:D \a, Int:D \b)␤:(int $a, int $b)␤:(Num:D \a, Num:D \b --> Bool)␤:(num $a, num $b --> Bool)␤:(Rational:D \a, Rational:D \b)␤:(…»
moritz m: multi car($x, [$y, *@ys] where { $x == $y }) {1}; say car 1, [1, 2, 3]
camelia rakudo-moar d69491: OUTPUT«Cannot call 'infix:<==>'; none of these signatures match:␤:(Any $?)␤:(Any \a, Any \b)␤:(Real \a, Real \b)␤:(Int:D \a, Int:D \b)␤:(int $a, int $b)␤:(Num:D \a, Num:D \b --> Bool)␤:(num $a, num $b --> Bool)␤:(Rational:D \a, Rational:D \b)␤:(…»
moritz huh
m: multi car($x, [$y, *@ys] where { say (:$x, :$y).perl; $x == $y }) {1}; say car 1, [1, 2, 3]
camelia rakudo-moar d69491: OUTPUT«("x" => 1, "y" => Mu)␤Cannot call 'infix:<==>'; none of these signatures match:␤:(Any $?)␤:(Any \a, Any \b)␤:(Real \a, Real \b)␤:(Int:D \a, Int:D \b)␤:(int $a, int $b)␤:(Num:D \a, Num:D \b --> Bool)␤:(num $a, num $b --> Bool)␤:(Rational:D…»
moritz m: multi car($x, @ [$y, *@ys] where { say (:$x, :$y).perl; $x == $y }) {1}; say car 1, [1, 2, 3] 10:53
camelia rakudo-moar d69491: OUTPUT«("x" => 1, "y" => Mu)␤Cannot call 'infix:<==>'; none of these signatures match:␤:(Any $?)␤:(Any \a, Any \b)␤:(Real \a, Real \b)␤:(Int:D \a, Int:D \b)␤:(int $a, int $b)␤:(Num:D \a, Num:D \b --> Bool)␤:(num $a, num $b --> Bool)␤:(Rational:D…»
10:53 anaeem1__ joined
moritz m: sub f($x, [$y, *@ys]) { say (:$x, :$y, :@ys).perl }; f 1, [2, 3, 4] 10:54
camelia rakudo-moar d69491: OUTPUT«("x" => 1, "y" => 2, "ys" => [3, 4])␤»
moritz m: sub f($x, [$y, *@ys] where { say $y.perl } ) { say (:$x, :$y, :@ys).perl }; f 1, [2, 3, 4] 10:55
camelia rakudo-moar d69491: OUTPUT«Cannot call method 'perl' on a null object␤ in sub f at /tmp/UT7XBanYbi:1␤ in block <unit> at /tmp/UT7XBanYbi:1␤␤»
10:55 anaeem1__ left, anaeem1__ joined
moritz andreoss: seems like variables extracted from subsignatures aren't available in where-blocks 10:55
andreoss: and yes, that's a bug
10:56 anaeem1 left
FROGGS m: multi car($x, [$y, @ys] where $x == 1) {1}; say car 1, [1, [2, 3]]; 10:56
camelia rakudo-moar d69491: OUTPUT«1␤»
FROGGS m: multi car($x, [$y, @ys] where $x == $y) {1}; say car 1, [1, [2, 3]];
camelia rakudo-moar d69491: OUTPUT«Cannot call 'infix:<==>'; none of these signatures match:␤:(Any $?)␤:(Any \a, Any \b)␤:(Real \a, Real \b)␤:(Int:D \a, Int:D \b)␤:(int $a, int $b)␤:(Num:D \a, Num:D \b --> Bool)␤:(num $a, num $b --> Bool)␤:(Rational:D \a, Rational:D \b)␤:(…»
moritz who want's to rakudobug it? 10:57
FROGGS I can
moritz FROGGS++ 10:58
masak good noon, #perl6 11:08
[Tux] what is p6' view on %ENV? do I need to declare it?
lizmat %*ENV
it's a dynamic variable, per scope overridable 11:09
[Tux] ok, thnx
lizmat m: say %*ENV<HOME>
camelia rakudo-moar d69491: OUTPUT«/home/camelia␤»
masak FROGGS: never heard about "Alter Schwede!" before. 11:10
moritz you didn't? alter Schwede! 11:14
11:19 denis_boyun_ joined
FROGGS *g* 11:20
dalek kudo/nom: f1dec12 | lizmat++ | src/core/array_slice.pm:
Documentation to prevent trying to opt (again)
11:21
11:24 kaare__ joined 11:25 kjs_ joined 11:27 kjs_ left
CurtisOvidPoe Is grep supposed to generate a lazy list by default? 11:28
lizmat yes
11:29 kjs_ joined
CurtisOvidPoe m: my @primes = grep { .is-prime }, 1 .. Inf; say @primes[^20] 11:29
That hangs on my box.
What am I missing?
camelia rakudo-moar d69491: OUTPUT«(timeout)»
tadzik a colon :)
lizmat m: my @primes := grep { .is-prime }, 1 .. Inf; say @primes[^20] # a colon
camelia rakudo-moar d69491: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71␤»
11:29 kjs_ left
CurtisOvidPoe And here I was just about to ask where to insert my colon. Glad I thought better of it. 11:30
Could someone point me to the docs on that so I can read up?
lizmat assignment is eager, therefore it will try to fill the array first
11:31 andreoss left
psch S07:The laziness of some common operations 11:31
synopsebot Link: perlcabal.org/syn/S07.html#The_lazi...operations
psch hm, binding isn't common :) 11:32
11:32 andreoss joined
lizmat S02:2184 11:32
synopsebot Link: perlcabal.org/syn/S02.html#line_2184
11:32 anaeem1__ left, anaeem1 joined
[Tux] m: $+="0";s{^(\d+)$}=sprintf "%3d -",$_ 11:35
camelia rakudo-moar d69491: OUTPUT«Cannot call 'subst-mutate'; none of these signatures match:␤ in method subst-mutate at src/gen/m-CORE.setting:4177␤ in block <unit> at /tmp/txz3CVzXV_:1␤␤»
CurtisOvidPoe psch: those docs read that assignment via ‘=‘ “will eagerly evaluate the return value from foo() to place elements into @a, stopping only when encountering something that is "known infinite" “
Except that I would think 1..Inf is known infinite :)
[Tux] m: $_="0";s{^(\d+)$}=sprintf "%3d -",$_
camelia ( no output )
CurtisOvidPoe A doc error, or do I just not understand it? 11:36
[Tux] m: $_=0;s{^(\d+)$}=sprintf "%3d -",$_
camelia rakudo-moar 5943c8: OUTPUT«Cannot call 'subst-mutate'; none of these signatures match:␤ in method subst-mutate at src/gen/m-CORE.setting:4177␤ in block <unit> at /tmp/loCjFTpO5G:1␤␤»
[Tux] that one. It obviously is numeric 11:37
andreoss rakudobug is working?
it seems abandoned
lizmat andreoss: huh? I saw one appear just now?
andreoss lizmat: it was mentioned above 11:38
[Tux] am i forced to stringify?
lizmat m: $_="0";s{^(\d+)$}=sprintf "%3d -",$_; .say 11:40
camelia rakudo-moar 5943c8: OUTPUT« 0 -␤»
lizmat what was your plan with $+ ??
andreoss lizmat: i mean the utility, is it working?
lizmat andreoss: ah, that, no idea 11:41
[Tux] $+ was a typo
lizmat well, that's a case of LTA error then
[Tux] i had a 0 instead of a "0" and got that error
and /me was surprised 11:42
psch CurtisOvidPoe: you're right, i think we don't really have the "mostly *" levels yet
lizmat [Tux]: looks like a bug, care to rakudobug it? 11:44
CurtisOvidPoe psch: thanks!
[Tux] don't know: $_ was of type int 11:45
11:45 dwarring left
[Tux] hoiw do I rakudobug that? 11:45
CurtisOvidPoe mailto:rakudobug@perl.org 11:47
[Tux] mailed 11:48
lizmat [Tux]++
[Tux] what is perl6' version of caller ()? 11:52
lizmat m: sub a { say callframe(1) }; a 11:55
camelia rakudo-moar 5943c8: OUTPUT«CallFrame.new(level => 3, annotations => ("line" => "1", "file" => "/tmp/sIx8TFLJag").hash, my => EnumMap.new("\$!", Nil, "\$/", Nil, "\$_", Nil, "GLOBALish", GLOBAL, "EXPORT", EXPORT, "\$?PACKAGE", GLOBAL, "::?PACKAGE", GLOBAL, "\&a", sub a () { #`(Sub|75…»
lizmat [Tux]: if you just want access to the scope: 11:56
m: sub a { say CALLER::.keys }; a
camelia rakudo-moar 5943c8: OUTPUT«$! $/ $_ GLOBALish EXPORT $?PACKAGE ::?PACKAGE &a $=pod !UNIT_MARKER␤»
11:56 colomon left
lizmat m: my $a = "foo"; sub a { say CALLER::.keys }; a 11:56
camelia rakudo-moar 5943c8: OUTPUT«$a $! $/ $_ GLOBALish EXPORT $?PACKAGE ::?PACKAGE &a $=pod !UNIT_MARKER␤»
11:56 colomon joined
lizmat m: my $a = "foo"; sub a { say OUTER::<$a> }; a # if you're interested in the outer scope, not the callers 11:58
camelia rakudo-moar 5943c8: OUTPUT«foo␤»
lizmat m: my $a = "foo"; sub a { say CALLER::<$a> }; a # can only access dynamic vars
camelia rakudo-moar 5943c8: OUTPUT«Cannot access '$a' through CALLER, because it is not declared as dynamic␤ in method at_key at src/gen/m-CORE.setting:10974␤ in sub postcircumfix:<{ }> at src/gen/m-CORE.setting:3049␤ in sub a at /tmp/rjm0cWzow4:1␤ in block <unit> at /tmp/rjm0cW…»
lizmat m: my $a is dynamic = "foo"; sub a { say CALLER::<$a> }; a # can only access dynamic vars
camelia rakudo-moar 5943c8: OUTPUT«foo␤»
11:59 Ugator left 12:01 jack_rabbit left
dalek kudo/nom: db3656f | lizmat++ | src/core/Str.pm:
Remove unneeded stub
12:04
12:18 kjs_ joined
[Tux] sorry to keep bothering. How do I do «@ch[$i..$#ch].perl» (@ch elements $i (int) to last) 12:22
lizmat, I wanted the line number of the caller: my $line = callframe (1).annotations<line>; 12:23
lizmat $i .. *-1 12:24
[Tux]: ^^
12:26 mr-foobar left
andreoss sub foo(@xs as [$x,$y,$z]).. can i do something like this? 12:28
12:31 yeahnoob joined
jnthn Note that destructuring happens *after* where clauses are applied 12:34
If you want to do a where on the destructured values, put it *inside* the sub-signature
It's not a bug; it would be weird if we destructured data that failed to meet type constraints on the thing being destructured. So the current ordering is intended. 12:35
andreoss: Why the as? Just write @xs [$x, $y, $z] 12:36
andreoss thanks 12:37
12:39 leont joined
lizmat jnthn: I was under the impression that using \a in a signature in $a would be faster always 12:40
jnthn: am I wrong? (looking at a benchmark here that says otherwise :-(
12:43 grondilu left
lizmat jnthn: please scratch that thought :-) 12:44
12:46 grondilu joined 12:49 mr-foobar joined, skids left
timotimo iirc \a would not force a new Scalar to be created if something not in a scalar was passed OSLT 12:56
12:56 anaeem1 left
lizmat I'm, looking at optimizing postcircumfix:<[ ]>( \SELF, Int $pos ) 12:59
I see a ~20% loss in performance if I change the $pos to \pos 13:00
benchmark: my @a = ^10; my int $a=@a.end; for ^1000000 { @a[$a] }
I guess I should profile the different code :-) 13:01
moritz lizmat: you should use a loop with a native int counter for benchmarking 13:03
lizmat: otherwise you're really benchmarking 'for' iteration, not the array access
lizmat well, yes, but if the code is identical otherwise, the diff should be caused by the access, no? 13:06
13:06 colomon left
FROGGS only the percentage improvement will be different for int vs. Int I'd say 13:07
(in case int and Int have the same at_pos candidate) 13:08
lizmat they do
it doesn't change when I use a native int as the index, it does when I use Int
lizmat is going to take out the <0 check to see if that makes the diff 13:09
13:09 colomon joined 13:12 ab6tract joined
lizmat yup, it's the combination with the <0 check 13:13
13:27 dayangkun joined
hoelzro o/ #perl6 13:32
yoleaux 10:44Z <moritz> hoelzro: I merged branch suggestion-cleanup. Thanks for the nice collaboration.
hoelzro moritz: thanks for the merge, and the help! 13:33
13:39 [TuxCM] joined
[TuxCM] debugging seems very very costly. removing the «$opt_v and progress (arguments);» lines gains me 30%!!! 13:40
jnthn lizmat: The $ sigil can help performance in some cases.
ab6tract has anyone seen this error during a moar build? "Can't compile simple gcc probe, so something is badly wrong" 13:41
jnthn lizmat: iirc, it knows it's doing a Scalar assignment.
lizmat: And produces better code for that.
lizmat ok 13:43
13:49 ggoebel111111112 left
ab6tract jnthn: i've found the code which emits that error, but i haven't figured out what might be missing 13:50
gcc works in normal operations, perl5 compiles fine for instance
13:53 kaare__ left
[TuxCM] do we have something like Test::More already? 13:57
lizmat m: use Test; ok 1, "foo"
camelia rakudo-moar db3656: OUTPUT«ok 1 - foo␤»
eiro TuxCM, Test
it has the basic at least
[TuxCM] the basic should do for a start :) 13:58
expect new bug discoveries
lizmat [TuxCM]: keep them coming! :-)
14:00 Rounin left
[TuxCM] Whooooooah, no __END__ :/ 14:01
how do I mark "All and beyond is comment". use =for something ?
tadzik it's =END or so
FROGGS it needs to have a matching =end though
ohh 14:02
m: say 42␤=END␤hurz␤
camelia rakudo-moar db3656: OUTPUT«42␤»
FROGGS nice
hoelzro [TuxCM]: =finish
FROGGS O.o
m: say 42␤=finish␤hurz␤
camelia rakudo-moar db3656: OUTPUT«42␤»
FROGGS both?
tadzik possibly both 14:03
lizmat
.oO( there is more than one way to end it )
[TuxCM] =finish WFM. thanks
FROGGS m: say 42␤=swedish␤hurz␤
camelia rakudo-moar db3656: OUTPUT«42␤»
tadzik =finish is new, relatively, iirc
:D
FROGGS wth
tadzik well
you did start a pod block
it's going to last until an empty line
an abbreviated block like that
FROGGS ahh
I see
m: say 42␤=swedish␤hurz␤␤␤␤
camelia rakudo-moar db3656: OUTPUT«42␤»
FROGGS m: say 42␤=swedish␤hurz␤␤say 'ohh noes'␤␤
camelia rakudo-moar db3656: OUTPUT«===SORRY!=== Error while compiling /tmp/XN6h9QEihc␤Two terms in a row␤at /tmp/XN6h9QEihc:5␤------> <BOL>⏏say 'ohh noes'␤ expecting any of:␤ infix stopper␤ infix or meta-infix␤ pos…»
FROGGS m: say 42␤=finish␤hurz␤␤say 'ohh noes'␤␤ 14:04
[TuxCM] I included the old perl5 test file, and will move test by test from past =END to working test code in perl6
camelia rakudo-moar db3656: OUTPUT«42␤»
FROGGS m: say 42␤=END␤hurz␤␤say 'ohh noes'␤␤
camelia rakudo-moar db3656: OUTPUT«===SORRY!=== Error while compiling /tmp/V_7ZLfuKQD␤Two terms in a row␤at /tmp/V_7ZLfuKQD:5␤------> <BOL>⏏say 'ohh noes'␤ expecting any of:␤ infix stopper␤ infix or meta-infix␤ pos…»
14:04 ggoebel111111117 joined
FROGGS okay, so only '=finish' then 14:04
tadzik istr there being spectests for it, can't find them now 14:05
14:09 xinming left 14:10 xinming joined 14:16 anaeem1_ joined
lizmat jnthn: looking at [] handling, I'm getting to the point that I tihink tha at_pos/bind_pos/exists_pos/assign_pos methods should do the <0 check 14:16
jnthn: and *not* postcircumfix:<[ ]. 14:17
14:17 xfix joined, xfix left, xfix joined
lizmat especially on shaped arrays in the future, we want that check to be as low as possible, I would think 14:17
and that would mean on the at_pos of a shaped array, not on the postcircumfix 14:18
m: m: my @a = <one two>; @a[*-3,*-4] # <0 error not caught 14:20
camelia ( no output )
lizmat m: m: my @a = <one two>; say @a[*-3,*-4] # argh, :)
camelia rakudo-moar db3656: OUTPUT«Calculated index (-1) is negative, but Array allows only 0-based indexing␤ in method gist at src/gen/m-CORE.setting:13984␤ in method gist at src/gen/m-CORE.setting:7995␤ in sub say at src/gen/m-CORE.setting:16749␤ in block <unit> at /tmp/WGlQck…»
14:21 anaeem1_ left 14:24 anaeem1_ joined
[TuxCM] $c.foo (...); class c { method foo () { for @arg -> $arg { ... }}} 14:26
how to loop over all arguments in method, where any of the optional arguments can be anything
lizmat m: sub a { .say for @_ }; a(1,2,3,4) 14:27
camelia rakudo-moar db3656: OUTPUT«1␤2␤3␤4␤»
14:27 xfix left
[TuxCM] @_ it is 14:27
lizmat the oldy but goody :-)
14:27 pecastro joined 14:28 xfix joined, xfix left, xfix joined
[TuxCM] m: class c { has @\!find; method f () { for @_ -> $f {}}} c.new.f() 14:30
camelia rakudo-moar db3656: OUTPUT«===SORRY!=== Error while compiling /tmp/2Mp5LFtpGk␤Cannot declare an anonymous attribute␤at /tmp/2Mp5LFtpGk:1␤------> class c { has @⏏\!find; method f () { for @_ -> $f {}}} ␤ expecting any of:␤ co…»
[TuxCM] m: class c { has @!find; method f () { for @_ -> $f {}}} c.new.f()
camelia rakudo-moar db3656: OUTPUT«===SORRY!=== Error while compiling /tmp/DnBkgxJ94D␤Placeholder variables cannot be used in a method␤at /tmp/DnBkgxJ94D:1␤------> s @!find; method f () { for @_ -> $f {}}⏏} c.new.f()␤»
14:31 xfix left
timotimo m: class c { has @!find; method f { for @_ -> $f {}}} c.new.f() 14:31
camelia rakudo-moar db3656: OUTPUT«===SORRY!=== Error while compiling /tmp/k_5syOZxqD␤Placeholder variables cannot be used in a method␤at /tmp/k_5syOZxqD:1␤------> has @!find; method f { for @_ -> $f {}}⏏} c.new.f()␤»
timotimo interesting, perhaps that's because of the invocant?
m: class c { has @!find; method f(|arguments) { for arguments.list -> $f {}}} c.new.f()
camelia rakudo-moar db3656: OUTPUT«===SORRY!=== Error while compiling /tmp/eBD9ihWOMB␤Two terms in a row␤at /tmp/eBD9ihWOMB:1␤------> uments) { for arguments.list -> $f {}}} ⏏c.new.f()␤ expecting any of:␤ infix stopper␤ inf…»
timotimo m: class c { has @!find; method f(|arguments) { for arguments.list -> $f {} } }; c.new.f() 14:32
camelia ( no output )
timotimo m: class c { has @!find; method f(|arguments) { for arguments.list -> $f { say $f.perl } } }; c.new.f(1, 2, 3, "hi")
camelia rakudo-moar db3656: OUTPUT«1␤2␤3␤"hi"␤»
[TuxCM] :) - why didn't I think of that?
timotimo because you didn't know about captures? :) 14:34
[TuxCM] doesn't know about quite a lot still
timotimo m: class c { has @!find; method f(*@args) { for @args -> $f { say $f.perl } } }; c.new.f(1, 2, 3, "hi") 14:36
camelia rakudo-moar db3656: OUTPUT«1␤2␤3␤"hi"␤»
timotimo ^- even simpler
lizmat m: class c { has @!find; method f { for @_ -> $f { say $f.perl } } }; c.new.f(1, 2, 3, "hi") # simpler still 14:38
camelia rakudo-moar db3656: OUTPUT«===SORRY!=== Error while compiling /tmp/lArmUyquRw␤Placeholder variables cannot be used in a method␤at /tmp/lArmUyquRw:1␤------> thod f { for @_ -> $f { say $f.perl } } ⏏}; c.new.f(1, 2, 3, "hi") # simpler sti␤»
lizmat hmmm... I guess not :-)
timotimo tux already tried that
lizmat ah, ok...
lizmat shuts up for now
[TuxCM] I am not perl6-clever yet, but I'm not that stupid either 14:39
lizmat still I don't get why that wouldn't/shouldn't work
I mean, why can't we generate a (self,*@_) signature for methods without signature ?
timotimo you mean (self: *@_) 14:40
lizmat ah, duh, yeah, you got the idea 14:41
timotimo :) 14:42
14:42 kaleem left 14:47 telex left 14:48 telex joined 14:51 rurban left 14:52 sven_123 left 14:54 xinming left
[Coke] did github change their colorization of perl6 in the last day or so? 14:55
github.com/rakudo/rakudo/commit/b4...1568807a7d looks a lot bluer than I remember.
dalek ast: 5228076 | lizmat++ | S02-types/lists.t:
Make sure we throw a Failure
14:56
14:56 yeahnoob left
PerlJam huh ... it does look bluer 14:57
lizmat yeah, quite annoying, actually 14:58
14:58 anaeem1_ left, xfix joined, xfix left, xfix joined
[TuxCM] if a method has no return, is $self returned implicitely so one can chain? 14:59
14:59 brrt joined
arnsholt Any block returns the value of the last thing in it 15:00
lizmat [TuxCM]: only if you make "self" the last statement in the method
15:00 Gruber is now known as Grrrr, xinming joined
[TuxCM] ok 15:00
15:03 davido_ left 15:04 davido_ joined 15:13 skids joined 15:18 sven_123 joined
dalek kudo/nom: 8d5d246 | lizmat++ | src/core/array_slice.pm:
Streamline postcircumfix:<[ ]>

This seems the optimal situation right now. Several other streamlinings caused spectest failures, that would need quite some deeper investigation to fix :-(
15:28
15:32 dayangkun left
jnthn ab6tract: Did you figure out what's going on with teh failure? I haven't seen it happen with GCC. Very occasionally on Windows, it fails and then immediately re-running Configure works... 15:35
And I never could see what's racing
ab6tract unfortunately not :( 15:36
i am trying it on a digital ocean droplet
3.13.0-43-generic #72-Ubuntu 15:37
lizmat m: say (Int)[0]:exists # brain-teaser 15:38
camelia rakudo-moar db3656: OUTPUT«False␤»
15:39 brrt` joined, brrt left
ab6tract i checked to make sure it has the Perl 5 lib dependencies, that seems to be fine 15:40
15:48 kjs_ left 15:49 [TuxCM] left, kaleem joined
psch caching for interop dispatch is slower than not in most cases, at least the way i tried :/ 15:57
but i fixed more marshaling bugs \o/
FROGGS \o/
psch++
psch also added tests for them, because i shouldn't have broken it in the first place... :) 15:58
FROGGS good boy :o) 15:59
psch github.com/peschwa/rakudo/blob/jvm...p.java#L74 i'm not particularly happy with this bit, but it works and i don't see a cleaner way... :/ 16:01
starting from the line below, the two deconts actually
dalek kudo/nom: e86ece1 | lizmat++ | src/core/array_slice.pm:
@a[X] where X is an instantiated object
16:02
kudo/nom: d3f7649 | lizmat++ | src/core/array_slice.pm:
Handle @a[Int] seperately, giving nice fail
lizmat m: my @a; @a[Int]
camelia rakudo-moar db3656: OUTPUT«Invocant requires an instance, but a type object was passed␤ in method Bridge at src/gen/m-CORE.setting:4946␤ in sub infix:<<> at src/gen/m-CORE.setting:4869␤ in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2767␤ in block <unit> at /tmp/R9…»
lizmat $ 6 'my @a; @a[Int]; 1'
Index requires an instance, but a type object was passed
in block <unit> at -e:1
jnthn Indexing, maybe? 16:04
16:04 anaeem1 joined
lizmat jnthn: any opinions on moving the < 0 check to at_pos and friends, instead of postciircumfix{} ? 16:05
*[] 16:06
jnthn lizmat: I seem to remember I pondered that before and...I can't remember what happeend next
lizmat ok, then I'll take it to the next :-) and see what happens
it's inconsistent atm 16:07
m: <a b c>[*-4]
camelia rakudo-moar db3656: OUTPUT«Unhandled exception: Calculated index (-1) is negative, but Parcel allows only 0-based indexing␤ at <unknown>:1 (/home/camelia/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:13992 (/home/cam…»
lizmat m: say <a b c>.at_pos(-1)
camelia rakudo-moar db3656: OUTPUT«Nil␤»
16:09 virtualsue left, Mouq joined
jnthn decommute & 16:11
16:14 denis_boyun_ left, kaleem left 16:17 virtualsue joined
lizmat $ 6 'my @a; @a[Int]; 1' 16:19
Indexing requires an instance, tried to do: @a[ Int ]
TimToady maybe @a[ (Int) ]
dalek kudo/nom: 373e39d | lizmat++ | src/core/array_slice.pm:
Improve @a[Int] fail message, jnthn++ for inspiration
TimToady since that's how we gistify Int 16:20
dalek kudo-star-daily: d92831b | coke++ | log/ (9 files):
today (automated commit)
rl6-roast-data: 4dfe387 | coke++ | / (5 files):
today (automated commit)
16:21 Mso150 joined
dalek kudo/nom: fd703e3 | lizmat++ | src/core/array_slice.pm:
An even better fail message, TimToady++
16:23
16:24 treehug88 joined 16:25 Celelibi left
lizmat although thinking about this more, maybe we need to move that check to at_pos after all 16:25
so that a class can actually do something else with @a[ Int ] if they would like to 16:26
well, something to keep in mind maybe
PerlJam What would they do with @a[ Int ] ?
dalek kudo/nom: 5832a10 | peschwa++ | src/vm/jvm/runtime/org/perl6/rakudo/RakudoJavaInterop.java:
Call decont() before checking for {int,num,str}-ness.

This will likely need changing again later on, if isint() semantics on jvm are brought in line with moar and parrot.
16:27
kudo/nom: ec4a351 | peschwa++ | / (2 files):
Another fix for marshalling towards Java.

This reacts to the semantic fix of NQP commit aeaf16b9 and correctly checks for boxed and native types.
kudo/nom: 54026e5 | peschwa++ | / (2 files):
Fix marshalling back to Perl 6 and test it.

Apparently restructuring broke marshalling of Numeric types in some circumstances for interop-multis.
kudo/nom: 2bd1170 | FROGGS++ | / (2 files):
Merge pull request #353 from peschwa/jvminterop

Jvminterop
lizmat PerlJam: well, I dunno
a random index ?
TimToady doesn't think we have to go that far out of our way to support cork-brained people 16:30
PerlJam m: my @a; @a['foo'] = 5;
camelia rakudo-moar db3656: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏foo' (indicated by ⏏)␤ in method Int at src/gen/m-CORE.setting:13980␤ in method Int at src/gen/m-CORE.setting:6272␤ in sub postcircumfix:<[ ]> at src/gen/…»
16:31 Celelibi joined, FROGGS left
PerlJam m: my $a = Int; my @a; @a[$a] = 5; 16:36
camelia rakudo-moar d3f764: OUTPUT«Cannot call 'postcircumfix:<[ ]>'; none of these signatures match:␤:(Any \SELF, Any:U $)␤:(Any \SELF, int $pos)␤:(Any \SELF, int $pos, \assignee)␤:(Any \SELF, int $pos, :BIND($BIND)!)␤:(Any \SELF, int $pos, Any :SINK($SINK)!, *%other)␤:(Any \SE…»
PerlJam Will that one give the same error as if they'd used a bare Int as the index? 16:37
lizmat PerlJam: that shouldn't happen, investigating
PerlJam In looking at "@a[ (Int) ]" as part of an error message, it looks to me like (Int) indicates a class of objects rather than a type object. e.g., my @a['foo'] example above could have said something like "Got @a[ (Str) ] but expected @a[ (Int) ]" and it would have made sense (but not talking about type objects) 16:40
lizmat Perhaps without the parens? 16:42
Got @a[ Str ] but expected @a[ Int ]"
16:43 brrt` left
lizmat PerlJam: I'm not sure why it doesn't find the \Self, Any:U candidate for @a[$a] 16:46
16:48 Ugator joined
lizmat *click* I know why 16:51
16:51 rurban joined 16:56 kjs_ joined 16:58 mvuets left, spider-mario joined
lizmat dinner& 16:59
16:59 FROGGS joined
[Coke] don't leave us hanging, 'brah. 17:00
17:00 spider-mario left 17:01 spider-mario joined
masak "However, this will come at the cost of alienating its biggest group of adopters." and "I don’t think Angular will survive the rewrite." -- interesting. www.quirksmode.org/blog/archives/20...m_wit.html 17:01
(relevance: second systems.)
flussence I've always thought of client-side JS templates as a solution in need of a better solution 17:04
17:06 treehug88 left
masak yeah, it does feel like a bit of a waste of my mobile's battery. 17:08
flussence on the other hand, the only other client-side option until HTML Templates gets into stable browsers is... XSLT. Eww. 17:09
CurtisOvidPoe Sounds like Angular has a similar problem as Mason: it’s so easy to do stuff at the template level that people push the business logic too far up the stack.
muraiki "I􏿽x92d say Angular is mostly being used by people from a Java background because its coding style is aimed at them." that's the impression I got 17:11
17:12 andreoss left
jdv79 mason is more like php than angular i think 17:12
masak even before I read that article "great for that first prototype" is exactly how I think about AngularJS these days. 17:16
ab6tract jnthn: i will poke some more at this weird error and see if i can find anything useful for you 17:17
but: later
masak wielding AngularJS as a brush to draw up a working prototype is quite an empowering feeling.
[Tux] BTW thanks for all the help I get here. I feel welcome :) 17:18
17:21 ab6tract left, Mso150_h joined, Mso150 left
hoelzro [Coke]: I didn't realize that syntax highlighting for Perl 6 was working on GH since the linguist migration to use textmate bundles 17:23
[Tux] lizmat, bestaande test.pl 0m53.642s - nieuwe test-t.pl (Tuxic + combine met debug verwijderd) 0m37.764s 17:24
remember that that was 72+ in november 17:25
17:25 [Sno] left 17:26 rurban left
japhb What's the current state of Pod and .WHY support in Rakudo? Is it complete enough to go reread the spec and start updating my libraries accordingly, and expect users to be able to introspect the docs? 17:28
17:29 fhelmberger left
ugexe is there a way to write something like 'sub go(URI|Str $target) { say $target.perl }; my $url = "github.com"; go(URI.new($url)); go($url);' without a second (multi) subroutine? 17:31
[Tux] $ grep PERL6 test-t.pl
my $opt_v = %*ENV<PERL6_VERBOSE> // 1;
$ time env PERL6_VERBOSE=0 perl6 test-t.pl < /tmp/hello.csv
50000
61.760u 0.060s 1:01.79 100.0% 0+0k 0+0io 0pf+0w
$ perl -pe's/^ ?(?=\s*.opt_v)/#/' test-t.pl > test-x.pl
$ time env PERL6_VERBOSE=0 perl6 test-t.pl < /tmp/hello.csv
50000
61.650u 0.053s 1:01.67 100.0% 0+0k 0+0io 0pf+0w
$ time env PERL6_VERBOSE=0 perl6 test-x.pl < /tmp/hello.csv 17:32
50000
37.431u 0.072s 0:37.48 100.0% 0+0k 0+0io 0pf+0w
$ grep 'opt_v and' test-t.pl|head -1 17:33
$opt_v and progress (.perl) for $csv_parser.parse ($test);
$ grep 'opt_v and' test-x.pl | head -1
# $opt_v and progress (.perl) for $csv_parser.parse ($test);
hoelzro hmm...
[Tux] I find the gain for easy statements like that incredible
gain/loss 17:34
hoelzro m: sub go($target where URI|Str) { say $target.perl } ; go('dgg.gg')
camelia rakudo-moar d3f764: OUTPUT«===SORRY!=== Error while compiling /tmp/QlgTmaTcZu␤Undeclared name:␤ URI used at line 1␤␤»
hoelzro grr
m: sub go($target where Int|Str) { say $target.perl } ; go('dgg.gg')
camelia rakudo-moar d3f764: OUTPUT«"dgg.gg"␤»
hoelzro m: sub go($target where Int|Str) { say $target.perl } ; go(3)
camelia rakudo-moar d3f764: OUTPUT«3␤»
hoelzro [Tux]: that seems to do it
ugexe thanks hoelzro
hoelzro er, ugexe 17:35
that's who I meant to talk to =P
psch so i've tried fixing RT #122229, and the works for all the files in S17-supply 17:36
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122229
psch but i get a failure in S14-traits/attribute.t
which clearly means "it doesn't really work"
hoelzro [Coke]: it seems that some of the rakudo source files are identified as Prolog by GH
psch and then i added some debug output to jvm and mvm binders
and for an golfed case that fails on jvm and doesn't moar there's almost factor 100 more binder calls on jvm... 17:37
i was surprised at that
17:37 treehug88 joined
jnthn psch: On Moar we compile a lot of simple signatures down to VM ops; on the JVM we still always use the full binder. 17:37
17:38 molaf joined
psch jnthn: oh, i suppose that's partly thanks to sixmodel being part of moar? 17:38
17:39 rurban joined 17:41 rmgk_ joined, rmgk is now known as Guest82014, Guest82014 left, rmgk_ is now known as rmgk
jdv79 ugexe: just fyi - i upgraded to openssl-1.0.1k and now i get an old bug - github.com/sergot/io-socket-ssl/issues/4 17:42
jnthn psch: Not really; it should be relatively do-able on JVM too, but I think I ran into something that made it not entirely trivial. 17:43
And then left it for 'ron.
jdv79 is it possible the openssl mgmt is missing some legacy-ish parts? Note that p5 seems to be fine with all openssl vers i've tried so far.
17:49 Ugator left 17:50 gfldex joined
CurtisOvidPoe Wondering if anyone would be kind enough to comment on the *rough draft* of my “Perl 6 for Mere Mortals” talk? 17:52
psch jnthn: i suppose that kind of opt is outside of my scope atm then. i'll try figuring out where the hangup with this case is, which i think needs more golfing first anyway 17:53
hoelzro CurtisOvidPoe: I'm no expert, but I'll look at it 17:54
CurtisOvidPoe heolzro: www.dropbox.com/s/ggt2gdp6d3qcmld/...s.pdf?dl=0
hoelzro, even :)
hoelzro =) 17:55
skids japhb: A good portion of the new POD stuff is functional. Last I looked rakodo-p does not serialize the pod in compiled units but the other two do. If you have a hand-tuned layout some of the .WHYs may present in ways that disrupt the final layout. 17:56
hoelzro CurtisOvidPoe: TIMTOWTEY? never seen it spelled that way! 17:58
CurtisOvidPoe Bah! Ignore those comparisons to other languages. Those are hidden slides which will probably be removed, but for some reason, Powerpoint included them in the PDF. 17:59
flussence I just got a spectest to finish a whole 2(!) seconds faster by having the harness run them in reverse order. There was one long-running test at the normal end holding things up :)
CurtisOvidPoe hoelzro: “There is more than one way to embarrass yourself” (relating to how Perl 5 handles function arguments)
hoelzro ahhhhh
very nice =)
18:00 abraxxa left
CurtisOvidPoe Thank you :) 18:00
I really do dump on Perl 5 a bit in that talk, but only in relationship to Perl 6.
hoelzro CurtisOvidPoe: is that _travel_to_* stuff from Veure? 18:01
CurtisOvidPoe Yes.
hoelzro cool
I'm looking forward to it!
CurtisOvidPoe Cheers :)
The code is shortened for the slide, but it’s structurally the same. The comment is taken verbatim :) 18:02
jnthn m: say 1/(.1 + .2 - .3)
camelia rakudo-moar 2bd117: OUTPUT«Divide by zero␤ in method Numeric at src/gen/m-CORE.setting:14018␤ in sub infix:<-> at src/gen/m-CORE.setting:4692␤ in method Str at src/gen/m-CORE.setting:11496␤ in method gist at src/gen/m-CORE.setting:4527␤ in sub say at src/gen/m-CORE.se…»
jnthn CurtisOvidPoe: Slide 32 may want an update now we fixed the weird error. :)
hoelzro hehe
CurtisOvidPoe m: say 1/(.1 + .2 - .3) 18:03
camelia rakudo-moar 2bd117: OUTPUT«Divide by zero␤ in method Numeric at src/gen/m-CORE.setting:14018␤ in sub infix:<-> at src/gen/m-CORE.setting:4692␤ in method Str at src/gen/m-CORE.setting:11496␤ in method gist at src/gen/m-CORE.setting:4527␤ in sub say at src/gen/m-CORE.se…»
CurtisOvidPoe Yay!
Back soon. Need to take out the rubbish.
hoelzro CurtisOvidPoe: very nice talk
wish I could be there to see it =/
18:05 dakkar left
jnthn CurtisOvidPoe: On 56, (yes, this is nitpick) there's maybe a space missing after teh var name and before the { 18:05
CurtisOvidPoe Back. 18:07
jnthn: Will fix that.
jnthn CurtisOvidPoe: Nice talk. Look forward to seeing it. :) 18:08
El_Che if someone here hasn't yet sent the needed info for his fosdem talk to wendy, please do so the info makes it to the printed booklet 18:09
CurtisOvidPoe Thanks. Hope it goes over well. hoelzro: I’m sure it will be online at some point :)
18:09 tgt joined
CurtisOvidPoe The “lazy list” stuff was fun to write, but it also doesn’t fit where it currently is. Not yet sure how to blend that smoothly. 18:10
hoelzro CurtisOvidPoe: ah, that's true!
hoelzro misses FOSDEM being a short-ish train ride away 18:11
b2gills [Coke]: GitHub thinks that src/core/List.pm is in prolog ( if that's what <div class="blob-wrapper data type-prolog"> means )
hoelzro b2gills: I saw that as well
jnthn El_Che: When it the actual deadline for that? 18:13
18:13 FROGGS_ joined
jnthn El_Che: If it's like "tomorrow" I'll try and take care of it tonight, but I'm full of cold and can't think straight :/ 18:13
[Coke] CurtisOvidPoe++ # presentation 18:14
jnthn away for a bit
[Coke] b2gills++ hoelzro++
El_Che jnthn: it's friday, but we need to get in to their system first
dalek kudo/nom: aa37175 | lizmat++ | src/core/array_slice.pm:
Fix @a[Int] for assignment and binding
El_Che jnthn: if you can, send the definitive title. I can recycle your bio from last time 18:15
jnthn El_Che: OK, will see what I can do
lizmat [Coke]: sorry fhe delay
jnthn away for a bit...
El_Che jnthn: thx!
vendethiel psch: github.com/rakudo/rakudo/pull/353/...82deddR417 loss of precision, isn't it? 18:17
18:17 FROGGS left
psch vendethiel: in.getClass() is either float or Float in that case, casting to native float doesn't lose precision from either of those i hope 18:18
vendethiel psch: yes but float to double means 4 bytes loss of precision 18:19
psch vendethiel: the only thing i can find is this stackoverflow.com/questions/916081/ 18:20
vendethiel: i'm not really good with ieee 754... :) 18:21
vendethiel psch: dunno, a java dev friend of mine is telling me it's a bug :p
psch vendethiel: ask him what he suggests instead please :)
b2gills hoelzro: I wonder if there is something that can be added to the code that will force GH to highlight as Perl6
pyrimidine CurtisOvidPoe: slides are pretty nice!
hoelzro b2gills: use v6 would probably do it 18:22
CurtisOvidPoe pyrimidine: thank you. They’re very rough, but I’m hoping it will help mitigate the whole “p6 is too complicated” complaint.
vendethiel psch: actually, he said he misread and it should be okay >.> sorry for that! keep up the great work!
hoelzro but although it could be detected as Perl 6, it wouldn't highlight, because they switched how they highlight stuff a few months ago 18:23
psch vendethiel: no problem, thanks for the feedback and encouragement :)
CurtisOvidPoe Silly question: but why do we see “use v6” in so many examples. My code runs fine without it. Is it just to stop Perl 5 from accidentally trying to run it?
hobbs float to double never loses data, there's an injective mapping of floats onto doubles
vendethiel psch: you have no idea how many javaers I know that would *love* to write their parsing stuff in p6 instead of java :D
hoelzro hahaha
pyrimidine CurtisOvidPoe: The 'Perl6 versus...' slides really drive the point home on that. 18:24
hoelzro you know what's causing it to be treated as Prolog?
vendethiel psch: I don't know where you're at with it, though (like, can I extend a java class from p6 code, or the opposite?)
hobbs it just exposes the lack of precision that the original float already had. The original float was the closest float to (some decimal number) so it prints as that
hoelzro List.pm:452 my @seen; # should be Mu, but doesn't work in settings :-(
vendethiel hobbs: right.
hoelzro because to linguist, :- -> Prolog
hobbs The double that represents *exactly the same number* as that float is no longer the closest double to that decimal, so it prints something else with more places.
hoelzro CurtisOvidPoe: it's redundant, but it's a declaration that the code is indeed Perl 6 to things like Vim, pygments, linguist, etc 18:25
psch vendethiel: gist.github.com/peschwa/7e1d97732f4583438bed e.g. works
[Coke] m: 6; say $a;
camelia rakudo-moar 2bd117: OUTPUT«(Any)␤»
[Coke] m: use v6; say $a;
camelia rakudo-moar 2bd117: OUTPUT«===SORRY!=== Error while compiling /tmp/cUhbvwmROa␤Variable '$a' is not declared␤at /tmp/cUhbvwmROa:1␤------> use v6; say $a⏏;␤ expecting any of:␤ postfix␤»
[Coke] m: say $a; 18:26
camelia rakudo-moar 2bd117: OUTPUT«===SORRY!=== Error while compiling /tmp/zpf2WznOb8␤Variable '$a' is not declared␤at /tmp/zpf2WznOb8:1␤------> say $a⏏;␤ expecting any of:␤ postfix␤»
vendethiel psch: yes, this part is in the tests (and it's great!), I know you can *use* classes, but not sure you can extend them
(or have them extended)
psch: (shouldn't that be :from<Java>?)
[Tux] push @f, $f.text.subst (/( $!quo | $!esc )/, "$esc$1", :g);
psch vendethiel: the gist was created just now from code that i wrote ~4 weeks ago... :) 18:27
vendethiel yes, I saw that "2 minutes ago" :)
psch vendethiel: extending a java class in perl6 currently doesn't work at all
[Tux] push @f, $f.text.subst (/( $!quo | $!esc )/, "$!esc$1", :g);
Type check failed in binding var; expected 'Any' but got 'int'
in method INTERPOLATE at src/gen/m-CORE.setting:14284
in method match at src/gen/m-CORE.setting:6841
vendethiel and neither does extending a p6 one from java, I get?
psch vendethiel: i have something half-baked for add_method on the java class in perl6
vendethiel: afaik perl6 -> java doesn't work at all currently, 18:28
where the arrow means "using perl6 objects in java at a high-ish level"
vendethiel alright. 18:30
do you think it'll be possible to map "$a.visible = True" in p6 to "$a.setVisible(true)"? I can kind-of see it being done with add_fallback checkins attributes
but I'm not sure how the setter should work
psch gist.github.com/peschwa/4237f155e5fe6596f114 is how i thought of doing it, but i'm not sure how to get that into the Metamodel 18:31
moritz uhm, aren't attributes statically known?
if so, fallbacks are the wrong solution
vendethiel moritz: I don't want attributes 18:32
I want to fake attributes to map to java getters.
hoelzro vendethiel: you can return a Proxy that invokes the getters/setters
vendethiel right. 18:33
psch vendethiel: that snippet works with a branch that i have lying around and using a java class instead of Testing
(the branch is behind nom in other features though, although merging should work automatically)
aside from that, what we currently get anyway (and probably will always get) is explicit getters and setter of the form "set_$fieldname" and "get_$fieldname" respectively 18:34
and of course the corresponding longname
vendethiel right, ofcourse 18:35
[Tux] www.xs4all.nl/~hmbrand/t.pl <= anybody care to explain what goes wrong?
lizmat [Tux]: looking 18:36
[Tux] ah, same scoping issue still exists «/ $!x | $!y /» => «my ($X, $Y) = ($!x, $!Y); /$X | $Y/» fixes the issue 18:37
lizmat [Tux]: I get 3"4"5
[Tux] now you do
lizmat :-)
[Tux] I think it is the 615'th time this bit me 18:38
18:38 grondilu left
[Tux] looks like a donkey 18:38
18:39 [Sno] joined, zakharyas left
psch vendethiel: extending is a blocker for your friends then? 18:48
vendethiel: or was that just example?
*an
lizmat m: say <a b c>[1]:exists # feels wrong 18:52
camelia rakudo-moar 2bd117: OUTPUT«False␤»
lizmat m: say <a b c>[1]:pair # also wrong 18:53
camelia rakudo-moar 2bd117: OUTPUT«b␤»
lizmat m: say <a b c>[1]:p # also wrong 18:54
camelia rakudo-moar 2bd117: OUTPUT«␤»
lizmat m: say <a b c>[0]:p # only element 0 works
camelia rakudo-moar 2bd117: OUTPUT«0 => a␤»
19:00 bbkr left
[Tux] m: my Str $x=<1:2>;my$e=":";my$q="-";my$t=$x.subst(/($e|$q)/,"$e$1",:g);$t.say 19:01
camelia rakudo-moar 2bd117: OUTPUT«1:2␤»
[Tux] expects 1::2
lizmat m: my Str $x=<1:2>;my$e=":";my$q="-";my$t=$x.subst(/($e|$q)/,"$e$1",:g);$t.perl.say 19:02
camelia rakudo-moar 2bd117: OUTPUT«"1:2"␤»
19:02 anaeem1 left
lizmat m: my Str $x=<1:2>;my$e=":";my$q="-";my$t=$x.subst(/($e|$q)/,"$e$0",:g);$t.perl.say 19:02
camelia rakudo-moar 2bd117: OUTPUT«"1:2"␤»
19:03 anaeem1 joined
lizmat [Tux]: not sure what you're getting at 19:03
19:03 anaeem1 left
psch isn't $/ still broken in subst? 19:04
m: say "abc".subst(/(.)/, $0.uc) 19:05
camelia rakudo-moar 2bd117: OUTPUT«bc␤»
psch m: say "abc" ~~ s/(.)/$0.uc/
camelia rakudo-moar 2bd117: OUTPUT«Cannot assign to an immutable value␤ in method subst-mutate at /home/camelia/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:1␤ in method subst-mutate at src/gen/m-CORE.setting:4216␤ in block <unit> at /tmp/dBhwKdL0XH:1␤␤»
psch m: $_ = "abc"; $_ ~~ s/(.)/$0.uc/; .say
camelia rakudo-moar 2bd117: OUTPUT«a.ucbc␤»
psch m: my Str $x=<1:2>;my$e=":";my$q="-";$x ~~ s:g/($e|$q)/"$e$0"/;$x.say 19:07
camelia rakudo-moar 2bd117: OUTPUT«1"::"2␤»
lizmat m: say <a b>.at_pos(1); say <a b>.at_pos(2); say <a b>.at_pos(3) # off-by-one error in 2
camelia rakudo-moar 2bd117: OUTPUT«b␤(Mu)␤Nil␤»
masak psch: in your first eval, it would take a miracle (of the kind we don't tend to perform) to get $/ to have the right value.
psch: arguments are evaluated before a call is made.
psch masak: ah, right, not a block 19:08
masak++
m: say "abc".subst(/(.)/, { $0.uc })
camelia rakudo-moar 2bd117: OUTPUT«Abc␤»
psch m: my Str $x=<1:2>;my$e=":";my$q="-";my$t=$x.subst(/($e|$q)/,{"$e$1"},:g);$t.say 19:09
camelia rakudo-moar 2bd117: OUTPUT«use of uninitialized value of type Any in string context in block <unit> at /tmp/d0uhOY58gm:1␤␤1:2␤»
psch m: my Str $x=<1:2>;my$e=":";my$q="-";my$t=$x.subst(/($e|$q)/,{"$e$0"},:g);$t.say
camelia rakudo-moar 2bd117: OUTPUT«1::2␤»
psch that was the actual problem then, and $/ works in just fine in subst...
masak yeah.
b2gills CurtisOvidPoe: Why didn't you show the Fibonacci lazy list `my @fib := 0, 1, * + * ... Inf`
[Tux] lizmat, I want perl5-like «$x =~ s{($e|$q)}{$e$1}g;» 19:10
lizmat [Tux]: that would be $0 in any case, in Perl6 positional captures start at 0 19:11
[Tux] I read that between the lines, but I still don't see what I expected
masak because $0 is really short for $/[0]
lizmat ah, duh :-)
[Tux] (though it makes the undefined warning disappear :)
dalek kudo/nom: 4825fdc | lizmat++ | src/core/Parcel.pm:
Fix off by one error in Parcel.at_pos
19:12
19:14 mvuets joined
[Tux] tux.nl/Files/20150114201804.png :) :) 19:18
lizmat [Tux]++
[Tux] but the code gets uglier and uglier as I have to work around known problems
enough for today 19:19
lizmat [Tux]: have a nice evening!
dalek k-simple: bcb4355 | (Andrew Egeler)++ | lib/GTK/Simple.pm6:
Fix subsignatures; remove (debugging?) say
19:24
kudo/nom: ddea6ce | lizmat++ | src/core/Any.pm:
Streamline Any.exists_pos with fallback methods
kudo/nom: 6dbfd54 | lizmat++ | src/core/List.pm:
Create separate List.at_pos(int/Int:D) candidates
kudo/nom: 5036fbb | lizmat++ | src/core/Parcel.pm:
Make <a b>[1] work by Parcel.exists_pos candidates
19:25 Mouq left
vendethiel psch: well, he's just wondering at that point 19:29
19:37 denis_boyun_ joined
moritz lizmat: Parcel.exists_pos(int) looks inverted to me 19:38
say (1, 2).exists_pos(-1) # True 19:39
really?
lizmat masak: good catch!
moritz it looks like it needs a negation in the output
19:39 Sqirrel joined
lizmat no, stupid copy-pasto 19:40
moritz ah, you took that from the Nil case of at_pos
same for the Int:D variant
lizmat yup 19:41
commit coming up, moritz++ masak++
oddly enough, this did not cause any spectest breakage :-(
moritz I guess we don't use exists_pos much on arrays? 19:43
though grepping for ]:exists in roast does turn up some hits 19:44
lizmat yeah, but not on parcels
looks like we don't have any tests on Parcel[] with adverbs 19:45
psch vendethiel: well, real-world use cases and feedback are definitely welcome
vendethiel psch: his use case is parsing a string with Perl6 and using the results in javaland
psch i think ab5tract++ was thinking about getting us Processing bindings
dalek kudo/nom: e26d8bf | lizmat++ | src/core/Parcel.pm:
Fix copy-pasto spotted by masak++ moritz++
19:46
psch vendethiel: i think the easiest way to do that is borrowing from the eval server currently 19:47
19:47 anaeem1 joined
lizmat hmmm. spectest breakage after all ? 19:47
moritz dunno, haven't tried it 19:48
just read the diff and wondered
psch vendethiel: org.perl6.nqp.tools.EvalServer that is. marshaling can probably be borrowed from my interop code 19:49
vendethiel that seems a tad slow, though?
moritz t/spec/S02-types/parcel.t Failed 2/52 subtests
psch vendethiel: well, that's a general jvm problem we have :/ 19:50
PerlJam CurtisOvidPoe++ (perl 6 for mortals) 19:51
CurtisOvidPoe b2gills: just saw your question about the Fibonacci sequence. The talk is intended to show how easy Perl 6 can be, so I deliberately chose many examples that were very clear and easy to explain.
PerlJam: thanks. 19:52
PerlJam CurtisOvidPoe: I especially liked the P6 v. * near the end and that bit of math near the beginning :)
CurtisOvidPoe I’ll probably dump most of the P6 v. * slides, though they do show the expressiveness of P6 (and subsets in particular). 19:53
lizmat moritz masak: I thought Parcels were to be considered immutable ?
moritz lizmat: parcels themselves are, but if they contain containers, those are still writable 19:54
PerlJam CurtisOvidPoe: "Perl 6 versus" sounds like a good website gimick. Kind of like rosettacode, but bent a little more competitively. :)
19:55 denis_boyun_ left
CurtisOvidPoe Like “Am I Hot Or Not”, but for code? :) 19:55
lizmat moritz: S02:2220 makes me think otherwise
synopsebot Link: perlcabal.org/syn/S02.html#line_2220
jnthn lizmat: If the containers within a Parcel were not writable, we could not do list assignment... 19:56
lizmat ah, ok, good point :-)
masak lizmat: it's not Parcels themselves that are immutable. it's that if you just put immutable stuff in them, they'll play very well wrt .WHICH and hashing. 19:58
lizmat: in that sense, they're the closest we have to a tuple type.
or maybe s/immutable stuff/value object stuff/
ingy what's a good term for "nothing"? ie if DASH means '-', ???? means ''
an obvious #p6 query! 19:59
PerlJam ingy: EMPTY_STRING :)
moritz ingy: "nothing" is a good term for "nothing"
ingy NOTHING_TO_SEE_HERE
jnthn nowt
masak ingy: ε
moritz ingy: maybe you want to give some context to your question?
ingy how about 4 letters
NADA 20:00
PerlJam NONE
moritz
RIEN
masak EMPT
PerlJam OOPS
ingy MU
what is a MU?
lizmat Mostly Undefined
ingy :)
TimToady CurtisOvidPoe: I'd leave the other languages in and just zip through just for the dazzle effect, and to demonstrate that you're not just picking on Perl 5
ingy
moritz ingy: en.wikipedia.org/wiki/Mu_%28negative%29
TimToady CurtisOvidPoe: there's a "$point.3" typo in there somewhere 20:01
also dunno if the misspelling Deprecatation was intentional
masak Deprecapitation!
PerlJam lizmat: S99:Mu could mention that idea of Mu too 20:02
synopsebot Link: perlcabal.org/syn/S99.html#Mu_could..._of_Mu_too
CurtisOvidPoe The misspelling was not intentional :)
PerlJam heh
ingy was it intenational?
20:02 kjs_ left
CurtisOvidPoe At least it’s not “depreciation”. I get tired of correcting that in other people’s code :) 20:03
masak .oO( and they do not depreciate being corrected much? ) :P
TimToady yes, that word isn't as valuable as it used to be...
lizmat PerlJam: why copy S02:The Mu Type
PerlJam you work with people who think they are bankers?
synopsebot Link: perlcabal.org/syn/S02.html#The_Mu_Type
ingy I depreciate that remark
masak I reverberate that remark 20:04
PerlJam lizmat: oh, then maybe a link from S99 to S02 is in order?
TimToady I just semble that remark
ingy masak: You are a revertabrate
CurtisOvidPoe TimToady: I don’t see the .3 bug you’re referring to. 20:05
dalek kudo/nom: 5a6f2d1 | lizmat++ | src/core/Parcel.pm:
Fix ($foo,)[0] = 42 breakage
TimToady sec
moritz m: say 1 / (0.3 - 0.1 -0.2 )
camelia rakudo-moar aa3717: OUTPUT«Divide by zero␤ in method Numeric at src/gen/m-CORE.setting:14018␤ in sub infix:<-> at src/gen/m-CORE.setting:4692␤ in method Str at src/gen/m-CORE.setting:11496␤ in method gist at src/gen/m-CORE.setting:4527␤ in sub say at src/gen/m-CORE.se…»
lizmat PerlJam: not sure how to link that, actiually
masak ingy: well, I do try to be the "spina" in people's side... :) 20:06
moritz CurtisOvidPoe: ^^ see above, bug fix
ingy ok this conversation is going muwhere. o/
CurtisOvidPoe mortitz: jnth told me about that earlier. The slides already fixed :)
PerlJam ingy: one more suggestion for "nothing" ... WAT ;)
masak ingy: VOID
moritz CurtisOvidPoe++
ingy: what's your context?
masak ingy: GONE 20:07
ingy moritz: fun
masak ingy: POOF
TimToady CurtisOvidPoe: was on the bottom of the first "And as you learn more" slide
ingy actually a grammar token for empy string in pegex
lizmat WOW (as in Way Out West)
ingy EMPY!
EMPTY is fine 20:08
masak ingy: STR0
lizmat
.oO( no more tea :-( )
TimToady CurtisOvidPoe: #67
CurtisOvidPoe TimToady: got it. Cheers.
ingy EMPTY is what I had before I came here 20:09
You guys are FULL of it
masak ingy: EMPTY sounds like the perfect name for the empty string.
ingy xo/
CurtisOvidPoe I have to say that the C89 negative integer division issue really surprised the heck out of me.
moritz still like "rien", but in the "you think this is cute today" way
20:10 rindolf left
lizmat PUTD (as in Pushing Up The Daisies) 20:10
masak moritz: no, because tomorrow you'd just go "je ne regrette rien"! :P
20:10 brrt joined
moritz masak: lol 20:10
masak :P
20:13 virtualsue left 20:14 darutoko left
ingy github.com/ingydotnet/pegex-pm/blo...oms.pm#L18 already have ALWAYS for empty string, but that's a different semantic all together. 20:15
20:16 zakharyas joined
lizmat m: my $b = Buf.new(1,2,3,4,5); say $b[0]:p; say $b[1]:p # adverbs don't work on elems > 0 20:17
camelia rakudo-moar aa3717: OUTPUT«0 => 1␤␤»
brrt perl devroom for fosdem is still pretty empty
El_Che brrt: the schedule is pretty full :) 20:18
brrt: waiting on some info from the speaers, but I'll start putting in data tomorrow morning
brrt awesome
El_Che probably with temporary times
everythings needs to be definitive friday to get into the printed booklets 20:19
dalek kudo/nom: 7d29f45 | lizmat++ | src/core/Buf.pm:
Make adverbs work on Buf, like Buf.new(1,2,3)[2]:p
El_Che those are pretty important, even in these smart phone days
brrt agrees 20:20
20:24 nnmap joined
El_Che putting the first talk online? jnthn's :) 20:24
the title at least :)
20:25 mvuets left
jnthn Wait, what, I came up wiht a title? :P 20:25
jnthn is sat here trying to think of one :)
nnmap hi can you give me a link to an article or something describing the current state of perl 6?
jnthn Though if you know what I'm going to think of, I'd love to know :P 20:26
masak wishes that he had gotten further with the isperl6readyforproduction site...
20:27 rurban left
lizmat nnmap: perl6advent.wordpress.com/2014/12/...ong-right/ 20:27
masak nnmap: perl6.org/compilers/features , perhaps?
nnmap thanks
masak nnmap: you can also ask here -- we like to give nuanced abswers. :)
jnthn perl6advent.wordpress.com/2014/12/...6-in-2014/ is also pretty recent. 20:28
nnmap for the longest time i heard that p6 was slow. is it still slow? (compared to 5). is it crashy?
El_Che jnthn: I put the one of last year :)
for now
jnthn El_Che: argh
El_Che it's a great title
Perl 6 development: past, current and future 20:29
masak nnmap: it's still slower, but it used to be *much* slower. whether it's worth it now depends on how much you like the new features.
PerlJam nnmap: We don't have an implementation that comparable to Perl 5 for most tasks yet, but we're getting there
masak nnmap: it's not so crashy anymore. I'm doing long-running things with Rakudo/Moar these days, and it's delightfully stable.
El_Che jnthn: you can add some Dickens references :)
PerlJam nnmap: And I second masak's assessment of "delightfully stable" :)
masak nnmap: to the point where I could actually recommend people to do web stuff with it, and do so with a straight face.
nnmap perlgeek.de/en/article/5-to-6 - are these articles still valid? 20:30
masak yes.
and when they're not, let us know. :)
but I believe moritz++ keeps them up-to-date.
nnmap i think i'll give a try then. thanks.
moritz nnmap: I've updated them about one or two months ago
masak nnmap: good luck!
nnmap: again, let us know the minute we can help with something.
20:32 nnmap left
jnthn
.oO( What the dickens... )
20:33
El_Che jnthn: I am putting the speakers into the fosdem system. So while I am doing that I don't shock anyone with placeholder titles :) 20:34
if someone want his nick in the author field (or use that as a public name) let me know 20:35
PerlJam
.oO( what kind of audio does the fosdem system have?!? )
20:36
moritz stereo, I hope!
20:38 kjs_ joined
El_Che DJ ambitions? 20:40
20:42 kaare__ joined
leont Is there a list form of qx? Like there is run for system? 20:44
moritz leont: not yet 20:45
leont Or better yet, a proper capture function that also handles stderr properly
20:49 jack_rabbit joined 20:51 brrt left
lizmat leont: there's Prox::Async with proper capture capabilities, no? 20:51
*Proc
leont Yes, I'm trying to write a synchronous parser, also because Proc::Async is still a bit buggy 20:52
moritz finally fixed using forwarded ssh agents in tmux
leont But also because I don't expect all VMs to implement P::A yet
20:55 telex left 20:56 telex joined, kjs_ left 21:01 Mouq joined 21:02 brrt joined 21:09 colomon left
masak got bitten by the fact that `next` binds to for loops even when they're statement_mod 21:14
though I guess that makes sense. `next` binds to things like &map as well, so...
also, easily fixed by the judicious use of labels.
moritz the OTRS codebase has a policy to only use next and last with labels 21:16
jnthn masak: I could just as easily imagine getting bitten by it not doing so... :)
21:16 silug joined
moritz and you can't give a statement-modifying for loop a label, right? 21:17
masak m: FOO: .say and last FOO for 1..10
camelia rakudo-moar 5a6f2d: OUTPUT«1␤»
masak moritz: seems you can :)
jnthn Yes, I was pretty sure that'd work. :) 21:18
masak moritz: I think I like that policy.
jnthn (Mostly 'cus I read the label code a couple of days ago to fix the missing redecl error)
lizmat hhmmm... in src/core/Buf, I see 2 assign_pos in the same role: one with Buf:D and one with Blob:D 21:19
is that intentional, jnthn ? 21:20
moritz uhm, Blob:D shouldn't have an assign_pos
because Blob themselves are immutable
jnthn What moritz said
lizmat ok, so that should be Buf then :-)
ok
21:20 aborazmeh joined
moritz I thought I fixed that some time ago, but it seems my fix wasn't thorough enough 21:20
lizmat no pb :-)
jnthn: should assign_pos be rw ? 21:21
21:21 dwarring joined
lizmat feels wrong 21:22
jnthn lizmat: Isn't it for Array?
moritz it is
lizmat ok, I'll check later if that makes a difference 21:23
moritz probably not yet
jnthn Isn't that needed so @a[0] = @b[1] = 'dugong' works?
oh, wait, no
Noticacle in my $x := @b[1] = 'dugong' though :)
*able 21:24
moritz jnthn: what are those hidden parent classes in Metamodel::MultipleInheritance about? 21:25
timotimo thank you, retupmoca 21:26
jnthn moritz: Excluded or hidden?
moritz jnthn: hidden
jnthn moritz: For hidden, look for "hides" in S12
21:26 aborazmeh left
jnthn For exlcuded, it's about .^methods vs. .^methods(:all) 21:26
timotimo did i miss something nice today?
ugexe sergot: ping 21:27
jnthn moritz: But it's about deferal and hiding things from that.
moritz jnthn: but the 'hides' trait is something completely different, right? 21:29
21:29 kjs_ joined
moritz m: class A { method x() { 'A' } }; class B is A is hidden { method x() { 'B' } }; class C is B { method x() { say 'C'; nextsame } }; say C.x; say B.x; say A.x 21:30
camelia rakudo-moar 5a6f2d: OUTPUT«C␤A␤B␤A␤»
jnthn moritz: No; is hidden hides the curernt class, while hides Base achieves that effect from the derived class, iirc
Yeah, it's under Interface Consistency 21:31
dalek kudo/nom: bcfa81b | lizmat++ | src/core/Any.pm:
Add fallback methods in Any for .assign_pos
kudo/nom: e59d40d | lizmat++ | src/core/Array.pm:
Streamline Array.assign_pos, 7% faster for Int:D
kudo/nom: b64afd0 | lizmat++ | src/core/Buf.pm:
Streamline Buf.assign_pos
jnthn # Are any of the parents hidden?
has @!hides;
# Is this class hidden?
vendethiel "is hidden"?
jnthn has $!hidden;
@!hides corresponds to "hides Base" and $!hidden to "is hidden" 21:32
moritz m: class A { method x() { 'A' } }; class B hides A { }; say A.^hidden
camelia rakudo-moar 5a6f2d: OUTPUT«0␤»
moritz wonders if there are good uses cases for that 21:33
jnthn moritz: It doesn't mutate A
It affects the mro of B 21:34
m: class A { method x() { 'A' } }; class B hides A { }; say B.^mro
camelia rakudo-moar 5a6f2d: OUTPUT«(B) (A) (Any) (Mu)␤»
jnthn um, or should...
moritz m: class A { method x() { 'A' } }; class B { method x { 'B' } }; class C hides B { method x { say 'C'; nextsame } }; say C.x 21:35
camelia rakudo-moar 5a6f2d: OUTPUT«C␤Nil␤»
moritz I'd expect that to print C\nA\n
but seems I'm wrong :-)
21:35 gfldex left, virtualsue joined
moritz m: class A { method x() { 'A' } }; class B { method x { 'B' } }; class C is B hides B { method x { say 'C'; nextsame } }; say C.x 21:36
camelia rakudo-moar 7d29f4: OUTPUT«===SORRY!=== Error while compiling /tmp/sv4cMha19P␤Package 'C' already has parent 'B'␤at /tmp/sv4cMha19P:1␤------> ␤»
jnthn m: class A { method x() { 'A' } }; class B hides A { }; say B.^mro_unhidden
camelia rakudo-moar 7d29f4: OUTPUT«(B) (Any) (Mu)␤»
jnthn Ah
And I think the deferral thing uses that
21:36 xfix left
timotimo has never heard of this mechanism before 21:36
but i can see why that would be interesting to have
masak timotimo: you and me both.
jnthn I think I implemented it and then mostly forgot about it :)
timotimo does that remove the given BUILD from the buildallplan? 21:37
masak .oO( World's Least Memorable Feature )
lizmat m: my $a; ($,$a)[2] = 42 # LTA error 21:38
camelia rakudo-moar 7d29f4: OUTPUT«Attempted to STORE to Nil.␤ in method STORE at src/gen/m-CORE.setting:8204␤ in method assign_pos at src/gen/m-CORE.setting:2070␤ in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2837␤ in block <unit> at /tmp/uftfaVqIZo:1␤␤»
moritz what would be a more awesome error? 21:39
lizmat something with index out of range, expected 0..1 ? 21:40
timotimo "out of range in a non-WHICH-able structure"
moritz "Attempt to assign to element 2 of a Parcel, which is beyond the end"?
timotimo: that's terrible :-)
lizmat X::OutOfRange.new(:what<Index>, :got(pos), :range(0..N))
moritz what's a non-WHICH-able structure? 21:41
masak m: my $a; ($,$a)[-1] = 42
camelia rakudo-moar 7d29f4: OUTPUT«===SORRY!=== Error while compiling /tmp/rWV3Ftl3s8␤Unsupported use of a negative -1 subscript to index from the end; in Perl 6 please use a function such as *-1␤at /tmp/rWV3Ftl3s8:1␤------> my $a; ($,$a)[-1]⏏ = 42[…»
timotimo Parcel for example
anythign that can't autovivify
masak m: my $a; ($,$a)[*-1] = 42; say $a
camelia rakudo-moar 7d29f4: OUTPUT«42␤»
moritz timotimo: and why can't it autovivify?
timotimo hmm, are parcels mutable?
moritz bingo!
PerlJam is having a sense of deja vu 21:42
moritz ok, there are baseically two possible approaches:
1) out of range
timotimo oh, you mean it should be that message rather than "non-which-able"
it was only a very rough idea, i must admit :)
moritz 2) trying to autovivify an element in a container that can't autovivify (and why)
3) catching that very specific error separately 21:43
21:44 lsm-desktop left
moritz uhm, returning True or False from meta model roles isn't possible/easy, right? 21:46
jnthn No, 'cus Bool doesn't exist yet. 21:47
dalek c: 470b94a | moritz++ | lib/ (5 files):
Clean up / unify meta model docs

  * move several methods in the appropriate classes
  * avoid duplicate descriptions between Language/objects and type docs
  * document several more methods
21:48
lizmat m: my $a; my $b = $a<a>; $a[0] = 42; $b = 63; say $a.perl; say $b.perl # shouldn't this error out on assigning to $b ?
camelia rakudo-moar 7d29f4: OUTPUT«[42]␤63␤»
moritz lizmat: did you mean to bind $b? 21:49
lizmat yeah 21:50
moritz m: my $a; my $b := $a<a>; $a[0] = 42; $b = 63; say $a.perl; say $b.perl
camelia rakudo-moar 7d29f4: OUTPUT«[42]␤63␤»
lizmat m: my $a; my $b := $a<a><b>; $b = 63; $a[0] = 42; say $a.perl; say $b.perl # reversing the order
camelia rakudo-moar 7d29f4: OUTPUT«Odd number of elements found where hash initializer expected␤ in method STORE at src/gen/m-CORE.setting:10477␤ in method assign_pos at src/gen/m-CORE.setting:2070␤ in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2837␤ in block <unit> at /t…»
moritz and yes, IMHO it should die 21:51
sleepy time here, TTFN
lizmat good night, moritz
masak 'night, moritz 21:52
21:53 dwarring left
ugexe weird. let say i have 'method new(*%args)', and i accidently call it via '$obj.new($key-only)' in test.t. if i run that test with 'perl6 -Ilib t/test.t' it somehow works. but if i do 'prove -e "perl6 -Ilib" t/test.t' i get the default constructor only takes named arguments error 21:59
im guessing one of them is running the installed version of the module im working on? 22:00
22:00 zakharyas left
PerlJam ugexe: care to share the code? 22:05
22:05 skids left 22:10 colomon joined
colomon o/ 22:10
masak \o
lizmat colomon \o
22:11 hobbs left, Mso150_h left 22:12 hobbs joined
ugexe PerlJam: well i was about to, but after reinstalling the module it correctly gives the consturctor error for both 22:13
22:14 denis_boyun_ joined 22:16 Mouq left 22:18 colomon left 22:19 anaeem1 left 22:20 anaeem1_ joined, anaeem1_ left 22:21 denis_boyun_ left 22:23 kjs_ left
dalek kudo/nom: 7af6a8b | lizmat++ | src/core/Parcel.pm:
Make sure Parcel assignments are bounds checked
22:28
22:36 spider-mario left
dalek Heuristic branch merge: pushed 30 commits to rakudo/newio by lizmat 22:38
22:39 akela joined, akela left
raydiak \o #perl6 22:40
m: class C { method m { %_.values } }; my @results = C.m :a(1), :b(2); @results.perl.say;
camelia rakudo-moar b64afd: OUTPUT«Array.new(1, "b" => 2)␤»
raydiak the mistake there is forgetting the invocant colon on the method call 22:41
I don't suppose there's any way we could make it more obvious?
22:42 kjs_ joined
raydiak m: class C { method m { %_.values } }; my $results = C.m :a(1), :b(2); $results.perl.say; # also, should this give "useless use of ..." ? 22:42
camelia rakudo-moar b64afd: OUTPUT«WARNINGS:␤Useless use of "," in expression "my $results = C.m :a(1), :b(2)" in sink context (line 1)␤(1,).list.item␤»
22:42 colomon joined
raydiak oh, it does, cool 22:42
22:47 BenGoldberg joined
lizmat good night, #perl6! 22:47
CurtisOvidPoe If I have notes about roles in Perl 6, is it appropriate to list them as an issue on github.com/perl6/specs/blob/master...types.pod?
Good night lizmat!
jnthn CurtisOvidPoe: Issue as in GitHub Issue, or note them in the doc? 22:48
CurtisOvidPoe As a github issue (though there are some docs notes which are also appropriate)
jnthn CurtisOvidPoe: Yeah, go for it, and then poke me about it when I have a not-cold-infested brane if you like. :)
CurtisOvidPoe OK :)
jnthn gets some rest 22:49
22:51 brrt left
masak 'night, jnthn 22:53
lue masak: here's my longer maze solution (finished it yesterday): gist.github.com/lue/b8b63922aa6914a18081 23:00
23:01 treehug88 left
masak looks 23:03
23:04 tgt left
masak wow. 441 lines :) 23:04
a lot of comments, but still.
23:06 Mouq joined
lue If I'm not trying to golf it, then I tend to give code quite a bit of space :P . 23:06
masak lue: "free walls" are not a fail condition, IMO. 23:07
lue: see the original problem specification. the only requirement was that all cells were reachable through a unique path. free walls can coexist with that criterion. 23:08
lue I was thinking that, with a free wall, there can be multiple paths between two squares, thus not unique.
masak I don't know how you arrive at that conclusion. 23:09
your diagram at gist.github.com/lue/b8b63922aa6914...es-p6-L378 has unique paths.
and is thus a good counterexample to your claim :)
oh wait. 23:10
no, I see what you mean.
yeah, everything needs to be rooted in the external walls.
hm.
oh, I think my algorithm indirectly prohibits free walls for various reasons. 23:11
lue: I have three programs now. I've been tweaking them during the evening after finding some bugs. still running them. gist.github.com/masak/db655cb7ab27454cf15c
lue: thank you for sharing your solution. it's very interesting to compare our respective approaches. 23:14
lue you're welcome :)
Admittedly I haven't run my program for the entirety of 4x4 grids yet, but at least with 3x3 it takes just about 10 minutes. 23:15
masak 4x4 is a beast.
lue The kind of beast I'd ponder multithreading for :) .
masak my program has been running for just over an hour now. it might be halfway.
Mouq For reference, what is the # for 3x3?
lue Number of solutions? Uh, I don't tally that up :P . Just a second. 23:16
(or rather 10 minutes)
Mouq Well, what's the magnitude? 23:17
lue my rough guess would be in the hundreds.
23:18 kjs_ left
masak I'm writing a short script now to find out. 23:18
Mouq Okay. I had something that I thought was pretty solid, returning 68 for 3x3, and then I implemented an optimization, and it comes out to 86 and I'm like O_O… turns out code isn't doing what I think it is :P 23:19
*my code
lue Mouq: a closer guess for me would be around 100, so you know. I just scrolled up the output and went with what I felt like the magnitude was :) . 23:20
Mouq Okay :) 23:21
I hope we can at least agree that 2x2 yeilds 4 :P
23:21 yakudza left
Mouq has to go to class 23:21
jercos Mouq: you're thinking of 2+2, or 2²
colomon m: say 2x2 23:24
camelia rakudo-moar b64afd: OUTPUT«===SORRY!=== Error while compiling /tmp/mufW5q4Q1R␤Confused␤at /tmp/mufW5q4Q1R:1␤------> say 2⏏x2␤»
colomon that's not a 4 23:25
masak Mouq: yes, 2x2 has 4 solutions, if we don't eliminate symmetric ones.
lue Number of solutions: 192 (for 3x3, not bothering to eliminate symmetric ones of course) 23:26
masak stares at some bug his 3x3 script has 23:27
23:29 jtpalmer left 23:30 retupmoca left 23:31 retupmoca joined, jtpalmer joined
masak ah. off-by one. 23:31
here, I am getting 217 solutions (before removing symmetric ones). 23:32
for 3x3.
23:33 pecastro left, Mouq left 23:34 virtualsue left, Mouq joined
masak 34, after removing symmteric ones. 23:36
lue It's quite possible that I messed up somewhere (or that perhaps I'm strict enough that I get false negatives)
masak I'll post a gist of them, and if your algo finds any that mine doesn't, we'll know mine is wrong :) 23:37
hm. some of these look malformed :( 23:38
lue I'm not sure how one would prove my conjecture, that a NxN maze requires exactly (N-1)² internal walls... (or, alternatively, (N+1)² total walls) 23:41
23:42 dj_goku left
masak lue: "For a connected graph with V vertices, any spanning tree will have V − 1 edges" -- en.wikipedia.org/wiki/Spanning_tree 23:42
lue: edges in the spanning tree correspond to missing walls in the maze.
lue: 16 vertices => 15 edges => 24 - 15 == 9 walls 23:43
lue: that's where I get 15 and 9 from in this line: gist.github.com/masak/db655cb7ab27...azes-p6-L2
lue I wonder how much faster my program would go if there was an initial "number of internal walls" check. 23:44
masak or, do like me, and just traverse the bitstrings with the correct number of 1s.
even cheaper than checking all the time is never straying from the path :) 23:45
Mouq 686 O_o
Ohh, another bug
Geez
23:45 dj_goku joined, dj_goku left, dj_goku joined
masak you and me both, pal. 23:46
Mouq This is a pain in the butt. Well, I at least generated them all, many times, in 36 seconds (for 3x3) :P
masak ok, this time it looks much better. 23:48
for 3x3: 160, counting all positions. 24, removing symmetries.
gisting the mazes.
here: gist.github.com/masak/c17a7c473bf6f6ad83a5 23:49
vendethiel masak: changed = False then ++ ? 23:52
lue O_o Time before "number of walls" check: real 9m16.350s Time after implementing check: real 2m13.235s 23:56
masak m: say False.succ 23:57
camelia rakudo-moar 7af6a8: OUTPUT«True␤»
masak m: my $b = False; $b++; $b++; say $b
camelia rakudo-moar 7af6a8: OUTPUT«True␤»
masak vendethiel: don't know if that's explanation enough...
vendethiel: `$changed++` to me means "set this boolean" 23:58