»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by lichtkind on 5 March 2010.
snarkyboojum jnthn: very true.. 'pussy-cat' is a common one from my parents generation ;) 00:00
00:02 xabbu42 left
snarkyboojum question about rakudo * on p6l :) 00:02
00:03 REPLeffect left, REPLeffect joined
jnthn snarkyboojum: "duck" was one that sounded a tad random to me :-) 00:04
masak I'll let pmichaud answer that p6l question. 00:05
snarkyboojum jnthn: ah, the english are so creative with their language :)
00:05 lest_away is now known as lestrrat
masak the release guide suggest that at this point, one celebrate with the appropriate form of fun. I think I'll go for the 'sleep' option. :) 00:06
see you tomorrah, #perl6. 00:07
00:07 masak left
snarkyboojum masak o/ 00:07
00:08 supernovus left 00:11 yinyin joined
arnsholt Hmm. I think I may actually start to understand how EXPR works 00:12
00:14 REPLeffect left 00:15 REPLeffect joined
sorear My hat goes off to this Aaron Sherman guy. 00:17
Not many people can edit compiler output.
00:17 alester left
sorear Even fewer can fail to notice that it's obviously not meant to be edited. 00:17
jnthn sorear: To be fair, at one point a lot more of Rakudo, and the grammar engine, when in PIR than are today. 00:20
But yes, the code does have a quite generated feel. :-)
sorear Hand-written PIR tends to have named variables, comments, and non-uniform whitespace 00:21
He had none of these luxuries
00:25 REPLeffect left, REPLeffect joined 00:33 Sarten-X joined 00:38 azert0x left 00:40 masonkramer_ joined, masonkramer left, masonkramer_ is now known as masonkramer
[Coke] If you need a grant manager, I can volunteer. 00:44
(and that was before I saw "little to do"! =-) 00:45
what's this about editing the generated nqp-rx files? 00:49
I fail to see a commit...
00:51 dju left
jnthn [Coke]: It was a patch on p6l 00:59
Sleep o/ 01:01
[Coke] jnthn: ahhhhhhhhh
o/
01:05 meppl left
whiteknight I've got a patch to make rakudo build on current parrot after the ns_func_cleanup branch merged. 01:05
github.com/Whiteknight/rakudo/commi...9f454a17d2
I don't know how to submit a patch on rt, so I'm posting it here
Tene whiteknight: you can mail [email@hidden.address] or I can mail that for you, if you'd prefer 01:06
whiteknight bah
Tene 'k, I'll do it
whiteknight no no no, I'm putting together an email
Tene ... that's good, because I just remembered that my email is currently hosed.
[Coke] ooh, I must have committed something. 01:08
[Coke] bets it was like 2 characters.
01:09 Visitor99 joined 01:12 Chillance left 01:15 eternaleye_ left 01:16 eternaleye joined 01:17 Visitor99 left 01:26 REPLeffect left, REPLeffect joined 01:35 yinyin left, yinyin joined
sorear I'm having this perverse desire to write a PAST code generator for STD.pm6 01:43
snarkyboojum patch to make the spectest progress graph update again (increases the default width of the generated graph) gist.github.com/443096 01:46
it's currently failing with 'Horizontal size too small at tools/progress-graph.pl line 112, <$f> line 756.' 01:49
of course this can be controlled via a command line switch, so perhaps it's unnecessary, either way I'm guessing rakudo.org/status doesn't specify the width via the cli
01:50 REPLeffect left, REPLeffect joined
snarkyboojum sorear: hopefully the libraries won't be too random :) 02:00
02:00 REPLeffect left 02:01 REPLeffect joined
sorear snarkyboojum: I don't follow 02:02
snarkyboojum sorear: a light-hearted comment on your p6l post
rakudo * will contain "Some random libraries" :) 02:03
cxreg so this now works: (^Inf)>>.say 02:08
02:08 TiMBuS joined
cxreg but it consumes ever-increasing amounts of RAM 02:08
an artifact of how iterators work currently?
02:12 plobsing joined
colomon no 02:12
>> is never lazy
cxreg sure it is
colomon sure it is not.
cxreg then why does it print output? 02:13
wouldn't it spin forever if not?
colomon ....good question
it's supposed to be eager....
cxreg in any case, "for 1..Inf { .say }" does the same thing
colomon ... which is also not supposed to work (yet) 02:14
cxreg i thought Pm's List refactor fixed it
02:14 ajs joined
colomon nope 02:14
cxreg well, something did :)
colomon I explicitly asked him that this morning.
cxreg i could bisect 02:15
but it would take a while, since building takes like 20 minutes
sorear cxreg: >>.say is always a mistake
do we have the compiler warning on that yet?
cxreg no
sorear: because of the possible parallelism, i know 02:16
sorear: i wasnt expecting sane output, just testng it
colomon huh.
oh, I'll bet it has to do with github.com/rakudo/rakudo/commit/96a...054503d96a 02:17
(for for, anyway)
sorear actually, hypers should be lazy
colomon so now maybe the input is lazy but the output is always eager
sorear well, streaming
02:18 synth left
sorear .say for (^1000)>>.expensive shouldn't wait for all the threads to finish before giving output 02:19
02:19 ajs left
sorear ditto (^1000)>>.expensive>>.cheap , cheap shouldn't wait for all the input 02:19
cxreg @birdy>>.cheap>>.cheap 02:20
colomon sorear: I just read it over, and I see no evidence its spec'd that way. 02:21
and: "To force non-lazy list processing, use the eager list operator" 02:22
"A variant of eager is the hyper list operator"
02:23 whiteknight left
sorear colomon: "should" in this context introduces a hypothetical tense 02:29
02:31 pronik`` joined 02:36 pronik` left
colomon anyway, cxreg, I think what you're seeing is that for now takes its input lazily, and then eagerly executes. 02:39
so unlike map, you can't use it to generate a lazy list -- it tries to generate all its results at once. 02:40
but you can give it an infinite list as input. pmichaud++
sorear TimToady: What phaser are subroutine definitions run in?
sub x {} === my &x; ??? { &x := ... } 02:41
02:42 Schwern left 02:44 ggoebel left 02:52 agentzh joined
pugssvn r31339 | colomon++ | [t/spec] Unfudge test that now works. 02:55
02:56 [mark] joined
dalek kudo: 28aaf32 | (Solomon Foster)++ | src/core/operators.pm:
If the generating Block in the series operator returns something undefined, the
02:57
03:02 stephenlb left 03:09 snarkyboojum left
ciphertext colomon: are you still working on the series operator? 03:23
lue
.oO(Is it just me, or do some of these assumptions contradict eachother, creating an impossible situation? www.kalzumeus.com/2010/06/17/falseh...ut-names/)
03:27 snarkyboojum joined 03:30 snarkyboojum left 03:31 REPLeffect left 03:32 REPLeffect joined, snarkyboojum joined 03:33 skids left
snarkyboojum seen carlins 03:35
buubot: seen carlins 03:38
buubot snarkyboojum: I don't think I've seen carlins.
sorear Sorry, I haven't seen carlins on #perl6
03:38 snarkyboojum left 03:41 REPLeffect left 03:42 REPLeffect joined 03:44 Visitor99 joined, Visitor99 left, Visitor99 joined 03:51 Visitor99 left, REPLeffect left 03:52 REPLeffect joined 04:02 REPLeffect left, REPLeffect joined 04:05 tedv left 04:11 snarkyboojum joined 04:16 snarkyboojum left 04:23 snarkyboojum joined 04:24 synth joined 04:33 REPLeffect left, REPLeffect joined 04:44 REPLeffect left, REPLeffect joined
TimToady sorear: all named declarations are done at BEGIN time 04:46
04:50 kda left
pugssvn r31340 | lwall++ | [STD] don't count identifier extenders as part of longest token 04:52
04:54 REPLeffect left 04:55 REPLeffect joined
dalek kudo: 0b83903 | util++ | (13 files):
Fixed various typos in comments and error messages.
04:59
kudo: 712cba4 | util++ | src/core/operators.pm:
Merge branch 'master' of github.com:rakudo/rakudo
05:04 REPLeffect left 05:05 REPLeffect joined 05:12 kaare joined, kaare is now known as Guest43978, itz joined 05:25 REPLeffect left 05:27 REPLeffect joined
diakopter I love how gmail sends its own google alert email to Spam folder 05:34
05:36 orafu left, orafu joined 05:39 Su-Shee joined 05:46 ciphertext left 05:56 plobsing left, REPLeffect left, REPLeffect joined 06:06 REPLeffect left, REPLeffect joined 06:18 synth left 06:19 synth joined
moritz_ good morning 06:21
06:24 justatheory left
snarkyboojum moritz_ o/ 06:26
moritz_ \o
rakudo: say (a => 'b').flip.perl
p6eval rakudo 28aaf3: OUTPUT«"b\ta"␤»
moritz_ rakudo: say (a => 'b').invert.perl 06:27
p6eval rakudo 28aaf3: OUTPUT«Method 'invert' not found for invocant of class 'Pair'␤ in main program body at line 11:/tmp/bY4E972Gis␤»
06:27 eternaleye left
moritz_ masak++ # release 06:27
snarkyboojum rakudo: say %(a => 'b').invert
p6eval rakudo 28aaf3: OUTPUT«b a␤»
snarkyboojum %() still makes the REPL core dump :O 06:31
moritz_ :(
snarkyboojum or perl6 -e for that matter
06:35 REPLeffect left 06:36 REPLeffect joined 06:40 eternaleye joined
pugssvn r31341 | moritz++ | [t/spec] Pair.invert 06:42
06:50 eternaleye left 06:51 snarkyboojum left
dalek kudo: 717459e | moritz++ | src/core/Pair.pm:
Pair.invert
06:54
06:56 REPLeffect left 06:57 REPLeffect joined 07:01 snarkyboojum joined, eternaleye joined 07:06 REPLeffect left 07:07 REPLeffect joined 07:08 snarkyboojum left 07:09 snarkyboojum joined 07:10 Mowah joined
sorear Does a Perl6 compiler have to account for the possibility of someone saying eval '&fa' ~ 'il := 2' ? 07:10
and every fail call in the RTS suddentl being rerouted 07:11
er, := sub () {}
:= 2 would croak, 2 !.does Callable
pugssvn r31342 | sorear++ | [Cursor] Revert a bogus optimization; a horizon is always needed before things like quantifiers, the length that they match the LTM engine cannot control 07:13
07:14 yinyin left
sorear pmichaud: How does NQP handle lexer recursion? 07:14
07:15 yinyin joined 07:27 REPLeffect left, REPLeffect joined 07:28 yinyin left 07:29 tadzik joined 07:31 meteorjay left
pugssvn r31343 | sorear++ | [Cursor] \' also needs the metacharacter treatment. (How did this not cause a fatal error?) 07:31
moritz_ NQP doesn't have proper LTM 07:32
so afaict it doesn't autogenerate LTM-lexers from subrules at all (if that's your question, sorear) 07:33
07:33 yinyin joined
sorear yeah 07:34
so nqp only considers the syntactic prefix, gotcha 07:35
moritz_ just literal prefixes and <sym>
07:36 kensanata joined 07:37 REPLeffect left, REPLeffect joined 07:38 yinyin left, jedai left 07:39 lestrrat is now known as lest_away 07:40 yinyin joined 07:41 Schwern joined 07:46 Schwern left 07:47 REPLeffect left, Schwern joined 07:48 REPLeffect joined 07:52 pronik`` left
sorear std: my $x = *; sub infix:<quack>($z, $y) { }; * quack 5; 07:52
p6eval std 31325: OUTPUT«ok 00:01 109m␤»
sorear ok, it's a recent regression 07:53
07:53 yinyin left, mee joined
cognominal rakudo: say %( \( 1, (:a(2)), :b(2)) ).keys 07:55
p6eval rakudo 712cba: OUTPUT«ab␤»
07:55 Schwern left
cognominal I thought that (:a(2)) would end up as positional 07:56
moritz_ yes, it should
bug
cognominal will file
moritz_ cognominal++ # the new masak *SCNR* 07:57
cognominal masaker than masak is difficult.
SCNR?
moritz_ what massacre?
sorry, could not resist
07:58 jferrero joined
cognominal I updated my patch for Capture.perl to handle that case so I was surprised to see the result 07:58
the cloud is cloudy today, gmail does not want to send my bug :( 08:06
pugssvn r31344 | sorear++ | [Cursor] Remove a fossil of the old LTM which was causing operator definitions to break 08:07
sorear yay, I just fixed one of the biggest regressions in STD
pragma_ people keep using this word 'regression', but i'm not sure if they know what it means 08:08
08:08 REPLeffect left
moritz_ pragma_: what makes you think people don't know what it means? 08:09
08:09 REPLeffect joined
sorear The act of passing back or returning; retrogression; retrogradation. 08:09
The test which I speak of, I broke two days ago.
cognominal is this so rare a word in English? 08:10
moritz_ not in context of programming
08:11 dakkar joined
moritz_ where it is often used for "breakage of something that used to work", which is a valid use for "regression", because it is indeed a step back, in some sense and some dimension 08:11
08:11 sdo joined
mee I think people conflate regrestion-as-bug with regression-as-statistical-method 08:12
08:16 ejs joined 08:17 xabbu42 joined 08:18 REPLeffect left 08:19 REPLeffect joined, dakkar_ joined, dakkar_ left
moritz_ do they? I don't think I've ever observed it 08:19
sorear moritz_: would it be possible for me to help debug why STD hasn't updated yet? 08:20
cognominal BooK-- # pointe sur des blogs intéressants. 08:22
oops
moritz_ sorear: I can just run the rebuild, and nopaste you the output
pugssvn r31345 | pmurias++ | [mildew] optC is the default backend 08:23
r31346 | pmurias++ | [mildew] fix a bug happening while parsing multiple molds in the same run
r31347 | pmurias++ | [smop] the s1p/t/*.m0ld tests pass using mildew
moritz_ sorear: nopaste.snit.ch/21361 08:24
08:27 clintongormley joined
pugssvn r31348 | sorear++ | [viv] min is no longer used; don't generate it. Cuts STD.pmc load time from 3.35s to 3.20s 08:28
r31349 | pmurias++ | [smop] remove the old build system so that nobody gets confused
08:28 REPLeffect left 08:29 pmurias joined, REPLeffect joined
pmurias ruoso: smop built using Module::Build and using Mildew for processing m0ld passes s1p/t/*.m0ld tests 08:29
sorear moritz_: What Perl version is running on feather?
from the error message, it looks like my hack for getting at the Unicode databases is failing to find them 08:30
moritz_ sorear: mutiple... in the shell where I started it it picks up 5.12.1, but I think the cronjob uses 5.10.0 08:31
pmurias sorear: how different is the VAST from the boostraped STD from the one produced by the gimme5 one?
sorear pmurias: identical, modulo a few obscure bugs I had to fix 08:32
moritz_ yes, the cron job picsk up 5.10.0
same error 08:33
should I try to nuke src/perl6/ and try again?
sorear that's strange, because that error *would* be caused by running under 5.10 08:34
I would have thought 5.12 would fix it
is your /usr/local/bin/perl a 5.10? std uses an absolute path 08:35
moritz_ yes
sorear I'll fix that
in what ways is 5.12 available? 08:36
moritz_ well
sorear 'perl' in $PATH, usr/bin?
moritz_ I can make it the perl in $PATH
or I can change the symlink in /usr/local/bin/perl to point to /opt/perl-5.12.1/bin/perl
sorear yeah that should be enough to make it work 08:37
(excepting for chroot issues?)
moritz_ it's all in a chroot
moritz_ tries again 08:38
pugssvn r31350 | sorear++ | [STD/README] Bump dependency to 5.12, since we use undocumented interfaces to get direct access to the Unicode properties. Ideally we would maintain our own database, possibly set up by a Makefile rule. Patches welcome. 08:39
08:39 xabbu42_ joined, xabbu42 left, xabbu42_ is now known as xabbu42 08:41 thebird joined
pmurias sorear: what would i have to do to lower the dependency back to 5.10? 08:47
moritz_ std: 1
p6eval std 31350: OUTPUT«Use of uninitialized value in split at CursorBase.pm line 1828.␤Use of uninitialized value in split at CursorBase.pm line 1828.␤Use of uninitialized value in split at CursorBase.pm line 1828.␤Use of uninitialized value in split at CursorBase.pm line
..1828.␤===SORRY!===…
moritz_ maybe evalbot is still using 5.10
pugssvn r31351 | moritz++ | [evalbot] use perl 5.12.1 to run STD 08:49
08:49 REPLeffect left
sorear pmurias: find a reasonably fast way to access the Unicode properties of a codepoint that works on 5.10 and 5.12 08:49
08:50 p6eval left
sorear currently, STD slurps in Perl5.12's internal data files and then uses vec() 08:50
moritz_ uh, ouch 08:52
/usr/local/bin is in PATH before /bin/
and /usr/bin
so now the perl that's generally picked up is a 5.12.1
which doesn't have the modules installed needed for evalbot
moritz_ hopes that the few hundred dependencies (including POE) will install without problem 08:54
of course it doesn't 08:57
*sigh*
arnsholt Changing the user's $PATH might be easier? 08:58
moritz_ it might, if the process weren't hidden in diakopter's screen session :-) 08:59
moritz_ curses at GD::Graph 09:00
that's what's supposed to generate the graphs on rakudo.org/status 09:01
arnsholt su to root, su to diakopter and do it for him? O=) 09:02
09:02 REPLeffect joined
moritz_ however, it doesn't support subpixel rendering 09:02
and since pmichaud's last update to spectest-progress.csv there are more datapoints than the canvas is wide 09:03
thus failing to generate the graphic
I guess we'll have to switch to gnuplot variant permanently
pmurias sorear: wouldn't bundling those data files with STD work? 09:05
sorear pmurias: good idea, I'll do that. 09:08
jnthn morning o/ 09:09
09:09 p6eval joined
moritz_ m\orning 09:09
std: 1
p6eval std 31351: OUTPUT«ok 00:01 110m␤»
09:10 REPLeffect left 09:11 REPLeffect joined, Schwern joined
pugssvn r31352 | pmurias++ | [smop] all the tests use one harness 09:11
sorear Unicode::Properties::XS also looks maybe interesting 09:14
moritz_ rakudo: multi a ($) { }; multi a (Int $) { }; say &a.cando(\1).WHAT 09:15
p6eval rakudo 717459: OUTPUT«Method 'cando' not found for invocant of class 'Perl6MultiSub'␤ in main program body at line 11:/tmp/Az0YK8Vr6e␤»
pugssvn r31353 | sorear++ | [Cursor] We don't actually use the ability to attach multiple fates to a NFA node. -0.05s startup time
sorear um, epic fail 09:18
09:18 xabbu42_ joined, xabbu42 left, xabbu42_ is now known as xabbu42
sorear whoever was preparing Unicode::Property::XS forgot to include the .xs file in the MANIFEST 09:18
there is /no source code/ for this distribution
moritz_ ouch 09:19
sorear no binaries, either 09:20
09:21 REPLeffect left
moritz_ maybe mail the author 09:21
09:21 REPLeffect joined
jnthn moritz_: Yeah, I need to fix that .cando on multi thing 09:21
moritz_: It's not .cando itself, just a more general bug 09:22
sorear [email@hidden.address] ? 09:23
moritz_ it's worth a try
pugssvn r31354 | moritz++ | [t/spec] fudge regex-in-variable.t for rakudo 09:25
moritz_ jnthn: would .cando on a multi return the most specific match first? 09:27
jnthn moritz_: I don't think it's spec'd that way. 09:28
moritz_: I suspect at the moment it would not.
moritz_: If it needs to, I can fix that.
Or it's an easy-ish bit of C hacking if someone else wants to. 09:29
It would make sense.
moritz_ jnthn: it would make calling the right one of several MAIN multis much easier
well, not much actually
we could do .cando, and a normal dispatch if it succeeds 09:30
jnthn moritz_: Patch S06 if you like.
moritz_ it migth awesomeify error messages though
dalek kudo: 6ec1691 | moritz++ | t/spectest.data:
run one more test file (regex interpolation)
sorear mail sent 09:31
09:31 sorear sets mode: +v dalek, REPLeffect left, sorear sets mode: +v p6eval, REPLeffect joined
moritz_ jnthn: in your mental model, can a nextsame() result in an ambigous dispatch? 09:32
jnthn Yes 09:33
oh wait 09:34
jnthn slurps the coffee harder
moritz_: No
09:34 dual left
jnthn moritz_: It just makes a list of all the candidates that could work and moves through them. 09:34
pugssvn r31355 | moritz++ | [S06] order of candidates returned from .cando
moritz_ so the candidate list is actually a list, and not a more general graph
(the one that nextsame uses)
jnthn We build a DAG during the sorting, but the candidate list beyond that is just a list
And the one we work through for nextsame is just a list containing some (or maybe all in extreme cases) of the items from the overall candidate list 09:35
moritz_ I kinda expected the dispatch to provide a pointer into the DAG
jnthn Actually doing a topological sort destroys the DAG.
moritz_ and then nextsame advances that pointer to less specific candidates
jnthn We don't store the DAG at all in the long run.
We just store a sorted list. 09:36
And finding candidates for nextsame is like grepping that list to say "which things in this list match this capture"
moritz_ so how can you detect ambiguous dispatch efficiently? always check the next-specific candidate too?
so it seems my mental image of multi dispatch was still a tad wrong 09:37
jnthn moritz_: Ah, the list is a little more than a list
moritz_: We have a "marker" between each group of equally tied candidates.
moritz_ ah 09:38
jnthn So we consider up to the next marker and see how many matching candidates we have.
In my impl it's just a NULL
moritz_ so next time we get a NULL PMC access... :-)
jnthn And the real list end is two NULLs in a row.
No, it's a C NULL. :-)
You'll get a segfault.
But it doesn't happen. :-)
arnsholt I have a grammar with these two rules: token items:sym<last> { <EXPR> }; token items:sym<ht> { <EXPR> <.ws> '|' <EXPR> }
moritz_ :-)
don't 09:39
arnsholt Is a|b being parsed as a items:sym<last> a bug or a result of me not grokking LTM properly?
moritz_ first of all <.ws> terminates LTM, even in a perfect LTM implementation
secondly, rakudo only does LTM for literal prefixes and <sym> 09:40
arnsholt (The grammar is in nqp-rx, but I suspect that has the same limitation)
moritz_ right
you have to refactor into 09:41
<EXPR> [ <.ws> '|' <EXPR> ] ?
arnsholt Quite
Messes up my nice action methods, but oh well =)
moritz_ and remember that it turns $<EXPR> into an array 09:42
09:42 REPLeffect left
moritz_ yes, that's a shame (messed up action methds) 09:42
09:42 REPLeffect joined
arnsholt It's for Prolog lists, so I'll probably say $<car>=<.EXPR> [<.ws> '|' $<cdr>=<.EXPR>]? =) 09:43
moritz_ <car=.EXPR>
shorter
09:43 am0c left, xabbu42_ joined
snarkyboojum not sure if this is needed/wanted, but this is a patch to make the spectest progress graph update again (it's currently failing with a perl error) - irclog.perlgeek.de/perl6/2010-06-18#i_2452142 09:43
09:43 xabbu42 left, xabbu42_ is now known as xabbu42
Juerd Is whitespace not allowed around that =? 09:43
09:43 Schwern left
arnsholt moritz_: Oh, nice. I'll just go change all my grammars now =) 09:44
09:45 am0c joined 09:46 Zapelius joined
moritz_ arnsholt: please test first :-) 09:50
Juerd: dunno
sjohnson hi! 09:51
09:52 REPLeffect left, REPLeffect joined
Juerd I wonder if feather is actually still being used 09:54
moritz_ it is
09:54 yinyin joined
moritz_ feather1 for various screen sessions and websites 09:54
Juerd For more than just irssi and some other mostly-idle things...
It doesn't appear to be used much for compiling these days 09:55
moritz_ I think the pugs smokes were discontinued
Juerd Very understandable
pugssvn r31356 | sorear++ | [Cursor] Following a so-simple-I-feel-stupid suggestion from pmurias++, we now keep our own copy of part of the Unicode property database. As a fringe benefit, it's much more similar to the internal form and can be loaded in 0.1s less time.
arnsholt moritz_: The <x=.y> thing I don't think needs testing
Juerd It has 2,5 GB of RAM and the free memory number has not reached 0 in over a year now.
arnsholt The other solution needs a bit of work. But I think I should do that after work =)
jnthn Juerd: Well, if you really want somebody to change that... ;-) 09:56
Juerd Feather1 has had 1 GB of buffers+cache for months.
jnthn: I have to cut costs somehow, and decreasing feather's footprint would certainly help
jnthn Mostly I've used feather for irssi
Juerd I wouldn't mind keeping it in its current state if it actually needed it 09:57
But it looks like I could easily dial down the resources without anyone noticing it for the things that its being used for
moritz_ Juerd: I think feather2 is rather promising for cutting down
Juerd moritz_: In what way?
moritz_ Juerd: reducing footprint
it runs a few websites, but nothing really memory intensive, I'd guess 09:58
Juerd It's mostly idle, isn't it?
moritz_ right
sorear aaaand my mail to the PAUSE contact id of Unicode::Property::XS bounced
looks like it's ::ButWorks time
Juerd My current thougts are to buy a new machine and replace feather0, c10 and cow, three Xen dom0's
Put them all on one physical machine
moritz_ the only reason to have it in a separate VM is security concerns
Juerd Slightly shrink feather1 and 2's memory 09:59
moritz_ hugme runs on it, which needs to store github API tokens to work
sorear -> sleep
Juerd feather2 only has 350 MB :)
sorear hey, that's as much as my localhost 10:00
moritz_ oh, maybe there's not much to gain there by cutting memory :-)
Juerd 135 MB buffers, 63 MB cache, 97 MB free. That would mean it could run with a negative amount of memory! :)
moritz_ :-) 10:01
Juerd I guess there's some overlap between buffers and cache, perhaps.
Juerd doesn't know how that works, anyway.
arnsholt I think the answer goes along the lines of "Operating systems are hard, let's go shopping!" =)
Juerd Virtual ones are rather soft 10:02
arnsholt True, true
10:02 REPLeffect left
arnsholt But thinking too hard about virtual memory makes me go cross-eyed 10:02
10:02 REPLeffect joined
pmurias ruoso: ping 10:03
Juerd arnsholt: Not cross-brained?
10:03 Mowah left 10:04 Mowah joined 10:08 cosimo left 10:09 yinyin left 10:11 FardadJalili joined 10:12 REPLeffect left 10:13 REPLeffect joined, dual joined
FardadJalili consider @my-array an array of pairs. what's the difference between @my-array>>.key>>.chars and @my-array>>.key.chars ? 10:15
moritz_ the former returns a list of numbers, each of which is the number of chars of a key 10:17
the latter (if it works at all) turns the list of all keys into a string, and returns the number of characters therein
rakudo: my @a = <a bc>; say @a.chars 10:18
p6eval rakudo 717459: OUTPUT«4␤»
moritz_ ok, works
FardadJalili oh
so >>. return a list of keys itself
mathw yes 10:19
FardadJalili ok thanks a lot
mathw >>. calls the method on each element of the array
and gives back a list of the results
colomon phenny: tell ciphertext I've paused for the moment (on series), but I still have a list of things that need doing and a notion that this is a pretty good time to be doing them. 10:28
phenny colomon: I'll pass that on when ciphertext is around.
bbkr Kiev release! reminds me of my Kiev/Chernobyl trip :) time for testing... 10:31
tadzik MAIN sub <3 :)
jnthn bbkr: Heh, despite having been in Kiev three times I've still never been on a trip to Chernobyl. 10:32
10:33 REPLeffect left, REPLeffect joined
bbkr jnthn: it's one hour travel by bus from there, but you need to obtain pass first. remember to get Geiger meter, some places still have 20x radiation norm. 10:34
jnthn bbkr: Is it actually worth to visit? 10:35
tadzik rakudo: my %hash = foo => 'bar', val => 5; for (%hash.keys) { say "$_ -> %hash<$_>" } 10:37
p6eval rakudo 717459: OUTPUT«val -> ␤foo -> ␤»
tadzik why doesn't it work?
jnthn tadzik: You want %hash{$_}
10:38 am0c left
jnthn <...> is only for literal keys 10:38
It doesn't interpolate variables.
tadzik ah, I got it
so it's looking for an entry with '$_' key
?
jnthn Right. :-)
tadzik smart :)
10:40 snarkyboojum left
bbkr jnthn: worth every penny. despite the fact that it's the last chance to see old sarcophagus and chimney (they are building new one), you can also "travel back" in time to visit creepy remains of model-socialist town. I'm from Poland so I know how socialism looked like, but for outsiders who never been in soviet block it may be shocking. 10:41
10:42 tadzik left 10:43 REPLeffect left, REPLeffect joined
jnthn bbkr: *nod* I'll try and do it next time I find myself in Kiev. :-) 10:44
bbkr jnthn: I've managed to visit sarcophagus in Chernobyl, Pripyat school, pre-school, swimming pool, theater, ship bay, hotel, amusment park, outside Pripyat machines graveyard, death bridge, red forest before absorbed radiation went to dangerous level. i skipped to Duga systems (also known as Chernobyl-2) and Janow train station (STALKER players know what it looks like)due to high radiation. 10:49
10:50 pkkm joined 10:51 xabbu42_ joined, xabbu42 left, xabbu42_ is now known as xabbu42
bbkr rakudo: my @t=1,2; my %h; %h{@t}="one","two"; say %h.perl 10:51
p6eval rakudo 6ec169: OUTPUT«{"1" => "one", "2" => "two"}␤»
bbkr rakudo: my %h; %h{"12".comb(/(\d)/)}="one","two"; say %h.perl # test with GatherIterator 10:52
p6eval rakudo 6ec169: OUTPUT«{"1" => "one", "2" => "two"}␤»
bbkr yay! good job!
10:53 ggoebel joined 10:54 kensanata left, cosimo joined 10:59 cosimo left, cosimo joined 11:01 agentzh left 11:04 REPLeffect left, REPLeffect joined 11:06 Mowah left 11:07 Mowah joined 11:14 REPLeffect left, REPLeffect joined, Mowah left 11:17 Mowah joined
Zapelius Parrot Plumage is The Way to use perl6 modules? 11:21
11:23 REPLeffect left
moritz_ Zapelius: I've mostly used proto so far 11:26
Zapelius found proto too, but wasn't sure which one to use. will try it first. thanks moritz_ 11:27
11:35 ejs left 11:36 REPLeffect joined, envi^home joined
FardadJalili can you use .signature on methods? ( or, is split a method of Str class? ) 11:37
11:40 Trashlord left 11:43 REPLeffect left
moritz_ FardadJalili: yes, works on methods too 11:46
FardadJalili moritz_: how should I use it on Str's split then? something like this => say &some-sub.signature.params>>.name ~ ""; ? 11:47
moritz_ I guess the method is really in Any
rakudo: say Any.^methods.grep({.name eq 'split'}).signature.perl 11:48
p6eval rakudo 6ec169: OUTPUT«Method 'signature' not found for invocant of class 'List'␤ in main program body at line 11:/tmp/LM1lFEIlnJ␤»
moritz_ rakudo: say Any.^methods.grep({.name eq 'split'}).[0].signature.perl
p6eval rakudo 6ec169: OUTPUT«Method 'signature' not found for invocant of class ''␤ in main program body at line 11:/tmp/HSosAZOWa8␤»
moritz_ rakudo: say Any.^methods.grep({.name eq 'split'})
p6eval rakudo 6ec169: OUTPUT«␤»
moritz_ rakudo: say Any.^methods(:local).grep({.name eq 'split'})
p6eval rakudo 6ec169: OUTPUT«␤» 11:49
moritz_ rakudo: say Any.^methods(:local)
p6eval rakudo 6ec169: OUTPUT«pickflatanySeqminmaxdoesrotatejoincanreducereverselistisamapminmaxsortfirstgrepnonevaluesNumericelemsendStrallkeysuniqclassifypairskvoneACCEPTS␤»
moritz_ rakudo: say 'foo'.methods().join(" ")
p6eval rakudo 6ec169: OUTPUT«Method 'methods' not found for invocant of class 'Str'␤ in main program body at line 11:/tmp/GUqgLKvvQs␤»
moritz_ rakudo: say 'foo'.^methods().join(" ")
p6eval rakudo 6ec169: OUTPUT«pred Int l Bool succ encode Num WHICH perl s Str ACCEPTS d e f pred atanh cosec exp p5chop lc chars sinh to-radians acotan roots lcfirst sec asec trim cotanh trim-leading cis log sech log10 rand truncate sprintf bytes sqrt sin asin cosh succ sign asinh acosech abs uc ceiling
..unpola…
moritz_ rakudo: say 'foo'.^methods().grep({.name eq 'abs'}) 11:50
p6eval rakudo 6ec169: OUTPUT«abs␤»
moritz_ rakudo: say 'foo'.^methods().grep({.name eq 'split'})
p6eval rakudo 6ec169: OUTPUT«split␤»
moritz_ rakudo: say 'foo'.^methods().grep({.name eq 'split'}).[0]
p6eval rakudo 6ec169: OUTPUT«split␤»
moritz_ rakudo: say 'foo'.^methods().grep({.name eq 'split'}).[0].signature.perl
p6eval rakudo 6ec169: OUTPUT«get_attr_str() not implemented in class 'Perl6MultiSub'␤ in main program body at line 1␤»
moritz_ rakudo: say 'foo'.^methods().grep({.name eq 'split'}).[0].candidates>>.signature.perl
p6eval rakudo 6ec169: OUTPUT«(:(Mu : Regex $matcher, Any $limit = { ... }, Any :all($all);; *%_), :(Mu : Any $delimiter, Any $limit = { ... }, Any :all($all);; *%_))␤»
11:56 REPLeffect joined
FardadJalili moritz_: can I ask what does that ^ do in 'foo'.^methods() ? 11:56
11:56 dakkar left, agentzh joined
takadonet morning all 11:56
colomon o/ 11:57
takadonet how is everyone doing?
moritz_ FardadJalili: it's a method call on the meta class
FardadJalili: which handles introspection of Perl 6 objects 11:58
colomon takadonet: post-release grogginess here. :)
Zapelius plumage and proto both failed to install the Test -module :(
moritz_ Zapelius: there's a Test.pm shipped with rakudo
Zapelius plumage had a syntax error and proto failed to open something
really? :)
moritz_ yes, reallly 11:59
Zapelius runs find
moritz_ rakudo: use Test; plan 1; ok 1, 'a test';
p6eval rakudo 6ec169: OUTPUT«1..1␤ok 1 - a test␤»
11:59 xabbu42_ joined, xabbu42 left, xabbu42_ is now known as xabbu42
moritz_ it installed into $prefix/lib/$parrot_version-devel/languages/perl6/lib 12:00
*it is
Zapelius interesting. it's there now. before getting proto and plumage I was getting a "Unable to find module 'Test' in.." 12:02
anyway, it works now :)
moritz_ \o/
FardadJalili it seems perl6 does have a doc implemented in it's compiler :D. 12:03
moritz_ doc?
FardadJalili documentation
moritz_ not yet
12:06 xabbu42_ joined, xabbu42 left, xabbu42_ is now known as xabbu42 12:07 rv2733 joined 12:10 masak joined
masak oh hai, #perl6! 12:11
moritz_ oh hai masak
masak++ # release
mathw o/ masak
masak++
everyone++ # rakudo #30! wow!
colomon \o/
masak mathw: have you been a release manager yet?
mathw masak: no 12:12
masak mathw: consider trying it. it's easier than it might seem. :)
mathw I have considered it 12:13
I just have never got round to sticking my hand up
masak oh, that's easy too :)
moritz_ mathw: if you say "yes" now, I'll assign you for the August release
mathw Okay 12:14
I should be recovered from summer school by then
masak mathw++ 12:15
mathw and it's before my life goes autumn crazy like it seems to every year now 12:18
so \o/ for timing
12:18 pmurias left
moritz_ mathw: please submit a CLA if you haven't already 12:19
dalek kudo: efcf64d | moritz++ | docs/release_guide.pod:
mathw++ is our release manager for August 19th
mathw Yes I should do that
how?
moritz_ www.perlfoundation.org/contributor_..._agreement 12:20
12:20 xabbu42_ joined, xabbu42 left, xabbu42_ is now known as xabbu42
Zapelius rakudo: require "Foo.pm"; 12:21
p6eval rakudo 6ec169: OUTPUT«Could not find sub &require␤ in main program body at line 11:/tmp/LlLt21CYuf␤»
Zapelius rakudo: need "Foo.pm";
p6eval rakudo 6ec169: OUTPUT«Could not find sub &need␤ in main program body at line 11:/tmp/djwwmp2zNu␤»
moritz_ now that's strange; I'm quite sure that use is implemented in terms of need
rakudo: need Test; 12:22
p6eval rakudo 6ec169: ( no output )
moritz_ ah, only recognized as a syntactic form without the quotes
12:22 lest_away is now known as lestrrat 12:23 cognominal left
Zapelius how do I load a local module not in INC ? as quotes don't do 12:23
mathw moritz_: you'll have to remind me when I'm at home and can print it
or I might even remember (gasp)
moritz_ Zapelius: BEGIN { @*INC.push('path') }
12:24 REPLeffect left
masak rakudo: say (a => 'b').invert.perl 12:25
p6eval rakudo 6ec169: OUTPUT«"b" => "a"␤»
Zapelius moritz_, actually, the correct question is for libs, that contain just some classes, no module X {} -definitions
masak moritz_++
12:25 REPLeffect joined
masak Zapelius: modifying @*INC from inside the program should be a last resort, if you ask me. better to set PERL6LIB or use the -I flag to perl6. 12:26
Zapelius I could make them modules but that's just for testing so I feel kind of too lazy to do that.. :)
mathw rakudo: my %h = (a => 1, b => 2, c => 3); %h.perl.say; %h>>.invert.perl.say;
p6eval rakudo 6ec169: OUTPUT«{"c" => 3, "a" => 1, "b" => 2}␤(3 => "c", 1 => "a", 2 => "b")␤» 12:27
mathw \o/
12:27 cognominal joined, cognominal left
mathw and it demonstrates hash non-ordering too :) 12:27
(not to be relied upon)
moritz_ and also that .invert returns a list, not a hash
mathw (reliability especially void on the planet Earth) 12:28
moritz_: yeah but you could just cram it back in a hash afterwards
moritz_ right
or use hash.push
12:28 JimmyZ joined
mathw has a sudden vision of everyone getting together and chanting "There's more than one way to do it!" 12:29
moritz_ well, %h.push does something different that just cramming stuff into a hash
rakudo: m %h; %h.push: { a => 1, b => 2, a => 3}.insert; say %h.perl 12:30
p6eval rakudo 6ec169: OUTPUT«===SORRY!===␤Symbol '%h' not predeclared in <anonymous> (/tmp/ujewTehrdz:11)␤»
Zapelius got to go..
12:30 Zapelius left
moritz_ rakudo: my %h; %h.push: { a => 1, b => 2, a => 3}.invert; say %h.perl 12:30
p6eval rakudo 6ec169: OUTPUT«{"3" => "a", "2" => "b"}␤»
moritz_ uhm
rakudo: my %h; %h.push: { a => 1, b => 2, c => 1}.invert; say %h.perl 12:31
p6eval rakudo 6ec169: OUTPUT«{"2" => "b", "1" => ["c", "a"]}␤»
mathw oooooh
moritz_ that's what I wanted to demonstrate
mathw ooooooooooooh
that's even more awesome
masak mathw: we should totally have such a chant. 12:32
mathw masak: nah, we should have an entire song
masak wants to write one now
mathw go ahead 12:33
I'm useless at lyrics
12:35 REPLeffect left, REPLeffect joined
dalek kudo: 3da39cf | snarkyboojum++ | tools/progress-graph.pl:
Increase the width of the spectest progress graph
12:36
arnsholt nqp: sub h(*%h) { %h }; say(h('a' => 1)); 12:37
p6eval nqp: OUTPUT«Assignment ("=") not supported in NQP, use ":=" instead at line 1, near "> 1));"␤current instr.: 'parrot;HLL;Grammar;panic' pc 552 (src/cheats/hll-grammar.pir:205)␤»
arnsholt Bug?
moritz_ nqp: sub h(*%h) { %h }; say(h(a => 1));
p6eval nqp: OUTPUT«Hash[0xfceb50]␤» 12:38
moritz_ arnsholt: it seems nqp only supports the version of => with an identifier on the LHS
jnthn Aye, NQP doesn't know about pairs over than those that work as named arguments.
moritz_ arnsholt: the reason is that parrot has no native concept of pairs... what jnthn said
arnsholt Ah, right
jnthn So, not a bug as such, though it's an unhelpful error. 12:39
arnsholt In that case, I'll populate my operator hash the old-fashioned way
moritz_ arnsholt: that said, a patch to the parser which produces a more awesome error message would be appreciated
jnthn Aye
moritz_ do you have commit access to nqp-rx already?
arnsholt Yeah
Apparently someone gave it to me in Copenhagen 12:40
12:40 masonkramer left, masonkramer joined
moritz_ :-) 12:40
arnsholt Of course, I didn't notice until a few months later ^^ 12:41
masak "slowly pulled into a web of trust" :P 12:42
jnthn "caught in a web of trust" ;-)
masak ah, much better :) 12:43
moritz_ and s/pulled/dragged/ :-)
masak where were you guys yesterday when I wanted comments on the release announcement? :P 12:44
moritz_ nope, I went to bed shortly before
masak rakudo: subset IntOnAThursday of Int where { Date.today.day-of-week == 4 }; say 5 ~~ IntOnAThursday 12:45
p6eval rakudo 6ec169: OUTPUT«0␤»
masak \o/
12:45 REPLeffect left
moritz_ you're so evil. 12:45
12:46 REPLeffect joined
mathw hahaha 12:46
awesome
masak :>
should probably have named the type IntAndTodayIsThursday, though.
12:48 snarkyboojum joined
masak why is the numeric value of an enum the default when stringifying, by the way? I've been wondering that occasionally, and I'm sure there's a good reason, but I can't think of it. 12:48
snarkyboojum! \o/
if it were the name that was printed instead, my evaluation above would say "False" instead.
mathw I tend to think that the numeric value of an enum should be as hidden as possible, lest people start treating them like C programmers do
snarkyboojum masak-san! o/ 12:49
masak mathw: right.
in some sense, the string value is much more meaningful than the numeric value, which only has to be unique, but is otherwise arbitrary.
(actually, the enum mechanism doesn't even enforce its being unique)
moritz_ masak: you wondered about :: yesterday. It just means "parse the following bareword as a type name, even though you didn't declare it yet" 12:50
it's enough to declare it later (but still at compile time)
jnthn masak: In general, enum elements are just the value + some extra bits mixed in, or at least so far as I can follow.
12:50 Visitor99 joined
masak moritz_: ok. any special contortions needed to square that with its use as a type variable in signatures? 12:50
12:50 Visitor99 left, Visitor99 joined
masak jnthn: right, I get that part. but why can't we stringify to the name per default? 12:51
moritz_ masak: it's something I've long complained about (that type captures use the same syntax). It really feels like a unification of two concepts that aren't similar enough
in both case it's "it's a type", but apart from that they are quite different
12:52 dakkar joined
moritz_ one promises a type declaration, the other is a type declaration 12:52
but I haven't been able to come up with a better syntax for either
jnthn They look the same, but I think the way we get them parsed works out to be difference.
*different
masak: Well, if you had an enum whose underlying type was strings rather than ints...
masak moritz_: because in Date.pm, it's used once as a forward-reference, and once as a type restriction, even though the intent was probably forward-declaration both times.
jnthn: not what I meant. 12:53
jnthn ...then I guess things get a bit odd maybe.
masak: Maybe not, but it's still a problem.
masak jnthn: I meant for ordinary things like Bool. why do we print "0" rather than "False"?
jnthn Because Bool is an enum based on an integer type 12:54
mathw Does the leading :: mean perhaps "There is a type called..."
moritz_ masak: right. Line 89 is wrong.
pmichaud good morning, #perl6
jnthn morning, pmichaud
masak moritz_: it is, isn't it? what's the fix?
moritz_: actually, it's an excellent example of why your complaint matters. :)
morning, pmichaud!
moritz_ masak: the fix is to add a stub 12:55
12:55 Visitor99 left
moritz_ masak: class DateTime { ... } 12:55
masak ah, yes.
how sad. :(
moritz_ masak: because you can't use the other meaning of :: in a signature
12:55 REPLeffect left 12:56 REPLeffect joined
masak cognominal++ # RT ad libs! 12:56
13:02 Guest43978 left 13:04 synth left, synth joined 13:05 REPLeffect left 13:06 REPLeffect joined
masak std: loop (;;) {} 13:07
p6eval std 31356: OUTPUT«cannot open unicode maps: No such file or directory at CursorBase.pm line 1825.␤BEGIN failed--compilation aborted at CursorBase.pm line 1845.␤Compilation failed in require at Cursor.pm line 3.␤BEGIN failed--compilation aborted at Cursor.pm line 3.␤Compilation failed in require at
..S…
masak sorear: help! :/
JimmyZ he is sleeping 13:08
masak it's no real rush, I guess.
but something is broken now, it seems. 13:09
13:12 synth left 13:14 SmokeMachine joined 13:15 pkkm_ joined, xabbu42_ joined, xabbu42 left, xabbu42_ is now known as xabbu42 13:16 REPLeffect left, REPLeffect joined, pkkm left, pkkm_ is now known as pkkm 13:18 cognominal joined
dalek kudo: 3b87387 | pmichaud++ | docs/ROADMAP:
Update ROADMAP with new release date, completed items.
13:19
13:23 Trashlord joined 13:26 REPLeffect left, REPLeffect joined
masak Rakudo master doesn't do #=[] doc comments. can't say I miss them. but I'll have to rewrite Druid to temporarily not use them. 13:31
maybe that's a cue to work out a syntax that both vim and I can actually stand.
13:33 rgrau joined
pmichaud or we could add the #=[] comment form again :) 13:34
pmichaud looks.
masak for now, I settled on #= on the first line, and then # on subsequent lines. 13:36
pmichaud okay
masak vim likes it a lot better, and I think I like it too.
pmichaud but I think it's a 4-line change to enable #=[ ]
masak by all means, add it back. I'm changing this anyway.
pmichaud wfm 13:37
masak I'd rather work on S26 than live with a documentation syntax I don't really believe in :)
[Coke] p 13:39
13:39 Guest23195 joined
pugssvn r31357 | sorear++ | [STD-eco] uniprops needs to be treated as a compiler file and copied to snap (masak++) 13:40
masak sorear++ 13:41
13:47 perlygatekeeper joined, REPLeffect left 13:48 REPLeffect joined
masak I've been looking a bit at Haddock, seeing if there's something we can steal from that system of documentation. www.haskell.org/haddock/doc/html/ch03s02.html 13:48
Haddock uses '-- |' for a "before" documentation comment, and '-- ^' for an "after" documentation comment.
"after" seems to be an end-of-line comment on the same line as the declaration, whereas "before" is an end-of-line comment on the line before. 13:50
sorear often, but not always
haddock doesn't care about lines
only file positions
TimToady would like it ;)
masak :) 13:51
anyway, I think it's better than what S26 has now, which is basically guessing magic.
might be there are better symbols than '|' and '^'. 13:52
pmichaud can always do #| and #^ :-)
masak yes, that was the assumption.
(i.e. that's what I meant) 13:53
jnthn #^ and #v ;-)
Wish we had a non-alphanumeric downwards pointing char. :-)
masak aye.
sorear .u DOWN
phenny U+22A4 DOWN TACK (⊤)
masak it's a bit surprising that one is a \W and the other is a \w. 13:54
jnthn #/\ and #\/
;-)
pmichaud #↓
#↑
.u DOWNWARDS ARROW
phenny U+2193 DOWNWARDS ARROW (↓)
jnthn their heads are a bit small in my font
pmichaud #⇵
sorear .u TOP
phenny U+230F TOP LEFT CROP (⌏)
sorear .u BOTTOM 13:55
phenny U+230D BOTTOM LEFT CROP (⌍)
pmichaud #∧
.u LOGICAL OR
phenny U+2228 LOGICAL OR (∨)
pmichaud .u LOGICAL AND
phenny U+2227 LOGICAL AND (∧)
masak I think we should find solutions within ASCII, though.
pmichaud oooh, ascii
might be tricky
sorear | and ^ 13:56
masak so far, the "best" proposal is the original pair... aye.
sorear well, there had to be a reason haddock picked it
pmichaud #above and #below :-)
sorear std: 2+2
p6eval std 31356: OUTPUT«cannot open unicode maps: No such file or directory at CursorBase.pm line 1825.␤BEGIN failed--compilation aborted at CursorBase.pm line 1845.␤Compilation failed in require at Cursor.pm line 3.␤BEGIN failed--compilation aborted at Cursor.pm line 3.␤Compilation failed in require at
..S…
pmichaud or even #=above and #=below 13:57
PerlJam greetings
masak pmichaud: it's very clear, but I fear it's too long for same-line #=above comments.
pmichaud or choose better words for "above" and "below"
masak pmichaud: and in that case, the declaration isn't really 'above' either. 13:58
pmichaud so, what are the cases you're looking at?
14:00 rv2733 left
masak pmichaud: not really sure what you're asking. but all of the Pod documentation I had written for Druid was situated on the line above the method-or-attribute, IIRC. 14:01
pmichaud: for now, I've used '#= ' for those comments. since it doesn't mean anything, might as well. 14:02
jnthn Do we really need a way to say "this is a comment for the thing above me"?
pmichaud actually, the grammar does capture #= specially. 14:03
jnthn e.g. #= or something always means "this is a comment about the thingy on the next line"
pmichaud i.e., it goes through a different parse than a plain '#'
(the comment still ends at the end of the line, though.) 14:04
masak pmichaud: oh! right. if it parsefails, then I'll probably switch to '#| ' :)
pmichaud it should parse the same, as long as it's not #= + quote, like #=(...)
masak jnthn: a comment on the next line is probably not that common, no. don't recall what S26 says about that case.
jnthn: but a doc comment later on the same line can be really nice for attrs. 14:05
pmichaud: it's always '#=' and a space in my files.
so maybe I'll leave it in.
pmichaud I might want the comment on the next line if it's longish
e.g.
dalek kudo: d2add46 | pmichaud++ | src/Perl6/Grammar.pm:
Restore #=(...) comment syntax.
pmichaud has $.super-long-attribute;
#= used in the case when we need the convoluted whatathing 14:06
jnthn pmichaud: Why not write it on the line above?
pmichaud I might have a pattern where all of my attributes are followed by #=comments
wait, I said that wrong
example:
has $.x; # number of x's
has $.o; # number of o's 14:07
has $.someincrediblylongname
# some incredibly long description
14:07 patspam joined
pmichaud i.e., my pattern is that the comment comes after the declaration (either on the same line, or on a subsequent line) 14:07
masak I'm pretty sure it would be better to use one symbol for 'comment is before' and another for 'comment is after'. right now we don't distinguish, and that could probably cause subtle bugs.
pmichaud switching to putting it above the declaration would look weird in that case
masak pmichaud: aye. that's a good use case. 14:08
and it's "symmetric" as well, even if that particular case will probably be least used.
sorear masak: I completely agree
pmichaud I know that there are often times when I end up with a series of declarations where just one of them has a same-line comment that doesn't fit, so I have to figure out what to do 14:09
masak I'll look into whether a change to S26 would be non-problematic.
pmichaud if we have a special form for "comment what follows", then #= could potentially always be "comment what precedes" 14:10
and that could either be "same line" or "line above"
masak I think the current syntax ( '#=()' ) is heavy-weight, visually unappealing, hard on syntax coloring tools, and not well-integrated in other Perl 6 syntacitc constructs.
pmichaud given our discussion now, I'd hope that #=() would be "multiline comment what precedes" 14:11
(I'm unfamiliar with current spec)
masak it is.
it's a multiline comment of either what precedes or what follows.
pmichaud I think we should make it simply "what precedes" 14:12
and come up with a different symbol than = for "what follows"
masak I think we should kill off the #=() entirely.
sorear #| for follows
masak sorear: I like that.
pmichaud masak: I disagree about being not well integrated in othe Perl 6 syntactic constructs
jnthn I work regularly in a language that only lets me put doc comments before and I *just cope*. People always could do that. :-)
pmichaud the () uses the standard quoting pattern
[particle] well, = is unlikely to be the first character on a line, that's a reason it was chosen 14:13
pmichaud and a syntax highlighter already has to know about that
sbp why not #> for symbolically pointing to what follows?
(he says, not really following the conversation with full attention, sorry)
pmichaud masak: put another way, the syntax allows any bracketing character following the #=, not just (.
masak pmichaud: it doesn't. most other syntax highlighting misparses are bearable, even those involving quotes. this one isn't.
pmichaud okay, I'll rephrase. 14:14
The *grammar* allows any bracketing character following the #=
masak er. "it doesn't" as a reply to "the syntax highlighter has to know about that"
pmichaud doesn't a syntax highlighter need to know how to deal with q (...) ?
rakudo: say q (hello\nworld); 14:15
p6eval rakudo 3da39c: OUTPUT«hello\nworld␤»
masak pmichaud: I'm on a vim syntax highlighter here. don't know if it's Perl 5 or Perl 6.
pmichaud: it gets things wrong fairly often.
pmichaud: it gets #=() wrong consistently.
pmichaud masak: it's probably way out of date with respect to recent versions of the grammar
masak I know. 14:16
pugssvn r31358 | sorear++ | [Cursor] Clean up parse/parsefile/initparse a bit and plug some contextual leaks. Provide a reference argument for returning the used contents of a parsed file.
r31358 | [viv] Stop relying on no-longer-leaked $*ORIG.
pmichaud the syntax highligher could (should) be taught the perl 6 bracketing rules
masak it's not the only reason I hate the #=() construct.
even if I don't succeed in lobbying it out of existence, I probably won't use it in my code again.
pmichaud is it the parens you dislike?
14:16 pkkm left
masak pmichaud: yes. 14:16
sorear masak: it's a good thing you don't have to use #=(), then
pmichaud would another bracketing character work? 14:17
masak it is.
pmichaud: no.
pmichaud okay.
what *would* you like to see for multiline "I comment what precedes" syntax?
oh, I know! 14:18
14:18 REPLeffect left
pmichaud $has $.something; 14:18
PerlJam [10 years from now, masak is reading other people's Perl...] masak: Crap! There's that #=() construct again!
pmichaud #= this is the first line of my comments
#= this is the second line of my comments
#= all of these are commenting about $.something
has $.somethingelse 14:19
masak pmichaud: I'm almost doing that. but I figured I could leave out the '=' on subsequent lines.
14:19 REPLeffect joined
masak pmichaud: but I'm open on that point. doesn't really matter to me. 14:19
pmichaud if we keep it in there, it makes it clear that they're meant to be related
masak it's a *vast* improvement on #=() in any case.
14:19 jferrero left
masak pmichaud: yeah, you're probably right. 14:19
pmichaud omitting the '=' would mean "I'm starting a new comment"
or an otherwise unrelated comment
masak I'll change my Druid code to do '#|' everywhere :) 14:20
14:20 dakkar left, dakkar_ joined
masak (because my comments are before the declarations) 14:20
pmichaud then for consistency with #(...), we could allow #=(...) also
but it wouldn't be required
masak pmichaud: you mean #`()
sorear I happen to kind of like #> 14:21
pmichaud what does #`() mean?
PerlJam pmichaud: multi-line comment
masak pmichaud: it's the construct formerly known as #()
pmichaud oh, right.
okay, yes.
14:21 macdaddy joined
sorear #> or #|? 14:21
masak sorear: if we use #>, we'd almost have to use #< too 14:22
pmichaud I'd be okay with that.
er, no I wouldn't.
#< looks like it should be "bracketed"
has $.x; #< how many x's 14:23
although it does argue for arrows :-)
has $.x; #<= how many x's
#=> how many o's
has $.o;
has $.z; 14:24
#<= how many z's
(all of these end up with ='s in them, which is kind of nice in a pod-ian sort of way)
PerlJam pmichaud: << and >> in regex look like they should be "bracketed" as well but they needn't be. 14:25
pmichaud PerlJam: yes, I agree. Fortunately they're not common.
but looking at my first has $.x line above, I *really* want to put that closing > on it.
masak as visual pills go, '#<=' looks a bit odd. :) 14:26
pmichaud I agree, it does.
sorear fine, I'll accept #| almost as well
pmichaud I still think I like the #= and #| better
masak aye.
sorear #= and #| it is
pmichaud I could live with #>, but #< feels unbalanced to me
[particle] is that '#= ' and '#| ' ? 14:27
mathw #< feels okay to me because I'm used to //< which Doxygen uses
masak [particle]: don't know if we need enforce the space.
14:28 REPLeffect left
masak [particle]: but maybe it's a good idea for both esthetic and safety reasons. 14:28
pmichaud the challenge with #| is similar to the challenge with #{, though.
[particle] | is much more likely to be the first character on a line than =
especially with ||
pmichaud yes, what particle said
14:28 REPLeffect joined
pmichaud if someone is commenting out blocks of code, then #| might show up 14:28
masak that's true.
pmichaud otoh, the reason why #{ was a problem was because it ended up acting like a multiline comment
[particle] #^
masak but the failure mode is not as bad as with multiline comments.
pmichaud that doesn't exist with #|
masak right.
pmichaud right.
(and #{ is no longer a multiline comment anyway) 14:29
[particle] '#^ ' points to the line above
pmichaud so, I'd still be able to live with #|
I think I still like keeping things to "before" and "after" instead of "above" and "below"
otoh (sigh) "#<" line above "#=" same line "#>" line after 14:30
but I think I'd still prefer #= to mean "before"
sorear pmichaud: perl 6 doesn't think in lines, only .pos <=> .pos
pmichaud sorear: perl 6 doesn't, but documentation authors do. 14:31
still, I agree that "#=" would mean "before this position"
if I have
has $.x; #= long description
and I later need to change $.x to be something longer and move the description to the next line, I'd like it if I didn't also have to change the #= 14:32
sorear I think at this point we're all agreed that '#=' should be before this position and #| should be after
pmichaud works for me
sorear the only remaining point is whether to enforce space after both forms
PerlJam What is Perl 6 going to do differently with these lines than regular comments?
pmichaud #| provisionally, in case someone thinks of something better
sorear to disambiguate from the embedded versions
pmichaud PerlJam: documentation
[particle] enforcing the space is critical
=head1
PerlJam pmichaud: right, but are we talking for a sub.doc() method or what? 14:33
pmichaud PerlJam: document parsers and introspection tools can use the #=
PerlJam: yes.
sorear I support enforcing the space too
PerlJam: Actually it's specced as sub.WHY
pmichaud I'm fine either with or without space enforcement
mathw With, I like spaces
pmichaud changing =head1 to #=head1 ends up with essentially the same effect
sorear and by "enforces" I mean a worry, not a sorry
std: #( foo ) 2+2
p6eval std 31358: OUTPUT«ok 00:01 109m␤» 14:34
sorear std: #( foo )
p6eval std 31358: OUTPUT«ok 00:01 106m␤»
pmichaud std: say #(foo) 2+2
sorear std: #( foo␤ )
p6eval std 31358: OUTPUT«Potential difficulties:␤ Embedded comment seems to be missing backtick at /tmp/ODab7jU5Mq line 1:␤------> say #(foo)⏏ 2+2␤ Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/ODab7jU5Mq line
..…
std 31358: OUTPUT«===SORRY!===␤(Possible runaway string from line 1)␤Confused at /tmp/W6gxegUbTe line 2:␤------> ⏏)␤ expecting statement list␤Parse failed␤FAILED 00:01 106m␤»
pugssvn r31359 | sorear++ | [STD-eco] Set svn:ignore properties. (I've put this off too long) 14:35
pmichaud masak++ # outstanding work on comments
Thank you for pressing this issue so hard. 14:36
sorear #perl6++
masak thank y'all for being so receptive :)
pmichaud
.oO( masak++ is in Texas? )
.oO( "y'all"? )
masak ah.
no, I use it when I mean "not only you, but all of you". 14:37
pmichaud seriously considers buying masak++ a big texas hat. :)
masak because the latter is too long to write. :)
PerlJam maybe masak is an honorary Texan :)
sorear y'all is a very interesting word
mathw arguably, English does need that distinction
pmichaud at least it wasn't "all y'all" :)
sorear it's a treadmill, but not a euphemism treadmill
14:38 REPLeffect left
masak by the way, Druid conversion to Rakudo master seems to be blocking on this RT ticket I just submitted: rt.perl.org/rt3/Ticket/Display.html?id=75852 14:38
14:39 REPLeffect joined
pmichaud workaround: class A { ... }; use A::B; class A { # definitions } # maybe? 14:39
masak will try.
pmichaud where the ... is literal here
masak right. 14:40
yes, it worked. pmichaud++
masak adds the workaround to the RT ticket 14:41
pmichaud really would like to see Druid on master again 14:42
masak I've re-lapsed into Druid development recently. it started with a C re-implementation. then I started thinking about simple strategy algorithms in C. then I realized that it'd be way easier (if not as fast) to prototype those in Perl 6, with the existing Druid implementation. :) 14:43
pmichaud +1 14:44
to all of that :)
sorear What does it do? 14:47
masak sorear: www.cameronius.com/games/druid/ 14:48
if we require a space after '#|' (and I'm not yet convinced we should), there has to be an exception for otherwise empty comment lines, such as those between paragraphs. 14:49
pmichaud agreed. 14:50
at the moment, I don't feel entirely comfortable with requiring the space. 14:51
mathw the newline is a kind of space :) 14:52
pmichaud okay, so it has to be <?before \s> :-P
mathw pffft 14:53
mathw goes home
pmichaud still, like masak, I'm not sure about requiring the space. I don't know why.
masak if I get around to writing up spec, I'll probably not require the space.
pmichaud I really really hope you get around to writing the spec. I'll send you lots of karma points. And maybe a hat. 14:54
masak wow, a hat!
:)
pmichaud ...and perhaps a small hague grant would be appropriate?
masak maybe for implementing the thing. 14:55
pmichaud nothing drives a good spec like an implementation :)
masak 对对对
pmichaud wonders how hard it would be to implement .WHY 14:56
that might be a good hacking session at yapc::eu
or while I'm on vacation :)
in the meantime, I think I'll do 14:57
masak closures!
pmichaud augment class Mu { method WHY { return "Why not?" } } 14:58
masak :P
masak got scolded once for asking "why not?" during a panel discussion :)
pmichaud "Why?" # scnr
14:58 REPLeffect left
masak IIRC, when wanting to use technology X for use case Y, asking "why?" was a constructive question, but asking "why not?" didn't lead anywhere useful. 14:59
14:59 REPLeffect joined
masak especially not if the latter question was the whole answer to the former question. :P 15:00
sorear "Because I think it will work, and nobody's said why not"
15:00 sorear sets mode: +o masak
masak \+o/ 15:00
15:03 bphillips joined
pugssvn r31360 | sorear++ | [Cursor] Erect a taller abstraction barrier around the NFA construction system 15:06
15:07 skangas left 15:08 patspam left, xabbu42_ joined, xabbu42 left, xabbu42_ is now known as xabbu42 15:09 REPLeffect left, REPLeffect joined
dalek kudo: 8a5f383 | pmichaud++ | docs/spectest-progress.csv:
spectest-progress.csv update: 490 files, 33443 (83.7% of 39960) pass, 4 fail

