Camelia, the Perl 6 bug

IRC log for #parrot, 2011-06-16

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
00:00 mikehh quite an interesting distribution though, not at all geographical
00:00 sorear mikehh: is it geographical if you consider the servers?
00:01 sorear does a DNS round robin like irc.perl.org even TRY to place users with servers on the same continent?
00:01 sorear opbots beleive dalek
00:01 sorear opbots believe dalek
00:01 slavorgn But I already believe dalek
00:01 slavorg But I already believe dalek
00:01 sorear opbots names
00:02 * soh_cah_toa actually lol's
00:02 sorear opbots trust lichtkind
00:02 slavorg Ok
00:02 slavorgn Ok
00:02 cotto_work I like my packets to do a bit of world travel before they arrive at their destination.
00:02 mikehh sorear: it doesn't seem to be that way, I mean bacek_at_work remained and aloha did not and I thought they were on the same server
00:04 mikehh I mean they even have the same hostmark
00:05 sorear I have a suspicion that multiple MAGnet servers are claiming to all be irc.perl.org on /whois
00:07 lichtkind sorear: thanks
00:07 lichtkind sorear: i still have 2,3 questions :)
00:07 mikehh sorear: I know I often connect to different servers as part of irc.parrot.org alias irc.perl,org
00:08 * sorear wonders if "2,3" means "2 or 3" or en_US "2.3"
00:09 cotto_work I had 3/10 of a question once.  It never got answered.
00:09 * cotto_work heads home
00:09 soh_cah_toa yay!
00:10 kid51 If you are attending YAPC::NA::2011, make sure you are subscribed to yapc@pm.org.
00:10 lichtkind 2 | 3
00:10 aloha 3
00:10 lichtkind = 5 :)
00:10 soh_cah_toa kid51: where's the link to subscribe?
00:11 lichtkind niecza has only 1 branch?
00:11 kid51 soh_cah_toa:  Probably: http://mail.pm.org/mailman/listinfo/yapc
00:11 soh_cah_toa ok
00:12 kid51 That mailing list actually pre-dates the conference registration system we now use, so you may not have been aware of it.
00:12 kid51 In any case, at this time of year traffic on it heats up.
00:12 kid51 I just posted re:  What do we do for dinner the night before the conference?
00:12 kid51 Always the most controversial topic.
00:13 kid51 seen autark?
00:13 aloha autark was last seen in #parrot 9 days 9 hours ago joining the channel.
00:13 kid51 And speaking of dinner ...
00:13 kid51 is now known as kid51_at_dinner
00:14 davidfetter bon appetit, kid51_at_dinner
00:15 sorear lichtkind: this is #parrot... niecza is kind of offtopic here.  But yes it only has 1 active branch.
00:30 theory left #parrot
00:47 baest left #parrot
00:52 soh_cah_toa cotto: ping
00:52 cotto soh_cah_toa, pong
00:53 contingencyplan left #parrot
00:53 soh_cah_toa cotto: i noticed something even more interesting. the error i got before was if i ran hbdb w/ parrot-prove.pbc. however, if i use the bytecode from a file that just does 'say("hello world")', it loops and loop and loops w/ no cli
00:55 cotto soh_cah_toa, a pir file?
00:55 lichtkind left #parrot
00:56 soh_cah_toa cotto: no, bytecode
00:57 cotto soh_cah_toa, where did the bytecode come from?
00:57 cotto nqp or pir
00:57 cotto or other
00:57 soh_cah_toa pir
00:58 cotto So it does.
00:58 cotto That's probably not an intentional feature.
00:58 cotto and if it is, it's not a very good one
00:58 cotto ;]
00:58 soh_cah_toa uhh...definitely not
00:59 soh_cah_toa i think maybe my hbdb_start() function is never being called
00:59 soh_cah_toa or one of those
00:59 soh_cah_toa i have a few functions w/ while loops so i have several to investigate
01:00 soh_cah_toa the fact that it executes continuously but w/ no cli is weird
01:01 cotto Wow.  One of the comments in Parrot_runcode is from leo in 2003
01:04 cotto Ubuntu's tab completion for makefiles seems to have gotten less smart recently.
01:06 hudnix joined #parrot
01:06 soh_cah_toa ha! i found it
01:07 kid51_at_dinner is now known as kid51
01:07 soh_cah_toa i couldn't figure out why there was no cli. that is, until i saw the comment "TODO: Start command-line here"
01:07 soh_cah_toa :)
01:07 cotto there you go
01:08 soh_cah_toa alright, so now it echoes input. the right way. before was just a quick fix
01:09 soh_cah_toa now i'm gonna try and get it to print each opcode
01:09 soh_cah_toa actually, first i want to fix the hbdb_destroy() issue
01:11 cotto also, strings
01:12 soh_cah_toa egh...parrot strings annoy me
01:12 soh_cah_toa fine...
01:14 cotto actually, destroying the runloop should go in src/runcore/cores.c.  destroying the debugger should go elsewhere
01:16 soh_cah_toa ok. yeah, i do see any of the runcores using a function to destroy the runloop
01:16 soh_cah_toa *don't
01:16 cotto only the profiling runcore needs it
01:17 soh_cah_toa yup, there it is
01:17 cotto one nice thing about STRING*s is that you don't have to care about freeing them.
01:19 soh_cah_toa you don't have to free char * either b/c they're static
01:19 cotto sometimes
01:23 soh_cah_toa it's just really annoying to perform otherwise simple string operations. assigning to a char *, all you need is an = sign (or strcpy(), it depends). assigning to a STRING, there's a bunch of different functions and you have to identify which one; scrolling through perldoc, generating segfaults if you guess wrong. where otherwise a single '=' would've worked
01:24 soh_cah_toa .1 seconds compared to 1+ minutes of guesswork
01:27 sorear soh_cah_toa: congratulations, you're starting to understand why Parrotfolk want to stop coding in C ASAP
01:27 kid51 left #parrot
01:30 soh_cah_toa yeah, there's a lot of things i...dislike...about parrot c code. i'm actually planning on bringing those things up at yapc
01:31 whiteknight left #parrot
01:31 cotto soh_cah_toa, keep a list going
01:32 soh_cah_toa yeah, by yapc time, i'd like to have a small proposal. listing the disadvantages to some things and offering alternatives
01:32 sorear C is basically horrible at anything to do with user-defined data types
01:32 sorear C++ is better at that, but has its own problems
01:33 soh_cah_toa hmm...as much as i love c, i'd have to agree w/ that very much
01:35 rurban joined #parrot
01:36 soh_cah_toa in a nutshell, my concern is mostly ugly naming/style conventions and lack of inline comments. i'd like to just have stricter guidelines for those things
01:36 soh_cah_toa it's definitely not as important as something as m0, but after gsoc i'd definitely be willing to write a draft. i think clean code is very important
01:41 cotto The thing about changing conventions is that someone has to do it.
01:41 dalek parrot/soh-cah-toa/hbdb: 51aa664 | soh_cah_toa++ | src/hbdb.c:
01:41 dalek parrot/soh-cah-toa/hbdb: Fixed runtime error about Getopt/Obj.pbc missing. Now echoes command input successfully (the right way)
01:41 dalek parrot/soh-cah-toa/hbdb: review: https://github.com/parrot/parrot/commit/51aa6647df
01:42 dalek parrot/soh-cah-toa/hbdb: 3c48b51 | soh_cah_toa++ | / (3 files):
01:42 dalek parrot/soh-cah-toa/hbdb: Removed definition of Parrot_api_hbdb_get_command() as hbdb_get_command() is a core function and the frontend shouldn't call it directly
01:42 dalek parrot/soh-cah-toa/hbdb: review: https://github.com/parrot/parrot/commit/3c48b517f1
01:42 soh_cah_toa i'd be more than willing come next semester
01:42 cotto and the reasons for doing so are less technical and more personal preferential
01:45 soh_cah_toa hmm...true. but the less strict guidelines are, the crazier code looks over time. regardless of what the actual guidelines would be, i'd just like to see more consistency
01:46 bubaflub NotFound: ping
01:46 soh_cah_toa the actual style conventions we have actually aren't that bad. it's the naming conventions though that'd need improvement
01:48 soh_cah_toa but anyway, it'd be easier to discuss face-to-face and when i actually have some kind of organized proposal written up
01:48 soh_cah_toa b/c i don't want it to come off as just a rant :)
01:49 cotto deal
01:51 soh_cah_toa it's going to be great at the hackathon to have everyone together in one time zone :)
01:55 bubaflub soh_cah_toa: wish i could be there
01:58 soh_cah_toa bubaflub: do you have prior engagements or it's just too far away?
01:58 kid51 joined #parrot
02:01 sorear soh_cah_toa: yapc::eu?
02:01 soh_cah_toa yapc::na
02:01 plobsing joined #parrot
02:01 kid51 yapc::na::2011?
02:02 soh_cah_toa yeah
02:02 kid51 Hmm, I thought I had taught aloha that.
02:02 kid51 aloha, YAPC::NA::2011 is http://www.yapc2011.us/yn2011/
02:02 aloha kid51: Okay.
02:02 kid51 aloha, YAPC::NA is http://www.yapc2011.us/yn2011/
02:02 aloha kid51: Okay.
02:02 kid51 aloha, YAPC is http://www.yapc2011.us/yn2011/
02:02 aloha kid51: ... but YAPC is intended as an affordable high-quality conference, but there is a fee of some kind ...
02:03 kid51 aloha, YAPC is also http://www.yapc2011.us/yn2011/
02:03 aloha kid51: Okay.
02:03 kid51 aloha: YAPC?
02:03 aloha kid51: YAPC is intended as an affordable high-quality conference, but there is a fee of some kind or http://www.yapc2011.us/yn2011/
02:03 kid51 nice bot
02:03 bubaflub soh_cah_toa: i originally was going to give a talk, but then my car broke down - i could either afford the conference or, you know, driving.
02:04 cotto bubaflub, yapc speakers don't have to pay admission
02:04 bubaflub cotto: getting there + hotel would have set me back too much
02:04 cotto that's true
02:04 cotto and the cost of not going to $dayjob
02:04 bubaflub cotto: we're finishing paying off my tuition and my wife is going back to school in the fall.
02:05 bubaflub cotto: yeah, if i were full time at $dayjob i might have gotten a free pass... they usually send a few people every year
02:05 cotto I should try that.  It'd be fun to get a Drupal/.Net shop to pay for me to do a Perl conference.
02:06 davidfetter left #parrot
02:11 dalek parrot-gmp: 4ce91a5 | bubaflub++ | src/GMP/Integer.winxed (2 files):
02:11 dalek parrot-gmp: add vtable override for get_string()
02:11 dalek parrot-gmp: review: https://github.com/bubaflub/​parrot-gmp/commit/4ce91a5c52
02:11 dalek parrot-gmp: 5c6ee5e | bubaflub++ | / (3 files):
02:11 dalek parrot-gmp: access the underlying pointer rather than the Winxed object
02:11 dalek parrot-gmp:
02:11 dalek parrot-gmp: this fixes mpz_add, mpz_mul, mpz_sub, and mpz_swap
02:11 dalek parrot-gmp: review: https://github.com/bubaflub/​parrot-gmp/commit/5c6ee5eac1
02:12 kid51 bubaflub: terrestrial location?
02:12 bubaflub kid51: central illinois
02:12 kid51 Ah, non-trivial drive.
02:14 bubaflub kid51: yeah, i thought about that - i think it's 10 or 12 hours.  which i *could* do but i'm not sure if i can get the time off of $dayjob
02:14 benabik bubaflub: I'm driving 12 hours...  Possibly 16 if I detour through my parent's house.
02:18 kid51 http://www.yapc2011.us/yn2011/wiki?node=RideShare possibly helpful
02:19 * kid51 must sleep
02:19 benabik kid51++
02:20 kid51 left #parrot
02:31 soh_cah_toa is there a function where i can print the name of an opcode along w/ it's arguments given its opcode_t value? i'm not sure where to look for this
02:31 soh_cah_toa pretty much, what i want to do is just print all the opcodes in a pbc file one by one
02:38 sorear look in pbc_disassemble?
02:38 cotto I don't think there's a function, but the op_info_table struct has all that information
02:39 cotto pbc_disassemble should be helpful
02:39 soh_cah_toa oh yeah
02:46 soh_cah_toa i may already know the answer to this but i just want to make sure...
02:46 soh_cah_toa does headerizer "headerizer" a file even if no changes in its respective .c file where made? is it smart enough to just "headerizer" new functions?
02:46 soh_cah_toa b/c whenever i define a new function and run headerizer and then re-compile, EVERYTHING gets rebuilt
02:47 sorear you already know the answer
02:48 soh_cah_toa alright, just wanted to make sure my makefile wasn't configured wrong or something
02:49 cotto You can manually headerize a single target by specifying a .o file.  I'm usually too lazy.
02:49 soh_cah_toa oh that's right
02:55 pjcj joined #parrot
03:00 dalek parrot-gmp: bee2a23 | bubaflub++ | t/integer/ (2 files):
03:00 dalek parrot-gmp: fix addmul and submul
03:00 dalek parrot-gmp:
03:00 dalek parrot-gmp: had my order of operations wrong, the real functions compute
03:00 dalek parrot-gmp: rop +- (op1 * op2)
03:00 dalek parrot-gmp: also remove a debug statement
03:00 dalek parrot-gmp: review: https://github.com/bubaflub/​parrot-gmp/commit/bee2a235bd
03:00 bubaflub yay, now my entire test suite passes.  time to write more tests.
03:00 soh_cah_toa lucky ;)
03:01 bubaflub soh_cah_toa: it's just because i don't have to deal with IMCC, line numbers, PIR, C, parrot guts...
03:01 soh_cah_toa ha!
03:02 cotto soh_cah_toa, your entire test suite passes too.
03:03 bubaflub soh_cah_toa: how's the project coming along?
03:03 cotto hint hint
03:03 soh_cah_toa ha! 2x
03:04 soh_cah_toa hmm...well i was stuck for a long time so i lost a bit of time. now i'm working on things that should've been done from the start
03:04 soh_cah_toa eh, you learn though
03:06 cotto yup.  learn and write tests
03:07 slavorgn left #parrot
03:07 slavorgn joined #parrot
03:09 bubaflub soh_cah_toa: yeah, no plan survives contact with the enemy.
03:09 cotto imcc being the enemy in this case
03:09 soh_cah_toa you beat me to it :)
03:09 cotto a lot of things don't survive contact with imcc
03:14 benabik cotto++
03:15 soh_cah_toa speaking of tests, that reminds me of something i wanted to ask...
03:15 soh_cah_toa you said that writing tests before you code is a nice way to see how things will work before you even implement it. that makes sense.
03:15 soh_cah_toa however, doesn't that leave me open to all kinds of bugs that the compiler would otherwise catch right away? i mean, i can't syntax check my tests
03:15 soh_cah_toa i'm mostly referring to the c_output_* functions where you actually type the tested code inside heredocs. which is what i'm gonna have to use here
03:17 sorear it doesn't really matter whether the tests are correct, as long as they test something
03:17 sorear the idea of testing is that you won't screw up twice in the same way
03:17 sorear just make sure you don't have tests that cannot fail
03:19 cotto soh_cah_toa, you should really think about how to write hbdb so that it's amenable to automated testing.  Testing C internals is not preferable because it means you're often testing the internals rather than the output.
03:20 cotto and yes, it's not vitally important that your tests be perfect.  You can fix any bugs you find once you're able to start running them.
03:21 soh_cah_toa well, take t/src/basic.t for example.  at line 29 is one of the c_output_is() functions i'm talking about. inside the heredoc, suppose i leave off a semicolon, i'm not gonna get a "syntax error at line blah blah blah" message
03:22 cotto That's one of many reasons to minimize the number of C tests.
03:22 soh_cah_toa but everything i have is c
03:22 cotto You can check it manually by running the foo_12.c files that Test::More generates, but that's clunky.
03:23 cotto Sure, but you don't need to test C with C.  You just care that, for a given input, you get something that looks like the right output.
03:24 cotto It's a little bit trickier because of the interactive nature of a debugger, but there should be a reasonable strategy for writing useful tests.
03:24 soh_cah_toa well that's another thing. i don't really know how to "think about how to write hbdb so that it's amenable to automated testing." sadly, i'm just not really sure what that means (thank you college)
03:25 cotto What's your understanding of how a test should work?
03:26 soh_cah_toa it just tests that your code does what it's supposed to do. how it does that... ???
03:27 bubaflub soh_cah_toa: there are really two ways to go about testing, at least as i see it
03:27 bubaflub soh_cah_toa: unit tests might test individual functions or blocks of code - give it a certain input and a certain output should happen
03:28 bubaflub soh_cah_toa: integration tests can actually test a full stack of code
03:28 cotto Tests are a way of running code under controlled and monitored conditions that are known to exercise a specific behavior.
03:28 bubaflub soh_cah_toa: in your case, you may want both.  the unit tests can make sure that, for example, individual functions are doing exactly what you want them to do.  even if it's trivial functionality, it can sometimes save your bacon.
03:29 bubaflub soh_cah_toa: an integration test would actually automate a run of the debugger - say, load a file, set a break point, continue, and verify that you in fact stopped at that point
03:29 soh_cah_toa integration sounds like it may be a little harder in my case since it's an interactive program
03:31 cotto yes, but it's also important
03:31 bubaflub soh_cah_toa: it is more difficult - for example, when we do integration tests for websites, we'll have to actually tell a program to go to a certain page, enter a user name and a password, hit the submit, and so on and so forth
03:31 bubaflub soh_cah_toa: for some integration tests we'll even need to run javascript or automate a browser
03:32 bubaflub soh_cah_toa: but it's great when we know we broke something
03:32 bubaflub soh_cah_toa: and the integration test is the real selling point - we want a certain set of actions to work (such as setting a breakpoint, inspecting a variable, etc.) rather than just individual functions
03:32 cotto bubaflub, I wish my $dayjob did that.  The big weakness of (pre 7.0) Drupal is a lack of testing infrastructure.
03:33 bubaflub cotto: yeah, we've got some Catalyst and other perl frameworks.  we use WWW::Mechanize and cousins.
03:33 cotto cpan ftw
03:33 bubaflub cotto: testing in PHP is just difficult
03:33 bubaflub cotto: rather, from my limited experience, i'm not sure which testing framework to use in PHP
03:33 cotto Testing is not an idea generally embraced in PHPland from what I've seen.
03:34 cotto I'm really glad Parrot inherited its testing culture from Perl.  Perl definitely gets it right.
03:34 bubaflub cotto: agreed.
03:35 bubaflub soh_cah_toa: testing can be a bit overwhelming and non-intuitive at first, but it's just a simple mechanism to *automatically* verify sanity on certain actions.  test driven development takes this one step further and says you should write your tests first, then write the code for it to pass.
03:36 bubaflub soh_cah_toa: and yes, it is probably difficult to test in C or PIR the debugger; you may have to do some heavy lifting in another language to do something as crazy as an integration test.
03:37 bubaflub soh_cah_toa: and i'm more than happy to look over tests or bounce ideas off of if you need it
03:38 soh_cah_toa another thing, whenever i learn how to actually do all this, when do know when i have enough coverage?
03:38 soh_cah_toa when is enough, enough?
03:38 cotto soh_cah_toa, I'm glad you asked.  make cover will tell you how much you have.  It's up to you to figure out if a bit of code is worth covering or not.
03:40 soh_cah_toa ok
03:40 cotto You should cover anything that can reasonably be covered.
03:40 cotto Testing if a malloc fails isn't necessary.
03:42 theory joined #parrot
03:43 cotto soh_cah_toa, if all you did tomorrow was figure out a way to run integration tests on hbdb, I'd consider that a day well spent.  Once you get the idea in your head, the rest is a smop.
03:45 soh_cah_toa the thing that frustrates me the most is that i can't even identify what it is i don't understand about testing.
03:45 soh_cah_toa i can clearly see why it's so important. i can see when it needs to be done.
03:45 soh_cah_toa but when i think about what this means for hbdb, my mind just goes "wait...what?"
03:45 cotto write some pseudocode
03:46 soh_cah_toa for?
03:47 cotto for the test harness, for a test, for whatever
03:50 sorear cotto: I thought Parrot used a malloc wrapper that *cannot* return null
03:51 cotto sorear, yes.  That's just an example of an unusual corner case.
04:05 bubaflub left #parrot
04:06 soh_cah_toa i think i just thought of something i can test by tomorrow
04:06 soh_cah_toa the next thing i was gonna do is parse the input to check that it's an actual command
04:06 soh_cah_toa i could write a test that fake inputs a real command and make sure it's recognized and then fake input garbage and make sure it isn't regcognized
04:08 cotto That'd be a great start.
04:08 soh_cah_toa ah, yes
04:08 soh_cah_toa +1 for me
04:09 losinggeneration joined #parrot
04:09 cotto sleep sort is my new favorite algorithm
04:10 cotto http://dis.4chan.org/read/prog/1295544154 (sfw)
04:11 lg_quassel left #parrot
04:11 * soh_cah_toa shudders
04:12 soh_cah_toa sorting algorithms are my greatest weakness
04:13 cotto It's hilarious.
04:13 soh_cah_toa especially the comment "oh god, it works" :)
04:19 benabik Guh.  I've been staring at code all day and I still have no idea _why_ this fails.
04:22 soh_cah_toa ah, i get it. larger numbers sleep longer so the smaller ones return in order from small to big
04:22 soh_cah_toa that's awesome
04:23 cotto yup
04:23 cotto so ridiculous, yet so brilliant
04:23 soh_cah_toa yeah, wow. that is pretty genius
04:23 plobsing personally, I still prefer the bogosort
04:25 soh_cah_toa it is simple, i'll give it that
04:28 benabik Radixsort blew my mind.  O(n) sorting.
04:33 cotto karma lulzsec
04:33 aloha lulzsec has karma of 0.
04:34 soh_cah_toa cotto: anyway, i'm trying to go through some code thinking "how could this possibly go wrong?" and if there's some way it could, then (i hope) it needs a test
04:34 soh_cah_toa is that a good approach?
04:35 benabik ...  This has to be a bug elsewhere that's just exposed when I make this change.  Gah.  I hate this.  Maybe if I bisect and apply the change on top of random commits...
04:35 cotto soh_cah_toa, you could do worse.  The first thing to test is the normal expected usage, though.  After that, go nuts.
04:35 * benabik is slowly going crazy.
04:35 benabik Crazy going slowly am I.
04:36 soh_cah_toa oh right. i'm just trying understand what kinds of things would need to be tested
04:37 cotto soh_cah_toa, anything you can write a test for is fair game.
04:37 plobsing soh_cah_toa: a decent goal is at least one run through of every code path
04:38 soh_cah_toa alright, well atleast i have somewhere to start tomorrow. i have a feeling that i'll be just fine after the first step
04:39 cotto Yeah.  Getting the first test written will be the hard part.  After that is the slightly less hard part.
04:39 cotto well, several of them
04:39 benabik Yessss...  The base tempreg commit passes, so I must have goofed something else!  (YOU ALL GET TO HEAR MY MADNESS!)
04:40 benabik Debugging register allocation is "fun".
04:41 soh_cah_toa hasta la pasta amigos
04:42 soh_cah_toa left #parrot
04:44 cotto http://www.youtube.com/watch?v=QH2-TGUlwu4 <-nyan cat + extra nyan cat
04:45 benabik How did they do that?  That's crazy.
04:45 davidfetter joined #parrot
04:46 cotto step 1: get 15+M views
04:46 benabik Hah
04:46 benabik step 2: amuse some bored Google engineers?
04:47 cotto I guess so
04:50 tadzik I feel disturbed than the background moves at a different tempo than the music
04:53 benabik Yes, THAT's the disturbing part.
04:54 tadzik also, when people sing a capella and can't hold the pause
05:15 benabik My constant is changing.  NQP needs real constants.  :-(
05:17 benabik ...  Incrementing an Integer PMC changes the PMC directly doesn't it.  Integers aren't constant.  Guh.
05:18 sorear yeppp
05:19 benabik I think that's what was doing it.  I bound a variable to a "constant", incremented the variable and that changed the constant.
05:24 Kulag left #parrot
05:25 benabik I just discovered the bug when I changed enough other code that overlap started happening.  Wheeeee...
05:26 Kulag joined #parrot
05:29 tadzik oh
05:36 benabik Looks like I may be done with this bug driving me mad.
05:36 benabik Time to find the next thing that'll make me crazy.
05:36 tadzik how about imcc? :)
05:37 benabik Oh that keeps popping up, but I've usually found the sorting through the PIR based on method name and error will generally get me to a useful `.annotate 'line'`
05:38 benabik Not that that's how I want to spend my time, mind you.
05:39 tadzik examtime &
05:42 benabik I appear to have caught up with pmichaud's work.  Wheee...  Now to test nqp-rx's master on it.
05:49 allison left #parrot
05:50 allison joined #parrot
05:54 rurban_ joined #parrot
05:56 rurban left #parrot
05:56 rurban_ is now known as rurban
05:57 theory left #parrot
06:10 contingencyplan joined #parrot
06:21 janus left #parrot
06:30 woosley joined #parrot
06:50 benabik codetest is complaining about ops_not_tested.pl missing.  :-/
06:53 benabik Oh, reconfig fixed it.  *sigh*  The coupling between code changes, MANIFEST, and configure is a hazy one.
06:56 cotto and makefiles
06:56 sorear when in doubt, git clean -dfx
06:57 sorear "realclean" targets are subtly broken most of the time when they exist at all
07:02 fperrad joined #parrot
07:19 mj41 joined #parrot
07:19 dalek parrot/nqp_pct: cff934f | benabik++ | compilers/pct/src/P (22 files):
07:19 dalek parrot/nqp_pct: Re-bootstrap PCT to remove broken-ness
07:19 dalek parrot/nqp_pct:
07:19 dalek parrot/nqp_pct: Old bootstrap had bad code to generate contextuals, making it
07:19 dalek parrot/nqp_pct: impossible to rebootstrap without manual intervention.  That
07:19 dalek parrot/nqp_pct: intervention has now been done and code can move on.
07:19 dalek parrot/nqp_pct: review: https://github.com/parrot/parrot/commit/cff934fbde
07:19 dalek parrot/nqp_pct: 12dba40 | benabik++ | / (6 files):
07:19 dalek parrot/nqp_pct: [pct] Add PAST::Stmt, UNIQUE_BASE and TEMPREG_BASE
07:19 dalek parrot/nqp_pct:
07:19 dalek parrot/nqp_pct: From:8392f3192d04c7e8c069d6690b053980208dee6b
07:19 dalek parrot/nqp_pct: Author:pmichaud <pmichaud@pobox.com>
07:19 dalek parrot/nqp_pct: review: https://github.com/parrot/parrot/commit/12dba40697
07:19 dalek parrot/nqp_pct: c754a26 | benabik++ | compilers/pct/src/PAST/Compiler.pm:
07:19 dalek parrot/nqp_pct: [pct]: Code for managing temporary register pools
07:19 dalek parrot/nqp_pct:
07:19 dalek parrot/nqp_pct: From:7e3b1613648d0074e0ab33566d438c0239b20a14
07:19 dalek parrot/nqp_pct: Author:pmichaud <pmichaud@pobox.com>
07:19 dalek parrot/nqp_pct: review: https://github.com/parrot/parrot/commit/c754a2606c
07:19 dalek parrot/nqp_pct: 3457fe4 | benabik++ | compilers/pct/src/PAST/Compiler.pm:
07:19 dalek parrot/nqp_pct: [pct]: Use tempreg in coerse, pirop, and Val
07:19 dalek parrot/nqp_pct:
07:19 dalek parrot/nqp_pct: Have register coercion, :pasttype<pirop>, and PAST::Val use temporary
07:19 dalek parrot/nqp_pct: registers.  This greatly reduces the number of registers used in any
07:19 dalek parrot/nqp_pct: given sub.
07:19 dalek parrot/nqp_pct:
07:19 dalek parrot/nqp_pct: From:e2eab899fb167d40a1c85aa0425e1593c3758dc9
07:19 dalek parrot/nqp_pct: Author:pmichaud <pmichaud@pobox.com>
07:19 dalek parrot/nqp_pct: review: https://github.com/parrot/parrot/commit/3457fe4220
07:19 dalek parrot/nqp_pct: 04ef874 | benabik++ | compilers/pct/src/PAST/Compiler.pm:
07:19 dalek parrot/nqp_pct: [pct]: tempreg in immediate block, if, for, return
07:19 dalek parrot/nqp_pct:
07:19 dalek parrot/nqp_pct: Use temporary registers in immediate block return values, method/sub
07:19 dalek parrot/nqp_pct: calls, :pasttype<if>, :pasttype<for>, and :pasttype<return>.
07:19 dalek parrot/nqp_pct:
07:19 dalek parrot/nqp_pct: From:190bf17a32c0bbdb3fb999496dc2f7874a027c06
07:19 dalek parrot/nqp_pct: Author:pmichaud <pmichaud@pobox.com>
07:19 dalek parrot/nqp_pct: review: https://github.com/parrot/parrot/commit/04ef874f69
07:19 dalek parrot/nqp_pct: 1d4622f | benabik++ | compilers/pct/src/PAST/Compiler.pm:
07:20 dalek parrot/nqp_pct: [pct]: No tempreg inside exception handlers
07:20 dalek parrot/nqp_pct:
07:20 dalek parrot/nqp_pct: Temporary registers and exception handlers might not mix, so disable
07:20 dalek parrot/nqp_pct: temporary register generation while processing handlers.
07:20 dalek parrot/nqp_pct:
07:20 dalek parrot/nqp_pct: PAST's built-in loop handlers ought to be safe, however.
07:20 dalek parrot/nqp_pct:
07:20 dalek parrot/nqp_pct: From:72a56d9dc12b663a95bcdefa7c666304849c7f06
07:20 dalek parrot/nqp_pct: Author:pmichaud <pmichaud@pobox.com>
07:20 dalek parrot/nqp_pct: review: https://github.com/parrot/parrot/commit/1d4622f9f7
07:20 dalek parrot/nqp_pct: 0445396 | benabik++ | compilers/pct/src/PAST/Compiler.pm:
07:20 dalek parrot/nqp_pct: [pct]: tempreg in vivi*, force unique in .lex
07:20 dalek parrot/nqp_pct:
07:20 dalek parrot/nqp_pct: Update 'viviself' and 'as_vivipost' to use shared temporary registers,
07:20 dalek parrot/nqp_pct: force ".lex" declarations to always use a non-shared registers.
07:20 dalek parrot/nqp_pct:
07:20 dalek parrot/nqp_pct: From:efc90318a5d1232b02a04b4c4c56d1ac8067b001
07:20 dalek parrot/nqp_pct: Author:pmichaud <pmichaud@pobox.com>
07:20 dalek parrot/nqp_pct: review: https://github.com/parrot/parrot/commit/044539635c
07:20 dalek parrot/nqp_pct: 8783a78 | benabik++ | compilers/pct/src/PAST/ (2 files):
07:20 dalek parrot/nqp_pct: [pct]: Let PAST::Block have its own tempregs
07:20 dalek parrot/nqp_pct:
07:20 dalek parrot/nqp_pct: Add the ability for a PAST::Block to start a completely new temporary register bank.
07:20 dalek parrot/nqp_pct:
07:20 dalek parrot/nqp_pct: From:6a763d7d00d6800c30d5d8b79b8dc4d4a86ffab4
07:20 dalek parrot/nqp_pct: Author:pmichaud <pmichaud@pobox.com>
07:20 dalek parrot/nqp_pct: review: https://github.com/parrot/parrot/commit/8783a78c47
07:20 dalek parrot/nqp_pct: ea9260c | benabik++ | compilers/pct/src/PAST/Compiler.pm:
07:20 dalek parrot/nqp_pct: [pct] Stmt - don't reserve return in void context
07:20 dalek parrot/nqp_pct:
07:20 dalek parrot/nqp_pct: Don't reserve a Past::Stmt's return register when in void context.
07:20 dalek parrot/nqp_pct:
07:20 dalek parrot/nqp_pct: From:fb77d3c5719dba4f06a2f35672c279d90d47917f
07:20 dalek parrot/nqp_pct: Author:pmichaud <pmichaud@pobox.com>
07:20 dalek parrot/nqp_pct: review: https://github.com/parrot/parrot/commit/ea9260cc94
07:20 dalek parrot/nqp_pct: 0ebb103 | benabik++ | compilers/pct/src/P (23 files):
07:20 dalek parrot/nqp_pct: Re-bootstrap PCT to get PAST::Stmt
07:20 dalek parrot/nqp_pct:
07:20 dalek parrot/nqp_pct: Now NQP-ized PCT can compile NQP-rx's master.  Excellent.
07:20 dalek parrot/nqp_pct: review: https://github.com/parrot/parrot/commit/0ebb103fd8
07:20 dalek parrot/nqp_pct: 0ab886e | benabik++ | / (13 files):
07:20 dalek parrot/nqp_pct: Merge branch 'master' into nqp_pct
07:20 dalek parrot/nqp_pct:
07:20 dalek parrot/nqp_pct: Conflicts:
07:20 dalek parrot/nqp_pct: compilers/pct/src/PAST/Compiler.pir
07:20 dalek parrot/nqp_pct: compilers/pct/src/PAST/Node.pir
07:20 dalek parrot/nqp_pct: review: https://github.com/parrot/parrot/commit/0ab886ef66
07:20 benabik Okay, that's it.  Show's over.  ;-)
08:27 moritz :-)
09:22 tadzik :)
09:33 Drossel joined #parrot
09:34 Kulag left #parrot
09:41 Drossel left #parrot
09:41 Kulag joined #parrot
09:47 Kulag left #parrot
09:52 Drossel joined #parrot
10:08 lucian joined #parrot
10:25 woosley left #parrot
10:36 RobertLJ joined #parrot
11:03 ambs joined #parrot
12:24 pmichaud ~/lastlog pmichaud 5
12:24 pmichaud oops
12:25 moritz good morning pmichaud :-)
12:25 pmichaud good morning, #parrot
12:25 pmichaud still getting used to this new keyboard
12:33 bluescreen joined #parrot
12:36 GodFather joined #parrot
12:37 cosimo joined #parrot
12:49 cosimo left #parrot
12:50 GodFather left #parrot
12:56 benabik left #parrot
13:00 mtk joined #parrot
13:08 bubaflub joined #parrot
13:11 tadzik hello pmichaud
13:30 whiteknight joined #parrot
13:30 mtk left #parrot
13:30 whiteknight good morning, #parrot
13:31 tadzik good afternoon whiteknight
13:31 whiteknight hello tadzik, how are you doing today? How is the project going?
13:32 tadzik not bad. I had a math exam today, which I think I should pass, and I got my shiny Kindle today \o/
13:32 whiteknight oh fun.
13:32 whiteknight I've been kicking around the idea of getting a kindle, but I like having a physical book in my hands too much
13:32 tadzik and gsoc is doing good, I managed to get no slips due to university mess, everything's to the schedule
13:32 whiteknight oh nice. Sticking to schedule is the hardest part
13:32 tadzik I have to many books on my hdd which I really want to read, but reading from the screen sucks so much
13:34 pmichaud I got a Galaxy Tab for reading e-books (incl Kindle books); now I greatly prefer it to the physical kind of book.
13:34 pmichaud (which surprised me a bit)
13:34 redicaps joined #parrot
13:35 moritz I've had an ebook reader in my hand once, and it took about 3s to flip to the next page
13:35 moritz which annoyed me to no end
13:35 tadzik it takes about 3/4s on my Kindle
13:36 tadzik OTOH, you get a 14-30 days of battery life :)
13:36 pmichaud yes, a 3s flip would be annoying.
13:36 moritz 3/4 s sounds tolerable
13:36 atrodo moritz> Same reason I hate digital cable.  Waiting over a second for a channel change when analog is instant drives me bonkers
13:36 tadzik yeah, it's like flipping a physical page :)
13:36 tadzik and I got back to reading HPatMoR :)
13:37 whiteknight atrodo: yes, channel change delays drive me bonkers. Much more than they really should
13:37 mtk joined #parrot
13:37 * tadzik has no TV
13:37 whiteknight it's amazing how such a little inconvenience seems like such a big thing
13:37 pmichaud I like that I can stand the Tab on its side on the table or desk in front of me and not have to hold it.  With a book I have to hold it open or it's not at an appropriate viewing angle.
13:37 tadzik well, I pay for one, they don't sell internets w/o a TV
13:38 moritz pmichaud: sounds like it would be very useful for me, since I often have only one hand free when carrying or holding the toddler
13:38 tadzik :)
13:38 whiteknight I'm also weary of getting anothet gadget. Between my phone, my laptop, and my gameboy, I don't think I have any more love to spread around
13:38 whiteknight my wife and kid already get the short end of that stick :)
13:39 atrodo whiteknight> wife and kids are overrated, gadgets are where it's at
13:39 pmichaud http://pmthium.com/wp/wp-conte​nt/uploads/2011/02/easel-1.jpg  # picture of Tab standing
13:39 * atrodo also glad his wife doesn't get on irc
13:39 tadzik pmichaud: nice indeed
13:40 whiteknight atrodo: I've had to put my kid in time-out twice for breaking my laptop. I've never had to put my laptop in time-out for hurting my kid. Not once. Food for thought
13:41 atrodo whiteknight++ infallible logic
13:41 pmichaud whiteknight: that's only because your kid isn't old enough to be hurt by your laptop :)
13:41 whiteknight pmichaud: that's true. Right around when I turned 15 or 16 was when I was irrepairably damaged by the internet
13:41 atrodo pmichaud> or he hasn't figured out a screwdriver and which wires not to bridge
13:42 pmichaud I frequently have to protect the kids here from the laptops... the laptops are always demanding their attention when they should be outside playing or doing homework or cleaning the house :)
13:42 atrodo Now that brings back memories of childhood
13:45 whiteknight actually, I had a friend back then with a cable descrambler. That did much more damage than the internet at the time. Delivered nudity at much higher bandwidth
13:46 UltraDM joined #parrot
13:47 whiteknight so many things I need to try and keep my kid away from!
13:55 rurban_ joined #parrot
13:58 plobsing left #parrot
13:58 rurban left #parrot
13:58 rurban_ is now known as rurban
14:01 benabik joined #parrot
14:02 benabik Good morning, #parrot
14:02 tadzik good morning benabik
14:03 benabik tadzik: What's happening?
14:04 bubaflub ~
14:06 tadzik benabik: playing with my new kindle
14:07 benabik tadzik: Sounds productive!  :-D  I got a Sony e-Reader a couple years back.  It was really nice when I could find properly formatted eBooks.
14:08 moritz tadzik: how does "Using Perl 6" look on the kindle? :-)
14:08 tadzik Calibre is able to convert stuff pretty nicely. I turned my Higher Order Perl into a .mobi, .pdf if free while Kindle dition costs like 30 bucks on amazon
14:08 tadzik moritz: haven't tried it yet :)
14:08 tadzik Modern Perl looks nice
14:08 tadzik the unofficial mobi of it at least
14:09 benabik The new iterations of eInk screens make me tempted to switch up, but I tend to use my iPad more anyway.
14:36 hercynium joined #parrot
14:48 NotFound whiteknight: I have a phone, a tablet, a miniportable, two laptops and a NDS.
14:49 NotFound Eh... no... two NDS in fact.
14:51 whiteknight NotFound: ETOOMANYGADGETS
14:52 NotFound And I still miss an ebook reader, I don't enjoy reading on the tablet.
14:52 benabik NotFound: Which tablet?
14:53 NotFound Toshiba Folio 100
14:56 NotFound BTW the old laptop is useful, I've fixed several parrot win32 problems in its venerable XP Home.
14:57 benabik Bad screen?  I find my iPad pretty good for reading, although sometimes I do miss the page-like eInk.
14:57 NotFound With notepad.
14:59 NotFound benabik: I'm getting a bit less young and my eyes are more demanding ;)
15:01 * NotFound is older than Emacs
15:01 * moritz is older than Perl
15:02 * benabik is surprised to be older than Perl.
15:02 szbalint a couple billion years older :)
15:03 szbalint at least the core codebase
15:04 moritz \o/ szbalint, long time no see
15:04 szbalint hey :)
15:05 szbalint indeed
15:05 NotFound But hey, I'm almost a child, I have a NDS ;)
15:07 JimmyZ joined #parrot
15:12 whiteknight what is an NDS?
15:12 benabik Nintendo DS, I'd imagine.
15:13 whiteknight oh yeah, that makes sense
15:13 NotFound Aye
15:13 benabik Hopefully a Lite though.  The original was bulky as all get out.
15:13 NotFound A lite and a DSi
15:13 atrodo I grew up with an original gameboy
15:14 NotFound I've never had consoles until recently, but now I have a Wii and the DSs.
15:16 JimmyZ Wii U ?
15:16 JimmyZ the next generation?
15:16 benabik I don't see the point in having a Wii U right now.  Not a lot of games for it.
15:17 NotFound That may become my second non-portable console.
15:18 JimmyZ I'm not that like Wii U now. though I like Wii
15:20 NotFound I have no urgence, in a few months maybe.
15:20 benabik Ignoring stupid touchscreen tricks, it appears to be a Wii with actual computing power.  Which sounds awesome.
15:22 benabik NotFound: Well it's not supposed to be released for a year or so...
15:25 NotFound benabik: my lack of urgence is such as not worrying to look for the release date ;)
15:26 UltraDM left #parrot
15:27 benabik I find the variety of types of variable in Parrot slightly confusing.  What's the difference between (get|set)_global and \1_hll_global?
15:30 NotFound benabik: the _hll_ variants look in the current HLL base namespace.
15:30 benabik NotFound: Otherwise it just looks in the current namespace?  I suppose that actually makes sense.
15:30 NotFound benabik: yeah
15:31 NotFound And there is also the _root_ variants.
15:39 dmalcolm joined #parrot
15:48 mj41 left #parrot
15:49 redicaps left #parrot
15:53 benabik Hm.  PAST appears to use .lex to define variables as registers and then proceeds to use find_lex and store_lex instead of the lex register.
15:53 benabik PAST & POST could use a _lot_ of optimization love.
15:55 moritz benabik: yes, but it requires some decent amount of static analysis
15:55 moritz benabik: you can only use registers if inner blocks (which are compiled to separate subs) don't access the variable
15:56 moritz benabik: that said, if it's done correctly, such optimizations will be *greatly* appreciated by all users
15:56 benabik moritz: Well, you could still lift a lot of fetches into a single register at block entry.
15:57 benabik moritz: Yes, it's a decent amount of static analysis but this is a solved problem to some extent.
15:57 rurban_ joined #parrot
15:58 rurban left #parrot
15:58 * benabik has a dream of generating an SSA form of PIR and doing some basic optimizations from that.
15:58 rurban_ is now known as rurban
15:59 theory joined #parrot
15:59 benabik moritz: Blocks are separate subs to handle lexical variables properly, ne?
16:01 darbelo joined #parrot
16:01 * benabik likes the idea of the tree-optimization library but is sad that no actual optimizations seem to be written using it.
16:02 whiteknight yeah, it's a good concept, it just needs to be put to use
16:03 jnthn__ Thing is, at least for Perl 6, the PAST tree ain't really enough for a bunch of the interesting optimizations. You need to look at the type environment, stuff in the lexpads, packages, etc.
16:04 cotto_work ~~~
16:04 jnthn__ For other languages I suspect it may be more applicable.
16:04 benabik jnthn__: You can't get interesting optimizations, but you can probably get some simple ones.
16:05 benabik jnthn__: I'd be very surprised if repeated `fetch_lex`s couldn't be combined in any language.
16:06 NotFound I still think that the best way to optimize out redundant opcodes is just not generating them.
16:06 jnthn__ benabik: They can be in some langauges, yes.
16:06 jnthn__ benabik: Not in Perl 6 though...at least, not naively. :)
16:07 lucian hmm, having trouble with an imcc error https://gist.github.com/1029584
16:08 benabik jnthn__: The only reason I can see for not collapsing fetch_lex and get_global calls is in case of parallelization.  And to some extent, P6 containers should help avoid that problem since the _container_ is unlikely to change.
16:09 NotFound lucian: a=$P01 = builtins["int"] ???
16:09 jnthn__ benabik: You seem to be confusing binding and assignment. Binding could replace the container.
16:09 jnthn__ So we have to know that the thing will never be re-bound.
16:09 lucian NotFound: but it's not even complaining about that line
16:10 lucian NotFound: it stops at line 9, which looks innocent
16:10 benabik lucian: Are you trusting imcc--'s line numbers?
16:10 lucian benabik: ah, i should not?
16:10 NotFound lucian: never trust imcc line numbers in reports.
16:10 lucian NotFound: benabik: ah. ok, thanks
16:10 NotFound lucian: BTW, always indent pir code.
16:11 lucian NotFound: it's generated code, i haven't bothered to make it indent nicely yet
16:11 NotFound Non indented made line numbers even worse.
16:11 whiteknight yeah, IMCC's line-end heuristic helpfully requires indented code
16:12 lucian but, that makes no sense
16:12 benabik jnthn__: Arg.  P6 is a little too mutable in some ways.  Can you even rely that packages won't change?  If so you could collapse repeated "$P### = get_global ["PAST";"Ops"]" type calls.
16:12 whiteknight repeat after me: IMCC--
16:13 lucian i see
16:13 benabik IMCC--
16:13 bubaflub karma imcc
16:13 aloha imcc has karma of -20.
16:13 NotFound lucian: reality is unrealistic.
16:13 whiteknight it should be much lower
16:13 benabik That seems way too high.  Maybe people gave it positive karma once upon a time.
16:14 jnthn__ benabik: We can resolve type names at compile time, yes.
16:14 jnthn__ And actually do in nom.
16:14 jnthn__ Apart from generics, which we have to postpone.
16:19 benabik Are we doing a code freeze this weekend?
16:19 whiteknight who's the release manager?
16:19 cotto_work ohai
16:19 * benabik is mostly curious because I think the small nqp-rx stmt improvement might be good to get into parrot.
16:19 cotto_work <-
16:20 cotto_work benabik: I'll most likely request a freeze starting Sunday.
16:21 benabik cotto_work: Can/should we update our bundled nqp-rx before then?
16:22 benabik cotto_work: The PAST::Stmt addition really cuts down on register usage, which really improves imcc's compile time on generated code.
16:22 benabik Although the insane number of registers used in PAST::Compiler does appear to be stressing the new allocator quite well.
16:23 davidfetter left #parrot
16:24 cotto_work benabik: when was it last updated?
16:24 whiteknight Can we update nqp-rx to emit 'file' annotations, if we're going to be updating the snapshot?
16:24 cotto_work looks like Feb
16:24 whiteknight For somebody familiar with the codebase, I can't imagine that's too hard to do
16:25 mj41 joined #parrot
16:25 benabik cotto_work: pmichaud++ added PAST::Stmt to nqp-rx a couple days ago.  Prior to that the last commit to rx was in Feb.
16:26 whiteknight TT #2132
16:27 darbelo left #parrot
16:31 allison http://hackage.haskell.org/t​rac/ghc/blog/new-gc-preview
16:35 darbelo joined #parrot
16:36 benabik allison: very interesting.
16:37 lucian benabik: i think ghc folks are spoilt though, since haskell's pure
16:37 JimmyZ looks like there are many papers on haskell
16:37 benabik lucian: That helps some, but the general concept of thread-local young generation mixed with stop-the-world full gen should be applicable anywhere.
16:37 JimmyZ I always see it here and there
16:38 lucian benabik: yes, of course. there's just a lot more details to take care of
16:38 benabik lucian: Of course, but they have to be taken care of anyway.  :-D
16:38 lucian and in general, having to support imperative languages requires more locks
16:38 lucian benabik: yes. dreadful, isn't it? :)
16:39 benabik whiteknight: When I finish working on this bit of PCT, I'll look into NQP file annotations.
16:40 benabik It should be a one-liner somewhere obvious.
16:40 * benabik knocks on wood.
16:45 cotto_work https://github.com/MrMEEE/bumblebee/c​ommit/a047be85247755cdbe0acce6#diff-1 - ow
16:47 benabik cotto_work: I like the meme image.  "I don't always install Bumblebee.  But when I do, it deletes my /usr folder."
16:49 NotFound Now you know why some people are reluctant to add a 'uninstall' make target ;)
16:50 NotFound "Just a bunch of rm -rf as root, what can be wrong?" ;)
16:51 benabik NotFound: This is why I tend to install as a standard user into a tempdir and then use stow to actually put it in place
16:51 benabik (When I don't use .debs)
16:52 cotto_work benabik: that looks interesting.  I just install to /usr/local/parrot-git and make sure to have some symlinks in place.
16:53 benabik cotto_work: My "Make" script uses DEST dir to install into `pwd`/temp and then uses "mv temp/usr/local/* /usr/local/stow/parrot"
16:53 benabik cotto_work: I do that sort of thing a lot.
16:56 benabik *DESTDIR
16:57 cotto_work That commit goes a long way to clarify why allison++ is against a uninstall target.
16:57 benabik Uninstall belongs to package managers.
16:57 cotto_work +1
16:57 benabik Even if your package manager is just stow++
17:01 benabik When I was going through Linux From Scratch, I used xstow as my package manager.  That experience taught me a lot.  Mostly it taught me that I don't want to do that again.
17:01 janus joined #parrot
17:09 atrodo benabik> I had a similar experience, minus stow.  Makes me want to use Gobo
17:10 benabik atrodo: Gobo reminds me a lot of the way OS X handles things.
17:11 atrodo benabik> Aye, which is what appeals to me
17:12 atrodo somewhere in my LFS experience, I discovered how fragile installing software on unix is.  Programs don't like being relocated
17:12 * benabik wonders if Rootless GoboLinux would make a decent replacement for fink on my next install.
17:14 atrodo benabik> I had a plan to install gobo on my server running lfs, but they havn't released in 3 years which is a tough pill to swallow
17:15 benabik atrodo: Ew.  System looks nice, but being that out of date isn't.
17:15 atrodo benabik> Exactly
17:15 benabik whiteknight: Isn't quite so simple.  Current line annotations in NQP are generated by POST::Compiler and the PAST tree doesn't currently hold a file name.  Will investigate deeper.
17:18 benabik On the plus side, if I fix this for NQP, it'll be fixed for all future users of PCT.
17:21 TimToady benabik: packages are mutable in P6, but almost nothing relies on packages anymore; functions are all lexical, and methods are all off in the metaobject.
17:22 TimToady and there are strict guarantees about being able to nail down some of the loose things at CHECK time
17:22 TimToady unless they've specifically been declared to be loose permanently
17:22 moritz benabik: ah, *that* is why some few error messages in rakudo have the line number, but not the file name
17:23 benabik moritz: Yes.  PCT::HLLCompiler stashes the file name(s) in a lexical $?FILES, but only variable declaration errors does anything with it.
17:24 dodathome joined #parrot
17:25 davidfetter joined #parrot
17:27 benabik I'll look into this later today.  I should grab lunch and stop by school to deal with paperwork for my assistantship next year.
17:28 benabik Looks like this will involve changes to PCT, but not NQP-rx, so updating our nqp-rx snapshot shouldn't be held up on it.
17:28 * benabik assigns the TODO to himeself.
17:30 JimmyZ left #parrot
17:32 benabik left #parrot
17:35 pmichaud 15:56 <benabik> moritz: Well, you could still lift a lot of fetches into a single register at block entry.
17:36 pmichaud No, YOU CANNOT.
17:36 * pmichaud always has to have this discussion.
17:36 pmichaud oh, he left.
17:37 moritz pmichaud: jnthn__ mentioned re-binding in the backlog
17:37 pmichaud yes, I see that now.  I skimmed through looking for it but didn't see it.  jnthn++
17:38 pmichaud I probably shouldn't let it bother me, but it seems that _everyone_ looks at the code and says "oh, how inefficient" and then blames PCT.  It's Parrot's model that is broken.
17:40 * pmichaud goes back to hacking list iterators.
17:48 lucian heh, it took me this long to realise that all literals get interned, in any compiler
17:49 Tene pmichaud: Hah.  I remember when I asked you about that.  :)
17:51 whiteknight I don't think PCT is the problem. It's a symptom of the problem, but nobody's working to fix the underlying issues
17:52 whiteknight I've said before, several times, that if somebody came up with a good design for a solution I would help implement it. I don't understand the problems enough myself to design it
17:52 pmichaud whiteknight: I think it requires some fundamental Parrot architectural changes.
17:53 whiteknight right. What changes?
17:53 lucian allison: ping
17:53 whiteknight This is one of those areas where I don't even know what I don't know
17:55 whiteknight brb, irc client fail.
17:55 whiteknight left #parrot
17:55 whiteknight joined #parrot
17:56 * whiteknight would love to hear an explanation about how, in less than a days worth of light browsing, firefox sucks up more than a gig of ram
17:56 whiteknight or why, after closing firefox, that memory isn't immediately freed
17:56 cotto_work http://trac.parrot.org/parrot/wiki​/WhyDoesNQPGenerateInefficientCode
17:57 whiteknight I don't think I
17:57 whiteknight 've ever seen that page
17:58 cotto_work I've put it on my M0 todo list to make sure that M0 will support something sane, even if it also has to support PIR.
17:58 lucian whiteknight: the firefox process doesn't always die with the closing of firefox
17:59 whiteknight If PIR is going to continue to serve as some for of middle language, we need to fix it eventually
18:00 whiteknight and if what I'm reading is all still right, we need fixes to vtables to differentiate between set_ and assign_ (a difference the PIR syntax sugar seems to obscure more than anything), fix lexpads, and do other stuff
18:02 lucian cotto_work: heh, coincidentally that's annoying me as well
18:02 lucian (the lack of a clear bind)
18:02 lucian i'm working around it by replacing all lexicals with hashes ...
18:07 cjh left #parrot
18:08 cjh joined #parrot
18:08 mj41 left #parrot
18:10 cotto_work pmichaud: what's a system that gets lvalue and assignment semantics right?
18:10 pmichaud cotto_work: I don't know of one.  I just know Parrot's model isn't workable for P6 (more)
18:11 pmichaud we also know that it's not workable for languages in general, if everyone looks at the PCT output and says "how inefficient", because PCT is definitely p6-agnostic.
18:12 pmichaud one of the fundamentally broken things is the assumption that you can fetch a lexical once at the beginning of a Sub and "know" that you can rely on that register being accurate for the remainder of the sub.
18:12 pmichaud because "store_lex" completely invalidates that.
18:13 pmichaud so, Parrot either needs an instruction set whereby you can say "tie this register to this lexical slot even if it gets rebound", or we need to face the fact that we'll be doing lexical fetches every time we need to access a lexical (and we need to optimize Parrot to make that efficient)
18:14 lucian left #parrot
18:15 lucian joined #parrot
18:15 pmichaud more generally, I suspect a bit part of the problem is that there's no mechanism for referencing a slot at all
18:15 pmichaud *big
18:15 pmichaud it's like a language where you're allowed to have a pointer (a PMC register), but not a pointer-to-a-pointer
18:16 pmichaud Rakudo master "resolves" this difficulty by creating a PMC that can reference another PMC, but that's an awful heavyweight way to implement references.
18:17 pmichaud another way to think of it -- there's no way that I know of to pass a hash or array slot by reference
18:18 atrodo pmichaud> Interesting.  I hadn't thought of that
18:18 pmichaud if there were, then lexical pads and a ton of things would become easy
18:19 pmichaud this gets complicated even further by the fact that we have different opcodes depending on the type of slot you want to deal with
18:19 pmichaud if you want to change the slot of a hash, that's "set"
18:19 cotto_work pmichaud: so that primitive concept that needs to be supported is passing a hash (or any PMC) by reference?
18:20 pmichaud not the Hash, but the elements of the Hash
18:20 pmichaud I can already pass a Hash by reference, that's easy.
18:20 pmichaud but there's not a way for me to pass   hash['key'] by reference
18:20 pmichaud so if you want to change the slot of a hash, that's "set"
18:20 pmichaud but ifyou want to change the slot of a lexpad, that's  "store_lex"
18:20 whiteknight pmichaud: and what if hash['key'] is set to a different PMC altogether. Does the reference continue to point to the old value or the new value?
18:21 pmichaud if you want to change the slot of a namespace, that's one of "set_global", "set_hll_global", or "set_root_global"
18:21 pmichaud if you want to change the value of a PMC, that's "assign"
18:21 pmichaud (*sigh*)
18:22 lucian i find parrot passing of everything a bit confusing
18:22 pmichaud whiteknight: the point of a reference is that it's one level up from the thing it's referencing
18:22 whiteknight right, but is it referencing the container, or the value?
18:22 pmichaud so, if you have a reference to hash['key'], and hash['key'] is rebound, the reference should reflect that
18:22 pmichaud just like if I have
18:22 whiteknight okay, so you're talking about a container reference
18:23 whiteknight conceptually that's not so hard. A reference like that would contain the aggregate and the key. It's a simple pair, with a lot of hand-wavey passthrough logic
18:23 pmichaud that's the expensive way to do it, I think
18:24 whiteknight you think there's a cheaper way?
18:24 pmichaud easier would be to have a new register type that represents a reference-to-a-register
18:24 whiteknight but that's still only registers then. Doesn't cover hashes, lexpads, or namespaces
18:24 pmichaud or, more directly, reference-to-a-PMC-slot
18:24 pmichaud it does cover hashes/lexpads/namespaces since those contain PMC slots
18:24 whiteknight that doesn't work with GC. We need a pointer to the parent aggregate, so the GC doesn't scoop it up from under us
18:25 whiteknight if GC collects the hash, and we have a pointer into it's guts, we end up with a dangerous dangling pointer
18:25 NotFound Sometines I think that people just wants references but denying they are. A bit like java not having pointers but having null pointer exception.
18:25 whiteknight that's why it doesn't cover hashes and lexpads et al
18:25 pmichaud whiteknight: thinking
18:25 pmichaud cheaper would then be   aggregate + slot, then.
18:25 whiteknight now if we had a register type that was a (PMC*, PMC**) pair, that work work
18:26 pmichaud aggregate to prevent gc
18:26 pmichaud right
18:26 whiteknight s/work work/would work/
18:26 NotFound An iterator is a bit like that.
18:26 whiteknight okay, so that is not unreasonable or difficult to implement. The bigger issue is setting up an opset that works with the new register set
18:27 whiteknight and then deprecating old ops like the shitty namespace ops, get/set_lex, and whatever else that isn't using reference registers
18:27 pmichaud set $Q1, aggregate[key]    # gets most of the cases
18:27 pmichaud might need to be setq or something like that
18:27 lucian NotFound: i would very much prefer references to what parrot has, if i understand it correctly
18:28 whiteknight pmichaud: and an op set $P1, $Q1
18:28 whiteknight to get the actual value out of the reference
18:28 whiteknight unless we expect Q registers to be used transparently wherever a P register is used, which will require a massive retooling of the enter opset
18:28 pmichaud sure, that works.  or let opcodes .... right
18:28 whiteknight entire
18:28 NotFound lucian: I don't worry about the name, but about how the thing will work.
18:29 whiteknight but I'm still not sure that solves the problem. Because then we just replace all find_lex calls with set_p_q calls
18:29 pmichaud it's not a huge retooling -- just lots more opcode variants for all of the existing PMC ones
18:29 whiteknight but don't reduce our need to constantly fetch
18:29 NotFound I just worry about wrong names confusing ideas.
18:29 pmichaud but the fetch becomes much cheaper and more uniform
18:29 rurban_ joined #parrot
18:29 pmichaud fetch_lex is pretty expensive at the moment
18:30 pmichaud for one, it involves a hash+key lookup
18:30 pmichaud then you have to search a bunch of hashes
18:30 lucian NotFound: i meant a pervasive use of references. i don't like things being copied implicitly
18:30 rurban left #parrot
18:30 rurban_ is now known as rurban
18:30 pmichaud set_p_q  would be vastly less expensive
18:31 lucian NotFound: i may just be very confused
18:31 pmichaud also, it means that compiler (toolkits) only have to deal with one set of opcodes for rebinding, instead of the multitude we have now
18:31 whiteknight pmichaud: besides making the individual operations less expensive, is there a way to reduce the algorithmic complexity of the system?
18:32 whiteknight that is, do fewer stores and fewer lookups
18:32 pmichaud you can if your HLL lets you make simplifying assumptions that enable that to happen
18:32 pmichaud but so far we haven't run into many HLLs that do that.
18:33 whiteknight if, instead of a new Q register set, we have a ProxyReference which is that same root/valueptr pair but with vtables that all pass through directly to the target, that wouldn't be good?
18:33 pmichaud that's what Rakudo does now
18:33 whiteknight and that's no good?
18:33 pmichaud in the case of a Hash data structure, you double the number of PMCs involved
18:33 pmichaud same for an Array
18:33 pmichaud because each element ends up being a ProxyReference to the ultimate value
18:34 pmichaud so, in Rakudo, if I have an Array of 1000 elements, that actually requires (at least) 2000 PMCs
18:34 whiteknight always? You're always creating a proxy for every one?
18:34 pmichaud have to
18:34 pmichaud otherwise we can't support binding and assignment semantics
18:34 pmichaud otherwise we can't pass   @a[3]  by reference.
18:35 atrodo pmichaud> So would a Q holds a aggregate/key pair?  Or a pointer to the slot of an aggregate?
18:35 lucian pmichaud: hmm, i might have to do that for python
18:36 pmichaud atrodo: latest thinking is   aggregate/slot pair (due to GC, as whiteknight++ correctly notes)
18:36 pmichaud you don't want to search for a key each time
18:36 atrodo pmichaud> What about when a hash does a resize?  does that invalidate the slot?
18:36 whiteknight we're still talking "same basic architecture, just slightly faster implementation"
18:36 pmichaud also, shift/unshift might mean that the keys move
18:37 pmichaud whiteknight: we're talking same basic architecture *as rakudo*, perhaps.  Parrot doesn't support anything like a ProxyReference PMC (more)
18:37 pmichaud the other thing we discovered with any sort of ProxyReference is that the vtables get very nasty when you're trying to distinguish between the Proxy and the underlying Object
18:37 pmichaud i.e., can the Reference have methods that are separate from the PMC it references?
18:37 whiteknight I would say, "no"
18:38 whiteknight otherwise you lose perfect transparency
18:38 atrodo I would say yes
18:38 pmichaud the point of having the Reference is that at least some operations have to be different
18:38 pmichaud i.e., you have to be able to distinguish "change the reference" from "change the thing it references"
18:39 pmichaud you also have to be able to ask "is this a reference" in some instances, to know what sort of thing you got.
18:39 whiteknight and what about the shift/unshift case? How can we possibly square that?
18:39 whiteknight let the references change what they're pointing at without notice?
18:39 pmichaud good question.  that argues more for a proxyreference sort of approach, yes.
18:39 whiteknight or do we have to change all our array types to linked list?
18:40 benabik joined #parrot
18:41 whiteknight Or, re-do shift/unshift to make arrays more like sliding windows
18:41 atrodo whiteknight> So that question basically is how do you make sure you're refering to the same key?
18:41 whiteknight atrodo: how to make sure you're referencing the same value, if the value hasn't moved (only the aggregate has changed)
18:42 whiteknight I get the impression that there isn't going to be a "best" solution here
18:43 atrodo whiteknight> you do know what value you're pointing to, you already know what pmc it's talking about.  but the aggregate may have changed to make the key point to another slot
18:43 pmichaud right now the "best" solution is pretty close to what PCT does... if we can make it easier/faster to do aggregate fetches and stores
18:43 atrodo at least, that's the way i'm reading it
18:44 pmichaud in november 2009 we proposed the fetch/vivify opcodes as a way of cleaning up the output (and making fetch/store look more uniform), but I never got a chance to update PCT to try to use those.
18:44 * benabik backlogs.
18:44 whiteknight pmichaud: okay, so a Q register set and some ops to fetch/set to them? That's a huge change in itself
18:44 whiteknight doesn't look like it, but it is
18:45 pmichaud no, fetch/vivify doesn't involve Q registers
18:45 whiteknight I assume we want the ability to pass Q values through PCC?
18:45 pmichaud iirc, they were    $P0 = fetch aggregate, key, default
18:45 pmichaud and
18:45 whiteknight right, I'm not talking about those
18:45 whiteknight I'm just wrapping my head around Q
18:45 whiteknight and figuring out what we need to do for Q
18:45 pmichaud note that I haven't thought it through either
18:46 whiteknight okay
18:46 * benabik likes that his off-hand optimization comment has sparked a conversation on making lexpads less sucky.
18:46 pmichaud also, since Rakudo and NQP now have their own storage models altogether, it's not likely that we'd be making use of Q registers anyway, at least not for a long while
18:46 whiteknight alternative might be to break PMCs up. Pass all PMCs as PMC**
18:47 whiteknight that extra decoupling might actually help with a copying GC in the future
18:47 lucian whiteknight: i think i'd very much like that
18:47 pmichaud passing PMC as PMC** might be interesting, yes.
18:47 pmichaud that opens up some interesting opcode possibilities.
18:47 whiteknight pmichaud: well, I'd much rather spend energy doing something Rakudo will make use of
18:47 lucian not necessarily break them up, just always pass them by pointer/reference
18:47 atrodo whiteknight> Or decouple the pmc header from the pmc data?
18:48 whiteknight atrodo: they're already decoupled, in a way
18:48 whiteknight maybe we need to repartition
18:48 pmichaud whiteknight: right, I've been in the same boat for some time -- I haven't really pushed on doing much with Parrot's binding semantics because I don't know that Rakudo will end up using it anyway.
18:48 atrodo whiteknight> How so?
18:48 pmichaud so my energy has been on figuring out how to get them to work in Rakudo and NQP, and then maybe someday Parrot can borrow from that :)
18:49 whiteknight atrodo: There's a PMC header struct, and each type has its own attributes struct
18:49 benabik pmichaud: +1 for stealing back from 6model/NQP/Parrot
18:49 whiteknight atrodo: so to get the length of an array, for instance, it would be p->data->length
18:49 pmichaud benabik: alas, we've had variants of this conversation many times over the years, although I will admit this is the first time that there's been a lot of well-reasoned discussion about it :)
18:49 whiteknight the problem is that the vtable pointer is on p also, not on p->data.
18:49 benabik */Rakudo, not from outselves.
18:50 pmichaud anyway, I have to get back to another pressing task -- I'll backscroll later
18:50 whiteknight pmichaud: okay, thanks for the discussion. Maybe I'll try to write some of this up
18:51 pmichaud oh, there's one other possibility
18:51 benabik At any rate, even if Rakudo can't use them, I'd like to have the fetch lifting available as an optimization pass.  It feels like NQP might be able to use it.  I never wanted to bake such things directly into PCT.
18:52 pmichaud benabik: see my notes earlier about that not being a valid optimization
18:52 atrodo whiteknight> Is there an .c or .h I can look at?  My impression until now was that a pmc was one variable sized struct
18:54 benabik pmichaud: Shouldn't it be valid as long as you don't leave the sub?  It could become invalid after every call, I understand.  And if we have a multi-threaded system, it could become invalid, but in that case it could become invalid between the fetch and use already anyway.
18:54 pmichaud anyway, another possibility for lexicals would be if there's a way to tie registers to outer lexpad slots, similar to how .lex ties registers now.
18:54 NotFound The winxed model is to make it optional: you can avoid the fetchs, but at the cost of knowing what you are doing and never rebind the involved vars.
18:55 pmichaud benabik:  how do you know that you haven't "left the sub"?
18:55 benabik pmichaud: vtables, right
18:55 NotFound And when not, set it as 'volatile'
18:55 pmichaud you mean, haven't performed any subroutine calls or method calls?  or operations involving vtables?
18:55 pmichaud even in NQP, when I do:
18:55 benabik pmichaud: I meant calls.  vtables changing lexicals seems like a bad idea.
18:56 pmichaud $a := $a + 1
18:56 pmichaud that's doing a store_lex and changing the contents
18:56 pmichaud in other words:
18:56 pmichaud $P2 = find_lex '$a'
18:56 pmichaud ...
18:56 pmichaud $N0 = $P2
18:56 pmichaud $N1 = add $N0, 1
18:57 pmichaud $P3 = box $N1
18:57 pmichaud store_lex '$a', $P3
18:57 pmichaud #  $P2 no longer valid
18:57 pmichaud #  $P2 still points to the original value for $a
18:57 dmalcolm left #parrot
18:57 benabik pmichaud: Yes, but I would expect such an optimization pass to try to point all accesses to a lexical to the same register.  Otherwise things like that would happen.
18:58 pmichaud benabik: what about nested blocks?
18:58 pmichaud my $a := 1;
18:58 pmichaud if foo() {
18:58 pmichaud my $b;
18:58 pmichaud $a := $a + 1;
18:58 pmichaud }
18:58 benabik pmichaud: Those get compiled as separate subs, and I've already noted that lexicals become invalid across calls.
18:58 pmichaud so, it's an optimization that is rarely useful.
18:59 sorear the sensible thing to do here is to say that store_lex actually changes $P2, since the lexinfo maps strings to register numbers
18:59 pmichaud that means that $P2 has to be magical somehow
19:00 sorear what do you mean?
19:00 sorear oh, I mean .lex creates the association
19:00 sorear not fetch_lex
19:00 pmichaud that already happens
19:00 pmichaud but that doesn't help in blocks where the lexical wasn't declared
19:00 benabik pmichaud: Possibly.  But I'd like to _try_ to explore optimization passes.  Perhaps I'll write a pass and discover it's useless.  C'est la vie.
19:01 benabik pmichaud: But would help them where it was.  And since much of my variable access is limited to the sub where it's declared that would help.
19:01 moritz you can always look for subs that are inner subs of the current
19:01 sorear pmichaud: then we need a fetch_lex_fast_p_ic_ic opcode, which uses "# of outer pointers", "lexical number" arguments, and a store counterpart
19:01 sorear pmichaud: requires a small amount of imcc magic to rewrite the arguments in register allocation
19:01 moritz and don't optimize if they find_lex with that name
19:02 pmichaud moritz: what about dynamically attached inner subs, such as eval?
19:02 * moritz lols about "small amount of imcc magic"
19:02 moritz pmichaud: those hurt
19:02 pmichaud eval("$a = $a + 1")   completely hoses that optimization
19:03 NotFound I think we need less imcc magic, not more.
19:05 sorear Alternatively we could add a pragma to disable the IMCC register allocator, now that PAST::Compiler is doing most of the same job
19:05 pmichaud I think the IMCC register allocator is already just a linear allocator, although I could be wrong about that.
19:05 sorear note: currently PAST::Compiler likes to generate register numbers like $P2000, with the IMCC register allocation disabled that would have to be fixed
19:06 pmichaud I thought the register analysis stuff was disabled long ago.
19:06 pmichaud (in imcc)
19:06 NotFound Allocation not neccesarily the same as aliasing numbers.
19:06 sorear pmichaud: the issue is that IMCC's register allocation processes make it impossible for PAST::Compiler to spit out the correct low-level register numbers for fetch_lex_fast
19:07 sorear so either IMCC needs to take up the task, or the register allocation needs to be disabled
19:07 pmichaud cheaper and more reliable would simply be that fetch_lex optimizes the fetch for later passes of the same fetch in the same call frame
19:07 pmichaud instead of alway searching the outer frame.
19:07 pmichaud *always  *outer frames
19:07 NotFound Syntax != magic. Just provide clean syntax for whatever you want imcc to do.
19:08 pmichaud so then    $P2 = fetch_lex '$a'    # slow the first time, we have to determine the outer frame and register offsets
19:08 benabik We could have a find_lex opcode that returns some kind of reference than fetch_lex_fast can use.
19:08 pmichaud ....
19:08 pmichaud $P2 = fetch_lex '$a'   # fast this time -- the local call frame already knows where to find it
19:08 benabik Caching in the call would also work and possibly be smarter.
19:08 benabik *call frame
19:09 pmichaud and it can be done by changing the LexPad structure instead of the opcode set
19:09 NotFound At least for me, magic is when imcc does something without a clear reason and you must navigate compilers/imcc to know what and maybe why.
19:10 whiteknight atrodo: src/pmc.c is probably the best. Look for Parrot_pmc_new and it's ilk
19:10 whiteknight atrodo: it allocates a PMC header, looks up in the vtable for what the attributes struct size is, then allocates that separately
19:11 atrodo whiteknight> I actually found it in pobj.h
19:11 lucian NotFound: i also dislike calling any abstraction magic
19:11 whiteknight atrodo: that's cool tood
19:11 whiteknight too
19:11 pmichaud anyway, othertasks call -- bbl
19:11 NotFound For example, for me .const 'Sub' is black magic, mostly because is not a const at all.
19:12 klavs joined #parrot
19:12 soh_cah_toa joined #parrot
19:12 NotFound lucian: any sufficiently badly written abstraction is indistinguishable from magic.
19:13 klavs Hello, everyone! I'm back.
19:13 lucian NotFound: heh
19:13 lucian left #parrot
19:13 NotFound And depending on its (lack of) documentation, it can be arcane magic.
19:13 lucian joined #parrot
19:15 bluescreen left #parrot
19:16 atrodo whiteknight> so it looks like PMCs would point to this fairly thin struct.  so what's the issue with having a compacting gc?
19:16 atrodo whiteknight> couldn't we compact the data pointer if the only pointing to it is this PMC struct?
19:17 atrodo compact the address space pointed to by the data pointers
19:17 whiteknight atrodo: well, it's not just a matter of compacting the data structs. We could definitely do that. But we would also want to be compacting the PMC header as well
19:17 whiteknight and like I said, I want to squash them. We don't need two structs there, it should only be one allocation
19:18 alester joined #parrot
19:19 hudnix left #parrot
19:19 NotFound whiteknight: for auto_attrs it may be doable but what about manual_attrs?
19:20 whiteknight NotFound: how many PMCs need manual_attrs?
19:20 benabik whiteknight: If the PMC header is a fixed size and the data isn't, we can compact the data and just use a fixed size allocator for the headers.  Being reasonably smart about fixed sized allocations can really keep allocations tight.  (IIRC)
19:20 NotFound whiteknight: no idea.
19:20 whiteknight benabik: well, all those allocations are fixed size, and we used fixed-size allocators for all of them
19:20 benabik whiteknight: The data portion of a PMC is always the same size?
19:21 whiteknight benabik: the attributes struct is
19:21 NotFound Also, take into account that that may mean definitely banning morphing.
19:21 whiteknight NotFound: yes. ban in-place morphing
19:21 whiteknight it's a mess of a semantic now anyway
19:21 RobertLJ left #parrot
19:22 NotFound I don't have any problem with that, but other may do.
19:22 whiteknight very few types use VTABLE_morph, and of those, some don't use it correctly anway. Parrot_pmc_reuse is dreadfully buggy. Never has worked, might never work right
19:23 NotFound Then I suggest to start by deprecating it.
19:23 benabik File annotation is `.annotate "file", "FILENAME"`, right?
19:23 whiteknight benabik: Yes, I think so
19:25 Coke NotFound: replacing it with what?
19:25 cotto left #parrot
19:25 bluescreen joined #parrot
19:26 Coke (given that several HLLs use morph)
19:26 lucian Coke: what for?
19:26 Coke ... morphing.
19:27 Coke when you have a PMC that changes types, e.g. from a string to a numeric.
19:27 Coke (or in tcl's case, from a list to a string. or a dictionary).
19:27 sorear pmichaud: I had a new idea
19:27 benabik Annotations are only valid inside .subs?
19:27 Coke Definitely other ways to do it, but we've been using morph for... like 9 years.
19:28 pmichaud "morph" is how HLLs get around the fact that Parrot doesn't have a proper assign opcode for assigning to a container
19:28 sorear pmichaud: fetch_lex_fast_p_ic packs the outer frame index and register number into a single INTVAL (limiting to, say, 16K frame nesting, 64K registers of 4 types)
19:29 pmichaud .const 'Sub' foo = 'foo'    isn't const?
19:29 sorear pmichaud: fetch_lex_p_sc 1. does the lookup 2. if the lookup resulted in an alias to a specific register (and indexes are small enough), rewrites the in-memory code segment to use fetch_lex_fast_p_ic
19:30 NotFound pmichaud: it creates a foo variable and assign to it the 'real' const,
19:30 pmichaud NotFound: a foo register?
19:30 NotFound pmichaud: yeah
19:30 whiteknight parrot has a problem, people rely on a hackjob workaround. Now parrot has two problems
19:30 whiteknight that's not the way anything gets fixed
19:30 NotFound The doc doesn't say that, but the doc lies.
19:30 whiteknight and if morph has been around for 9 years, that proves the point
19:31 whiteknight use morph, and you're never going to get around to fixing the problem that necessitated morph in the first place, and you're never going to fix the problems morph causes
19:32 pmichaud who is the 'you' here?  ;-)
19:32 pmichaud the hll implementor?
19:32 sorear parrot was originally designed to run Perl 5, you cannot make Perl 5 work sensisbly without morph because it has morph as a user-exposed operation
19:33 sorear at best you could have all Perl 5 datums be a single PMC type
19:34 pmichaud I think most hll implementors use 'morph' because parrot doesn't provide an alternative.  at that point the choice is either "stop working" or "use the morph workaround".  Option 3  ("change parrot") isn't something hll implementors have had much success in achieving.
19:34 pmichaud s/"stop working"/"stop development"/
19:35 NotFound That was my concern. We can't make plans under the assumption that we can get rid of morph, and asuming we'll have morph forever at the same time.
19:35 NotFound At some point, we must choose.
19:35 pmichaud fwiw, neither rakudo nor nqp-rx nor nqp use 'morph' these days.  I haven't used 'morph' since alpha.
19:36 pmichaud (we do use 'copy' in rakudo/master, however, which was the suggested replacement for 'morph')
19:36 jnthn__ new-nqp and nom, afaik, don't use copy.
19:38 benabik Guh.  More PIR magic syntax.  What is "$P0 .= $P1"?
19:39 benabik concat?
19:39 Coke I'm not saying never get rid of it, just treat it like any other deprecation.
19:39 Coke and certainly, if it makes parrot better, kill partcl. (no, seriously)
19:42 Coke benabik: ye
19:42 benabik I really don't mind some of PIR's syntactic sugar, but I keep finding new bits.
19:43 Coke NotFound, pmichaud: hah. apparently morph is no longer used in partcl-old.
19:43 pmichaud Coke will probably shoot me, but I'm thinking of trying to migrate partcl-new to nqp (new)  :-)
19:43 Coke looks like someone (probably me) switched us over to copy already.
19:44 Coke pmichaud: there's a test suite. go right ahead!
19:44 pmichaud won't happen this week, though.  :)
19:44 pmichaud okay, I _really_ need to get back to my otherstuff now.  Closing irc window.
19:44 pmichaud bbl
19:44 Coke tta
19:46 NotFound Coke: I'm not completely surprised, is not the first time a feature assumed as important is found unused.
19:53 whiteknight that's the thing right there. I don't think morph is working well enough for people to be relying on it much anyway
19:53 whiteknight I mean, I know it's broken in a lot of non-trivial cases
19:54 NotFound I usually assume that nobody uses it except maybe for internal-only vars.
19:54 whiteknight partcl does still rely on some behaviors which use Parrot_pmc_reuse internally. At least, I know partcl-old does. That's a problem but not as big of one
19:54 benabik If I fix a TODO should I just push it or put it on the ticket for discussion first?
19:54 whiteknight CallContext uses morph to reset itself. It doesn't morph anything
19:55 benabik whiteknight: File annotations: https://github.com/Benabik/parrot/commit/6afb0ae
19:55 NotFound whiteknight: but that is kind of a hack, can be done by other means, isn't it?
19:56 whiteknight NotFound: yeah, of course it's a hack. We'd be better off deleting morph and adding a VTABLE_user_defined_1()
19:56 whiteknight or something like that
19:56 whiteknight which, by the way, I'm not against
19:57 whiteknight it's not pretty, but at least it isn't a blatant lie
19:57 whiteknight if we're going to lie, damnit let's not be blatant about it!
19:59 NotFound We can't lie, Pafo doesn't have a PR section yet.
20:01 whiteknight if we get passed the idea that a single PMC can change itself in-place, we can fix a lot of stuff. Having a proxy/reference PMC type around may not be the most economical alternative on large scales, but it should be good enough for most current HLL uses
20:01 whiteknight I could probably fix a hell of a lot of usages in partcl with Rosella.Proxy
20:02 whiteknight or, we could add a proxy type directly to the parrot repo for more performance win
20:02 benabik Isn't there a PMCProxy already?
20:02 whiteknight benabik: different type of thing
20:02 whiteknight it's not really a proxy
20:02 benabik Of course.
20:02 sorear PMCProxy needs to be set on fire
20:03 whiteknight PMCProxy should be renamed "BuiltinClass"
20:03 whiteknight or BuiltinType
20:03 whiteknight or, fire. Like sorear said
20:03 whiteknight hopefully 6model and/or lorito will get us there
20:04 whiteknight I suspect strongly that a 6model repr designed for built-in C types will fix the problem for us
20:04 whiteknight or, just rewriting a lot of built-in types in PIR/Winxed/NQP
20:08 NotFound Talking a bit more short-term... What is the appropiate place for winxed-on-parrot tests? t/compilers ?
20:08 benabik NotFound: I would think ext/winxed/t
20:09 whiteknight NotFound: yes, I think so
20:09 NotFound benabik: that was my first idea, but is not consistent with the current usages.
20:09 whiteknight do we have any NQP tests in the repo?
20:10 whiteknight or t/ext/winxed/
20:10 benabik There are some NQP tests in ext/nqp-rx/t
20:10 whiteknight okay, copy that for winxed
20:10 benabik Although, I think that's a subset of the tests from nqp-rx.git
20:11 NotFound I just want to test that load language works and a minimal program compiles right.
20:11 benabik I would think a new t/ext directory would be the best match for tests not from the source, now that I look at it.
20:11 benabik compilers/ appears to be a directory full of compilers in-core.
20:13 NotFound I think t/ext/ is the way to go.
20:15 whiteknight t/compilers is probably just for stuff in /compilers/
20:19 lucian whiteknight: would interning all "reference" pmcs into one be possible/useful?
20:19 lucian something like ooc's covers
20:19 whiteknight i don't know
20:19 lucian actually, just forcing them to only contain a reference should be enough
20:20 lucian they'd share the same header/vtable/w/e
20:20 lucian since proxy pmcs would be considered wasteful
20:21 whiteknight the tricky bit of all this is the GC
20:21 benabik Have to head out soon.  Should I push my file annotation patch now, or should I let it sit for a bit so people can look at it?
20:21 whiteknight we can create a million fun types of reference if we don't care about GC
20:21 whiteknight benabik: easier to ask forgiveness than permission
20:22 whiteknight shoot to kill
20:22 lucian whiteknight: i was thinking of a single reference type
20:22 lucian just a fat pointer
20:23 dalek parrot: 6afb0ae | benabik++ | compilers/pct/src/POST/Compiler.pir:
20:23 dalek parrot: [pct] Add file annotations to generated PIR
20:23 dalek parrot:
20:23 dalek parrot: This allows all users of PCT::HLLCompiler to keep knowledge of the
20:23 dalek parrot: source file in the final result.
20:23 dalek parrot:
20:23 dalek parrot: Closes TT #2132
20:23 dalek parrot: review: https://github.com/parrot/parrot/commit/6afb0ae023
20:23 benabik Woo, I closed a ticket.
20:23 dodathome left #parrot
20:23 whiteknight lucian: maybe
20:24 dalek dm0: dccffa6 | klavs++ | dm0.c:
20:24 dalek dm0: now supports labels and argumrnt formating
20:24 dalek dm0: review: https://github.com/klavs/dm0/commit/dccffa6f9f
20:24 dalek dm0: fe03456 | klavs++ | item.c:
20:24 dalek dm0: new function HasItem()
20:24 dalek dm0: review: https://github.com/klavs/dm0/commit/fe03456159
20:24 dalek dm0: d5108c8 | klavs++ | consts.inc:
20:24 dalek dm0: updated convert_x_x
20:24 dalek dm0: review: https://github.com/klavs/dm0/commit/d5108c87d4
20:25 lucian whiteknight: reading the conversation earlier, it seems i'll have a lot of overheard i hadn't thought of in puffin
20:25 dalek TT #2132 closed by benabik++: NQP-rx does not use "file" annotations
20:25 dalek TT #2132: http://trac.parrot.org/parrot/ticket/2132
20:25 whiteknight lucian: start small. Get the basics working before you start on crazy stuff like references
20:26 lucian whiteknight: well, you see, everything in python is a reference
20:26 lucian of course, i have to figure out scoping (namespaces) first
20:26 lichtkind joined #parrot
20:26 benabik left #parrot
20:26 lucian whiteknight: more precisely, there is no assignment, just binding names to objects (by referencing them)
20:27 whiteknight okay, so a big hash somewhere?
20:31 M_o_C joined #parrot
20:32 lucian well, yeah
20:32 lucian that's likely what i'll have to do
20:32 lucian a globals hash and a locals hash
20:32 bluescreen left #parrot
20:33 lucian but re-binding is tricky, i think parrot's default semantics don't match
20:34 whiteknight would a reference pmc type like what rakudo uses be helpful to you?
20:35 whiteknight we could easily add that to parrot, even if just as a dynpmc for the time being
20:35 whiteknight actually, i have to pack up and go. Talk to you later
20:35 whiteknight left #parrot
20:36 NotFound Winxed just hides the problem by not providing yet any native global vars. If you want them, you must use the get/set_..global family in your own way.
20:41 klavs left #parrot
21:01 jevin joined #parrot
21:16 lucian NotFound: hmm. set/get_..global semantics are most definately wrong for python
21:32 ambs left #parrot
21:35 NotFound lucian: it was a generic comment, not about python in particular.
21:35 lucian NotFound: i know
21:35 hercynium left #parrot
21:42 PurityControl joined #parrot
21:46 Patterner left #parrot
21:46 PurityControl is now known as Patterner
21:47 jjore left #parrot
22:00 M_o_C left #parrot
22:18 lucian left #parrot
22:26 plobsing joined #parrot
22:41 bubaflub left #parrot
22:41 whiteknight joined #parrot
22:44 alester left #parrot
22:45 fperrad left #parrot
22:48 whiteknight my mouse is completely crapped up
22:59 whiteknight left #parrot
23:06 soh_cah_toa what does a definition that looks like "const char *foo()" do? i've seen the const qualifer used in declarations and function parameters but not ever as a return value
23:06 soh_cah_toa i can't seem to find anything on the internet about it. "const functions" gives me nothing but c++ member functions
23:07 cotto_work soh_cah_toa: where do you see that?
23:08 soh_cah_toa cotto_work: in src/debug.c around line 900 in the definition of get_cmd()
23:10 jjore joined #parrot
23:11 whiteknight joined #parrot
23:11 whiteknight ubuntu fail
23:12 soh_cah_toa whiteknight: oh yay, you're back. i have a question...
23:12 soh_cah_toa whiteknight: what does a definition that looks like "const char *foo()" do? i've seen the const qualifer used in declarations and function parameters but not ever as a return value
23:13 bubaflub joined #parrot
23:13 whiteknight means the function returns a const char *
23:13 cotto_work That just means that the thing it returns shouldn't be modified.
23:14 soh_cah_toa oh. i didn't realize you could specify that behavior for returns values
23:14 soh_cah_toa i thought it was only for declarations
23:14 whiteknight technically, that is a declaration
23:14 whiteknight you're declaring a const char *, which is gotten from a function
23:15 soh_cah_toa really? that's how the compiler treats it?
23:15 whiteknight sortof
23:16 whiteknight you can put a call to that function anywhere you can put a const char *
23:16 whiteknight so you are declaring that whole thing as having that type
23:17 soh_cah_toa ahhh...right. i could put it in an expression
23:19 whiteknight I hate updating software and having some fundamental piece of hardware stop working
23:20 whiteknight I've been using this touchpad with ubuntu for years, since 8.04, maybe earlier
23:20 whiteknight and today, bam. Stops working
23:20 soh_cah_toa uh, yeah. me too
23:20 soh_cah_toa i just upgraded my laptop from fedora 13 to 14. now selinux stops my nic from working
23:21 cotto_work selinux is great if you're the nsa
23:21 whiteknight that's the only thing I don't like about linux. Hardware support is shit terrible
23:21 whiteknight and I know it's not the fault of the linux devs
23:21 soh_cah_toa i know... :(
23:21 whiteknight but still, it's hard to use a system that's this unstable. I certainly can't recommend it out to people as I wish I could
23:22 soh_cah_toa the one thing i hate about linux is poor flash support
23:22 whiteknight "Linux is free and it's awesome, but every now and again the mouse stops working, or the screen stops working, and there are no obvious ways to fix it"
23:22 whiteknight hardly a convincing sales pitch
23:23 cotto_work soh_cah_toa: s/linux/adobe/
23:23 soh_cah_toa hmmmm....
23:23 whiteknight I don't use flash, so it's not a big deal for me
23:24 soh_cah_toa cotto_work: yeah, you're right
23:24 soh_cah_toa whiteknight: that's impossible. you watch no videos?
23:24 whiteknight nopes
23:24 soh_cah_toa cotto_work: b/c adobe has is closed source
23:25 soh_cah_toa whiteknight: alrighty then
23:25 cotto_work soh_cah_toa: youtube html5 works quite nicely with chrome.  I haven't tried it with firefox.
23:25 soh_cah_toa bleh...chrome
23:25 cotto_work for videos that are converted
23:25 cotto_work +1, but it's better than flash
23:25 cotto_work at least it's wacky open source rather than closed
23:26 soh_cah_toa i know
23:27 soh_cah_toa i have to say, flash plugins are the ONLY piece of proprietary software i use. i caved in. gnash is just too much of a pain
23:29 whiteknight And I keep thinking to myself, "if this is what I get with Ubuntu, which is supposed to be one of the most usable linux distros, I shudder to think what other distros are like"
23:46 bubaflub ping plobsing
23:48 GeJ left #parrot
23:48 GeJ joined #parrot
23:55 mikehh I dunno about Flash plugins with Ubuntu, I find it works in the i396 version, but not on amd64
23:56 mikehh i386
23:56 soh_cah_toa that's the thing. sometimes yes, sometimes no
23:58 mikehh one of the reasons I use the 32 bit version is that some things work there that don't on the 64bit version
23:59 soh_cah_toa same here
23:59 mikehh at least the pae kernel allows me to access more that 4GB

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

Parrot | source cross referenced