»ö« 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! | feather will shut down permanently on 2015-03-31
Set by jnthn on 28 February 2015.
00:00 laouji joined 00:02 tinyblak joined 00:05 laouji left
japhb .botsnack 00:16
yoleaux :D
2 Mar 2015 21:08Z <lizmat> japhb: did you know I implemented nqp::readlink recently ?
japhb .ask lizmat I think I was vaguely aware that you had implemented nqp::readlink, yes. Why do you ask?
yoleaux japhb: I'll pass your message to lizmat.
00:17 skids joined 00:18 cognominal left 00:21 laouji joined 00:23 tinyblak left 00:39 laouji left
japhb .ask agentzh gist.github.com/agentzh/c5108a959309f015c4f6 looks like a very nice benchmark; can you create a PR for github.com/japhb/perl6-bench adding this as one of the minibenchmarks? 00:40
yoleaux japhb: I'll pass your message to agentzh.
00:42 agentzh left 00:45 tinyblak joined, laouji joined
avuserow I think I have a memory leak in my grammar. Are there known issues (or known tricks to avoid this), or should I try to golf my grammar down? 00:55
00:56 agentzh joined, dayangkun joined
avuserow I just loop over a bunch of lines in a file, run the grammar on each one, and check if it's true. Otherwise I don't do anything with it. 00:56
I've verified that it doesn't happen if I don't run the grammar but otherwise loop over the data. (I'm using while $fh.eof and $fh.get to accomplish this) 00:59
timotimo maybe --profile can shed a tiny bit of light? in the allocations tab maybe? 01:00
avuserow I'll look at that once I golf down the data to something I can complete processing of (but still have a very noticable leak) 01:02
PerlJam avuserow: what makes you think you have a memory leak?
avuserow well, I don't see anywhere that I should be holding onto information, and with the grammar parse I use >7GB of memory and get 5% done parsing. Without the grammar parse, I use ~330MB of memory at completion 01:12
so it's possible that I have one in my P6 code, but I don't have any intentional accumulation of data 01:13
well, I have 15199467 BOOTCode allocations, mostly from various <anon>s in core.setting (and one large chunk from MATCH) 01:16
I'll investigate and golf later, decommute& 01:18
01:19 dayangkun left, laouji_ joined 01:20 laouji left 01:31 laouji joined 01:32 Hor|zon joined 01:35 robinsmidsrod left 01:36 laouji left, robinsmidsrod joined 01:37 Hor|zon left
TimToady .tell mohij .made is only for passing values up the parse tree, so a subrule does not inherit its parents .made; you can only read the .made of a subrule after you've parsed the subrule. To pass info downward, you can parameterize subrules like ordinary methods. 01:43
yoleaux TimToady: I'll pass your message to mohij.
02:04 yeahnoob joined 02:08 [Sno] left, BenGoldberg joined 02:14 cognominal joined, cognominal left 02:15 cognominal joined, cognominal left, cognominal_ joined 02:16 cognominal_ left, cognominal_ joined
timotimo SVG can't do varying stroke widths along a regular path, right? one would have to build the stroked "path" as a filled region instead, right? 02:16
02:17 cognominal_ left, cognominal_ joined, cognominal_ left 02:25 grettir left 02:31 Peter_R left 02:32 integral left 02:33 integral joined, integral left, integral joined 02:34 Peter_R joined 02:46 chenryn joined
[Coke] warning building rakudo-moar: gist.github.com/anonymous/23859bb546985b555082 02:48
tons of failures on nativecall on os x in make test. known? 02:49
colomon :\ 02:51
[Coke] oh, wait, I'm on hack.
s/os x/whatever hack.p6c.org is/
colomon Linux, isn’t it?
skids The warning has been showing up during build for a while now, even on ia64. 02:52
colomon Debian
hack is Debian 02:53
skids my ia64 is as well.
colomon [Coke]: I get tons of failures in 04-nativecall on os x as well, for what that’s worth. 03:02
03:04 agentzh left 03:06 ash_gti joined
japhb skids: You have an IA64 box? That's a bit surprising, not many people still have an Itanium around in active use -- or did you mean x64? 03:07
03:18 Patterner joined 03:20 laouji joined, Hor|zon joined
dalek ast: 09528be | coke++ | / (5 files):
some rakudo fudging
03:20
kudo/nom: 01c3faf | coke++ | t/spectest.data:
Run some passing/fudged tests
03:21
03:22 Psyche^ left
skids japhb: yeah sorry, x86_64 too late for numbers. 03:22
03:24 laouji left 03:25 Hor|zon left 03:29 raiph left 03:33 yves left, noganex_ joined 03:37 noganex left 03:39 laouji_ left 03:41 yves joined 03:43 telex left 03:44 telex joined 03:50 raiph joined
japhb skids: No worries. If you had one, I was going to pepper you with questions about how r-m ran on it. :-) 03:57
skids I have a couple unusual systems but I'd need a lot of canned air and luck to get them up again. 03:59
And they probably do not have the RAM to do r-m these days. 04:00
(An old DECstation and an hp-parisc) 04:01
japhb Yeah, I think the only unusual systems I might still have around would be way too low-RAM. 04:02
skids wonders if one of the mips sbs might have enough horsepower these days. 04:03
Many of those can be run bigendian 04:04
*stbs
04:05 ash_gti left
japhb Do we have anyone running r-m on a bigendian box already? If not, you could be the first. :-) 04:05
skids I do have a friend with all sorts of junk, I could ask him what his beefiest be box is. He's big into Gentoo IIRC. 04:06
(I turned off the parisc box several years ago when I realized it was drawing something like 450W of power idle.) 04:07
04:10 grondilu left 04:16 fhelmberger joined 04:17 ash_gti joined 04:19 raiph left 04:21 fhelmberger left
avuserow prof-m: for 1 .. 1000 {my $a = "a" x 1_000_000; $a ~~ /./;} # uses gobs of memory 04:24
camelia prof-m 01c3fa: OUTPUT«Memory allocation failed; could not allocate 4000000 bytes␤»
.. Prof: p.p6c.org/50b772
avuserow that uses >4GB of memory on my machine
prof-m: for 1 .. 100 {my $a = "a" x 1_000_000; $a ~~ /./;} # uses gobs of memory
camelia ( no output )
.. Prof: p.p6c.org/50b78b
avuserow that uses ~500MB
prof-m: my $a = "a" x 1_000_000; for 1 .. 1000 {$a ~~ /./;} # this is fine 04:25
camelia ( no output )
.. Prof: p.p6c.org/50b7ba
04:26 Woodi left
avuserow prof-m: for 1 .. 1000 {my $a = "a" x 1_000_000; $a.chars} # ALSO fine somehow! 04:26
camelia ( no output )
.. Prof: p.p6c.org/50b80a
04:26 raiph joined
avuserow so it seems allocating a bunch of 1MB strings WITHIN a loop and then running a regex on it makes it use up tons of memory 04:27
04:28 laouji joined, agentzh joined
avuserow (the ones that are fine use between 90MB and 110MB, and don't vary much based on iteration count) 04:30
04:30 laouji left
skids maybe the for isn't being sunk, and the Match.orig's are taking space? 04:34
04:34 laouji joined
avuserow m: my $i = 0; while $i < 1000 {my $a = "a" x 1_000_000; $a ~~ /./; $i++} 04:37
camelia rakudo-moar 01c3fa: OUTPUT«Memory allocation failed; could not allocate 4000000 bytes␤»
avuserow a while loop with the match as the non-final statement also explodes
j: my $i = 0; while $i < 1000 {my $a = "a" x 1_000_000; $a ~~ /./; $i++}
camelia rakudo-jvm 01c3fa: OUTPUT«Can't open perl script "/home/camelia/jvm-rakudo/eval-client.pl": No such file or directory␤»
avuserow p: my $i = 0; while $i < 1000 {my $a = "a" x 1_000_000; $a ~~ /./; $i++} 04:38
I guess that's not a target any longer? it would've timed out by now. 04:39
JVM locally doesn't do as badly. 681620maxresident for 1000 iterations 04:40
774728maxresident for 10_000 (!) 04:42
disabling spesh on MoarVM makes a minor difference only 04:44
04:56 adu left 05:01 agentzh left 05:07 adu joined
avuserow it doesn't seem to matter if the match succeeds or not, either. 05:08
TimToady it would appear from the profiling that agentzh++'s program spends about 1/6 of its time in the MATCH routine looking for numbered captures, when there's not a single numbered capture in the whole program 05:09
only about a third of the programs time is actually spent match; most of the time seems to go toward turning cursors into match objects
05:10 Hor|zon joined
TimToady doubtless our parser has similar issues 05:10
[Coke] using tools/autounfudge with --jobs 4 and it's only chewing one cpu. 05:12
TimToady suspects an approach more like STD's might be faster, where we fake match object semantics from the cursor object as much as possible and only create a real match object under severe provocation 05:13
05:14 raiph left 05:15 Hor|zon left
TimToady that would take off a lot of GC pressure too 05:16
05:24 mtj_ left 05:27 mtj_ joined 05:29 aborazmeh joined, aborazmeh left, aborazmeh joined 05:39 tinyblak left 05:40 agentzh joined 05:51 adu left 05:52 diana_olhovik_ joined 06:02 BenGoldberg left
dalek ast: 663b535 | coke++ | S (14 files):
unfudge some items
06:07
06:08 laouji left 06:09 laouji joined 06:15 yeahnoob left 06:23 rindolf joined 06:27 rindolf left 06:30 anaeem1 joined 06:36 diana_olhovik_ left 06:41 Tux__ joined, |Tux| left 06:45 |Tux| joined, Tux__ left 06:46 [Sno] joined 06:49 gfldex joined 06:53 wicope joined 06:54 laouji_ joined 06:58 Hor|zon joined 06:59 laouji_ left 07:03 Hor|zon left 07:10 gfldex left 07:16 aborazmeh left, diana_olhovik joined 07:21 agentzh left 07:24 bjz joined
[Tux] current maor fails to install Inline::Perl5 07:27
07:28 bjz left 07:31 bjz joined 07:37 bjz left 07:38 kaare__ joined 07:42 fhelmberger joined
sergot morning 07:43
:)
07:43 Rounin joined
masak morning, #perl6! 07:51
07:51 rindolf joined 07:53 FROGGS joined
FROGGS pmichaud / jnthn: now I know why there is no dupprefix('!!')... 07:54
07:54 zakharyas joined
TimToady I only put it in for the ones that Make No Sense doubled 07:55
FROGGS pmichaud / jnthn: ~~ is a noop (like .Str.Str), ?? is a noop (.Bool.Bool), but !! isnt... prefix:!! is identical to prefix:?
*nod*
07:55 virtualsue joined
TimToady but arguably since we have ? the !! isn't really necessary 07:56
but since it makes a difference for LTM, we do distinguish <?foo> from <!!foo>
so we could do it for !! in normal expressions I suppose
08:00 ash_gti left, bjz joined
FROGGS the problem we tried to solve was just about getting a nicer error message for: 08:00
m: class A { method a { 42 ?? nextsame !! die } }
camelia rakudo-moar 01c3fa: OUTPUT«5===SORRY!5===␤Found ?? but no !!␤at /tmp/kdxrtm2waz:1␤------> 3ss A { method a { 42 ?? nextsame !! die 7⏏5} }␤Confused␤at /tmp/kdxrtm2waz:1␤------> 3ss A { method a { 42 ?? nextsame !! die 7⏏5} }␤ expecting any of:␤ …»
08:00 rindolf left
TimToady yes, I saw the backlog 08:00
FROGGS but I guess we just need to append a text to the existing message that a listop probably gobbled the !!... 08:01
and then we are fine
because a novice might think WAT and pointing with his/her finger on the !! right there
08:03 prime left, prime- joined 08:06 espadrine joined, Ven joined 08:08 rurban joined 08:10 larion left 08:14 Ven left 08:17 Ven joined 08:20 agentzh joined 08:21 adu joined 08:24 kaare__ is now known as kaare_ 08:25 agentzh left 08:29 Hor|zon joined 08:34 tinyblak joined, Hor|zon left 08:43 laouji_ joined 08:48 laouji_ left 08:54 kaare__ joined 08:55 coffee` joined
nwc10 blog.pyston.org/2015/02/24/pyston-0...fficiency/ -- The biggest features of this release are that we can now run all of our internal scripts on Pyston -- Dogfood! 08:57
(and yes, I'm slow. They're not on planet python, and I forgot to check) 08:58
08:58 kaare_ left
DrForr_ Oh, please, planet X is *so* last century :) 08:58
09:04 laouji left, laouji joined, Hor|zon joined 09:05 laouji left, laouji joined 09:07 espadrine left
nwc10 DrForr_: I was meaning planetpython.org/ 09:10
lizmat .botsnack 09:11
yoleaux :D
00:16Z <japhb> lizmat: I think I was vaguely aware that you had implemented nqp::readlink, yes. Why do you ask?
lizmat .tell japhb isn't that what you need to implement IO::Path.resolve ?
yoleaux lizmat: I'll pass your message to japhb.
09:12 jack_rabbit joined
FROGGS "On the project management side, we now have multiple people working full time on the project,..." :/ 09:12
09:13 larion joined
nwc10 why that smiley? 09:13
(yes, I'd read that sentance and pasted it privately to someone not on this channel, whom I chat about these things with) 09:14
it wasn't obvious to me how to work out from github.com/dropbox/pyston who the full timers are, and who is paying for them. 09:15
FROGGS nwc10: well, I am slightly jealous :o)
09:18 cschwenz joined
nwc10 FROGGS: they have the advantage of being a re-implementation of an existing language, with a proven money making codebase. 09:20
(to be clear, I did not say "profitable")
(I have no idea if it makes enough money)
so it's more applied research than blue-sky
moritz good morning
I have some docs for IO::Socket::Async locally, but I'm hesistant to push them 09:21
FROGGS morning
why?
moritz ... because the simplest server example I could come up with segfaults
RT #123968
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123968
FROGGS eww
09:21 jack_rabbit left
FROGGS Invalid read of size 4 [...] Address 0xb8 is not stack'd, malloc'd or (recently) free'd 09:22
moritz looks like a NULL pointer + a bit 09:23
nwc10 valgrind! 09:24
moritz is totally awesome
FROGGS I will try to reproduce later with my debug build... 09:25
jnthn o/
FROGGS hi jnthn
09:26 silug left
FROGGS jnthn: can you explain that thing about 'example.com' being valid C99/C++ code? 09:26
jnthn http: is a label 09:27
//example.com is a comment
FROGGS ahh -.-
09:27 robinsmidsrod left
FROGGS that's lame :P 09:27
jnthn Hey, I din't come up with it :P 09:28
Though it took me a moment to spot what was going on :P 09:29
09:29 virtualsue left 09:30 robinsmidsrod joined
nine_ [Tux]: do you have any Inline::Perl5 installation error message for me? 09:30
09:30 kjs_ joined
[Tux] tries, one sec ... 09:31
gist.github.com/Tux/63bb829994cac5a1f1fd 09:32
Ulti pastebin.com/q5dguhqK <--- what I got
nine_ Ulti: /usr/bin/ld: cannot find -lperl
Ulti: you need to install some perl-devel perl-dev or libperl-dev or whatever it's called on your distro package 09:33
Ulti okedoke
09:34 darutoko joined
Ulti yeah now get the same as [Tux] 09:35
nine_ With yesterday's rakudo I can install it using panda. make test in my git checkout however yields a 'Could not find method "" of "Foo" object' in t/inherit.t that does not appear when calling prove or perl6 manually (despite make test doing exactly the same). So I do not dare to upgrade my rakudo right now. This could be a valuable hint for my heisenbug. 09:36
[Tux], Ulti: does the same happen with a make test in a local checkout of the repo? 09:38
Ulti I'll try now
hmm werid it compiles fine 09:41
09:41 silug joined
Ulti make test doesn't find the .so though 09:42
the message is coming from the native sub in Perl5Interpreter 09:44
09:48 Kristien joined
Kristien hola 09:48
Ven hi 09:49
nine_ Trying to compile current rakudo, I get a Useless declaration of a has-scoped method in multi (did you mean 'my method name'?) at lib/NativeCall.pm:114
nwc10 I've seen that. 09:50
jnthn too
nwc10 IIRC
summon more minions to fix these low hanging fruit
jnthn I may have some time to hunt for it this evening
(Got a busy day here)
Ulti nine_ not sure why but trying to print @*INC crashes out
from within the sub that inspects the path and adds it to the native subs/methods 09:51
nine_ Ulti: this gets more and more strange :/
Ulti 'write string requires an object with REPR MVMOSHandle'
super odd
but thats where the problem appears to start @*INC is something weird when it should just be a list of strings :S 09:52
moritz Ulti: I don't think it should be anymore
Ulti: lizmat++ should know
Ulti well if I do .perl on it should be
maybe its just say is doing something weird at that point?
like not trying to print to stdout 09:53
Ulti wanders back to dayjob :'(
moritz m: class A { method ^name { 'flurb' }}; say A.^name
camelia rakudo-moar 01c3fa: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in method name at /tmp/u4lvhnyIU_:1␤ in block <unit> at /tmp/u4lvhnyIU_:1␤␤»
moritz m: class A { method ^name($obj) { 'flurb' }}; say A.^name
camelia rakudo-moar 01c3fa: OUTPUT«flurb␤»
moritz m: my role TypedPointer[::TValue = Nil] { method ^name($obj) { 'Pointer[' ~ ::TValue.^name ~ ']' } 09:55
camelia rakudo-moar 01c3fa: OUTPUT«5===SORRY!5===␤Unable to parse expression in block; couldn't find final '}' ␤at /tmp/4nYwdeBTqY:1␤------> 3j) { 'Pointer[' ~ ::TValue.^name ~ ']' }7⏏5<EOL>␤ expecting any of:␤ postfix␤ statement end␤Other potential …»
moritz m: my role TypedPointer[::TValue = Nil] { method ^name($obj) { 'Pointer[' ~ ::TValue.^name ~ ']' }}
camelia rakudo-moar 01c3fa: OUTPUT«Potential difficulties:␤ Useless declaration of a has-scoped method in multi (did you mean 'my method name'?)␤ at /tmp/5xSdngNkeO:1␤ ------> 3le TypedPointer[::TValue = Nil] { method7⏏5 ^name($obj) { 'Pointer[' ~ ::TValue.^na␤»
09:55 Kristien left
moritz m: my role TypedPointer { method ^name($obj) { 'thing' }} 09:55
camelia rakudo-moar 01c3fa: OUTPUT«Potential difficulties:␤ Useless declaration of a has-scoped method in multi (did you mean 'my method name'?)␤ at /tmp/U2WPGeP3pD:1␤ ------> 3my role TypedPointer { method7⏏5 ^name($obj) { 'thing' }}␤»
moritz m: my class TypedPointer { method ^name($obj) { 'thing' }}
camelia ( no output )
jnthn Oh, it's a ^foo method in a role?! 09:56
moritz yes
jnthn Yowser. wtf.
OK, guess that one is certainly on my plate. :)
m: my role TypedPointer { method ^name($obj) { 'thing' }}; class C does TypedPointer { }; say C.^name 09:57
camelia rakudo-moar 01c3fa: OUTPUT«Potential difficulties:␤ Useless declaration of a has-scoped method in multi (did you mean 'my method name'?)␤ at /tmp/XPENLD0mDq:1␤ ------> 3my role TypedPointer { method7⏏5 ^name($obj) { 'thing' }}; class C does ␤C␤»
dalek kudo/nom: 69b2a20 | moritz++ | lib/NativeCall.pm:
Fix the build

by commenting out the offending line from NativeCall.pm
It probably should work, but does not in role
moritz eeks
I actually did not comment it out :(
09:57 espadrine joined
moritz I just fixed some other stuff 09:58
jnthn I don't think I got so far as implementing passing them on from roles, but it's still a bizzare error...
nwc10 git neuralize?
dalek kudo/nom: 5d9d060 | moritz++ | lib/NativeCall.pm:
Actually comment out failing line in NativeCall.pm
[Tux] rebuild moar (in rakudobrew) and Inline::Perl5 installs fine again 10:07
10:13 Kristien joined
Ulti ^ me too 10:13
10:16 virtualsue joined
Kristien woo 10:16
10:19 Kristien left 10:21 rindolf joined 10:23 pecastro joined 10:26 larion left, larion joined 10:29 tmch joined 10:30 alini joined 10:32 laouji_ joined 10:33 ugexe left 10:34 Ven left 10:36 tinyblak left, laouji_ left 10:37 tinyblak joined 10:38 Kristien joined 10:39 Kristien left 10:54 tinyblak left
FROGGS moritz++ 10:58
moritz: do I understand right that the warning that appeared some days ago turned into an error?
Ulti also nine_++ the use Blah:from<Perl5>; is so slick its amazing 11:01
11:09 ar joined 11:11 Kristien joined 11:12 rurban left 11:13 Kristien left
sjn Perl 6 evennt with Damian Conway in Oslo TODAY: meetu.ps/2GKPZx 11:14
sjn hopes to see people from here :) 11:15
(and their colleagues and their friends and their families, and their pets and their...)
raydiak good Inline::Lua progress today...and enough for tonight... o/ #perl6 11:19
sjn \o
11:20 agentzh joined 11:24 Ven joined 11:25 agentzh left 11:27 adu left
moritz FROGGS: dunno 11:31
11:32 ugexe joined 11:34 cognominal joined 11:37 ugexe left 11:43 ffuu joined 11:44 ffuu left 11:46 rurban joined 11:51 wicope left 11:52 wicope joined 11:55 Kristien joined
nine_ sjn: Oslo is just too far for my travel budget right now. Could you please move Oslo closer to Linz? 11:59
sjn nine_: I'll ask the next time I talk with the mayor :) 12:00
nine_ sjn: probably too late for today's event, though I guess
12:00 cognominal left 12:01 cognominal joined, alini left
Kristien hi 12:04
12:06 muraiki joined, cognominal left 12:11 kst``` joined
Ven o/ 12:11
12:11 alini joined 12:12 kst`` left
lizmat .tell Ulti re irclog.perlgeek.de/perl6/2015-03-03#i_10212738 , this is exactly the error why I can't make @*INC lazy yet 12:16
Kristien let's give Rust a try
yoleaux lizmat: I'll pass your message to Ulti.
lizmat .tell Ulti @*INC should contain CompUnitRepo objects, strings are allowed atm, but will be phased out 12:17
yoleaux lizmat: I'll pass your message to Ulti.
|Tux| jnthn, my script still causes the profiler to exit with «Don't know how to dump a Str»
lizmat .tell Ulti also, still not sure whether @*INC continues to be exposed, or would only be changeable with "use lib"
yoleaux lizmat: I'll pass your message to Ulti.
jnthn |Tux|: Didn't get chance to look at that one yet, I'm afraid. 12:21
12:23 Kristien left
nine_ lizmat: if @*INC goes away, how would we be able to find .so files that come with modules? 12:27
lizmat perhaps via the %?RESOURCE hash ? 12:28
S22:362
synopsebot Link: design.perl6.org/S22.html#line_362
nine_ lizmat: oh, that looks lovely! Is it already implemented in rakudo? 12:30
lizmat NYI I'm afraid 12:33
12:35 Kristien joined 12:37 Kristien left
Ulti lizmat so if you had "use lib" without specifying a path it just gives you access to @*INC with the current paths as CompUnitRepo objects? 12:41
yoleaux 12:16Z <lizmat> Ulti: re irclog.perlgeek.de/perl6/2015-03-03#i_10212738 , this is exactly the error why I can't make @*INC lazy yet
12:17Z <lizmat> Ulti: @*INC should contain CompUnitRepo objects, strings are allowed atm, but will be phased out
12:17Z <lizmat> Ulti: also, still not sure whether @*INC continues to be exposed, or would only be changeable with "use lib"
lizmat good question, the ideas about that area are still slushy, but will need to be finalized before 6.0 12:42
Ulti I guess it's quite nice to know explicitly that some code is doing something funky with include and is uncommon enough that most people wouldn't lament the slightly harder path to getting access 12:44
lizmat yeah, accessing / adapting @*INC is not something you will see in every module / code :-) 12:45
quite the contrary, actually, I would hope
dalek kudo/nom: dcbd1af | lizmat++ | / (4 files):
Initial implementation of PairMap