S05-interpolation/regex-in-variable.rakudo 19 - Nested array match (a) S05-interpolation/regex-in-variable.rakudo 20 - Nested array match (e) S05-interpolation/regex-in-variable.rakudo 21 - Multiple array matching S05-interpolation/regex-in-variable.rakudo 23 - Multiple array non-compiling
15:09
15:11 patspam joined 15:13 ash__ joined 15:14 patspam left 15:15 patspam joined 15:17 itz left 15:18 xabbu42_ joined, xabbu42 left, xabbu42_ is now known as xabbu42
FardadJalili what's the problem with this code? 15:23
rakudo: my $s="dog bites man"; my token word { \w+ }; if $s ~~ m/ <word> / { say "OK!"; }
p6eval rakudo d2add4: OUTPUT«Method 'word' not found for invocant of class 'Cursor'␤ in <anon> at line 11:/tmp/N3jSvzDLzW␤ in 'Cool::match' at line 2192:CORE.setting␤ in 'Regex::ACCEPTS' at line 4995:CORE.setting␤ in 'infix:<~~>' at line 326:CORE.setting␤ in main program body at line 15:24
..11:/tmp/N3jSvzDLzW␤»
TimToady try <&word>
sorear rakudo doesn't yet implement DWIM for scoped assertions
TimToady: btw I fixed categoricals 15:25
TimToady I know, I'm snaptesting right now :)
I'm a stealth tester...
15:26 TiMBuS left 15:27 pmurias joined
TimToady oh, I guess you deserve a \o/ sorear++ :) 15:27
well, more than one, but I don't wish to be tiresome
hmm, getting a number of: Can't open syml/Test/Util.pm.syml: No such file or directory at CursorBase.pm line 308. 15:30
15:31 Ross joined
masak std: class A { has Int $.color where 1|2; } 15:35
p6eval std 31360: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/vVVvjpuKJP line 1:␤------> class A { has Int $.color ⏏where 1|2; }␤ expecting any of:␤ bracketed infix␤ infix or meta-infix␤ statement modifier loop␤ trait␤Parse failed␤FAILED 00:01 113m␤»
TimToady hmm 15:36
masak and here I was going to submit a rakudobug...
rakudo: class A { has Int $.color where 1|2; } 15:37
p6eval rakudo d2add4: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 11␤»
masak alpha: class A { has Int $.color where 1|2; }
p6eval alpha 30e0ed: ( no output )
masak likes alpha's response the best
TimToady: did that 'hmm' mean 'STD.pm6 should parse this -- wonder why it doesn't?' ? 15:38
TimToady yes
masak submits rakudobug
15:39 [mark] left
jnthn also surprised 15:39
masak rakudo: class A { has $.x where 1 }
p6eval rakudo d2add4: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 11␤»
TimToady std: class A { has (Int $.color where 1|2); }
p6eval std 31360: OUTPUT«ok 00:01 112m␤»
15:40 snarkyboojum left
jnthn rakudo: class A { has ($.x where 1) } 15:41
p6eval rakudo d2add4: ( no output )
jnthn ah
Yeah, only works if we parse a siggy. 15:42
masak I'd expect it to work without the parens, though.
jnthn Same
Now sure how much of a pain it'll be.
Hopefully almost none. 15:43
jnthn visits the bottle bank
15:44 JimmyZ left
sorear TimToady: Util.pm.syml stuff is quite strange... I didn't realize I had touched that? 15:46
pmurias ruoso: ping 15:47
pugssvn r31361 | sorear++ | [Cursor] Early out on imperative subregexes, now with less confusing inflexible braided control flow
sorear I think I now have all the sub-refactors out of the way
TimToady seems to be not creating the Util subdir in syml
er, Test dir
so Util.pm.syml ends up in syml instead of syml/Test 15:48
sorear hmm, somehow we've gone under 3 seconds
I guess I forgot a -0.05s on that last commit :) 15:49
15:52 justatheory joined 15:53 meppl joined, sdo left
pugssvn r31362 | pmurias++ | [smop] use Dist::Zilla 15:53
r31363 | pmurias++ | [smop] tools/ri doesn't depend on mangle.pl anymore, when tests fail an exception is thrown so cpanm notices that
TimToady added <post_constraint>* to variable declarator, testing
passes make, snaptesting 15:54
jnthn back
TimToady I think I have a fix
just checking for unforeseen ramifications of allowing post_constraints on variable declarations 15:55
not so much the where clause, but also the subsig constraint
jnthn TimToady: Oh...does a subsig constraint...make sense there? 15:56
Hm
I guess it could work :-)
TimToady if this flies you can say: my $x [$left,right] := $binary_node 15:57
jnthn Oh, it may even just do the right thing.
Yeah
Well
Taht's actually harder.
Potentially
TimToady = is problematic
jnthn ponders
TimToady syntactically, it doesn't appear to interfere, from early snaptest returns 15:58
jnthn rakudo: my %h = a => 1, b => 2; subset Foo where { $_ ~~ :(:$a!, :$b!) }; my Foo $x = %h;
p6eval rakudo d2add4: ( no output )
jnthn rakudo: my %h = aadvark => 1, b => 2; subset Foo where { $_ ~~ :(:$a!, :$b!) }; my Foo $x = %h;
p6eval rakudo d2add4: OUTPUT«Type check failed for assignment␤ in '&infix:<=>' at line 1␤ in main program body at line 11:/tmp/v0zlfhPb1p␤»
jnthn omgz
:-)
OK, it probably can work. 15:59
FardadJalili does this work ? -> perlgeek.de/en/article/5-to-6#post_20
jnthn Sometimes stuff I've implemetned scares me by sucking less than I expected it to.
15:59 xabbu42_ joined, xabbu42 left, xabbu42_ is now known as xabbu42
ash__ FardadJalili: Grammars work in rakudo, that specific example might be a bit out of date (the blog post said it was from Dec. 2008...) 16:00
TimToady the = on a declarator is a pseudo assignment anyway
jnthn TimToady: constraints just smart-match 16:01
TimToady: And smart-matching against the signature probably does the right kind of thing.
TimToady: Trouble is it won't bind the variables though, I fear.
It'll just say "yes this data structure has this shape"
That's perhaps fine.
TimToady people will expect variable creation based on sigs 16:02
how do sigs do it?
jnthn I mean, it's not like :($a, $b) = foo(); does anything useful.
TimToady: In my ($x, $y) := foo(); then it's the declarator followed by a signature that makes it work. 16:03
TimToady no, but my $x is treating $x as a param, not a sig
so my $x is short for my ($x)
jnthn Do you mean, how do signatures handle sub-signature matches?
TimToady so my $x [] should be like my ($x [])
yes
jnthn Just coerce the parameter to a Capture and recurse into the binder again using the nested signature and the capture. 16:04
Oh, I know what.
If it's my $x [] := blah(); 16:05
Then we'll just build a signature
TimToady so all we really need to do is recognize that we need to call the ordinary binder...yes
jnthn OK, that'll work.
For the binding case
What about the assignment one?
TimToady and either force = to be binding, or require :=
carping is fine for now, conservatively
jnthn OK, that's reasonable. 16:06
TimToady but the = could also be considered a default :)
which is binding, I think
jnthn There is that way of looking at it.
It's a tad fun to compile because
my ($x, $y) := foo(); # we actually want a signature on the LHS
my ($x, $y) = foo(); # we want a Parcel on the LHS 16:07
At the moment we just always build both, default to the Parcel and the := has a reducecheck that says "oh hey, you're binding so I'll take the sig on the LHS instead"
TimToady but only some sigs can parcelize in any case
this just ain't one of 'em
jnthn Well, yes
At the moment we're not complainy enough about that.
(There's an RT, I'll get to it. :-)) 16:08
pmichaud TimToady: when you and jnthn++ are finished, I have a question about .[0]
TimToady I'm fine with complaining for now
pmichaud (several questions, actually)
TimToady I think we're done
pmichaud okay
with something like
jnthn TimToady: OK, works well for me too. If we work out a sensible other thing to do, that always leaves the option open to do it.
pmichaud my $a = 3; say $a[0]; 16:09
jnthn Yes, done. :-)
pmichaud the current intent is that $a[0] returns $a itself?
TimToady yes, as an Any-list thing
pmichaud what about $a[1] ?
TimToady fail 16:10
pmichaud what if $a !~~ Any ?
TimToady just like my @a = 1; say @a[1]
you think it should be Mu-list? :)
pmichaud I'm simply asking. :)
(so I know where to put the method :-) 16:11
TimToady I think it should probably autothread, so Any
pmichaud okay, that works for me. More:
jnthn Is this a case of any implementing method postcicumfix:<[ ]>(\$index) ( self.list.[$index] }
TimToady pugs: say (1|2|3).[0].perl
p6eval pugs: OUTPUT«\(1 | 2 | 3)␤»
pmichaud jnthn: perhaps, but there's more.
jnthn OK
pmichaud given:
my Mu $a; $a[0] = 4; 16:12
does $a autopromote to an Array?
16:12 ciphertext joined
pmichaud (I'm assuming that with my Any $a; $a[0] = 4; it will autopromote) 16:12
16:12 Visitor99 joined
pmichaud s/autopromote/autovivify/ if $clearer; 16:13
TimToady we have to distinguish lvalue subscripting from rvalue, I guess
pmichaud well, not necessarily
I've been thinking that .[] on (certain?) protoobjects can return a but WHENCE( ...) that autovivifies 16:14
such as Mu and Any
so I'm curious as to whether it's Mu or Any :-)
TimToady but on rvalue returns the thing itself?
or I guess it could make the list anyway, and then .[0] it 16:15
pmichaud we can distinguish based on undefinedness
TimToady since something could be used as both an rvalue and then an lvalue
conceivably
pmichaud oh, yes, I suppose.
Anyway, my question was whether something that is Mu would autovivify to a container, or if that was restricted to Any 16:16
TimToady or even Cool, if we default to Cool instead of Any?
pmichaud given what you said above about .[] being a feature of Any, I'm inclined to (initially) try the same approach for autovivify
and see what happens/breaks
and yes, Cool instead of Any if we default to that. 16:17
I'll try it with Any to begin with, and if it causes a problem we can likely revisit.
TimToady my $x; $x += 42 could be a function of coolness
sorear how well do we understand autovivification?
TimToady we're not omniscient :) 16:18
pmichaud I think I have a reasonable handle on it now, having done the variable/container/list refactor this past week.
TimToady so this is probably a good spot for experimentation
pmichaud I just needed to get TimToady++'s initial leanings on some of the programmer-visible stuff
TimToady and treating rvalues/lvalues as consistently as possible as long as possible seems clean
pmichaud agreed.
anyway, I'll have something WHENCE-like done in the next few days, if not at yapc::na 16:19
*if not then
putting the feature in Any definitely minimizes the impact at the moment
TimToady one thing we do know is that P5 has conniption fits about trying to decide whether an argument to a function should be treated as rvalue or lvalue
and treating an arg as potentially lvalue has historically been one of the slowdowns in p5 sub calls 16:20
pugssvn r31364 | sorear++ | [Cursor] It turns out that separating nfa::disj and nfa::ltmprefate doesn't actually make any sense, so recombine them. Remove unused nfa::has_nontrivial_fates.
TimToady the WHENCE solution seems good because you only have to generate one when you already know something is missing 16:21
16:21 REPLeffect left, ajs joined
pmichaud and that generally occurs only when .[] appears on an undefined value 16:21
so I was wondering which undefined values needed to be aware of it :)
I'll go with Any for now.
Thanks.
16:21 thebird left 16:22 REPLeffect joined 16:23 thebird joined
TimToady tests out clean, so.... 16:23
pugssvn r31365 | lwall++ | [STD] add <post_constraint>* to variable_declarator
masak I now have Druid compiling in a local branch. 16:28
pmichaud \o/ masak++ 16:29
masak all tests fail :)
16:29 ive joined
pmichaud /o\ 16:29
masak $one.step for ^2; # :) 16:30
sorear .move(:forwards) for ^Inf
16:31 ive left
masak hopes something good is in $_ 16:31
Visitor99 rakudo: my $a = "say 1"; $a(); 16:32
p6eval rakudo d2add4: OUTPUT«invoke() not implemented in class 'Perl6Str'␤ in main program body at line 11:/tmp/M1vyOnL1Wm␤»
jnthn rakudo: my $a = "say 1"; eval $a;
p6eval rakudo d2add4: OUTPUT«1␤»
ash__ Visitor99: you'd have t oeval it if you want that to execute
s/t oeval/to eval/ 16:33
Visitor99 rakudo: my $b = "say 'b';" my $a = "eval $b;"; eval $a; 16:35
p6eval rakudo d2add4: OUTPUT«===SORRY!===␤Confused at line 11, near "my $b = \"s"␤»
bbkr rakudo: eval $A::b; # hmm, less than perfect error message 16:40
p6eval rakudo d2add4: OUTPUT«Null PMC access in can()␤ in 'eval' at line 936:CORE.setting␤ in 'eval' at line 957:CORE.setting␤ in main program body at line 11:/tmp/kww0_t0GDE␤»
sorear What's the Perl 6 syntax for accessing a slot of an object not in 'self'?
16:40 Visitor99 left
masak sorear: not sure you can do that. 16:41
sorear: the $object!foo syntax calls private method !foo on $object, it doesn't access $!foo on it. 16:42
jnthn Aye, I don't think there's syntax for it either.
16:43 FardadJalili left
pmichaud there is -- I asked about this before (and received an answer) 16:44
I just don't remember the answer. :(
pmichaud looks 16:45
bbkr rakudo: grammar X {has $.x;}; X.new(x=>666).x.say
p6eval rakudo d2add4: OUTPUT«666␤»
bbkr finally works! hoooray!
16:45 patrickas joined
bbkr big progress in this release 16:46
pmichaud aha! Pm-6 has the answer! 16:49
Answer: as of r28932, C<< $b!SomeClass::xyz >>. --Pm
sorear yay Pm-6!
pmichaud I don't know if it's changed since then.
(see misc/pm.txt for the full question and answer)
(in pugs repo) 16:50
sorear yeah I read the pm file once
long ago.
16:52 REPLeffect left, Visitor99 joined, REPLeffect joined
Visitor99 rakudo: my $b = "say 'b';" my $a = 'eval $b;'; eval $a; 16:53
diakopter <@sorear> Does a Perl6 compiler have to account for the possibility of someone saying eval '&fa' ~ 'il := 2' ?
p6eval rakudo 8a5f38: OUTPUT«===SORRY!===␤Confused at line 11, near "my $b = \"s"␤»
16:53 dakkar_ left 16:54 alester joined
pmichaud visitor 99: missing semicolon 16:55
(after first assignment to $b)
Visitor99 rakudo: my $b = "say 'b'"; my $a = 'eval $b'; eval $a;
p6eval rakudo 8a5f38: OUTPUT«b␤»
16:58 dakkar joined 16:59 arthur-_ left
diakopter sorear: re above, I'd think so. 17:00
sorear that is quite unfortunate 17:02
TimToady: Can something be done to stop HardRoutines from being rebound, or must a single string eval break inlining for everyone?
17:02 REPLeffect left 17:05 agentzh left
diakopter sorear: note, I've been known to "think so" wrongly, often. 17:05
17:05 ejs joined
jnthn $b!SomeClass::xyz - would that not conflict with calling a private method in a particular superclass of $b? 17:06
rakudo: my $b; $b!SomeClass::xyz # will fail but curious if it parses
p6eval rakudo 8a5f38: OUTPUT«Could not find sub !!dispatch_::␤ in main program body at line 11:/tmp/NAlDM5rZ31␤»
jnthn oh heh.
Interesting way to fail. :-)
Anyway, Rakudo tried to call a private method in a superclass. 17:07
masak submits that as an LTA rakudobug 17:10
jnthn masak: It's a bit more than LTA 17:11
masak: As in, it's not just an error fail
It's a real fail.
masak ok.
17:11 ejs left
bbkr rakudo: say eval ""; # does this follow the spec? looks weird... 17:12
p6eval rakudo 8a5f38: OUTPUT«1␤»
masak bbkr: no, it doesn't. it's a reported bug. 17:13
bbkr masak: thanks
masak found it while upgrading GGE to Rakudo master. :)
17:13 arthur-_ joined, xabbu42_ joined, xabbu42 left, xabbu42_ is now known as xabbu42 17:14 cdarroch joined, cdarroch left, cdarroch joined
bbkr std: say eval eval; 17:14
p6eval std 31365: OUTPUT«Potential difficulties:␤ Unsupported use of bare 'eval'; in Perl 6 please use .eval if you meant $_, or use an explicit invocant or argument at /tmp/nEpC5BgpkT line 1:␤------> say eval eval⏏;␤ok 00:01 109m␤»
17:15 REPLeffect joined 17:17 proller left
patrickas rakudo: say (1|(2|3)).eigenstates.perl; 17:17
p6eval rakudo 8a5f38: OUTPUT«(1, any(2, 3))␤»
[Coke] sd 17:18
masak num &
bbkr rakudo: eval "my $x;"
p6eval rakudo 8a5f38: OUTPUT«===SORRY!===␤Symbol '$x' not predeclared in <anonymous> (/tmp/d29DOqjIb8:11)␤»
jnthn masak: omnumnum!
masak bbkr: interpolation.
17:18 masak left
TimToady maybe we should rename .eigenstates to .HERE-BE-DRAGONS 17:19
bbkr masak: indeed, thanks.
moritz_ nope, it's a noun
so
.DRAGONS-HERE-ARE :-)
TimToady .IF-YOU-PROCEED-YOU-ARE-LIKELY-TO-BE-EATEN-BY-A_GRUE 17:20
sorear I'm fine with eigenstates
17:20 proller joined
sorear a little rope isn't bad 17:20
TimToady that's the trouble--it's proven to be a very attractive rope, and lots 17:21
sorear Who'se abusing it today?
TimToady I'd just as soon encode the answer to the faq in the method name :)
newcomers
patrickas implementation is not according to spec anyway ... so it's even wrong type of wrope , otherwise i would have happily used it to hang myslef :-)
17:22 thebird left
TimToady I'd just as soon it not become the #1 FAQ 17:22
jnthn TimToady: The concern being people will use it as a set?
Rather than using Set?
TimToady yes
moritz_ maybe it would help if we implemented Set :-) 17:23
so that people can use it
17:23 mantovani left, Lorn left
TimToady and only all() junctions are at all like a set 17:23
jnthn rakudo: say Set;
p6eval rakudo 8a5f38: OUTPUT«Set()␤»
moritz_ rakudo: say Set.new(1, 2, 3)
p6eval rakudo 8a5f38: OUTPUT«Set()<0x3e42860>␤»
jnthn TimToady: Could always say that if you want to see the values in the junction you gotta coerce it to a Set.
Then the method is .Set :-)
17:23 REPLeffect left
colomon rakudo: say Set.new(1, 2, 3).perl 17:24
p6eval rakudo 8a5f38: OUTPUT«Set.new(1, 2, 3)␤»
moritz_ rakudo: say (1 + Set(1, 2, 3)).perl
p6eval rakudo 8a5f38: OUTPUT«Could not find sub &Set␤ in main program body at line 11:/tmp/8NoGsQEfZf␤»
TimToady so, please enumerate the set of none(1,2,3).Set for me
moritz_ rakudo: say (1 + Set.new(1, 2, 3)).perl
p6eval rakudo 8a5f38: OUTPUT«Can't take numeric value for object of type Set␤ in 'Any::Numeric' at line 1226:CORE.setting␤ in 'infix:<+>' at line 5818:CORE.setting␤ in main program body at line 11:/tmp/RNLPvU_gR_␤»
colomon moritz_: should be
rakudo: say (1 <<+>> Set.new(1, 2, 3)).perl 17:25
p6eval rakudo 8a5f38: OUTPUT«get_pmc_keyed() not implemented in class 'Set'␤ in 'at_key' at line 1065:CORE.setting␤ in 'postcircumfix:<{ }>' at line 1063:CORE.setting␤ in 'hyper' at line 1␤ in main program body at line 1␤»
colomon but that's totally NYI
jnthn .u UNION
phenny U+222A UNION (∪)
moritz_ should sets autothread like junctions?
jnthn moritz_: No
rakudo: say Set ~~ Any
p6eval rakudo 8a5f38: OUTPUT«1␤»
17:25 REPLeffect joined
bbkr rakudo: my $x=any(1); say "5any(1)7" ~~/5 $x 7/ # is this intended behavior? shouldn't $x be checked for Str type? 17:25
p6eval rakudo 8a5f38: OUTPUT«5any(1)7␤»
sorear any, all, one, and none junctions should have distinct subtypes of Junction, and only AllJunction has .Set ?
17:25 xabbu42_ joined, xabbu42 left, xabbu42_ is now known as xabbu42 17:27 Lorn joined 17:28 rv2733 joined, pkkm joined
TimToady moritz_: autothreading of listy things will be done with each(), see S09:1063 17:29
and that includes sets 17:30
17:30 mantovani joined, Wolfman2000 joined
jnthn sorear: There isn't a subtype for each type of junction. 17:31
TimToady since one() and any() are, to the first approximmation, sets of sets, we could return the list of sets, where one() returns a singleton set for each value, and any() returns the powerset of them, or whatever the proper name is 17:33
Tene powerset is set of all subsets 17:34
17:39 am0c__ joined
sorear jnthn: I was saying there could be, not that there is 17:39
17:40 envi^home left
jnthn sorear: Ah, OK. 17:41
sorear: I'd interpreted it as "asking". :-)
17:41 gabiruh left 17:42 gabiruh joined 17:43 envi^home joined 17:49 azert0x joined, tadzik joined 17:53 Visitor99 left 18:01 rv2733 left, gabiruh left, gabiruh joined 18:02 dukeleto left
patrickas what does "icu" mean in spectest.data? 18:08
moritz_ patrickas: that the test depends on the availability of the icu library 18:09
PerlJam patrickas: I See You ;)
patrickas oh ok 18:10
PerlJam spooky!
lue ohai 18:13
patrickas hi lue 18:14
18:17 pyrimidine joined 18:20 pyrimidine is now known as pytab, pytab is now known as py[tab], dakkar left 18:22 REPLeffect left, am0c__ left
patrickas rakudo: class Foo {} ;multi sub reverse (Foo $a) {} ;for &reverse.candidates {try {.signature.perl.say;CATCH {say $!}}} 18:27
p6eval rakudo 8a5f38: OUTPUT«:(Foo $a)␤get_attr_str() not implemented in class 'Sub'␤get_attr_str() not implemented in class 'Sub'␤»
patrickas alpha: class Foo {} ;multi sub reverse (Foo $a) {} ;for &reverse.candidates {try {.signature.perl.say;CATCH {say $!}}} 18:28
p6eval alpha 30e0ed: OUTPUT«:(*@values)␤:(%hash)␤:(Foo $a)␤»
moritz_ any ideas for an -Ofun rakudo hacking session? 18:34
colomon that hacking on rakudo or hacking in rakudo? 18:35
moritz_ hackiing on rakudo, primarily
but with rakudo might also be a nice idea 18:36
well, actually I have an idea for that :-)
colomon is still hoping to have a good chance to play with ufo soon
18:36 am0c__ joined
TimToady <sorear> TimToady: Can something be done to stop HardRoutines from being rebound, or must a single string eval break inlining for everyone? 18:37
an eval runs after CHECK time, so it is illegal to rebind a HardRoutine; someone needs to have turned it into a SoftRoutine instead before CHECK time
moritz_ Actions.pm lines 390 to 395 look wrong 18:40
it delays module loading to happen after 'use' time
erm
after BEGIN
lue hears hackathon and -Ofun in the same sentence, and is interested. 18:41
moritz_ if I don't get a better idea, I'll hack a bit on Math::Model 18:42
TimToady sorear: so while it would be possible, in theory, to know whether we've actually inlined a HardRoutine, and treat it as Soft after CHECK time if nobody had "claimed" it, I think that would be a bad idea 18:43
justatheory encapsulates bad ideas
diakopter a year or two away from that
TimToady and we should force people to declare their soft routines whether or not they end up getting inlined
this is the same with most optimizations--we will assume something is optimizable unless explicitly pessimized before CHECK time 18:45
and eval is not to be taken as a universal pessimization. :) 18:46
18:47 envi^home left
TimToady I think the worst an eval can do is force creation of a pad with all visible external lexicals 18:47
or we force the user to declare the "import" list
alternately, we scan all single quoted strings for bits that look like variable names, and import those by default :) 18:49
18:49 xabbu42_ joined, xabbu42 left, xabbu42_ is now known as xabbu42
TimToady so, for instance, eval '$x = 42;' knows that $x needs to be available to the eval's pad, likewise for eval "\$x = 42" 18:51
if there is no such variable visible, it just removes it from the list
diakopter yeah but
TimToady if you construct a var name, you're hosed :)
diakopter unscannable codegen...
hm 18:52
pmichaud (one().Set and any().Set) ooooooooh I like that notion. 18:53
18:53 ShaneC joined 18:54 rgrau left, ShaneC left
TimToady as long as any(1,2,3).Set gives you Set(Set(1),Set(2),Set(3),Set(1,2),Set(1,3),Set(1,2,3)) 18:54
pmichaud seems like that should be very doable. 18:55
and lazily, at that.
TimToady and none(1,2,3).Set gives you something like Any where $_ !=== any(1,2,3) or some such 18:56
pmichaud would it actually need to be a Set(...) at the outside -- a List wouldn't be sufficient?
maybe .sets then
TimToady also, we could possibly do any(1...*) for any monotonic series where you can tell when you've gone far enough
pmichaud and any(...).Set is any(...).sets.Set 18:57
18:57 xabbu42_ joined, xabbu42 left, xabbu42_ is now known as xabbu42
sorear TimToady: So &-variable containers cannot be rebound if they currently point to a HardRoutine? How does that work? 18:58
pmichaud anyway, it's worth playing with
TimToady probably special case
either special pass in CHECK, or &foo lookup knows to deref to see if it's holding a HardRoutine, and carp appropriately 19:01
19:02 lue left
pmichaud afk 19:02
TimToady your inliner is presumably already looking at these things at CHECK time
so maybe it's not a special pass
19:03 py[tab] is now known as pyrimidine 19:04 szabgabx joined
TimToady in any case, after the CHECK, something constrains hard routine containers from being rebound; seems non-expensive unless someone actualy tries to rebind the routine container 19:05
19:05 lue joined
sorear I was not aware non-rebindable containers existed. 19:05
Do any other types exist?
19:05 cono left
TimToady if we want 'em to 19:06
19:06 cono joined
TimToady alternately, we don't require the check, but just rope off a large chunk of suspect code as "erroneous" 19:07
rakudo: 1 := 2 19:08
p6eval rakudo 8a5f38: OUTPUT«:= binding of variables not yet implemented␤ in 'infix:<:=>' at line 601:CORE.setting␤ in main program body at line 11:/tmp/6XA0S0qsuD␤»
TimToady whatever prevents that from happening can likely be used for immutable routine containers
moritz_ like, not implementing binding? :-) 19:09
19:09 cdarroch left
TimToady yeah, something like that :) 19:09
lue what bad is that it didn't recongnize the real issue :) 19:10
19:10 FardadJalili joined
TimToady CHECK time is when the compiler says "Going...going...gone!" 19:10
sorear wonders why all containers are bindable by default, but not tieable by default
seems to me that tying is a special case of binding 19:11
TimToady then if we implement binding, we don't have to do tieing
19:12 Visitor99 joined
TimToady if static analysis doesn't tell us whether a variable is rebound, then we can assume it is not rebindable, I think 19:13
and require 'is bindable' to pessimize it for, say, eval 19:14
it doesn't quite give the same freedome as P5's tie does
19:14 masak joined
TimToady but then, tie is one of the reasons P5 is slow 19:15
masak mmm, nom.
[particle] we've picked other reasons to be slow
TimToady which are hopefully temporary 19:16
we could pessimize all variables with "use UNIVERSAL_REBINDING;" or some such, I suppose :)
19:17 pyrimidine left
TimToady but I'd really like to keep the default optmizable, even if not yet optimized... 19:17
this will also help the optimizer decide when it can replace reference types with native types 19:18
(knowing if anyone cares about the container) 19:19
masak that's why it's important to cover the bottom of your routine, so that no containers accidentally leak out.
rakudo: class A { has $!x = 42; method foo { $!x }; method bar { say $!x } }; my $a = A.new; A.foo++; A.bar 19:22
p6eval rakudo 8a5f38: OUTPUT«Type objects are abstract and have no attributes, but you tried to access $!x␤ in 'A::foo' at line 11:/tmp/vgYpommS2b␤ in main program body at line 11:/tmp/vgYpommS2b␤»
masak oops.
rakudo: class A { has $!x = 42; method foo { $!x }; method bar { say $!x } }; my $a = A.new; $a.foo++; $a.bar
p6eval rakudo 8a5f38: OUTPUT«43␤»
arnsholt nqp-rx's default quote_atom rule excludes quoted string syntaxes like SQL and Prolog where you insert a quote char by doubling it
And it seems to me that the negative assertion <!stopper> is a bit unnecessary, seeing how the non-escape sequence part of the match is <-quote_escape-stopper> 19:23
TimToady method foo should be returning an lvalue
much like the earlier problem of take $x++
*shoudn't grr
masak TimToady: it is, that's why it's working.
Tene It's confusing to me that you can call instance methods on the type object. I guess I don't quite understand Perl 6's OO
arnsholt Can anyone see a problem with removing the <!stopper> assertion?
TimToady what the heck has gone wrong with my n't key!?!?!?!!
masak TimToady: it shouldn't? 19:24
masak is very surprised
Tene: the type object is an instance of the class.
TimToady what's the point of 'method foo is rw' if 'method foo' means the same thing? 19:25
Tene masak: if it's an instance of the class, why doesn't it have attributes?
masak TimToady: oh, ok. makes sense.
TimToady: I'm just used to 'rw' being on by default in Rakudo right now.
Tene: it does; you're just not allowed to use them. :)
TimToady Tene, the point is to be able to do logic like "Socratese is a Man", where Man is a generic undefined Man object, but behaves as a Man in all generic predicates 19:26
Socrates, grr
19:26 cdarroch joined, cdarroch left, cdarroch joined 19:27 pkkm left
masak rakudo: class Man {}; class Socrates is Man {}; say Socrates ~~ Man 19:27
Tene nods.
p6eval rakudo 8a5f38: OUTPUT«1␤»
19:28 cdarroch left
pugssvn r31366 | sorear++ | [Cursor] Major refactor of NFA generation. NFAs are now constructed in a hierarchal object graph form, then converted into the array in a single pass; there is no rescanning of graphs by composition operators. 19:28
TimToady rakudo: class Man { method is_an_island { 0 } }; say Man.is_an_island
p6eval rakudo 8a5f38: OUTPUT«0␤»
TimToady rakudo: class Man { }; class Island {}; say Man ~~ Island 19:29
p6eval rakudo 8a5f38: OUTPUT«0␤»
sorear Tene: Incidentally, Perl 5 OO works the same way. The untyped name of a class can be used to call any method that doesn't need to access instance storage
TimToady rakudo: class Man { }; class Island {}; say Man !~~ Island
p6eval rakudo 8a5f38: OUTPUT«1␤»
TimToady except the untyped name is not an object 19:30
masak rakudo: class Man { method small-step {} }; class Humanity { method great-leap {} }; .small-step for Man; .great-leap for Humanity
p6eval rakudo 8a5f38: ( no output )
sorear "Foo::Bar"->new = UNIVERSAL::can("Foo::Bar", "new")->("Foo::Bar"), exactly like object method dispatch
TimToady hence all the ref($self)||$self hacks
masak: you've just proven that the moon landing was faked! 19:31
masak TimToady: yep. look how easy it is. :P
lue ohai masak o/ 19:32
masak of course, the alien they keep captive at Area 51 could have told us that years ago...
lue: ahoj!
lue: I'm bringing Druid up to Rakudo master this fine evening. 19:33
19:33 Schwern joined, eternaleye left
lue \o/ 19:33
ggoebel perl6: 'fubar'.reverse.say 19:34
p6eval rakudo 8a5f38: OUTPUT«fubar␤»
..elf 31366, pugs: OUTPUT«rabuf␤»
masak ggoebel: .flip
pmurias masak: that's the reason they don't let him out
lue If the Moon Landing was a myth, they why are they cancelling the project?
ggoebel perl6: 'fubar'.flip.say
p6eval rakudo 8a5f38: OUTPUT«rabuf␤»
..pugs: OUTPUT«*** No such method in class Str: "&flip"␤ at /tmp/f8372om_Ju line 1, column 1 - line 2, column 1␤»
..elf 31366: OUTPUT«Can't locate object method "flip" via package "fubar" (perhaps you forgot to load "fubar"?) at (eval 124) line 3.␤ at ./elf_h line 5881␤»
ggoebel thanks
moritz_ and I am trying to plug SVG::Plot into Math::Model 19:35
masak pmurias: also, he's a great card reader, and he'd bankrupt Vegas in a day.
ggoebel perl6: @a=['fubar']; pop(@a).flip.say
p6eval rakudo 8a5f38: OUTPUT«===SORRY!===␤Symbol '@a' not predeclared in <anonymous> (/tmp/wQXNl95rj8:11)␤»
..pugs: OUTPUT«*** ␤ Unexpected "=['"␤ expecting "::"␤ Variable "@a" requires predeclaration or explicit package name␤ at /tmp/ChRCdfGBLf line 1, column 3␤»
..elf 31366: OUTPUT«Global symbol "$a_a" requires explicit package name at (eval 125) line 3.␤Global symbol "$a_a" requires explicit package name at (eval 125) line 4.␤ at ./elf_h line 5881␤»
masak ggoebel: 'my @a' :)
ggoebel perl6: my @a=['fubar']; pop(@a).flip.say 19:36
p6eval elf 31366: OUTPUT«Undefined subroutine &GLOBAL::pop called at (eval 125) line 4.␤ at ./elf_h line 5881␤»
..rakudo 8a5f38: OUTPUT«rabuf␤»
..pugs: OUTPUT«*** No such method in class Array: "&flip"␤ at /tmp/1OIHPp2Hki line 1, column 18 - line 2, column 1␤»
ggoebel thanks again!
19:36 tadzik left
masak I live to please. 19:36
Tene ggoebel: you might want to just use "rakudo:"
pugs and elf aren't in quite the same state as rakudo 19:37
19:37 tadzik joined 19:39 sdo joined
sdo howdy 19:39
masak sdo: \o 19:40
colomon aaaiiiigggghhhh!!! getting anything accomplished in C++ requires so many lines of code..... 19:41
lue hugme: hug colomon 19:42
hugme hugs colomon and blushes
colomon thanks, hugme. I needed that.
lue
.oO(I was gobsmacked the first time I saw C code in Rakudo)
19:43
19:44 sdo left
Tene perl6: say "foo".map: { "bar" } 19:44
p6eval elf 31366: OUTPUT«Can't locate object method "map" via package "foo" (perhaps you forgot to load "foo"?) at (eval 125) line 3.␤ at ./elf_h line 5881␤»
..pugs, rakudo 8a5f38: OUTPUT«bar␤»
masak lue: be glad all of it isn't in C. :)
19:44 ggoebel left
lue It should go away in P6.1 :) 19:45
sorear non-#perl6 people are very funny types
Tene What was the reason for the list methods being on everything, again? 19:46
masak Tene: because one item is often expected to act like a list of one item. 19:47
Tene For example?
19:47 eternaleye joined
TimToady Tene, it's a linguistic observation 19:47
masak rakudo: say (1,2,3).elems; say (1).elems
p6eval rakudo 8a5f38: OUTPUT«3␤1␤»
TimToady certain method names imply that you want a list
just as in natural lanuage, you can use words to force context on other words nearby 19:48
Tene And why does calling those method names on something that's not a list not suggest confusion on the part of the programmer?
moritz_ Tene: do you think that uc(1) should die?
19:48 xabbu42_ joined 19:49 xabbu42 left, xabbu42_ is now known as xabbu42
TimToady because lists tend to degenerate to single values for various reasons 19:49
moritz_ or should it coerce to "1", and then uc it?
it's the same idea for methods
TimToady
.oO(there a uc(1) unix command?!?)
lue no :/ 19:50
Tene Also, is this discussed in the specs somewhere?
19:51 eternaleye left
TimToady rakudo: say uc 1e50 19:51
p6eval rakudo 8a5f38: OUTPUT«1E+50␤»
lue ō.o 19:52
TimToady there's your use case :)
lue where did the + come from?
TimToady rakudo: say ~1e50
p6eval rakudo 8a5f38: OUTPUT«1e+50␤»
TimToady rakudo: say 1e50
p6eval rakudo 8a5f38: OUTPUT«1e+50␤»
lue rakudo: say 1e5f 19:53
p6eval rakudo 8a5f38: OUTPUT«===SORRY!===␤Confused at line 11, near "say 1e5f"␤»
masak rakudo: sub postfix:<!!!>($s) { $s ~ '!!!' }; say uc 1e50!!!
p6eval rakudo 8a5f38: OUTPUT«1E+50!!!␤»
19:53 cdarroch joined, cdarroch left, cdarroch joined
TimToady std: 0x_bad_cafe 19:53
lue rakudo: sub postfix:<!!!>($s) {$s ~ '!!!' }; say uc objection!!!
p6eval std 31366: OUTPUT«ok 00:01 109m␤» 19:54
rakudo 8a5f38: OUTPUT«Could not find sub &objection␤ in main program body at line 11:/tmp/SHSIJNKfEr␤»
lue std: 0xdead_beef_1337_cafe
p6eval std 31366: OUTPUT«ok 00:01 107m␤»
Visitor99 is this correct? 19:56
19:56 szabgabx left
Visitor99 rakudo: my Str $a; say $a.^methods; 19:56
p6eval rakudo 8a5f38:
..OUTPUT«ACCEPTSdefIntpredlBoolsuccencodeNumperlWHICHsStrfrom-radianstrim-trailingcapitalizepredatanhexpcosecp5choplccharssinhto-radiansacotanrootslcfirstsecasectrimcotanhtrim-leadingcisloglog10sechrandtruncatesprintfbytessinsqrtasincoshsuccsignasinhacosechabsucceilingunpolarsamecasefloorsu…
moritz_ doesn't look wrong to me 19:57
Visitor99 my Str $s = "1.2"; say $s.sin; 19:58
colomon all those darned Cool methods....
Visitor99 rakudo: my Str $s = "1.2"; say $s.sin;
p6eval rakudo 8a5f38: OUTPUT«0.932039085967226␤»
Visitor99 rakudo: my Str $s = "0xdeadbeef"; say $s.sin; 19:59
p6eval rakudo 8a5f38: OUTPUT«0.956769719476176␤»
TimToady rakudo: my Str $a; say $a.^methods(:local).Str
masak Visitor99: if you want to space things out a bit, you can do 'say ~$a.^methods;'.
p6eval rakudo 8a5f38: OUTPUT«WHICH perl s Str ACCEPTS d e f pred Int l Bool encode succ Num␤»
lue rakudo: say "hi".d
p6eval rakudo 8a5f38: OUTPUT«Bool()␤»
lue rakudo: say "hi".d; say "hi".e; say "hi".f
p6eval rakudo 8a5f38: OUTPUT«Bool()␤0␤Bool()␤»
lue interesting...
19:59 whiteknight joined
TimToady we're intending to kick the filetests out of Str 20:00
lue that's what they are.
Seems more like an IO type thing anyway.
TimToady decommuting &
20:04 Psyche^ joined
lue afk # maybe when I come back I can find a long-term project screaming for me :) 20:05
20:06 justatheory_ joined, justatheory left, justatheory_ is now known as justatheory 20:08 Patterner left, Psyche^ is now known as Patterner 20:11 xabbu42_ joined 20:12 xabbu42 left, xabbu42_ is now known as xabbu42, clintongormley left
FardadJalili why do I get: ./perl6 t/spec/S05-grammar/example.t -> paste.ubuntu.com/451751/ 20:13
moritz_ FardadJalili: the test file is out of date 20:14
masak FardadJalili: and it's not one that Rakudo currently runs as part of its spectest suite. 20:15
moritz_ rakudo doesn't run it by default
FardadJalili moritz_: but why? change in the syntax or what? 20:16
moritz_ FardadJalili: yes
FardadJalili moritz_: ok thanks again. 20:17
patrickas moritz_: does JSON::Tiny work with recent rakudos ?
moritz_ patrickas: mostly
the parsing part works fine 20:18
also constructing the data structures
patrickas thanks, that should be enough for a start
moritz_ the serialization has a few problems still
20:20 xabbu42_ joined, xabbu42 left, xabbu42_ is now known as xabbu42 20:22 jrtayloriv joined
[Coke] p9 20:23
20:23 jrtayloriv left
masak [Coke]: there isn't going to be a p9. 20:26
20:27 xabbu42_ joined, xabbu42 left, xabbu42_ is now known as xabbu42 20:28 tadzik left
[particle] why is p6 afraid of p7? 20:30
diakopter because p7 p9 p9 20:31
augh
p7 p8 p9
masak 'pea-ate'?
diakopter oh. was that a rhetorical question? 20:32
[particle] isn't that why there won't be a p9?
the same reason p6 is afraid of p7?
masak we'll need the Singularity to produce p7. making p6 is already tricky enough. 20:34
moritz_ plan9 had lots of good ideas
masak maybe p6 is afraid of p7 because p6 -> Signularity -> p7 :) 20:35
PerlJam masak++
20:36 SmokeMachine left
moritz_ rakudo: my %h = a => [1, 3], b => [2, 4]; for [Z] %h<a b> -> $a, $b { say "$a $b" } 20:36
p6eval rakudo 8a5f38: OUTPUT«1 2 3 4 ␤»
moritz_ any way to get that to print 1 2\n3 4\n instead?
rakudo: my %h = a => [1, 3], b => [2, 4]; for [Z] %h<a b>».list -> $a, $b { say "$a $b" } 20:37
p6eval rakudo 8a5f38: OUTPUT« ␤»
20:37 Schwern left
moritz_ hugme: add patrickas to json 20:39
hugme hugs patrickas. Welcome to json!
moritz_ # in case you have a fix :-) 20:40
patrickas Thanks ... I doubt I will ... but you never know :-)
20:42 Su-Shee left
masak moritz_: 20:44
rakudo: my %h = a => [1, 3], b => [2, 4]; for %h<a b> -> [$a, $b], [$c, $d] { say "$a $c"; say "$b $d" }
p6eval rakudo 8a5f38: OUTPUT«1 2␤3 4␤»
moritz_ masak: that's cheating 20:45
20:45 Ross is now known as Rincewind
moritz_ i have some few hundred values in a and b each :/ 20:46
workaround for SVG::Plot pushed
20:46 masak left, masak joined
dalek kudo: df98be5 | moritz++ | src/core/List.pm:
List.hash
20:50
masak moritz_: you didn't specify the rules, so I wasn't cheating; was just trying to solve the problem for you. :) 20:52
20:55 SmokeMachine joined
masak can't be much help on [Z], though. I don't even have an intuition for what it does. that's one scary operator :) 20:55
sorear TimToady: How does bindability work for anonymous containers? IE if @foo exists, when can the optimizer assume @foo[13] will never be rebount? 20:58
pugssvn r31367 | sorear++ | [Cursor] Optimize ltm alternation after horizons a bit. Cuts 200 nodes off the statementlist_0 NFA. 20:59
masak ah hah hah. I'm the first person to be bitten by the laziness in Rakudo's new gather block. :)
sorear (we're back under the 3s mark!) 21:00
masak this explains Rakudo's strange refusal to run the inside of a certain gather block in Test::Ix in Druid. :)
sorear: what is it that takes 3s? 21:01
should a gather block act eagerly in sink context?
moritz_ rakudo: my %h = a => 1; 'a' ~~ /./; say %h{$/}
p6eval rakudo 8a5f38: OUTPUT«maximum recursion depth exceeded␤ in 'postcircumfix:<{ }>' at line 1␤ in 'postcircumfix:<{ }>' at line 1054:CORE.setting␤ in 'postcircumfix:<{ }>' at line 1␤ in 'postcircumfix:<{ }>' at line 1␤ in 'postcircumfix:<{ }>' at line 1␤ in 'postcircumfix:<{ }>' at line 1␤ in
..'postc…
sorear masak: tryfile /tmp/y, where /tmp/y contains "2 + 2"
moritz_ masak: yes
sorear averaged over 10 runs, dropping the first
moritz_ but sink context is NYI 21:02
masak sorear: ah, ok.
sorear it's a crude benchmark of STD startup overhead
moritz_ submits rakudobug
diakopter icfpcontest.org/2010/?today
masak moritz_: right.
21:04 xabbu42_ joined, xabbu42 left, xabbu42_ is now known as xabbu42
patrickas moritz_++ JSON::Tiny works again 21:08
21:08 masak left
Guest23195 "The first major release (named "Rakudo *" or "Rakudo Star") is expected in the second quarter of 2010" 21:10
21:10 bphillips left
Guest23195 Perhaps someone wants to edit en.wikipedia.org/wiki/Rakudo_Perl 21:11
21:11 masak joined
moritz_ waits for pmichaud's blog post 21:11
masak rakudo: class A {}; my $a = A.new; say $a ~~ (*, $a, *)
p6eval rakudo 8a5f38: OUTPUT«Can't take numeric value for object of type A␤ in 'Any::Numeric' at line 1226:CORE.setting␤ in 'infix:<==>' at line 5818:CORE.setting␤ in 'negate' at line 56:CORE.setting␤ in 'List::ACCEPTS' at line 1␤ in 'Parcel::ACCEPTS' at line 1211:CORE.setting␤ in 'infix:<~~>' at
..line 32…
masak submits rakudobug 21:12
that used to work.
alpha: class A {}; my $a = A.new; say $a ~~ (*, $a, *)
p6eval alpha 30e0ed: OUTPUT«1␤»
moritz_ then we can link to that blog post as a citation
pmichaud sorry, my blog post is a little delayed 21:13
and I hate to admit *why*
it'll be up tonight, though.
pugssvn r31368 | sorear++ | [Cursor] Prune duplicate fates 21:18
moritz_ d'oh
SVG::Plot doesn't do xy plots yet :(
21:20 masak left, pnate left 21:21 masak joined, xabbu42 left, xabbu42_ joined 21:22 pmurias left
moritz_ that kinda delays the connection to Math::Model (which now assembles all the data in the necessary format, or at least close enough) 21:23
rakudo: say *[3].(list(1..10)) 21:24
p6eval rakudo 8a5f38: OUTPUT«Any()␤»
21:25 pnate joined 21:30 masak left 21:33 M_o_C joined, M_o_C left, M_o_C joined 21:39 xabbu42 joined, xabbu42_ left
FardadJalili says goodbye 21:39
21:39 FardadJalili left 21:41 xabbu42_ joined, xabbu42 left, xabbu42_ is now known as xabbu42
diakopter rakudo: say { }\{ }.WHAT 21:41
p6eval rakudo 8a5f38: OUTPUT«List()␤»
21:43 ciphertext left
diakopter rakudo: say \{ }\{ }.WHAT 21:44
p6eval rakudo 8a5f38: OUTPUT«Capture()<0x3c25f90>␤»
21:46 SmokeMachine left
diakopter moritz_: 21:47
ping
perlesque: # hi 21:48
p6eval perlesque: OUTPUT«sh: mono: command not found␤»
diakopter moritz_: something broke ^^
Visitor99 rakudo: my Int $i = 1.0; 21:52
p6eval rakudo 8a5f38: OUTPUT«Type check failed for assignment␤ in '&infix:<=>' at line 1␤ in main program body at line 11:/tmp/ToKeuz_fTK␤»
Visitor99 rakudo: my Rat $i = 1;
p6eval rakudo 8a5f38: OUTPUT«Type check failed for assignment␤ in '&infix:<=>' at line 1␤ in main program body at line 11:/tmp/D8G1Orc7Um␤»
Visitor99 why those fail? I can understand the first, but... why 1 is not accepted as a Rat? 21:53
21:54 alester left
jnthn Visitor99: Int is not a Rat 21:57
rakudo: say Int ~~ Rat
p6eval rakudo 8a5f38: OUTPUT«0␤»
sorear TimToady: Under what circumstances is a contextual considered to be "is bindable"?
Visitor99 rakudo: say 1.WHAT 21:58
p6eval rakudo 8a5f38: OUTPUT«Int()␤»
Visitor99 rakudo: say (1.0).WHAT
p6eval rakudo 8a5f38: OUTPUT«Rat()␤»
22:03 mberends joined
jnthn o/ mberends 22:05
mberends \o from distant Lund ;)
jnthn It's harder to be distant in this appartment than my previous one. :-) 22:06
mberends there's no place like 192.168.1.100 :) 22:08
jnthn ooh, yes, that's a good comfyspot.
22:09 ejs joined
sorear Would anybody mind if I moved viv to all tabs or all spaces? The inconsistency is getting to me 22:14
22:14 tedv joined
Tene reminded of www.emacswiki.org/pics/static/TabsSpacesBoth.png 22:16
(the first hit on google for: mix tabs spaces) 22:17
[Coke] tene++ 22:18
22:20 mee left 22:28 xabbu42_ joined, xabbu42 left, xabbu42_ is now known as xabbu42, ash__ left
jnthn rakudo: say (*-3).signature.perl 22:33
p6eval rakudo 8a5f38: OUTPUT«:(;; Mu $x)␤»
jnthn my $x = (*.foo(say(42))); 22:37
rakudo: my $x = (*.foo(say(42)));
p6eval rakudo 8a5f38: OUTPUT«42␤»
22:47 xabbu42_ joined, xabbu42 left, xabbu42_ is now known as xabbu42
lue oboy t-storm. Goodbye for now [shutting down] o/ 22:51
22:52 lestrrat is now known as lest_away, lue left 22:54 Schwern joined 22:55 k23z__ joined 22:58 Guest23195 left, Visitor99 left 23:03 azert0x left 23:07 Sarten-X left
masonkramer it might be dividing by zero to even ask this question, but, does perl6 have AUTOLOAD? 23:07
23:11 patspam1 joined
jnthn masonkramer: It has a mechanism for doing that kind of thing, see Autoloading section in svn.pugscode.org/pugs/docs/Perl6/Sp...ckages.pod 23:11
23:12 arthur-- joined, arthur-_ left
sorear masonkramer: In theory, yes. In practice, the spec is unusable as written and needs a rewrite. 23:12
23:12 M_o_C left
jnthn sorear: Well, it's at least fair to say that nobody tried implementing it yet anyway, afaik. :-) 23:12
Heh, maybe that's why it needs a rewrite. ;-) 23:13
sorear TimToady: ping
23:15 Sarten-X joined 23:17 cdarroch left 23:20 ejs left
masonkramer (oh...weird...if package declarations require a block, then everything is going to have an extra level of indentation ... ) 23:25
sorear why are you using packages anyway 23:26
23:26 LylePerl left
masonkramer I'm not, I was justing reading jnthn's link to S10 23:27
sorear perl 6 programmers use roles, classes, and modules instead
jnthn sorear: All of which are types of package. ;-)
masonkramer: There is also a semi-colon form for everything except "package"
diakopter real programmers use reverse indentation
jnthn masonkramer: And what sorear said - you don't use "package" really in Perl 6.
23:28 perlygatekeeper left
pugssvn r31369 | jnthn++ | [t/spec] Unfudge a test in advent2009-day19.t. 23:28
r31370 | jnthn++ | [t/spec] Some unfudging and new tests for Whatever currying.
jnthn TimToady: I've got Rakudo doing *.foo currying at compile time now; let me know if you decided which way to swing on keeping $x.foo currying if $x contains *. 23:30
diakopter real programmers use a 3d monitor, and indented text appears farther away than outer text
masonkramer it should appear *closer in* because the most indented parts are the inner loops where all the good stuff happens 23:31
well, mho
dalek kudo: 92e914a | jonathan++ | src/Perl6/Actions.pm:
Curry *.foo at compile time now. Also add = and := to the operators that we do
diakopter I got all these cans of Spaghettios really cheap! Food for months! Hooray! \o/ 23:33
23:33 Wolfman2000 left
jnthn Sounds like a well balanced diet. :-) 23:34
Sleep time for me; night o/ 23:35
sorear Have you checked the price of corn recently? It's quite absurd, or was 23:38
23:39 Wolfman2000 joined 23:44 patspam1 left
masonkramer package "autoviv"...cute...I like...very perly 23:48
23:49 supernovus joined 23:51 supernovus left
masonkramer oh nice... multi CANDO sounds much better than AUTOLOAD...much much nicer 23:56
i love it... 23:57
but the note at the top says that this should be excised
sorear There's one tiny catch.
Because of the way the import system works, any function defined using CANDO is only visible to the module that requested it. 23:58