»ö« | 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.
lue afk 00:00
00:03 mantovani joined
xinming is perlcabal.org down? 00:10
00:13 pugssvn left 00:14 dalek left 00:15 dalek joined 00:16 pmichaud left, pmichaud joined
pmichaud that server seems to be having some sort of connection issue 00:16
afk for a bit 00:17
00:22 pugssvn joined
Wolfman2000 moritz_: I did a test video to see how things would sound. My laptop fan is clearly audible through the whole thing. If you want tutorial videos, I'm unsure if you want that or if there is a way for me to silence it. 00:26
well, if not the fan...then something
00:30 yinyin joined 00:31 masonkramer left, masonkramer joined
sorear jnthn: perl5 and parrot both use custom buffered I/O layers 00:42
sharing a filehandle between them won't work very well 00:43
jnthn sorear: Ah.
Yeah, I guess that's rather non-trivial.
sorear I've got some vague plans to write a proxy object which acts to Perl 5 like a tied filehandle, but forwards I/O to the Parrot buffered I/O engine
jnthn Ah, that would well work. 00:44
*could
sorear blizkost needs a tracker, I think
since it doesn't appear to be possible to handle *all* aspects of interaction equally well... I need to draw the line somewhere 00:45
I also need to come up with a good solution for handling people with a statically-linked perl 00:46
automatically downloading and installing a dynamic perl probably isn't useful since modules aren't shared between perl versions 00:47
00:47 stephenlb left
jnthn sorear: Aye, I'm just feeding you a few little things I've run into from trying to use it a little bit. 00:48
Well, succeeding to use it, actually. :-)
00:48 mberends left 01:00 awwaiid left, tyoshii_ joined 01:05 rgrau_ joined 01:08 whiteknight left
arnsholt std: my Str|Array @stuff; 01:14
p6eval std 31188: OUTPUT«===SORRY!===␤Malformed my at /tmp/2a_jk9FSWH line 1:␤------> my Str⏏|Array @stuff;␤ expecting any of:␤ multi_declarator␤ scoped declarator␤ typename␤Parse failed␤FAILED 00:01 107m␤»
01:18 planetman joined 01:22 planetman left 01:28 stephenlb joined, rurban joined 01:29 Arroz left 01:31 stepnem joined 01:32 rgrau_ left
snarkyboojum proto.perl6.org/ shows now projects currently 01:38
01:39 plobsing joined
snarkyboojum *no projects 01:39
jnthn -> nap, train, plane, bus, metro, beer 01:41
01:48 pyrimidine left
Tene phenny: tell masak that I pushed a basic ratel test. 01:49
phenny Tene: I'll pass that on when masak is around.
01:51 patspam left 01:53 cdarroch left
snarkyboojum looks like some of the repos are currently offline at github, and proto doesn't just cache the previous list, it's throws up nothing/shows not project list when it gets an error - potential enhancement. 01:56
arnsholt std: my Positional[Str|Array] $stuff; 02:03
p6eval std 31188: OUTPUT«ok 00:01 108m␤»
lue ohai again
Is there any way in NQP [or possibly PIR] to use something along the lines of .pick() ? 02:04
02:04 hatseflats left, dukeleto left 02:06 pugssvn left 02:07 pmichaud left, dalek left, hatseflats joined, Juerd left, Juerd joined, pmichaud joined
lue ohai pmichaud 02:08
02:09 pugssvn joined 02:10 rv2733 left
lue hrm, how to create random numbers in NQP ? 02:21
help? 02:24
colomon our Num method rand() {
pir::box__PN(pir::rand__NN(self))
}
snarkyboojum could use rand() in PIR
colomon is the definition of rand in Rakudo.
snarkyboojum heh 02:25
sorear term:<rand>, no?
lue I actually would like to use .pick(), but NQP has it not :/ so, I must use rand. 02:28
02:29 _jaldhar joined, jaldhar left 02:33 jrtayloriv joined, justatheory left, justatheory joined, justatheory left
lue rakudo: say pir::box_PN(pir::rand__NNN(self, 10)); 02:36
p6eval rakudo c43bca: OUTPUT«===SORRY!===␤Symbol 'self' not predeclared in <anonymous> (/tmp/vo6ns_ZSE9:11)␤»
02:37 Gormanilius joined
lue hrmm 02:38
rakudo: say pir::box_PN(pir::rand__NNN(10)); 02:39
p6eval rakudo c43bca: OUTPUT«error:imcc:syntax error, unexpected PREG, expecting '(' ('$P48')␤ in file 'EVAL_1' line 66477126␤===SORRY!===␤syntax error ... somewhere␤»
lue rakudo: my $a = pir::box_PN(pir::rand__NNN($a, 10)); say $a 02:40
p6eval rakudo c43bca: OUTPUT«error:imcc:syntax error, unexpected PREG, expecting '(' ('$P52')␤ in file 'EVAL_1' line 79␤error:imcc:syntax error, unexpected ')' (')')␤ in file 'EVAL_1' line 80␤===SORRY!===␤syntax error ... somewhere␤»
02:41 _jaldhar left, meppl left, tyoshii_ left, _jaldhar joined
lue (getting...very...annoyed) 02:44
02:44 ShaneC joined
colomon rakudo: say pir::box_PN(pir::rand__NN(10)); 02:50
p6eval rakudo c43bca: OUTPUT«error:imcc:syntax error, unexpected PREG, expecting '(' ('$P48')␤ in file 'EVAL_1' line 65694878␤===SORRY!===␤syntax error ... somewhere␤»
colomon rakudo: say pir::rand__NN(10);
p6eval rakudo c43bca: OUTPUT«7.78186193524988␤»
02:52 jrtayloriv left
lue rakudo: say pir::rand__II(10) 02:53
p6eval rakudo c43bca: OUTPUT«2␤»
lue :D Thank you, colomon! I got confused in all the pir:: stuff
02:53 szabgabx left 02:54 poincare101 left 02:55 stephenlb left 02:58 agentzh joined, xuser joined 03:01 snarkyboojum left 03:03 jrtayloriv joined 03:05 szabgabx joined
lue afk feeling happy 03:06
03:09 snarkyboojum joined 03:16 araujo left 03:17 araujo joined 03:19 justatheory joined, pugssvn left, pmichaud left, Juerd left 03:20 hatseflats left 03:21 Gormanilius left 03:23 xuser left 03:53 Guest82930 left 03:56 dalek joined 03:57 pugssvn joined 03:58 pmichaud joined 03:59 hatseflats joined 04:00 tedv left 04:01 sorear left 04:02 sorear joined, drbean is now known as svk, svk is now known as drbean 04:11 rurban left 04:17 snarkyboojum left 04:21 Juerd joined, ShaneC left 04:23 snarkyboojum joined 04:45 araujo left 04:46 araujo joined 04:54 davidm123 joined 04:58 jrtayloriv left 05:09 saaki joined 05:20 jrtayloriv joined 05:21 Su-Shee joined 05:22 plobsing left 05:25 kaare joined 05:26 kaare is now known as Guest44837 05:31 jrtayloriv left 05:36 orafu left 05:37 orafu joined 06:02 davidm123 left 06:06 justatheory left
pugssvn r31189 | moritz++ | [S06] print default usage messag to standard output, by petition from avar++ 06:11
06:13 TiMBuS joined 06:16 uniejo joined
dalek kudo: 51dfa74 | patrickas++ | src/core/MAIN.pm:
Correct handling for case sub MAIN('add' , ) {}
06:18
kudo: 9c0f9ec | (Patrick Abi Salloum)++ | src/core/MAIN.pm:
Much better sub dispatching thanks to jnthn++
kudo: d1aeb84 | moritz++ | src/core/MAIN.pm:
USAGE is not polluting the user's space anymore. If the user defined a sub USAGE
moritz_ phenny: tell avar that the current commits to rakudo wrt USAGE sub print to STDOUT again
phenny moritz_: I'll pass that on when avar is around.
ingy leto++ helped me add a PIR emitter and a PIR parser!!! to cdent
this means I can compile p6 js and py modules to pir
and I can compile pir modules to a dozen different languages 06:19
:)
moritz_ wow, I wish I could compile Perl 6 modules :-)
ingy :)
moritz_ once you can compile modules, compiling programs / mainline code should be SMOP 06:20
and then you're done
ingy I'll need to think about that after sleep
I need to update cdent.org/examples/hello-world/
06:24 mjk joined 06:26 szabgabx left, mjk left, mjk joined
snarkyboojum ingy: broken link on cdent.org/examples/ 06:32
06:33 mjk left, yinyin left
snarkyboojum ingy: and cdent.org/home/ 06:36
ingy: and Source Repository and Installation under the Download left hand nav 06:39
06:40 yinyin joined 06:41 jrtayloriv joined 06:42 REPLeffect left, pnate left 06:43 pnate joined 06:50 jrtayloriv left 06:52 yinyin left, yinyin joined 06:54 snarkyboojum left 06:58 Ross joined
tao_ is perl6 ready for everyday use? 07:14
Su-Shee depends on what you use every day. ;)
tao_ is it stable enough? 07:15
like
if it was in debian
would it be in testing or unstable?
Su-Shee no idea what that means. I don't use debian.
try it, do stuff and see for yourself. 07:16
tao_ I am not that proffesional to judge like that :O
i belive perl6 will be superawesome 07:17
it'll kill haskell and java
Su-Shee tao_: just try and play with it, you'll see. 07:18
tao_ yeah im playing with it 07:19
with rakudo
but having a compiler would be cool too
just imho
moritz_ good morning 07:30
TheDamian++ contacted me by mail, asking for a rationale for printing USAGE messages to STDOUT
sorear stares at RT#75668 07:31
moritz_: LHF
moritz_ sorear: then write a patch :-) 07:34
not obvious to me how to fix it
arnsholt Did anyone ever write an @*ARGS parser module? 07:36
moritz_ arnsholt: we have sub MAIN
07:36 sorear left
arnsholt MAIN does parameter munging from @*ARGS? 07:37
moritz_ arnsholt: the backend logic in src/core/MAIN.pm comes very close to a traditional option parser
yes
it introspects the signature of MAIN
and uses that as specification for options
arnsholt Nifty. I've learnt something already today, then
Hopefully that bodes well for my exam ^^
moritz_ patrickas++ implemented most of it these past three weeks 07:38
and we've plugged it into rakudo this week
arnsholt: good luck with your exam(s)
dalek kudo: d59da85 | (Solomon Foster)++ | src/core/Real.pm:
Change Real.Str to use Num instead of Bridge internally. (Results should be
arnsholt Thanks. It's just the one, thankfully
moritz_ topic? 07:39
arnsholt Gothic and proto-Norse 07:40
=)
mathw Can't help with that
moritz_ only knows proto-regexes :-) 07:41
mathw But now I've got two people to wish good luck to
arnsholt: good luck!
arnsholt Thanks
Su-Shee mathw: gir sounds really interesting. 07:44
mathw Su-Shee: yup 07:45
the Python bindings are moving over to using it exclusively
and the JavaScript bindings already do
seems to work very well for them
Su-Shee mathw: what I didn't get from reading around: do the libs you apply gir on have to use gobjects or can you use it for _any_ c lib? 07:46
mathw it's for GObject 07:50
Su-Shee a really well done OO api for gui would be really nice. 07:52
pugssvn r31190 | moritz++ | [S06] more elaborate $*OUT/$*ERR selection for USAGE printing 07:54
r31190 |
r31190 | This should make both avar++ happy who wants './prog --help|less' to DWHM,
r31190 | and also TheDamian, who wants in good UNIX tradition a pipe of the form
r31190 | './prog | sort > file' to print usage messages to $*ERR to catch mistakes.
mathw Su-Shee: I intend to ensure it happens, either by doing it myself or encouraging others. 07:55
Probably a mixture of both
07:58 Cognominal joined, westery joined
Cognominal Rakudo: say "hi" 08:00
moritz_ p6eval is case sensitive
rakudo: say "hi"
p6eval rakudo 9c0f9e: OUTPUT«hi␤»
Cognominal Damn iPod
moritz_ Does It Capitalize Everything Except iPod? :-) 08:01
mathw I imagine it does the start of lines
thinking they're the openings of sentences
rather like my phone does
08:01 westery left
mathw touchscreen input is not usually designed for programmers. Or for entering complex passwords. 08:01
Su-Shee mathw: I'll support you/the idea/the code then. 08:03
mathw: or code little examples or something.
08:04 szabgabx joined
mathw \o/ 08:05
Su-Shee (and that also means that I can have my native cairo-clutter based wiget set more easily :) 08:07
08:11 szabgabx left 08:13 sorear joined, Cognominal left 08:17 szabgabx joined
szabgabx rakudo: ("ab dddd", "ac yy xx").grep(m/\S/).map({"<$_>"}) 08:17
p6eval rakudo 9c0f9e: ( no output )
szabgabx rakudo: ("ab dddd", "ac yy xx").grep(m/\S/).map({"<$_>"}).perl
p6eval rakudo 9c0f9e: ( no output )
szabgabx rakudo: ("ab dddd", "ac yy xx").grep(m/\S/).map({"<$_>"}).say
p6eval rakudo 9c0f9e: OUTPUT«<ab dddd><ac yy xx>␤»
moritz_ szabgabx: try /\S/, not m/\S/
szabgabx rakudo: ("ab dddd", "ac yy xx").grep(m/\S/).map({"<li>$_</li>"}).say 08:18
p6eval rakudo 9c0f9e: OUTPUT«Method 'postcircumfix:<{ }>' not found for invocant of class 'Str'␤ in <anon> at line 1␤ in 'say' at line 5623:CORE.setting␤ in 'say' at line 4655:CORE.setting␤ in 'Mu::say' at line 1137:CORE.setting␤ in main program body at line 11:/tmp/OCIR5KttOB␤»
szabgabx rakudo: ("ab dddd", "ac yy xx").grep(/\S/).map({"<li>$_</li>"}).say
moritz_ szabgabx: m/\S/ matches immediately, and doesn't pass the regex to grep at all
p6eval rakudo 9c0f9e: OUTPUT«Method 'postcircumfix:<{ }>' not found for invocant of class 'Str'␤ in <anon> at line 1␤ in 'say' at line 5623:CORE.setting␤ in 'say' at line 4655:CORE.setting␤ in 'Mu::say' at line 1137:CORE.setting␤ in main program body at line 11:/tmp/wglGSnfnCh␤»
szabgabx the problem seem to be in the map
rakudo: ("ab dddd", "ac yy xx").map({"<li>$_</li>"}).say
p6eval rakudo 9c0f9e: OUTPUT«Method 'postcircumfix:<{ }>' not found for invocant of class 'Str'␤ in <anon> at line 1␤ in 'say' at line 5623:CORE.setting␤ in 'say' at line 4655:CORE.setting␤ in 'Mu::say' at line 1137:CORE.setting␤ in main program body at line 11:/tmp/ctKG_3hxVJ␤»
szabgabx rakudo: ("ab dddd", "ac yy xx").map({"<li>" ~ $_ ~ "</li>"}).say
p6eval rakudo 9c0f9e: OUTPUT«<li>ab dddd</li><li>ac yy xx</li>␤»
szabgabx oh, that did not work on my machine :) 08:19
08:19 sorear left
moritz_ rakudo: say {"<li>$_</li>"}.WHAT 08:19
p6eval rakudo 9c0f9e: OUTPUT«Block()␤»
moritz_ doesn't understand the problem
szabgabx you mean my problem? 08:20
or rakudos problem?
std: ("ab dddd", "ac yy xx").map({"<li>$_</li>"}).say
p6eval std 31190: OUTPUT«ok 00:01 109m␤»
moritz_ rakudos problem
ah 08:21
now I see
$_</li>
is a postcircumfix
szabgabx oh
moritz_ just like %h<stuff>
and STD.pm doesn't complain, because the syntax is valid
szabgabx std: ("ab dddd", "ac yy xx").map({"<li>{$_}</li>"}).say
p6eval std 31190: OUTPUT«ok 00:01 106m␤»
szabgabx rakudo: ("ab dddd", "ac yy xx").map({"<li>{$_}</li>"}).say
p6eval rakudo 9c0f9e: OUTPUT«<li>ab dddd</li><li>ac yy xx</li>␤»
szabgabx thanks 08:22
moritz_ you're welcome 08:23
it's a bit wtf-y
08:27 dakkar joined, eternaleye_ joined 08:28 eternaleye left 08:33 gfx joined 08:38 gfldex left 08:50 snarkyboojum joined 08:56 clintongormley joined 08:57 rob-_- joined 09:23 gfx left 09:34 yinyin left 09:45 masak joined
masak oh morning, #perl6. 09:47
phenny masak: 01:49Z <Tene> tell masak that I pushed a basic ratel test.
masak nice.
rakudo: grammar G { rule TOP {^ foo } }; say ?G.parse("foo") 09:48
p6eval rakudo d59da8: OUTPUT«1␤»
masak rakudo: grammar G { rule TOP { ^ foo } }; say ?G.parse("foo")
p6eval rakudo d59da8: OUTPUT«1␤»
masak I'm trying to find a case where rt.perl.org/rt3/Ticket/Display.html?id=75668 manifests as a bug. 09:49
moritz_ rakudo: grammar G { rule TOP { ^ \S+ } }; say ?G.parse("+")
p6eval rakudo d59da8: OUTPUT«1␤»
moritz_ rakudo: grammar G { rule TOP { ^ \S+ } }; say ?G.parse(" +")
p6eval rakudo d59da8: OUTPUT«0␤»
moritz_ rakudo: grammar G { rule TOP {^ \S+ } }; say ?G.parse(" +") 09:50
p6eval rakudo d59da8: OUTPUT«1␤»
moritz_ well, I guess it's correct here, if less-than-awesome
a rule is non-backtracking
so the initial, implicit <.ws> matches a space
and then ^ fails
boom 09:51
snarkyboojum I saw that when trying to get an advent test going
moritz_ so rakudo should only change if the spec special-cases it
let's wait what TimToady has to say about it. 09:52
masak ah. so a possible non-bug. 09:53
mathw This is why I don't use 'rule'
All that implicitness confuses me 09:54
moritz_ in general it's highly desirable for the leading space to be significant 09:57
snarkyboojum actually scratch what I said about the advent test.. could just look like the same sort of thing
09:57 gfldex joined
masak inside [] groups, leading space *isn't* significant. sorear++ made a spec clarification about that recently. 10:04
moritz_ that's not "in general" but "in []" :-) 10:05
masak stackoverflow.com/questions/3018456...am-running 10:07
moritz_ we have a patch for that in rt 10:08
but I didn't want to apply it without feedback from pmichaud
masak if it's the patch I'm remembering, pmichaud was a bit hesitant about doing it that way. but maybe it's a new patch.
moritz_ I think it's a new patch, but I'm not sure 10:09
pugssvn r31191 | moritz++ | [t/spec] --help should produce a usage message to $*OUT, normal dispatch failure to $*ERR 10:12
mathw Is anybody replying to the StackOverflow question to say there's a patch in the works? 10:15
moritz_ rt.perl.org/rt3/Ticket/Display.html?id=73148 10:18
moritz_ replies 10:19
mathw moritz_++ 10:21
moritz_ it's not a particularly good reply :(
10:36 Guest44837 left 10:39 jaffa4 joined 10:54 mjk joined 11:11 kfo_ joined 11:15 kfo left, kfo_ is now known as kfo 11:28 Bzek joined 11:29 jhuni joined 11:37 rv2733 joined, quester_ joined
quester_ . 11:38
moritz_ you have a point :-) 11:39
masak borrows it to dot an "i"
moritz_ the week is nearing its end, time to think about next week's challenge 11:41
any ideas?
I have a very selfish and idea: implement automatic step size adaption in Math::RungeKutta 11:42
but it's only Perl 6 userland code, not Perl 6 development per se
masak indeed. feels like we could easily find something closer to the main trunk of development. 11:45
moritz_ diakopter: anything in csmeta/sprixel/perlesque that you could hand over to a beginner? 11:47
11:51 envi^home joined 11:57 TiMBuS left 12:00 bluescreen joined, bluescreen is now known as Guest41775
arnsholt Are Perl 6 blocks labelled with the same syntax as in Perl 5? 12:03
moritz_ yes
arnsholt Excellent 12:04
masak can you do 'next LABEL' and have it dynamically find the LABEL? 12:08
moritz_ not sure... need to read S04 for that 12:09
12:09 ciphertext joined
takadonet morning all 12:09
masak \o 12:13
quester_ moritz_: I redid the git format-patch for rt.perl.org/rt3/Ticket/Display.html?id=73148, so if you've been having problems merging it, it should go in more smoothly now. (For some outlying values of "should" and "smoothly".)
moritz_ quester_: thanks. I still want to get input from pmichaud before applying it though 12:14
12:14 awwaiid joined
quester_ moritz_: Yes, of course. Thank you. 12:15
12:21 mjk left 12:25 pmurias joined 12:31 masonkramer left, masonkramer_ joined, masonkramer_ is now known as masonkramer 12:39 [hudnix] left
moritz_ rakudo: (1...2).perl 12:59
p6eval rakudo d59da8: ( no output )
moritz_ rakudo: say (1...2).perl
p6eval rakudo d59da8: OUTPUT«(1, 2)␤»
moritz_ rakudo: say (4...^5).perl
p6eval rakudo d59da8: OUTPUT«(4, 3, 2, 1)␤»
moritz_ now I'm confused 13:00
rakudo: say (^5).perl
p6eval rakudo d59da8: OUTPUT«0..^5␤»
13:00 agentzh left
moritz_ rakudo: say (4 ... 0, 1, 2, 3, 4).perl 13:00
p6eval rakudo d59da8: OUTPUT«(4, 3, 2, 1)␤»
moritz_ why does it throw away all those additional values? bug? 13:01
colomon, any idea?
masak I'd say it's a bug, yes.
moritz_ masak: care to submit it? 13:02
masak submits it
hm, should en.wikipedia.org/wiki/Parrot_virtual_machine be updated to mention not only PGE, but also nqp-rx?
moritz_ masak: btw I found it while checking an older bug report of yours, RT #72912 13:03
which seems to be resolved, just needs tests
moritz_ takes it
colomon you rang?
moritz_ yes, should be updated
colomon oh, that's easy. bug
well, NYI
moritz_ ok
masak I'll include that in the ticket.
13:04 szabgabx left 13:05 rv2733 left
moritz_ never concisouly understood the relation between imutability and laziness, but yesterday's conversation here made it clear to me 13:06
masak I think I need to read that conversation in its entirety... but what's the relation? 13:07
pmurias moritz_: re anything in perlesque to be handed to a beginner, perlesque needs a lot of test writting 13:11
13:11 sjn joined
moritz_ masak: iterating lazily over mutable arrays is going to cause lots of confusion 13:11
masak pmurias: any clearly delimited task?
moritz_ pmurias: is that something on a level that Perl 6 beginners can do it?
13:12 rgrau left
masak moritz_: sounds like Java's ConcurrentModificationException... 13:12
moritz_ masak: never heard of it
masak java.sun.com/j2se/1.4.2/docs/api/ja...ption.html 13:14
buubot: eval my @a = (1, 2, 3); my $i = 4; for my $elem (@a) { print $elem, "\n"; push @a, ++$i if $elem % 2 }
buubot masak: 1 2 3 5 6 7 8
masak Perl 5 clearly has at least some resilience in this area.
rakudo: my @a = 1, 2, 3; my $i = 4; for @a -> $elem { say $elem; push @a, ++$i if $elem % 2 } 13:16
p6eval rakudo d59da8: OUTPUT«1␤2␤3␤»
masak I half-remember a p6l discussion about this. the list in the for loop is cloned, because we cannot guarantee that what we're iterating over is one single array anyway. might as well be 'for @a, @b -> $elem'. 13:17
I *think* that was the rationale. it doesn't feel very strong now that I recount it. 13:18
moritz_ my "enlightenment" was that laziness worked so well in haskell because there's so little mutable data that can cause such problems 13:19
pmurias masak, mortiz_: it's looking at the list of thing perlesque supports and write tests for that
moritz_ pmurias: 1) that's not specific enough; We'd have to pick one subject
pmurias: 2) writing tests for a language you're just learning isn't easy for most people
pmurias moving the laptop outdoors & 13:20
13:20 pmurias left
moritz_ when you write a test, you never know if it's right or wrong 13:20
masak moritz_: right. I've had the same feeling about Clojure. it works so hard at immutability (for that very reason) that even seemingly mutable structures are immutable.
moritz_ when you write "normal" code, you need much less confidence, because running code tells you if it works
I'd love to set people out to write tests, but it'd be much more concrete, with pointers to small parts of the spec, a defined scope... 13:21
mathw yes, laziness works superbly well with immutability 13:25
13:25 pmurias joined
masak is it too early to take a guess at common pitfalls for lazy lists in Perl 6? 13:25
how will users shoot theirselves in the foot? 13:26
moritz_ masak: it's too early for me at least, because there are many corner cases of laziness in Perl 6 that I don't understand
masak right. 13:27
colomon well, for sure if you write something with gather / take and side effects, things will get dicey.
pmurias shouldn't common pitfalls be found by observing usage instead of guessed (just like questions in an FAQ)?
colomon moritz_: there are many corner cases of laziness in Perl 6 that no one understands yet.
moritz_ pmurias: yes, they should; sometimes it's fun to predict though
masak do I understand it correctly that if you bind an array variable to a gather construct, and then never access it, the gather block is never executed? 13:28
colomon masak: probably.
moritz_ masak: it *may* be executed, but it's not forced to
masak moritz_: I don't like that that aspect isn't nailed down. 13:29
moritz_ it's not strict laziness as in haskell, afaict
colomon masak: I think you're going to have to live with that.
masak so it *may*, in the case of an infinite list, run forever?
that kinda sucks.
moritz_ nope
masak oh? what's the difference I'm missing? 13:30
moritz_ for infinite lists it may not run forever
masak er.
moritz_ an implementation is allowed to batch the next 10 values
pmurias moritz_: in haskell things may execute in a strange order, but because of the purity you can't observe that
masak moritz_: oh, ok. I still don't like it, but I can live with that.
moritz_ but it's not allowed to batch *all* values
it just may turn out that all < 10 in some cases :-) 13:31
masak is that 10 in the spec, or is it impl-dependent?
moritz_ impl-dependent
it's like the difference between unbounded and infinite
masak so I can make an impl that batches 0 elements? good.
moritz_ there's no upper bound to the batching, but it may not be infinite 13:32
13:33 uniejo left
pmurias moritz_: where is that specced? 13:33
moritz_ pmurias: S07 iirc 13:34
though I don't know how much that still reflect @larry's mind
13:35 Trashlord left
pmurias should start coding instead of relaxing on irc on the terrace... 13:36
13:36 Trashlord joined
masak yesterday, I ran into a Null PMC access when trying to adapt Buf.decode to the new ByteBuffer. I don't really know how to debug it; as far as I can see, I'm not doing anything different from what byetbuffer.t is doing. 13:37
I literally took a piece of code from in there and put it in the PIR block of my method.
moritz_ there are some differences between plain PIR code and PIR blocks embedded in Perl 6 13:38
13:38 ggoebel joined
moritz_ for one you're in a different HLL 13:38
[Coke] masak: show me the code?
moritz_ I think I've observed once that .local doesn't work n PIR blocks, but I could be wrong
there are also not all registers available in embedded PIR blocks 13:39
like $P11 or so
masak [Coke]: gist.github.com/434483 13:40
moritz_: I used .local in Str.encode without a problem.
moritz_ where does it Null PMC access? 13:41
masak line 19, AFAICT.
moritz_ oh
%r = box s
rakudo doesn't like anything bug PMCs as return values
masak oh!
trying that.
[Coke] or just %r = bb.'get_str...' 13:42
13:42 rgrau joined
moritz_ does that return a PMC? 13:42
13:42 vdrab joined
[Coke] if %r is a pmc, yes. 13:42
methods should autobox. 13:43
moritz_ parrot never ceases to amaze me - in both ways :-)
masak only two ways? :P
moritz_ positive and negative
ok, and unexpected-but-not-really-good-or-bad 13:46
masak reminds me of '... experiencing our two emotions (fear and not fear)' from ieet.org/index.php/IEET/more/2181/ :P
now the code doesn't crash! moritz_++ 13:47
moritz_ \o/ 13:48
does it also produce sensible output? :-)
mathw Or does it just explain the universe in Common Lisp
13:53 quester_ left 13:58 fda314925 left 14:00 cggoebel joined 14:01 dolmen joined, fda314925 joined, ggoebel left 14:03 _jaldhar left 14:07 jhuni left 14:25 dolmen left 14:26 SmokeMachine joined 14:30 plobsing joined
jaffa4 hi 14:36
where did you manage to compile pugs?
14:37 snarkyboojum left
masak jaffa4: I'm not sure I understand the question. 'where', as in, 'on which computer'? 14:40
jaffa4 on Windows 14:42
14:42 [mark] joined
jaffa4 was it you who mentioned that you managed to compile it? 14:43
masak I suspect that moritz_, who said yesterday that he built it a while ago, is on Linux.
jaffa4 There are problems on Windows
some functions are not defined
I mean posix functions 14:44
masak I'd ask for a nopaste of those errors, but I'm afraid I won't be any help troubleshooting anyway. 14:48
jaffa4 I think I have managed to understand Haskell to a degree 14:49
here you are... 14:51
pastebin.com/KwjDTUT3
if you change your mind. 14:52
masak I'm looking at it. as I expected, I have no clue what's wrong. maybe someone else will. 14:53
jaffa4 some function definitions are missing 14:56
mathw Hmm
so Pugs has a module which is trying to provide POSIX compatibility, it seems
but it won't build due to missing type constructors and functions
jaffa4 those functions are missing on Windows
mathw I wonder if it's expecting to get them from a platform library which has changed
jaffa4 has it ever compiled on Windows anyway? 14:57
I read that it compiled on Cygwin
but I guess not on pure Windows.
masak jaffa4: www.perlmonks.org/index.pl?node_id=431492
mathw ah so it did used to compile 14:59
in that case I might suspect changes in the Haskell Platform causing the failure
Unfortunately I'm not entirely up to date on those myself
and it's time for me to disappear and have a singing lesson 15:00
&
15:00 plobsing left
pugssvn r31192 | pmurias++ | [smop] Build test runs one test 15:04
15:05 dolmen joined
pugssvn r31193 | colomon++ | [spec] Document Numeric.Real, Numeric.Int, Numeric.Rat, Numeric.Num, and Real.Str. 15:10
15:14 plainhao joined 15:16 wallberg joined 15:17 xabbu42 joined 15:20 dual left
moritz_ my.opera.com/cstrep/blog/2010/06/10...ine-levels cosimo++ 15:20
masak I really think that a tryperl6.org or tryrakudo.org site would make a real difference. we should be thinking about which subtasks can be made into weekly challenges.
pugssvn r31194 | pmurias++ | [smop] all the tests for s0native are run 15:22
moritz_ masak: +1 15:23
masak: I have a rough plan in my head... maybe I should write it down
15:24 justatheory joined
masak moritz_: yes, please do. getting people on the same page (and enthusiastic) is a good thing. 15:24
pmurias what would be nice is to share backends between the evalbot and tryperl6.org 15:25
masak the evalbot needn't preserve state between executions.
but perhaps that's an insignificant difference. 15:26
moritz_ other way round
15:26 ash__ joined
moritz_ the website needs it, evalbot doesn't 15:26
masak that's what I said.
moritz_ ah
I misread needn't for 'need'. Sorry
masak np :)
moritz_ and it makes a whole lot of a difference
masak I once took a look into the trypugs code. there are some scary heroics in there. :/ 15:27
moritz_ because it means we need to have sessions, and keep a process running the background
an interactive $compiler process, that is 15:28
OH NOEZ, autoprinting is b0rked here
./perl6
> 1
(empty line)
maybe that was the MAIN patch... :( 15:29
15:29 Ross left, Ross joined
masak bisection time... 15:30
15:30 Ross left, Ross joined 15:31 rgrau left
moritz_ we need freakin' tests for freakin' EVERYTHING! 15:31
masak t/spec/S01/everything.t 15:32
15:33 xabbu42 left
masak since the jury is still mostly out on nested classes in Perl 6, this might be interesting reading: gbracha.blogspot.com/2010/06/nest-o...asses.html 15:41
15:52 [mark] left 15:59 vdrab left
moritz_ can I check in action methods if something is a known name of a subroutine? 16:03
kinda like $/.CURSOR.is_name, but for routines, not types
it was inded the MAIN sub that broke autoprinting :( 16:04
moritz_--
16:06 isBEKaml joined
isBEKaml hey, folks! 16:07
16:08 perlygatekeeper joined
masak isBEKaml! \o/ 16:08
moritz_ hi
isBEKaml masak: tried building alpha, couldn't just install it at all. (I'm aware `make install` isn't available in it, though)
moritz_ I'm pretty sure it is 16:09
masak it is.
isBEKaml: I have a built alpha here. since it's not changing, I'm pretty sure something other than a recent change must be the problem. 16:10
isBEKaml: you do need an older Parrot, of course.
moritz_ the one in build/PARROT_REVISION 16:11
masak but that will solve itself if you build with `perl Configure.pm --gen-parrot`
isBEKaml pastebin.com/u8XqdqKz
masak my alpha Parrot runs r43486.
16:11 patspam joined
isBEKaml masak: I did use gen-parrot. 16:12
TimToady I note that masak++'s linked nest-of-classes article uses "namespaces" as I use it, and counter to parrot's usage. :)
masak isBEKaml: good. then that's not the issue.
isBEKaml: I don't recognize the error you're getting, but it's not an error in 'make install', it looks like an error in 'make'. 16:13
moritz_ looks like the parrot build or install failed in a non-obvious way
masak isBEKaml: which tells me that something went wrong earlier than what you've nopasted.
isBEKaml masak: I didn't see any error while building it with make. I will try once again. 16:14
moritz_ I'd try to rm -rf parrot parrot_install
TimToady perhaps someone should file a bug against parrot's usage of "namespace"...
moritz_ and then try again with --gen-parrot
masak yeah. start with that.
16:14 [Coke] left
masak TimToady: well volunteered! 16:14
I think you should, fwiw.
isBEKaml masak: yes, building it now. Let's see what happens. :) 16:16
16:16 jedai joined
masak isBEKaml++ # I suspect you're installing alpha for Yapsi :) 16:16
isBEKaml masak: Got a great weekend ahead. Can't wait to get started on Yapsi! :) 16:17
16:17 dolmen left
isBEKaml yay for Friday nights! 16:18
masak excellent. maybe I should land the if branch soonish, then. I think with that one as an example, it won't be difficult for an intrepid hacker to add while loops.
I have a branch with a partial commit that implements the parsing part of if/else.
isBEKaml wonderful. Should get started reading up the source up/down while this builds. 16:19
16:23 meppl joined, dual joined 16:25 jrtayloriv joined 16:26 kensanata joined 16:32 masak left 16:33 ciphertext left
TimToady very odd, the word "TOP" does not occur in the specs... 16:34
16:34 ash__ left 16:35 macdaddy joined 16:36 macdaddy is now known as Guest59148, Ross left, Ross joined 16:38 ash__ joined 16:39 pyrimidine joined 16:44 REPLeffect joined 16:45 _kaare joined 16:47 ash__ left 16:48 pmurias left 16:49 PerlJam joined
moritz_ TimToady: wouldn't be the first regex concept that has been in use for a long before appearing in the specs 16:50
like reduction methods
16:53 jrtayloriv left 16:55 szabgabx joined 16:58 dakkar left
pugssvn r31195 | lwall++ | [S05] mention TOP, and explain how parsing is initiated and how it actually works 17:00
17:02 cdarroch joined, cdarroch left, cdarroch joined
isBEKaml awww, shucks. Now that I read the error message closely, I think I mv'd the folder from testrakudo to alpha sometime. Though I don't actually remember doing it. :( 17:03
alpha built fine now. :) 17:04
pyrimidine moritz_: manage to decomplexify the .trans spec in S05? 17:05
moritz_ pyrimidine: hope, I've hit a Wall :-) 17:06
pyrimidine :)
TimToady there's that missing ascender
on the laziness requiring immutability question, I think it doesn't, actually. I think it only requires decoupling of the side effects of sources and sinks 17:08
17:08 rob-_- left
TimToady i.e. non-deterministic behavior is fine when non-deterministic behavior is fine. :) 17:09
moritz_ "only"
isBEKaml iff? :)
TimToady it is also my (unproven) belief that many cases of interaction can be caught and explained to the user, though of course not all of them. 17:10
and that we can get at the immutability ideal by cultural stricture rather than enforcing it from first principles 17:12
isBEKaml Concerning immutability, is it possible to have "final" variables that are set down by the programmer?
moritz_ TimToady: I've read that some commercial static analyziers (coverity, iirc) removed some concurrency related checks (like dead locks, race conditions) simply becasue they were too hard to explain to the casual programmer
TimToady I could be wrong, but I don't want to invent another useless functional language :)
isBEKaml i.e. variables that can never be modified or changed state once assigned? 17:14
TimToady my vision of laziness is more like a unix pipeline, I guess
you can get races there too...
moritz_ std: my constant $x = 3;
p6eval std 31194: OUTPUT«ok 00:01 108m␤»
moritz_ isBEKaml: like that?
isBEKaml moritz_: yes, that one.
TimToady that is compile-time 17:15
isBEKaml rakudo: my constant $x = 42; $x += 2;
p6eval rakudo d59da8: OUTPUT«===SORRY!===␤Malformed my at line 11, near "constant $"␤»
moritz_ isBEKaml: though it only makes the container immutable
TimToady my $x ::= 3 is run-time readonly
isBEKaml NYI. I guess.
moritz_ not the object stored
so even my $x ::= []; $x.push(3); would not throw an error
TimToady the compiler is free to inline constants, for instance
rakudo: constant $x = 42; 17:16
p6eval rakudo d59da8: OUTPUT«===SORRY!===␤Symbol '$x' not predeclared in <anonymous>␤»
TimToady alpha: constant $x = 42
p6eval alpha 30e0ed: ( no output )
isBEKaml moritz_: container immutable? was that reference immutability and not state immutability?
TimToady but it has it in the 'my' slot
alpha: my constant $x = 42;
p6eval alpha 30e0ed: OUTPUT«Malformed declaration at line 10, near "constant $"␤in Main (file <unknown>, line <unknown>)␤»
TimToady as that shows
moritz_ isBEKaml: $x ::= $thing means you can't assign to $x after that 17:17
isBEKaml: but if $thing has methods that mutate it, nothing going to stop you
isBEKaml moritz_: yes, as I understand it, that's reference immutability.
TimToady my $*FOO ::= 42; means that you can copy 42 into a subscope as a value, and forget about the $*FOO container
but object's values are their reference, so you can still mutate the object, yes 17:18
non-value objects, I should say
the terminology isn't quite clear here... 17:19
isBEKaml again, it looks to me like $x ::= $thing stores the reference to $thing in $x and if $thing has mutators, all bets are off on immutability.
moritz_ right 17:20
TimToady I was agreeing with you
shower & work & 17:21
or is that shower | work &
isBEKaml TimToady: We can push multiple jobs to bg! :) 17:22
moritz_ thinks that TimToady is too mutable to be lazily shared between work and shower at the same time :-) 17:23
so, MAIN sub broke autoprinting on the REPL 17:24
the reason is that I inject a a call to MAIN_HELPER at the end of each compilation unit
because I thought that the return values of compiluation units isn't used
so there are various possible fixes 17:25
17:25 sahadev joined
moritz_ 1) detect that we're in a REPL, and don't emit MAIN_HELPER calls then (pmichaud won't like that) 17:25
2) try to detect if there was a MAIN sub, and only then inject a call to MAIN_HELPER (no idea how to do that though) 17:26
3) generally inject MAIN_HELPER in a way that the return value is passed through (will likely mess up backtraces though)
PerlJam MAIN_HELPER is what does the printing? 17:27
moritz_ rakudo: sub a($x) { 3 }; sub b { die 8 }; a(b())
p6eval rakudo d59da8: OUTPUT«8␤ in 'b' at line 11:/tmp/hgPGpD_Csn␤ in main program body at line 11:/tmp/hgPGpD_Csn␤»
PerlJam (in the REPL I mean)
oh, I guess not from your #1
moritz_ PerlJam: MAIN_HELPER is what detects if there is a MAIN sub, if yes introspects its signature, calls it etc.
PerlJam what is MAIN_HELPER?
moritz_ calls USAGE if the dispatch fails 17:28
PerlJam gotcha
moritz_ 3) probably won't mess up backtraces, but it will cause the last statement not to be in sink context once we detect that. 17:29
4) call MAIN as part of an immediately-after-runtime phaser. Problem is then to obtain a reference to MAIN, and keep its lexical environment 17:30
PerlJam wait ... you call MAIN_HELPER at the end of each compilation unit? How does it know when to call USAGE? If I've got 3 compilation units and the "last" one has MAIN, what does MAIN_HELPER do in the first 2?
moritz_ 5) pray that pmichaud++'s planned YOU_ARE_HERE refactors magically fix it, in short time
PerlJam moritz_: so far,my gut is liking #4 17:31
moritz_ PerlJam: a compilation unit is something like a file, or a line on the REPL
17:31 szabgabx left
moritz_ PerlJam: so in ordinary code (non-REPL) you just have one compilation unit 17:31
(except modules)
so your question is moot
isBEKaml moritz_: uh, isn't that what you're doing in MAIN_HELPER?(obtaining the lexical env and a ref to MAIN) 17:32
PerlJam goes to look at the code. 17:33
moritz_ isBEKaml: yes. And it works now because the call to MAIN_HELPER is in the same scope as the lexical environment of MAIN
isBEKaml so #4 kinda looks circular to me.
moritz_ I don't know if it would still work that way if it fired as a phaser instead
rakudo: say {3; END { 5 }}.() 17:34
p6eval rakudo d59da8: OUTPUT«Null PMC access in type()␤ in main program body at line 11:/tmp/LORCYC3MO8␤»
moritz_ seems like phasers might not solve my problem at all
pmichaud good afternoon, #perl6 17:35
17:35 sorear joined
PerlJam greetings pm 17:35
17:35 eternaleye_ left
isBEKaml hello, pmichaud 17:35
moritz_ hi pmichaud
colomon o/ 17:36
moritz_ pmichaud: if you backlog a few minutes, there's something I'd like to have you opinion on
starting from irclog.perlgeek.de/perl6/2010-06-11#i_2425471
pmichaud 16:34 <TimToady> very odd, the word "TOP" does not occur in the specs...
...it was there.
at one time.
moritz_ I dimly recall that too 17:37
pmichaud not in S05, though.
moritz_ does a long grep in git log -p
pmichaud iirc, it was in S03 under smart matching, before we decided that $x ~~ GrammarName should test that $x does GrammarName
moritz_ it was in S05 17:38
PerlJam It's in my S05 right now
pmichaud (i.e., back when $x ~~ GrammarName was the mechanism for invoking a grammar)
PerlJam: TimToady++ just added it :)
moritz_ removed in r29953, "[S05] kill {*} and #="
PerlJam oh
moritz_ though it didn't explain that TOP is invoced automagically
pmichaud right, automagic TOP was in S03. 17:39
a-n-y-w-a-y
so, what's up today? ;-)
sorear LHF: reply to and close RT#75668 17:40
pmichaud: did I ever manage to actually ask you about NQP-rx and bootstrapping tips? net was flaky last night 17:41
pmichaud sorear: if you did, I missed it.
ah, I see it in #parrot now 17:45
I don't know that I have any specific tips. I know that turning the crank the first time was the hardest.
make sure to have frequent snapshots so you can easily back up without losing an intermediate step. :-) 17:46
sorear moritz_: My patch to fix the bug is ""
17:46 nadim joined
pmichaud as soon as I get lists and closures done, I'll likely be refactoring YOU_ARE_HERE (unless someone else beats me to it), which may invalidate much of the work being done on MAIN. 17:46
probably won't completely invalidate it, but it may cause a lot of things to get ripped out 17:47
17:48 kensanata left
pmichaud goes back to work on lists 17:53
colomon \o/
pmichaud after yesterday's discussion with TimToady++, I have a feeling it's actually solvable now :)
colomon :)
pmichaud a lot of pieces become much simpler when iterators become immutable. 17:54
colomon yesterday's conversation made me feel like I'd completely missed Act 2, if you know what I mean.
but don't let me distract you! ;)
pmichaud it will all be equally confusing when I'm done :-) 17:55
so you haven't missed anything :)
17:55 sahadev left
sorear I always hated mutable iterators 17:56
I feel vindicated
pmichaud well, the lists that wrap the iterators will be mutable, but the iterators themselves will be (conceptually) immutable
17:57 envi^home left
pmichaud sorear: the steps I did for bootstrapping nqp-rx begin around October 28. 17:58
18:01 pmichaud left 18:02 pmichaud joined 18:08 ruoso joined
sorear 2009? 18:15
PerlJam sorear: yes 18:16
18:16 szabgabx joined 18:25 tao_ is now known as d_b 18:26 d_b is now known as tao
pmichaud TimToady: preliminary designs seem to indicate that immutable iterators makes everything _much_ simpler. 18:26
18:26 tao is now known as tao`, tao` is now known as tao|
colomon \o/ 18:32
18:53 kiffin joined, ash__ joined 18:54 kiffin left 18:57 clintongormley left 19:07 pyrimidine left 19:11 patrickas joined
patrickas hello perlsixers 19:13
PerlJam greets patrickas 19:14
colomon \o
patrickas oh ... MAIN broke the repl :-( 19:15
isBEKaml hey, patrickas! 19:16
patrickas hello PerlJam colomon isBEKaml :-) 19:17
19:18 REPLeffect left, REPLeffect joined
patrickas done with the backlog so it seems we do't have an easy fix for MAIN and the REPL! 19:20
isBEKaml patrickas: pmichaud++ is here, no is worry! ;) 19:21
patrickas :-) 19:22
szabgabx hi ppl 19:27
patrickas well untill we have a correct fix maybe we can go with the ugly hack of detecting the repl and not runnign main helper there ... short of totally reverting the patch
hello szabgabx
szabgabx can someone tell me please what do I need to do to have history in the perl6 REPL 19:28
?
pmichaud szabgabx: you need to have readline installed.
sjohnson y0
pmichaud szabgabx: on ubuntu systems, this means installing libreadline5-dev package
szabgabx thanks
patrickas also you probably need a REPL from last week cause this week's is borked :-)
pmichaud (you'll then need to rebuild parrot so that it detects the presence of readline) 19:29
colomon: ping
szabgabx oh
isBEKaml Some Linux distros don't come with readline installed? (hmm, I seem to have taken certain things for granted ;)) 19:30
pmichaud they come with readline installed (ubuntu does), but Parrot doesn't recognize it unless libreadline5-dev is also present.
szabgabx I think upgrading to 10.4 broke it
colomon colomon is away from his computer ... back in about 15 minutes 19:31
pmichaud i.e., Parrot wants to see the readline headers and development files for linking
colomon: okay, no rush
szabgabx I just hardly did any perl6 coding recently
and now I am preparing a talk for tomorrow
pmichaud szabgabx: were you at German Perl Workshop? how did it go?
szabgabx I was there 1 day
pmichaud ah.
colomon (sez his wife :) ) I'll let him know he's been pinged
sorear libreadline-dev is required to use readline from high-level languages
szabgabx and now I am at LinuxTag berlin
sorear there's special magic to allow C programs to run with only libreadline5 itself, but the magic doesn't extend to Parrot and other systems using FFIs 19:32
pmichaud wish I could've made it. Turns out it was better that I remained at home.
szabgabx there were only 70 or 80 ppl
isBEKaml ah, yes. I see now. Ubuntu does seem to suffer from separating dev and userland packages. (Or I may be gnorw :) 19:33
szabgabx and on the first day all the talks were in german
except mine :)
pmichaud colomon (and others): for when you get back -- docs.google.com/Doc?id=dg3jqmpv_16fk7kdjdb # my current notes on lists and iterators
comments welcomed. it now looks straightforward enough that I can begin implementing :) 19:34
19:35 plainhao left
patrickas "this design explores a design" probably "this document"? 19:36
pmichaud fixed.
(note that visitors currently have editing privs -- feel free to add questions/comments at the bottom) 19:37
szabgabx rakudo: say qq<<a>\n> 19:38
p6eval rakudo d59da8: OUTPUT«===SORRY!===␤Confused at line 11, near "say qq<<a>"␤»
pmichaud rakuso: say qq{<a>\n}
rakudo: say qq{<a>\n}
p6eval rakudo d59da8: OUTPUT«<a>␤␤»
szabgabx ty 19:39
pmichaud rakudo: say qq(<a>\n)
p6eval rakudo d59da8: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 11␤»
pmichaud oh yeah, that makes it a function. :-|
rakudo: say qq (<a>\n)
p6eval rakudo d59da8: OUTPUT«<a>␤␤»
pmichaud std: say qq(<a>\n); # curious 19:40
p6eval std 31195: OUTPUT«===SORRY!===␤Unable to parse argument list at /tmp/4ZcRxThRTB line 1:␤------> say qq⏏(<a>\n); # curious␤Couldn't find final ')'; gave up at /tmp/4ZcRxThRTB line 1:␤------> say qq(<a>\⏏n); # curious␤ expecting any of:␤
.. p…
pmichaud std++
19:41 ShaneC joined
patrickas std: say qq(<a>); 19:41
p6eval std 31195: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'qq' used at line 1␤Check failed␤FAILED 00:01 104m␤»
colomon pmichaud: pong
pmichaud colomon: see link above
actually, repasting
Questions/comments/observations:
oooops
colomon already looking.
szabgabx yes that qq( ) confuses me
pmichaud ah.
nm.
szabgabx: any identifier immediately followed by parens is treated as a function call. 19:42
sorear pmichaud: ( without preceding space is disambiguated as a function call
see all the .notfun
pmichaud sorear: yes, I know.
I was just curious to see what error std produced.
isBEKaml pmichaud: I thought Arrays were mutable while Lists are not. (vaguely remembers some conversation here... ) 19:43
pmichaud isBEKaml: *were*
that's a very old design.
basically, forget what you "know" from previous mis-designs :)
also note that Seq is currently gone from this model -- it's not needed yet. 19:44
isBEKaml pmichaud: :). So what is it now? Arrays -> immutable. Lists -> mutable?
TimToady we've realized that Lists and Arrays are essentially the same data structure, but the APIs make different assumptions about keeping values
pmichaud isBEKaml: iterators -> immutable. lists -> mutable.. Array does List
actually, the primary difference I've seen is in how the values are kept. Lists keep the actual values, while arrays do the equivalent of assigning the values to scalar containers 19:45
TimToady basically, if it's a List, you do .get, while if it's an Array, you do .shift to do the same thing
19:45 ShaneC left
pmichaud s/assigning/binding 19:45
TimToady yes, there may be an extra level of indirection in an Array
pmichaud I didn't yet address the notion of .get/.shift in this document. I'm feeling they're ultimately the same. 19:46
TimToady could be
isBEKaml Ah, it's clear now. TimToady++, pmichaud++
TimToady mabye we should throw away both .shift and .get and replace 'em with .pull 19:47
pmichaud wouldn't bother me too much :-)
colomon pmichaud: how would you handle something like a file-reading iterator or a pipe?
TimToady and then push/pull make sense, kinda
isBEKaml One more question, though. In the case of GatherIterators, we have a "world" facing sub .get that throws out values whenever an iterator obj is called. What happens to it?
pmichaud isBEKaml: ?? 19:48
TimToady an iterator wouldn't have a .get method
pmichaud iterator has .reify
colomon pmichaud: it seems like the naive designs will trip up immutability?
TimToady an iterator has a comparable method that returns a new iterator that happens to contain the pulled valued 19:49
pmichaud colomon: a file-reading "iterator" is no longer an "iterator" in this model
TimToady s/d//
or otherwise returns it out-of-band
colomon pmichaud: interesting.
isBEKaml no more .get(), that's better than having one do everything as we have now. :)
pmichaud colomon: IO.lines() returns a List with an iterator that lazily produces lines 19:50
but yes, it would be possible for someone to make things seem "out of order" by manipulating IO before all of the lines have been produced. That's accepted in basically any stream-consuming model we have at present.
colomon pmichaud: that wasn't my worry about it. 19:51
TimToady generally we'll set it up so you have to be explicit when you want to see an iterator; default will always be to hide the naked singularity in a LIst
colomon I was thinking in terms of a given iterator always returning the next value in the sequence, no matter how many times it is called.
pmichaud colomon: right. if we choose to preserve that characteristic into IO, then IO isn't our iterator 19:52
we'll have an IOIter
and it will preserve chains
in fact, IO.lines could be written as
method lines() { gather { take self.get; } } 19:53
with appropriate EOF-handling
colomon pmichaud: I believe that's how it's written now.
pmichaud and since GatherIter already preserves iteration chains, we're in business :)
er, gather { take self.get while ... }
colomon right, and it's a little more complicated because it takes a "number of lines to read" parameter. 19:54
ah, yeah, I guess gather is required to do all the heavy lifting, isn't it?
pmichaud it's not required, but it's trivially available for it :-)
19:55 kensanata joined, Guest41775 left
pmichaud anyway, gather/take can handle our immutability issue for us. 19:56
colomon I mean, gather has to preserve all the immutability properties, and therefore anyone else can use them easily.
pmichaud correct
which is somewhat the point of having a gather/take :)
(to be available for others to use easily)
19:56 pjcj joined
PerlJam I don't quite understand "Binding a positional container to a List actually binds to a flattening clone of the List." particularly that last part about "a flattening clone" 19:56
pmichaud PerlJam: we have flattening and non-flattening lists. that part ok?
PerlJam implicitly or explicitly? 19:57
or, how do I tell the difference?
pmichaud well, lists can be flattening, in which case they reduce parcels and other flattening values into a single sequence
the @ sigil implies "flattening"
my @a = (1, (2, 3), 4); # @a.elems == 4, not 3 19:58
colomon pmichaud: given that .reify returns a Parcel containing N values and M iterators, how do we tell where the values stop and the iterators begin? Is it illegal to return an iterator as a value?
PerlJam colomon: M interators? I thought there was just 1? 19:59
pmichaud colomon: if we need an iterator as a value, we'll capture it
colomon "followed by any additional iterator(s)"
pmichaud colomon: but in general, a List doesn't contain any naked iterators in its reified portion
colomon okay.
pmichaud PerlJam: continuing on...
colomon So working with a List of Lists is fine, but a List of iterators is out. Seems reasonable.
pmichaud sub foo(@a) { say @a.elems; }; foo((1, (2, 3), 4)); 20:00
outputs 4
thus the parcel was flattened
PerlJam and non-flattening?
pmichaud I forget the latest slicing syntax at the moment, but that would do non-flattening. 20:01
PerlJam okay
pmichaud so, "flattening list" makes sense?
PerlJam aye
20:01 Trashlord left
TimToady I'm not sure the *-less sig should flatten 20:01
*@a certainly flattens, and **@a certainly slices 20:02
pmichaud TimToady: that would be a significant spec change if it doesn't.
rakudo: sub foo(@a) { say @a.elems; }; foo((1, (2, 3), 4));
20:02 Trashlord joined
p6eval rakudo d59da8: OUTPUT«4␤» 20:02
pmichaud I'm fine if it is *is* a spec change, I'm just noting that it would be one. :) 20:03
s/is//
20:04 Psyche^ joined
pmichaud PerlJam: so, since we can safely clone any list, the bound container is bound to a flattening clone 20:04
TimToady I'm not sure it is specced.
pmichaud TimToady: well, we asked you specifically about it some time ago, and that was the answer you gave. :-)
PerlJam: this behavior eliminates the problem we had with sub foo(@a) { say @a.elems; for @a { ... }; } where the .elems would end up eating all of the elements of @a so that the subsequent loop didn't see anything. 20:06
(when @a is bound to something that is consumable) 20:07
20:07 Patterner left, Psyche^ is now known as Patterner
pmichaud while preserving the behavior that foo().map( ... ) doesn't mean we keep around all of the elements the list coming from foo() 20:08
(still some wiggle needed in that part of the design)
PerlJam Hmm. 20:09
pmichaud anyway, I'm very happy with this result at the moment, now to try to implement it :) 20:10
it feels "right".
PerlJam (until it doesn't :)
pmichaud true, but so far all of the things I think of become trivial answers in this design. :) 20:11
like the fact that Parcels are self-iterating.
PerlJam so ... I guess if I stop paying attention now, tomorrow when I show up on #perl6 and ask "what's new?" there will be a chorus of "pmichaud++ made lists work"
colomon I'm still perplexed by how we make iterators immutable in this model. The details of it, I mean. It's clear that if they are immutable, most (all?) of the other issues that have plagued us go away. 20:12
pmichaud colomon: the two iterators I gave as examples are immutable
that's the general pattern
each iterator has a value and a reference to the next iterator
(or value*s* and a reference to the next iterator)
colomon pmichaud: I'm looking at GatherIter. What happens if you clone it before $!nextIter is initialized?
pmichaud in general, we don't clone iterators. 20:13
but if we needed to, we could say that cloning implies reification.
isBEKaml .reify doesn't clone but stores state from the current position in the object?
I didn't quite understand what "thunking" meant here... :s 20:14
pmichaud "thunk" means that we perform an operation on an object, and then remember the results for all future references to that object
or something like that
essentially, we ask the iterator "compute your value" once, and then forever more it returns that value
isBEKaml ah, so that matches what I was thought it meant. Thanks for clarifying. 20:15
pmichaud (i.e., it's a lazily generated immutable value)
colomon actually, we ask it to compute its value and its next iterator, right? 20:16
pmichaud sure
the return value of .reify is values + iterators
that's the thunked part
okay, time to head home (I escaped from the house -- was too noisy to think there) and get started on an implementation :) 20:17
bbi30ish 20:18
colomon o/
20:19 masak joined
masak ahoy! 20:19
sorear so basically, an iterator is exactly the same as a Haskell list 20:20
masak TimToady: MyGrammar.parse($filename, :actions($action-object)) -- should be .parsefile, no? 20:21
TimToady nod
sorear ?
TimToady nod 20:22
masak !
TimToady .
colomon sorear: I think that was the idea, anyway.
masak "The experienced user will usually know what's wrong." :) 20:23
colomon I've got to admit I'm still having trouble squeezing my head around how to implement these iterators. 20:24
I guess I can kind of see how to make it work in C++, so it is doable.
diakopter having trouble squeezing my head around how to implement everything
TimToady it's chortles all the way down
colomon but it's not obvious to me how you'd make it work in p6. 20:25
TimToady: I think there's a giant guffaw at the bottom.
isBEKaml I think the difference between Haskell List and P6 Iterator is that the p6 programmer will never deal with iterators directly (naked iterators are not possible, as I understand it) 20:26
TimToady they are, but you have to ask for them
ash__ doesn't gather/take create a 'naked' iterator? 20:27
TimToady as soon as you look at it, it's a list
colomon ash__: not once pmichaud++ is done today.
ash__ got ya 20:28
isBEKaml hmm
TimToady or really, a parcel
but sounds like list and parcel are converging now 20:29
colomon TimToady: they can't, or returning a Parcel from .reify will get real ugly real fast, won't it?
Wolfman2000 moritz_: www.youtube.com/watch?v=WyLYQ56NN60 <-- There's my first video attempt in awhile. It's not perl 6 related, but if you think it's decent enough (and if the laptop fan isn't too loud), then I can look into the Perl 6 video tutorials. 20:30
TimToady colomon: don't see a problem there
and if there is a problem, it can probably be dealt with by explicit return type from .reify 20:31
20:31 Schwern joined
TimToady which suppresses any extra parcel wrapping 20:31
colomon TimToady: if your mechanism for returning the values of a List is a Parcel, and a Parcel is actually a List, how do you ever get the value out? 20:32
it would be .reify all the way out to infinity.
TimToady you explicitly return some other composite type; this suppresses Parcel warpping, as I said 20:33
I don't think that other composite type is necessarily List
colomon Hmmm... actually, it seems to me that having .reify return a Pair could be nice... 20:34
Wolfman2000 ...huh? I don't recall seeing .reify in the Sypnosis before. Wonder what that command is.
TimToady .reify has to return a new cursor (or cursors, in a backtracking setup like regexen), and the value probably rides along with the cursor 20:35
colomon Wolfman2000: we just started discussing it today. it's definitely not in the Spec yet.
TimToady there may be a primitive for extracting that without parcelization
Wolfman2000 ah. new development 20:36
isBEKaml Wait, iterators are bidirectional traversing? I thought we go in one direction until they exhaust themselves out?
TimToady much like regex cursors magically end up with match objects
that is very close to the circularity saw that p6 builds into itself
colomon isBEKaml: they're not bidirectional. 20:37
but they are repeatable.
(I mean, under the new plan.)
TimToady there's a little cloud down there somewhere between cursors and results that is labelled: "Magic happens."
masak grrr... cloud technology. 20:38
TimToady yes, they're repeatable till you throw them away
isBEKaml right, got it.
masak: technology cloud? ;)
or clouded technology, perhaps? :P 20:39
masak I have my email in the cloud. I probably shouldn't. don't want magic to 'happen' to it. :/
TimToady and backtracking an iterator to match a different signature is precisely that; keeping the initial iterator into the list at the point we're trying to bind the set of signatures 20:40
that's the big cloud. this is a little cloud.
20:40 perlygatekeeper left
masak does the fact that iterators are immutable imply that every time you ask an iterator to iterate, it just gives you another iterator? 20:40
TimToady correct 20:41
masak \o/
then I grok.
TimToady just like STD/Cursor does it
or at least pretends to do it when it's not cheating
masak cheating is OK, as long as you're never caught.
20:42 Schwern left
TimToady bbl & 20:43
isBEKaml what I don't grok is:" backtracking an iterator to match a different signature " What does this mean?
maybe I understand signatures specific to methods/subs. I may be sorely gnorw here.. 20:44
pmichaud Actually, I see Parcel and List as different.
Parcel is immutable, List isn't.
(that might not work out to be the real case, but that's what it looks like so far) 20:45
masak makes sense.
I've never wanted to mute a Parcel.
why do Lists need to be mutable?
pmichaud we want to be able to shift elements off of list as they are consumed -- e.g., via map or grep 20:46
so that we aren't keeping reified values around when they're no longer needed
(i.e., so we can implement a real feed/streaming behavior)
more ot the point, we don't want (1..10000).map(...) to have to keep the 10,000 integers around 20:47
so it ends up looking more like
(1..10000).list.map(...)
masak oh, fair enough.
pmichaud and the List is mutable as we remove ("munch") elements off the list as they're being mapped.
sorear does that mean that for @foo { .say } will destroy @foo? 20:48
pmichaud no.
masak why not?
pmichaud because that will end up being for flat(@foo) { .say }
masak ah!
PerlJam those flattening clones we were talking about earlier
pmichaud i.e., the list that gets iterated isn't @foo itself.
20:48 Ross left
sorear and flat() lazily clones the list? 20:48
pmichaud effectively, yes. 20:49
it's not precisely that, but close enough for now. Essentially, flat interpolates the list into its own list
where interpolation means "insert its reified and unreified portions"
and since the iterators are immutable, it doesn't matter if they appear in multiple lists 20:50
pragma_ pmichaud: you look much sexier when you talk without the @ on your name. 20:51
pmichaud doesn't see @'s anyway in his client. 20:52
masak uh, I think I was just referred to as 'a sooth dude' by some russian twitterer... twitter.com/Shiroginne/status/15927032950 :)
PerlJam masak: you are quite soothful.
masak er. s/sooth/smooth/ :) 20:53
I'm not sure "smooth" is a compliment in Russian, though.
colomon I like sooth better.
PerlJam yeah, I like sooth better too :)
masak and I'm pretty sure I didn't say "We are here...". but I should probably send them the ufo URL. :P
PerlJam masak: you think "smooth" in Russian is more like "car salesman smooth" than "cool guy smooth" ? 20:54
masak PerlJam: yeah, might well be.
PerlJam Well, if you sell a Perl 6 car you rack up good will in commission, I think. Sounds like a win still to me :) 20:56
pmichaud "Yes, it's the new Rakudo Perl 6 car! Some of the features aren't yet there yet, and it only goes up to 10kph, and it guzzles gasoline, and some of the seats are still missing, and the seatbelts don't work. But isn't she a beauty?!?" 20:57
masak gets visions of Ballmer o.O 20:58
20:58 SmokeMachine left, supernovus joined
masak www.youtube.com/watch?v=tGvHNNOLnCk 20:58
pmichaud: promise me never to sink that low. :) 20:59
pmichaud masak: *you're* the one being called "smooth" :-)
masak :)
pmichaud and, alas, by working on Perl 6 for as long as I have, I think I've given up any claim to there being a bottom to how low I can sink. :-) 21:00
sorear you get a free pass because you're actually helping
masak hugs pmichaud 21:02
no hugme today :)
moritz_ feather still not reachable?
21:02 hugme joined
masak hugme: hug hugme 21:03
hugme hugs hugme
isBEKaml pugs is hosted on feather, right? i can svn up it...
21:04 wasy_ joined
moritz_ isBEKaml: yes, it's back 21:04
pmichaud I'm thinking very seriously of buying a small solid-state linux box that I can keep on at the house to hold my screen session, since feather has been so flaky.
21:04 wasy_ is now known as wasy
pmichaud Either that or I'll just do it on my already existing server, although they aren't too keen about irc there. :-) 21:04
pugssvn r31196 | masak++ | [S32-str/encode.t] refudgings 21:05
sorear your main computer is a laptop?
pmichaud desktop, but it's a bit heavy-duty to leave on 24/7 21:06
I suppose I could do that.
plus, the desktop does get rebooted from time to time.
isBEKaml moritz_: good. I never thought an svn repo could go down or did it?
21:07 dukeleto joined
Tene pmichaud: I know several people who rent little VMs primarily for purposes like that. 21:07
pmichaud I have a VPS already.... just haven't convinced myself to run screen+irssi on it.
moritz_ isBEKaml: it did
pmichaud I should probably do that.
dukeleto howdy 21:08
masak dukeleto: \o
dukeleto i was wondering if rt.perl.org/rt3//Public/Bug/Display...l?id=75650 was going to get applied, or if it needs to be modified
masak: good $localtime 21:09
21:09 supernovus left
dukeleto the smarts for running parrot_config can be removed if that is not wanted. Having a test for loading bytecode is the most important part 21:10
21:10 supernovus joined
moritz_ dukeleto: do you know which vesion of Test::Harness is required for supporting closures for the exec option? 21:11
21:12 jferrero joined, isBEKaml left
dukeleto moritz_: hmmm, i can try to find out 21:15
moritz_ -> bed 21:16
dukeleto moritz_: 3.12 2008-06-22 21:18
moritz_: TAP::Harness 3.12 added the feature on that date
21:20 SmokeMachine joined 21:21 supernovus left, kensanata left 21:23 foodoo joined
pmichaud A lot of systems are still running Test::Harness 2.64, so that could be a blocker to RT #75650. 21:23
seems to me that one could write a test using run("...") though. 21:25
(write a test in Perl 6 that uses run("...") )
or even qx() 21:26
PerlJam wonders how the latest drupal revelations will ultimately affect the various perl/parrot sites.
sorear revelations? 21:30
21:30 takadonet left 21:38 christine left
dukeleto pmichaud: ok, that is possible 21:42
21:42 tedv joined 21:47 christine joined
masak finds -- and realizes he should probably read -- docs.parrot.org/parrot/devel/html/d...s.pod.html 21:48
21:55 _kaare left
pugssvn r31197 | sorear++ | [STD,viv] Revert to a verified working version (r31153) 22:00
sorear :(
22:09 REPLeffect left 22:11 REPLeffect joined 22:20 REPLeffect left, REPLeffect joined 22:23 foodoo left, diakopter sets mode: +oooo pmichaud PerlJam moritz_ masak, diakopter sets mode: +o colomon 22:28 szabgabx left 22:30 REPLeffect left 22:31 REPLeffect joined
lue sorear: aww 22:34
$everybody: hi 22:35
22:36 tylerni7 left
masak hellue! 22:36
lue masak! Did you catch my latest blog post? 22:37
masak the one with the pretty colo[u]red errors? yes, I did! 22:38
nice work!
diakopter PerlJam: is this what you meant? www.theregister.co.uk/2010/06/10/dr...y_changes/
pragma_ diakopter: you just unsexied pmichaud :(
lue Then I went and added a bright red random prefix to the beginning of each red error. That's why I was trying to get PIR randomization. 22:39
22:40 wallberg left, szabgabx joined 22:41 REPLeffect left 22:42 REPLeffect joined
diakopter pragma_: sorry 22:42
22:42 diakopter sets mode: -o pmichaud, diakopter sets mode: +o pragma_ 22:43 patrickas left
pragma_ :( 22:43
22:44 pragma_ sets mode: +o-o pmichaud pragma_
pragma_ I'd rather be the sexy one. 22:44
masak I'm not sure I understand this sexiness algebra.
22:48 tylerni7 joined 22:49 Su-Shee left
diakopter neither 22:50
22:51 REPLeffect left
lue That reminds me; one time I saw this Star Wars related equation that proved the more stormtroopers, the more likely evil loses. 22:51
[or something like that]
22:52 REPLeffect joined
sorear lue: tvtropes.org/pmwiki/pmwiki.php/Main...OfNinjutsu 22:52
22:54 Chillance joined
masak every day on this channel, I learn something new. :) 22:54
lue The Star Wars equation was huge, factoring in things like how many Jedis and if certain characters were there [IIRC] 22:57
diakopter wow. an aspiring screenwriter might cringe (or rejoice) upon discovering that site 23:01
Tene or just lose several days of any productivity. 23:03
I've learned the hard way to never click a tvtropes link.
diakopter .. or playwright, novelist, comedian, or any other storyteller
Tene abstrusegoose.com/275 23:04
lue I have only heard of the blackhole nature of TvTropes, I guess I was lucky until now.
how do I create a patch w/ git? I've done git add [files] and git commit. Now what? 23:05
23:05 Schwern joined
Tene git format-patch HEAD^ 23:05
or whatever other reference to a previous commit.
That will generate a series of patches, one for each commit in the series 23:06
(use 'git log' to identify the endpoint to start generating patches from, and use the commit id of the commit *before* that one.) 23:07
lue well, nopaste doesn't paste to perl6 anymore ō.o 23:08
[onto gist then]
Tene I didn't know nopaste had a bot on freenode...
diakopter prepares to lose the next 10 days to webcomics 23:10
23:12 REPLeffect left
lue don't worry, they may show up in lost+found/ :) 23:13
gist.github.com/435176 is the colored errors patch. Feel free to look at it. 23:14
Tene lue: why don't you just fork rakudo on github and push commits to your fork. 23:15
Then people can use actual git tools to get your commits and apply them to the rakudo repo
lue Eh, it's how I've done it before. When I commit more often [i.e. 5 days from now], I'll do that. 23:16
Tene 'k 23:17
masak I'd just like to take this moment to point out that I hope colored error messages, nice as they sometimes are, won't become default in Rakudo. 23:18
Tene why? 23:19
sorear TimToady: How is CORE.pad generated? 23:20
23:20 patspam left, patspam joined
masak because I like my tools to work over interfaces that haven't heard of ANSI. 23:21
lue Yeah
masak that's the reason colors aren't on by default in git, by the way.
lue Unless for some reason I need to get rid of it [or I don't feel like it anymore], I'll keep it :) 23:22
masak something like "the benefits to those who benefit are still smaller than the outrage of those who suffer"
sorear also, I'm opposed to hard-coding escape sequences when use Curses:from<parrot> is a possibility
lue (my Unicode motto comes to mind)
23:24 pnate left
sorear buubot: seen pmurias 23:24
buubot sorear: I last saw pmurias saying "(011) . (11)" at Thu Mar 25 12:51:53 2010 Z.
lue You can look at that as a preface to my summer of coding if you like :)
afk
23:25 REPLeffect joined 23:26 cdarroch left
masak 'night, #perl6. 23:27
23:27 masak left
sorear aha 23:33
I have figured out what CORE.pad does
and I can delete it
23:33 REPLeffect left 23:41 Khisanth left 23:49 ash__ left, ash__ joined 23:51 pnate joined, jferrero left 23:52 REPLeffect joined