»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
timotimo damn, i lost the link to the tutorial i was following :( 00:05
nope, found it again
colomon timotimo++
00:08 Sqirrel left 00:09 dwarring left 00:11 ajr_ left 00:12 btyler left
timotimo not exactly sure how to map things like on_delete_event where you can return true or false to signal to gtk that the window should or should not be destroyed when the user clicks close or hits alt-f4 or equivalent 00:15
00:18 guru joined, guru is now known as Guest39941 00:19 Guest39941 is now known as ajr_ 00:21 autark joined 00:25 ajr_ left 00:30 dmol left
timotimo i wonder if it should be a method you could just override (or, you know, add with an anonymous role) 00:35
dalek k-simple: 3eaba06 | (Timo Paulssen)++ | lib/GTK/Simple.pm6:
nitpick some final spaces away
00:43
k-simple: 16c6da1 | (Timo Paulssen)++ | lib/GTK/Simple.pm6:
when closing the main window, the program shall exit the main loop.
k-simple: f5ee9ee | (Timo Paulssen)++ | examples/01_hello_world.pm6:
the hello/goodbye example is now somewhat proper.
k-simple: 8b7475e | (Timo Paulssen)++ | lib/GTK/Simple.pm6:
vim fold markers for categories of native subs
k-simple: af88ff8 | (Timo Paulssen)++ | / (2 files):
bind get_ and set_border_width for containers

and use it in the example
00:43 rurban joined 00:44 thou left 00:48 rurban left, rurban joined 00:53 rurban left 01:05 klapperl_ joined
dalek k-simple: f61d580 | (Timo Paulssen)++ | examples/01_hello_world.pm6:
lots of documentations and clarifications
01:07
01:08 klapperl left 01:17 Khisanth left 01:18 Khisanth joined 01:48 Su-Shee_ joined, FROGGS_ joined 01:49 rurban joined 01:50 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 01:51 thou joined, donaldh_ joined 01:52 Su-Shee left 01:53 FROGGS left, breinbaa1 joined, huf_ joined, rurban left 01:58 FROGGS[mobile] left, breinbaas left, donaldh left, huf left, donaldh_ is now known as donaldh 01:59 FROGGS[mobile] joined 02:06 btyler joined 02:10 REPLeffect left 02:19 Sqirrel joined 02:23 Sqirrel left 02:41 rurban joined 02:44 raiph left 02:45 rurban1 joined 02:46 rurban left 03:25 Alula left, xragnar left 03:26 xragnar joined 03:36 Alula joined 03:38 BenGoldberg left 04:03 kaare_ joined 04:20 woosley left 04:26 REPLeffect joined 04:35 Sqirrel joined 04:41 volodin661 joined
volodin661 perl6: say [+] 1,2 04:42
camelia rakudo-{parrot,jvm,moar} 85bcd7, niecza v24-109-g48a8de3: OUTPUT«3␤»
04:43 volodin661 left 04:44 Sqirrel left, shalom1024 left 04:45 volodin661 joined
volodin661 rakudo: map {.say} <== grep { /^zhoppa/ ^fff^ /^zhoppa/ } <== lines; 04:50
camelia ( no output )
volodin661 1
2
3
4
^D 04:51
04:54 kaare_ left 04:55 volodin661 left 04:56 volodin661 joined
volodin661 perl6: say .value given max :by(*.key), classify *.chars, grep { [le] .comb }, ( 'aa', 'dsasd', 'gg','dd') 04:56
camelia niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Unable to resolve method key in type Hash␤ at /tmp/tmpfile line 1 (ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1808 (ANON @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1812 (List.max @ 14) ␤ at /home…» 04:57
..rakudo-{parrot,jvm,moar} 85bcd7: OUTPUT«aa gg dd␤»
volodin661 index of the minimum element of the array in PYTHON is: a=[9,10,6,0,5,7]; min_idx = a.index(min(a)); and In Perl6 ? 05:04
05:07 rurban1 left, rurban joined, rurban left 05:08 Sqirrel joined
skids r: my @a = (0,1,5,2,9,4,-1); @a.first-index(@a.min).say 05:09
camelia rakudo-{parrot,jvm,moar} 85bcd7: OUTPUT«6␤»
skids r: my @a = (0,1,5,2,9,4,-1); @a.first(* > 4).say 05:11
camelia rakudo-{parrot,jvm,moar} 85bcd7: OUTPUT«5␤»
05:13 dayangkun left 05:14 dayangkun joined 05:23 kaare_ joined
moritz \o 05:35
blogs.perl.org/users/peter_martini/...l-ism.html
05:38 rurban joined 05:39 rurban1 joined 05:42 rurban left 05:44 rurban1 left 05:51 FROGGS_ left 05:56 spintronic joined
spintronic Does STD.pm implement all of Perl 6 into Perl 5? 05:59
06:08 rindolf joined
TimToady only the parser 06:13
and it cheats, for instance by using localized globals rather than true dynamic vars 06:14
and by using the subset of Perl 6 that is easy to translate to Perl 5 :)
for some subset of "easy" that does not include the parser itself :) 06:15
06:18 woolfy joined 06:25 btyler left
spintronic ah ok thanks TimToady 06:27
06:27 spintronic left 06:49 FROGGS joined
lizmat m: say $*OUT.WHAT 06:51
camelia rakudo-moar 85bcd7: OUTPUT«(IO::Handle)␤»
lizmat m: $*OUT = class is IO::Handle {}
camelia rakudo-moar 85bcd7: OUTPUT«===SORRY!=== Error while compiling /tmp/m9LlshWozm␤Unable to parse class definition␤at /tmp/m9LlshWozm:1␤------> $*OUT = class is ⏏IO::Handle {}␤ expecting any of:␤ postfix␤ infix stopper…»
lizmat m: $*OUT = class {}
camelia ( no output )
FROGGS m: $*OUT = class { } but IO::Handle {}
camelia rakudo-moar 85bcd7: OUTPUT«===SORRY!=== Error while compiling /tmp/PKRX_7FkdT␤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?)␤at /tmp/PKRX_7FkdT:1␤------> $*OUT = class { } but IO::Handle ⏏{}…»
lizmat shouldn't the "class is IO::Handle" case work ?
FROGGS m: $*OUT = class { } but IO::Handle;
camelia rakudo-moar 85bcd7: OUTPUT«Cannot mix in non-composable type IO::Handle into object of type <anon>␤ in sub infix:<but> at src/gen/m-CORE.setting:16948␤ in block at /tmp/Ie3iPHRFJh:1␤␤»
FROGGS lizmat: it looks weird 06:52
lizmat FROGGS o/
FROGGS hi :o)
lizmat it's one of the tests failing with jnthn's "say" patches
jnthn lizmat: You need to give the class a name, no?
r: class Foo is IO::Handle { }
camelia ( no output )
FROGGS m: $*OUT = anon class is IO::Handle {} # it perhaps parses 'is' as the class name? 06:53
camelia rakudo-moar 85bcd7: OUTPUT«===SORRY!=== Error while compiling /tmp/aCoDluSCtL␤Unable to parse class definition␤at /tmp/aCoDluSCtL:1␤------> $*OUT = anon class is ⏏IO::Handle {} # it perhaps parses 'is' a␤ expecting any of:␤ …»
jnthn Or use :: for anonymous class
FROGGS m: $*OUT = anon class is is IO::Handle {} # it perhaps parses 'is' as the class name?
camelia ( no output )
jnthn FROGGS: Yes, correctly
lizmat t/spec/rosettacode/sierpinski_triangle.t
jnthn r: my $c = anon class :: is IO::Handle { } # if you really, really don't want a name
camelia ( no output )
jnthn lizmat: My patch I think is problematic 'cus it assumes that things pretending to be handles now also provide a say method. 06:54
Whereas before we only needed a print one.
FROGGS m: my $foo = anon regex { \d+ } # but I guess that only works because wo do not apply traits
camelia ( no output )
jnthn FROGGS: correct
lizmat: I suspect that means my patch ain't smart enough or something :) 06:55
FROGGS jnthn: that is a good start into the day *g*
twice correct already :D
lizmat jnthn: ok
masak morning, #perl6 06:57
lizmat morning masak
masak m: say "morning #perl{$_}" for 5..7
camelia rakudo-moar 85bcd7: OUTPUT«morning #perl␤morning #perl␤morning #perl␤»
lizmat morning jnthn
masak oh, right.
m: say "morning #$_" for "perl5" .. "perl7"
camelia rakudo-moar 85bcd7: OUTPUT«morning #perl5␤morning #perl6␤morning #perl7␤»
06:57 SamuraiJack joined
jnthn o/ lizmat 06:57
lizmat m: say "morning #$_" for "perl5" .. ^"perl7" 06:58
camelia rakudo-moar 85bcd7: OUTPUT«Cannot call 'Real'; none of these signatures match:␤:(Mu:U \v: *%_)␤ in method new at src/gen/m-CORE.setting:7399␤ in sub prefix:<^> at src/gen/m-CORE.setting:7574␤ in block at /tmp/HYUAuKhyD5:1␤␤»
06:58 anaeem1 joined, darutoko joined
lizmat m: say "morning #$_" for "perl5" ..^ "perl7" 06:58
camelia rakudo-moar 85bcd7: OUTPUT«morning #perl5␤morning #perl6␤»
lizmat :-)
so, do we have the equivalent of open \$scalar in perl 6? 06:59
jnthn no :D
Wait, what does that actually do? 07:00
The backslash?
But open returns a file handle in Perl 6.
07:02 kurahaupo joined
dalek nda: 35c2b63 | (Steve Mynott)++ | lib/Panda/Ecosystem.pm:
support web proxy via http_proxy env var
07:03
nda: 30357d3 | tadzik++ | lib/Panda/Ecosystem.pm:
Merge pull request #83 from stmuk/master

