Camelia, the Perl 6 bug

IRC log for #parrot, 2010-12-12

Parrot | source cross referenced

| Channels | #parrot index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:02 dukeleto ~~
00:10 lucian_ joined #parrot
00:13 lucian left #parrot
00:22 cotto dukeleto, are you can chromatic coordinating?
00:22 cotto loritowise
00:27 cotto dukeleto, did someone review the German README?
00:36 lucian_ when lorito design is more finalised, i'd like to find time to write one with PyPy
00:55 dukeleto cotto: i gave it a cursory view. I took a few years of German. The student is Swiss, who seems to be fluent in (at least) English and German.
00:55 dukeleto cotto: chromatic is seemingly committing without seeing that i have a branch
00:56 dukeleto cotto: i would love to coordinate with him
00:57 kapace_ If i call a function that sets a register with a variable, can I use that variable in the register after it returns?
00:57 nwellnhof the german README is really ugly.
00:58 nwellnhof i think the translation tasks for GCI are a bad idea.
01:00 Matt221 In PLA when you set a keyed value like so: $P0[0;0] = "SOME STRING", how does Parrot know to call set_string_keyed ?
01:01 cotto dukeleto, ok.  I'd prefer to have moritz or another German speaker look over it, but it's probably fine.
01:01 NotFound nwellnhof: Hurrah, I'm not alone!
01:02 kapace_ Matt221: Magic.
01:03 NotFound Matt221: because "SOME STRING" is a string.
01:04 NotFound Matt221: the pir compiler generates different opcodes according the type of the register or value used.
01:04 dalek parrot/lorito: 597049c | dukeleto++ | src/pmc/loritocontext.pmc:
01:04 dalek parrot/lorito: Give LoritoContext PMC some useful attributes
01:04 dalek parrot/lorito: review: https://github.com/parrot/parrot/commit/597049cc7f
01:05 dukeleto nwellnhof: would you mind improving our German readme a bit?
01:06 Coke Matt221: the intermediate step is that it's compiling down to an opcode like set $Px, $Px, $S0 , and that opcode is using the vtable
01:06 * NotFound is tempted to say that rm is a great improving tool
01:06 Matt221 Ok thanks guys! Do you know if I can break on VTABLE ... method to see what exactly is going on?
01:07 nwellnhof dukeleto: it needs a complete rewrite.
01:07 cotto Matt221, sure.  They get mangled into functions named Parrot_NameOfType_vtable_name()
01:08 NotFound Matt221: creating classes with subs with the :vtable modifier is the easier way to look at what parrot is doing.
01:08 cotto We haven't been having the best of luck with README translations.
01:08 Coke left #parrot
01:09 Coke joined #parrot
01:10 nwellnhof cotto: i think translations are not a good task for GCI students. i guess they're more into technical stuff than (spoken) languages.
01:10 NotFound .sub set_string_keyed :vtable | .param pmc key | .param string value
01:10 NotFound And so on
01:10 cotto dukeleto, what do you think about not having N registers in Lorito, at least for now.
01:11 plobsing Matt221: breaking on vtables is doable, but the pmc compiler messes up line numbers, if you want to step them, you'll have to reconfigure with --no-line-directives.
01:12 NotFound And don't forget good old fprintf stderr debugging.
01:20 AzureSto_ left #parrot
01:21 AzureStone joined #parrot
01:25 kapace_ left #parrot
01:26 bacek left #parrot
01:27 allison left #parrot
01:27 allison joined #parrot
01:28 bacek joined #parrot
01:28 Matt221 I am pretty sure this should work yet the test fails. Any ideas? http://cl.ly/3t3B3T1w1G0m3r210j2X
01:29 Matt221 (I harded coded a value - 15 for testing to isolate the bug)
01:30 kapace_ joined #parrot
01:31 NotFound Matt221: what value does it get?
01:32 NotFound I guess "15"
01:33 Matt221 yup
01:34 Matt221 and the assert still fails
01:34 Matt221 I noticed complexmatric and pmcmatrix have similar implementations that work
01:34 NotFound I suppose the assert_equal function is doing a string equal, not a numeric one.
01:35 NotFound "15" != "15.0"
01:36 Matt221 Thanks! So obvious
01:39 rfw left #parrot
01:39 rfw joined #parrot
01:45 fbrito joined #parrot
01:47 fbrito cotto: ping
01:47 cotto fbrito, pong
01:48 fbrito cotto: you are the mentor of this task, right? http://www.google-melange.com/gci/task/show/goog​le/gci2010/parrot_perl_foundations/t129186823954
01:48 * atrodo may end up regretting making lorito a attn word
01:48 cotto atrodo, it'll get more prominent.
01:49 plobsing attn word?
01:50 atrodo when lorito is seen in chat, chatzilla will flash and try to get my attention
01:50 plobsing argh. I'd hate that.
01:51 cotto fbrito, claim accepted
01:51 cotto somehow melange let me accept both your claims
01:51 cotto I hope that's intentional
01:53 fbrito hm, both my claims?
01:54 atrodo cotto> (about $N) I would say if anything, logically, dropping $I would make more sense
01:54 atrodo I wouldn't advocate doing it, but
01:55 cotto fbrito, actually it may have been yuki's
01:56 fbrito cotto: ahh, now I see. Yes, he claimed the other task
01:58 lucian_ left #parrot
02:01 cottoo joined #parrot
02:01 cotto left #parrot
02:02 cottoo atrodo, why?
02:02 cottoo is now known as cotto
02:02 kapace_ btw, can anyone accept? http://www.google-melange.com/gci/task/show/goog​le/gci2010/parrot_perl_foundations/t129131467680
02:02 * cotto goes afk for a while
02:04 NotFound kapace_: there is an updated version of the example in the winxed svn repo
02:05 NotFound Not much difference, anyway.
02:05 dalek parrot/embed_api2: 4b624c6 | Coke++ | / (4 files):
02:05 dalek parrot/embed_api2: improve makefile deps.
02:05 dalek parrot/embed_api2: review: https://github.com/parrot/parrot/commit/4b624c6bb8
02:07 atrodo ;\
02:07 atrodo (sorry, that was a mistake)
02:07 kapace_ ok, thanks for the tip NotFound
02:08 atrodo cotto> from a only having one number type available, float makes more sense since it's more flexible.  Not the more efficient, clearly
02:12 NotFound Are you looking for ways to make parrot slower?
02:14 plobsing atrodo: Even if lorito doesn't have N-regs, float operations can be accomplished by using black-box allocated memory and farming out manipulation to a native code library. Think of it as a math co-processor
02:16 NotFound I'm starting to think that instead of a redesign of the parrot VM lorito is going to be a brand new machine designed from scratch.
02:19 atrodo Well, I was thinking about it from this angle.  How many dynamic languages make a distinction between ints and floats?
02:20 Coke tcl does.
02:20 plobsing perl does, if you're careful enough
02:20 plobsing atrodo: we shouldn't be thinking about impelementing dynamic languages in lorito. we should be thinking about implementing a full-featured VM in lorito.
02:21 NotFound atrodo: how many languages are *implemented* without int or floats?
02:26 plobsing forth doesn't have floats at all, using fixed-point math pervasively
02:26 NotFound forth is a 70' tool.
02:28 NotFound I have a Z80 assembler, if you want to go retro.
02:28 plobsing I'm fairly sure forth is still used for BIOS, embedded, and such
02:30 NotFound plobsing: sure, and Z80 is still used in embedded devices,
02:31 NotFound But this is parrot. And Parrot has N and I registers,
02:31 NotFound I strongly oppose to destructive redesigns.
02:34 plobsing if @lorito-implementers do things right, people on top should not very little if at all
02:35 atrodo NotFound> Exactly what I would advocate.  I think ints and floats should both be there for performance reasons
02:36 plobsing PIR can *emulate* N-regs by allocating an FNA for functions that use them and using C-library functions to replace ops that operate on them.
02:37 Andy joined #parrot
02:37 NotFound plobsing: nice ideas, but I'd like to see working proofs before discarding anything.
02:39 plobsing NotFound: that's why its only a prototype until we can prove it works. N-reg emulation is likely one of the criteria for "it works".
02:40 NotFound Also, using extern C functions will be hardly JITable, and people here seem to think that most speed gains will come from JIT.
02:41 plobsing who does? let me show them benchmarks proving how little overhead op-dispatch is costing us.
02:41 plobsing lorito's primary benefit is fixing the inferior runloops problem.
02:41 NotFound plobsing: just look at the logs.
02:42 plobsing people implying JIT will have benefits is different from people beleiving JIT will improve performance.
02:43 plobsing if you can say you have a JIT, many  morons who think they know much more than they actually do will be impressed. Sadly the world runs on such morons.
02:44 NotFound I don't care about morons nor about impressing people.
02:44 whiteknight joined #parrot
02:44 nwellnhof the main reason why JIT won't improve performance is that parrot is slow in other areas. i hope that we'll get to a point where JIT matters performance wise.
02:44 NotFound If N or I registers go out of parrot, I'll also go.
02:44 plobsing number of volunteers and hype are important
02:45 plobsing nwellnhof: the reason JIT increases performance in other VMs is that their ops are generally lower level and they have more of them.
02:45 NotFound plobsing: hype without code is vaporware.
02:46 plobsing NotFound: an army of morons can become an army of minions
02:47 NotFound plobsing: maybe, but I'm not going to be an officer of such army.,
02:48 dalek parrot: 6b79d24 | petdance++ | / (42 files):
02:48 dalek parrot: Merge branch 'master' of github.com:parrot/parrot
02:48 dalek parrot: review: https://github.com/parrot/parrot/commit/6b79d24905
02:48 nwellnhof plobsing: it depends on the benchmarks. but many of the things parrot is used for now wouldn't see a big benefit.
02:49 Andy Huh, that shouldnt' have happened
02:51 Andy ping kid51
02:53 whiteknight Parrot is going to get faster in all areas over time
02:55 Matt221 whitenight: Can you approve this task: http://www.google-melange.com/gci/task/show/google​/gci2010/parrot_perl_foundations/t129151784253#c1 Already got a head start :)
02:55 Matt221 *whiteknight
02:55 whiteknight let me look
02:56 whiteknight Approved. Good luck
02:57 whiteknight Melange is very slow tonight
02:57 whiteknight Matt221: If you look in the parrot repo, src/string/api.c, there is a function in there that can parse a STRING to a Float
02:57 whiteknight I don't remember the name
02:57 Matt221 Its ALWAYS slow here
02:58 whiteknight anyway, use existing functions and don't try to write your own parsing routine
02:58 fbrito I really think that there should be tasks to improve Google Melange performance :P
02:59 whiteknight I'm sure Google isn't running it on their good hardware
02:59 Matt221 Yes! I actually wrote an iPhone app that displays the current rankings as well as a native 'task tracker'
02:59 whiteknight They're using the cheap crap-o hardware for open source work
02:59 Matt221 Speeds things up a bit..
03:00 whiteknight Okay, I have to go to bed now. I was only signing on to check messages
03:00 whiteknight goodnight
03:00 Matt221 Anyway: here is the work I have so far for the task: https://github.com/mattrajca/parrot-linear-algebr​a/commit/ac6c417bdc9052cbcf34e6b922ff51e9a6137964 It seems like the float parsing logic is overkill
03:01 whiteknight oh yeah, that looks good
03:01 whiteknight if it works, that's what matters now. We can optimize it later if we need to
03:01 whiteknight okay, now I am leaving. Goodnight
03:01 Yuki`N joined #parrot
03:01 Matt221 ok - goodnight!
03:01 whiteknight left #parrot
03:01 Yuki`N cotto, the Iterator PMC seems to be mostly subclassed, so I'm not quite sure how I'm going to go about this.
03:02 Yuki`N Also, the iterator.t is in Perl, not PIR like I'm used to.
03:02 Yuki`N How does the Perl test harness work?
03:02 kapace_ argh! why does gedit suck so much
03:03 fbrito kapace_: what do you mean?
03:05 kapace_ I don't know, its just I used notepad2 for so long, and gedit looks so weak comparing the two
03:06 plobsing kapace_: there are other editors for linux...
03:06 kapace_ I guess i should have learned Vi earlier so I would have its power
03:06 fbrito there are lots of plugins to gedit :P. but I still prefer Vim
03:07 atrodo i initially learned vi by using gvim
03:07 plobsing with great power comes great time wasted customizing
03:08 kapace_ thats the thing: I don't have time to waste
03:09 kapace_ i guess wine + notepad2 will do for now
03:10 fbrito what do you miss in notepad2? :P
03:10 Coke left #parrot
03:10 kapace_ I need to be able to convert CR-LF to LF etc
03:11 plobsing kapace_: dos2unix?
03:11 kapace_ I need to have a count of selected bytes available in status
03:11 kapace_ plobsing: too much work to pop a shell, cd to work dir and execute command
03:11 kapace_ in notepad2, its a one-button operation
03:12 plobsing unless your editor has a shell built in, or you are already in a shell, or both.
03:12 kapace_ I should look in to that
03:13 Yuki`N nautilus-open-terminal :P
03:18 Yuki`N I'm trying to run a PIR test.
03:18 Yuki`N And I get error:imcc:build_key: wrong register set
03:20 plobsing that's a new one.
03:21 plobsing oh. it means you've used something that isn't an I-reg or an S-reg in a key
03:21 Yuki`N Oh.
03:22 Yuki`N Yeah, I didn't know how [''] syntax worked.
03:22 Yuki`N The line number however was completely wrong.
03:22 plobsing known problem. it's a won't-fix.
03:23 plobsing (IIRC) if you want accurate line numbers, your best bet is to remove all leading spaces.
03:23 nwellnhof left #parrot
03:26 kapace_ anyone know how to convert a hex string to int?
03:27 Yuki`N aloha, coverage?
03:27 Yuki`N No, it doesn't like me?
03:28 kapace_ aloha isn't here...
03:28 cotto NotFound, it's nice to see that you have a strong opinion about N registers.  Why are you so opposed to losing them?
03:28 Yuki`N Oh that's interesting.
03:29 cotto (in Lorito, since PIR will have to retain compatibility)
03:36 dalek parrot: 31ca7a2 | petdance++ | include/parrot/p (2 files):
03:36 dalek parrot: updated headers for headerizing
03:36 dalek parrot: review: https://github.com/parrot/parrot/commit/31ca7a23ab
03:41 kapace_ http://www.perlmonks.org/?node_id=441152 this guy implemented hex2decimal.. there isn't a builtin method?
03:42 cotto My thinking is that Parrot should be optimized for the common case, and that the float manipulation isn't common enough to have specialized ops.
03:44 cotto kapace_, why do you need that?
03:44 kapace_ cotto: the chunked encoding's length is in hex
03:44 kapace_ the length is hex string.
03:45 kapace_ "1000" = 4096 (decimal)
03:46 cotto kapace_, looking at the task now
03:47 kapace_ int l = sl.to_int(16); in the example
03:47 plobsing parrot lacks builtins for parsing octal/hex. the various internals that need to deal with such things delegate atol, atoi, or strol
03:47 kapace_ ok, so ill just use the guy's implementation, yes?
03:49 Yuki`N What exactly is a KEY.
03:49 Yuki`N i.e. in the opcode exists.
03:50 cotto kapace_, String has a to_int method
03:50 cotto can you use that?
03:51 kapace_ oh, I should have thought of that, let see
03:51 cotto kapace_, it's hard to know where to look
03:51 cotto but you should never have to implement hex to decimal conversion
03:52 cotto we have more interesting problems to solve
03:52 plobsing cotto: what about hex-floats? (wanted for java, c, etc)
03:52 kapace_ yes
03:52 kapace_ i agree with not re-inventing the wheel
03:53 kapace_ cotto: works! just had to convert my string into a PMC. Thanks!
03:53 cotto kapace_, great
03:55 kapace_ ok, halfway done, this task is pretty fun. But I must leave to eat.
03:56 cotto kapace_, commit early and often
03:57 kapace_ cotto: I'm not too keen on using git. I have parrot-master cloned. If i commit here can it be merged later some how?
03:57 cotto plobsing, you can convert those if you want
03:58 cotto kapace_, sure.  Do you have your own fork?
03:58 kapace_ no
03:58 kapace_ should i make on on github?
03:58 plobsing cotto: I don't want to; but I need to do so to fully implement perk (java), which I *do* want
03:59 cotto kapace_, it's up to you.  It's probably easier to do so.
04:00 kapace_ ok forked. how do I setup my local clone to commit to my fork?
04:02 Yuki`N I was saddened by the fact that java on parrot didn't work.
04:03 plobsing doesn't work *yet*
04:03 cotto kapace_, I'd clone from github and apply the patch manually, but that's because my git-fu isn't strong yet.
04:04 kapace_ ok, that Way makes sense.
04:04 Yuki`N kapace_, git remote set-url origin
04:04 Yuki`N Um
04:04 Yuki`N And then the URL to your fork on github.
04:05 Yuki`N i.e. mine is git@github.com:nol888/parrot.git
04:06 Yuki`N I have to say, I started out using SVN, and I just like git a lot.
04:06 Yuki`N The only thing I miss is the integrated keywords systeim in SVN.
04:06 Yuki`N *system
04:07 kapace_ oh, thanks Yuki`N
04:08 kapace_ git remote set-url origin just returns the help though
04:08 Yuki`N Yeah.
04:08 Yuki`N You need to add your url to the end
04:09 kapace_ oh sorry didn't see that heh
04:09 Yuki`N e.g. git remote set-url origin git@github.com:kapace/parrot.git
04:09 Yuki`N And then you can `git push'
04:09 kapace_ Permission denied (publickey).
04:10 Yuki`N You need to add your public key to github.
04:10 Yuki`N And if you don't have a public key you need to make one.
04:10 Yuki`N http://help.github.com/linux-key-setup/
04:11 Yuki`N If you're on Windows all you have to do really is use git bash.
04:12 kapace_ ok, thats going to take some time, I think ill get to it later. Thanks for your help
04:14 fbrito (is Google Melange down?)
04:16 Yuki`N Works for some tasks. ;-;
04:17 fbrito :/
04:18 Yuki`N I claimed the wrong task.
04:18 Yuki`N Claimed "complex" instead of "iterator"
04:18 Yuki`N Doesn't help that they have the same title.
04:18 fbrito cotto: I am done with my portuguese README translation: https://github.com/parrot/parrot/pull/30
04:20 fbrito but the task page is down, so don't bother with it right now :P
04:25 cotto fbrito, ok.  We'll need to find someone else who can verify the file.
04:26 Matt221 left #parrot
04:26 fbrito Sure, no problem. Who was the other brazilian guy here? I think it was Kovensky
04:27 cotto sounds plausible
04:34 cotto Kovensky, ping
04:35 Yuki`N cotto, I'm going to be pulling out of increasing Complex.pmc's coverage in favor of the Iterator.pmc task.
04:35 Yuki`N As soon as Melange is working again.
04:46 Yuki`N Can anyone explain to me how I can call the method of a base class from PIR?
04:52 fbrito Yuki`N: Melange is working now for me
04:53 Yuki`N Ah, thanks,.
04:53 Yuki`N Still not working for my task though.
04:53 fbrito Yuki`N: oh, I was wrong
04:53 fbrito It worked because I wasn't logged in
04:53 Yuki`N Oh lol.
04:56 cotto Yuki`N, ok
04:56 cotto let me see if I can dig something up
04:57 Yuki`N cotto, I wasn't sure, since there's no way to instantiate the Iterator base class but I still need to test overridden methods somehow.
05:01 TiMBuS_ plobsing, is this parrot-libjit-fb thing on github not complete? or am i missing something here =/
05:01 TiMBuS_ is now known as TiMBuS
05:03 cotto Yuki`N, you can test the Iterator code indirectly by testing a subclass that doesn't override the methods or VTABLE functions.
05:03 plobsing TiMBuS: it's complete as far as I know
05:03 Yuki`N Hm, ok. I'll try looking for one.
05:03 plobsing what problems are you having?
05:03 TiMBuS well, no problems, i was just wondering how it worked
05:03 TiMBuS wanted to try making a libffi version of it
05:04 plobsing you load it. it works the same way as parrot's nci system
05:04 plobsing TiMBuS: too late. we had a gsoc project this summer that did exactly that
05:04 TiMBuS oh?
05:05 plobsing it's part of core now. if parrot config detects libffi installed on your system, it gets built, and automatically loaded on parrot startup
05:05 plobsing no user intervention required
05:05 TiMBuS well then..
05:05 TiMBuS might as well delete this old ffi PMC i made then
05:06 plobsing sneaky features you didn't even know you had :)
05:06 TiMBuS so that means rakudo can pretty much load any C lib now?
05:07 plobsing *if* you have libffi, yes. which means either gcc or msvc compiler.
05:08 TiMBuS gotcha
05:09 plobsing if that's not good enough, you have to fall back on static thunks.
05:09 plobsing there is *no* 100% portable way to do ffi
05:20 fbrito ok, now Melange is back (at least for my task)
05:23 Yuki`N Melange is back.
05:27 Yuki`N cotto, I withdrew from the Complex task, and claimed the Iterator task, http://socghop.appspot.com/gci/task/show/google​/gci2010/parrot_perl_foundations/t129193194564
05:27 Yuki`N fbrito, you're free to do the Complex task.
05:27 fbrito I was going to ask that right now :P
05:27 fbrito Thank you
05:28 rurban_ joined #parrot
05:29 fbrito Yuki`N: but I still have to get my translation reviewed, so if you finish your Iterator task, feel free to claim the Complex one
05:29 Yuki`N I looked at the complex one and it was. :/
05:30 Yuki`N Most of the untested functions are hyperbolic trig functions or something like that.
05:30 Yuki`N And they apparently don't work.
05:30 Yuki`N I don't know hyperbolic functions, much less how they work for complex numbers.
05:31 Yuki`N Even applying normal sin cos tan to complex numbers is a bit confusing.
05:31 plobsing "don't work" sounds like hyperbole
05:31 rurban left #parrot
05:31 plobsing :[
05:31 rurban_ is now known as rurban
05:31 plobsing s/[/p/
05:31 Yuki`N i c wut you did there.
05:31 Yuki`N That's legit what the comments in complex.pmc say though lol.
05:32 plobsing Yuki`N: cosh = (e**x + e**-x)/2 ; sinh = (e**x - e**-x)/2
05:32 Yuki`N How am I supposed to test the set_integer_native function of the Iterator base class? The method body is basically:
05:32 Yuki`N PARROT_FAILURE("Iterator: implementation have to override this method");
05:33 Yuki`N And without the ability to directly call base class methods it's pretty useless.
05:33 Yuki`N Unless I subclass Iterator for the test.
05:34 plobsing that sounds like a good plan
05:36 Yuki`N Oh dear.
05:36 Yuki`N Creating classes in PIR.
05:41 cotto Yuki`N, accepted
05:41 Yuki`N cotto, thanks.
05:42 Yuki`N Just figuring out how to add methods to classes in PIR.
05:42 cotto I hope this part of the gci dance goes away next year.
05:43 Yuki`N Heh.
06:01 Yuki`N cotto, http://pastebin.com/xXqBwyX3
06:01 Yuki`N I don't understand what I'm doing wrong.
06:01 Yuki`N When I use newclass, it works. If I try subclassing, the Iterator's init vtable method gets called.
06:03 fbrito (off-topic: just watched an amazing TED interview with Julian Assange. that guy really rocks)
06:10 cotto Yuki`N, looking
06:20 Yuki`N Apart from that though, all of Iterator is covered.
06:31 fbrito I am going to bed. Good night guys
06:33 cotto Yuki`N, I'm not sure why that doesn't work.
06:33 Yuki`N Yeah, it's strange.
06:33 Yuki`N Should I try committing what I have so far?
06:34 Yuki`N It covers everything except that one stub.
06:34 cotto Sure.  Just TODO the test.
06:34 Yuki`N K.
06:36 fbrito left #parrot
06:36 Yuki`N From 15% to 85% XD
06:36 cotto Nice.
06:36 Yuki`N Given, the Iterator PMC only has about 10 or 11 methods.
06:36 cotto coverage is coverage
06:37 Yuki`N Indeed.
06:37 Yuki`N Let me commit.
06:46 Yuki`N cotto, here's my pull request. https://github.com/parrot/parrot/pull/31
06:49 sorear um
06:49 Yuki`N Night all.
06:49 sorear why are we testing Iterator
06:50 Yuki`N left #parrot
06:50 sorear the Iterator API needs to die in a fire, not have tests written against it
06:50 sorear opbots names
06:52 plobsing sorear: the idea is to increase code coverage. Iterator API, while poor, is not unworkable like other aspects of Parrot currently receiving work.
07:12 Andy left #parrot
07:14 cognominal left #parrot
07:46 bacek left #parrot
08:22 kapace_ when anyone has a minute, could you take a look at or test https://github.com/kapace/parrot/commit/​d22eea0ccaf4a4876d1d011b2d6a291dbe68895d
08:22 * kapace_ goes to sleep
08:35 rfw left #parrot
08:43 rfw joined #parrot
08:52 theory left #parrot
09:23 rfw left #parrot
09:37 fperrad joined #parrot
10:03 preflex left #parrot
10:06 preflex joined #parrot
10:12 cognominal joined #parrot
11:38 dalek parrot: c24b844 | mikehh++ | src/list.c:
11:38 dalek parrot: fix codetest failure - line length
11:38 dalek parrot: review: https://github.com/parrot/parrot/commit/c24b8447c6
12:08 lucian joined #parrot
12:15 NotFound cotto: you asked I want to keep N registers? The answer is winxed/examples/fly.winxed
12:16 mikehh make corevm/make coretest FAIL - t/pmc/integer.t .. error:imcc:loadlib directive could not find library `sys_ops'
12:16 mikehh all other tests PASS (pre/post-config, smoke (#1611) fulltest) at c24b844 - Ubuntu 10.10 i386 (gcc-4.5 with --optimize)
12:19 NotFound sorear: I've been doing experimental ports of some C++ standard algorithms and the provisional conclusion is yes, iterators sucks.
12:19 NotFound They are workable, but not enough powerful and flexible.
12:26 lucian NotFound: try better ones! :)
12:27 lucian NotFound: i mean better iterators. C++-style iterators do suck indeed
12:28 NotFound lucian: I tried what we have now.
12:29 lucian NotFound: you'd probably expect me to say this, but have you looked at python's iterators/generators?
12:33 NotFound lucian: I'm looking at ways to do things in parrot. If adapting python idioms is a way, I'd like to see examples.
12:33 lucian NotFound: http://docs.python.org/library​/stdtypes.html#iterator-types
12:36 lucian NotFound: http://stackoverflow.com/questions/​19151/build-a-basic-python-iterator
12:36 lucian NotFound: http://www.ibm.com/develope​rworks/library/l-pycon.html
12:38 NotFound lucian: I mean, parrot examples.
12:39 lucian NotFound: right. don't think there are any :)
12:39 lucian NotFound: i'd think of the same concept, an object(pmc) that manages how others iterate it
12:40 nopaste "NotFound" at 192.168.1.3 pasted "Fun with iterators" (87 lines) at http://nopaste.snit.ch/26977
12:40 NotFound This is what I've been doing
12:42 lucian NotFound: i see. seems quite verbose
12:43 Alexandru20 joined #parrot
12:44 lucian NotFound: how does for(var i in cont) work in winxed?
12:45 NotFound iterates the content, not the indexes like javascript.
12:46 lucian NotFound: and what does "content" mean in this case?
12:46 lucian NotFound: does it iterate over array elements, or object elements, or ... ?
12:46 NotFound lucian: whatever iter cont provides.
12:47 lucian NotFound: right, so cont provides an iterator
12:47 NotFound It cretaes the iterator under the hood and uses it to control the loop and to get the values for i
12:48 lucian NotFound: right, so very similar to python
12:48 lucian NotFound: so in this particular case, the problem is binding a lot of things in different ways
12:49 lucian could you make the iterators explicit? or are they already?
12:49 lucian like https://developer.mozilla.org/en/Java​Script/Guide/Iterators_and_Generators
12:50 NotFound This is an exercise of adapating C++ idioms using current parrot iterators
12:51 lucian NotFound: do you want c++ idioms in particular? or just being able to solve the same problems as easily/cleanly?
12:53 NotFound lucian: I like this C++ idioms, but the idea is checking power and flexibility of our iterators.
12:53 lucian NotFound: i see
12:54 lucian NotFound: the way i see it, if iterators are composable (and lazy while doing so), there's nothing you can't do with them
12:56 NotFound Sure I can write classes with provide iterator interface. But in C++ I can do lot of things without writing a class, just specializing templates and using algorithms. I'd like to have ways like that in parrot.
12:57 lucian well, you can remove the need to write classes without the C++ nastiness
12:58 NotFound That's what this examples are about. They do with closures what C++ does with template classes.
12:58 lucian NotFound: yes, i see
12:59 lucian it still seems a bit more verbose than it should be
12:59 lucian maybe i'm just not used to winxed
13:00 NotFound lucian: is just an experiment, optimized only for legibility.
13:02 NotFound Well, if it looks verbose in winxed, don't look at the generated pir X-)
13:06 lucian NotFound: of course not :)
13:20 NotFound The get_iter vtable in Iterator return SELF, so the iterator can be used just like the container.
13:28 rurban_ joined #parrot
13:29 lucian NotFound: i see, so they should be easily composable
13:30 NotFound The problem I'm looking now is that creating an iterator at runtime may mean to generate a class on the fly.
13:30 lucian NotFound: which doesn't work right now?
13:31 lucian NotFound: btw, writing a class may in fact be less verbose than all those closures
13:31 rurban left #parrot
13:31 rurban_ is now known as rurban
13:32 NotFound lucian: that verbosity don't worry me, will be inside a library or something. What worries me is easy of usage.
13:32 lucian NotFound: does winxed support generators of some sort (yield)?
13:32 NotFound lucian: yes
13:32 lucian can't you use a generator function for iterating?
13:32 NotFound Just use yield instead of returm
13:33 NotFound lucian: a coroutine can't provide the interface that functions expecting a parrot iterator use.
13:33 lucian NotFound: that's sad
13:34 lucian i find that to be a nice idiom
13:35 NotFound Maybe we can encapsulate the coroutine inside an iterator-alike class, but for doing that in generic way we need to create that class on the fly.
13:36 lucian NotFound: that seems a rather arbitrary restriction, Class not being an Object
13:37 lucian NotFound: it'd be nice to be able to pass a coroutine to a higher-order function that returns an iterator
13:37 NotFound lucian: it's hard to clear that restriction, too much parts of parrot uses directly class internals instead of calling its vtable and methods.
13:37 lucian so you could do for(var i in iter(cycle([1, 2, 3])))
13:38 lucian i see
13:38 Alexandru20 left #parrot
13:38 NotFound lucian: I'm doing some experiments on that direction.
13:38 lucian in fact, iter could be implicit
13:38 lucian again, that's what python does. perhaps i like the language too much :)
13:40 NotFound lucian: I don't have any problem in borrowing ideas for python or any other, I'm basing the tests on C++ ways because is what I know better.
13:40 lucian python takes this idea further with decorators
13:42 Alexandru20 joined #parrot
13:43 NotFound lucian: if we can manage some basic games with iterator creation, we'll can take any idea as far a we want.
13:43 whiteknight joined #parrot
13:44 lucian NotFound: http://www.artima.com/weblog​s/viewpost.jsp?thread=240808
13:48 Alexandru20 left #parrot
13:49 NotFound lucian: takes forever to load that page.
13:49 lucian i see
13:50 lucian NotFound: the pep is clear enough http://www.python.org/dev/peps/pep-0318/
13:50 nopaste "NotFound" at 192.168.1.3 pasted "Testing class creation on the fly" (26 lines) at http://nopaste.snit.ch/26979
13:51 Alexandru20 joined #parrot
13:57 dalek parrot-linear-algebra: ac6c417 | mattrajca++ | / (2 files):
13:57 dalek parrot-linear-algebra: Implemented set_string_keyed in NumMatrix2D
13:57 dalek parrot-linear-algebra: review: https://github.com/Whiteknight/parr​ot-linear-algebra/commit/ac6c417bdc
13:57 dalek parrot-linear-algebra: 8ba9b28 | mattrajca++ | / (2 files):
13:57 dalek parrot-linear-algebra: Efficiency improvements
13:57 dalek parrot-linear-algebra: review: https://github.com/Whiteknight/parr​ot-linear-algebra/commit/8ba9b2866f
13:57 dalek parrot-linear-algebra: dd21b96 | Whiteknight++ | src/pmc/ (3 files):
13:57 dalek parrot-linear-algebra: remove some old TODO notes
13:57 dalek parrot-linear-algebra: review: https://github.com/Whiteknight/parr​ot-linear-algebra/commit/dd21b9615e
13:57 dalek parrot-linear-algebra: 9039596 | Whiteknight++ | / (12 files):
13:57 dalek parrot-linear-algebra: Merge branch 'master' of github.com:Whiteknight/parrot-linear-algebra
13:57 dalek parrot-linear-algebra: review: https://github.com/Whiteknight/parr​ot-linear-algebra/commit/90395969c3
13:57 dalek parrot-linear-algebra: 99cd55d | Whiteknight++ | / (2 files):
13:57 dalek parrot-linear-algebra: Merge remote branch 'origin/gci_set_string_keyed'
13:57 dalek parrot-linear-algebra: review: https://github.com/Whiteknight/parr​ot-linear-algebra/commit/99cd55d21b
14:07 nopaste "NotFound" at 192.168.1.3 pasted "Iterator that calls a coroutine" (43 lines) at http://nopaste.snit.ch/26980
14:07 NotFound lucian: this way works
14:09 lucian NotFound: that looks pretty nice
14:10 lucian NotFound: can you write for(var i in create_iterator(aux)) ?
14:11 NotFound A bit more complicated that should be, but abstracting the details in some functions it can be workable, and adaptable to future parrot changes.
14:12 lucian yep
14:12 NotFound lucian: sure, I used the object var for flexibility of the test.
14:12 NotFound for (var i in create_iterator(aux)) does the same.
14:12 lucian you can have an Iterator class that takes a coroutine as an argument at creation
14:13 lucian or is that what you're doing? i'm not familiar with class syntax in winxed
14:13 NotFound lucian: yes, but I'm looking more at ways for custom creation from pir.
14:13 lucian i see
14:13 NotFound lucian: no, in that case the class is created on the fly. The function creates the class and instantiate it.
14:14 lucian NotFound: i see. is that necessary?
14:14 NotFound I'm using winxed as a higher-level PIR, doing this kind of tests in pure pir is hard.
14:14 lucian can't parrot objects have vtable methods of their own?
14:15 NotFound lucian: no.
14:15 kid51 joined #parrot
14:15 lucian NotFound: ah, that's so sad
14:15 lucian NotFound: so would an .iterator directive be possible for pir subs?
14:15 NotFound In this simple case a static class can be used, but I'm testing towards the higher genricity possible.
14:16 lucian right
14:17 dalek parrot/embed_api2: d74cf45 | Whiteknight++ | / (2 files):
14:17 dalek parrot/embed_api2: fix build warnings in src/embed/api.c
14:17 dalek parrot/embed_api2: review: https://github.com/parrot/parrot/commit/d74cf45358
14:17 dalek parrot/embed_api2: eaafc83 | Whiteknight++ | tools/build/parrot_config_c.pl:
14:17 dalek parrot/embed_api2: fix build warnings in generated *_config.c files
14:17 dalek parrot/embed_api2: review: https://github.com/parrot/parrot/commit/eaafc83f47
14:17 dalek parrot/embed_api2: 13686bc | Whiteknight++ | / (6 files):
14:17 dalek parrot/embed_api2: merge, fixing conflicts
14:17 dalek parrot/embed_api2: review: https://github.com/parrot/parrot/commit/13686bc87f
14:18 NotFound The problem is that the iterator interface needs at least to functions: checking it we are at end, and getting the value.
14:18 kid51 whiteknight good morning
14:18 NotFound A simple sub can't do that.
14:19 lucian NotFound: i see
14:20 lucian NotFound: well, the coroutine iterator example uses a sub at some point
14:21 lucian NotFound: so would an equivalent for the sub directive work? like .generator
14:21 NotFound lucian: it avoids the problem by never ending.
14:21 lucian NotFound: oh, right. one option is throwing an exception
14:22 NotFound lucian: throwing an exception in the sub and caching it in the enveloppe? Sounds doable.
14:22 lucian NotFound: well, that's what python does. StopIteration
14:23 lucian parrot also has the option of inspecting the coroutine's frame, right?
14:24 NotFound lucian: yes, but I we want genericity we shouldn't make assumptions about the kind of object used as fun.
14:24 lucian NotFound: yes, of course. i favour exceptions, but i don't know if that's desirable for parrot
14:26 NotFound The excpetion idea is nice, but if we want maximum genericity we should use that idea also in the core iterators.
14:26 lucian NotFound: yes, that would be nice. (and again, it's what python does)
14:27 NotFound Mmm... in fact it might be working right now, if you just don't call get_bool.
14:28 NotFound Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_OUT_OF_BOUNDS,
14:28 NotFound "StopIteration");
14:28 NotFound That's what ArrayIterator does.
14:30 NotFound But existing code doesn't do that, it calls get_bool. So a proposal and a deprecation period will be needed to go in that direction
14:31 NotFound A workaround is an envelope that gets the value in advance an catches the exception to set a flag, and use that flag for the get_bool result.
14:32 lucian NotFound: yes, that would also work
14:39 slavorgn joined #parrot
14:40 dalek parrot: f76eee7 | jkeenan++ | / (2 files):
14:40 dalek parrot: Now that we rely on 'git ls-files' to identify files which are candidates for
14:40 dalek parrot: inclusion in MANIFEST et al., we no longer need to record directories
14:40 dalek parrot: traversed, which means we can remove one TODO-ed test.  (This should have no
14:40 dalek parrot: impact on functioning of tools/dev/mk_manifest_and_skip.pl.)
14:40 dalek parrot: review: https://github.com/parrot/parrot/commit/f76eee7dc8
14:40 dalek parrot: 23f2e8d | jkeenan++ | / (2 files):
14:40 dalek parrot: Add one generated .o file to .gitignore so that it is not reported by 'git status'.  Regenerate MANIFEST.SKIP.
14:40 dalek parrot: review: https://github.com/parrot/parrot/commit/23f2e8d5bd
14:40 dalek parrot: 6b44353 | jkeenan++ | .gitignore:
14:40 dalek parrot: Remove outdated references to 'svn:ignore' from .gitignore.
14:41 dalek parrot: review: https://github.com/parrot/parrot/commit/6b443535b2
14:53 perlite_ joined #parrot
14:53 perlite left #parrot
14:54 perlite_ is now known as perlite
15:08 mikehh where's aloha?
15:09 nopaste "NotFound" at 192.168.1.3 pasted "Iterator from coroutine, improved" (74 lines) at http://nopaste.snit.ch/26983
15:09 kid51 Out surfing on the North Shore
15:11 mikehh ha, bacxek ain't around either, should be around 2am Monday for him :-}
15:11 mikehh bacek/bacek_at_work
15:12 NotFound lucian: here is a more complete version
15:14 mikehh we really need to host aloha on one of our servers
15:15 mikehh (or bring back purl)
15:18 NotFound A problem with this approach is that anonymous classes created on the fly will probably never be collected.
15:24 whiteknight left #parrot
15:39 Patterner left #parrot
15:41 lucian NotFound: hmm, sort of ugly unfortunately
15:42 lucian NotFound: and ideally, StopIteration would get thrown when the coroutine stops yielding
15:43 NotFound lucian: in the current implementation, if a coro return ugly things happen.
15:44 lucian NotFound: i see
15:44 lucian NotFound: that seems like a pretty nasty bug to me
15:46 dukeleto ~~
15:46 NotFound lucian: yeah, I've looked at the problem but is hard to solve.
15:47 NotFound I'm liking this way of class creation on the fly, it can be a way to the workaround the problem of not being able to inherit from Class.
15:49 Psyche^ joined #parrot
15:49 Psyche^ is now known as Patterner
15:51 lucian NotFound: i don't know, it still seems to me like a hack because parrot's classes/objects suck
15:53 NotFound lucian: yes, but hacks that works and allow doing things can provide tests and real usage cases that helps refactor it to less hackish ways.
15:53 lucian NotFound: yes, true
15:55 mikehh make corevm/make coretest FAIL - t/pmc/integer.t .. error:imcc:loadlib directive could not find library `sys_ops'
15:55 mikehh all other tests PASS (pre/post-config, smoke (#1617) fulltest) at 6b44353 - Ubuntu 10.10 i386 (g++-4.5 with --optimize)
15:57 NotFound Sigh... sysinfo again.
15:59 kid51 left #parrot
16:08 Alexandru20 left #parrot
16:12 dalek TT #1180 reopened by coke++: examples/nci/ls.pir prints only lines with one character each
16:12 dalek TT #1180: http://trac.parrot.org/parrot/ticket/1180
16:14 dalek parrot: c871227 | plobsing++ | t/pmc/integer.t:
16:14 dalek parrot: skip if sys_ops unavailable
16:14 dalek parrot: review: https://github.com/parrot/parrot/commit/c8712276a2
16:16 NotFound plobsing: uh... skiping all Integer test in coretest kinda invalidates the purpose of coretest.
16:18 NotFound Of course, failing to compile it is hardly better.
16:18 plobsing to run under coretest is the wrong default for tests. coretest should be opt-in, not opt-out.
16:19 NotFound plobsing: I think the Integer PMC is core enough.
16:20 plobsing true, and some of those tests should be moved to t/core/pmc/integer.t (or something like that)
16:24 plobsing another alternative would be to run each test in its own sandbox, like we used to when we still used perl for these tests.
16:26 NotFound plobsing: I've looked at that, but there are lots.
16:27 NotFound Mmm... let me try something...
16:28 dalek TT #1889 created by coke++: fix makefile deps
16:28 dalek TT #1889: http://trac.parrot.org/parrot/ticket/1889
16:37 mikehh rakudo (d1e6636) - builds on parrot (2_10_1-762-g6b44353) - make test PASS, make spectest_smolder(#1618) PASS - Ubuntu 10.10 i386 (g++-4.5 with --optimize)
16:37 mikehh t/spec/S02-magicals/pid.rakudo - TODO passed:   1
16:37 mikehh 27,052 ok, 0 failed, 610 todo, 1,856 skipped and 1 unexpectedly succeeded
17:07 whiteknight joined #parrot
17:21 kid51 joined #parrot
17:44 dalek parrot: 8d73990 | NotFound++ | t/pmc/integer.t:
17:44 dalek parrot: skip only Integer tests that depend on sysops when unavailable
17:44 dalek parrot: review: https://github.com/parrot/parrot/commit/8d7399024e
17:50 NotFound mikehh: this should fix the problem with coretest
17:57 ok22_ joined #parrot
18:00 ok22 left #parrot
18:00 ok22_ is now known as ok22
18:08 kid51 left #parrot
18:21 theory joined #parrot
18:50 rfw joined #parrot
19:05 Yuki`N joined #parrot
19:37 nopaste "NotFound" at 192.168.1.3 pasted "Metclass experiment" (82 lines) at http://nopaste.snit.ch/26990
19:45 * dukeleto waves from the PDX airport. 2.5 hour delay may lead to some Lorito hacking
20:05 whiteknight left #parrot
20:14 rfw left #parrot
20:14 rfw joined #parrot
20:16 perlite_ joined #parrot
20:19 perlite left #parrot
20:20 perlite_ is now known as perlite
20:44 M_o_C joined #parrot
20:44 bluescreen left #parrot
20:52 contingencyplan joined #parrot
21:28 rurban_ joined #parrot
21:31 rurban left #parrot
21:31 rurban_ is now known as rurban
21:34 lucian left #parrot
21:35 plobsing where can I find concise documentation on NQP grammars? I am specifically interested in how the associated actions are supposed to work and the way items get put into $/.
21:39 dukeleto the nqp-rx/docs directory is sorely lacking useful info
21:41 plobsing yes, the only documentation I can find are "build a compiler" tutorials. I don't care about most parts of building a compiler. Specifically, I already know enough about the grammars syntax, and enough PAST to get to what I want to do.
21:42 plobsing I don't want to wade through pages to find a couple lines here and there that are relevant
21:46 plobsing I have 'token EscapeSequence { | <SpecialEscape> | <OctalEscape> | <UnicodeEscape> }'. Each of those sub-tokens has an appropriate rule with a 'make String.new(...)'. How do I get at those strings? I don't really care which sub-token matched.
21:47 sorear $<SpecialEscape> // $<OctalEscape> // $<UnicodeEscape> iirc
21:47 plobsing in nqp-rx?
21:47 plobsing urg. I'm going to have to change this whole damned grammar.
21:48 plobsing sometimes it isn't just 3 options. sometimes it is many, many options. I just want "whatever the alternation matched".
21:49 plobsing repeating the names of all the options is a serious DRY violation
21:49 dukeleto plobsing: there is probably something easier
21:49 dukeleto plobsing: tcurtis is a good person to ask. He wrote the PAST optimizer stuff
21:49 dukeleto plobsing: perhaps his code would be useful to read
21:50 plobsing I thought his PAST optimizer was based on objects and didn't use a textual representation (obviating the need to implement grammar/actions)
21:51 jnthn plobsing: You get at the thing you set with make using the .ast method, e.g. <OctalEscape>.ast. Yes, it *will* be longwinded the way you're doing it. Use protoregexes.
21:52 jnthn er, I meant $<OctalEscape>.ast
21:54 plobsing I picked up perk on the premise that the grammar was more-or-less a working recognizer, just needing a set of actions to provide a backend. If I need to re-architect the grammar, I might as well start from scratch.
21:54 jnthn If it is older than nqp-rx then it may have been done before the time of proto-regexes.
21:58 dukeleto plobsing: perk is pre-nqp-rx
21:58 dukeleto plobsing: is uses plain nqp, iirc
21:58 plobsing I got it to build with nqp-rx
21:58 plobsing and distutils
22:00 jnthn nqp-rx is laregely backward compatible in nqp. Even to the degree that Rakudo's old nqp grammar just about built and worked on nqp-rx.
22:00 jnthn s/in/with/
22:09 M_o_C left #parrot
22:26 dalek TT #1889 closed by coke++: fix makefile deps
22:26 dalek TT #1889: http://trac.parrot.org/parrot/ticket/1889
22:29 Matt221 joined #parrot
22:34 mikehh left #parrot
22:37 fperrad left #parrot
22:56 bluescreen joined #parrot
23:04 Yuki`N Anyone want to go over my pull req?
23:20 mikehh joined #parrot
23:28 ingy joined #parrot
23:31 dalek winxed: r715 | NotFound++ | trunk/winxedst1.winxed:
23:31 dalek winxed: fix a mistake when chomp predef is used
23:31 dalek winxed: review: http://code.google.com/p/w​inxed/source/detail?r=715
23:31 Yuki`N cotto, ping
23:34 mikehh All tests PASS (pre/post-config, make corevm/make coretest, smoke (#1621) fulltest) at 8d73990 - Kubuntu 10.10 amd64 (g++-4.5 with --optimize)
23:35 Yuki`N mikehh, thanks for fixing the Integer tests.
23:35 mikehh Yuki`N: not me - it was NotFound
23:36 Yuki`N Oh, yes, right.
23:36 Yuki`N Well, I'm sorry I even made it need a fix.
23:36 TonyC left #parrot
23:36 Yuki`N :P
23:37 NotFound Yuki`N: not your fault, it was a problem that needed good solution since some time.
23:47 nopaste left #parrot
23:50 nopaste joined #parrot
23:50 TonyC joined #parrot

| Channels | #parrot index | Today | | Search | Google Search | Plain-Text | summary

Parrot | source cross referenced