Basically a Hash of which the keys are fixed at creation time, and the values
  *can* be altered.
12:47
ast: 42586b7 | lizmat++ | S02-types/WHICH.t:
Check for the 3 new PairMap related classes
12:51
12:52 ugexe joined 12:55 chenryn left 12:56 chenryn joined 13:00 kjs_ left
lizmat m: my %h = a => 42; (b=>65,%h).pairup.perl.say # TimToady: is the interpolation of %h in pairup allowable behaviour ? 13:03
camelia rakudo-moar 5d9d06: OUTPUT«("b" => 65, "a" => 42).list␤»
dalek kudo/nom: 43e77a1 | jnthn++ | src/Perl6/Grammar.nqp:
Implement dupprefix bits from STD.
13:06
jnthn Gotta go to meeting; spectests for ^ welcome :)
&
lizmat jnthn++
13:09 laouji left
dalek kudo/nom: 46ac25f | lizmat++ | src/core/PairMap.pm:
Make sure PairMaps roundtrip
13:10
13:10 Kristien joined
lizmat seems TPF not the only one not in GSOC 2015: blog.queze.net/post/2015/03/03/Mozi...-Code-2015 13:12
Ven yes :s
tadzik I wonder if Parrot made it
nwc10 gosh, we're in good company. 13:13
Other organizations that have participated successfully several times are also not in the 2015 list (eg. Linux Foundation, Tor, ...).
nine_ It's almost a badge of honor to not be accepted :)
dalek c: fcea589 | paultcochrane++ | lib/Language/regexes.pod:
Correct plural
13:15
c: bd936ef | paultcochrane++ | / (5 files):
Merge branch 'master' of github.com:perl6/doc
c: 9a9effb | paultcochrane++ | lib/Language/regexes.pod:
Add rough note about lookbehind assertions

