»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! | Rakudo Star Released!
Set by diakopter on 6 September 2010.
00:11 [particle]1 joined 00:12 muixirt_ joined, xivix left, [particle] left 00:13 rgrau_ left 00:15 muixirt left, muixirt_ is now known as muixirt 00:16 muixirt left 00:23 justatheory left 00:30 pjcj joined 00:33 am0c^ joined 00:34 jferrero left
dalek ecza/master: 6cbd751 | sorear++ | / (5 files):
Implement the regex ~ form

Requires a FAILGOAL in your grammar. Since regex frames are not full call frames, $*GOAL is not set; you should use Cursor.top_goal instead
  (NYI).
00:49
ecza/master: 3a957b5 | sorear++ | / (2 files):
Implement <{ }> code assertions
01:00
01:06 TimToady joined 01:07 isBEKaml joined
diakopter TimToady: wb 01:28
jdv79 n 01:58
02:00 zostay left 02:02 zostay joined 02:23 sftp_ joined 02:24 ironcame1 joined 02:25 synth left, sftp left, ironcamel left, meppl left, coldboot left, TiMBuS left, TiMBuS joined, synth joined, meppl joined 02:26 coldboot joined, snikkers left 02:30 mafs left 02:39 shortcircuit left 02:40 shortcircuit joined 02:50 supernovus joined 02:52 justatheory joined
supernovus A quick question. If I have an object, and I want to dynamically add a new attribute to it, is this possible? 02:57
sorear $object does role { has $.foo }; 03:02
supernovus Hmm, that seems a lot easier than the horrid mess I was trying with $object.^add_method($foo) (which told me that "Modifications to classes are not allowed after instantiation") 03:03
sorear You can't modify classes.
supernovus err, add_attribute that is
sorear You need to create a new class with the attribute, and switch your object to the new class 03:04
whcih is what infix:<does> does
supernovus Yeah, I think does seems like a much better solution :-)
sorear aloha: seen tylercurtis 03:05
aloha sorear: tylercurtis was last seen in #perl6 7 days 14 hours ago joining the channel.
supernovus Awesome, does works great :-D
I know I've been working all day and am tired, as I actually used runtime role composition previously, so it should have been first in my head instead of the horrible hacks I have been trying :-P 03:06
jasonmay that is pretty slick
supernovus I'm writing a plugin for my web framework called Lighter, which is inspired by CodeIgniter (from PHP). What I want to do is make it so that when you do self.load-plugin('Plugin::Name') it dynamically loads the plugin, initialized an object, and then assigns it to self.plugin-name. I had gotten everything but the last step figured out... :-) 03:09
jasonmay rakudo: say IO::Socket::INET.non_existing_method
p6eval rakudo 064702: OUTPUT«Method 'non_existing_method' not found for invocant of class 'Failure'␤ in main program body at line 22:/tmp/lm3N2By2L8␤»
jasonmay for me, said: ... of class ''
supernovus jasonmay: I gues class '' too. Now if you create an object, it shows up as class 'IO;Socket;INET' instead. 03:11
rakudo: my $s = IO::Socket::INET.new; $s.non_existing_method; 03:12
p6eval rakudo 064702: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected␤ in main program body at line 1␤»
supernovus uhh
rakudo: my $s = IO::Socket::INET.new; $s.non_existing_method();
p6eval rakudo 064702: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected␤ in main program body at line 1␤»
03:13 justatheory left
supernovus well, that's different output than what I'm getting in the REPL 03:16
03:20 satyavvd joined, huf joined
sorear jasonmay: Rakudo uses a lot of anonymous classes internally 03:22
03:23 satyavvd_ joined 03:25 satyavvd left, satyavvd_ is now known as satyavvd, nymacro joined 03:26 Sarten-X left 03:32 meppl left 03:34 meppl joined 03:40 ggoebel joined 03:42 pythonian4000 is now known as pythonian4000afk
lue rakudo: say 1, {$^a + 2} ... 9 03:55
p6eval rakudo 064702: OUTPUT«13579␤»
lue rakudo: say 1, {$^a + 2} ... 10 # oh and hi :)
p6eval rakudo 064702:
..OUTPUT«(timeout)151719212325272931333537394143454749515355575961636567697173757779818385878991939597991011031051071091111131151171191211231251271291311331351371391411431451471491511531551571591611631651671691711731751771791811831851871891911931951971992012032052072092112132152172192212232…
lue methinks that's a bug, no? 03:57
sorear no 04:07
the stop condition is a smartmartch
10 means "stop if the value 10 is produced"
you probably want
rakudo: say 1, {$^a + 2} ... {$^a >= 10} 04:08
p6eval rakudo 064702: OUTPUT«1357911␤»
sorear rakudo: say 1, {$^a + 2} ...^ {$^a > 10} # to exclude the stop value
p6eval rakudo 064702: OUTPUT«13579␤»
lue alright. 04:09
04:13 Schwern left 04:14 Schwern joined 04:38 satyavvd left 04:46 \xF0_ left 04:48 \xF0 joined 04:55 pythonian4000afk is now known as pythonian4000
sorear rakudo: my $x = "foo" => "bar"; sub zaz(*%foo) { say %foo.perl }; zaz(|$x) 05:01
p6eval rakudo 064702: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤ in 'zaz' at line 1:/tmp/drBMkycqAH␤ in main program body at line 22:/tmp/drBMkycqAH␤»
05:03 jhuni joined 05:06 _kaare joined 05:14 am0c^ left
supernovus Okay, now I've come across another problem. Is there a way to set a dynamic attribute via indirect call. I know for method calls you can do $object."$method"($param); but it doesn't seem you can do $object."$attribute" = 'new value'; 05:24
sorear that absolutely should work 05:27
rakudobug it
supernovus Okay, yeah, it spit out a nice friendly error: Quoted method name requires parenthesized arguments at line 1, near " = $value;" 05:29
sorear And it's not clear from that what you need to change? 05:30
dalek ecza/master: b4b25d0 | sorear++ | / (4 files):
Implement nonconstant strings in regexes
ecza/master: c75b9ef | sorear++ | / (5 files):
Implement flattening arguments
sorear What should the message be?
$object."$attribute"() = 'new value'
supernovus I tried changing to $object."$method"('new value')... gah! Another sign I should have gone to bed hours ago... 05:31
sorear Hehe. Been there done that. :)
supernovus thanks for the help, sometimes it's just brain failure on my part ;-) 05:33
sorear Sometimes all it takes is another pair of eyes. 05:34
supernovus Well, I certainly can say this channel has always been a huge help. I know I tend to be using some pretty esoteric bits of the language in some of my projects (I think eval("use $modulename") isn't a daily use statement for instance...) but nobody ever questions my madness, just points me in the right direction to fulfil it further ;-) 05:38
sorear eval("use $modulename") is a sign you might want to be using Perl 5 05:41
Perl 6 is a much less dynamic language in that way
I'm not sure yet how much less
supernovus Oh, I certainly don't want to be using Perl 5... way too many years of that. Neah, eval("use $modulename") is my workaround for no 'require' statement in Rakudo. At least three of my projects support dynamically loaded plugins, and that's the workaround to make them work. 05:43
sorear I'm wary of dynamically loading code without the ability to dynamically unload code. 05:44
I'd also like more fault isolation.
supernovus Now that would be interesting, an "unrequire" statement... you'd need an "unimport" to go along with it. Would be interesting. 05:45
Of course, not really important until "require" is implemented ;-) If I knew more about Rakudo's guts, I'd try to make require myself. 05:46
I'm sure a proper require statement would be better than eval("use $module"); if defined $! { die "eval use failed: $!" } :-P 05:48
sorear adds supernovus to the "would prefer eval and try to be separate" list 05:52
supernovus sorear: I thought eval and try were separate already? 05:53
sorear no
eval does 2 things
1. it interprets code in a string
2. it catches exceptions and sets $!
#2 is try's domain, and eval shouldn't be doing it
supernovus Ah, I didn't realize that there was an overlap. How would the call work with try? try { eval("use module") CATCH { die "eval use failed: $!" } } 05:56
sorear you would just use eval("use module") 05:57
if you're just going to die again you don't need to CATCH
supernovus Oh yeah, wouldn't need eval, duh! sorry, brain is really slow tonight. So then for the CURRENT behavior you would do try { eval("blah"); } 05:58
sorear or just try eval("blah");
try takes a <blast>
supernovus Ah, cool. Well, that sounds like a good idea. I'd sure like it if I didn't have to put explicit "if defined $! { die "some eval call failed: $!" }" statements in every single place I use eval! 05:59
06:10 [particle]1 left 06:11 [particle] joined, supernovus left, \xF0 left, \xF0 joined 06:12 skids left
sorear .u 23cf 06:27
phenny U+23CF EJECT SYMBOL (⏏)
06:39 _twitch joined
dalek ecza/master: f014c14 | sorear++ | / (4 files):
Add <alpha> and an <+INTERNAL::cclass> mechanism
06:49
ecza/master: c7274f4 | sorear++ | v6/ (3 files):
Port over mid-level Cursor.pm6 stuff
07:03 Schwern left 07:13 tadzik joined, isBEKaml left
tadzik g'morning 07:14
sorear hey
07:17 kjeldahl joined 07:31 tadzik left 07:37 nymacro left 07:39 nymacro joined 07:41 mavrc joined 07:46 _twitch left 07:47 _twitch joined, wooden_ is now known as wooden 07:54 xinming left 07:56 xinming joined 08:01 xinming left 08:02 xinming joined 08:06 molaf joined 08:10 xinming left 08:12 xinming joined, ggoebel left 08:15 kjeldahl left 08:19 kjeldahl joined 08:24 kjeldahl left 08:26 dju joined 08:32 dju left, dju joined 08:46 Mowah joined
moritz_ rakudo: say 'raboof'.flip 08:46
p6eval rakudo 064702: OUTPUT«foobar␤» 08:47
09:04 y3llow_ left 09:08 am0c^ joined 09:10 [sbp] is now known as sbp 09:31 agentzh joined 09:32 am0c^ left 09:39 icwiener joined 09:40 icwiener left 09:42 Chillance left, icwiener joined 09:53 johann joined 09:57 johann left
moritz_ rakudo: my @a = 1, 2, 3; my $x := @a; .say for $x; 10:01
p6eval rakudo 064702: OUTPUT«1 2 3␤»
10:11 tadzik joined
tadzik o/ 10:12
moritz_ \o 10:18
it seems I have $_ = 'foo'; m:g/./; working
problem is, it doesn't work like 'foo' ~~ m:g/./ 10:19
because m:g returns a list
so it boils down to 'foo' ~~ (Match.new(...), Match.new(...), Match.new(...))
which returns False
rakudo: 'abc' ~~ /(.)(.)/; .say for $/.list 10:39
p6eval rakudo 064702: OUTPUT«a␤b␤»
moritz_ rakudo: 'abc' ~~ /(.)(.)/; .say for $/.flat 10:40
p6eval rakudo 064702: OUTPUT«a␤b␤»
11:01 ggoebel joined 11:03 MayDaniel joined 11:06 pythonian4000 is now known as pythonian4000afk 11:15 masak joined
masak o/ 11:15
moritz_ \o 11:16
11:17 pythonian4000afk is now known as pythonian4000 11:19 MayDaniel left 11:25 ggoebel left, MayDaniel joined 11:26 jhuni left 11:41 mberends left 11:47 pythonian4000 is now known as pythonian4000afk 11:52 satyavvd joined 11:53 mberends joined
masak yay! moritz_, au, TimToady and I are in the CREDIT section of chromatic's book. www.modernperlbooks.com/mt/2010/10/...edits.html 12:26
colomon \o/ 12:27
masak also, quietfanatic++ is funny :) www.christiananime.net/showpost.php...stcount=11 12:28
moritz_ can't even remember what he contributed to the book
masak moritz_: long live Open Source :)
also, au++ has finally hit the limit of the postmodern: twitter.com/audreyt/status/27535583618 12:30
moritz_ what does that translate to?
masak moritz_: 12:31
that was today's distractions, sponsored by Twitter. now back to your regularly scheduled Perl 6.
moritz_: oh, you meant the avatar picture?
I haven't figgered that out yet. haven't tried, though.
the point of the tweet was that it was empty. 12:32
jnthn can has bacon o/
moritz_ doesn't read any scripts besides Latin and a bit of Greek
masak it came right after the tweet "this tweet no verb" :)
jnthn Hopefully this fuels a little 6model hacking today :-)
masak no, I can't decipher au's avatar picture. it looks like Traditional, though. 12:34
if any hanzi expert is around to assist, I'll happily accept clues. 12:35
12:37 satyavvd left 12:40 burning_aces joined 12:43 _twitch left
masak my live "Perl 6" filter is currently (literally) overflowing with Japanese tweets. 12:46
12:46 kcwu_ left
jnthn Nice! :-) 12:47
masak I'm reasonably sure that during his keynote talk, TimToady compared the speed of Rakudo to a turtle's. 12:49
moritz_ would like to see how an electronic filter literally overflows
masak moritz_: there's a 200-tweet limit.
moritz_: and since yesterday, there seems to have been more than 200 tweets. 12:50
s/seems/seem/
moritz_ has even written a Turtle in Perl 6
for solving nonograms
masak recent developments have made me start thinking of the "real" goal or "central" goal of Perl 6. 12:52
and then I found this page: dev.perl.org/perl6/architecture.html
it's outdated in various ways, but I think it still makes a good job summarizing the goal of Perl 6. 12:53
there's easily a whole blog post in there somewhere.
rakudo: class A { has $.b is rw }; given A.new { ."b"() = 42; say .b } 13:00
p6eval rakudo 064702: OUTPUT«42␤»
masak supernovus reported this as not working. it seems to work.
hm, "reported" as in "mentioned on IRC", not "RT'd".
jnthn masak: dev.perl.org/perl6/talks/2000/als/ is an interesting one ot read thorugh too 13:06
13:11 araujo left 13:15 icwiener left, icwiener joined 13:20 Patterner left
moritz_ '"Non-critical built-ins", for example sockets and operating system calls, will no longer be operations in the core of Perl. They'll be in dynamically loaded, possibly automatically loaded, modules. ' 13:25
+1
jdv79 weird. i always thought of sockets as being critical but i guess if you had to make the distinction... 13:30
13:31 Psyche^ joined, Psyche^ is now known as Patterner
jdv79 i guess the exception would be enough info to track down an issue 13:31
moritz_ well, "critical" really depends on your applications
it's critical to have them, but not for all tasks
jdv79 that's what i meant. in a pure sense they are not critical 13:32
moritz_ for example you don't need them to load modules
jdv79 arithmetic ops on the other had would be
*hand
neat idea 13:33
moritz_ maybe we can install "trap" type objects, which load a module and replace themselves with the "real" thing when you call a method on them 13:34
jnthn TrapHOW :-) 13:36
jdv79 lembark would call it a trampoline
who uses that word? 13:37
:)
moritz_ would make IO::Socket.*, DateTime and Date such traps
jdv79: chromatic uses it often :-)
13:40 chturne left 13:59 kjeldahl joined
masak ooh, didn't realize that the whirlpool meme goes as far back as 2000: www.wall.org/~larry/als/talk.html#s-12 14:03
14:04 mberends left
masak here's the pre-fork Perl family tree: www.wall.org/~larry/als/talk.html#s-17 14:05
14:05 nymacro left 14:09 nymacro joined
jnthn masak: Gotta love the quote at the end of that talk. :-) 14:12
"Never promise to complete a project within six months of the end of the year--in either direction."
14:12 kjeldahl left
masak :) 14:12
14:13 agentzh left, zulon joined 14:15 pjcj left 14:21 colomon left, Axius joined
masak "We don't know how long this Perl 6 thing is gonna take. There are still some people using Perl 4 out there." -- Larry Wall, dev.perl.org/perl6/talks/2000/als/larry-als.txt 14:23
14:24 kjeldahl joined 14:30 pjcj joined, burning_aces left 14:35 orafu joined 14:37 ggoebel joined 14:41 Axius left 14:59 cotto left 15:04 chturne joined
masak mfollett++ mfollett.com/if-you-like-x-you-might-like-perl 15:06
15:09 M_o_C joined 15:12 ggoebel left 15:37 skids joined 15:42 xivix joined
xivix Woo! I'm the 200th user! 15:43
ATM.
15:43 xabbu42 joined, tadzik left 15:46 xivix left 15:58 Schwern joined 15:59 tadzik joined 16:01 rgrau` joined 16:03 xabbu42_ joined, xabbu42 left, xabbu42_ is now known as xabbu42 16:13 kjeldahl left, max joined, max is now known as Guest62111
Guest62111 hello I am new here and need advice. 16:14
moritz_ hi
tadzik hello max 16:15
Guest62111 Is perl 6 mature enough to start rewriting my perl 5 scripts? I wrote a ticketing system with perl 5 and it was a bit complex stuff :S 16:16
16:17 isBEKaml joined
tadzik it depends I think. Perl 6 is significantly slower and memory-hungry. How do you define "mature"? 16:18
moritz_ complex applications are already possible in Perl 6, but likely they'll be too slow for now
tadzik s/Perl 6/Perl 6 implementations/
Guest62111 oh I see.. no the system is already having problem of being a bit slow.. maybe I will just wait a bit until the slowness problems are fixed.. 16:21
I hope that will be soon :)
isBEKaml hey guys, what's with rakudo builds taking a long time to get done? This morning it took me over an hour at core.pir when normally it takes 20 mins totally. 16:23
pastebin.ca/1963696
Notice the last few lines, Compiler.pir is repeated.
moritz_ isBEKaml: how much memory do you have available? 16:24
isBEKaml moritz_, 512 megs of ram and a 1 gb swap.
moritz_, I don't think that should be a problem. but the machine is an ancient one, generally. 16:25
16:28 xabbu42 left
moritz_ thinks it might very well be a problem 16:28
isBEKaml moritz_: I noticed one thing, though. Up until I get to core.pir generation, the memory usage was hovering around 200 megs, then it suddenly shot up to 600 megs and ate away steadily. 16:30
moritz_ isBEKaml: well, that's the most memory intensive step 16:31
16:31 Guest62111 left
isBEKaml moritz_: yes, is there any way to cut it down? I'm sure this must have come up earlier on discussions here. 16:32
I'm guessing I can just take out core.pir step from the makebuilds and put it back from somewhere else(the file) 16:33
after all, that's going to be static, if I'm not totally wrong.
16:34 M_o_C left, larry joined
moritz_ right 16:34
no success in splitting up the compilation yet :(
isBEKaml I hope you guys come up with something in the future. I could do it if I know how, but I have no idea. :( 16:35
moritz_ has an idea 16:36
isBEKaml looks on eagerly
moritz_ the difficulty is that the setting acts as an outer scope to the program
so we concatenate all the source code to have it one scope
isBEKaml I saw that - please continue.
moritz_ but... couldn't we split off the parts without lexical symbols onto different files? 16:37
and compile that in a separate step?
isBEKaml erm, I thought they were as good as having them in their own files.
moritz_ many setting files define both methods and subs 16:38
jnthn, pmichaud: ping. See the idea above... does that sound feasible?
isBEKaml moritz_: tell me something that I'm not sure about... From your idea, it sounds like we could generate separate pirs and include them as separate steps than have one huge pir generation step. If, say, I generate Str.pir - wouldn't that cut down the scope ? 16:41
I mean, how do we call into methods that are defined in Str.pir?
moritz_ isBEKaml: the problem are subs, not methods
isBEKaml moritz_: exactly - private scopes in their own classes. 16:42
sorry, I conflated subs and methods - java thinko here. :(
masak Java does indeed conflate subs and methods. 16:43
moritz_ subs go into lexical scopes, methods into classes
masak at least syntactically. semantically it doesn't have subs.
isBEKaml masak: most of the time I code methods into java classes, they are mostly helper methods and hence private.
moritz_ augmenting a class and adding some methods should be possible without having to worry aobut scope
isBEKaml masak: unless they are part of field accessors, of course or some method that I explicitly want public. 16:44
larry rakudo: say 'Back to stone age..!';
p6eval rakudo 064702: OUTPUT«Back to stone age..!␤»
moritz_ larry: building bamboo ships to cross the ocean? 16:45
16:45 shortcircuit left
isBEKaml moritz_: forget the oceans, stoners revered them! 16:45
16:46 shortcircuit joined
larry mortiz_: yeah.. looking for the perfect tool.. 16:47
isBEKaml the perfect tool is always assembly, but hey, you can spare yourself the pain! :) 16:48
16:48 mavrc left
isBEKaml *SCNR* 16:48
16:49 mavrc joined
pmichaud moritz_: which idea...? 16:51
16:37 <moritz_> but... couldn't we split off the parts without lexical symbols onto different files?
that one?
most all of them have lexical symbols. and some day, even class declarations will be lexical entries. 16:52
jnthn pmichaud! \o/ 16:54
pmichaud: Any progress on the PCT::HLLCompiler move?
masak couldn't a PIR concatenating thing be built that compiles the core/**.pm files separately and glues together the resulting PIR? 16:56
pmichaud masak: you still have to get the lexicals in the right place(s)
jnthn It's not quite that simple, I fear. 16:57
masak suspected that
pmichaud and all of the *.pm files are considered to be in a common lexical scope
jnthn It's not just concatenating the PIR, that'd not get you a single lexical scope.
pmichaud ...what jnthn++ said.
16:57 larry left
masak yeah, they belong in the same lexical scope. 16:57
pmichaud I've been brainstorming attempting an approach similar to what the REPL does 16:58
i.e., don't use Parrot's built-in lexical scoping, but create a dynamic hash for it
jnthn: PCT::HLLCompiler is highest on my list
jnthn pmichaud: Thanks.
pmichaud: I spent last week feeling excessively tired and a little unwell, so didn't really get chance to block on it yet. 16:59
But hope to soon.
Well, or hope not to. :-)
pmichaud same here -- excessively tired but expecting to be back onto things soon 17:00
17:01 lola92 joined
lola92 Ciao! can I ask question? 17:02
masak hi! go ahead.
lola92 Can I create frozen binaries of perl6 code ? 17:03
If yes please tell how I am new :) 17:04
masak there is some way to create "fakecutables". 17:06
I don't remember where I read how.
lola92 masak: Last 2 years I used py2exe for my python it makes it easier to give to my windows users so they execute with no headache, I was thinking to move to perl (perl6 :) if that can be done in perl6.. 17:10
17:11 M_o_C joined
masak lola92: so, there's something in Parrot called pbc_to_exe which might interest you. 17:12
flussence isn't the perl6 binary itself created that way?
masak I wish I knew more details. maybe people on #parrot do.
flussence: yes.
jnthn The issue is that the .pir file that Rakudo will spit out with --target=pir is suitable for modules, but is missing some bits for standalone scripts, iirc.
masak the resulting .exe is essentially a full bytecode interpreter along with a huuuge array of bytes.
lola92 masak: oh :( 17:13
jnthn So making a PBC of that doesn't work without manual hacking the file.
masak lola92: well, what did you expect it to be? :)
lola92 masak: just huge :P :D You just made a girl happy :D Let me check pbc_to_exe :) 17:14
jnthn If you can get a PBC file then yes, you can feed it to pbc_to_exe.
masak lola92: ah; here's the reference I was looking for: perlgeek.de/blog-en/perl-6/my-first....writeback 17:16
it's our dear moritz_++ who has scouted the territory, as is often the case.
17:19 \xF0 left, \xF0 joined
lola92 masak: Will it need parrot on the client PCs to work? 17:20
masak judging from the blog post, it will need libparrot. 17:21
lola92 masak: I saw that too. So it will not be just an exe to distribute to clients.. :''( 17:24
masak: But thanks for help :)
masak well no, it will be an exe and libparrot.
lola92: hope you find what you seek. good luck. 17:25
lola92 masak: thanks :) If you ever visit Germany come visit :D Goodbye :) 17:27
masak I'll keep that in mind. :) 17:28
isBEKaml hmmm... perl6.org still points to proto from the "Whatever" section. 17:30
17:31 lola92 left 17:32 justatheory joined 17:34 kjeldahl joined 17:40 zulon left
masak is glad he didn't greet lola92 with "don't ask to ask" :) 17:43
17:45 ggoebel joined
isBEKaml wonders if there's some sort of a culture thing asking permission before asking a question... 17:50
masak isBEKaml: are you wondering, or are you asking? :P
isBEKaml masak: hmmm, I always make mistakes in context. :P 17:51
masak isBEKaml: I'm making an autopun, not making fun of you, fwiw :)
isBEKaml either I put mistakes into context or put context into mistakes. xD
17:51 eternaleye left
masak actually, it's rather a failed autopun... 17:52
17:52 muixirt joined
isBEKaml well, both of us failed there. ;) 17:52
muixirt hi moritz_ 17:53
17:53 eternaleye joined
isBEKaml thinks the mu repo should be broken up into smaller parts.... 17:54
rather huge at 59 megs.
muixirt w.r.t. compiling core.pm I naively ask why does perl6.pbc spew out the resulting pir code in one big chunk?
masak muixirt: one .pm file goes in, one .pir file comes out. 17:55
isBEKaml same questions a couple of hrs apart. Are we running a loop? :O
muixirt is only guessing
isBEKaml muixirt: I asked that a couple of hours ago, fwiw.
masak muixirt: as to the deeper "why", see the IRC logs. things need to be in the same lexical scope. 17:56
muixirt oops
isBEKaml though not the exact question.
17:56 eternaleye left 17:58 eternaleye joined
muixirt masak: I'm under the impression that compiling core.pm perl6.pbc builds up a huge string of pir code. Am I guessing wrong? 17:59
masak core.pm is one huge .pm file. compiling it results in one huge .pir file.
sorear I need help reconciling $<foo> = 1 with "Cursors are logically immmutable" 18:00
masak in between the huge .pm file and the huge .pir file, a lot of memory is used. this is a problem.
sorear: are you talking about modifying $/ in closures in a regex?
sorear yes
masak I've never seen a mention of that particular kind of assignment, but leaving that aside... 18:01
18:02 ggoebel left
masak ...I have the impression that $/ doesn't contain a Cursor but a Match, or (before the regex has finished) a kind of Match-being-constructed. 18:02
muixirt masak: in the end my question is: why is there the necessity to build up the entire pir code in memory instead of print out as the pir code gets generated? (Again, I'm guessing here, surely there are good reasons) 18:03
18:03 timbunce joined
masak muixirt: that's exactly what I asked in the IRC log as well. 18:03
muixirt which time? 18:04
masak muixirt: the answer is that they need to be generated in the same lexical scope.
muixirt: irclog.perlgeek.de/perl6/2010-10-16#i_2918181
muixirt masak: That is another direction, I'm thinking of something different 18:06
isBEKaml rakudo: my $string="a b c d e \n"; my $str=$string.flip.substr(1).flip; say $string.bytes ~ $str.bytes ~ $str;
p6eval rakudo 064702: OUTPUT«1110a b c d e ␤»
isBEKaml parrot++ moritz_ ++ # reverse back in! 18:08
lue rakudo: [+] (.9, {$^a * .1} ... *) 18:09
p6eval rakudo 064702: OUTPUT«(timeout)»
masak rakudo: given Buf.new(0x263A).decode { .say; say .flip } 18:10
p6eval rakudo 064702: OUTPUT«:␤:␤»
isBEKaml .u 263A
phenny U+263A WHITE SMILING FACE (☺)
masak .u :
phenny U+003A COLON (:)
masak huh.
lue I noticed rakudo doesn't handle geometric (series.plural) well. [ or at all, for that matter :) ]
masak lue: and I bet you can guess why... :) 18:11
18:11 timbunce left
muixirt masak: I'm fine with a large core.pm, and of course do compilers need a lot of memorey, but what I like to know is why that 4.7M pir code must be held in memory until the last line of pir code is added and than spewed out (again surely there must be a good reason) 18:11
18:11 cotto joined 18:12 envi left
masak muixirt: I do believe that that's a very reasonable question to ask, yes. 18:12
flussence it's a tree!
masak :) 18:13
18:13 Sarten-X joined
lue it's been a while, but I guess it's either a problem with adding an infinite number of elements, or the fact its not lazy. 18:13
18:13 araujo joined
masak lue: I'd go with option A. :) 18:14
lue wonders if its feasible to get infinite geometric series-es working, and also if its something better suited for a module 18:15
masak better suited for a module, but certainly a fun experiment.
involving introspection of closures.
18:16 justatheory left 18:18 ruoso joined
sorear muixirt: We do it all in memory because it's simpler that way and it doesn't hurt. 18:21
muixirt: A 4.7MB compact byte string is neglible compared to the 400MB of POST::Node objects which are being used to build it. 18:22
masak: this form of assignment is, afaik, only used in STD.pm6. But STD uses it all over the place :(
masak: the problem with the "match being constructed" view is backtracking 18:23
muixirt sorear: well I suspect that this pircode builds up piece by piece, and that costs a lot of memory (string appending)
masak then I suppose it's a question for the guy who wrote STD.pm6.
muixirt sorear: only asking because of 6034 brks and one single write (compiling core.pm) 18:24
sorear muixirt: we use a StringBuilder 18:27
muixirt: the millions of crosslinked hashes which are created are the real problem
masak rakudo: grammar G { regex foo { } } 18:28
p6eval rakudo 064702: ( no output )
lue rakudo: my sub ™($a) { say $a }; ™(3)
masak rakudo: grammar G { regex foo { } }; say "alive"
p6eval rakudo 064702: OUTPUT«===SORRY!===␤Malformed my at line 22, near "sub \u2122($a) "␤» 18:29
rakudo 064702: OUTPUT«alive␤»
sorear 1 AST node = PCT::Node = 1x Object PMC, 1x RPA (for attributes), 1x PMCProxy (for the Capture superclass), 1x Capture, 1x RPA, 1x Hash
masak submits rakudobug
rakudo: my regex foo {}
lue is that (what i did) a known bug?
sorear each of *those* consists of a 16 byte header and a variable size attribute block
p6eval rakudo 064702: OUTPUT«===SORRY!===␤Malformed regex at line 22, near "foo {}"␤»
masak rakudo: my regex foo {}; say "alive"
p6eval rakudo 064702: OUTPUT«===SORRY!===␤Malformed regex at line 22, near "foo {}; sa"␤»
sorear Hashes, in particular, are quite big
moving PCT::Node away from Capture and to a real Object will cut core.pm memory use by around 5 18:30
masak lue: do you know about identifiers and alphanumerics? it's in S02.
sorear pmichaud++ tells me that with the current Object implementation it will be far too slow, and I trust him
muixirt sorear: thanks for the explanation 18:31
masak std: grammar G { regex foo { } }
p6eval std 263c207: OUTPUT«===SORRY!===␤Null pattern not allowed at /tmp/BgWKE1ZX7r line 1:␤------> grammar G { regex foo { ⏏} }␤ expecting quantifier␤Parse failed␤FAILED 00:01 116m␤»
muixirt pets poor parrot GC 18:32
masak rakudo: / /
p6eval rakudo 064702: OUTPUT«===SORRY!===␤Null regex not allowed at line 22, near ""␤»
18:37 xivix joined
isBEKaml rakudo: my $foo, $bar; 18:38
p6eval rakudo 064702: OUTPUT«===SORRY!===␤too few positional arguments: 2 passed, 3 (or more) expected␤»
isBEKaml rakudo: my ($foo, $bar);
p6eval rakudo 064702: ( no output )
isBEKaml is it necessary that I have to enclose multiple variable declarations in parens?
xivix Apparently.
jnthn Yes. 18:39
isBEKaml precedence thing between my and , ?
jnthn my $foo, $bar is like (my $foo), $bar
std: my $foo, $bar;
p6eval std 263c207: OUTPUT«===SORRY!===␤Variable $bar is not predeclared (declarators are tighter than comma, so maybe your 'my' signature needs parens?) at /tmp/tnFW4d59h3 line 1:␤------> my $foo, $bar⏏;␤Check failed␤FAILED 00:01 118m␤»
jnthn "Steal this error"
isBEKaml jnthn: that was what I was asking about. my isn't an operator and hence precedence doesn't need to come in play.
anyway, that's similar to how p5 treats multiple var declarations too. 18:40
xivix rakudo: my ($foo = 1, $bar = 2);
p6eval rakudo 064702: ( no output )
xivix Does rakudo have warnings and/or strict? 18:43
18:44 Schwern left, trek1s joined
tadzik xivix: strictness is default 18:47
xivix That's good. 18:48
Imagine non-strict C.
masak C is a bit too static to be non-strict.
alternatively, C *is* non-strict :) 18:49
jnthn int *x = (int *)42; # not so strict ;-)
xivix I guess.
But it's also all "you didn't declare this earlier." 18:50
masak that's because it's static. 18:51
xivix Right. 18:52
masak actually, Perl 6 has the same property. the lexpad is known by the end of parse time.
xivix I work with ANSI C, which is very picky. 18:53
About everything.
18:57 xivix left, colomon joined, isBEKaml left
masak rakudo: for ^8 { say .fmt("%03b") } 19:08
p6eval rakudo 064702: OUTPUT«000␤001␤010␤011␤100␤101␤110␤111␤»
masak rakudo: for ^8 { .=fmt("%03b"); .say } 19:09
p6eval rakudo 064702: OUTPUT«000␤Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in <anon> at line 22:/tmp/1quR8AafjR␤ in main program body at line 1␤»
masak bug or not? why does it die on the second iteration?
rakudo: for ^8 -> $_ is copy { .=fmt("%03b"); .say }
p6eval rakudo 064702: OUTPUT«000␤001␤010␤011␤100␤101␤110␤111␤»
colomon could it somehow be checking what the value already was? 19:10
rakudo: rakudo: for ^8 { $_ = 0; .say }
p6eval rakudo 064702: OUTPUT«===SORRY!===␤Confused at line 22, near "rakudo: fo"␤»
colomon rakudo: for ^8 { $_ = 0; .say }
p6eval rakudo 064702: OUTPUT«0␤Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in <anon> at line 22:/tmp/0dgx5yH9uo␤ in main program body at line 1␤» 19:11
colomon rakudo: for 0, 0, 0 { $_ = 0; .say }
p6eval rakudo 064702: OUTPUT«Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in <anon> at line 22:/tmp/FPzGS6jgdj␤ in main program body at line 1␤»
colomon ???????
19:12 Italian_Plumber joined
masak rakudo: for ^8 -> $_ is copy { .=fmt("%03b"); $_ = (~$_).trans("01" => "☹☺"); .say } 19:12
p6eval rakudo 064702: OUTPUT«☹☹☹␤☹☹☺␤☹☺☹␤☹☺☺␤☺☹☹␤☺☹☺␤☺☺☹␤☺☺☺␤»
colomon rakudo: for 0, * + 0 ... * { $_ = 0; .say }
masak middle statement is circumspect because of the usual Parrot string bug.
p6eval rakudo 064702: OUTPUT«Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in <anon> at line 22:/tmp/AHs_k3DfBp␤ in main program body at line 1␤»
colomon masak: wait, what? 19:13
masak rakudo: for ^8 -> $_ is copy { .=fmt("%03b"); .=trans("01" => "☹☺"); .say }
p6eval rakudo 064702: OUTPUT«too few positional arguments: 2 passed, 3 (or more) expected␤ in <anon> at line 22:/tmp/HVRQeHobw0␤ in main program body at line 1␤»
masak colomon: that one.
colomon ah, so that's what the ~$_. gotcha
19:20 nymacro left 19:21 mavrc left
colomon still have no clue why the bug 19:23
masak so you agree it's a bug?
colomon seems like it's got to be, one way or the other. 19:24
masak submits rakudobug
19:24 cognominal left
colomon I mean, either going through the loop the first time is wrong, or not going through it the second time is. 19:24
masak nod 19:25
colomon unless there's something really subtle and disturbing going on.
c9s masak: moritz_> what does that translate to? # that means "life is just like a dream" 19:26
masak c9s: thanks!
c9s: top-left character means "like"? 19:27
19:27 mavrc joined
masak c9s: which of the bottom two means "life" and which means "life"? :) 19:27
c9s masak: read from top-right to bottom-right 19:28
masak nodnod. :) 19:29
c9s masak: then the second col.
it's traditional chinese. :-)
masak so, word for word, "one life like dream"?
c9s masak: right. :-) 19:30
masak \o/
c9s++
c9s masak++ # word for word
\o/
masak one of these days, I'm going to learn classical Chinese.
c9s really ? interesting ! 19:31
masak well, not *in* a day, naturally. :)
c9s you can ask me if you stuck in these characters
masak I can? awesome!
c9s i know it's hard to distinguish and memorize 19:32
masak: yeah , sure!
masak: do you know 書法?
masak: www.google.com/search?sourceid=chro...8%E6%B3%95
19:33 kcwu joined
masak c9s: I know *about* it. I can't do it myself :) 19:33
c9s i learn these character with Calligraphy (書法)
masak wow.
masak is impressed
c9s when i was child
masak one of my teachers did, too. it looks really nice when you write it. 19:34
c9s it's because i am taiwanese XD
yeah
masak my teacher was a Mainlander.
南人
c9s oh china
masak yes, the big one :)
c9s masak: cool! whihc input method are you using ? 19:35
masak Pinyin :(
it sucks.
I want to learn wubi.
c9s why?
wubi ?
19:35 \xF0 left
masak Pinyin sucks because each sound has too many options. it's write and then hunt-and-peck. 19:35
among tens of characters.
I want something more predictable. 19:36
c9s masak: do you know chewing ?
masak nope.
c9s if you are using linux , you can install scim-chewing
it can predict the words
and select them for you
masak nice. I'm not, though. I'm on a Mac.
c9s masak: then you can use Vanilla Input Method
19:37 \xF0 joined
c9s masak: openvanilla.org/ 19:37
masak \o/
谢谢你!
c9s au joined this project before.
masak yes, she did.
c9s btw if you want more accuraccy you might interesting in 倉頡 & 大易 (au's using) 19:38
it's traditional. :-)
masak: i also wrote a 大易 (Dayi) converter module. :-p 19:39
masak 's brain overfloweth
c9s Convert::Dayi
:-p
Dayi is like wubi i guess 19:40
19:40 zostay left
masak was just going to say that. 19:40
c9s but i use chewing (pinyin)
masak will investigate thanks!
c9s ;-)
19:41 zostay joined
masak 恭恭敬敬地鞠躬 19:41
c9s XDD that's too much 19:42
my pleasure :-)
masak 現在是快樂的 19:43
c9s :D
masak: 厲害! 19:44
awesome!
masak 啊,“c9s”與“cornelus”是一樣
er, "cornelius"
c9s yeah
masak sort of a riff on "i10n", eh? :)
c9s haha
yeah just like that
:-p
sorear envy 19:45
masak sorear: you're young, not too late to start.
sorear: I started at 25, 'cus I figured it might be too late at 26 :)
c9s sorear: :-)
sorear: you can ask me chinese also if you like. :-) 19:47
19:50 pythonian4000afk is now known as pythonian4000
masak sorear: you'd have to rename niecza to 沒有時間 :) 19:51
c9s perl6 is awesome, thank you guys for doing these hard works 19:56
mathw :O 19:58
:)
sorear hey, I can actually read the last two characters of that 20:02
20:06 ggoebel joined
sorear ok. I'm going to change { $<foo> = 1 } to $<foo> = { 1 } 20:08
ie, if you make an alias to a { } interpolation, the alias will be to the value returned
also it seems I implemented the wrong semantics for <{ foo }> :/
20:09 Kodi joined
sorear hi Kodi 20:09
Kodi sorear: Greetings.
20:09 cognominal joined
Kodi rakudo: say (2, 1) before (11, 1) 20:10
p6eval rakudo 064702: OUTPUT«Bool::False␤»
20:10 kjeldahl left 20:11 _kaare left
moritz_ rakudo: say <a b> before <a a> 20:11
p6eval rakudo 064702: OUTPUT«Bool::False␤»
moritz_ rakudo: say <a b> after <a a>
p6eval rakudo 064702: OUTPUT«Bool::True␤»
Kodi I think 'cmp' on Seqs (or Parcels, or whichever those are) should do a recursive comparison, instead of comparing stringifications, which is what it seems to do at the moment. 20:12
moritz_ agreed
masak hm.
moritz_ it does that on Pairs already 20:13
which is very useful
masak even Pairs are more scalar-y than list-y.
20:16 ggoebel left
Kodi rakudo: say [or] (2, 1) <<cmp>> (11, 1); 20:23
p6eval rakudo 064702: OUTPUT«-1␤»
masak I'll say this: I agree that it's a better default than comparing stringifications. 20:25
I'm not 100% sure it's "right" :)
20:31 shortcircuit left, shortcircuit joined 20:32 christine left 20:46 jferrero joined 20:52 Italian_Plumber left
dalek ast: 592eef1 | KodiB++ | S32-temporal/DateTime.t:
[DateTime.t] Golfed &us2007dst using hyperspaceships.
20:54
tadzik hrm. C++ has this Contructor Initialization List, the stuff after the colon. Wikipedia says it's the only place when you can fire off the baseclass' constructor. How is something like this achieved in Perl 6? 20:56
moritz_ tadzik: you can use nextsame() to get to the parent class'es new() 20:57
tadzik that makes sense
20:59 Italian_Plumber joined 21:01 Kodi left 21:02 Schwern joined 21:08 dukeleto left 21:09 trek1s left 21:15 kid51 joined, xivix joined, dukeleto joined 21:21 MayDaniel left, ggoebel joined 21:22 ggoebel left 21:23 kjeldahl joined 21:24 eternaleye left 21:27 icwiener left, icwiener_ joined
araujo ideone.com/7k9Kc 21:29
21:31 dukeleto left 21:33 kid51 left 21:41 meppl left
sorear rakudo: say try die "Hi" 21:43
p6eval rakudo 064702: OUTPUT«Null PMC access in type()␤ in main program body at line 22:/tmp/8yR2hfVumY␤» 21:44
sorear pugs: say try "Hi"
p6eval pugs: OUTPUT«*** Cannot cast from VStr "Hi" to Pugs.AST.Types.VCode (VCode)␤ at /tmp/52omWykEeI line 1, column 5 - line 2, column 1␤»
sorear pugs: say try die"Hi"
p6eval pugs: OUTPUT«*** Hi␤ at /tmp/zLr8GNu7rT line 1, column 5 - line 2, column 1␤»
21:50 zostay left 21:51 zostay joined
sorear tyler curtis lives 21:55
21:57 ggoebel joined 21:58 kjeldahl left 22:00 ggoebel left
dalek ecza/master: 5a45932 | sorear++ | / (3 files):
Fix :r ~, <![]>, foo:['->']
22:07
ecza/master: 9d8f45c | sorear++ | / (4 files):
Add $<foo> = { 2 + 2 } value capture extension
ecza/master: 32cdb76 | sorear++ | / (7 files):
Implement primitive statement_prefix:try
22:11 zostay left 22:12 zostay joined
colomon moritz_: what if there's more than one parent class? 22:15
jnthn It calls the next thing in the mro. 22:16
22:16 xivix left
masak how does one override the mro in Perl 6? 22:24
araujo gitorious.org/koan ! 22:25
araujo just uploaded the code
masak araujo: \o/
22:26 dolmen joined
jnthn masak: See github.com/perl6/nqp-rx/blob/nom/sr...lassHOW.pm but we probably want to factor things a bit differently to make things easier. 22:26
araujo masak, :D
jnthn Maybe method ^compute_mro($class) { ... } will do it on a per-class basis. 22:27
Whatever it ends up looking like, it's overriding something in the meta-object.
masak right. the code you linked doesn't seem to allow any overriding. 22:28
jnthn Aye
Well, it *is* only a first cut. :-)
masak: Feel free to twiddle it. 22:29
I guess you have an nqp-rx commit bit.
masak guess so.
jnthn A compute_mro method is fine with me for now.
masak actually, I'm going to bed. 22:30
but maybe some other time :)
jnthn Oh, how sensible. :P
Dobru noc :-)
masak dobru noc :) 22:32
22:32 masak left, meppl joined 22:40 rgrau` left, Mowah left 22:49 M_o_C left 22:50 zostay left 22:55 zostay joined 23:02 tom_tsuruhara joined 23:08 zostay left 23:09 masonkramer joined 23:12 rgrau_ joined 23:14 zostay joined 23:30 icwiener_ left 23:37 muixirt left 23:49 jaldhar joined 23:56 Chillance joined