»ö« 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.
Mouq *:method 00:00
raydiak why is all this better than making method default to 'our' semantics?
Mouq raydiak: Because then it doesn't have 'has' semantics :P
raydiak I don't get it. 00:01
Mouq m: class Foo { our method bar { 42 } }; say Foo.bar
camelia rakudo-moar 7f2085: OUTPUT«No such method 'bar' for invocant of type 'Foo'␤ in block <unit> at /tmp/kuvMkLEdXm:1␤␤»
raydiak heh okay I get it :)
Mouq m: module Foo { method bar { 42 } }; say Foo.bar
camelia rakudo-moar 7f2085: OUTPUT«Useless declaration of a has-scoped method in multi (did you mean 'my method bar'?)␤No such method 'bar' for invocant of type 'Foo'␤ in block <unit> at /tmp/8UbUyQuqVW:1␤␤»
raydiak I had no idea using our makes a method not callable as a method
Mouq raydiak: However, it's possible that 'has' *should* have more 'our'-like semantics 00:02
raydiak yes I'm think if we want to facilitate looking things up symbolically...like in a table somehow...you see where I'm going :) 00:04
Mouq raydiak: Except: `class Foo { method FALLBACK ($name) { $name.perl }}; say Foo.::bar(Foo)` => "bar" 00:07
raydiak it doesn't handle multi candidates without the rest of the long name, either
Mouq raydiak: And probably lots of other things
00:09 pmurias left
raydiak m: class Foo { method FALLBACK ($name) { $name.perl }}; say Foo.^lookup('bar') 00:09
camelia rakudo-moar 7f2085: OUTPUT«(Mu)␤»
00:09 wicope left
Mouq is using ^find_method 00:09
raydiak m: class Foo { method FALLBACK ($name) { $name.perl }}; say Foo.^find-method('bar')
camelia rakudo-moar 7f2085: OUTPUT«No such method 'find-method' for invocant of type 'Perl6::Metamodel::ClassHOW'␤ in block <unit> at /tmp/hKPtqOtiUx:1␤␤»
raydiak m: class Foo { method FALLBACK ($name) { $name.perl }}; say Foo.^find_method('bar')
camelia rakudo-moar 7f2085: OUTPUT«<anon>␤»
raydiak m: class Foo { }; say Foo.^find_method('bar')
camelia rakudo-moar 7f2085: OUTPUT«(Mu)␤»
Mouq (The code @ github.com/Mouq/p6-Syntax-GetMetho...Method.pm6 works, btw) 00:10
raydiak m: class Foo { multi method bar () {}; multi method bar ($) {}; }; say Foo.^find_method('bar')
camelia rakudo-moar 7f2085: OUTPUT«bar␤»
Mouq (Well, except on core types :P)
raydiak m: class Foo { multi method bar () {}; multi method bar ($) {}; }; say Foo.^find_method('bar').signature
camelia rakudo-moar 7f2085: OUTPUT«use of uninitialized value $name of type Any in string context in block <unit> at /tmp/dhhaN5zyeN:1␤␤:(Any ::T $: Any |)␤»
raydiak oh right, it gives me the proto 00:11
related thought: a method-call-ish syntax which resolves the dispatch for passed params but returns the candidate instead of invoking it 00:15
(or maybe just make the second multi you already have in there do that) 00:20
00:21 espadrine left
Mouq raydiak: Oo, that would be interesting 00:21
00:22 BenGoldberg left
Mouq raydiak: But then how do you call it without narrowing? $foo.::bar()(Foo, "baz") seems pretty inconsistent 00:23
00:23 BenGoldberg joined
raydiak ah, I see...yeah it might have to be something separate 00:23
Mouq Granted, as it is, $foo.::bar() will return the method, but you can at least avoid writing it like that most of the time 00:24
Actually, it would by $foo.::bar.(Foo, "baz"), which isn't too bad
raydiak well, if you wanted to just right away call it with args, presumably you would have used a normal method call anyway 00:26
otoh I'm not sure how you would distinguish between getting the proto and getting a candidate which has no params :) 00:28
Mouq Fair point, but I feel like if there's going to be syntax to narrow down multi routines, it should be generalizable to subs
raydiak oh, so true...
Mouq doesn't know if &sub:('params') is already reserved, and if so, reserved for this purpose 00:29
raydiak perhaps something to add as a method on routines or something, instead
BenGoldberg Is there a way to curry object methods? 00:41
$foo.^assuming 00:42
$foo.^assuming('somemethod', $some, $args);
raydiak once you have a methodref you can pretty much treat it like a normal sub including currying (even currying the invocant) 00:43
m: class Foo { has $.bar; }; my &curried = Foo.^find_method("bar").assuming: Foo.new(:bar<xyz>); say curried 00:49
camelia rakudo-moar 7f2085: OUTPUT«xyz␤»
raydiak actually, come to think of it, currying a method *without* the invocant is what you can't do, b/c assuming doesn't allow skipping positionals w/* yet 00:50
Kristien I see Jupiter. 00:55
raydiak Mouq: after all this, I think .:: is kinda nice as you have it...the narrowing thing should be separate, and the package symbol table feels wrongish b/c generally nothing goes into it without explicit 'our' (one of the things 6 moves away from compared to 5 I guess) 00:57
and Mouq++ for turning over this stone, not to mention providing a working example :)
01:00 rurban joined
Mouq raydiak: Heh, thanks :) I'm definitely interested to see what the EU hackers say about it 01:08
raydiak I guess the only parts left that I wonder about are whether '.::' is best (since it really has nothing to do with symbol tables but I don't have a better suggestion off the top of my head), and whether the multi which allows invokation is going to cause confusion since .::bar() and .::bar('stuff') are all of a sudden very different and I don't see a use-case for it 01:09
I also wonder if 'our method' should augment the has semantics instead of replacing them (effectively making it a weird detached floating method thingie?), but that's a different discussion 01:11
but yes it will be interesting to see what all the sleeping folks say
Mouq raydiak: I'm concerned about that too... at the same time, if you know that .:: means get a method, then .::bar() wouldn't never make sense to behave like .::bar('stuff'). I suppose the question is whether to allow arguments in the first place directly to dispatch:<.::>
*would
raydiak sounds most sane to disallow them unless you can think of *any reason whatsoever* to use .:: instead of . for that case :) 01:14
Mouq :) Eh, yeah. I'll amend the README to reflect this 01:15
raydiak was fun kicking that one around; afk 01:17
01:18 BenGoldberg left 01:19 BenGoldberg joined
mattp__ are there any planned 6guts posts coming soon? 01:25
its been a while :)
Mouq mattp__: That's up to jnthn :p he did post some slides from a recent talk at FOSDEM 01:27
01:27 muraiki_ joined
mattp__ Mouq: are those public? 01:27
where else can i look to read about progress on things? 01:28
Mouq jnthn.net/papers/2015-fosdem-static-dynamic.pdf
mattp__: p6weekly.wordpress.com/ is one 01:29
mattp__ Mouq: thanks 01:30
muraiki_ the static/dynamic presentation was great 01:37
well, at least the slides :) 01:38
Kristien I don't like the Moon. 01:51
Let's swap it with Phobos or Io.
01:54 grettir left 02:01 ggherdov left, Kristien left 02:06 colomon joined 02:09 pnu left 02:21 adu left 02:29 adu joined
muraiki_ :n 02:31
02:34 fhelmberger joined, gfldex left 02:39 fhelmberger left 02:46 ilbot3 left 02:47 ilbot3 joined 02:49 colomon left
TimToady to Seattle now 02:51
02:51 colomon joined 02:53 BenGoldberg left
muraiki_ have a safe trip 02:54
02:54 BenGoldberg joined
TimToady already did 02:57
s/to/in/
03:09 ggherdov joined 03:12 pnu joined
adu TimToady: that was quick! 03:25
Europe to Washington in 5 minutes? 03:26
03:26 noganex_ joined
TimToady no, already flew to Seattle, flew to Mountain View, and drove back here so we'll have a car here while my younger daughter has her 2nd baby 03:27
but that's why I've been fairly scarce the last couple days 03:28
03:28 noganex left
dalek c: d0f3d01 | Mouq++ | / (4 files):
Put the templates in the template files :P
03:34
c: c5609cc | Mouq++ | htmlify.p6:
Merge write-routine-file and write-syntax-file
c: ea1ce1f | Mouq++ | / (2 files):
Merge process-pod-source subs
03:41 dustinm` joined 03:42 Mouq left 03:43 Mouq joined 03:47 dustinm` left
hoelzro .tell pmurias I tried my hand at implementing isint and isnum; isint wasn't too bad, but I think isnum is going to be hard, because JS doesn't distinguish between number types 03:51
yoleaux hoelzro: I'll pass your message to pmurias.
avuserow_ m: say $?FILE; sub foo {say CALLER::<$?FILE>}; foo; # should this work? 04:06
camelia rakudo-moar 7f2085: OUTPUT«/tmp/3DedfG7i6T␤(Any)␤»
avuserow_ m: say $?FILE; sub foo {say OUTER::<$?FILE>}; foo; # should this work?
camelia rakudo-moar 7f2085: OUTPUT«/tmp/bQzey5D8Fv␤(Any)␤»
avuserow_ $?PACKAGE appears to work in the above cases, but not if they are in different files/modules. Still experimenting on this... 04:08
okay, PACKAGE only works for OUTER, not CALLER, and not in separate files 04:11
04:16 colomon left
dalek kudo-star-daily: 6cc716a | coke++ | log/ (9 files):
today (automated commit)
04:22
avuserow_ m: sub foo {say (CALLER::<$?PACKAGE>).perl}; foo 04:25
camelia rakudo-moar 7f2085: OUTPUT«No such method 'dynamic' for invocant of type 'GLOBAL'␤ in method at_key at src/gen/m-CORE.setting:11561␤ in sub postcircumfix:<{ }> at src/gen/m-CORE.setting:3532␤ in sub foo at /tmp/yBVIalszyZ:1␤ in block <unit> at /tmp/yBVIalszyZ:1␤␤»
BenGoldberg m: say 2 <=> (4 R<=> 7) 04:26
camelia rakudo-moar 7f2085: OUTPUT«More␤»
BenGoldberg m: say 1 <=> (4 R<=> 7)
camelia rakudo-moar 7f2085: OUTPUT«Same␤»
dalek kudo-star-daily: 5cd6188 | coke++ | bin/star.sh:
Revert "Don't test parrot right now, it hangs. :("

This reverts commit f580916f2dc0a1d10bd5ad1537c59502ec550f6f.
  moritz++ for pointing out this is testable again.
04:28
[Coke] moritz: ^^ there you go. 04:29
04:29 dustinm` joined
avuserow_ Taking a step back, I guess I generally want to know the file and line of the calling code, for logging/debugging purposes. Also I'd like to have some sort of hierarchal identifier (module/class? package? compunit?) for categorizing log messages. Ideas appreciated :) 04:31
[Coke] waves from Fredonia, NY
04:37 BenGoldberg left, BenGoldberg joined
Mouq avuserow_: Backtrace.new ? 04:47
04:48 rurban left
avuserow_ That looks like it'll get me the line number and filename, which is a start, but only if I know how many levels to go up 04:52
I'm also using .assuming here for convenience methods which is making things interesting
aha, there are helper methods in Backtrace::Frame that'll help. 04:58
thanks Mouq++ 05:00
dalek osystem: 2a3f355 | Adrian++ | META.list:
Add DateTime::Format::LikeGo to ecosystem
05:01
avuserow_ I was inspired to write that a while ago to see how easy it would be. Not super interesting but was amusing to write.
05:08 muraiki_ left 05:12 grondilu joined
grondilu Hello 05:13
I often check rakudo's speed with 'time perl6 -e 'say [+] rand xx 100_000;'
recently I've noticed that say [+] do for ^100_000 { rand } is much faster. 05:14
I wonder why.
m: say [+] rand xx 10_000; say now - BEGIN now 05:15
camelia rakudo-moar 7f2085: OUTPUT«5012.0104661598␤0.1165213␤»
grondilu m: say [+] rand xx 100_000; say now - BEGIN now
camelia rakudo-moar 7f2085: OUTPUT«50092.9241397308␤0.9423590␤»
grondilu m: say [+] do for ^100_000 { rand }; say now - BEGIN now
camelia rakudo-moar 7f2085: OUTPUT«50137.1103114145␤0.3230719␤»
grondilu m: say [+] rand xx 1_000_000; say now - BEGIN now
camelia rakudo-moar 7f2085: OUTPUT«499970.846753216␤10.0910847␤»
TimToady OSR maybe 05:16
grondilu m: say [+] do for ^1_000_000 { rand }; say now - BEGIN now
camelia rakudo-moar 7f2085: OUTPUT«500322.626687708␤3.1610978␤»
grondilu (so about three times faster)
05:16 Mouq left
grondilu does not know what OSR stans for. Checks S99 05:16
TimToady On-Stack Replacmenet 05:17
grondilu (S99 delivered :)
TimToady figures out the closure isn't needed, probably, and probably optimizes the loop counter better
grondilu does &infix:<xx> has to be lazy when given a finite $n anyway? 05:18
(because otherwise we could just have it use for ^$n or something, couldn't we?) 05:19
05:20 pierrot left, pierrot joined
TimToady currently uses: GatherIter.new({ take x.() while --$n >= 0; }, :infinite($n == Inf)).list 05:20
after GLR we can probably negotiate away the laziness 05:21
grondilu yeah. Also I wondered why this candidate considers $n == Inf since there is already a candidate for Whatever as $n. 05:22
TimToady a reduce would know it isn't lazy, though a triangle goes back to lazy
grondilu oh yeah the triangular version may need laziness, indeed. 05:23
(or not on second thought. Dunno)
TimToady well, that's why laziness needs to be negotiated end to end 05:24
it depends on what calls the trangle
grondilu ok 05:25
TimToady well, but it could've been called rand xx Inf
grondilu indeed. Forgot about Inf being a thing. 05:26
TimToady we could make it say "No! You can't do infinitely many of those. You can only do an arbitrary number of them with *." :)
05:31 mr-foobar left, fil_ joined
fil_ hey how do I create a multi-line string 05:32
without using \n
perl5 has this <<EOT syntax...
grondilu q:to 'EOT' 05:35
avuserow_ fil_: design.perl6.org/S02.html#Heredocs
fil_ thanks!
much better syntax than perl5 05:36
TimToady grondilu: your fast loop runs more than 99% in the JIT 05:42
fil_ i need to interpolate strings inside 05:43
avuserow_ use qq
fil_ when I use qq :to 'EOT' I get an error
postcircumfix:<{ }> not defined for type Str
grondilu that reminds me that I haven't tried compiling with JIT for a while. Last time I checked it didn't work on 32bits IIRC. 05:44
TimToady fil_: can you show the line it's interpolating?
fil_ <UNIQUEID>$uniqueId</UNIQUEID>
05:44 dj_goku left
TimToady yes, <> is a valid subscrpit 05:44
I suggest <UNIQUEID>{$uniqueId}</UNIQUEID>
fil_ it's getting tripped up by my XML?
TimToady $foo<bar> is short for $foo{'bar'} 05:45
fil_ that fixed it
thanks!
avuserow_ fil_: you could also do q:s:to/EOT/; 05:46
oh maybe not, one second 05:47
no, never mind
fil_ would be nice if there was a way to do without the curlies
but I can live with it
05:52 BenGoldberg left
TimToady you can also backwhack teh < 05:55
grondilu an option to qq for the levels of interpolations allowed would make sense. 05:57
qq:s would mean 'interpolate only scalar variables'
though that seems to be in S02 already (line 3751?) 06:00
m: my $foo = "bar"; say q:s{this is $foo<bar>} 06:01
camelia rakudo-moar 7f2085: OUTPUT«postcircumfix:<{ }> not defined for type Str␤ in method Str at src/gen/m-CORE.setting:14590␤ in method Stringy at src/gen/m-CORE.setting:1154␤ in block <unit> at /tmp/DL_23e8TjM:1␤␤»
avuserow_ m: my $foo = {"bar": "other"}; say q:s{this is $foo<bar>};
camelia rakudo-moar 7f2085: OUTPUT«===SORRY!=== Error while compiling /tmp/E1fMNn_J_T␤Invocant colon not allowed here␤at /tmp/E1fMNn_J_T:1␤------> my $foo = {"bar":⏏ "other"}; say q:s{this is $foo<bar>};␤»
avuserow_ m: my $foo = {"bar" => "other"}; say q:s{this is $foo<bar>};
camelia rakudo-moar 7f2085: OUTPUT«this is other␤»
avuserow_ dang $dayjob brain-damage :)
grondilu not quite the line I thought 06:02
S02:4121
synopsebot Link: design.perl6.org/S02.html#line_4121
grondilu still no the correct line :/ 06:03
grondilu pulls his spec dir
meh, nevermind 06:09
06:15 Alina-malina left 06:17 Alina-malina joined 06:19 alini left 06:35 fhelmberger joined 06:36 dj_goku joined, dj_goku left, dj_goku joined 06:39 fhelmberger left 06:49 [Sno] left 06:51 [Sno] joined 06:56 telex left 06:58 telex joined 07:03 Alina-malina left 07:04 Alina-malina joined 07:11 kmnns joined 07:23 [Sno]_ joined, [Sno] left, [Sno]_ is now known as [Sno]
kmnns Hi. I have troubles installing some modules with Panda on OSX. Some succeed (e.g. YAML, Class::Utils, Data::Pretty), some fail (e.g. Pod::Parser, Inline::Perl5, TAP::Harness) due to failing tests. I have a current gcc 4.9.2. Is there anything I can do, or are some random modules just incompatible with the current Rakudo Perl 6? 07:26
avuserow_ kmnns: I just tried TAP::Harness, and it failed, but Inline::Perl5 built and tested okay 07:30
Pod::Parser also failed tests
I think that Inline::Perl5 requires a Perl 5 build with -fPIC, which yours may or may not have 07:31
raydiak kmnns: you can report the issues on the appropriate github project issue trackers...you may also have more luck with bleeding-edge rakudo in some cases (perhaps via rakudobrew if you're not already using it) 07:32
kmnns Thanks! I will try Inline::Perl5 with a homebrewed Perl 5 again. 07:33
I use rakudobrew, but even that fails some subtests.
avuserow_ what are you building Perl 5 with? homebrew? perlbrew? plenv? 07:34
and have you seen this section for Inline::Perl5? github.com/niner/Inline-Perl5#building
kmnns I use perlbrew. 07:35
A sec, I’ll look
avuserow_ ah good, it specifically mentions perlbrew
I know others have had success with it recently 07:36
I'm using plenv and it works, but I lost the plenv command I used to make it work.
kmnns Good to know, I’ll start from there. Thanks a lot. 07:38
Regarding the other modules, I guess stuff just breaks randomly currently. 07:39
avuserow_ I think that people are usually pretty good about addressing issues when they're reported 07:40
07:42 alini joined
kmnns That’ great! I’ll do my part. As soon as I have rules out any dumb mistake. Also, OSX is a special case, e.g. it pretends using gcc while actually linking to clang, afaik. 07:43
I am currently preparing a course for applied programming in NLP at my university. It would be great if I could use Perl6 for the class demos. 07:46
Thanks for your hints!
07:48 xfix joined, wicope joined
skids .tell moritz 32-bit star-RC build: all backends build. moar,parrot pass "make spectest". jvm/openjdk can't run most anything, OOM and stack overflows. 07:54
yoleaux skids: I'll pass your message to moritz.
moritz skids: thanks for testing 08:00
yoleaux 07:54Z <skids> moritz: 32-bit star-RC build: all backends build. moar,parrot pass "make spectest". jvm/openjdk can't run most anything, OOM and stack overflows.
skids also had one segv on parrot during panda-p install Sum but I think I've seen that happen before. 08:01
08:04 prime left
raydiak skids: idk if it will help in your case, but it used to be common to add/modify -Xmx and -Xms params in the perl6-j/nqp-j shell scripts to get errors like that to go away 08:05
08:05 prime joined
timotimo o/ 08:07
raydiak \o timo
[Tux] lizmat, cunfusing git commit message: FILETEST-L -> FILETEST-READLINE => FILETEST-L -> FILETEST-READLINK 08:11
avuserow_ do we have an IO::Handle subclass that writes to an in-memory array or string or something?
okay, so there's IO::String in the ecosystem, which provides enough of what I need, I think 08:13
08:15 kmnns left
timotimo if you have a specific use case for that module, be sure to provide some tests if possible :) 08:16
avuserow_ for IO::String? I was actually hoping to use it in my tests, since I'm working on a module that takes a filehandle for some purposes 08:18
08:18 darutoko joined, darutoko- joined
avuserow_ I'm trying to write a simple but still useful logging module 08:19
08:19 darutoko- left
avuserow_ my theory is that someday, someone who wants ultra-configurable logging will port Log4j to Perl 6, and that'll be the go-to solution for those people. But I want something simple in the interim 08:20
timotimo ah, hehe 08:21
08:24 mr-foobar joined 08:26 _mg_ joined 08:27 _mg_ left 08:30 Alina-malina left 08:33 Alina-malina joined 08:35 Rounin joined
raydiak good night #perl6 08:36
08:42 espadrine joined 08:45 Alina-malina left 08:56 Alina-malina joined 09:03 sivoais left 09:08 adu left 09:09 FROGGS_ is now known as FROGGS 09:12 sivoais joined 09:17 mvuets joined 09:22 vendethiel joined 09:30 wicope left 09:32 wicope joined 09:36 rindolf joined 09:37 diana_olhovik_ joined, molaf_ joined
lizmat [Tux]: yeah, noticed too late 09:38
anyway, it's only in a branch right now
09:40 molaf left
lizmat m: my $a = 42; say qq:!s/a = $a/ # grondilu: you can switch off types of interpolation as well 09:47
camelia rakudo-moar 7f2085: OUTPUT«a = $a␤»
09:48 Alina-malina left 10:04 eternaleye left 10:05 eternaleye joined, trone_ joined 10:23 gfldex joined 10:33 diana_olhovik_ left
dalek kudo/nom: db6254b | lizmat++ | / (4 files):
Add IO::Symlink stub

For easier switching between nom and newio branch
10:35
kudo/newio: 7f20855 | moritz++ | src/core/ (2 files):
move X::Does::TypeObject to operators.pm

it reads much nicer to have the exception defined close to where it is thrown
Also record the type that was attempt to mix into
10:36
kudo/newio: db6254b | lizmat++ | / (4 files):
Add IO::Symlink stub

For easier switching between nom and newio branch
kudo/newio: 727f247 | lizmat++ | / (6 files):
Merge branch 'nom' into newio
10:36 spider-mario joined, eternaleye_ joined, eternaleye left 10:37 eternaleye_ is now known as eternaleye 10:41 eternaleye_ joined 10:42 eternaleye left, eternaleye_ is now known as eternaleye 10:43 [Sno] left 10:58 xfix left
nwc10 yoleaux: .tell jnthn origin/native-ref bad news - spectest fails, good new - not due to ASAN exploding 11:01
FROGGS .tell jnthn <nwc10> origin/native-ref bad news - spectest fails, good new - not due to ASAN exploding 11:07
yoleaux FROGGS: I'll pass your message to jnthn.
FROGGS :o)
11:08 Guest6226 left, kmnns joined
jnthn nwc10: What fails, ooc? 11:10
yoleaux 11:07Z <FROGGS> jnthn: <nwc10> origin/native-ref bad news - spectest fails, good new - not due to ASAN exploding
11:11 espadrine left
jnthn nwc10: For example, I know buf.t and reverse.t do, but those are because my branch is missing fixes from nom. 11:11
(I brunch too early to have them)
nwc10 also t/spec/integration/weird-errors.t t/spec/integration/advent2014-day05.rakudo.moar 11:12
IIRC t/spec/integration/advent2014-day05.rakudo.moaris flappy
yes, just passed
t/spec/integration/weird-errors.t 11:13
not ok 5 - multi sub with where clause + temp stress
that's all the rest
oh wait,t/spec/S17-procasync/basic.rakudo.moar passed a todo and failed a test 11:14
butnot on a repeat
Failed test: 29
TODO passed: 28
but onrepeat
ok 28 - Can finish, return Proc::Status# TODO returns Nil
ok 29 - got correct STDOUT
11:15 Kristien joined
jnthn That's likely not to do with the branch, however...that one is flappy for me in nom also 11:15
nwc10 that's what I assumed 11:16
Kristien hi
FROGGS hi Kristien 11:17
jnthn mattp__: I'm back to having time to work on interesting stuff again now, so yeah, I'll write something there about the natives work I'm currently on with when I'm a bit further into it. :) 11:27
(there = my blog, for those without the curiosity to look hours ago in the backlog :)) 11:28
11:32 tgt joined 11:40 xfix joined 11:41 mvuets left
dalek p/native-ref: b4bc86d | jnthn++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
Map native attr ref-taking ops to MoarVM ops.
11:46
11:49 Ovid_ left 11:59 rurban joined, rurban__ joined
FROGGS [Coke]: can we get an RT tag 'blocking' or some such? that we'd set for tickets that really need to be resolved this year 12:00
we could add the same in git repos 12:01
and perhaps have a weekly report that gathers all of them
12:02 virtualsue joined
rurban__ We are happily using gh milestones, and a red Bug label, with Severity and Priority levels 12:04
FROGGS yeah, if we had moved to gh from RT already we certainly would use milestones too 12:06
I really like these :o)
rurban: btw, you've seen pmichaud message from a few days ago on #parrot?
12:08 colomon joined
FROGGS err, rurban__ 12:11
12:12 rindolf left
rurban__ nope, I'll check 12:15
Parrot is lacking support for typed arrays? What is the most important feature rakudo needs not to drop parrot. I believe it will be incredibly short-sighted to limit the number of architectures perl6 can run on 12:19
But I'm used to the casual self-destructing tendencies over time
FROGGS rurban__: the goal is to have an implementation of what we think Perl 6.0.0 is... and prototyping that on moarvm is much faster than doing it on all three backends 12:25
so, prototype this year, get all in line next year I suppose
and about architectures, I don't think any user will try rakudo on armv5, even when parrot supports it 12:26
moarvm also supports the most used platforms btw
timotimo also, rakudo on moarvm has less severe memory usage than parrot does (though it's hard to compare, as parrot only releases memory very rarely) 12:27
12:32 eternaleye left
FROGGS for example I can't compile rakudo's setting on parrot when my windows 7 VM is running on the same box, it will crash the VM 12:32
as if there is a deep recursion
I can't compile perl6-j for that matter either 12:33
12:33 chenryn joined 12:34 rurban left
FROGGS rurban__: btw, I'll help porting GLR, NFG or NSA stuff over, or whatever will change during perl6-p's sleep 12:35
12:37 rurban joined, chenryn left, yeahnoob joined, rurban left 12:39 rmgk_ joined, rmgk is now known as Guest72532, Guest72532 left, rmgk_ is now known as rmgk
rurban__ yes, the parrot GC is a problem. GMS is correct but too slow, MS is 30% faster but incorrect when compacting strings 12:39
NFG is parrot-only, but can be ported over from moar, I guess
the rest is NQP-only I assume
12:40 chenryn joined
rurban__ And I have no idea what the deal with native arrays is. We had that for decades 12:40
12:41 maettu joined
timotimo what we need is an object to represent references to native things 12:41
or something like that
FROGGS we'll see what we need once it works on moar 12:42
rurban__ parrot supports that sized size or resizable, for P (any), and typed for S,I,N 12:43
you mean attrref in moar?
jnthn The stuff going on in the moar native-ref branch 12:44
rurban__ I see. I don't understand the "taking ops" part 12:45
A NativeRef PMC 12:46
12:46 BenGoldberg joined
jnthn Needs to be a 6model REPR really 12:47
And a real 6model object type 12:48
rurban__ yes
jnthn Since the container spec stuff is how you assign into it.
rurban__ So lot of nqp-p work needed. indeed
I can only help with the parrot parts, NFG. I'm too bad with nqp 12:49
12:50 chenryn left
FROGGS as I said, I'm going to help out where I can 12:50
12:51 sqirrel__ joined
FROGGS though, The Release™ first (which are two releases, rakudo and roast) 12:51
FROGGS hopes that MoarVM is not too sad that he put it under the rakudo umbrella 12:54
jnthn That's the reason MoarVM exists :)
FROGGS yeah, a faithful servant :o) 12:55
12:58 sqirrel__ left 13:01 usuario_ joined
dalek kudo/native-ref: 32ad78f | jnthn++ | src/core/Attribute.pm:
Implement rw accessors for native attributes.
13:01
FROGGS \o/ 13:02
jnthn++
13:02 wicope left
vendethiel \o/ 13:03
yoleaux 6 Feb 2015 19:06Z <Kristien> vendethiel: I decided to write a custom VM
vendethiel Kristien: in which language :P?
Kristien D
vendethiel alright, that makes sense :) 13:04
jnthn lunch & 13:05
Kristien vendethiel: it can already run this program! gist.github.com/rightfold/328570d1fcbc04ee881c 13:06
vendethiel Kristien: btw, agluj really reminds me of FORTRAN :p 13:07
dalek line-Perl5: 1a9085c | (Stefan Seifert)++ | lib/Inline/Perl5.pm6:
Allow re-using an existing Perl 5 interpreter

First step to support using Inline::Perl5 to implement Inline::Perl6
Kristien it looks a lot like Eiffel
vendethiel ah, right. then let's say ada instead of FORTRAN :p 13:08
13:14 Hor|zon left
FROGGS .oO( weirdos ) 13:15
Kristien :c 13:16
vendethiel FROGGS: coming from you, that's definitely a complimen
s/$/t/
Kristien I am now making the lexical analyzer. 13:17
FROGGS *g*
rurban__ I'm starting now with my type inferencer(s) 13:20
vendethiel rurban__: parrot-side? 13:23
bartolin fwiw I also think we should organize our (RT) tickets better. would it be possible to have sub-queues in addition to tags there? 13:24
* has no experience with githubs issue system
bartolin has no experience with githubs issue system 13:25
FROGGS well, what's the difference between a subqueue and a tag? 13:26
bartolin I thought subqueues would it make easier to sort for something like "everything except this and that and those" 13:28
FROGGS github lets you do that with tags nicely 13:29
rurban__ vendethiel: no, perl5 and potion. parrot needs none. perl6 would need one
13:29 Kristien left
vendethiel rurban__: ah, yes, potion 13:29
13:30 kmnns left
rurban__ but the problem is only the numerical tree. promote to bigint or double on jo? 13:30
which is basically the biggest perl5 vs perl6 difference for me :) 13:31
13:33 rindolf joined
bartolin FROGGS: I'd be fine with moving to github. but in both cases we have to put some effort in better organizing the tickets/issues (IMHO) 13:33
lizmat historically, masak has been the most against moving to GH 13:35
FROGGS bartolin: aye
lizmat so maybe he should have a word in this as well :-)
FROGGS lizmat: why? this just makes is harder :o)
bartolin lizmat: yes, of course!
FROGGS pah!
lizmat well, historically, masak has been the submitter and maintainer of the most bug reports 13:36
maybe that has changed...
vendethiel he's certainly one to have his reasons for keeping on RT :-)
vendethiel has never been able to understand how RT worked, and has instead prefered showing the bugs in this channel :P 13:37
bartolin has anyone worked on perl5 tickets on RT and knows how those are organized? 13:38
moritz bartolin: not really, but #p5p von irc.perl.org can surely help you answer that 13:40
itz_ I was always confused why logging into RT seemed to show me less tickets than the anonymous view
less as in 0 13:41
13:41 colomon left
moritz that's... not much 13:41
lizmat ship it! 13:43
:-) 13:44
FROGGS hehe
13:45 chenryn joined
dalek kudo/newio: c12c52b | lizmat++ | src/core/IO/Symlink.pm:
Make IO::Symlink compile
13:48
kudo/newio: 3b2c900 | lizmat++ | src/core/IO (2 files):
Introduce/use new OBJECTIFTY-PATH helper sub
13:48 pmurias joined, chenryn left
lizmat afk for the rest of the day 13:49
nine_ RT is a great ticket system. Unfortunately it's not a good development tool
13:49 virtualsue_ joined
pmurias .tell hoelzro yes, isint/isnum is impossible unless we wrap either integers of doubles or infer the type somehow, it's a hard decision that might cost us some performance 13:51
yoleaux 03:51Z <hoelzro> pmurias: I tried my hand at implementing isint and isnum; isint wasn't too bad, but I think isnum is going to be hard, because JS doesn't distinguish between number types
pmurias: I'll pass your message to hoelzro.
itz_ "We currently have a known issue where Bitcard accounts where the name contains non-ASCII characters (such as ö) will not be able to log in. The workaround is to change your full name in your bitcard account."
13:51 diana_olhovik joined
hoelzro pmurias: I figured =/ I don't know if the distinction would break things at the moment; should I just continue with a single breaking test? 13:52
13:52 virtualsue left, virtualsue_ is now known as virtualsue
yoleaux 13:51Z <pmurias> hoelzro: yes, isint/isnum is impossible unless we wrap either integers of doubles or infer the type somehow, it's a hard decision that might cost us some performance 13:52
pmurias hoelzro: hi
hoelzro morning pmurias
nwc10 jnthn: no new failures, and Cthulhu, er ASAN sleeps
pmurias hoelzro: I think it would be best to just defer implementing those till we figure out how to best solve that problem 13:53
hoelzro ok
I started with those because they *seemed* easy, and then the distinction occurred to me =(
by the way, you wanted to merge in upstream nqp at some point, right, pmurias ? 13:54
pmurias hoelzro: there are ops marked with EASY in the todo
hoelzro ah, maybe I should start there =)
pmurias hoelzro: merging in something we need to do eventually 13:55
13:55 Sysaxed joined
pmurias hoelzro: I don't have strong gitfu, so if you know to do it correctly it would be great 13:56
hoelzro I can try
Sysaxed does anybody have a video of Larry's talk from FOSDEM? live.fosdem.org does not really work.
FROGGS Sysaxed: there are no recordings available atm AFAIK 13:57
hoelzro would a merge or a rebase be preferable?
FROGGS Sysaxed: the official recordings will be here in a few weeks: video.fosdem.org/
psch \o 13:58
Sysaxed FROGGS: hummm :(
FROGGS hi psch
hoelzro I see no merges in the history so far, and I see evidence of a past rebase
FROGGS Sysaxed: yeah
itz_ rebuild.fm has a recent audio interview
FROGGS Sysaxed: I missed some talks and have to wait too :o(
ohh
lizmat Sysaxed: this is where the videos of the devroom should appear: video.fosdem.org/2015/K3401/Saturday/
FROGGS itz_++
lizmat it's 404 now, but sometime in the coming days / weeks it will be filled
pmurias hoelzro: to you want to merge it into the main nqp repo or just update the nqp-js repo?
s/do/to
Sysaxed lizmat: hummm :(( 13:59
hoelzro pmurias: I was going to do the latter
Sysaxed thanks, guys!
lizmat This is where Larry's video should appear: video.fosdem.org/2015/Janson/Sunday/
hoelzro if others here assent, I don't see a problem with the former
lizmat really afk now&
pmurias hoelzro: for the former it would be best to ask jnthn's opinion 14:00
hoelzro agreed
pmurias jnthn: hi 14:01
re rebase or merge, rebasing seemed to work fine last time 14:03
14:06 tgt left 14:09 tgt joined, xinming_ joined 14:11 Hor|zon joined 14:12 Kristien joined 14:13 chenryn joined
timotimo .o( git rebase and lightning, very very frightening me ) 14:13
hoelzro galileo! 14:14
14:15 isBEKaml joined, Hor|zon left
jnthn When I worked on the JVM and Moar backends, I did them in a branch in the NQP repo, then merged once it was bootstrapped and passing make test. 14:16
(merged into master)
That made it easy to regularly merge stuff in from master also
Kristien hi 14:25
dalek ast: 4eb80b2 | usev6++ | S32-list/map.t:
Add test for RT #120620
14:31
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=120620
pmurias jnthn: does rebasing into a branch seem sane? 14:41
jnthn You don't really rebase into... :)
You can rebase the nqp-js dev branch on latest nqp master in a branch, if that's what you're pondering 14:42
pmurias jnthn: that's what I'm pondering
jnthn It's fine, except anybody who has that branch locally will have to fix that local tracking branch.
But if you're going to move to a branch within the NQP repo proper, that's kinda moot :)
pmurias jnthn: that branch doesn't exist yet so nobody has it yet
jnthn Right. :)
14:45 rurban__ left, gfldex left, lue left, [Coke] left, awwaiid left, felher left, zoosha joined, jercos joined, amkrankruleuen joined, amkrankruleuen left, amkrankruleuen joined, awwaiid joined, gfldex joined, felher joined, Possum joined, rurban__ joined 14:46 yeltzooo joined, felher is now known as Guest82691, lue joined, gtodd joined 14:47 lea joined 14:48 rurban joined, rurban left
hoelzro pmurias: if I rebase and push it up, you'll have to git reset --hard hoelzro/master 14:49
but, as discussed, it's moot if I create a branch, or push it into nqp/master
pmurias creating a nqp-js in the main nqp repo seems the best thing
* nqp-js branch 14:50
14:50 [Coke] joined
jnthn I'd be +1 to a js branch in the main nqp repo 14:52
pmurias +1 for a js branch 14:53
14:58 diana_olhovik left
dalek p/native-ref: 773a92b | jnthn++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
Map atposref_* ops for MoarVM.
14:59
pmurias hoelzro: do the tests pass after a rebase?
15:00 Rounin left
hoelzro tries 15:03
ok, here we go
dalek line-Perl5: 5902244 | (Stefan Seifert)++ | / (2 files):
Properly initialize callbacks when used from Inline::Perl6
15:09
15:11 Hor|zon joined 15:13 chenryn left
jnthn m: my $b = Buf.new; $b[0] = 1; $b[1, 2] = 2, 3; $b 15:16
camelia rakudo-moar db6254: OUTPUT«Cannot modify an immutable Int␤ in method STORE at src/gen/m-CORE.setting:8612␤ in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:3350␤ in block <unit> at /tmp/hGEt5bk9JP:1␤␤»
15:16 Hor|zon left
FROGGS m: my $b = Buf.new; $b[0] = 1; 15:17
camelia ( no output )
dalek kudo/native-ref: 3409067 | jnthn++ | src/core/Buf.pm:
Allow Buf at_pos to return an l-value.

Makes various kinds of assignment work out properly.
15:18 pyrimidi_ joined, pyrimidi_ is now known as pyrimidine_
jnthn > my $b = Buf.new; $b[0] = 1; $b[1, 2] = 2, 3; $b 15:18
Buf:0x<01 02 03> 15:19
:)
dalek kudo/nom: 5450e7e | FROGGS++ | src/Perl6/Actions.nqp:
improve error report for anon vars [RT #123584]

  `$; my $b;` now gives: Useless use of variable $ANON_VAR__1 in sink context (line 1)
   instead of: Cannot find method "orig"
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123584
FROGGS reporting* 15:20
15:21 Sysaxed left
FROGGS m: sub foo(\a) { say a.VAR.name }; foo($) # I wonder how to solve that 15:25
camelia rakudo-moar db6254: OUTPUT«$ANON_VAR__1␤»
15:28 chenryn joined
dalek line-Perl5: 35bf0a4 | (Stefan Seifert)++ | lib/Inline/Perl5.pm6:
Allow EVALing Perl 6 code from Perl 5.
15:28
FROGGS hmmm, the patch seems too easy to be good
jnthn Just don't give it a name, perhaps :)
IN the ContainerDescriptor, I mean 15:29
The actual lexical slot needs a distinct name.
dalek line-Perl5: 9feb7b2 | (Stefan Seifert)++ | t/eval_p6_in_p5.t:
Tests for EVALing P6 code from P5
hoelzro curses, I screwed up Configure.pl a bit
15:31 isBEKaml left, Akagi201 joined
timotimo jnthn: yay! 15:32
also allows += and ++, right?
15:32 chenryn left
jnthn timotimo: In theory. In practice the += explodes with an odd MOP-y error 15:32
timotimo k
jnthn Didn't try the ++ 15:33
Though the ++ should probably pick a native candidate also and it won't yet
15:33 colomon joined
jnthn Still plenty of work to do yet :) 15:33
And this is before any of the interesting optimization bits.
dalek line-Perl5: 8268489 | (Stefan Seifert)++ | lib/Inline/Perl5.pm6:
Put P6 package creation and evaluator in a single class

Fewer single-method classes and fewer variables for less overhead
15:36 chenryn joined 15:37 telex left, chenryn left, davido__ left 15:38 telex joined
pyrimidine_ quick question on regex use of ^^ and $$; if I have something like 'token foo {^^ <bar> $$}', do the line beg/end matches imply the same line? 15:38
e.g. should <bar> be bound to the line? 15:39
timotimo i don't think they do, no.
pyrimidine_ or should I explicitly make <bar> not match a newline?
timotimo that seems like a better idea 15:40
pyrimidine_ timotimo: yeah, makes sense 15:41
jnthn The $$ there just means "after <bar> has happened we should be at the end of a line"
So yeah, what timotimo++ said
15:41 dustinm` left
timotimo if you find no other way, you can also write { ^^ [\N+] & <bar> $$ } 15:42
hoelzro pmurias: ok, I finished the rebase, but now all of the NQP tests give me this error:
timotimo may not need the [ ]
hoelzro Unsupported serialization format version: 12
timotimo actually
probably wants to be:
{ ^^ [\N+ & <bar>
] $$ }
pyrimidine_ timotimo++ 15:43
thx!
15:43 pyrimidine_ left
hoelzro hmm, maybe it's something left over from an earlier build in node_modules 15:45
JimmyZ m: my $= 'hell'; say $ANON_VAR__1 15:46
camelia rakudo-moar db6254: OUTPUT«hell␤»
15:48 davercc joined
hoelzro ok, if I bump the serialization version to 12 in deserialization.js, it works 15:48
dalek line-Perl5: f2963bb | (Stefan Seifert)++ | / (2 files):
Add support for calling arbitrary P6 functions from P5
15:49
line-Perl5: 21ff27d | (Stefan Seifert)++ | lib/Inline/Perl5.pm6:
Final piece for Inline::Perl6 implementation

Set up a callback function that can be used to create an Inline::Perl5 object for bootstrapping Inline::Perl6.
Heuristic branch merge: pushed 311 commits to nqp/js by hoelzro 15:50
15:52 xinming_ left
dalek p/js-fixes: 36f747d | hoelzro++ | src/vm/js/nqp-runtime/deserialization.js:
Bump serialization version to 12

This fixes the tests for the JS backend
15:53
p/js-fixes: daa3e39 | hoelzro++ | src/vm/js/bin/run_tests:
Specify the more-if-tests verbosely

Otherwise we include a failing pipe test, which wasn't in nqp-js
hoelzro pmurias: ok, I did the rebase; that's in the js branch
there are some fixes that I naively applied, which are in the js-fixes branch 15:54
if you don't care for how I did them, we can just discard that branch
itz_ ==> Testing Inline 15:55
This type cannot unbox to a native integer in method postcircumfix:<( )> at /home/steve/othersrc/star/rakudo-star-2015.01-RC1/install/languages/perl6/lib/NativeCall.pm6:139
dalek line-Perl6: 6e0d5e8 | (Stefan Seifert)++ | / (6 files):
Use Inline::Perl5 directly instead of copying more and more code

Inline::Perl6 now uses Perl 6's Inline::Perl5 for interop implementation. This gives instant feature parity.
nine_ jnthn: Inline::Perl6 now consists only of 111 lines of XS and can do everything Inline::Perl5 can :) 15:56
15:56 noganex joined
jnthn nine_++ \o/ 15:57
15:59 noganex_ left, dustinm` joined
hoelzro oh, it seems that one of the tests is encountering an NYI op, but not failing... 16:00
63-slurp 16:01
16:11 Hor|zon joined 16:15 Hor|zon left 16:16 espadrine joined 16:29 Kristien left 16:36 Alina-malina joined 16:42 rindolf left 16:46 colomon left 16:49 colomon joined
dalek p/js-fixes: d9e8868 | hoelzro++ | src/core/IO.nqp:
Don't call setinputlinesep on JS
16:49
hoelzro ok, that's fixed
dalek ast: 4dca70c | usev6++ | S03-metaops/reverse.t:
Add test for RT #116649
16:52
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=116649
16:59 skids left
flussence just spent a silly amount of time trying to find a way to detect an exit() call... all I needed in the end was &exit.wrap 17:03
timotimo and here comes somebody using nqp::exit 17:05
jnthn Not if they care about END blocks they won't... :P 17:07
17:07 Kristien joined 17:12 Hor|zon joined
arnsholt timotimo: my sub exit(int $code) is native(Str) {*} # >:D 17:13
Or heck sub _exit if you want to terminate with extreme prejudice
Kristien sub main() is native(int) {*}! 17:14
hm wait
Str
how do you specify return type of native function?
sub main() returns int is native(Str) {*}? 17:15
timotimo "returns"
Kristien cool
vendethiel (or "of")
(or prefix type)
m: Int sub foo { 5 }
camelia rakudo-moar 5450e7: OUTPUT«===SORRY!=== Error while compiling /tmp/zTrVOatTP9␤Two terms in a row␤at /tmp/zTrVOatTP9:1␤------> Int ⏏sub foo { 5 }␤ expecting any of:␤ infix stopper␤ infix or meta-infix␤ state…»
vendethiel m: sub Int foo { 5 }
camelia rakudo-moar 5450e7: OUTPUT«===SORRY!=== Error while compiling /tmp/gTz8CW1h1W␤Missing block␤at /tmp/gTz8CW1h1W:1␤------> sub Int ⏏foo { 5 }␤»
arnsholt vendethiel: Or -->
vendethiel eh?
can't remember the syntax then :) 17:16
arnsholt m: my Int sub foo { 5 }
camelia ( no output )
flussence m: sub foo(--> Int) { 5 }
camelia ( no output )
17:16 Hor|zon left
vendethiel ah, declarator, ofc 17:16
arnsholt vendethiel: Need the scope declarator to trigger the type parsing
timotimo we may be able to catch that mistake in the parser 17:22
dalek p/native-ref: ef8fa52 | jnthn++ | src/vm/moar/QAST/QASTCompilerMAST.nqp:
Teach as_mast_constant about QAST::Want.

Makes some of the nqp::ops usable from Rakudo that previously weren't.
17:26
p/native-ref: add2c9f | jnthn++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
Map late-bound form of native lexical reference.
Kristien Io looks like a delicious cheeseball. 17:32
jnthn dinner & 17:38
17:40 Mouq joined
moritz home.p6c.org/~moritz/rakudo-star-2015.01.tar.gz this is going to be last month's R* release, unless somebody finds a fatal flaw in it Really Soon[tm] 17:42
release uploaded, tag pushed 17:45
[ptc] moritz++
Kristien I found a fatal flaw in it! 17:48
Just kidding!
moritz Kristien: if this were my first release, I might have paniced for a moment :-)
nwc10 jnthn: ASAN still sleeps 17:50
Kristien As Soon As Nap 17:51
moritz rakudo.org/2015/02/07/announce-raku...e-2015-01/
geekosaur .oO ph'nglui mglw'nafh ASAN Camelia wgah'nagl fhtagn? 17:53
hrm, dropped some keys. my keyboard may be protecting me :p
no, not dropped, swapped + current irc client is buggy :/ 17:54
17:54 adu joined
colomon moritz++ 17:55
nwc10 moritz: not sure what the correct way to send feedback is, but rakudo.org/how-to-help/ is quite prominent in mentioning parrot, and could probably do with some rephrasing
moritz nwc10: agreed
nwc10: will look at that later
nwc10 cool, thanks. and thanks for star 17:56
TimToady if the bits are golden, does that make it a gold star? 17:57
18:04 orafu joined 18:07 adu_ joined 18:09 adu left, adu_ is now known as adu, yeahnoob left
ugexe any way to slurp a file into a uint16/32 Blob or Buf? `my Blob[uint16] $x = "META6.json".IO.slurp(:bin);` is a type check fail 'expected 'Blob[uint16]' but got 'Buf[uint8]' 18:10
flussence you probably mean to write .slurp(:bin).decode('utf-8').encode('utf-16') then... 18:11
grondilu doubts an arbitrary binary string can be understood as a utf-8 string. 18:12
18:13 mvuets joined
Mouq m: say $*IN.slurp(:bin).WHAT 18:13
camelia rakudo-moar 5450e7: OUTPUT«(Buf[uint8])␤Saw 1 call to deprecated code during execution.␤================================================================================␤Method slurp (from IO::Handle) called at:␤ /tmp/r_4elxVcqh, line 1␤Deprecated since v2014.10, will be r…»
Mouq m: say $*IN.slurp-rest(:bin).decode('utf-16') 18:14
camelia rakudo-moar 5450e7: OUTPUT«썃憩⁤汳ꇃ条猠썬榩桢整洠潡杲⁡桃湯慴⁥桄뫃慮渠慇汬䄊畧⁳桤ꇃ挠써憩⁤汳ꇃ条愠楅敲条污愠摲椠慮猠畴⁡獯挠潩湮挠潡⁲獩挠汯㭬上慵物愠朠汨慵獩洠獩⁥桴牡⁴敬䰠捯⁨桄뫃…»
grondilu m: say Buf.new((^256).roll(1000)).decode('utf-8') # I would expect some error here.
camelia rakudo-moar 5450e7: OUTPUT«Malformed UTF-8 at line 1 col 2␤ in method decode at src/gen/m-CORE.setting:6314␤ in block <unit> at /tmp/xvMrNxtDJ4:1␤␤»
grondilu ^see?
Mouq Err, s/decode/encode
ugexe yea, using .decode('utf-8') doesnt work for some encodings 18:15
TimToady yes, it's easy to violate the self-clocking aspect of utf8
grondilu aren't there conversion methods from one type of Buf to an other? 18:16
m: say Buf.^methods 18:17
camelia rakudo-moar 5450e7: OUTPUT«␤»
18:17 xinming_ joined
grondilu o_O 18:17
ugexe if it gets slurped in as a Buf[uint8] then information could already be lost if i needed a uint16
TimToady m: say Buf.^methods(:all)
camelia rakudo-moar 5450e7: OUTPUT«␤»
Kristien lol, some guy removed use warnings; use strict; from all his Perl 5 source files and now he's complaining he gets no errors nor warnings
ugexe so converting from buf[uint8] wouldnt help
grondilu ugexe: I'm not sure why you'd lose information. Everything is made of bytes, isn't it? 18:18
geekosaur that's not entirely a nonsense complaint if you have heard that newer perl 5 "turns them on automatically" but not the part where backward compat means you need a "use perl 5.016" or etc. to enable
er, "use 5.016" 18:19
geekosaur ought to go back to bed and start over, apparently :/
moritz nwc10: rakudo.org/how-to-help/ updated 18:20
ugexe m: say Blob[uint8].new(0xFF00).decode("latin-1"); say Blob[uint16].new(0xFF00).decode("latin-1") 18:21
camelia rakudo-moar 5450e7: OUTPUT«␀␤␀ÿ␤»
ugexe grondilu: ^
dalek ar: c4e3ea6 | moritz++ | tools/star/release-guide.pod:
Release guide: update list of previous releases
18:23
ugexe m: say Blob[uint8].new(0xFF00).perl; say Blob[uint16].new(0xFF00).perl
camelia rakudo-moar 5450e7: OUTPUT«Blob[uint8].new(0)␤Blob[uint16].new(65280)␤»
dalek ar: b4d0182 | moritz++ | / (4 files):
Remove Math::Model and Math::RungeKutta

  ... as announced
18:25
tadzik time to update Task::Star 18:26
moritz ++tadzik
18:27 MadcapJake joined
dalek ar: 320f22d | moritz++ | tools/star/Makefile.old:
remove Makefile.old

it seems not to be in use, and I see no benefit in keeping dead code around. git has all the old revisions anyway.
18:27
18:28 FROGGS[mobile]2 left
dalek c: 2774c81 | Mouq++ | / (2 files):
Simplify &write-search-file
18:28
moritz Mouq: are you investigating perl6/doc#49 ? 18:29
18:30 FROGGS[mobile] joined
tadzik hmm, perhaps we should switch from LWP::Simple to the new LWP 18:31
18:31 xinming_ left 18:32 xinming_ joined
nwc10 moritz++ # looks good 18:33
18:35 pmurias left, _mg_ joined 18:36 colomon left 18:37 fhelmberger joined, adu left
jnthn moritz++ # star 18:38
nwc10: Phew :)
18:38 chenryn joined 18:39 rurban joined
grondilu m: say Blob[$_].new(0xFF00) for uint8, uint16; 18:41
camelia rakudo-moar 5450e7: OUTPUT«Blob[uint8]:0x<00>␤Blob[uint16]:0x<ff00>␤»
18:41 fhelmberger left
grondilu ugexe: you just need to make sure not to give values > 255 to Blob[uint256].new 18:42
18:42 chenryn left
grondilu m: say Blob[uint8].new($_ div 256, $_ mod 256) given 0xFF00; 18:42
camelia rakudo-moar 5450e7: OUTPUT«Blob[uint8]:0x<ff 00>␤»
TimToady uint256 is pretty darn large :) 18:43
grondilu oops 18:44
anyway so me, if I had to convert a Buf[uint8] to a Buf[uint16], I'd first get the list of bytes, group them by two and then create the corresponding 16-bits words. 18:46
jnthn I'm sure we can provide a better way to do that :) 18:48
18:48 rindolf joined
MadcapJake is there a way to specify install dir with the rakudo* msi installers? 18:48
tadzik I'm afraid not :( 18:49
grondilu ideally there should be a constructor candidate that takes a buffer of an other type as argument.
18:49 _mg_ left
grondilu something like: my Buf[uint16] $a .= new: Buf[uint8].new: ^10 18:50
jnthn grondilu: That's not a bad idea.
18:51 xinming_ left
grondilu btw grouping a list into sublists of the same size is not very easy to do. I wish there was an idiom or an operator. 19:00
19:00 trone_ left
jnthn m: (1..9).map(-> $a, $b, $c { [$a, $b, $c] }).perl.say # if you know how many 19:01
19:01 Hor|zon joined
camelia rakudo-moar 5450e7: OUTPUT«([1, 2, 3], [4, 5, 6], [7, 8, 9]).list␤» 19:01
grondilu btw will -> @a[$n] { ... } ever work? 19:02
like "a subroutine of $n arguments" 19:03
jnthn Not sure 19:04
One other cheaty way is
m: say (1..9).classify({ ceiling($++ / 3) }).values.perl
camelia rakudo-moar 5450e7: OUTPUT«([1, 2, 3], [4, 5, 6], [7, 8, 9]).list␤»
grondilu neat
m: say (1..9).classify({ $++ div 3 }).values.perl 19:05
camelia rakudo-moar 5450e7: OUTPUT«([1, 2], [3, 4, 5], [6, 7, 8], [9]).list␤»
grondilu ahh the ceiling is indeed needed
jnthn Yes, I wrote floor in my first attempt
19:05 Hor|zon left
jnthn But with ceiling it worked floorlessly... 19:05
grondilu nice one 19:06
:)
m: say (1..9).classify({ ++$ div 3 }).values.perl 19:07
camelia rakudo-moar 5450e7: OUTPUT«([1], [2, 3, 4], [5, 6, 7], [8, 9]).list␤»
19:09 BenGoldberg left, amkrankruleuen left, BenGoldberg joined
grondilu wait 19:10
19:11 BenGoldberg left
grondilu meh, nevermind 19:11
19:11 BenGoldberg joined
grondilu m: say (1..9).classify({ $_++ div 3 }).perl 19:12
camelia rakudo-moar 5450e7: OUTPUT«Hash[Any,Any].new(3 => [10], 2 => [7, 8, 9], 0 => [3, 3], 1 => [4, 5, 6])␤»
19:13 rindolf left 19:14 colomon joined
grondilu m: say (1..9).classify({ $_++ div 3 }).values.perl 19:14
camelia rakudo-moar 5450e7: OUTPUT«([3, 3], [4, 5, 6], [7, 8, 9], [10]).list␤»
19:14 beastd joined
grondilu wth 19:15
oh
I wrote $_++ instead of $++
that's a very easy mistake to make
timotimo grondilu: there is anoperator that does it fro you 19:16
m: say (1..9).rotor(3,0).perl
camelia rakudo-moar 5450e7: OUTPUT«($(1, 2, 3), $(4, 5, 6), $(7, 8, 9)).list␤»
timotimo m: say (1..9).rotor(3,0)>>.Array.perl
camelia rakudo-moar 5450e7: OUTPUT«(Array.new(1, 2, 3), Array.new(4, 5, 6), Array.new(7, 8, 9))␤»
timotimo m: say (1..9).rotor(3,0)>>.List.perl
camelia rakudo-moar 5450e7: OUTPUT«No such method 'List' for invocant of type 'Parcel'␤ in method dispatch:<hyper> at src/gen/m-CORE.setting:1373␤ in block <unit> at /tmp/k4ES90MZlI:1␤␤»
timotimo m: say (1..9).rotor(3,0)>>.list.perl
camelia rakudo-moar 5450e7: OUTPUT«((1, 2, 3).list, (4, 5, 6).list, (7, 8, 9).list)␤»
colomon had no idea about rotor. nice.
timotimo rotor is also in the supply methods 19:17
19:17 adu joined
grondilu I don't quite understand why $++ div 3 does not work. 19:17
m: say $++ div 3 for ^9; 19:18
camelia rakudo-moar 5450e7: OUTPUT«0␤0␤0␤1␤1␤1␤2␤2␤2␤»
grondilu ^see? it should make the correct groups
colomon m: say (1..9).classify({ $++ div 3 }).values.perl
camelia rakudo-moar 5450e7: OUTPUT«([1, 2], [3, 4, 5], [6, 7, 8], [9]).list␤»
grondilu maybe classify is not sequential or something? 19:19
geekosaur does not understand what's unexpected here?
colomon m: say (1..9).classify({ $_ div 3 }).values.perl
camelia rakudo-moar 5450e7: OUTPUT«([1, 2], [3, 4, 5], [6, 7, 8], [9]).list␤»
colomon that’s right
grondilu you don't want to classify per value of the list 19:20
colomon m: say (^9).classify({ $++ div 3 }).values.perl
camelia rakudo-moar 5450e7: OUTPUT«([0, 1], [2, 3, 4], [5, 6, 7], [8]).list␤»
grondilu m: say ('a'..'z')[^9].classify({ $_++ div 3 }).values.perl
camelia rakudo-moar 5450e7: OUTPUT«Cannot call 'infix:<div>'; none of these signatures match:␤:(Int:D \a, Int:D \b)␤:(int $a, int $b --> int)␤ in block <unit> at /tmp/_hk6KkcIrO:1␤␤»
grondilu m: say ('a'..'z')[^9].classify({ $++ div 3 }).values.perl
camelia rakudo-moar 5450e7: OUTPUT«(["a", "b"], ["c", "d", "e"], ["f", "g", "h"], ["i"]).list␤»
colomon m: say (^9).classify({ .say; $++ div 3 }).values.perl 19:21
camelia rakudo-moar 5450e7: OUTPUT«0␤0␤1␤2␤3␤4␤5␤6␤7␤8␤([0, 1], [2, 3, 4], [5, 6, 7], [8]).list␤»
19:21 BenGoldberg left
colomon that’s it, right there. 19:21
lesson: do not include side-effects with classify
grondilu indeed
m: say ('a'..'z')[^9] Z=> { $++ div 3 } xx * 19:22
camelia rakudo-moar 5450e7: OUTPUT«a => -> ($_? is parcel) { #`(Block|55490496) ... } b => -> ($_? is parcel) { #`(Block|55490560) ... } c => -> ($_? is parcel) { #`(Block|55490624) ... } d => -> ($_? is parcel) { #`(Block|55490688) ... } e => -> ($_? is parcel) { #`(Block|55490752) ... } f…»
grondilu m: say ('a'..'z')[^9] Z=> { $++ div 3 }() xx *
camelia rakudo-moar 5450e7: OUTPUT«a => 0 b => 0 c => 0 d => 0 e => 0 f => 0 g => 0 h => 0 i => 0␤»
grondilu hum 19:23
19:23 BenGoldberg joined, adu left
grondilu m: say { $++ div 3 }() xx * Z=> ('a'..'i') 19:23
camelia rakudo-moar 5450e7: OUTPUT«0 => a 0 => b 0 => c 0 => d 0 => e 0 => f 0 => g 0 => h 0 => i␤»
colomon github.com/rakudo/rakudo/blob/nom/...sh.pm#L152 is the line that causes the extra call in classify
grondilu m: say ($++ div 3) xx * Z=> ('a'..'i') 19:24
camelia rakudo-moar 5450e7: OUTPUT«0 => a 0 => b 0 => c 1 => d 1 => e 1 => f 2 => g 2 => h 2 => i␤»
psch m: say $++ xx 4
camelia rakudo-moar 5450e7: OUTPUT«0 1 2 3␤»
psch m: say ($++ div 3) xx 4
camelia rakudo-moar 5450e7: OUTPUT«0 0 0 1␤»
grondilu m: say hash(($++ div 3) xx * Z=> ('a'..'i')).perl
camelia rakudo-moar 5450e7: OUTPUT«("1" => "f", "2" => "i", "0" => "c").hash␤»
grondilu m: say { ($++ div 3) xx * Z=> ('a'..'i') } 19:25
colomon what’s the goal here?
camelia rakudo-moar 5450e7: OUTPUT«-> ($_? is parcel) { #`(Block|73926560) ... }␤»
grondilu colomon: still trying to group a list of 9 items by sublists of 3
colomon didn’t we just establish that’s what rotor does? 19:26
grondilu I may have missed that :)
indeed. rotor does the job. I did not know about it at all. 19:27
19:28 BenGoldberg left 19:29 BenGoldberg joined 19:31 BenGoldberg left
flussence I just noticed something in S26 - "A declarator can have multiple leading and/or trailing Pod comments, in which case they are concatenated with an intermediate newline when their object's .WHY return value is stringified" - but neither rakudo nor the test suite do the newline thing... 19:31
19:32 BenGoldberg joined
flussence (so, who's right?) 19:32
19:33 zakharyas joined 19:34 adu joined
psch i'd say having the newline makes more sense 19:34
which means roast and rakudo are wrong
19:34 colomon left
psch reason being, it has a newline in the source, which probably was put there for a reason 19:34
19:35 colomon joined, colomon left, BenGoldberg left 19:36 BenGoldberg joined 19:41 BenGoldberg left, pyrimidi_ joined, pyrimidi_ left 19:43 BenGoldberg joined
moritz otoh, newlines inside paragraphs are ephemeral 19:45
dalek c: 1bd122c | Mouq++ | htmlify.p6:
Fix #49

Only add one search term for each category page, and choose the most general descriptor if necessary
19:49
19:49 mvuets left 19:55 BenGoldberg left 19:56 BenGoldberg joined 20:06 diana_olhovik joined, orafu left 20:12 zakharyas left, FROGGS[mobile]2 joined 20:13 FROGGS[mobile]2 left
moritz Mouq++ 20:14
20:15 FROGGS[mobile] left
moritz Mouq: re #48, I've noticed the same for prefix ++ and postfix ++, and it seems the headings there have different formats: =head2 prefix C«++» 20:15
vs
hrm, no, I mis-grepped
dalek c: deb7189 | moritz++ | htmlify.p6:
htmlify: recognize enums as types
20:18
moritz what do we call the inverse of slurping? 20:21
go|dfish spurting?
FROGGS aye
moritz go|dfish: right, thanks
20:22 V_S_C joined 20:24 V_S_C left 20:26 darutoko left
raydiak do we have a better way of accomplishing this for large blobs? github.com/raydiak/Image-PNG-Porta...e.pm6#L102 if not, perhaps we should have something similar in core (and a few other related things I can think of)...everything else I tried was slow on the order of minutes, or gave a "too many elements in flattening list context" error or something like that 20:31
20:31 salva left 20:33 salva joined
FROGGS raydiak: dunno if that falls out of jnthn++'s current work 20:34
raydiak FROGGS: what is he working on? 20:35
FROGGS native arrays, that's what blobs and bufs are
timotimo can't we just ~ two bufs? 20:36
oh, Blobs
moritz ~ should be made to work on blobs
raydiak I think I can make them bufs, if that helps
moritz if it doesn't already
and it should be made non-slow :-)
raydiak I didn't know it worked on listy things at all, will go try it out :) 20:37
timotimo m: my $foo = Blob[uint8].new(1, 2, 3, 4, 5); my $bar = Blob[uint8].new(10, 11, 12, 13, 14, 15); say $foo ~ $bar
camelia rakudo-moar 5450e7: OUTPUT«Blob[uint8]:0x<01 02 03 04 05 0a 0b 0c 0d 0e 0f>␤»
timotimo well, to be fair, a Blob is kind of a stringy thing?
jnthn Once I get native array stuff in place, I'll look more closely at blobs, bufs, etc.
raydiak timotimo: yeah that too, good point
jnthn I know there's a pile out outstanding requests regarding those.
timotimo <3
indeed 20:38
raydiak was wondering where blob and buf fit in when we have complete cmopact/native arrays
20:39 davercc left
flussence well there's one thing, it's specced that you can regex/grammar on a blob... 20:39
raydiak oh right, the stringy part again...guess I forget that part a lot
jnthn Plus it makes sense to talk about .decode 20:40
moritz retupmoca: any reason you are opening pull requests on github.com/perl6/gtk-simple/ instead of pushing directly? 20:43
retupmoca: ah no, those are issues; sorry, I got confused
timotimo i wish there were pull requests :P 20:45
moritz m: my $c = Channel.new; $c.close; await $c; say "done";
camelia rakudo-moar 5450e7: OUTPUT«Cannot receive a message on a closed channel␤ in method receive at src/gen/m-CORE.setting:21809␤ in sub await at src/gen/m-CORE.setting:23197␤ in block <unit> at /tmp/ZxOtUucmBA:1␤␤»
moritz that's LTA, no? 20:47
raydiak I suppose that makes sense...just have a (probably needless) fear of ending up with half a dozen different kinds of list with feindishly subtle differences
moritz at least I'd intuitively except "await $some_channel" to wait for the channel to close
Mouq m: my $c = Channel.new; start { sleep 1; $c.close }; await $c; say "done"; 20:48
camelia rakudo-moar 5450e7: OUTPUT«Cannot receive a message on a closed channel␤ in method receive at src/gen/m-CORE.setting:21809␤ in sub await at src/gen/m-CORE.setting:23197␤ in block <unit> at /tmp/9wVmvLyJAD:1␤␤»
moritz m: my $c = Channel.new; start { sleep 1; $c.close }; await $c.closed; say "done" 20:49
20:50 Hor|zon joined
camelia rakudo-moar 5450e7: OUTPUT«(timeout)» 20:50
moritz oh my
jnthn That latter would shoulda worked...
moritz .close pushes a CHANNEL_CLOSE on $!queue 20:51
... and nothing consumes that
moritz wonders if self!peek() would help 20:52
moritz wonders how to test that without it hanging in the fail case
yes, it does help 20:53
jnthn: what *should* await $channel do?
moritz just wanted to document 'await' 20:54
20:54 Hor|zon left
moritz m: my $p = Promise.new; $p.keep(42); $p.then({ say "after the fact" }); 20:55
camelia rakudo-moar 5450e7: OUTPUT«after the fact␤»
moritz \o/
Peter_R Is there an "official" way to automatically cache a subroutine in perl 6? 20:57
raydiak wrt my ignorance, ~ seems adequately fast on large stuff; thanks timotimo++/#perl6 :)
jnthn moritz: Should await a value 20:58
moritz Peter_R: 'is cached'
Peter_R: doc.perl6.org/routine/is%20cached
Peter_R In the sub definition? I was getting some weird error
but looks like I was doing it wrong 20:59
grondilu m: sub f($) is cached { rand }; say f($++) xx 4
camelia rakudo-moar 5450e7: OUTPUT«0.251849955314625 0.794119814900987 0.801919925577047 0.942564767976645␤»
timotimo raydiak: yay
grondilu m: sub f($) is cached { rand }; say f(pi) xx 4
camelia rakudo-moar 5450e7: OUTPUT«0.347837372671691 0.347837372671691 0.347837372671691 0.347837372671691␤»
Peter_R I get this pastebin.com/7Jturnyj 21:01
moritz Peter_R: show your code please 21:02
Peter_R But grondilu's example works
moritz, 2 seconds
pastebin.com/bgT9G51b 21:03
I'm probably doing something wrong
moritz hm, maybe the "is cached" doesn't work on multis? 21:04
grondilu should be put on the proto
raydiak yeah that's the same error I got trying to put 'is native' on multis iirc
grondilu m: proto f($) is cached {*}; multi f(Num $) { rand }; say f(pi) xx 4
camelia rakudo-moar 5450e7: OUTPUT«0.377066745509211 0.377066745509211 0.377066745509211 0.377066745509211␤»
moritz m: proto sub fib(Int) is cached {*}; multi fib(0) {1}; multi fib(1) {1}; multi fib(Int $x) { fib($x-1) + fib($x-2) }; say fib 10
camelia rakudo-moar 5450e7: OUTPUT«89␤»
bartolin there is RT #122899 21:05
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122899
moritz Peter_R: ^^ seems to work with 'is cached' on the proto
Peter_R So I need to declare a proto?
moritz aye
m: proto sub fib(Int) is cached {*}; multi fib(0) {1}; multi fib(1) {1}; multi fib(Int $x) { fib($x-1) + fib($x-2) }; say fib 100
Peter_R How would that work with multis that have different signatures?
camelia rakudo-moar 5450e7: OUTPUT«573147844013817084101␤»
grondilu IIRC it's good practice to put all traits on protos and not on multis
moritz grondilu: yes, but IMHO it should still work
Peter_R I'm not that familiar with P6, so I'm not entirely sure what I'm talking about at all 21:06
moritz Peter_R: you can give the proto a pretty general signature, like (|)
Peter_R What is the use of the proto?
grondilu factorization of traits, for one :)
moritz wrapping all multis
and adding a common signature that constrains the multis 21:07
grondilu but you can also factorize some code, since a proto could contain some common code: proto f { dothis; {*}; dothat }
FROGGS Peter_R: you could add your own multi dispatch logic to a proto if you want to
dalek kudo/nom: bf3e3ab | moritz++ | src/core/List.pm:
Avoid the use of a deprecated method inside the setting
21:08
Peter_R I always thought multis could be useful for things like APIs where one endpoint could have wildly different signatures
But it sounds like they cannot be used in this way easily? 21:09
moritz they can
ugexe sure you can
21:09 maettu1 joined
moritz and it's a bug that traits only work on protos, IMHO 21:09
21:09 maettu left, maettu1 left
Peter_R Can it not assume the most general proto possible if one is not specified or something? 21:09
woops, I guess it does 21:10
21:10 maettu1 joined
Peter_R because aside from caching, my code is fine without one 21:10
grondilu it does indeed
then as mentioned above, use the generic signature: (|) 21:11
Peter_R So this should be working? pastebin.com/3ffr77BL
grondilu m: proto f(|) {*}; multi f($, $) { "two args" }; multi f($) { "one arg" }; say f(pi)
camelia rakudo-moar 5450e7: OUTPUT«one arg␤»
Peter_R I'm getting a different error now
Here's the error 21:12
pastebin.com/qdDZ79v6
21:12 maettu1 left
Peter_R I did build this with perlbrew 21:12
grondilu remove the trait from the multis
Peter_R maybe I should get star 2015.1 instead
ah
21:12 maettu1 joined
grondilu keep it *only* on the proto 21:12
moritz Peter_R: maybe you should show your code again :-) 21:13
Peter_R moritz, I thought I pasted it
sorry, grondilu++ was right
grondilu also, this is just an example, right? because there is much simpler ways to implement fibonacci 21:14
Peter_R yes :D
moritz Peter_R: sorry, missed that
Peter_R It is an intuitive way though
21:14 maettu1 is now known as maettu
Peter_R I tend to care about readability over length (within reason of course) 21:14
grondilu tends to find long things less readable 21:15
Peter_R grondilu, I just like the neat separation due to the declarative structure of it
grondilu well, it's the functional way to do it so it has some charm 21:16
Peter_R In C everything is horrible, so I use a 2 element array and modulo on n to decide which element to accumulate into 21:17
Or something like that, its been 6 years since I've written that
dalek kudo/nom: 3f9508c | moritz++ | src/core/Channel.pm:
Fix Channel.close

it did not immediately fulfill the .closed promise if $!queue was empty
Peter_R Maybe 7 years
grondilu, what is your recommended Perl 6 Fibonacci demonstration?
grondilu m: say 1, 1, * + * ... * 21:18
camelia rakudo-moar 5450e7: OUTPUT«1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 1346269 2178309 3524578 5702887 9227465 14930352 24157817 39088169 63245986 102334155 165580141 267914296 433494437 70140873…»
21:18 sivoais left
dalek ast: 0f7192a | moritz++ | S17-channel/basic.t:
Test Channel.closed without .receive
21:18
Peter_R Oh yes, I saw that literally two days ago the last time
It really cool :D
21:18 sivoais joined
Peter_R *IS 21:18
moritz writing docs can be so distracting
I often think "why isn't this consistent with $other_feature" 21:19
or "huh, this corner case is weird. I'd rather improve it than documenting the corner case"
and then I end up hacking on the compiler again, or grepping through the design documents
Mouq wonders where "documentation" fits into the whirlpool model ;) 21:20
raydiak geez quit wasting time fixing things moritz++ :)
Peter_R Here was the Perl 5 I was comparing that example two, iirc all I had to do was change fun to sub to get it to run 21:21
pastebin.com/bu1UGXZH
and get rid of the crap up top :p
and raduko moar is quite a bit faster 21:22
21:22 xfix left
moritz m: my $s = Supply.new; my $p = Promise.in(0.2).then({ $p.emit(42) }); say await $s 21:22
camelia rakudo-moar 5450e7: OUTPUT«(signal XCPU)» 21:23
moritz m: my $s = Supply.new; my $p = Promise.in(0.2).then({ $p.emit(42); $p.close }); say await $s
grondilu Peter_R: your P5 version is not cached though.
camelia rakudo-moar 5450e7: OUTPUT«(signal XCPU)»
Peter_R I took caching out for comparison
moritz m: my $s = Supply.new; my $p = Promise.in(0.2).then({ $s.emit(42); $s.close }); say await $s
Peter_R I used Attribute::Memoize to do caching
camelia rakudo-moar 5450e7: OUTPUT«(signal XCPU)»
grondilu was actually looking at the wrong pastebin
Peter_R Ah 21:24
Sorry for pasting so may :P
*many
grondilu wth
I'm confused by pastebin.com/bu1UGXZH
moritz jnthn: what should await $supply do?
Peter_R grondilu, what about it? 21:25
grondilu it's some kind of mix between P5 and P6??
Peter_R Kavorka :D
raydiak grondilu: metacpan.org/pod/Kavorka
Peter_R "Function signatures with the allure of the animal"
grondilu ok
Peter_R It's not as awesome as Perl 6, but its a start :D 21:26
bartolin I stumbled about RT #116419 and am not sure what to do with that ticket.
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=116419
bartolin It complains about $=data not working with Pod data blocks in combination with feature "Lexing and Parsing - Pod" being shown as implemented at perl6.org/compilers/features.
grondilu some people hack P5 so much it's just too much IMHO
bartolin I'd like to change the subject of the bug report to '[TODO] Implement $=data for Pod data blocks'. But should we really mark said feature as only 'partially implemented' at perl6.org/compilers/featues?
Peter_R grondilu, from the right perspective the entire current language is pretty much a hack 21:27
but 5.20 has signatures at least
But not multis or type contraints
moritz well, 5.20 has argument unpacking
but iirc it doesn't do any checking, so it's not quite the same as proper signatures 21:28
Peter_R moritz, docs say it will through exceptions on incorrect signatures?
moritz Peter_R: then I'm probably wrong
Peter_R of course it only does positionals
So it is just an arg count really
21:28 pmurias joined
grondilu meh, I think Perl 5 is fine without signatures. I just used to write things like die "wrong first argument type" unless ref(my $a = shift) eq 'Array' 21:29
Peter_R It will never be as nice as perl 6, but they could add an optional type check
grondilu (or stuff like that, it's verbose but it does the job without additional syntax)
Peter_R Why not automate? 21:30
That's like saying Perl 5 just isn't allowed to change or improve?
grondilu I just don't like adding syntax conventions to an already complex language.
moritz perl -wE 'sub f ($x) { say $x }; f 42' # Illegal character in prototype for main::f : $x at -e line 1.
that's a perl 5.20
Peter_R Perl 5 loves backwards compatibility, a little too much for my taste
moritz what am I doing wrong here?
ugexe why not just use kavorka::signature? :)
moritz never actually tried sigantures 21:31
ugexe or rather kavorka
grondilu moritz: sub f($) { say $x }
moritz oh, -E doesn't enable that feature
grondilu: that's a prototype, not a signature
FROGGS moritz: it is still experimental
flussence moritz: you need "use feature 'experimental::signatures';" and something to disable the warning you get for using them, iirc
Mouq bartolin: I agree the topic should be chaged, and the features bit *is* misleading. However, I'd put in a new features line called "Data blocks" or similar :) 21:32
Peter_R flussence, something like that, though I won't be touching them till 24.x
moritz perl -Mfeature=signatures -wE 'no warnings "experimental"; sub f ($x) { say $x }; f 42, 23'
Too many arguments for subroutine at -e line 1.
for which subroutine? would that really be too much to ask? 21:33
moritz should stop ranting
bartolin Mouq: that's a nice idea ;-) I'll do that; thanks for the feedback
Peter_R moritz, I hope they improve it
We'll see
Mouq bartolin++ # various bug things
moritz Peter_R: I'm sure they will
flussence tried using $=data for something just now only to find out that was unimplemented *too* :( 21:34
dalek c: 2c06edd | moritz++ | lib/Type/ (2 files):
Document await(Promise) and await(Channel)
21:35
21:36 ribasushi joined, adu left
dalek kudo/nom: a4ceed6 | moritz++ | src/core/asyncops.pm:
&await works best with defined promises and channels
21:38
Peter_R Is there anyway to write the last multi here so that it doesn't use a named variable or uses the * or whatever? pastebin.com/6Qs4q6nG 21:40
moritz Peter_R: not that I'm aware of 21:41
grondilu make it more generic, it will be the default
moritz Peter_R: I mean, you can name it $_ instead of $x
Peter_R: but you'll stil have to use the name
Peter_R moritz, thanks 21:42
grondilu, could you show me what you mean please?
grondilu multi fib { fib($^n - 1) + fib($n - 2) } 21:43
21:43 rurban__ left
grondilu I meant no where clause 21:43
psch m: multi fib ($ where * == 1 | 2) { 1 }; multi fib ($x) { fib $x - 1 + fib $x - 2 }; say fib 5 # timeout
dalek p/js: 045db6d | hoelzro++ | src/vm/js/nqp-runtime/deserialization.js:
Bump serialization version to 12

This fixes the tests for the JS backend
p/js: ebf56ea | hoelzro++ | src/core/IO.nqp:
Don't call setinputlinesep on JS
p/js: d065d45 | (Pawel Murias)++ | / (3 files):
Rename t/nqp/86-more-if-tests.t to avoid conflict with a pipe test.
grondilu psch: missing parens
camelia rakudo-moar 5450e7: OUTPUT«(timeout)»
pmurias hoelzro: your branch seems great, thanks
psch grondilu: right
m: multi fib ($ where * == 1 | 2) { 1 }; multi fib ($x) { fib($x - 1) + fib($x - 2) }; say fib 5 # timeout? 21:44
camelia rakudo-moar 5450e7: OUTPUT«5␤»
psch grondilu++
grondilu more about Fibonacci in Perl 6: 21:45
rosettacode.org/wiki/Fibonacci_sequence#Perl_6
psch that still states "is cached" is not supported yet 21:46
does RC need an account, and if so is someone with one around?
Peter_R psch, is that any different from whatI posted?
psch the backlog suggests it works when on the proto
dalek p-js: 7e6ee3c | (Pawel Murias)++ | / (2 files):
Implement nqp::ordat.
p-js: c30f376 | (Pawel Murias)++ | t/nqp/59-nqpop.t:
Add test for nqp::ordat.
p-js: 824ea1a | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Implement nqp::setelems.
p-js: d84ee2f | (Pawel Murias)++ | t/nqp/59-nqpop.t:
Add tests for nqp::setelems.
p-js: 1487928 | (Pawel Murias)++ | TODO:
Remove done TODO item.
Peter_R aside from s/n/x/
grondilu psch: it's quite easy to create an account on RC
psch Peter_R: you have a constraint on $n ($x in my case), don't you? 21:47
Peter_R: «multi sub fib ($n where * >= 3) { ... }» instead of «multi sub fib ($x) { ... }»
grondilu psch: I'll update the entry regarding the "is cached" trait
psch grondilu: i just suspect i'll hardly contribute to RC, which i why i don't really want to create an account 21:48
Peter_R psch, then it won't fail for 0 and negative numbers?
psch Peter_R: right, it wouldn't. i suppose it depends on where you want to place the error handling 21:49
Peter_R: i.e. "if we get a negative number we don't dispatch" vs "if we get a negative number we tell the user he made a mistake" 21:50
Peter_R I like to write completely specified stuff if I can without much effort
I guess in practice I'd make a type to make it more explicit
dalek kudo/nom: 1b24050 | Mouq++ | src/Perl6/Actions.nqp:
Throw NYI (for now) for $=data and cousins
Peter_R but that's just personal taste
psch in that case moritz++ has you covered. you have to have a where on the last candidate to exclude negative numbers 21:51
dalek p/js: 21fee9b | (Pawel Murias)++ | / (2 files):
Implement nqp::ordat.
psch if you wanted to do something else except fail when you get something outside of your range another candidate should cover that, i'd say
(maybe "something more than just fail", fwiw) 21:52
Mouq bartolin: Also, there already appears to be unrun tests in S02-literals/pod.t 21:53
dalek p/js: 308cb9f | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Implement nqp::setelems.
raydiak every time 'is cached' comes up, I feel compelled to say "BUT... #122896 " 21:54
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122896
grondilu oh yeah I remember that 21:55
it's tough to always remember checking if something not only works on normal execution but also on pre-compiled code.
jnthn Mouq: About your method lookup module, I wondered about .& 21:56
$obj.&meth # looks up method bound to $obj
$obj.&meth(1) # looks up method bound to ($obj, 1) - e.g. shortcut for .assuming 21:57
std: 42.&sin
camelia std f9b7f55: OUTPUT«ok 00:01 138m␤»
jnthn Huh, it parses already?
m: 42.&sin
camelia ( no output )
psch m: say 42.&sin
camelia rakudo-moar 5450e7: OUTPUT«-0.916521547915634␤»
jnthn Oh, of course
Duh.
Forget that, then. :(
psch that's postfix sub..?
jnthn Same as $obj.$meth 21:58
psch oh right
jnthn And yeah, we really don't want a discontinuity there.
dalek p/js: 51dde73 | (Pawel Murias)++ | t/nqp/59-nqpop.t:
Add tests for nqp::setelems and nqp::ordat.
21:59
pmurias should I delete the old nqp-js repo? 22:00
jnthn pmurias: That or leave it with just a README saying where the code that uses to be there lives now 22:02
pmurias so I should 'git rm *' and then put is such a README? 22:03
s/put is/git add/
jnthn That'd likely work, yes
22:04 FROGGS_ joined
dalek p-js: 133a888 | (Pawel Murias)++ | / (1338 files):
Add a README describing the move into the perl6/nqp repo.
22:05
p-js: 84ff309 | (Pawel Murias)++ | . (2 files):
Remove dot files.
22:08 FROGGS left, grondilu left
timotimo can we pre-populate caches of "is cached" subs at BEGIN time and have the result serialized? 22:08
pmurias timotimo: by calling the sub at BEGIN time a bunch of times? 22:12
moritz timotimo: re irclog.perlgeek.de/perl6/2015-02-06#i_10073975 +1 to linking to the IRC channel more prominently
timotimo: I don't know what a "private-ish comment thread" would be, nor private to whom, so it's hard for me comment on that 22:13
flussence I guess that means how docs.php.net works, each page has a comment section underneath. 22:14
moritz timotimo: I think that doc.perl6.org should stay 100% curated content, though any ways to help others contribute are welcome
flussence: yes, and I don't like the idea. The content of the pages change over time, and then what do we do with the comments? 22:15
I know the comments below the mysql docs, and they are of mixed quality
pmurias wouldn't it be similiar to annocpan? 22:17
Mouq would think someone who's going to take the time to write a well researched comment would be able to take the time to write a well researched PR
moritz so are the docs on doc.perl6.org, but I have no qualms patching them; I'd certainly hesitate to patch comments
Mouq: or an issue, at least
jnthn So let's just think about how we can make it as easy as possible for folks to contributed (with a little moderation) improvements to the docs. 22:18
*contribute
moritz maybe a line like "If you found anything on this page hard to understand, please open an issue" with a link to perl6/doc/issues/new
jnthn Maybe there's a way we can include a "Want to improve this doc? Here's the source." with a link.
El_Che put the page on github? 22:19
jnthn Though I guess some pages source the docs from many places...
dalek kudo/nom: d728669 | FROGGS++ | src/Perl6/ (2 files):
fix error reporting for anon vars [RT #123584]

  `$; my $b;` now gives correctly: Useless use of variable $ in sink context (line 1)
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123584
moritz jnthn: yes, linking to the source document (instead of just the repo) would be nice (where unique)
22:21 ugexe left, ugexe joined
timotimo you know how wikipedia ives you an "edit" link for each section? 22:27
moritz knows 22:28
avar sink context? Is that the new void?
moritz yes 22:29
Mouq m: 1,2,3; 1
camelia rakudo-moar 5450e7: OUTPUT«WARNINGS:␤Useless use of "," in expression "1,2,3" in sink context (line 1)␤»
timotimo all docs are Pod6, right? 22:30
22:30 diana_olhovik left, tgt left
timotimo we should perhaps not expect a potential contributor to be able to turn pod6 into html for preview on their own 22:30
22:30 BenGoldberg left
timotimo so we may want to offer a preview on the server side 22:31
22:31 BenGoldberg joined
moritz sounds useful 22:31
timotimo .o( and then performance may become an issue, if someone decides to give our parser a crapton of "well-prepared" data )
moritz timeouts exist
timotimo ah 22:32
yes
moritz -> sleep
timotimo -> sleep, moritz 22:33
Mouq We could have a per-file and per-section "online editor" that interfaces with GH and can at least recognize bad Pod. But that would be quite a project
'night moritz!
22:34 virtualsue left, virtualsue joined
timotimo hmm 22:37
we have perlito 6tojs ... does perlito6 handle grammars properly? 22:38
22:39 Hor|zon joined 22:43 Hor|zon left, FROGGS_ is now known as FROGGS 22:44 pdurbin joined
pdurbin TimToady: I just listened to rebuild.fm/78/ and really enjoyed it. Thanks for being awesome. :) 22:45
FROGGS I listened to it a few hours ago :o)
timotimo i liked it, too
i listened it around noon
El_Che yes, it was a nice interview 22:46
a good alternative for those that missed FOSDEM (waiting for the video...) 22:47
FROGGS aye
timotimo yes yes, videos please 22:48
22:48 d4l3k_ joined, Maddingu1 joined
timotimo i must say the c3voc, the Chaos Computer Club Video Operating Center ... it's fantastic at that stuff 22:48
22:49 Kristien_ joined, lumimies_ joined
El_Che timotimo: yeah, they produces a very nice Perl troll video :) 22:49
vendethiel timotimo: perlito's perl6 part is severly outdated (2012 at best)
22:49 gtodd1 joined
timotimo El_Che: not produce. record, cut and publish 22:49
El_Che true
timotimo El_Che: the voc is also not involved in the acceptance/rejection process; except everybody was 22:50
22:50 stux|RC-only left, ingy left, lumimies left, Kristien left, gfldex left, jercos left, dalek left, sjn left, Maddingue left, pmurias left, gtodd left, lumimies_ is now known as lumimies, d4l3k_ is now known as dalek, ChanServ sets mode: +v dalek 22:51 gfldex joined, sjn joined
timotimo as in: before congress, surveys went out to ask/figure out what talks people would be interested in 22:51
22:51 ingy joined, pmurias joined, stux|RC-only joined, jercos joined
FROGGS .tell bartolin do you have an opinion to RT #123584? 22:53
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123584
yoleaux FROGGS: I'll pass your message to bartolin.
FROGGS and with that, gnite #perl6
22:57 virtualsue left
timotimo FROGGS: you can test for warnings with a CONTROL block 22:57
23:01 Util left 23:02 Util joined 23:09 zakharyas joined
Mouq <O=.mergeO(|%op_O, |$<assignO>)> => "Too many positionals passed; expected 1 argument but got 3" Dammit NQP :P 23:11
23:12 gugod left 23:13 gugod joined
timotimo wanted a string, right? 23:13
23:14 BenGoldberg left, BenGoldberg joined
Peter_R So whats the current ecosystem with modules like now in Perl 6 23:20
Panda is the cpan type thing right?
timotimo see for yourself: modules.perl6.org/
Peter_R thanks
timotimo :) 23:21
Peter_R YAML, thank goodness 23:22
Not sure how I would live without it :P
Not centralised but links to individual githubs 23:24
I can think of good and bad about that :D
23:26 pmurias left, usuario_ left
Mouq Peter_R: YAML... Is kind of a lie, AFAIK. All it does is dumping. Ingy wasn't merging patches TestML for a long time, which YAML depended on, which meant that the YAML module didn't work for a long time. Recently we forked both as community modules, but no one's done work on adding YAML parsing yet 23:29
timotimo oh, er 23:33
i don't think YAML actually ... you know ...works
raydiak the readme mentions that the dump output is more for visualization and not necessarily valid YAML 23:35
timotimo ... >_>
i've not worked with yaml for a long time now 23:36
raydiak so other than the dump not dumping YAML, and nothing existing besides dump...yes we have a module named "YAML" :) 23:37
Kristien_ I considered using YAML for my object file format, but then I figured nobody has implemented it for D yet.
So I went with JSON.
vendethiel YAML is a bit crazy. 23:41
but if you restrict your subset, it can be good... just avoid inheritance and stuff
timotimo yeah, YAML is very advanced 23:42
yaml is actually a perl6 superset
vendethiel :D 23:43
Peter_R That's it I'm off Perl 6 for good :P 23:46
Mouq Kristien_: I implemented TOML! ^_^
Peter_R I can't have a relationship with a YAMLess language :P
timotimo sad thing is, you have to fill up your infinite tape with data all the way up to the end in order to run a YAML programme
Kristien_ I wanted to use YAML because it supported multiline string literals. 23:47
timotimo in that case, use json65
json6
Kristien_ But then I figured I could do something in JSON with an array of strings, and have the program concatenate them.
Peter_R I like the look of YAML more than JSON :D
timotimo hm
what is that thing called again?
json5.org/
Kristien_ I ought to switch to a binary object file format though. 23:48
timotimo Strings can be split across multiple lines; just prefix each newline with a backslash. [ES5 §7.8.4]
23:49 beastd left
Kristien_ Storing assembly code in an object file is incredibly inefficient and they are larger than the source files. :V 23:51
vendethiel Mouq: toml ftw! 23:54
I actually was going for JSON for config at first, but then TOML looked at me in the eye..
23:56 telex left
vendethiel timotimo: you can already do that in JS, but not in json :) 23:57
json is not a subset of js
timotimo yeah 23:58
Kristien_ I like XML.
timotimo that's why they have json5
23:58 telex joined
Kristien_ Time to write a code generator. 23:59