I'm sure this example can be improved upon. This is a start nevertheless...
|Tux| m: sub gl(IO $io){$io.perl.say;$io.nl="\n";};gl($*ARGFILES); 13:18
camelia rakudo-moar 43e77a: OUTPUT«IO::Handle.new(path => Any, ins => 0, chomp => Bool::True)␤set separator requires an object with REPR MVMOSHandle␤ in block at src/gen/m-CORE.setting:16911␤ in sub gl at /tmp/gHBUKfq6hQ:1␤ in block <unit> at /tmp/gHBUKfq6hQ:1␤␤»
|Tux| is that related to RT#123888 ? 13:19
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123888
skids Maybe they were just tweaked that there was no "Inline::Go" yet :-)
timotimo oh, ARGFILES doesn't support that, interesting 13:22
it should probably just "redistribute" that on assignment
timotimo looks at the code
[Tux]: i don't think it's related; $*IN is an actual file object, whereas $*ARGFILES is a fake one 13:23
|Tux| I was about to post: "With $*IN, all works file"
but $*ARGFILES is the default for lines(), and $*IN is not 13:24
timotimo i've got an implementation 13:27
lizmat fwiw, I think $*ARGFILES should be a instance of a class that can handle multiple file-handles 13:28
dalek kudo/nom: 2247eae | timotimo++ | src/core/IO/ArgFiles.pm:
teach IO::ArgFiles about method nl
timotimo [Tux]: i hope you'll find this implementation satisfactory 13:29
oh
lizmat and possibly anything that has a PIO objects, so sockets also
timotimo [Tux]: now i understand the RT you posted 13:30
lizmat getting ready to commute to Amsterdam.pm meeting
|Tux| I think that I find it acceptable: I just hit it and wondered if that was intended behavior
timotimo you're setting $*IN's line separator and used lines()
yeah, now i get it
but do realize that if you don't put your data in via stdin but via a commandline argument, setting the ILS on $*IN isn't exactly right 13:31
|Tux| timotimo, in order to let perl6 do the hard work, I *temporary* set .nl on $io and restore the original .nl when I am done
github.com/Tux/CSV/blob/master/test-t.pl#L866 13:33
timotimo mhm 13:35
|Tux| wonders what kind of mhm that is :) 13:36
timotimo too
|Tux| :)
timotimo i wanted to suggest creating your own IO object or requiring the user to configure it properly for use with Text::CSV 13:37
but that's not sensible
13:38 telex left
timotimo but regarding #123888 i'm willing to say the exact code you posted is WONTFIX; however, advocating $*IN.nl as a perl6 version for $/ is not the right way to go, as it has different semantics, especially if lines() is the perl6 version of <> 13:38
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123888
13:39 skids left 13:40 telex joined
Kristien what's a synopse? a special kind of synapse? 13:40
13:42 salv0 left
lizmat commute& 13:42
13:42 lizmat left 13:44 prevost joined
|Tux| timotime, many of the "solutions" I currently use are by means of digging. The docs are currently not usefull enough to answer my needs and questions 13:47
maybe that is why I sometimes end up using suboptimal code or even unsupported "features" 13:48
I am absolutely sure that some parts will have to be rewritten or use different approaches to be more efficient 13:49
timotimo m: $/ = "+"
camelia ( no output )
|Tux| but that is part of my learning process
timotimo hm, didn't we emit a helpful warning for this at some point?
OK, that's fair 13:50
i do think, however, that $*IN.input-line-separator or .nl or whatever is recommended as a replacement for $/ at some point
|Tux| only for $\
m: $\ = "+"
camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QehO49Qmnm␤Unsupported use of $\ variable; in Perl 6 please use the filehandle's .nl attribute␤at /tmp/QehO49Qmnm:1␤------> 3$\7⏏5 = "+"␤»
|Tux| which is how discovered that, as that message was wrong a while back :) 13:52
13:52 anaeem1 left 13:53 anaeem1_ joined
|Tux| rt.perl.org/Ticket/Display.html?id=123884 13:55
timotimo oh, it has a backslash 13:57
13:58 anaeem1_ left, raiph joined
timotimo what's the difference between $/ and $\ in p5? 13:58
14:02 kjs_ joined
sjn timotimo: output and input record separators, respectively 14:03
grep for them in perlvar
14:03 aborazmeh joined, aborazmeh left, aborazmeh joined
|Tux| does perl6 have native time::hires? 14:05
nine_ m: say now; 14:06
camelia rakudo-moar 2247ea: OUTPUT«Instant:1425391613.352988␤»
|Tux| takk
nwc10 r: raw now
camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Undeclared routine:␤ raw used at line 1␤␤»
timotimo OK
nwc10 fingers/brain/er
r: say now;
camelia rakudo-moar 2247ea: OUTPUT«Instant:1425391640.060958␤»
timotimo does that actually count as "hires"?
nwc10 j: say now;
camelia rakudo-jvm 2247ea: OUTPUT«Can't open perl script "/home/camelia/jvm-rakudo/eval-client.pl": No such file or directory␤»
nwc10 aha 14:07
timotimo camelia: help
camelia timotimo: Usage: <(nqp-js|star-m|p5-to-p6|rakudo-moar|rakudo-jvm|nqp-moarvm|nqp-jvm|star-p|debug-cat|pugs|star-j|prof-m|std|niecza|nqp-parrot|nqp-m|m|rn|n|rPn|p56|sp|rakudo|rnP|p6|nom|rm|sm|nqp-q|Prn|r|Pnr|nrP|nqp|nPr|star|P|r-m|r-jvm|nqp-mvm|nqp-j|j|nqp-p|perl6|rj|nr|r-j)(?^::\s) $perl6_program>
timotimo p5-to-p6: print "hello";
camelia p5-to-p6 : OUTPUT«print('hello')␤»
timotimo cute
debug-cat: say "what" 14:08
camelia debug-cat: OUTPUT«say "what"»
timotimo ah, ok
Ulti p5-to-p6: say for (<>) 14:10
camelia p5-to-p6 : OUTPUT«.say␤ for (lines)␤»
Ven :o 14:11
Ulti I think that is a \n different between the two 14:12
still cool though
literal |Tux|: I'm curious about your choice of word there
|Tux| p5-to-p6: $/ = $\ = "+"; print "foo";
camelia p5-to-p6 : OUTPUT«"\n" = ${'\\'} = '+';␤print('foo')␤»
|Tux| literal, what word? 14:13
literal takk
|Tux| norwegian
literal ah
14:13 anaeem1_ joined, kst```` joined
timotimo i believe "tak" or "takk" is also in swedish 14:13
|Tux| no idea how that has grown. I quite often say you're welcome and thank you in Norwegian. 14:14
timotimo, yes
literal takk is also used in Icelandic
14:14 anaeem1_ left 14:15 kst``` left
Kristien eyjafjallajökull 14:16
|Tux| ð is only Icelandic (in names) iirc
Ven google...
googles*. duh
literal þ too
Faroese actually uses ð too though 14:17
|Tux| wonders is ᚧ is also only Icelandic
.u ᚧ
yoleaux U+16A7 RUNIC LETTER ETH [Lo] (ᚧ)
literal looks like a runic version og Þ / þ
oh, actually, the name (eth) suggests it's Ð / ð 14:18
|Tux| 𐑃
literal Þ / þ is "thorn"
|Tux| I know
part of my job is dealing with diacriticals in european names
14:19 laouji joined
|Tux| still needs to check if iso-6937-2 can be ported to Encode 14:19
14:20 anaeem1 joined 14:21 anaeem1 left, anaeem___ joined 14:22 [Sno] left 14:23 laouji left 14:25 Kristien left, [Sno] joined 14:29 anaeem___ left 14:31 anaeem1 joined 14:36 salv0 joined, anaeem1 left 14:38 spider-mario joined 14:42 chenryn left 14:48 anaeem1_ joined 14:51 adu joined 14:52 anaeem1_ left 14:53 rmgk_ joined, rmgk is now known as Guest56222, Guest56222 left, rmgk_ is now known as rmgk 14:57 anaeem1_ joined
arnsholt literal/|Tux|: If you look at www.fileformat.info/info/unicode/bl...c/list.htm you see that it's clearly not a thorn, but of course derived from it 14:58
Which makes sense, since the distinction between voiced and unvoiced th has never been phonemic in Scandinavian (nor was it in proto-Germanic, IIRC)
|Tux| I see it in hexchat already :) 14:59
arnsholt It wasn't quite clear in my font =)
14:59 prevost left 15:02 anaeem1_ left 15:03 cognominal joined 15:04 ararara joined
dalek pan style="color: #395be5">perl6-examples: 1022c2d | paultcochrane++ | htmlify.pl:
Extract category perl file name determination into its own routine
15:05
pan style="color: #395be5">perl6-examples: 6c2560f | paultcochrane++ | htmlify.pl:
Use correct 'or' operator and non-capturing grouping
pan style="color: #395be5">perl6-examples: d06e416 | paultcochrane++ | htmlify.pl:
Ignore perl5 files in processing
pan style="color: #395be5">perl6-examples: 979f902 | paultcochrane++ | htmlify.pl:
Add progress output
pmichaud 07:55 <FROGGS> pmichaud / jnthn: ~~ is a noop (like .Str.Str), ?? is a noop (.Bool.Bool), but !! isnt... prefix:!! is identical to prefix:? 15:07
(already answered by TimToady++, but to add my comment): And keeping with the idea of "encourage the better usage", we should encourage people to use prefix:<?> over anything like prefix:<!!>.
If a programmer *really* intends to call prefix:<!> twice, it can be written with spaces as ! ! (expr) which makes the intent very clear and avoids the potential ambiguity with !! 15:08
to me, that somewhat puts it into the same category as "++" versus "+ +" and "--" versus "- -" 15:10
m: my $a = 5; say --$a;
camelia rakudo-moar 2247ea: OUTPUT«4␤»
pmichaud m: my $a = 5; say - -$a;
camelia rakudo-moar 2247ea: OUTPUT«5␤»
pmichaud afk, meeting
timotimo m: say !!"hi"
camelia rakudo-moar 2247ea: OUTPUT«True␤»
pmichaud timotimo: yes, I'm saying we should discourage that sort of programming, and make prefix:<!!> give a warning similar to prefix:<??> 15:11
15:12 kaare__ left
pmichaud really afk 15:12
nine_ m: say ??"hi"
camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/IBGKSsbIyY␤Expecting a term, but found either infix ?? or redundant prefix ?␤ (to suppress this message, please use space between ? ?)␤at /tmp/IBGKSsbIyY:1␤------> 3say ??7⏏5"hi"␤»
15:16 aborazmeh left
timotimo aye 15:17
15:21 adu left 15:22 raiph left 15:23 kst```` is now known as kst
ararara why ./perl6 -n -e "print $_;" appends me some TrueTrue ... ? 15:24
15:24 raiph joined
timotimo maybe $_ is being interpolated by your shell? 15:25
ararara right, replacing " with " solves the problem
'
timotimo :)
shells are hard :(
and when they break they often leave razor-sharp edges you can cut yourself with 15:26
masak ararara: welcome!
ararara :)
timotimo but i hear beaches made up of shells that have been ground to a fine powder are very comfortable and don't get terribly hot from the sunlight
masak: rt.perl.org/Ticket/Display.html?id=123888 - do you agree i should WONTFIX this? 15:27
[Coke] why should we not allow changing the input record separator? 15:29
timotimo $*IN.nl shouldn't necessarily change what $*ARGFILES does, right?
15:30 Ven left
masak timotimo: important question, I think, is "how *would* you do that?" 15:32
also, what made |Tux|++ reach for that solution? was it something that S28 suggested?
I think it's an excellent bug report, requiring something more than just WONTFIX 15:33
|Tux| thanks, I guess 15:34
|Tux| realizes how effective the few talks in Brussel have been 15:35
15:35 Ven joined
nine_ conferences++ 15:35
|Tux| in CSV I have to be able to overrule the EOL sequence (with whatever the user wants) 15:36
so chomp is out of the question
If the modules wants to do the least possible work, it is better to have perl6 itself know of the required EOL on bot input (parsing) and output (generation) 15:37
PerlJam does that matter so much with lazy reads and lazy lists and such?
|Tux| PerlJam, you ask me?
PerlJam I ask in general.
|Tux| in which case the answer is yes
timotimo masak: right, i'll give you a link to irclog in a sec 15:38
|Tux| I still need a speed improvement of a factor 1000 to get near the speed of Text::CSV_XS
timotimo masak: irclog.perlgeek.de/perl6/2015-03-03#i_10213736 and following
actually, not really "and following"
PerlJam Tux: so, this is about optimization?
timotimo just know this:
m: say $\ = "+" 15:39
camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jQ9bZRgdVJ␤Unsupported use of $\ variable; in Perl 6 please use the filehandle's .nl attribute␤at /tmp/jQ9bZRgdVJ:1␤------> 3say $\7⏏5 = "+"␤»
timotimo we're not suggesting to set $*IN.nl, we're asking the user to change "the filehandle's" .nl attribute
we may want to make $*ARGFILES easier to discover from this, however
AFK for a bit
|Tux| prefers .nl over .input-line-separator 15:40
ararara How do I do IPC in perl6 (example: ./perl6 -e '$a = open "ls |"; print $a.lines();') 15:41
?
masak timotimo: "tack" in Swedish. 15:42
& 15:43
PerlJam ararara: $a = open "ls", :p; print $a.lines();
15:44 Kristien joined
ararara PerlJam interesting; but what is :p a smile? 15:44
PerlJam :p == pipe 15:45
Kristien Foo walks into a bar, shouts "hello, world" and meets up with his friend Baz.
ararara the colon is smile context?
FROGGS it is an adverb, a pair 15:46
15:46 anaeem1_ joined
Kristien it's a Ruby symbol! 15:46
FROGGS m: say (:P).perl
camelia rakudo-moar 2247ea: OUTPUT«"P" => Bool::True␤»
rjbs What are NYIs ?
PerlJam rjbs: Not Yet Implemented?
15:46 Ven left
|Tux| NotYetImplemented 15:46
rjbs Thanks!
(It came up in p6weekly.)
FROGGS rjbs: that's funny (in both ways)... every P6er knows NYI I guess but not every P5er :o) 15:47
15:47 anaeem1_ left, anaeem1 joined
rjbs We have AIB instead. 15:48
AlreadyImplementedBadly
PerlJam heh
FROGGS hehe
15:48 anaeem1 left
Kristien heheh 15:48
|Tux| does not yet consider himself a P^er
|Tux| does not yet consider himself a P6er
ararara :p in that specific case is a pair of what ? 15:49
FROGGS ararara: of the letter 'p' as the key and 'True' as the value 15:50
m: say (:p).perl; say (:!p).perl
camelia rakudo-moar 2247ea: OUTPUT«"p" => Bool::True␤"p" => Bool::False␤»
ararara ah ok; understood
FROGGS m: say (p => True).perl
camelia rakudo-moar 2247ea: OUTPUT«"p" => Bool::True␤»
FROGGS m: say (:p(True)).perl 15:51
camelia rakudo-moar 2247ea: OUTPUT«"p" => Bool::True␤»
FROGGS there is more than one way to pair...
m: my $p = True; say (:$p).perl
camelia rakudo-moar 2247ea: OUTPUT«"p" => Bool::True␤»
|Tux| STOP RIGHT THERE!
FROGGS that one is especially handy to pass of variables as named arguments to routines 15:52
15:52 rurban left, anaeem1 joined
FROGGS because it "forces" you to give your variable the name of the param the routine expects 15:52
which gives consistency
15:53 Kristien left
PerlJam wonders if FROGGS overloaded |Tux|'s brain 15:53
|Tux| nah
FROGGS ararara: btw, the colon is a pair of dots... which is an easy way to remember the pair constructor syntax 15:54
hehe
probably not :o)
15:54 anaeem1__ joined
ararara FROGGS I think is an ok constructor syntax 15:54
do you use pairs a lot in perl 6?
FROGGS yes
15:54 anaeem1 left 15:55 anaeem1__ left
FROGGS though mostly in signatures I think 15:55
|Tux| next two challenges for me: allow *real* binary data in CSV (like JPEG images) and port the csv *function* including callbacks and filters
ararara if I open a pipe with :p how I define the direction?
PerlJam ararara: also, it might help to know that to open a file for reading, it's open $filename, :r; and to open a file for writing, open $filename, :w;
FROGGS PerlJam++ 15:56
PerlJam ararara: I'm not sure if you can combine :p and :r though (I haven't looked or tried it myself)
FROGGS for mind reading :o)
|Tux| github.com/Tux/Text-CSV_XS/commit/...31d2dfcc26 <= challenging
FROGGS PerlJam: that should work
PerlJam ararara: er, :p, :w in your case
FROGGS (I implemented it, or at least made it work)
PerlJam FROGGS: aye, I think it should, but I don't *know* that it will :)
ararara but shouddn't 15:58
this /perl6 -e '$a = open "ls", :p, :w; print $a.lines;'
works but should it work?
15:59 colomon left
PerlJam ararara: eh? 15:59
15:59 colomon joined
PerlJam ararara: It should work, but I wouldn't expect it to be too useful :) 16:00
FROGGS ararara: the :r and :w are ignored atm :o( 16:01
16:01 anaeem1_ joined
ararara its weird because in perl 5: perl -e 'open $a, "| ls"; print <$a>;' don't work 16:01
FROGGS ararara: so, you always get a pipe your process can read from
ararara FROGGS ok I understand 16:02
it's to be fixed
FROGGS aye
|Tux| :w opens for writing, lines(0 is reading => conflict
|Tux| heads for Amsterdam.PM
16:02 Patterner left 16:03 kshannon left, Patterner joined, djanatyn left, Kristien joined, larion left
Kristien I found this gem (pun intended): i.imgur.com/SkIpdv9.png 16:03
16:03 kshannon joined 16:04 larion joined
PerlJam Kristien: sorry, that's just unfair. 16:04
Kristien :[
PerlJam Know, if PHP were at the intersection, that would be another matter ;)
s/Know/Now/ 16:05
16:05 sqirrel joined, djanatyn joined
ararara Who is called Ruby ? 16:06
16:06 anaeem1_ left
ararara ;) 16:06
Kristien I heard Berlusconi uses Ruby, so it must be very good! 16:10
moritz this bashing of other languages is just boring and tired, IMHO
16:11 Kristien left
flussence let's not bring bash into this... 16:11
16:11 rurban joined, ararara left 16:13 Ven joined 16:16 dakkar joined
timotimo when i open "wc -l", :w, :r, :p; the program seems to start eating random keypresses from my repl 16:17
16:17 Ven left
PerlJam timotimo: did you expect it to do something different? ;) 16:19
timotimo if i open pipe a process with :w i expect to be able to write to its stdin with .say and stuff
16:19 skids joined
FROGGS timotimo: :w is ignored 16:20
(as of now)
timotimo 'k
i just read that
FROGGS and it is not a LHF to fix that IMO
well, perhaps it is... I already had a working implementation of all that stuff in my head :o) 16:21
geekosaur hm, I see :r :w :rw in there, not how they interact --- I'd suspect that with :w, :r only one of them wins
timotimo i wouldn't think so
let me look at the code and document it
16:22 Rounin left
timotimo there's a line $r = $w = True if $rw 16:23
so if you want rw, you can :r :w 16:24
16:24 pecastro left
geekosaur this should probably be documented, then 16:24
timotimo roger
FROGGS: i +1 your usage of the "json" type for the "raw" column in the reports table
geekosaur (I have the spec open and nothing is said about it. if I were to assume Unix then r, w, rw are different bit combinations in the same bitfield
FROGGS timotimo: it seems to be common format for things like that... that Pg supports that is a bonus I did not know in beforehand 16:25
geekosaur (although if you view it as individual bits you can get away with treating them as independent --- but other Unixy APIs treat them as incompatible)
timotimo we should be able to index (and report) by a raw's json field
FROGGS gtg, $wife needs $food
16:25 FROGGS left
PerlJam timotimo: perhaps documenting what *doesn't* work may be important too. :r :w and :rw may cause people to think :ra and :rp and :wp and other combinations also work. 16:26
timotimo oh, perhaps we should put an explicit *%args in there and warn?
PerlJam maybe 16:27
dakkar is there any case in which a %-sigiled variable gets assigned a Hash (or similar) type object? or can I assume %x will always be defined? 16:29
PerlJam dakkar: yes and no if I understand you correctly. 16:31
dakkar that may be the least helpful answer ever :))))
ok, let me ask about my actual issue, instead of going around it:
PerlJam you asked two questions, you got two answers
geekosaur ...also occurs to me that rw open of a pipe without putting each end in a separate thread is a deadlock condition waiting to happen, perhaps this should be warned about
PerlJam dakkar: yes, asking your *actual* question is always good ;)
dakkar sub foo(Hash:D $x); # $x will not be Hash 16:32
timotimo m: my %foo; say %foo.perl
camelia rakudo-moar 2247ea: OUTPUT«().hash␤»
dakkar sub foo(%x); # oops, %x can be Hash
timotimo you mean "can be (Hash)"?
which is how we spell type objects when it's not 100% clear from context
dakkar and I don't think there's any way of requiring an actual value
timotimo: ah, sorry, yes, thank you for that
simpler: foo(Hash:D $x) { $x.defined } # always true 16:33
foo(%x) { %x.defined } # can be false
16:33 zakharyas left
dakkar is there any way I can use %x *and* require it to be defined? 16:33
osfameron huh... why would it ever be false?
dakkar p6: sub foo(%x){%x.defined};foo(Hash) 16:34
camelia ( no output )
dakkar p6: sub foo(%x){%x.defined};foo(Hash).say
camelia rakudo-moar 2247ea: OUTPUT«False␤»
dakkar p6: sub foo(Hash:D $x){$x.defined};foo(Hash).say
camelia rakudo-moar 2247ea: OUTPUT«Parameter '$x' requires an instance, but a type object was passed␤ in sub foo at /tmp/tmpfile:1␤ in block <unit> at /tmp/tmpfile:1␤␤»
osfameron to the casual observer (well, me) that looks like a bug?
dakkar to me too
PerlJam dakkar: so ... sub foo(Hash:D %x) 16:35
dakkar PerlJam: isn't that a Hash of Hash:D ?
16:35 mephinet left
PerlJam oh. I see the problem. 16:35
timotimo that's right
16:35 mephinet joined
dakkar to the best of my (very limited) knowledge, there's no way for «my %a» to be undefined 16:36
timotimo you can of course sub foo(%argh where *.defined) { ... }
there is
dakkar timotimo: but that kills the optimised
s/d$/r/
timotimo correct
m: my %foo := Hash; say %foo.perl;
camelia rakudo-moar 2247ea: OUTPUT«Hash␤»
dakkar ah, binding! of course
osfameron but why would you want to be able to pass in a type object there?
16:36 alpha- left
timotimo we do "signature binding" 16:36
dakkar of course signatures are implemented via binding, I should have realised
timotimo osfameron: i think what dakkar is looking for is preventing anybody from passing a type object in there 16:37
dakkar exactly
and what I see is that a non-$ sigil is less useful than a $
which feels very much not-perl :/
PerlJam it's too bad something like sub foo(%x:D) doesn't work.
timotimo yeah, because :D is supposed to go on the type
i think we discussed this in the last few days
being able to specify definedness constraints without giving the actual type 16:38
m: sub foobar(%argh is Hash:D) { say %argh.defined }; foobar(Hash);
camelia rakudo-moar 2247ea: OUTPUT«use of uninitialized value of type Any in string context in any at src/Perl6/World.nqp:2038␤␤Unhandled exception: No exception handler located for warn␤ at <unknown>:1 (/home/camelia/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:prin…»
timotimo what the hell did i do? >_<
PerlJam you found a bug IMHO 16:39
dakkar at the very least, you found a LTA error message :/
timotimo ah
it's trying to tell me the trait "Hash:D" doesn't exist
geekosaur mm, did that go in? 16:40
m: sub foo (:D %h) { say %h.defined } foo(Hash); 16:41
camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Y3mtjGDGpl␤Malformed parameter␤at /tmp/Y3mtjGDGpl:1␤------> 3sub foo (:7⏏5D %h) { say %h.defined } foo(Hash);␤ expecting any of:␤ named parameter␤ formal parameter␤»
geekosaur guess not yet, or at least not in camelia
PerlJam geekosaur: is there a ticket for that in RT?
(is it specced?) 16:42
geekosaur I don't recall, just recall discussion that :D and :U ought to work that way
dakkar uh… would that be a defined value, or a hash of defined values?
(I'm reading it as the latter, same as Int:D %x)
timotimo a hash defined to carry defined values
PerlJam ah, it is specced: S06:945
synopsebot Link: design.perl6.org/S06.html#line_945
dakkar that looks like it would still accept Hash, but not {a=>Nil} 16:43
timotimo nope 16:44
it will not accept Hash
it will only accept Hash[:D]
(well ... would, if :D were implemented)
perhaps Hash[Any:D]
dakkar ok fine, but it still does not make % as useful as $ 16:45
timotimo m: sub foobar(%test!) { say %test.defined }; foobar(Hash)
camelia rakudo-moar 2247ea: OUTPUT«False␤»
timotimo sounds like we'll have to begin waiting for GodoToady
japhb .botsnack 16:46
yoleaux :D
09:11Z <lizmat> japhb: isn't that what you need to implement IO::Path.resolve ?
dakkar essentially, as things stand, I can't see any reason to use any sigil but $ for containers…
japhb lizmat: Yes, I needed that (thank you, that's indeed what I used on Moar). It's the JVM version that is missing (or did you fix that one recently and I missed it?) 16:47
timotimo m: sub foobar(Hash:D $foo => %bar) { say %bar.perl }; foobar(Hash)
camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/wVARNdKekz␤Preceding context expects a term, but found infix > instead␤at /tmp/wVARNdKekz:1␤------> 3sub foobar(Hash:D $foo =>7⏏5 %bar) { say %bar.perl }; foobar(Hash)␤»
timotimo m: sub foobar(Hash:D :$foo(%bar)) { say %bar.perl }; foobar(Hash)
camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NB3F_Unhsn␤Shape declaration with () is reserved;␤ please use whitespace if you meant a subsignature for unpacking,␤ or use the :() form if you meant to add signature info to the function's type␤at /t…»
timotimo m: sub foobar(Hash:D :foo(%bar)) { say %bar.perl }; foobar(Hash)
camelia rakudo-moar 2247ea: OUTPUT«Type check failed in binding %bar; expected 'Associative[Hash]' but got 'Hash'␤ in sub foobar at /tmp/z_aOExvP4K:1␤ in block <unit> at /tmp/z_aOExvP4K:1␤␤»
timotimo m: sub foobar(Hash:D :foo(%bar)) { say %bar.perl }; foobar({a => 1}) 16:48
camelia rakudo-moar 2247ea: OUTPUT«Type check failed in binding %bar; expected 'Associative[Hash]' but got 'Hash'␤ in sub foobar at /tmp/Gu9ZAf4QwP:1␤ in block <unit> at /tmp/Gu9ZAf4QwP:1␤␤»
timotimo :\
not correct
m: sub foobar(Any:D :foo(%bar)) { say %bar.perl }; foobar({a => 1})
camelia rakudo-moar 2247ea: OUTPUT«Type check failed in binding %bar; expected 'Associative[Any]' but got 'Hash'␤ in sub foobar at /tmp/WBRv8VBxnA:1␤ in block <unit> at /tmp/WBRv8VBxnA:1␤␤»
timotimo m: sub foobar(Any:D :$foo(%bar)) { say %bar.perl }; foobar({a => 1})
camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/15DiWGUDzr␤Shape declaration with () is reserved;␤ please use whitespace if you meant a subsignature for unpacking,␤ or use the :() form if you meant to add signature info to the function's type␤at /t…»
16:49 larion left 16:51 diana_olhovik left
dakkar I'm now quite confused… 16:53
timotimo just ignore my evaluations 16:54
they were misguided
since $foo in a signature is already "really" :foo($foo) in reality
dakkar what confuses me is that Hash does not bind to Associative[Any] 16:55
why not? it was explained to me why [1] does not bind to Array[Int] (mutability, concurrency)
is there anything that is not a Any? 16:56
PerlJam Mu
timotimo it's required that the [Any] is actually specified 16:57
m: say (my %foo).of.perl
camelia rakudo-moar 2247ea: OUTPUT«Mu␤»
dakkar ah
16:58 rurban left
dakkar m: sub foo(Mu %x) {};foo({a=>1}) 16:58
camelia rakudo-moar 2247ea: OUTPUT«Type check failed in binding %x; expected 'Associative[Mu]' but got 'Hash'␤ in sub foo at /tmp/XVK4CehS5Q:1␤ in block <unit> at /tmp/XVK4CehS5Q:1␤␤»
dakkar 1) ???
2) why are literals typed with such lax types, instead of the narrowest possible one? 16:59
I mean, «1» is Int, not Mu, so why is «[1]» Array, instead of Array[Int]?
dakkar suspect he's missing the point of these type things… 17:00
timotimo because: 17:01
geekosaur perl 6 is more about gradual typing than about strict typing
timotimo you wouldn't be able to push a string into a hash that's been created with just an int in it
m: my %foo = { a => 1 }; %foo<b> = "hi"; # this would fail otherwise, no?
camelia rakudo-moar 2247ea: OUTPUT«Saw 1 call to deprecated code during execution.␤================================================================================␤%foo = itemized hash called at:␤ /tmp/xV3iVn5i_h, line 1␤Deprecated since v2014.7, will be removed with release v2015.…»
timotimo er, yeah
m: my %foo := { a => 1 }; %foo<b> = "hi"; # this would fail otherwise, no?
camelia ( no output )
dakkar timotimo: I'm talking about literals, not variables 17:02
%foo would still be a Hash
17:02 perl6_newbee joined
dakkar thing is, I can't declare a sub taking a «Int @a» and pass it a literal 17:02
it will never bind
timotimo OK, but then you'll get confusing behavior when you go from passing a literal to passing a variable, don't you? 17:03
and with methods we wouldn't be able to figure this out at compile time, either
PerlJam dakkar: If [1] would be Array[Int], what would [ 1, "foo" ] be and how would Perl know?
dakkar PerlJam: [1,"foo"] would be Array[whatever is the least common supertype of Int and Str] 17:04
timotimo it would be Cool, just use the tightest class that fits everything
dakkar exactly
it's a type lattice
PerlJam dakkar: It's much less work for both Perl and the humans to be least constrained there though. 17:05
dakkar I know it's less work
17:05 Kristien joined, mr-foobar joined
timotimo well, you can already override how literals are created 17:05
dakkar but most of these type annotations seem to get in the way of actually getting things worknig
timotimo github.com/FROGGS/p6-overload-constant 17:06
dakkar and I was under the impression that type annotations help the compiler and optimiser, and so should be liberally used
timotimo could perhaps be expanded to allow overriding of hash and array literals
17:06 andreoss joined 17:07 alpha- joined
timotimo actually ... 17:07
17:07 rurban joined
andreoss m: my $x := { 1 }; say $x.WHAT; say $x(); 17:07
camelia rakudo-moar 2247ea: OUTPUT«(Block)␤1␤»
andreoss why in repl this does fail?
timotimo right 17:08
[Coke] ... why would have an array of random shit that is all of a different type and then want to treat it as a strongly typed array?
that doesn't seem like a real use case.
timotimo you can just override circumfix:<{ }> locally
[Coke] just don't use types there, and you'll be fine.
dakkar [Coke]: uh?
I'd like to ensure, as early as possible, that a sub gets what it can handle 17:09
17:09 laouji joined
dakkar so I *want* to use types 17:09
and I want the call to fail if I pass something different that what is declared
[Coke] ok, so you're looking for Array[Int], not Array[Cool] ?
timotimo wouldn't even need a slang to override { } and [ ]
dakkar [Coke]: sure, but look:
m: sub foo(Array[Int] $x) {};foo([1]) 17:10
camelia rakudo-moar 2247ea: OUTPUT«Type check failed in binding $x; expected 'Array[Int]' but got 'Array'␤ in sub foo at /tmp/Kmdvqr4CxD:1␤ in block <unit> at /tmp/Kmdvqr4CxD:1␤␤»
andreoss echo "my \$x := { 1 }; \n say \$x.WHAT; say $x()" | perl6 # fails
dakkar [Coke]: so I can't, in practice, use Array[Int]
andreoss echo "my \$x := { 1 }; say \$x.WHAT; say $x()" | perl6 # works
[Coke] Yes, I agree that should work. the Array[Cool] thread there raised flags for me. 17:11
andreoss s,$x(),\$x(),
[Coke] m: my Array[Int] @a = [1]; sub foo(Array[Int] $x) {};foo(@a); # does this work?
camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ckgFQ3ppQa␤Calling 'foo' will never work with argument types (Positional[Array[Int]])␤ Expected: :(Array[Int] $x)␤at /tmp/ckgFQ3ppQa:1␤------> 3nt] @a = [1]; sub foo(Array[Int] $x) {};7⏏5foo(@a)…»
timotimo andreoss: what does your shell do with that?
andreoss: REPL being VERY WEIRD when using := is known ;(
dakkar [Coke]: when I asked weeks ago, I was told that the signature has to match the actual type of the container being passed, because containers are mutable, plus concorrency 17:12
raydiak m: sub foo(Array[Int] $x) {}; foo Array[Int].new: 1; # this is now static type-checking works
camelia rakudo-moar 2247ea: OUTPUT«Type check failed in binding $x; expected 'Array[Int]' but got 'Array[Int]'␤ in sub foo at /tmp/lUo7y9dpla:1␤ in block <unit> at /tmp/lUo7y9dpla:1␤␤»
17:12 sqirrel left
dakkar raydiak: I know that *that* works 17:12
[Coke] m: my Array[Int] $a = [1]; sub foo(Array[Int] $x) {};foo($a); # does this work?
camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vIr9e9fQUH␤Calling 'foo' will never work with argument types (Array[Int])␤ Expected: :(Array[Int] $x)␤at /tmp/vIr9e9fQUH:1␤------> 3nt] $a = [1]; sub foo(Array[Int] $x) {};7⏏5foo($a); # does thi…»
raydiak or...doesn't work?
andreoss timotimo: ok. sorry for bothering
dakkar raydiak: oops! bug?
timotimo andreoss: i wish we could just fix it ;( 17:13
PerlJam Anything that says "expected 'Array[Int]' but got 'Array[Int]'" is clearly broken ;)
raydiak dakkar: problem is you're saying you want static type checking, but then you expect it to work dynamically
dakkar not quite. the literal «[1]» has a very static type
[Coke] there are several of those bugreported, I think "expected foo but got foo"
raydiak dakkar: yes, and it is Array[Any]
[Coke] yes, it's Array[Rat]. ;)
PerlJam heh!
17:13 laouji left, perturbation joined
TimToady [1] is not a literal 17:14
timotimo ohai TimToady :)
[Coke] I think if we can get raydiak's example working, that's at least making it possible, even if the syntax is verbose.
raydiak "expected 'Array[Int]' but got 'Array[Int]'" looks suspect :) 17:15
dakkar TimToady: is there any way to write a literal equivalent to Array[Int].new(1) ?
17:15 perturbation left
[Coke] I'm not sure a literal equivalent is going to compile down better than Array[Int].new(1). 17:16
PerlJam dakkar: BEGIN Array[Int].new(1) # ;)
dakkar ah ah ah :)
TimToady m: constant myliteral = Array[Int].new(1)
camelia ( no output )
TimToady m: constant myliteral = Array[Int].new(1); say myliteral.WHAT
camelia rakudo-moar 2247ea: OUTPUT«(Array[Int])␤»
TimToady m: constant myliteral = Array[Int].new(1); say myliteral[0]
camelia rakudo-moar 2247ea: OUTPUT«1␤»
dakkar not useful…
TimToady then don't use it ;) 17:17
17:17 bayprogrammer left
dakkar what's the incentive to declaring sub foo(Int @a), if calling it is so cumbersome? 17:18
timotimo dakkar: did you see my suggestion that you can lexically override circumfix:<[ ]> and circumfix:<{ }> to create maximally-tightly-typed list and hash literals?
dakkar timotimo: yes, and that can definitely help
moritz m: sub typify(::T, Array[T](Positional) \c) { c }; say typify(Int, [1, 2]).perl
camelia rakudo-moar 2247ea: OUTPUT«Unable to coerce value for 'c' from Array to Array[T]; no coercion method defined␤ in sub typify at /tmp/348zMrNLgN:1␤ in block <unit> at /tmp/348zMrNLgN:1␤␤»
PerlJam dakkar: you're making a giant leap from "it's hard to write literals of a specific type" to "it's cumbersome to call typed subs"
moritz m: sub typify(::T, *@args) \c) { Array[T].new(c) }; say typify(Int, 1, 2).perl 17:19
camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/MBXoIly7sk␤Missing block␤at /tmp/MBXoIly7sk:1␤------> 3sub typify(::T, *@args) 7⏏5\c) { Array[T].new(c) }; say typify(Int,␤ expecting any of:␤ new name to be defined␤»
moritz m: sub typify(::T, *@args) { Array[T].new(c) }; say typify(Int, 1, 2).perl
camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QK5afbayqd␤Undeclared routine:␤ c used at line 1␤␤»
dakkar PerlJam: I probably am. how would you call a sub foo(Int @a) ?
moritz m: sub typify(::T, *@args) { Array[T].new(@args) }; say typify(Int, 1, 2).perl
camelia rakudo-moar 2247ea: OUTPUT«No such method 'ACCEPTS' for invocant of type 'T'␤ in block at src/gen/m-CORE.setting:10795␤ in method new at src/gen/m-CORE.setting:10793␤ in sub typify at /tmp/ie376Tz3Bi:1␤ in block <unit> at /tmp/ie376Tz3Bi:1␤␤»
moritz :(
timotimo o/ moritz 17:20
dakkar PerlJam: (you can call it "a bad example" :) )
moritz has long told everybody in here not to use typed arrays (except for NativeCall stuff)
timotimo yeah :(
Kristien Morning. 17:21
b2gills jnthn: I think you broke ` ??? ` with github.com/rakudo/rakudo/commit/43e77a17dd
dakkar moritz: I'm coming to the same conclusion, but I like helping the compiler and the optimiser, and also having the language take care of validating my inputs
timotimo moritz: do you know when debian plans to upgrade to the next postgresql minor?
b2gills m: ???
camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/fZLPCCpzz1␤Expecting a term, but found either infix ?? or redundant prefix ?␤ (to suppress this message, please use space between ? ?)␤at /tmp/fZLPCCpzz1:1␤------> 3??7⏏5?␤»
PerlJam dakkar: my Int @blah; ... do stuff to populate @blah ... foo(@blah);
dakkar: possibly
TimToady there are several things that a type system wants to do here, not all of which we want to inflict on mere mortals 17:22
we could, of course, turn P6 into Haskell
moritz timotimo: no idea about debian, but apt.postgresql.org is usually pretty up-to-date
TimToady then we could have lazy types that know what they'll produce
timotimo moritz: just asking because of hack 17:23
TimToady at the expense of driving mere mortals mad
PerlJam TimToady: save that for a module :)
timotimo we have a column typed "json" and in 9.4 we could have indexed and compressed json cells :)
dakkar how ugly is this?
TimToady but in a mixed language like Perl, we would need the type system to tell us *when* to do the check
dakkar m: sub foo(Int @a) {[+] @a}; foo(my Int @=(1,2,3)).say
camelia rakudo-moar 2247ea: OUTPUT«6␤»
moritz timotimo: you're welcome to install postgresql-9.4. Just be warned that the storage format changes in incompatible ways between major pg versions, so you might need some migration 17:24
dakkar (also, why can I declare a lexical variable without a name?)
TimToady because it also has a value
which you're using 17:25
moritz because it's useful in some situation
s
dakkar "because it's useful" is a good enough reason for me :)
PerlJam dakkar: That's the answer for everything P6 does on purpose ... "because it's useful" :)
TimToady but there are always tradeoffs 17:26
and we're still feeling our way toward a useful type system for arrays and hashes
raydiak m: sub foo (@a is Array) {}; foo [1] 17:27
camelia rakudo-moar 2247ea: OUTPUT«use of uninitialized value of type Any in string context in any at src/Perl6/World.nqp:2038␤␤Unhandled exception: No exception handler located for warn␤ at <unknown>:1 (/home/camelia/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:prin…»
raydiak thought that used to work
moritz we could make types lists coercive, and for lazy ones die as soon as a non-coercible value becomes available 17:28
17:28 diana_olhovik joined
moritz *typed lists 17:28
dakkar I think I've found an idiom I can live with:
m: multi foo(@a) { foo(my Int @=@a) };multi foo(Int @a) {[+] @a};say foo(1,2,3)
camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_uNwWdVYYF␤Calling 'foo' will never work with argument types (Int, Int, Int)␤ Expected any of: ␤ :(@a) ␤ :(Int @a)␤at /tmp/_uNwWdVYYF:1␤------> 3 @=@a) };multi foo(Int @a) {[+] @a};say 7…»
dakkar m: multi foo(@a) { foo(my Int @=@a) };multi foo(Int @a) {[+] @a};say foo([1,2,3]) 17:29
camelia rakudo-moar 2247ea: OUTPUT«6␤»
dakkar m: multi foo(@a) { foo(my Int @=@a) };multi foo(Int @a) {[+] @a};say foo([1,2,3,"b"])
camelia rakudo-moar 2247ea: OUTPUT«Type check failed in assignment to '@'; expected 'Int' but got 'Str'␤ in method REIFY at src/gen/m-CORE.setting:10763␤ in method reify at src/gen/m-CORE.setting:9333␤ in block at src/gen/m-CORE.setting:9358␤ in method reify at src/gen/m-CORE.s…»
dakkar that gives me a type check at call-time, I can call it easily, and the optimiser might even eventually be able to throw away the extra call frame 17:30
17:30 molaf joined
timotimo moritz: do you know the haskell problem where lazyness can cause an exception to be thrown in an unexpected location? 17:30
that's kinda like what i expect typed lazy lists to feel like
17:31 alini left, perl4life left
moritz timotimo: we already have that in Perl 6 :-) 17:31
thilp rakudobrew+panda is broken because of the "???" problem mentioned by b2gills
because Shell::Command is using it 17:32
TimToady a Hindley-Milner type system can throw the error at compile time, but the user will probably not understand the error message
timotimo is looking forward to TimToady responding to the undefined %-sigiled thing in signature problem 17:34
dakkar ah yes 17:35
TimToady: I can say «sub foo(Hash:D $a)»; how can I say the same but with %-sigil name?
17:35 donaldh joined
TimToady perhaps :D is simply implied on @ and % 17:36
TimToady almost said implicitly implied...
timotimo it is not yet in rakudo
dakkar TimToady: that would be my preference, yes
otherwise I can't see any reason to use % or @ in a signature 17:37
TimToady "I can't see" is not a straight line that you should hand to me :P
the point of sigils is mostly not to be in signatures... 17:38
timotimo oh?
TimToady most of your code is not signatures
timotimo waits for someone to prove TimToady wrong 17:39
17:39 donaldh left
timotimo imagines code that's mostly signatures 17:39
[Coke] m: sub a($except?, $in?, $some?, @degerate?, %cases?);a(); 17:40
camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dQ956YFi8A␤Semicolon form of sub definitions not allowed except on MAIN subs;␤Please use the block form.␤at /tmp/dQ956YFi8A:1␤------> 3pt?, $in?, $some?, @degerate?, %cases?);7⏏5a();␤»
[Coke] m: sub a($except?, $in?, $some?, @degerate?, %cases?){};a();
camelia ( no output )
17:40 donaldh joined
TimToady even rosettacode.org/wiki/Pattern_matching#Perl_6 is less than 50% signatures 17:40
PerlJam yeah, but useful code needs to *do* something. Signatures aren't much about the doing.
dakkar most of my code is sub bodies
in which I'd like to use something more expressive that $ 17:41
s/that/than/
even for parameters
17:41 virtualsue left
PerlJam dakkar: then do so? 17:41
dakkar so that I can see if it's a Associative or a Positional or something else, without having to look at the signature
but if I do, I lose the ability to tell the compiler to reject calls with undefined values 17:42
PerlJam dakkar: See what TimToady wrote earlier about trade offs.
TimToady not if :D is implied, then you get it for free
dakkar TimToady: yep, that would make me happy :)
TimToady are you sure you wouldn't find something else to be unhappy about? :P 17:44
TimToady should not taunt people... :) 17:45
some of them might be happy fun balls...
timotimo well, should i implement % and @ sigiled parameters to imply :D on them?
PerlJam timotimo: forgiveness >> permission :) 17:46
TimToady and see what breaks
17:46 Kristien left 17:47 gfldex joined, pecastro joined
japhb Earlier someone mentioned that binding a % var to a Hash type object and then calling the routine that expects a defined hash would break that implication. 17:48
17:48 aborazmeh joined, aborazmeh left, aborazmeh joined
japhb m: sub (%a) { say %a.defined }; a(my %b := Hash); 17:48
camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GsCESOJSX4␤Undeclared routine:␤ a used at line 1␤␤»
japhb m: sub a(%a) { say %a.defined }; a(my %b := Hash);
camelia rakudo-moar 2247ea: OUTPUT«False␤»
TimToady either we enforce :D on the :=, or it's a DIHWIDT 17:49
17:50 tgt joined
TimToady or it enforces itself when you bind to the siggie 17:50
17:50 kjs_ left
PerlJam How often is someone going to do that? 17:50
17:51 sirdancealot joined
tgt Hi. rakudobrew build-panda is failing for me because "Expecting a term, but found either infix ?? or redundant prefix ?" on line 16 of ~/.rakudobrew/moar-HEAD/panda/ext/Shell__Command/lib/Shell/Command.pm 17:51
17:52 raiph left
timotimo yup, TimToady is going to fix that, tgt :) 17:52
tgt Ah, great, thanks :)
nine_ If I inline the subsets into the signatures I might break the 50 % barrier here: github.com/niner/Apache-To-Nginx/b...r/Nginx.pm
TimToady what am I fixing? 17:53
timotimo m: sub test { ??? }
camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/B4BKZxFA28␤Expecting a term, but found either infix ?? or redundant prefix ?␤ (to suppress this message, please use space between ? ?)␤at /tmp/B4BKZxFA28:1␤------> 3sub test { ??7⏏5? }␤»
TimToady looks like LTM is busted then
thilp irclog.perlgeek.de/perl6/2015-03-03#i_10215395 17:54
TimToady m: sub test { ???() }
camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pJGTKzXzPy␤Expecting a term, but found either infix ?? or redundant prefix ?␤ (to suppress this message, please use space between ? ?)␤at /tmp/pJGTKzXzPy:1␤------> 3sub test { ??7⏏5?() }␤»
timotimo oh, jnthn implemented that 17:56
i thought TimToady did that!
TimToady m: sub test { ??? "foo" }
camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/r2QZa4wdhJ␤Expecting a term, but found either infix ?? or redundant prefix ?␤ (to suppress this message, please use space between ? ?)␤at /tmp/r2QZa4wdhJ:1␤------> 3sub test { ??7⏏5? "foo" }␤»
17:57 fhelmberger left
timotimo got a whole bunch of spec tests from the async camp crash 17:58
but that's probably due to my moarvm changes
timotimo re-runs with clean moarvm 17:59
18:00 anaeem1_ joined 18:03 donaldh left
nine_ Has anyone of you ever seen such a strange bug? One of Inline::Perl5's tests failes with 'Could not find method "" of "Foo" object' but only when run from make test and only when that is run locally, not via ssh. Running the exact same command as make will execute gives an All tests successful. 18:03
dakkar nine_: random thought: locales? 18:04
or ttys
nine_ dakkar: exact same locales in both cases
dakkar those are the first things that come to my mind that would change between the cases you've said 18:05
flussence .bashrc/local::lib/perlbrew?
nine_ dakkar: they could not explain why prove -e 'perl6 -Ilib' t succeeds when called manually, but fails when called by make
PerlJam nine_: is it really method "" or is there some invisible character in there?
dakkar if you pipe the output through hexdump or similar, can you see if that is really an empty string?
(this is all blind debugging, right?) 18:06
18:07 aborazmeh left
nine_ PerlJam: seems to be method "". hexdump -C shows it as 20 22 22 20 18:08
flussence (having perlbrew in my ~/.bashrc has the interesting side effect of making my distro's package manager malfunction if I `su` without `-i`...)
dakkar flussence: gentoo? 18:09
nine_ It's the exact same error message I see with Inline::Python in a different test on a different machine. The only commonality is that both errors involve NativeCall callbacks back into Perl 6
flussence yep
timotimo damn, i think i did something bad
18:09 alini joined
timotimo Cannot call 'tap_ok'; none of these signatures match: 18:09
:(Any $s, Any $expected, Any $desc, Any :live($live) = { ... }, :D :emit(&emit), :D :done(&done), :D :after-tap(&after-tap), Any :timeout($timeout) is copy = { ... }, Any :sort($sort))
nine_ This bug being so fleeting, I'm quite sure it very much depends on the memory layout. And I guess the extra fork() when started from make is the difference. 18:11
18:12 Kristien joined
raydiak contemplates Array[Int](Positional) coercion 18:13
18:13 kjs_ joined, alini left
dakkar flussence: "sude emerge" DTRT, since sudo kills most env variables 18:14
nine_: ouch. that's going to be painful to hunt down 18:15
timotimo .o( not requiring definedness for & vars makes things work a bit better )
dakkar eats 18:16
dalek pan style="color: #395be5">perl6-examples: da5d586 | paultcochrane++ | categories/euler/prob003-lanny.p6:
[euler] reference attributes with exclamation mark
18:18
pan style="color: #395be5">perl6-examples: bece85b | paultcochrane++ | categories/euler/prob003-lanny.p6:
[euler] loop requires space before parenthesis
pan style="color: #395be5">perl6-examples: edb2023 | paultcochrane++ | categories/rosalind/tran-grondilu.pl:
[rosalind] add parens to slurp to avoid gobbling block
pan style="color: #395be5">perl6-examples: 3b0a512 | paultcochrane++ | categories/rosalind/trie-grondilu.pl:
[rosalind] wrap with MAIN and add default input
pan style="color: #395be5">perl6-examples: 79046c2 | paultcochrane++ | categories/rosalind/trie-grondilu.pl:
[rosalind] remove original perl 5 code

It was "commented out" with a (non-functional) =END statement anyway...
pan style="color: #395be5">perl6-examples: d0a303e | paultcochrane++ | categories/rosalind/trie-grondilu.pl:
[rosalind] Add short docs about TRIE problem
pan style="color: #395be5">perl6-examples: ac591b9 | paultcochrane++ | categories/shootout/regex-dna.p6.pl:
Replace bare say with .say
flussence dakkar: yep, I figured out how to do it after some painful trial and error a while back... though I wish gentoo didn't use env vars as a global state dumping ground so much in the first place. 18:20
(just to emphasize: `find /var/db/pkg/ -name 'environment.bz2' | xargs du -hc` here is 31*MB*!) 18:24
18:26 perl6_newbee left 18:27 raiph joined
timotimo gist.github.com/timo/8117a2702483aad36616 - this is what my changes to % and @ sigiled vars causes in the spec test suite 18:27
nine_ dakkar: even running make test from vim makes all tests pass again...
18:29 FROGGS joined
TimToady # Error: Cannot find method 'PRECURSOR' means you need to reconfig 18:31
(nqp change)
got: ':(Int $i, :D @stuff, Any $blah = { ... })' probably should not display the :D if it's implicit with @ 18:34
18:39 bayprogrammer joined
TimToady .tell lizmat yes, .pairup should interpolate hashes too, basically emulating list context, which means if we see an array at a key location, we should probably interpolate that too 18:42
yoleaux TimToady: I'll pass your message to lizmat.
TimToady s/list/flat/ 18:43
timotimo yes the display wants adjusted
18:44 dj_goku left
avuserow .botsnack 18:45
yoleaux :D
18:46 rurban left, tgt left
avuserow I'm backlogging, but I just filed RT123974 about memory usage issues with regexes. Hopefully the report helps. I appear to be able to make progress parsing using the JVM for the time being. 18:47
18:50 anaeem1_ left 18:53 dakkar left
timotimo will have new spectest results with re-built nqp (and also fixed signature .perl code) 18:54
but first: groceries
TimToady std: $/ = '+' 18:55
camelia std 28329a7: OUTPUT«5===SORRY!5===␤Unsupported use of $/ variable as input record separator; in Perl 6 please use the filehandle's :irs attribute at /tmp/T07D43Q15w line 1:␤------> 3$/7⏏5 = '+'␤Parse failed␤FAILED 00:00 134m␤»
TimToady STD catches that one
18:57 anaeem1_ joined, laouji joined
dalek pan style="color: #395be5">perl6-examples: 532afb7 | paultcochrane++ | htmlify.pl:
Reformat categories hash
19:00
pan style="color: #395be5">perl6-examples: 611ba26 | paultcochrane++ | README (2 files):
Rename README -> README.md
pan style="color: #395be5">perl6-examples: 8d2f751 | paultcochrane++ | README.md:
Reformat text in main README
pan style="color: #395be5">perl6-examples: 3cedd7f | paultcochrane++ | README.md:
Use leading-hash style markdown headings
pan style="color: #395be5">perl6-examples: a4478cc | paultcochrane++ | README.md:
Add rosalind to list of project categories
raydiak m: say 'alive' if(1) 19:02
camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/N3lbbFavIV␤Two terms in a row␤at /tmp/N3lbbFavIV:1␤------> 3say 'alive' 7⏏5if(1)␤ expecting any of:␤ infix stopper␤ infix or meta-infix␤ postfix␤ statement e…»
19:02 laouji left
raydiak ^ LTA error, had to look at yesterday's rakudo commit log to figure out what the TTIAR ecosystem fallout was about 19:03
nine_ I recompiled rakudo and the error went away :/ 19:04
raydiak something else which broke (at the same time, assumedly) but probably shouldn't have: github.com/tadzik/Template-Mojo/bl...ojo.pm#L30 19:05
also TTIAR
heh n/m I see the problem on that line :)
19:08 mtj_ left
tadzik hah, see timotimo? I should've ran that before merging :P 19:08
dalek rl6-roast-data: 43955b8 | coke++ | / (9 files):
today (automated commit)
timotimo ?
raydiak tadzik: since you're here I'll assume you don't need a PR for the simple fix on that line :) 19:09
tadzik github.com/tadzik/Template-Mojo/bl...ojo.pm#L30 has a TTIAR
19:09 dj_goku joined, dj_goku left, dj_goku joined, mtj left
timotimo told you 19:09
FROGGS good evening dear ladies and gentlemen 19:10
tadzik hah, so that's what you meant :P
moritz \o
raydiak hi FROGGS
timotimo haha
19:11 grettir joined
dalek pan style="color: #395be5">perl6-examples: e44b1b9 | paultcochrane++ | README.md:
Remove angle-brackets around urls
19:11
pan style="color: #395be5">perl6-examples: cf0861a | paultcochrane++ | README.md:
Convert "what you can find here" list into a table
FROGGS let's get back to jvm suffering /o/ 19:12
19:15 lizmat joined
lizmat .botsnack 19:16
yoleaux 18:42Z <TimToady> lizmat: yes, .pairup should interpolate hashes too, basically emulating list context, which means if we see an array at a key location, we should probably interpolate that too
:D
19:17 colomon left, Sqirrel joined
diakopter .botmunch 19:17
TimToady m: my @foo = <a b>; my %foo = @foo; say %foo
camelia rakudo-moar 2247ea: OUTPUT«a => b␤»
TimToady m: my @foo = <a b c>; my %foo = @foo, 'd'; say %foo
camelia rakudo-moar 2247ea: OUTPUT«a => b, c => d␤»
TimToady not sure .pairup needs to handle that one though 19:18
actually calling .flat would probably be slow
19:18 mohij joined, espadrine left
lizmat m: my @a = <a b c d>; @a.pairup.say # so this behaviour is wrong ? 19:21
camelia rakudo-moar 2247ea: OUTPUT«a => b c => d␤»
TimToady no 19:22
m: my @a = <a b c d>; (@a,'e','f').pairup.say
camelia rakudo-moar 2247ea: OUTPUT«a => b c => d e => f␤»
19:23 mtj joined
TimToady m: my @a = <a b c d>; ('e',@a,'f').pairup.say 19:23
camelia rakudo-moar 2247ea: OUTPUT«e => a b => c d => f␤»
dalek pan style="color: #395be5">perl6-examples: 8c84d8d | paultcochrane++ | README.md:
Add headings to the table
pan style="color: #395be5">perl6-examples: becfbc8 | paultcochrane++ | README.md:
Document how to build the examples web pages
TimToady lizmat: seems fine to me
m: my @a = <a b c d>; ($@a,'e','f').pairup.say 19:24
camelia rakudo-moar 2247ea: OUTPUT«===SORRY!===␤Odd number of elements found for .pairup()␤»
TimToady m: my @a = <a b c d>; ($@a,'e').pairup.say
camelia rakudo-moar 2247ea: OUTPUT«a b c d => e␤»
TimToady m: my @a = <a b c d>; ('e',$@a).pairup.say
camelia rakudo-moar 2247ea: OUTPUT«e => a b c d␤»
lizmat m: my @a = <a b c d>; @a.pairup.say; say @a # *sigh* ? 19:25
camelia rakudo-moar 2247ea: OUTPUT«a => b c => d␤␤»
FROGGS hehe 19:26
19:26 alini joined
TimToady er, upes 19:27
FROGGS m: say ... 19:29
camelia rakudo-moar 2247ea: OUTPUT«Unhandled exception: Stub code executed␤ at <unknown>:1 (/home/camelia/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15147 (/home/camelia/rakudo-inst-2/languages/perl6/runtime/CORE.setting.…»
FROGGS m: say !!!
camelia rakudo-moar 2247ea: OUTPUT«Stub code executed␤ in block <unit> at /tmp/ATfbQdAYO4:1␤␤»
FROGGS m: say ???
camelia rakudo-moar 2247ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WdfqPff3Wt␤Expecting a term, but found either infix ?? or redundant prefix ?␤ (to suppress this message, please use space between ? ?)␤at /tmp/WdfqPff3Wt:1␤------> 3say ??7⏏5?␤»
FROGGS std: say ???
camelia std 28329a7: OUTPUT«ok 00:00 135m␤»
FROGGS hups
is that known? 19:30
19:31 isBEKaml joined
timotimo tadzik: did you fix things or need me to fix my errors? 19:31
lizmat TimToady FROGGS: fixing
FROGGS lizmat++ 19:32
ahh, already was discovered erlier
19:32 colomon joined
FROGGS earlier* 19:32
dalek kudo/nom: 0acd74a | lizmat++ | src/core/Any.pm:
Make .pairup non-destructive
19:36
19:36 agentzh joined
lizmat FROGGS: my fixing applied to .pairup, not to say ... :-( 19:39
raydiak .tell ugexe github.com/ugexe/Perl6-Text--Leven...rau/pull/9
yoleaux raydiak: I'll pass your message to ugexe.
raydiak .tell retupmoca github.com/retupmoca/P6-XML-Canonical/pull/1
yoleaux raydiak: I'll pass your message to retupmoca.
FROGGS lizmat: you mean '???' ?
lizmat yeah 19:40
19:40 Kristien left
timotimo haven't we always wanted spaces after keywords to be required? 19:40
lizmat std: say ...
camelia std 28329a7: OUTPUT«ok 00:00 135m␤»
lizmat std: say ???
19:40 agentzh left
camelia std 28329a7: OUTPUT«ok 00:00 135m␤» 19:40
FROGGS I wonder if somebody is working on a fix for ???
timotimo aint
raydiak neither 19:41
TimToady is working on ???
LTM is picking prefix: instead of term: for some reason 19:42
FROGGS I guess is not the best way to fix it:
- token prefix:sym<??> { <sym> <.dupprefix('??')> <O('%symbolic_unary')> }
+ token prefix:sym<??> { <sym> <!before '???'> <.dupprefix('??')> <O('%symbolic_unary')> }
err, and even wrong...
19:43 tgt joined
TimToady no, LTM should do it right 19:43
looks like the problem is in termish, where we have <prefixish>* <term> 19:44
it's not allowing that there could be 0 prefixishes
19:44 telex left
FROGGS prefixishes *g* 19:44
timotimo gist.github.com/timo/8117a2702483aad36616 19:45
looking into the signature error tests now
b2gills m: say [[&({($^a,$^b).pairup})]] 'a'..'z'
camelia rakudo-moar 0acd74: OUTPUT«a => b => c => d => e => f => g => h => i => j => k => l => m => n => o => p => q => r => s => t => u => v => w => x => y => z␤»
FROGGS SCHMETTERLING!!!
timotimo perl6 -e 'sub foo(%h) { %h }; foo(1, 2);' 19:46
19:46 telex joined, brrt joined
timotimo Too many positionals passed; expected 1 argument but got 2 19:46
it seems like we expected something very different?
lizmat timotimo: a single hash ?
FROGGS well, you passed two positionals... 19:47
m: sub foo(%h) { %h }; foo(1, 2)
camelia rakudo-moar 0acd74: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RtXd_O5neG␤Calling 'foo' will never work with argument types (Int, Int)␤ Expected: :(%h)␤at /tmp/RtXd_O5neG:1␤------> 3sub foo(%h) { %h }; 7⏏5foo(1, 2)␤»
FROGGS m: sub foo(%h) { %h }; foo(1 => 2)
camelia ( no output )
timotimo oh
FROGGS m: sub foo(%h) { %h }; foo({ 1 => 2 })
camelia ( no output )
TimToady m: say ([[&({($^a,$^b).pairup})]] 'a'..'z').perl
camelia rakudo-moar 0acd74: OUTPUT«((((((((((((((((((((((((("a" => "b",).list.item => "c",).list.item => "d",).list.item => "e",).list.item => "f",).list.item => "g",).list.item => "h",).list.item => "i",).list.item => "j",).list.item => "k",).list.item => "l",).list.item => "m",).list.item…»
timotimo with my change we lost the compile-time analysis thingie
TimToady m: say ([=>] 'a'..'z').perl
camelia rakudo-moar 0acd74: OUTPUT«"a" => "b" => "c" => "d" => "e" => "f" => "g" => "h" => "i" => "j" => "k" => "l" => "m" => "n" => "o" => "p" => "q" => "r" => "s" => "t" => "u" => "v" => "w" => "x" => "y" => "z"␤»
TimToady Pair.gist should probably be smart enough to parenthesize a complicated key 19:48
timotimo i don't feel like chasing an issue in the optimizer's compile-time-dispatch-analysis :( 19:50
dalek kudo/definedness_for_hash_and_arr_sigil: b8a140d | timotimo++ | src/ (2 files):
make @ and % sigiled vars have :D by default

sadly messes up one test where the optimizer should have complained about an impossible call (S06-signature/errors.t)
19:52
tadzik timotimo: I fixed things :)
b2gills m: say ([[&({($^b,$^a).pairup})]] reverse 'a'..'z') 19:53
camelia rakudo-moar 0acd74: OUTPUT«a => b => c => d => e => f => g => h => i => j => k => l => m => n => o => p => q => r => s => t => u => v => w => x => y => z␤»
b2gills m: say ([[&({($^b,$^a).pairup})]] reverse 'a'..'z').perl
camelia rakudo-moar 0acd74: OUTPUT«("a" => ("b" => ("c" => ("d" => ("e" => ("f" => ("g" => ("h" => ("i" => ("j" => ("k" => ("l" => ("m" => ("n" => ("o" => ("p" => ("q" => ("r" => ("s" => ("t" => ("u" => ("v" => ("w" => ("x" => ("y" => "z",).list.item,).list.item,).list.item,).list.item,).li…»
skids 11.5.1.66.0 19:55
ww
wkb in fact 19:56
nine_ .seen jnthn 19:58
yoleaux I saw jnthn 13:06Z in #perl6: <jnthn> &
nine_ I think my heisenbug is a GC issue 20:00
timotimo doesn't seem very implausible
nine_ I managed to attach gdb before the error happens and can watch the method name being passed to MoarVM which creates an MVMString out of it and can catch it when it frees it again during garbage collection. 20:01
timotimo ouch 20:02
so it doesn't reference that original string or something?
nine_ No, the original string is just fine even after the error occurs.
The string is freed by MVM_gc_collect_free_nursery_uncopied so it seems just to be a case of MoarVM missing the reference to this string during GC 20:04
20:05 raiph left
TimToady testing a fix for prefix vs term LTM 20:07
20:08 larion joined
PerlJam I notice that Grammar.nqp still has pir::op and pir::const terms ... Should they be removed? 20:10
TimToady which apparently breaks so and not, hmm
PerlJam oh, and Q:PIR too
lizmat PerlJam: NQP is not supposed to be birdless just yet 20:11
ah, but Grammar.nqp in rakudo
hmmmm....
FROGGS yeah, rakudo should be birdless
PerlJam Was the birdless branch merged? 20:12
FROGGS we will not have pir ops in rakudo in future
PerlJam: was
lizmat +1 for birdless, I would say :-)
TimToady I'm guessing making prefixes and terms compete like they're supposed to is pitting "so" against "so " or "so(" somewhere
20:13 raiph joined
TimToady but I thought our approach to not() was probably wrong anyway 20:13
so prolly an excuse to fix that two
nine_ This is it happening: gist.github.com/niner/da27e8b68152c04b7936 20:14
20:14 anaeem1_ left 20:19 rmgk left 20:20 aborazmeh joined, aborazmeh left, aborazmeh joined
timotimo nine_: so we're missing a temporary root push or so? 20:20
20:20 virtualsue joined 20:21 Kristien joined, rmgk joined
nine_ timotimo: your words would make sense but I'm just starting to read MoarVM's GC code 20:21
mohij TimToady: Bugging again. /o\ gist.github.com/patzim/361b80a01e3217ad9073 <- I tried to pass state through my grammar using the Cursor. It's a miserable failure. I'd be grateful for a hint whether something like this is possible in Perl 6 (Did I just really ask that?). If yes, how I would go about finding out how? I prefer learning the good ways to learn instead of making others solve my problems...
yoleaux 01:43Z <TimToady> mohij: .made is only for passing values up the parse tree, so a subrule does not inherit its parents .made; you can only read the .made of a subrule after you've parsed the subrule. To pass info downward, you can parameterize subrules like ordinary methods.
timotimo it looks like after line 440 the address likely belongs to a different version of the nursery 20:22
mohij reads and processes...
20:23 rindolf left
mohij TimToady: Ok I think I understood that. So am I right, that it's impossible to pass information "sidewards" (i.e. so later non subrules)? 20:24
s/so/to/
20:28 bjz left
PerlJam mohij: if nothing else, you can make an appropriately scoped variable to pass info "sideways" 20:31
mohij Such a variable goes wrong if backtracking comes into play. 20:32
mohij feels like noone has ever tried such a thing.
Can I hook into the backtracker (just a random idea...)? 20:33
20:37 darutoko left
dalek kudo/nom: c9380e7 | PerlJam++ | src/Perl6/ (2 files):
remove Q:PIR, pir::op, and pir::const
20:38
20:43 oofer joined 20:44 oofer left 20:46 donaldh joined
dalek : 5e2b2f6 | usev6++ | misc/rt.perl.org/tickets_closed_parrot_only.txt:
Another four closed 'parrot only' tickets
20:47
[Coke] sees a lot of questions on #perl6 lately as new people come in, or lurkers speak up, and wonders "what are you people trying to do?" :)
mohij [Coke] is that @me? I do have a practical use case but didn't bother to explain yet.. It's kind of long... 20:48
20:48 aborazmeh left
arnsholt mohij: So basically, you want to check a condition in a subrule? 20:50
That's pretty easy with a contextual
dalek kudo/nom: aa62fde | TimToady++ | src/ (2 files):
make prefix properly compete with term in LTM

fixes ?? vs ??? also fixes prefix:<not> vs &not fixes #114210 fixes #65556
20:51
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=114210
Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=65556
mohij arnsholt: Not only subrule. Also a later rules not being subrules. 20:52
What's a contextual? 20:53
20:55 alini left
dalek ast: 0f47ac7 | TimToady++ | S03- (4 files):
so() and not() are now well-behaved functions
20:57
20:57 alini joined
PerlJam TimToady: In your commit that fixes ???, what's the special case for QSIGIL eq '$' for exactly? 20:58
TimToady postfixes work differently inside interpolatoin
*ion
and the $ check is for $foo vs @foo[] 20:59
PerlJam oh, I understand ... $ doesn't *need* postfix brackets but the others do. 21:00
TimToady hence the 0..1 quantifier on the postfix parse
PerlJam right. I wasn't quite putting it together until just now 21:01
TimToady didn't change that code, just moved it
jnthn Eek, sorry about the ??? bustage... 21:03
21:03 muraiki left
PerlJam anyway, TimToady++ That ??? thing was preventing a panda build for me :) 21:03
TimToady jnthn: it's okay, it pointed out more fundamental difficiulties
21:03 muraiki joined
TimToady *cult 21:03
FROGGS TimToady+++ # even :o)
TimToady there are probably some assertions we can remove from the grammar now that were artificially making up for lack of proper term vs prefix LTM 21:04
21:05 andreoss left
jnthn TimToady: Yeah, just seeing it led to a deeper fix. Nice. :) 21:06
avuserow [Coke]: dunno if your comment applied to me, but I'm trying to parse large old SQL data dumps from an old project and process it in various ways, primarily so I can store it in a more compact format 21:09
tony-o how do i stop the slang from parsing the file beyond the end of a line? using $$ seems to work on the Grammar.parse but not when i slang
21:09 isBEKaml left
avuserow [Coke]: if you're interested, I'm using Perl 6 (over my default of Perl 5) for this for a few reasons: fun, better type safety, grammars, and to get a feel for how rakudo is doing in these areas 21:12
21:12 donaldh_ joined 21:13 donaldh left
TimToady jnthn: dunno if you saw my remarks at irclog.perlgeek.de/perl6/2015-03-03#i_10211957 21:13
PerlJam avuserow++ you should blog about that :)
21:13 donaldh_ is now known as donaldh
jnthn TimToady: Yeah, I've pondered such things a little before too 21:13
TimToady: Thing is that we often *do* want the things we capture...
[Coke] avuserow: nifty 21:14
jnthn TimToady: So taking the current factoring and adding laziness is not likely, on its own, to be a win.
avuserow PerlJam: I want to, just trying to see what's feasible at this point
TimToady yes, but if the capture list is short, building a hash (and maybe a list) is wasted energy, since mostly each value is only used once
jnthn Yes, agree on the hash 21:15
[Coke] this channel knows CSy things. I have a system that can only process so much work at a time. I have a queue, but it are dumb. Any pointers for CS phrases to google that can give me some ideas?
jnthn Part of the problem there is that NQP doesn't have a particularly versatile way of defining list/hash access at the moment.
[Coke] is currently slogging through "queueing strategies."
TimToady and even trying to build the list is silly when we can know statically that there are not $0
jnthn TimToady: if we know that we just bind a singleton array anyway rather than allocating a fresh one. 21:16
21:16 muraiki left
jnthn [Coke]: Maybe you need some kind of backpressure? 21:16
21:16 muraiki joined
TimToady then why did that block take so much profiling time? 21:16
jnthn TimToady: Hard to say without digging into it more deeply. 21:17
[Coke] jnthn: aaaaand now I'm stuck in wikipedia. Will wave when I surface. :) 21:18
jnthn TimToady: But the work we do is proportional to the number of captures we might have + the ones we actually have
TimToady: Getting rid of the first cost might help. 21:19
timotimo "might have" as in "don't know if we will have or won't"? 21:20
"version" : "69.Ubuntu.SMP.Thu.Nov.13.17.53.56.UTC.2014", 21:23
i wonder where that 69 part comes from ... misparse of the uname?
ooooh 21:25
did you know less has built-in support for "follow"ing new additions to a file you're looking at?
also, it can alert you with a bell and stop scrolling when the search matches for the next time 21:26
PerlJam jnthn: Is that "captures we might have" because of all the times people use <ws> (for instance) but never actually look at the whitespace they've captured?
jnthn PerlJam: We usually call <.ws> but don't capture 21:27
PerlJam: But no, the thing I'm referring to is static vs dynamic
PerlJam oh, I see.
PerlJam is slow today
jnthn PerlJam: <foo>* is 1 static capture, but 0..* dynamic captures. 21:28
TimToady it also looks like .ws retests rather than remembering that we already did ws
jnthn Well, I'm tired and not explaining very well today :)
TimToady: Nope.
TimToady: Read method ws in Grammar.nqp
TimToady I did, but coulda missed something 21:29
timotimo ohmygosh
from within a running less, you can -S to chop long lines
TimToady oh, other method ws :)
21:29 grondilu joined
grondilu Hello 21:29
jnthn TimToady: iirc, spesh often ends up inlining quite nicely there too 21:30
TimToady k, I was probably remembering the one from QRegex
grondilu just noticed TimToady's tweak about prefix vs terms
jnthn *nod*
Yeah, we override that :)
grondilu notices that now:
m: sub prefix:<*>($) { "ok" }; say *pi, *;
camelia rakudo-moar aa62fd: OUTPUT«ok*␤»
TimToady is there any reason to keep a separate _ws rule? 21:31
other than one is a method and the other a token?
jnthn TimToady: Well, the original reason is that it's much cheaper for a method to do the fast check and quickly exit without creating a Cursor at all 21:32
TimToady: The "now I see what the optimizer does with it" answer is that the method that does the check is small enough to inline, whereas a full ws token with the check at the start would not be
timotimo i have a soft kitteh to scratch <3
FROGGS :D 21:33
grondilu (well you guys are obviously busy, but I just wanted to point out that now a possible 'my int *$p;' notation may not need a special character anymore.)
timotimo you can't put a sub or operator there anyway, can you? 21:34
jnthn timotimo: Envious. But hopefully I'll be able to have one in the not too distant future too :)
timotimo yay!
FROGGS grondilu: ahh, nice!
TimToady grondilu: what I did makes no change to that
timotimo i'm visiting friends quite often and they have two cats
these cats have adopted me :)
jnthn Ah, not yours :)
timotimo well, a cat is never "yours"
it's always the other way around
jnthn True ;)
FROGGS hehe
grondilu TimToady: I really thought the above say *pi, * used to fail, though. 21:35
FROGGS I am allowed to give the food
TimToady std: my int *$p;
timotimo you are expected to give the food, as well as attention
camelia std 28329a7: OUTPUT«5===SORRY!5===␤Multiple prefix constraints not yet supported at /tmp/2uabRablD1 line 1:␤------> 3my int 7⏏5*$p;␤Malformed my at /tmp/2uabRablD1 line 1:␤------> 3my int 7⏏5*$p;␤ expecting any of:␤ multi_declarator␤ typename␤Parse…»
FROGGS star-m: sub prefix:<*>($) { "ok" }; say *pi, *;
camelia star-m 2015.02: OUTPUT«5===SORRY!5=== Error while compiling /tmp/a074L52jd3␤Preceding context expects a term, but found infix * instead␤at /tmp/a074L52jd3:1␤------> 3sub prefix:<*>($) { "ok" }; say *pi, *7⏏5;␤»
TimToady std: my (int *$p);
camelia std 28329a7: OUTPUT«ok 00:00 137m␤»
nine_ jnthn: it seems like my heisenbug is caused by the GC collecting MVMStrings created for strings passed to NativeCall callbacks. Managed to catch it happening: gist.github.com/niner/da27e8b68152c04b7936
TimToady it's already legal syntax in a signature, but means something else
timotimo slurpy sigils? %)
er
slurpy scalars 21:36
jnthn nine_: Oh, interesting.
nine_: That gives me something concrete I can look into.
21:37 grettir left
donaldh NativeCall on ARM (raspberry pi) corrupts the parameters for calls with 5+ params 21:37
FROGGS eww
donaldh I'm guessing this will be a bug in dyncall 21:38
jnthn nine_: Hm, think I mebbe see it
FROGGS donaldh: hmmm, nativecall defines DC_CALL_C_ARM_* calling conventions... 21:39
donaldh meth(1, 2, 3, 4, 5) receives 5, 2, 3, 4, 51051312 21:40
and other such nonsense for longer arg lists :-)
lizmat decommute&
jnthn nine_: Please could you test if a moar with gist.github.com/jnthn/4799e0f52e7359680f6a workaround applied helps matters? 21:41
21:41 lizmat left
FROGGS donaldh: you could patch MoarVM to use another calling convention... 21:41
jnthn (It's not a good fix, but it lets me test a hypothesis)
grondilu is also confused about what happened to the "no time-travel rule" or something... 21:42
grondilu is confused but not alarmed, though. 21:43
donaldh FROGGS: not sure how to do that... 21:44
The raspberry pi 2 uses ARM hard float conventions, so maybe DC_CALL_C_ARM_ARMHF 21:45
FROGGS donaldh: adjust that line: MoarVM/src/core/nativecall.c:77: result = DC_CALL_C_X86_CDECL; 21:46
21:46 kaare__ joined
FROGGS donaldh: then make install on moar only and retest 21:46
21:48 kaare__ is now known as kaare_
nine_ jnthn: it may have helped. With the bug being so fleeting, I don't dare give a more definitive answer :( 21:48
timotimo nine_: yeah :(
21:48 colomon left
jnthn nine_: Ah, I thought you'd maybe got it reproducable-ish with a small nursery size set 21:51
21:51 isBEKaml joined
nine_ jnthn: quite contrary. Lowering the nursery size made it go away. Like so many other changes. 21:52
jnthn: I now reverted the patch and am seeing the bug again. As I could change quite much of the C code without affecting the bug, this gives me hope that you really are onto something.
timotimo you can change the nursery size in 64 byte steps or something
21:53 tgt left
timotimo github.com/rakudo/rakudo/graphs/traffic ← cute 21:57
jnthn nine_: OK, cool...I'll work on a real fix in that direction.
21:58 fhelmberger joined 21:59 dolmen joined
avuserow timotimo: I think that page might be limited to contributors, I just get redirected to github.com if I visit that one 22:02
22:02 fhelmberger left
timotimo oh 22:03
perhaps
ugexe should ARM processors show their bitwidth as the architecture? i.e. ARMv7 architecture is shown as '32', the bitwidth 22:06
yoleaux 19:39Z <raydiak> ugexe: github.com/ugexe/Perl6-Text--Leven...rau/pull/9
22:07 MadcapJake left, MadcapJake joined
FROGGS ugexe: testers.perl6.org shows $*KERNEL.arch // $*KERNEL.bits IIRC 22:07
ugexe: so .arch is probably not known by rakudo yet
22:08 colomon joined
raydiak has noticed much wrongishness in more than one of those fields 22:08
22:09 skids left
FROGGS raydiak: and the reason for that is that is was not used by anybody 22:09
ugexe FROGGS: ah ok. i didnt think it would be fair to 32bit x86 to flood testers with ARMv7 failures :) 22:10
dalek kudo/nom: abdd5cc | TimToady++ | src/Perl6/Grammar.nqp:
prefix always requires term, give better message
ugexe raydiak++: thanks for the pr. i had no idea
raydiak ugexe: you're welcome :) 22:11
FROGGS m: say $*KERNEL.arch # ugexe: does that report anything useful on your arm box?
camelia rakudo-moar aa62fd: OUTPUT«x86_64␤»
ugexe 'unknown' 22:12
FROGGS ugexe: and I guess `uname -p` is invalid? 22:14
22:17 cognominal left, laouji joined, ugexe_ joined
timotimo found a super serious memory leak!!!!! 22:17
22:18 donaldh left
ugexe_ uname -a's 2nd to last item (from uname -m) shows armv71 22:18
22:18 espadrine joined
timotimo when failing to resolve hostnames, we leak a single addrinfo struct 22:18
ugexe_ on a xeon machine it shows x86_64
m: say $*KERNEL.hardware 22:19
camelia rakudo-moar aa62fd: OUTPUT«x86_64␤»
ugexe_ maybe that should be the arch column value?
22:20 molaf left
jnthn timotimo: OH NOES. Please fix if you have time, or report it if not ;) 22:21
22:21 ugexe left, brrt left, ugexe_ is now known as ugexe, laouji left
timotimo i've fixed it in my branch 22:23
jnthn \o/ 22:24
timotimo jnthn: what tc->instance->* should i use for the bufs like the address buffer?
VMArray?
er, BOOTArray 22:25
710: MVMArray *res_buf = (MVMArray *)MVM_repr_alloc_init(tc, buf_type);
this seems the way to go, have the buffer type object passed in
jnthn timotimo: Normal convention there is to have the op give the caller a chance to decide on the result type. 22:26
dalek kudo/nom: 61f3f01 | FROGGS++ | src/core/Kernel.pm:
fix $*KERNEL.arch for raspbian, ugexe++
jnthn timotimo: That way there can be a Perl 6 type Address or whatever with VMArray REPR
timotimo fair enough, yeah
pyrimidine have to say, the amount of work I've seen on rakudo over just the last month is amazing. everyone++ 22:27
timotimo thanks :3 22:28
jnthn :)
FROGGS :o) 22:29
22:29 kjs_ left
FROGGS well, we have a goal to reach 22:29
dalek kudo/nom: 0f61164 | TimToady++ | src/Perl6/Grammar.nqp:
slightly more informative message
22:29 aborazmeh joined, aborazmeh left, aborazmeh joined
pyrimidine yeah, deadlines tend to do that :) 22:29
FROGGS TimToady: more informative than the commit message? :P 22:30
22:30 donaldh joined
FROGGS but... I dont wanna have an argument *g* 22:30
FROGGS gets silly when he is tired
TimToady is always silly, except when he's not 22:31
FROGGS *g*
raydiak FROGGS: btw istr you having a desire to use nativecall in more dynamic ways wrt loading...Inline::Lua is now a working example of applying nativecall entirely at runtime, complete with fallback (from LuaJIT to Lua 5.1 in this case), per-instance version switching, and is precomp-safe unlike my previous attempts (albeit with about a half-second startup penalty from my informal observations)
FROGGS raydiak: that sounds very nice! 22:33
raydiak: what I'd like to see is an easy way to fall back to another perhaps pure perl implementation of something when a lib is not installed 22:34
ugexe FROGGS: i think method arch should actually be called method processor (its name in uname). -m looks like it will show the architecture (the same values used in debian bug reports and cpan testers)
en.wikipedia.org/wiki/Uname#Examples 22:35
raydiak FROGGS: the dirty trick is it clones all the relevant subs and does run-time trait_mod:<is> on them for each Lua::Raw.new, which returns an instance you pass around and use for actual calls...so I just try to use it in a try {} at early runtime and fall back if it fails
ugexe notice uname -p can return stuff like 'Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz'
FROGGS ugexe: looking at that table makes me sad :o( 22:36
raydiak: I see
raydiak: I did know about the &trait_mod:<is>() trick though 22:37
ugexe FROGGS: the values under the Machine -m column all look correct though
FROGGS ugexe: except for some powerpcs
ugexe hmm wonder why they report those values 22:38
22:39 kjs_ joined
FROGGS probably just because 22:39
22:39 dolmen left
raydiak FROGGS: yeah that's one of the techniques I picked up reading over nine_++'s Inline::P work...getting it all together in the right shape for version switching and fallback and different concurrent versions was the part I had to play around with for a while 22:39
22:41 agentzh joined
TimToady m: sub prefix:<*>($) { "ok" }; say *pi, *; 22:41
camelia rakudo-moar 0f6116: OUTPUT«5===SORRY!5=== Error while compiling /tmp/P0uOrqBoqU␤Prefix * requires an argument, but no valid term found␤at /tmp/P0uOrqBoqU:1␤------> 3sub prefix:<*>($) { "ok" }; say *pi, *7⏏5;␤ expecting any of:␤ prefix or meta-prefix␤»
TimToady there we go
grondilu :/
22:42 kjs_ left
grondilu well, I'm sure you have your reasons for this, but I don't get it. 22:42
TimToady m: sub prefix:<*>($) { "ok" }; say *[42]; # what's this mean? 22:43
camelia rakudo-moar 0f6116: OUTPUT«ok␤»
nine_ Closing all those windows and tabs I realize: this has been a real hardcore debugging evening ;)
ugexe FROGGS: i think those OSX values are correct. seems like it starts up in 32bit kernel but can run 64bit code
nine_ jnthn: thanks for looking into this!
TimToady m: sub prefix:<*>($) { "ok" }; say * * *; # what's this mean? 22:44
camelia rakudo-moar 0f6116: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3Soqzj2NpD␤Prefix * requires an argument, but no valid term found␤at /tmp/3Soqzj2NpD:1␤------> 3sub prefix:<*>($) { "ok" }; say * * *7⏏5; # what's this mean?␤ expecting any of:␤ prefi…»
nine_ is calling it a. Good * #perl6!
TimToady we really cannot allow that kind of ambiguity
grondilu why can't it take the longest token matching, that is Whatever * Whatever ?
TimToady it did
raydiak \o nine_
FROGGS nine_: gnight!
ugexe so just the <arch> would be a odd value (i386), but the actual arch supported is in <hardware> anyway 22:45
TimToady that is not a token
22:45 agentzh left
grondilu oh maybe not indeed. 22:45
TimToady how far are you going to look ahead to resolve the ambiguity?
grondilu why not as fr as it takes? 22:46
*far
22:46 Kristien left
TimToady because that's too much dwimmery, the sort that forces people to play guessing games that they will lose far too often 22:47
japhb My thought would be "Because the reader needs to look that far ahead to figure out what they're currently looking at *also*, and that's reader-hostile."
TimToady the sort that will cause incorrect results without complaint
raydiak FROGGS: I was thinking about abstracting that work into another module, but...do you think nativecall will provide its own way to accomplish such a thing in the foreseeable future? if there are any plans you know of, I shouldn't bother with another module atm
TimToady japhb: that too 22:48
grondilu ok
FROGGS raydiak: I doubt that this will land in nativecall anytime soon
TimToady the smarter your compiler, the smarter you force the programmer to be
and we are not trying to just make it easy for geniuses to program
there are other languages for them 22:49
TimToady feels similarly about type inference, when taken too far
raydiak FROGGS++: thanks, I will think about the most useful way to expose it as a module for other modules, then :) 22:50
jnthn nine_: github.com/MoarVM/MoarVM/commit/47871fabbd is, hopefully, a real fix. 22:51
grondilu not completely sure it's related, but when looking at terms, the parser can keep in mind what he's parsing quite far though. 22:52
m: sub term:<die now and shut up about it> { die }; die now and shut up about it' 22:53
camelia rakudo-moar 0f6116: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hJQ7Pjx7Vl␤Two terms in a row␤at /tmp/hJQ7Pjx7Vl:1␤------> 3t> { die }; die now and shut up about it7⏏5'␤ expecting any of:␤ infix stopper␤ infix or meta-infix␤ state…»
grondilu m: sub term:<die now and shut up about it> { die }; die now and shut up about it
camelia rakudo-moar 0f6116: OUTPUT«Died␤ in sub term:<die now and shut up about it> at /tmp/QZf8XIJjBB:1␤ in block <unit> at /tmp/QZf8XIJjBB:1␤␤»
TimToady std: sub term:<die now and shut up about it> { die }; die now and shut up about it
camelia std 28329a7: OUTPUT«5===SORRY!5===␤Unable to parse term expression at /tmp/sTkGJu5n_a line 1:␤------> 3erm:<die now and shut up about it> { die7⏏5 }; die now and shut up about it␤Couldn't find final 'now'; gave up at /tmp/sTkGJu5n_a line 1:␤------> 3rm:<die now an…»
grondilu weird 22:54
raydiak m: sub term:<die now and shut up about it> () { die }; die now and shut up about it
camelia rakudo-moar 0f6116: OUTPUT«Died␤ in sub term:<die now and shut up about it> at /tmp/9HV000_Hco:1␤ in block <unit> at /tmp/9HV000_Hco:1␤␤»
grondilu unless that's an other bug you're about to fix
FROGGS raydiak++ 22:55
jnthn Oh, also, nine++ for doing the hard work in hunting that bug 22:56
(the one I just hopefully patched)
TimToady std: sub infix:<add now>($a,$b) { say $a + $b }; say 21 add now 21
camelia std 28329a7: OUTPUT«ok 00:01 145m␤»
TimToady coulda sworn it disallowed whitespace in operators 22:57
colomon that’s mildly disturbing.
jnthn haha
grondilu it surely is not the spirit of what you explained above.
jnthn Probably not hard to forbid it if we'd rather prevent such creativity :) 22:58
22:59 colomon left 23:00 sunnavy left
TimToady m: sub infix:<add now>($a,$b) { say $a + $b }; say 21 add now 21 23:00
camelia rakudo-moar 0f6116: OUTPUT«42␤True␤»
grondilu m: sub infix:<+ now>($a,$b) { $a + $b }; say 21 + now 21 23:01
camelia rakudo-moar 0f6116: OUTPUT«42␤»
grondilu ^I bet this is even more embarassing :)
m: sub infix:<+ ->($a,$b) { $a + $b }; say 21 + - 21 23:02
camelia rakudo-moar 0f6116: OUTPUT«42␤»
grondilu ^or this?
TimToady thing is, that's only kinda working by accident 23:03
m: sub infix:<+ ->($a,$b) { $a + $b }; say 21 + - 21
camelia rakudo-moar 0f6116: OUTPUT«42␤»
23:03 wicope left
TimToady m: sub infix:<+ ->($a,$b) { $a + $b }; say 21 + - 21 23:03
camelia rakudo-moar 0f6116: OUTPUT«0␤»
TimToady it only works because a list stringifies to containing a space 23:04
dalek p: d1b36db | timotimo++ | src/NQP/Optimizer.nqp:
turn an elsif into an if
p: 667a364 | timotimo++ | src/QRegex/P6Regex/Actions.nqp:
native type arg, because why not?
FROGGS m: sub infix:<example.com>($a,$b) { $a + $b }; say 21 example.com 21 # -.-
camelia rakudo-moar 0f6116: OUTPUT«42␤»
TimToady m: sub infix:<+ ->($a,$b) { $a + $b }; say 21 + - 21
camelia rakudo-moar 0f6116: OUTPUT«0␤»
TimToady m: sub infix:['+ -']($a,$b) { $a + $b }; say 21 + - 21 23:05
camelia rakudo-moar 0f6116: OUTPUT«===SORRY!===␤Cannot find method 'ast'␤»
TimToady m: sub infix:('+ -')($a,$b) { $a + $b }; say 21 + - 21
camelia rakudo-moar 0f6116: OUTPUT«0␤»
TimToady m: sub infix:«'+ -'»($a,$b) { $a + $b }; say 21 + - 21 23:06
camelia rakudo-moar 0f6116: OUTPUT«42␤»
23:10 petercommand left 23:11 aborazmeh left
jnthn *phew*, I thought we hard a horrible regression on CORE.setting parsing speed 23:15
But no, one of my chrome tabs had gone wild
TimToady m: sub circumfix:< A B C >($x) { say $x } 23:16
camelia rakudo-moar 0f6116: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yDYKGCvLWv␤Unable to identify both starter and stopper from A B C␤Perhaps you forgot to separate them with whitespace?␤at /tmp/yDYKGCvLWv:1␤------> 3sub circumfix:< A B C >7⏏5($x) { say $x }␤»
jnthn Or perhaps not! :P 23:17
TimToady m: sub circumfix:< A C >($x) { say $x } 23:18
camelia ( no output )
23:18 kaare_ left 23:19 gfldex left, kaare__ joined 23:20 BenGoldberg joined 23:26 colomon joined
dalek p: 2e5e413 | jnthn++ | tools/build/MOAR_REVISION:
Bump MOAR_REVISION for nativecall and BE fixes.
23:29
Ulti .tell dakkar re: irclog.perlgeek.de/perl6/2015-03-03#i_10215189 is this the sort of thing you wanted? sub foo(@list where Int ~~ all(@list.map({.WHAT}))) { say "YAY" }
yoleaux Ulti: I'll pass your message to dakkar.
dalek kudo/nom: 0701960 | jnthn++ | tools/build/NQP_REVISION:
Get latest NQP, for Moar with nativecall/BE fixes.

This hopefully resolves the Inline::Perl5/Inline::Python heisenbug.
23:36
Ulti .tell dakkar or maybe a bit simpler and efficient sub foo(@list where @list.grep({.WHAT !~~ Int}).elems == 0) { say "YAY"} 23:37
yoleaux Ulti: I'll pass your message to dakkar.
23:38 FROGGS left 23:41 virtualsue left 23:45 yullha joined, sirdancealot left
yullha I have the impression that perl 6 doesn't support the unix phylosophy 23:45
timotimo "everything is a file"?
23:45 cognominal joined
yullha no, i mean that it doesn't respect other tools 23:46
timotimo it disrespects tools?
yullha yes
want to do all on his own
reinvent 1000 wheels
timotimo perl has always been a glue language; have you seen how Inline::Perl5, Inline::C, Inline::Python and Inline::Lua work? :)
yullha was something that perl 5 didn't
exactly 23:47
but perl 6 feels different in regards
timotimo can you give a few examples?
yullha how do you create a zip file in perl 5? I would do with a pipe. 23:48
s/zip/gz
timotimo what if you're on windows, though?
yullha been long time I'm not there and there is a reason 23:49
timotimo that's actually a problem we have and one we had to fix
because we want to be able to take distributions off of cpan
yullha I understand it may be a problem for you
timotimo those are gzipped, IIUC, and tarred
jnthn yullha: Uh, Perl has, in general, always been a big tool trying to do it all.
23:51 donaldh left
yullha it has always been unix centered 23:51
23:52 aborazmeh joined, aborazmeh left, aborazmeh joined
timotimo i don't think you'll get very far denying the existence of windows ;) 23:52
raydiak was gonna say..."don't care cuz I'm not on Windows" is hardly an approach that designers and implementors can afford to take for anything meant to be widely adoptable 23:53
yullha making program portable is useless for most perl uses
timotimo then you're not thinking big enough :)
yullha perl excels on server and on data parsing for me and it wouldn't work in any case 23:54
raydiak your uses and your platform are not the only ones...
afk &
timotimo you don't have to port a program to windows to have a use for perl on windows
you can also be on windows, need something that perl is good at, and just write a perl script or program on windows
in any case, we're not looking to limit ourselves and our users to any singular niche 23:55
alpha- at which version does perl evolve into lisp 23:58
23:58 fhelmberger joined
jercos when we get rid of all the "th"s presumably. 23:59