support web proxy via http_proxy env var
07:03 thou left
jnthn FROGGS: Is github.com/jnthn/zavolaj/pull/39 covered by changes you already did? 07:04
lizmat jnthn: it gives file semantics to a in memory scalar 07:05
FROGGS jnthn: nah, I tried but failed...
lizmat so, you can slurp from / spurt it
do .lines on it, etc
but all in memory
07:05 zakharyas joined
lizmat the sierpinski example is just doing that, in a strange way: it is "say"ing to a variable 07:06
rosettacode.org/wiki/Sierpinski_triangle#Perl_6 07:07
well, actually, only the test is doing that 07:11
it's not part of the example
hmmm...
breakfast& 07:13
07:14 Ven joined 07:25 Ven left 07:30 kaleem joined 07:42 rurban joined, lizmat left 07:46 dmol joined, rurban left, snarkyboojum joined 07:48 SevenWolf left 07:52 virtualsue joined
sergot morning! o/ 07:56
FROGGS morning sergot 07:57
sergot: had no chance to review your work, release took until 1am :(
sergot ok, no worries! :) 08:00
08:04 Ven joined
masak FROGGS++ # release 08:05
sergot FROGGS++ 08:06
masak Vendethiel-: I would do everything in one pass, I think. 08:07
08:13 zakharyas left
woolfy FROGGS++ # release 08:13
dalek ar: 08dd7b4 | moritz++ | tools/star/Makefile:
bump rakudo,nqp,moar versions to 2014.05
08:14
ar: 9917fe9 | moritz++ | modules/ (6 files):
Update module versions
08:14 lizmat joined, zakharyas joined, lizmat left
dalek ar: c9969dd | moritz++ | / (2 files):
bump version in README and Makefile.in
08:14
08:15 lizmat joined
lizmat so I was thinking something like this idiom: 08:17
open my IO::File $scalar
giving you an IO::Handle::File
and then implement the necessary logic in IO::File and IO::Handle::File to make it look like a file 08:18
would that make sense?
08:19 zakharyas left, zakharyas joined, woolfy left
jnthn Not to me 08:20
There's nothing to open
my $file = IO::InMemory.new; # or so would make more sense 08:21
Needs better naming
moritz +1 to using the OO approach
jnthn I think putting that behavior on open is a bit of a hack.
moritz p5's open() is a huge hack that we don't need to duplicate 08:22
jnthn An excusable one in Perl 5 where handles are not objects.
lizmat well, the thing is that if you have a module that accepts a path
and you want it to work in memory, you wouldn't have to change that routine
moritz ... assuming the argument isn't type to Str or IO::Path in the first place 08:23
lizmat so open() would need at least an MMD candidate to handle that case
internally, it would do the IO::InMemory of course 08:24
moritz lizmat: a possible compromise is to make open() a no-op on IO::Handle (or whatever we call it) objects
lizmat: then you can pass in an IO::InMemory where people expect a path, as long as they only open() it
lizmat moritz: I assume you meant IO::Handle::File ? 08:25
08:25 fhelmberger joined
lizmat then yes 08:25
that would essentially be happening, yes
08:25 SamuraiJack left
lizmat another thing before starting our part 1 of decommute: 08:26
TimToady: if Pair.key is rw, would this be expected behaviour:
liz$ perl6 -e 'my %h = (a=>1); .key = "b" for %h.pairs; say %h'
("a" => 1).hash
moritz hopes .key isn't rw
lizmat aka, silently allow changes to the pair, *without* affecting the hash
TimToady seems to be in two minds about that, see discussion yesterday 08:27
jnthn lizmat: I think the problem there is that the iterator implementation somehow ends up introducing its internal container to the hash
uh, to the Pair
It probably does like
moritz on a totally unrelated note, I thought about a horrible hack to work around Unicode problems with file systems: use punicode to encode module names!
jnthn my $foo = <obtain the key somehow>;
And so we accidentally build the pair with an rw thing
lizmat HashIter.new(self, :keystore($!keys), :pairs).list
is what Hash.pairs does 08:28
jnthn Yeah...so maybe it's inside HashIter :)
lizmat but Pairs are pretty much everywhere in Perl 6 08:29
and it seems a bit late to be changing that to something lake "Named" now
*like 08:31
anyways, need to pack and decommute
later&
08:31 lizmat left 08:38 thou joined 08:42 thou left, rurban joined
FROGGS moritz: punicode would at least be a nice thing for the distribution's tarball file name 08:43
08:47 rurban left 08:57 Su-Shee_ is now known as Su-Shee, dayangkun left 08:58 dayangkun joined 08:59 dayangkun left 09:01 dayangkun joined
volodin661 perl6:my @a=1,3,4,0,8; @a.first-index(@a.min).say; 09:02
09:04 dayangkun left 09:10 dayangkun joined
Ulti m: my @a=1,3,4,0,8; @a.first-index(@a.min).say; 09:16
camelia rakudo-moar 85bcd7: OUTPUT«3␤»
FROGGS volodin661: put a space after the first colon 09:17
masak finds he doesn't use $obj.say at all, just .say -- and he's a bit confused as to why others like $obj.say so much 09:20
dalek rlito: 666a73d | (Flavio S. Glock)++ | / (2 files):
Perlito5 - js - add test for "last from inside sub"
09:25
rlito: 493e35f | (Flavio S. Glock)++ | TODO-perlito5:
Perlito5 - perl6 - un-deprecate
09:26
FROGGS I don't like it either
fglock++ 09:27
jnthn Yeah, I suaully use $handle.say(...) of course. 09:29
FROGGS yeah 09:34
dalek rlito: 1c44abc | (Flavio S. Glock)++ | / (2 files):
Perlito5 - TODO - update
09:37
09:43 rurban joined 09:47 rurban left 09:51 denis_boyun joined 10:06 xinming_ joined 10:09 xinming left 10:13 FROGGS[mobile] left, FROGGS[mobile] joined 10:14 kurahaupo left
virtualsue tries to work out why panda won't build 10:21
dalek rlito: d5fe7f7 | (Flavio S. Glock)++ | / (2 files):
Perlito5 - js - add test for "alternate array deref syntax"
10:34
10:36 sqirrel_ joined
virtualsue it complains that there is no supported backend but i built perl6 with moar support 10:40
10:44 rurban joined 10:45 dmol left 10:48 rurban left 11:00 [Sno] left 11:01 [Sno]_ joined
moritz eeks 11:01
precomping LWP::Simple during the star build (moarvm) hangs 11:02
/home/mlenz/p6/star/rakudo-star-2014.05/install/bin/moar --execname=/home/mlenz/p6/star/rakudo-star-2014.05/install/bin/perl6-m --libpath=/home/mlenz/p6/star/rakudo-star-2014.05/install/languages/nqp/lib --libpath=/home/mlenz/p6/star/rakudo-star-2014.05/install/languages/perl6/lib --libpath=/home/mlenz/p6/star/rakudo-star-2014.05/install/languages/perl6/runtime /home/mlenz/p6/star/rakudo-star-2014.05/install/languages/perl6/runtime/perl6.moarvm --target=mb
perlpunks.de/paste/show/537f2ac1.569e.232 has been running for two hours now
same for JSON::RPC::Client 11:05
stuff looks really borked :(
11:06 kurahaupo joined
dalek rlito: d4d6772 | (Flavio S. Glock)++ | / (4 files):
Perlito5 - perl5 - fix 2 TODO bugs
11:07
FROGGS I was able to build star without problems yesterday 11:11
11:14 volodin661 left
dalek rlito: f2b435f | (Flavio S. Glock)++ | / (3 files):
Perlito5 - perl5 - fix "say" in Test.pm
11:18
11:32 Psyche^_ joined 11:35 Psyche^ left
dalek rlito: 173897c | (Flavio S. Glock)++ | TODO-perlito5:
Perlito5 - js - TODO - phase order
11:35
virtualsue i've just been told that panda doesn't build with rakudo star. i'm not sure what to do with this information. 11:41
cognominal In Mixy.pm : method default(--> Real) { 0 } 11:45
Why Real?
jnthn Rakudo Star already includes Panda, so there's no need to build one.
cognominal github.com/rakudo/rakudo/blob/nom/...Mixy.pm#L2 11:47
11:48 sqirrel_ left
virtualsue jnthn: ha. so it does. 11:48
still, i would have thought it should be buildable 11:51
tadzik timotimo: no eye deer 11:55
but it might just be starting a new panda :)
jnthn Panda as it was at the time of the Rakudo Star release in question, perhaps. Note that a lot of the versioned modules and CPAN integration stuff is coming together, and as part of that some backend-specific knowledge Panda currently has is, as I understand it, moving into Rakudo itself (which is where such things really belong).
Upshot being that latest Panda implementation is tracking latest Rakudo fairly tightly right now.
dalek ecs: 9230300 | (Stéphane Payrard)++ | S32-setting-library/Basics.pod:
Correct insconsistency
11:59
colomon there should be a tag in the panda repo for the last version which works with older Rakudos. 12:00
colomon releases he has no idea how to find tags under github. 12:02
12:05 berekuk left
tadzik it's there under "releases" 12:06
github.com/tadzik/panda/releases
I make those when I introduce changes that don't work on older rakudos
colomon tadzik++ 12:08
12:10 berekuk joined
Ulti how do you cast in Perl6? 12:10
colomon Ulti: what sense of cast?
Ulti so I have an object of a parent class to the one I want to cast to 12:11
so imagine I got an Int but I wanted to assign to an Even or Odd or something
colomon I believe that should Just Work 12:12
Ulti yeah its more I dont think I know the syntax 12:13
tadzik I think so
just assign it
it'll work out
colomon m: subset Odd of Int where { $_ % 2 }; my Int $i = 37; my Odd $o = $i; say $o;
camelia rakudo-moar 85bcd7: OUTPUT«37␤»
Ulti I get this as a message Type check failed in assignment to '$seq'; expected 'BioInfo::Seq::DNA' but got 'BioInfo::Seq'
tadzik is Seq a subclass of Seq::DNA? :o 12:14
Ulti no its a role
that BioInfo::Seq::DNA does
tadzik well, is that objectyou assign indeed a Seq::DNA?
jnthn m: role Foo { }; class Bar does Foo { }; my Foo $x = Bar.new;
camelia ( no output )
tadzik Ulti: I think you're doing it the other way around 12:15
if A is B, you can't assign B to something that wants A
"I want a dog!" "here, have a generic mammal"
Ulti sure you can :P though yeah I should just make a constructor that takes the generic role and makes a new object 12:16
Ulti checks to see if Java interfaces do act this way 12:17
maybe roles are just very different to what I was thinking 12:18
tadzik I still think you're doing this the wrong way
Seq is the generic, Seq::DNA is the specific
if something expects a type Seq::DNA, you can't give it Seq
see the dog example
can you show us the code?
Ven agreed with tadzik. Upcasting is safe, dwncasting is down 12:19
.oO( May the spirit of Liskov be with you ! )
tadzik :)
colomon
.oO(And also with you.)
Ulti well its a role so its not up or down its sideways, I would imagine you get a new one of the thing that does the role and the roles attributes patched over 12:20
so defaults of the class and the specific things from the role
colomon Ulti: which is the role? 12:21
Ulti Seq is the role and Seq::Dna the class that is the top level that does Seq
I guess Seqyness would have been a better name 12:22
tadzik it doesn't matter really
Seq is less specific than Seq::DNA
Ulti also its a bit weird you can create an instance of a role
tadzik you're expecting Seq::DNA
Ulti yeah
tadzik so you say "I don't accept just any Seq, I want a Seq::DNA" 12:23
that's why something that does Seq doesn't work here
Ulti its more I want a new Seq::DNA with the Seq attributes which are part of the Seq role copied over
tadzik perhaps Seq::DNA should have a method new-from-seq()?
12:24 breinbaa1 left
Ulti yeah sure I can make a constructor 12:24
skids wondered the other day if the bioinfo folks have ever had a reason to map GATC to △▫○X and what they decided on. 12:27
12:29 breinbaas joined 12:30 SamuraiJack joined, kaleem left
virtualsue ah, i now see the panda change which causes the issue 12:30
jnthn Ulti: You may also want to consider if a role is the right thing, or you just want a has-a relationship. I don't know your domain well enough to say. :) 12:32
Ulti: Note that Perl 6 has really nice delegation support through handles... 12:33
12:33 kaare_ left 12:35 Vendethiel- left 12:36 kaare_ joined 12:38 kaleem joined 12:39 vendethiel joined
moritz it does, because Even and Odd aren't subclasses, but rather subsets 12:41
uhm, /me replied to stale chat :( 12:42
12:42 kaleem left 12:45 anaeem1 left
dalek rlito: 2f3e1d2 | (Flavio S. Glock)++ | / (2 files):
Perlito5 - perl6 - eval-string
12:51
12:55 fhelmberger left 12:56 rurban joined 12:57 kaare_ left
Ulti well you can say the same thing of strings of characters too 12:59
Seq is the language of all strings, DNA is the ones made of only G C A T 13:00
I'd still probably implement them as two classes because DNA also implies a load of specific behaviour
though the liklihood of another biopolymer suddenly becoming biologically relevant is fairly slim at this point 13:01
13:08 SamuraiJack left
timotimo Ulti: assigning to a container with a different type restriction doesn't change the object 13:13
all methods and stuff are still virtual, late-bound
and the type restriction on the container the object is in does not inform the method resolution logic etc
13:17 sqirrel_ joined 13:21 fglock joined
fglock hi 13:21
FROGGS hi fglock 13:22
timotimo hello :)
fglock I'm trying to translate this from perl5 to perl6 - ' sub x { return 7, 8 }; my $v = x(); print $v,"\n" ' # 8
perl6 answer is 7 8 13:23
timotimo fglock: is there a way to get the 7, 8 in perl5 without modifying sub x?
fglock is there a signature/context I can set to get the perl5 behaviour?
FROGGS hmmmm
fglock timotimo: yes, using list context
jnthn my ($v) = x(); # should do it
timotimo jnthn: that doesn't bomb? o_O 13:24
fglock jnthn: that gives 7
13:24 guru joined
FROGGS timotimo: my should it? 13:24
jnthn wait, Perl 5 gives *8*?!
wtf.
timotimo yeah, the , operator evaluates to the last thing
13:24 guru is now known as ajr_
jnthn Well. How silly. 13:24
fglock yes - the comma operator returns the last element
:)
timotimo except if it's list context 13:25
FROGGS m: sub x { return { 7, 8 } }; my ($v) = x(); print $v,"\n"
camelia rakudo-moar 85bcd7: OUTPUT«␤»
jnthn Well, there's always my $v = x()[*-1] :P
FROGGS: Did you really want a block there?
fglock maybe my (*, $v) = x()
FROGGS jnthn: no, a statementlist :P 13:26
timotimo then put a do in front?
FROGGS fglock: the * one gobbles one then
jnthn fglock: $ not *, but it will only nom one thing
FROGGS perl -E 'sub x { return 7, 8 }; say x(); my $v = x(); print $v,"\n"' 13:27
78
8
sooo..... do we want wantarray now?
timotimo jnthn: off-topic (somewhat), how should gtk-simple model things like on_destroy_event where the thing we connect to can return a value to decide, for example, if a click on the X should result in a window closing or not?
13:28 vendethiel left
FROGGS fglock: you need something for your p5->p6 compiler, right? 13:28
fglock yes
FROGGS gimme a few minutes 13:29
jnthn timotimo: Supply an object with a method on it that can change a non-default decision. 13:31
13:31 BenGoldberg joined
fglock the compiler could generate something like: return wantarray ?? (7,8) !! 8 13:31
jnthn timotimo: And then the C call-in inspects that.
timotimo: Of course, relies on the programmer to not try to tweak that asynchronously, but that'd be a slightly odd thing to do. 13:32
timotimo: So basically a bit like e.preventDefault() thingy that happens in jQuery... 13:33
13:34 kaare_ joined
jnthn fglock: Yeah, then you'd need to have a wantarray implementation...somehow... 13:35
13:36 vendethiel joined
fglock or a lazy-comma... 13:36
[Coke] twitter.com/marktimemedia/status/4...0314421248 13:38
FROGGS fglock: I have no idea how to do that, without reimplementing p6store in Perl 6 code... 13:40
(to fake wantarray)
[Coke] oh, there's moar: www.mynameismichelle.com/git-frost/
fglock FROGGS: no problem - thanks for looking! 13:41
FROGGS fglock: I'll drop you a note once v5 has wantarray .o)
:o)
13:44 rurban left
fglock well, p5-in-js uses an "out-of-band" parameter to set the context - I could do the same in p5-in-p6 13:45
something like x( :scalar ) I think
FROGGS this should work, since you basically only have positional arguments 13:46
13:47 rindolf left
BenGoldberg You could do the same thing to implement lvalue context, too. 13:47
FROGGS for lvalue you just apply the 'is rw' trait 13:48
BenGoldberg Good point
Ven we can't wantarray anyway 13:49
m: sub x { return 7, 8 }; say x(); my (@*, $v) = x(); say $v; 13:50
camelia rakudo-moar 85bcd7: OUTPUT«===SORRY!=== Error while compiling /tmp/2LsCwLvC0F␤Unable to parse expression in declarator; couldn't find final ')' ␤at /tmp/2LsCwLvC0F:1␤------> sub x { return 7, 8 }; say x(); my (@⏏*, $v) = x(); say $v;␤ …»
Ven m: sub x { return 7, 8 }; say x(); my (*, $v) = x(); say $v;
camelia rakudo-moar 85bcd7: OUTPUT«===SORRY!=== Error while compiling /tmp/uIVkldWqus␤Malformed parameter␤at /tmp/uIVkldWqus:1␤------> sub x { return 7, 8 }; say x(); my (⏏*, $v) = x(); say $v;␤ expecting any of:␤ scoped declarator␤»
jnthn m: sub x { return 7, 8 }; say x(); my ($, $v) = x(); say $v;
camelia rakudo-moar 85bcd7: OUTPUT«7 8␤8␤»
Ven oh, right, perl 6 doesn't accept positional parameters after slurpy ones for a reason I don't agree with :P 13:51
13:51 perltricks joined
perltricks Does anybody know why: "say 'hello'.reverse;" does not raise a method not found exception? 13:53
timotimo m: say 'hello'.flip; say (1, 2, 3).reverse;
camelia rakudo-moar 85bcd7: OUTPUT«olleh␤3 2 1␤»
timotimo that's why :)
13:53 dmol joined
timotimo in perl6, many methods that make sense on lists will turn single items into a single-item-list and do the list thing on it 13:53
reverse is "turn a list around", flip is "turn a string around" 13:54
perltricks but it returns 'hello'
timotimo that's why reverse doesn't raise an error; it does what it's supposed to do, but the effect is no-op
m: say ("hello".reverse).WHAT
camelia rakudo-moar 85bcd7: OUTPUT«(List)␤»
FROGGS perltricks: it is a one element list for .reverse
jnthn perltricks: Yes, because it's really doing "hello".list.reverse
perltricks aha ok it converts to a single element array and reverses it
FROGGS yeah
jnthn BTW, same if you .flip an array. It'll .Stringy it first 13:55
perltricks got it thanks guys
Am making progress with the exercism Perl 6 exercises.... github.com/sillymoose/xperl6
13:56 telex left
perltricks Need 10 before exercism will add it to the app 13:56
13:57 grlpx left 13:58 telex joined
FROGGS perltricks: 10 what? 13:58
ten examples? 13:59
timotimo oh! that's you, perltricks
cool
perltricks 10 exercises completed. exercism is a programming exercises app. Provides a readme and a test file and you have to make the tests pass
timotimo did you see my comments?
dalek rlito: 52a4c4c | (Flavio S. Glock)++ | TODO-perlito5:
Perlito5 - perl6 - wantarray discussion
timotimo i'll be away most of the day, but maybe i'll throw a few tips your way from my smartphone 14:00
FROGGS nice
timotimo like using $_ (or $^a) instead of @_[0]
perltricks comments on reddit?
timotimo yes
gotta run now 14:01
perltricks just saw them, thanks will make those changes 14:02
14:03 thou joined 14:04 btyler joined 14:07 thou left 14:12 perltricks left, sqirrel_ left 14:14 thou joined 14:18 snarkyboojum left 14:19 rurban joined 14:20 bluescreen10 joined
Ven OH: (in a conference) nevermind me,I'm just looking for snippets to translate to perl 6 14:31
flussence m: my @a=1,3,4,0,8; @a.first-index(@a.min).say; @a.pairs.min(*.value).say; 14:35
camelia rakudo-moar 85bcd7: OUTPUT«3␤3 => 0␤»
14:39 xenoterracide_ joined 14:40 treehug88 joined
PerlJam still wishes for a way to say @a.first(@a.min :gimme-the-index) 14:40
the -index functions seem like they should be composable from the pieces we already have. 14:41
timotimo why does nobody want to try .kv.min and map?
or pairs.min.map?
that way you only have to go through the list once
PerlJam yeah, that works. 14:44
I just have a bother from the proliferation of -index functions. 14:45
14:47 kaleem joined 14:50 fglock left
moritz it sounds like we really need some kind of combinators 14:53
14:54 FROGGS[mobile] left 15:00 ppabian left 15:04 thou left 15:05 denis_boyun left 15:08 thou joined 15:13 raiph joined, kaleem left 15:18 Alula left, Ven left 15:20 Alula joined 15:21 john3213 joined, FROGGS left 15:22 thou left 15:25 ajr_ left, guru joined, guru is now known as ajr_ 15:26 john3213 left 15:27 markov joined 15:38 kivutar joined
Ulti if you had to show someone a single line of Perl6 to entice someone who has never even seen Perl 5 or 6 what would it be? 15:44
15:49 thou joined 15:51 molaf joined
PerlJam Depends on the person I was showing it to :) 15:51
timotimo p6 is many things to many people 15:53
15:53 anaeem1 joined
PerlJam It's like ... how do you show someone some magic to entice them to become a magician? The magic you show them can't be so complicated that they lose all hope of learning it. But if you show them a card trick, they think "I can learn to do card tricks" and then you show them a disappearing apple or something and they think "I can do card tricks, maybe i can make apples disappear too" 15:56
But, if they already know card tricks and that's where you start, then they're likely to go "What's the big deal?" and not go deeper. 15:57
16:00 FROGGS joined 16:06 zakharyas left
btyler Ulti: personally I really like jnthn's prime-grepping example as a short "extremely cool but still pretty clear" demo. 16:08
eg: my @promises; for (1000 .. 1010) -> $prime-index { push @promises, start { (1..Inf).grep(*.is-prime)[$prime-index] }}
pretty fun to start that off and see all available cores maxing out :) 16:09
-and- it works on r-m these days, so you don't have to wait for the JVM to boot to see the coolness 16:10
BenGoldberg There's got to be a more efficient, but still multi-threaded way of doing that... 16:11
Is there a perl6 variable which says how many cores the cpu has? 16:12
eg: my @primes; my @promises; for my $core ( 1 .. $*PROCESSOR<cores> ) { push @promises, start { $primes[$_] = .is_prime } for $core, $core+$*PROCESSOR<cores> ... 1010 } } 16:15
jnthn BenGoldberg: We should put such load-balancing/scaling smarts into the scheduler rather than have everybody re-implement them, I think :) 16:16
But yeah, it will need that data.
And no, we don't expose it in Perl 6 yet.
PerlJam BenGoldberg: IF you spec it, someone may build it :)
BenGoldberg It's kinda silly to recompute .is_prime eleven times for the first thousand integers. 16:17
Err, for the first thousand primes.
btyler I always assumed the point of that demo was to spent enough time crunching that you could open up a system monitor and see that, indeed, all available cores are doing stuff 16:19
BenGoldberg Well in that case, I'm sure it'll work just fine.
16:20 Rotwang joined
BenGoldberg But if I knew the computer had two cores, I'd have one looking for primes that were 1 mod for, and the other looking for primes 3 mod 4... or some such. 16:21
s/1 mod for/1 mod 4/
PerlJam And I'd want my execution environment using those cores without me having to tell it to. :)
BenGoldberg Load balancing across all cores only will work if you've got at least as many tasks as you've got cores. 16:25
So if you make eleven tasks, and you've got one or two or four cores, no problem. 16:26
But if you had twelve cores, then one of those cores would be idle.
16:26 pdcawley_ left
flussence
.oO( that thing I mentioned ~18h ago would be an impressive one-line demo if it worked... )
16:26
[Coke] wonders if the name of this month's compiler release comes from star trek. 16:40
16:43 ajr_ left
vendethiel masak: WRT parsing ? 16:50
the problem is that I can have "block headlines" on multiple lines 16:51
Ulti: say so 1 == 3 | 4 when .lines given open('file', :rw) :-° 16:52
masak vendethiel: is that because of some kind of line continuations? 16:54
vendethiel masak: no, not even
masak: gist.github.com/Nami-Doc/dc3f6126140f0094f31b something like thgat 16:55
masak looks
vendethiel so I basically need to parse <line> differently depending on whether I'm on the same indent as the previous or not, if ...
masak vendethiel: I don't think my solution is for your kind of indented text :) 16:56
vendethiel yep
masak vendethiel: guessing best you can do is steal the test suite and then add cases until it does what you want.
vendethiel I've actually something a bit ATM, I can get a correct AST from your stuff
but it isnt parsed at all
I'm not sure how I want to do that. Perl 6's grammars are not made to deal with this kind of stuff 16:57
i'm actually thinking about generating indent and outdent token ... 16:58
masak still need to preprocess that to get the right kind of recursive structure. 17:00
er, post-process.
vendethiel but it's actually far easier 17:01
I know that a block is `<declarations> + % <nl> <block>` 17:02
and recursively parse it 17:03
that does seem easier to me 17:05
masak yes. 17:07
17:12 thundergnat joined
thundergnat Every time I work with perl 6 grammars I am amazed at how much I can do with so little code. 17:19
I have a little free time this week so I messed around with a cardinal to numeric parser. rosettacode.org/wiki/Cardinal_to_numeric
I'm not really thrilled with how I've got every thing shoved into TOP, but it works ok. 17:20
17:20 raiph left
masak shove things into TOP until you see a way to not shove things into TOP :) 17:20
thundergnat masak: Heh, yep, thats pretty much how I've been operating. 17:21
17:22 guru joined 17:23 guru is now known as Guest45327, Guest45327 is now known as ajr_, denis_boyun_ joined
vendethiel masak: do you think I could get Text::Indented::(?) to take something, generate tokens somehow and return stuff in that state ? 17:24
not sure what token I should use to mean indent and outdent 17:25
masak vendethiel: I don't really see why you have to have an intermediate token step. but maybe that's just me.
vendethiel masak: I don't see how I can generate correct blocks
masak entia non sunt, etc.
vendethiel really, really dislakes putting random latin sentences 17:26
masak: how can I process block levels then ? While I'm parsing everything else 17:27
17:33 itz joined
masak vendethiel: sorry to trigger your inexplicable latin dislike ;) 17:44
vendethiel: seems to me the logic for parsing block levels is the only thing you want to keep from my original algorithm.
vendethiel pretty irrelevant :P
17:48 kivutar left
vendethiel (i mean the latin stuff, I don't even know why I mentioned that) 17:49
masak: seems to me too, yeah 17:50
masak the point I wanted to convey just happened to be expressed in Latin... :P 17:51
jnthn
.oO( "what happens in vegas..." )
masak lol
vendethiel masak: I'm open to suggestions :-) 17:53
masak "steal the logic for parsing block levels" was my suggestion. 17:54
um, "steal the tests and add more" was my other suggestion.
I don't have more right now.
vendethiel yeah, tests were rightfully stolen 17:55
masak \o/ 18:01
vendethiel and I already stole the block parsing
I'm just inheriting the grammar atm
masak that may or may not lead to total and utter happiness. 18:04
18:05 treehug8_ joined
vendethiel oh, that's not gonna be enough 18:05
masak happiness is not enough!? 18:07
18:07 treehug88 left
vendethiel masak: :) 18:09
I mean inheritance
masak I'm not gonna rule it out completely, but instinct tells me that inheritance won't be enough for you, no. 18:10
18:11 anaeem1 left 18:12 anaeem1 joined, kivutar joined 18:13 anaeem1 left, anaeem1 joined 18:14 anaeem1 left, treehug88 joined
vendethiel masak: well, the interesting part is the stuff in line, and I can't inherit that 18:15
18:15 anaeem1 joined 18:16 anaeem1 left
timotimo do note that grammarsbare supposed to be able to match againstbstreams of objects, too 18:16
18:16 treehug8_ left
vendethiel (?) 18:17
oh, s/b/ /
jnthn timotimo: That's fairly hypothetical and not likely to make 6.0, unless somebody suddenly gets the urge to do it, though... 18:18
[Coke] "hey, when are we hitting 6.0" ? 18:24
Do we have a list of big ticket items remaining?
vendethiel Coke: be wary of Mus
[Coke]: matrix :P ? 18:25
jnthn [Coke]: No, but it's probably about time to make one. 18:27
vendethiel you think so ? 18:28
that's a good news
masak we're so full of good news
vendethiel masak: I'm still waiting for my total and utter happiness !
masak then don't use inheritance! 18:30
[Coke] didn't perl6.com used to redirect to perl6.org?
vendethiel masak: I'm not ! 18:31
nwc10 mojibake! www.flickr.com/photos/34063820@N00/14249625331/
[Coke] jnthn: where to keep the list? Perl6.org? perl6/mu ? 18:32
-1 on the old perlfoundation wiki.
18:32 anaeem1_ joined
jnthn [Coke]: I was pondering more of a tri-color making of the spec 18:33
[Coke] hokay. 18:34
jnthn [Coke]: Implemented in Rakudo, not implemented but we agree we really should for 6.0, deferred to 6.* (unless somebody really doesn't want to contribute to anything else, and just happens to implement it anyway)
nwc10: Fail! 18:35
[Coke]: Git repo is probably best. I'm open to suggestions of how we do the marking. 18:37
nwc10 jnthn: yes. I wasn't there last night and forgot to look this morning. Was fixed this evening 18:38
18:38 denis_boyun_ left
vendethiel one file, checkboxes :p ? 18:38
nwc10 This error dialogue on a lift display is also fail: www.flickr.com/photos/34063820@N00/14249625351/
itz does v5 still need a patched rakudo? 18:39
nwc10 Unicode is hard. Let's go ASCII! :-)
jnthn itz: Not since a few days ago
Epic fehl 18:40
nwc10 groans
vendethiel (I mean, one file per syn, then checkboxing for each headline)
jnthn I don't think headline level is going to be enough... 18:41
vendethiel jnthn: really ? That's gonna be one long list to do
jnthn Yup.
[Coke] line? character? 18:45
(which would painfully hard) 18:46
18:50 anaeem1_ left
FROGGS itz: I am working on making v5 cope with panda 18:52
right now it creates a Makefile, which will be replaced now be Build.pm 18:53
jnthn: I think that the biggest missing thing for Perl 6 1.0 might be NFG and shaped Arrays... though I am not 100% sure about what really needs to go in
and yeah, such a tricolore would be awesome 18:54
jnthn FROGGS: Yes, and native arrays.
FROGGS yeah
that might be it...
ahh, S11 of course, but that seems rather doable 18:55
parallelized hypers are also on the features list, but that is just an implementation detail 18:56
18:58 darutoko left 18:59 anaeem1_ joined
FROGGS I have to say again how awesome fast perl6@MoarVM is... when I test the modules in star, it has almost finished in the time I open the test output file in my editor... 19:01
sure, I have to click through some directories, but still :o)
colomon I think it might be important to have complex vs Complex straightened out, but that should be a pretty easy change, I'd expect. 19:02
FROGGS since Complex does what complex should do, right? 19:03
colomon: btw, it is not really about the implementation, but about the spec 19:04
when we do Complex wrong, it is just a bug
colomon FROGGS: right
FROGGS we can still have a Perl 6 1.0 spec by then
19:04 jeffreykegler joined, anaeem1_ left
jnthn Yeah, but it means the "complex" (lower-case) type probably wants to a "will do" for example 19:04
FROGGS therefore we need a NFG implementation to see how it works out
19:05 jeffreykegler left
colomon jnthn: "will do"? 19:07
jnthn colomon: As in, probably should include in 6.0
colomon oh, yes, that's what I was trying to say. :)
jnthn Especially as the current Complex basically is complex :)
colomon right 19:08
masak so complex!
colomon and Rakudo's version of Complex from a few years back is probably a good first approximation to the real Complex.
:)
jnthn masak: *such :P 19:09
masak :P 19:10
BenGoldberg Is there any convenient way to force integer arithmatic to happen? Let's say I want to divide 5/2, and get two instead of two-and-a-half. And I don't mean rounding afterwards.
colomon BenGoldberg: div instead of / 19:11
BenGoldberg Thanks :)
colomon m: say 5 div 2
camelia rakudo-moar 85bcd7: OUTPUT«2␤»
masak fun trivium: the semantics of `div` isn't really "integer division", but "divide according to the type". 19:14
moritz but is it defined for anything except integers?
masak it should me.
be*
moritz for what?
FROGGS DateTimes? 19:15
FROGGS runs
masak heh.
moritz could be defined for Duration though
masak reading S03 made me a bit more confused. 19:16
dalek atures: d672c50 | thundergnat++ | features.json:
Fixed borken link.
19:17
colomon according to S03, infix:<div>, integer division
it is supposed to work for all different kinds of integers
19:18 treehug8_ joined 19:20 treehug88 left
FROGGS wow, IO::Path.contents is so sloooow :( 19:22
19:26 darutoko joined 19:27 eternaleye left, darutoko left 19:28 guru joined 19:29 guru is now known as Guest88556, ajr_ left
timotimo which part of it is so slow? 19:29
canonpath? 19:30
gisting the result?
19:30 Guest88556 is now known as ajr_
timotimo surely not iterating the files on the low level 19:30
19:34 treehug88 joined, eternaleye joined 19:36 treehug8_ left 19:40 REPLeffect left 19:45 anaeem1 joined, anaeem1 left 19:50 anaeem1 joined, anaeem1 left
timotimo can haz good news? 20:11
[Coke] timotimo: sure: tonight is opening night! 20:12
20:13 kivutar left
timotimo opening of what? 20:14
masak gifts! 20:15
timotimo froggs, we should include v5 versions of our benchmarks in timing runs, dont you think? :)
well, once it works well enough
PerlJam made a naïve Lingua::ENG::Word2Num today (and sent it to the PetaMem folks) 20:20
It's at github.com/perlpilot/p6-Lingua-ENG-Word2Num if anyone wants to improve on it ;) 20:21
[Coke] timotimo: ghentplayhouse.org/Season05Page.html 20:22
20:24 treehug88 left
masak PerlJam: looking. 20:25
BenGoldberg Is there a way to get the evalbot to execute perl6 code from a url? 20:26
[Coke] give it a public gist url 20:27
camelia: ghentplayhouse.org/Season05Page.html
masak PerlJam: that's beautiful. 20:28
[Coke] r: gist.github.com/coke/0cdeeb0363d0fd2464d6
camelia rakudo-{parrot,jvm,moar} 85bcd7: OUTPUT«gist not found»
20:28 treehug88 joined
[Coke] Oh. recent github gist changes have probably broken this feature. 20:28
PerlJam masak: I don't think I'd use that word, but it is somewhat functional. I didn't really test it hard though, so I'm sure there are bugs
20:31 anaeem1 joined, anaeem1 left, Psyche^_ left
masak PerlJam: I might be positively surprised by Github's color coding for Perl 6 code, which seems to have improved quite a lot lately. 20:32
20:37 anaeem1 joined
jnthn PerlJam++ 20:40
timotimo masak, that was hoelzro 20:43
hoelzro++ for good measure and syntax highlighting 20:44
masak indeed, hoelzro++ 20:45
20:48 treehug88 left
BenGoldberg r: constant primes = 2, 3, do { my $i = 1; my $p = primes[$i]; my $q = $p * $p; my %s; grep -> $n { if ( %s{$n}:delete ) -> @c { push %s{ $n + $_ } for @c; False; } elsif ( $n < $q ) { True; } else { my \twop = $p * $p; push %s{ $q + twop }, twop; $p = primes[ ++$i ]; $q = $p * $p; False; } }, 5, 7 .. Inf;}; say primes[999 .. 1009]; 20:51
camelia rakudo-moar 85bcd7: OUTPUT«===SORRY!===␤Cannot invoke null object␤»
..rakudo-jvm 85bcd7: OUTPUT«===SORRY!===␤java.lang.NullPointerException␤»
..rakudo-parrot 85bcd7: OUTPUT«===SORRY!===␤Could not find sub &primes␤»
20:51 sorear left
masak huh. 20:53
maybe try with binding rather than assignment?
BenGoldberg You mean := instead of = ?
masak yes. 20:54
(but clearly something is wrong with the above output already.)
20:54 rurban left
BenGoldberg Same error 20:54
21:05 bluescreen10 left, sorear joined
colomon sorear! \o/ 21:08
masak sorear! \o/ 21:09
BenGoldberg: think you could golf that?
21:09 sorear left
BenGoldberg It was a pita to type it in the first place, I don't have perl6 installed; I wrote it using codepad.org, then had to remove the newlines 21:10
Now, if I could give the eval bot a url, I'd be fine. I can use git... but apparently that's down. 21:11
Or, the bot doesn't see git pastes right, at present... 21:12
moritz r: constant primes = 1, 2 , { primes[0]; 3 } ... 3; say primes
camelia rakudo-{parrot,jvm,moar} 85bcd7: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Variable '&primes' is not declared␤at /tmp/tmpfile:1␤------> constant primes = 1, 2 , { ⏏primes[0]; 3 } ... 3; say primes␤»
moritz that seems to be the essence
except that the example above somehow manages to circumvent the compile-time error message 21:13
21:15 sorear joined
BenGoldberg r: constant primes := 2 , 3, do { my $p = primes[1]; grep { rand < .5 }, 5, 7 ... 99 }; say primes[10] 21:16
camelia rakudo-moar 85bcd7: OUTPUT«===SORRY!===␤Cannot invoke null object␤»
..rakudo-jvm 85bcd7: OUTPUT«===SORRY!===␤java.lang.NullPointerException␤»
..rakudo-parrot 85bcd7: OUTPUT«===SORRY!===␤Could not find sub &primes␤»
BenGoldberg golfed, I think. :)
21:17 xinming_ left, xinming joined
BenGoldberg r: constant primes := 2 , 3, do { my $p = primes[1]; 2 }; say primes[10] 21:17
camelia rakudo-moar 85bcd7: OUTPUT«===SORRY!===␤Cannot invoke null object␤»
..rakudo-jvm 85bcd7: OUTPUT«===SORRY!===␤java.lang.NullPointerException␤»
..rakudo-parrot 85bcd7: OUTPUT«===SORRY!===␤Could not find sub &primes␤»
vendethiel BenGoldberg are you looking for ... :P ? 21:18
BenGoldberg Well, I might need ... instead of .. but the important thing at present is that I'd like to be able to define a constant lazy list in terms of itself. 21:20
21:22 SevenWolf joined
retupmoca r: my @foo = 1, 2, { @foo[0] } ... *; say @foo[1]; say @foo[75]; 21:32
camelia rakudo-{parrot,jvm,moar} 85bcd7: OUTPUT«2␤1␤»
retupmoca r: my \foo = 1, 2, { foo[0] } ... *; say foo[1]; say foo[75];
camelia rakudo-{parrot,jvm,moar} 85bcd7: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Variable '&foo' is not declared␤at /tmp/tmpfile:1␤------> my \foo = 1, 2, { ⏏foo[0] } ... *; say foo[1]; say foo[75];␤»
21:38 Rotwang left 21:41 itz left 21:46 anaeem1 left 21:49 kaare_ left 21:54 xenoterracide_ left 22:01 lizmat joined 22:08 molaf left 22:24 BenGoldberg left
timotimo i have a use case for a combine_latest supply op 22:26
does that mean i should implement it? :)
tadzik tag, you're it! 22:27
22:29 dmol left
jnthn timotimo: Perhaps, but...did you try seeing if you can write it with "on" first? 22:30
timotimo oh, i may be able to. 22:32
is that in the specss
vendethiel blog, you're it :P !
timotimo ?
jnthn should be 22:33
We implement loads of other things in terms of it too
timotimo i'm now experiencing what happens when we throw an exception in a callback :)
i didn't find it in the synopsis 17 yet
22:38 virtualsue left
timotimo bleh. i'm trying to connect the toggled event of a toggle_button or a check_button and they don't seem to fire :\ 22:41
oh
i was wrong. never mind me :)
jnthn doesn't mind timo 22:42
timotimo huh. 22:49
how do i ...
m: class T is rw { has $.status }; " and ".join: (T.new(:status), T.new(:!status)).map: { $_ ?? "on" !! "off" } 22:50
camelia ( no output )
timotimo m: class T is rw { has $.status }; say " and ".join: (T.new(:status), T.new(:!status)).map: { $_ ?? "on" !! "off" }
camelia rakudo-moar 85bcd7: OUTPUT« and ␤»
timotimo i don't understand this.
m: class T is rw { has $.status }; say ((T.new(:status), T.new(:!status)).map: { $_ ?? "on" !! "off" }).perl
camelia rakudo-moar 85bcd7: OUTPUT«("on", "on").list␤»
timotimo oh!
silly me :)
colomon is watching jnthn give a talk and eating mapo doufu. life is good. 22:51
vendethiel (what talk ?)
(or "which"*) 22:52
timotimo what's the most readable way to get the .status of two objects (Boolean objects) and turn a boolean into "on" or "off" and join it with "and" 22:56
?
<off on filenotfound>[($foo, $bar)>>.status].join(" and ") is not too pretty, IMO. 22:57
colomon vendethiel: invokedynamic 22:59
timotimo $status_label.text = "the toggles are " ~
(($check_button, $toggle_button) ==> map { <off on>[$_.status] } ==> join " and ");
flussence hm, we can't do a Qt::Simple because it's C++, right? I'm tempted to mess around with EFL... 23:03
colomon m: enum Result <off on filenotfound>; my Result $r = Result::on; say "$r"; 23:05
camelia rakudo-moar 85bcd7: OUTPUT«on␤»
colomon m: enum Result <off on filenotfound>; my Result $r = 1; say "$r"; 23:09
camelia rakudo-moar 85bcd7: OUTPUT«Type check failed in assignment to '$r'; expected 'Result' but got 'Int'␤ in block at /tmp/KSEpOHVvt5:1␤␤»
colomon m: Int enum Result <off on filenotfound>; my Result $r = 1; say "$r"; 23:10
camelia rakudo-moar 85bcd7: OUTPUT«===SORRY!=== Error while compiling /tmp/oLAFAZ_opV␤Two terms in a row␤at /tmp/oLAFAZ_opV:1␤------> Int ⏏enum Result <off on filenotfound>; my Re␤ expecting any of:␤ postfix␤ infix stopper…»
colomon m: my Int enum Result <off on filenotfound>; my Result $r = 1; say "$r"; 23:11
camelia rakudo-moar 85bcd7: OUTPUT«Type check failed in assignment to '$r'; expected 'Result' but got 'Int'␤ in block at /tmp/F6j0pLB7sn:1␤␤»
colomon m: enum Result <off on filenotfound>; my Result $r = Result(1); say "$r";
camelia rakudo-moar 85bcd7: OUTPUT«on␤»
23:12 Mouq joined
Mouq o/ 23:13
yoleaux 5 May 2014 07:26Z <lizmat> Mouq: should List.rotor(1,0) not be just { self } ?
5 May 2014 07:26Z <lizmat> Mouq: and could you also transmogrify the S17-supply/rotor.t tests to handle List.rotor ?
Mouq Oh geez :(
I've been busy with school and my laptop stopped working two weeks ago
.ask lizmat I really kind of can't add tests for List.rotor at the moment :( And yes, List.rotor(1,0) should be { self } 23:15
yoleaux Mouq: I'll pass your message to lizmat.
Mouq Well, .tell, I suppose
23:17 thou left
Mouq I suppose I can edit on github... 23:19
dalek kudo/nom: b05edf7 | (Alexander Moquin)++ | src/core/List.pm:
List.rotor(1,0) should be { self }
timotimo flussence: i think efl is pretty cool, though i have never used it myself
Mouq cringes just a little, is glad that commit came out like he wanted it\ 23:20
timotimo hey Mouq
sorry to hear about your tech trouble :(
Mouq hey timotimo!
timotimo colomon: i like the enum trick, thanks! 23:21
Mouq It's alright, I shouldn't be on much anyway; have to start tying things up before graduation :)
Some thoughts, though: 23:22
Could we add a warning for `say :named`?
timotimo i wonder how i could >>. that enum coercion :\
probably can't. bummer!
Mouq "Named parameter "named" passed to &say. Please use parens if you meant to pass a Pair
"
Just because `say :$var` happens so often 23:23
timotimo mhh, probably could
Mouq Also, not a new thought, but the error for
m: ~Any
camelia rakudo-moar 85bcd7: OUTPUT«use of uninitialized value of type Any in string context␤»
Mouq Really should have a backtrace 23:24
flussence agreed, that was giving me a headache this week :(
colomon +1
Mouq And, IMO, a full backtrace, because perl5's use of only one line # causes headaches when using someone else's lib(s)
colomon Mouq: I'm happy to say I just rebuilt rakudo and it appears to be working fine after your patch. :) 23:25
(still be working fine, I mean)
Mouq And finally, method EXPR in HLL.nqp could use some loop labels; someone should see if that makes it run any faster. Obviously if it doesn't, we should probably leave it be, although FROGGS+++ anyway :) 23:26
timotimo it has a backtrace on our other backends and i agree it should have one on moar, too
Mouq Yay! colomon++
timotimo: oh?
p: ~Any
camelia rakudo-parrot 85bcd7: OUTPUT«use of uninitialized value of type Any in string context in block at /tmp/jLTJmKaR9Y:1␤␤»
colomon has done the commit in github without compiling thing before, and even when very safe it is scary. 23:27
timotimo are we so used to moar being the awesomest back-end that we assume everything missing in moar is missing everywhere else, too? :)
Mouq p: sub blabla ($_) { ~$_ }; blabla Any
camelia rakudo-parrot 85bcd7: OUTPUT«use of uninitialized value of type Any in string context in sub blabla at /tmp/6D1rehTi6l:1␤␤»
Mouq timotimo: Mayhaps :)
timotimo++ for keeping up with p6weekly :) 23:28
FROGGS++ for the release
timotimo thanks :)
i've even gotten back into doing helpful things 23:29
i've taken care of gtk-simple for a bit
and improved nativecall callback handling on moarvm
Mouq timotimo++ for gtk-simple too, can't wait to try it out :)
*gtk-simple love
timotimo yeah, jnthn is responsible for most of the awesome there
Mouq lizmat++ for continuing to be a commit ninja 23:30
timotimo yes!
Mouq jnthn++, nwc10++, and (all the awesome people I missed)++ 23:33
That's it for tonight, nice work guys! \o #perl6 23:35
23:35 Mouq left 23:50 btyler left