Camelia, the Perl 6 bug

IRC log for #parrot, 2011-04-24

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
00:01 nopaste left #parrot
00:04 cotto ~~
00:06 nopaste joined #parrot
00:10 dalek nqp/ctmo: ca91987 | jonathan++ | src/pmc/sixmodelobject.pmc:
00:10 dalek nqp/ctmo: Make invoke Parrot vtable overridable.
00:10 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/ca9198774e
00:10 dalek nqp/ctmo: 2417dc5 | jonathan++ | src/Regex/Match.pir:
00:10 dalek nqp/ctmo: Fix a symbol installation thinko.
00:10 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/2417dc5960
00:10 dalek nqp/ctmo: f6fb264 | jonathan++ | src/ (3 files):
00:10 dalek nqp/ctmo: Regex::Method and Regex::Regex become 6model classes. This leaves us only use P6object for PAST/POST.
00:10 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/f6fb264366
00:10 dalek nqp/ctmo: 3d5e96b | jonathan++ | / (4 files):
00:10 dalek nqp/ctmo: Move PAST extensions - the only things that don't use 6model and don't live in the NQP HLL - to a separate PBC. Helps avoid running into issues as a result of them not being capable of behaving wrt separate compilation.
00:10 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/3d5e96b173
00:10 dalek nqp/ctmo: 1ede5c0 | jonathan++ | / (9 files):
00:10 dalek nqp/ctmo: Update bootstrap with PAST additions broken out.
00:10 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/1ede5c00dc
00:14 whiteknight soh_cah_toa: my uncle was the "business partner" of the "prince of Nigeria" for several years
00:15 whiteknight now he lives in my grandparents' basement and his ex-wife doesn't speak to him anymore
00:15 whiteknight so not only are there still people like that, but I see one on most holidays
00:18 soh_cah_toa i suppose it's the older generations that aren't quite technology-educated. younger generations have the benfit of "intro to tech" classes in middle school
00:21 soh_cah_toa regardless, i thought it was common sense: don't trust strangers
00:23 TiMBuS i have all this money but also, no money to pay the transfer fee, for all this money.
00:23 soh_cah_toa i know, right?
00:24 woosley joined #parrot
00:25 TiMBuS well its because i sealed it in the briefcase so very tight but i forgot the $1000 stamp i gotta put on it. and if i open it, all the $100 bills will fly everywhere
00:25 TiMBuS its hard being a prince :[
00:27 soh_cah_toa you know it's hard out here for a prince, when he tryin' to get his money for the wire transfer...ince
00:31 soh_cah_toa i'm embarassed that i know those lyrics
00:31 whiteknight from what I hear on NPR, even the nigerian royalty don't seem to have that much cash floating around
00:33 soh_cah_toa well, how much cash did the "nigerian prince" have? i mean, "have".
00:34 whiteknight I really should archive some of the spam emails we get. They are hilarious
00:34 kid51 joined #parrot
00:35 whiteknight I can't tell whether these people really have such a tenuous grasp of written english, or if they are just playing stupid to get around the spam filters
00:35 soh_cah_toa that last one was pretty ridiculous. i can't get over the "organ of hearing". oh, how they try...
00:36 rohit_nsit08 ?? hi , what is going on? strange stories?
00:36 soh_cah_toa rohit_nsit08: spam
00:36 rohit_nsit08 on irc?
00:37 soh_cah_toa rohit_nsit08: the dev mailing list
00:37 soh_cah_toa rohit_nsit08: whiteknight was showing a pretty ridiculous example
00:37 kid51 whiteknight: Your complaint about line directives: does that mean you should reopen http://trac.parrot.org/parrot/ticket/1948?
00:37 rohit_nsit08 didn't checked it since evening :-)
00:38 cotto rohit_nsit08, whiteknight and others kindly filter it out.
00:38 whiteknight kid51: https://github.com/parrot/parrot/commit/​327b110f8a58ab0e09627fb6e82e7f87fa93f934
00:38 whiteknight kid51: I couldn't make it stop, so I deleted them in pmc2c
00:38 whiteknight probably not the "real" solution, but it helped me solve my problems today
00:38 whiteknight personally, I don't see any value in having those line directives at all
00:38 whiteknight but maybe somebody else has an opinion on it
00:39 whiteknight cotto: I was working on Parrot-Instrument. I disabled instrumentgc, because it was causing weird GC problems that I couldn't diagnose
00:39 whiteknight cotto: we're still failing tests, but failing slightly fewer of them in slightly different ways
00:40 whiteknight or, as we say around here, "progress"
00:40 cotto whiteknight, ok.   That rounds to good news.
00:40 cotto whiteknight++
00:41 cotto looks like time to backscroll
00:41 cotto seems like a busy day
00:42 soh_cah_toa speaking of testing, i need some help. i submitted a patch that removed the cwd from the library search path. i think it was cotto who said that it needed a test. how do i test this?
00:42 soh_cah_toa i mean, why test for something that it's not doing?
00:42 soh_cah_toa there are an infinite number of things that code doesn't do. by that same logic, shouldn't i be testing for those?
00:43 bacek left #parrot
00:43 cotto soh_cah_toa, git can't handle infinite files
00:44 soh_cah_toa well git should have a test for that
00:44 cotto I'm on the fence about whether a test is needed for that patch.
00:44 kid51 soh_cah_toa: Does your patch move cwd to the end of the search path -- or does it remove it from the search path altogether?
00:44 soh_cah_toa to make sure there AREN'T infinite files
00:44 whiteknight it's good practice to make the test anyway
00:44 cotto kid51, remove
00:44 soh_cah_toa kid51: removes it
00:45 soh_cah_toa i'm just trying to get a better grasp on this unit testing stuff
00:45 kid51 Okay, then presumably placing a library in cwd (for testing purposes), then demonstrating that the library cannot be found, would constitute proof -- would it not?
00:46 cotto kid51, that'd be sufficient proof
00:46 soh_cah_toa right
00:46 whiteknight I'm not sure why that behavior is not desirable
00:46 soh_cah_toa but would that test be just for the patch or is it one that would be run like the others when parrot it built?
00:46 kid51 whiteknight: Discussion in TT #1589 leaned toward removing altogether
00:47 soh_cah_toa *is
00:47 kid51 soh_cah_toa: it would be run as part of 'make test': perhaps: the t/library tests
00:47 soh_cah_toa ok
00:47 kid51 That way, if anyone subsequently changed the behavior, a test failure would immediately call attention to that change
00:48 BloodyCoin joined #parrot
00:48 soh_cah_toa hmm...
00:48 soh_cah_toa alright
00:48 kid51 I don't know the ins and outs of doing this in PIR, but we do things like that in Perl 5 as part of t/configure/*.t
00:49 cotto Testing for a behavior also indicates that we think it's explicitly desirable, rather than an unintended side-effect or oversight.
00:49 kid51 Agreed
00:49 cotto There are likely many of both remaining in Parrot.
00:50 soh_cah_toa cotto: now that makes sense to me
00:50 rohit_nsit08 left #parrot
00:51 kid51 So the flow of the test would be:  Create something that parrot will think is a library.  Create a temporary directory; chdir thereto.  Copy library to that tempdir.  Run something that shows the library is not found, perhaps capturing error output.  Switch back to your top-level dir; remove tempdir.
00:52 soh_cah_toa alright, i'd use the Parrot::Configure module?
00:52 cotto When you find something surprising, the things to look for are an explanatory comment, a test and documentation, in that order.
00:52 S_Arms left #parrot
00:52 cotto soh_cah_toa, you could do all that in PIR or nqp.
00:53 kid51 soh_cah_toa: Probably not, at least not directly.  P::Configure is geared toward running C programs which probe the system for libraries.
00:53 cotto depends on what you're more comfortable with.
00:53 soh_cah_toa kid51: oh, you were just using the t/configure directory as an example
00:53 kid51 Yes.
00:53 soh_cah_toa cotto: aren't they supposed to be perl 5?
00:54 kid51 soh_cah_toa:  In principle, things which come into existence once the Parrot executable exists ought to be tested via PIR or NQP.
00:55 cotto soh_cah_toa, both are acceptable
00:55 cotto PIR or nqp is preferred
00:55 cotto er, all three are acceptable
00:55 kid51 Granted, there still are many tests in that area written in Perl 5, but we'd like those to be rewritten in Parrot's languages.
00:55 soh_cah_toa loading a library would be easiest in pir and nqp anyway
00:55 kid51 Things that exist *prior* to the creation of Parrot executable are tested with Perl 5.
00:56 soh_cah_toa i see, that's good to know
00:56 kid51 So you probably want to get familiar with PIR's Test::More for that.
00:56 soh_cah_toa yeah, i think i may use that for gsoc
00:57 kid51 No "thinking" about it, babe!  Whatever you do for GSOC has to be thoroughly tested.
00:57 kid51 See whiteknight's blog post about that!
00:57 soh_cah_toa well, i know that
00:58 soh_cah_toa "i think" is lazy for "i am". bad habit
00:59 soh_cah_toa for a while, i was deciding between perl Test::More of pir Test::More
00:59 soh_cah_toa *or
00:59 soh_cah_toa by "i think", i meant pir is what i decided
00:59 soh_cah_toa instead of "i think i'll test my code"
01:00 kid51 Look at it this way:  If you learn to write tests in either PIR or NQP, the number of people in the world who demonstrably know how to write code in those languages goes ++
01:00 S_Arms joined #parrot
01:00 * kid51 goes back to learning C++
01:01 cotto Don't do it!  It can only end in tears.
01:01 cotto or possibly dollar signs
01:01 dalek parrot-instrument: 4fbacba | Whiteknight++ | src/dynpmc/instrument.pmc:
01:01 dalek parrot-instrument: disable instrumentgc for now. it's causing problems that I do not understand
01:01 dalek parrot-instrument: review: https://github.com/Whiteknight/pa​rrot-instrument/commit/4fbacba7d3
01:01 dalek parrot-instrument: b97bdf7 | Whiteknight++ | src/dynpmc/instrument.pmc:
01:01 dalek parrot-instrument: invoke IMCC the correct way
01:01 dalek parrot-instrument: review: https://github.com/Whiteknight/pa​rrot-instrument/commit/b97bdf73c6
01:01 dalek parrot-instrument: 8f56c61 | Whiteknight++ | src/dynpmc/instrument.pmc:
01:01 dalek parrot-instrument: really really call IMCC the right way now. Parrot_pf_execute_bytecode_program takes a PMC, not a raw PackFile*. We now get into an infinite loop in at least some tests
01:01 dalek parrot-instrument: review: https://github.com/Whiteknight/pa​rrot-instrument/commit/8f56c615df
01:02 soh_cah_toa well, what made me choose pir's Test::More is b/c languages like pir, nqp, winxed, etc. are all tightly knit together in a nice little community. it'd be pretty stupid to make my project half-parrot half-something-else
01:03 soh_cah_toa they all work well together
01:04 BloodyCoin left #parrot
01:06 soh_cah_toa anyway, back to the test. here's what i'm thinking...
01:07 soh_cah_toa do something like "$P0 = loadlib './foo' " then make sure the value of $P0 is equal to the right error message
01:09 cotto you should try to load it without specifying where it is
01:10 jrtayloriv left #parrot
01:10 cotto The point of the test is to make sure that the cwd isn't searched by default
01:10 soh_cah_toa hmmm...alright. let me try again...
01:11 whiteknight okay, the infinite loop in Parrot-Instrument that I am looking at now is caused because two separate PackFile* structs are returning the same :main Sub
01:11 kid51 or: Nothwithstanding the fact that I, the tester, have placed the library in my cwd, Parrot cannot locate it or load it, which is a good thing.
01:11 whiteknight so when I try to call the :main sub of the second packfile, it calls the currently executing program
01:12 soh_cah_toa make a test library in cwd. try to load it. when it doesn't load. success through failure
01:12 kid51 Yes
01:12 soh_cah_toa what does loadlib return on error? null?
01:13 kid51 That I don't know.  When you find out, you'll know more about it than I.
01:14 soh_cah_toa yeah, i suppose i can just do a 'say $P0' after the fact
01:18 cotto soh_cah_toa, src/ops/core.ops
01:18 soh_cah_toa how would i make a test library in the cwd programmatically in pir?
01:19 soh_cah_toa or should i make it beforehand
01:19 soh_cah_toa is it okay to have that fake library in the test directory?
01:21 whiteknight msg plobsing I could use a hand with parrot-instrument if you have a minute. t/instrumentop.t, among others. Infinite loop because multiple PackFile* are returning the same :main sub for the current program. Trying to load+exec a new packfile causes the loop. Any ideas?
01:21 aloha OK. I'll deliver the message.
01:22 kid51 soh_cah_toa: As a first pass, you can have the library in the top-level directory.
01:22 kid51 But, ideally, you should figure out how to create a tempdir and conduct the test there.
01:22 whiteknight have the test try to loadlib itself
01:22 soh_cah_toa yeah i can make a tempdir
01:22 kid51 That way, once your code is in master, any failure of the test does not pollute the top-level dir.
01:22 whiteknight it's own name should be in the parameter list
01:22 soh_cah_toa whiteknight: good idea
01:23 whiteknight it is in it's own current directory
01:23 soh_cah_toa recursive logic...does not compute
01:23 soh_cah_toa alright, i think i finally got a handle on this
01:24 soh_cah_toa kid51: what i meant was creating a file to load in that tempdir. i didn't see any touch-like commands in osutils. it doesn't matter. i think i'm gonna take whiteknight's approach
01:27 soh_cah_toa i'm so excited that i'm understanding the concept now (so far). for a while there, there was something about unit testing that just wasn't computing in my head
01:28 whiteknight yeah, really understanding unit testing is a great moment
01:28 whiteknight it's not something you learn about in school, but it can be amazingly valuable
01:28 soh_cah_toa don't get me started. i'm still mad about that
01:29 soh_cah_toa if it's this important, i really should be taught. i'm embarrased that i have to learn this now
01:29 soh_cah_toa it*
01:30 soh_cah_toa blah. oh well.
01:30 soh_cah_toa anyway, i got this great book today "test driven development." it's really great
01:31 whiteknight soh_cah_toa: when I graduated, I didn't know anything about: version control, unit testing, coding methodologies, anything related to "best practices", etc
01:31 whiteknight I could write bubble sort in Java like a mamma-jamma
01:32 soh_cah_toa i know!
01:32 whiteknight I was the king of bubble sort in Java
01:32 jrtayloriv joined #parrot
01:32 soh_cah_toa like that's something to show off to an employer!?
01:32 whiteknight I was hoping I could find a job opening for "Bubble Sort Engineer", maybe at microsoft or somewhere
01:33 soh_cah_toa the furthest they we go into development methodologies is the waterfall model. "here is the waterfall. this is what you'll use someday. but not now. moving on..."
01:34 soh_cah_toa *that
01:34 soh_cah_toa an apparantly, most developers frown upon the waterfall model
01:36 whiteknight because the most you can do with a waterfall is to fall off it, and get wet
01:36 whiteknight also, "the world does not work that way"
01:36 bubaflub pretty much designed to always be behind schedule
01:37 soh_cah_toa i understand that some things can only be learned through experience but still...
01:39 soh_cah_toa and on that note, i need to start writing some code myself. less complaing, more doing. let's start that test...
01:40 whiteknight (more doing)++
01:41 kid51 whiteknight: "when I graduated, I didn't know anything about: version control, unit testing, coding methodologies, anything related to "best practices", etc" -- Andy has a talk/slideshow/rant about precisely that
01:41 kid51 petdance, that is, not doughera
01:41 kid51 Speaking of which, where has Andy D been lately?  (not on parrot-dev)
01:42 whiteknight kid51: I don't typically talk about it on my blog, because I would write far too much on the topic
01:42 kid51 I loved your GSOC submissions rant
01:42 whiteknight thanks!
01:42 kid51 It's always great to hear someone other than petdance or me rant about testing.
01:43 whiteknight I showed off Parrot's test suite at work, as an example to my coworkers about "the way it should be"
01:43 whiteknight you know how many unit tests we have for our system at work? A big fat 0
01:43 whiteknight and not writing unit tests severely cramps my style
01:43 bubaflub whiteknight: ouch
01:44 kid51 whiteknight: I am all too familiar with $jobs like that
01:44 whiteknight bubaflub: worse than that, we are expected to "test" the application frequently, but randomly and without any particular goals or methodologies in mind
01:44 whiteknight but if I write unit tests, nobody but me will run them, and they quickly stop passing
01:44 bubaflub whiteknight: bah
01:45 bubaflub whiteknight: that's rough
01:45 bubaflub whiteknight: where i'm at the main development has full tests + continuous integration; the legacy products have some tests
01:46 whiteknight bubaflub: I'm jealous
01:46 bubaflub whiteknight: but yeah, i've been at places where there are no tests and we were just expected to fix things
01:54 bacek joined #parrot
01:55 whiteknight Whiteknight's rule of programming #37: If you aren't using unit tests in at least some capacity, you *are wasting your time*
02:02 bacek left #parrot
02:17 bacek joined #parrot
02:23 ShaneC joined #parrot
02:38 kid51_ joined #parrot
02:42 kid51 left #parrot
02:44 mikehh All tests PASS (pre/post-config, make corevm/make coretest, smoke (#15383) fulltest) at 3_3_0-32-g8906192
02:44 mikehh Ubuntu 11.04 beta amd64 (g++)
02:53 whiteknight left #parrot
03:23 bubaflub left #parrot
03:32 kid51_ left #parrot
03:55 mikehh left #parrot
04:03 cogno joined #parrot
04:19 cogno left #parrot
04:25 woosley left #parrot
04:38 ShaneC left #parrot
04:57 dalek parrot: 2c6ed8c | petdance++ | lib/Parrot/Vtable.pm:
04:57 dalek parrot: Allow ARGxxx() annotations on vtable methods
04:57 dalek parrot: review: https://github.com/parrot/parrot/commit/2c6ed8ce00
05:01 hudnix left #parrot
05:17 bacek left #parrot
05:27 bacek joined #parrot
06:00 ShaneC joined #parrot
06:10 ShaneC left #parrot
06:13 ShaneC joined #parrot
06:22 theory left #parrot
06:43 JimmyZ joined #parrot
07:08 bacek left #parrot
07:11 JimmyZ left #parrot
07:18 SHODAN joined #parrot
07:21 birdwindupbird joined #parrot
07:21 woosley joined #parrot
07:24 bacek joined #parrot
07:51 bacek left #parrot
07:54 cogno joined #parrot
08:02 bacek joined #parrot
08:06 cogno left #parrot
08:13 bacek left #parrot
08:14 cogno joined #parrot
08:15 dukeleto left #parrot
08:15 dukeleto joined #parrot
08:15 Infinoid left #parrot
08:16 Infinoid joined #parrot
08:24 cogno left #parrot
08:48 alin joined #parrot
08:51 dalek nqp/ctmo: a2e9414 | moritz++ | build/Makefile.in:
08:51 dalek nqp/ctmo: [build] more blank -> tabs fixes
08:51 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/a2e9414123
08:58 alin left #parrot
09:20 mj41 joined #parrot
09:35 lucian joined #parrot
09:35 alin joined #parrot
09:35 alin left #parrot
09:49 lucian_ joined #parrot
09:53 lucian left #parrot
10:05 lucian joined #parrot
10:06 lucian_ left #parrot
10:07 lucian_ joined #parrot
10:10 nopaste left #parrot
10:11 lucian left #parrot
10:14 lucian joined #parrot
10:15 lucian_ left #parrot
10:16 nopaste joined #parrot
10:23 lucian_ joined #parrot
10:26 lucian__ joined #parrot
10:28 lucian left #parrot
10:30 lucian_ left #parrot
10:44 lucian__ left #parrot
10:49 alin joined #parrot
11:05 whiteknight joined #parrot
11:07 lucian joined #parrot
11:09 lucian_ joined #parrot
11:12 whiteknight good morning, #parrot
11:13 lucian left #parrot
11:15 tadzik good morning whiteknight
11:15 alin_ joined #parrot
11:16 alin_ left #parrot
11:17 alin left #parrot
11:37 contingencyplan left #parrot
11:38 alin joined #parrot
11:38 alin left #parrot
11:38 alin joined #parrot
11:52 mikehh joined #parrot
11:56 Psyche^ joined #parrot
11:57 Patterner left #parrot
11:57 Psyche^ is now known as Patterner
12:24 hudnix joined #parrot
12:36 alin left #parrot
12:36 alin joined #parrot
12:51 mj41 left #parrot
12:55 GeJ_ joined #parrot
12:56 GeJ left #parrot
13:01 jrt4 joined #parrot
13:04 jrtayloriv left #parrot
13:09 jrt4__ joined #parrot
13:12 bacek joined #parrot
13:12 jrt4 left #parrot
13:16 jrt4 joined #parrot
13:18 lucian joined #parrot
13:20 jrt4__ left #parrot
13:21 lucian_ left #parrot
13:24 jrt4__ joined #parrot
13:27 jrt4 left #parrot
13:34 whiteknight left #parrot
14:06 benabik ~~
14:07 lucian left #parrot
14:16 bacek left #parrot
14:16 ambs joined #parrot
14:46 alin_ joined #parrot
14:46 alin left #parrot
14:46 alin_ is now known as alin
15:14 dalek parrot: feabd77 | cotto++ | src/ops/core_ops.c:
15:14 dalek parrot: rebootstrap ops
15:14 dalek parrot: review: https://github.com/parrot/parrot/commit/feabd7766d
15:16 ambs left #parrot
15:17 ambs joined #parrot
15:23 mj41 joined #parrot
15:24 birdwindupbird left #parrot
15:27 ambs_ joined #parrot
15:27 ambs left #parrot
15:27 ambs_ is now known as ambs
15:43 alin left #parrot
15:49 jrt4__ left #parrot
15:50 jrtayloriv joined #parrot
16:07 theory joined #parrot
16:13 woosley left #parrot
16:28 mj41 left #parrot
16:40 rohit_nsit08 joined #parrot
16:40 rohit_nsit08 hello #parrot
16:41 benabik Hello rohit_nsit08
16:43 plobsing o/
16:56 petdance joined #parrot
17:41 ShaneC left #parrot
17:59 mikehh All tests PASS (pre/post-config, make corevm/make coretest, smoke (#15426) fulltest) at 3_3_0-34-gfeabd77
17:59 mikehh Ubuntu 11.04 beta i386 (gcc --optimize)
18:07 ShaneC joined #parrot
18:15 plobsing left #parrot
18:28 alin joined #parrot
18:36 petdance left #parrot
18:36 alin left #parrot
18:39 rohitnsit08 joined #parrot
18:39 alin joined #parrot
18:39 rohit_nsit08 left #parrot
18:46 alin left #parrot
18:58 alin joined #parrot
19:05 alin_ joined #parrot
19:06 alin left #parrot
19:06 alin_ is now known as alin
19:06 particle1 joined #parrot
19:08 contingencyplan joined #parrot
19:10 particle left #parrot
19:10 alin left #parrot
20:30 mj41 joined #parrot
20:48 x3nU left #parrot
20:57 rohitnsit08 left #parrot
20:59 SHODAN left #parrot
21:08 petdance joined #parrot
21:20 petdance left #parrot
21:21 petdance joined #parrot
21:27 petdance left #parrot
21:38 dalek nqp/ctmo: 633ca59 | jonathan++ | src/Regex/ (4 files):
21:38 dalek nqp/ctmo: Avoid relying on absolutely global state for storing $?CLASS in Regex.pbc, otherwise separate compilation is impossible. Also makes it work just like the generated code.
21:38 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/633ca5956e
21:38 dalek nqp/ctmo: 864b681 | jonathan++ | src/HLL/Grammar.pm:
21:38 dalek nqp/ctmo: HLL::Grammar kinda breaks encapsulation of Regex::Cursor; do it in a way that won't cause so many issues.
21:38 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/864b681103
21:38 dalek nqp/ctmo: 086ff02 | jonathan++ | src/ (2 files):
21:38 dalek nqp/ctmo: Fix a GC marking bug and add a missing write barrier.
21:38 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/086ff0284b
21:44 ShaneC left #parrot
21:44 ambs left #parrot
21:47 mj41 left #parrot
22:06 bacek joined #parrot
22:08 dalek nqp/ctmo: 7f5c477 | jonathan++ | src/ops/nqp.ops:
22:08 dalek nqp/ctmo: A few more missing write barriers.
22:08 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/7f5c4777d0
22:18 whiteknight joined #parrot
22:22 dalek nqp/ctmo: 56d057a | jonathan++ | src/ (2 files):
22:22 dalek nqp/ctmo: Another write barrier; fix a leak.
22:22 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/56d057ac16
22:22 dalek nqp/ctmo: 956db58 | jonathan++ | src/6model/knowhow_bootstrapper.c:
22:22 dalek nqp/ctmo: Couple more write-barriers.
22:22 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/956db5811a
22:36 whiteknight Good afternoon, #parrot
22:37 benabik 'lo, whiteknight
22:50 jnthn__ Supposing a PMC a holds a reference to PMC b. a and b are both unreachable, so end up in the sweep list. Is there any promise that b will be destroyed before a?
22:50 jnthn__ er, sorry, toher way around
22:50 jnthn__ a before b
22:51 jnthn__ Or more generally, is the sweep list ordered in any particular way?
22:51 whiteknight no, we make no ordering promises whatsoever
22:51 jnthn__ OK.
22:51 jnthn__ This...explains the assumption that is causing the segfault I'm currently hitting.
22:51 jnthn__ Thanks.
22:51 whiteknight we don't provided ordered destruction, and have no concrete plans to do so
22:51 jnthn__ *nod*
22:52 jnthn__ Yeah, I'm not sure I should have any reasonable expectation of it.
22:52 whiteknight it's something that's been on our wish list but....it's like seriously hard
22:52 jnthn__ Yes. Then you get a pointing to b and b pointing to a and then it's impossible to order a circle. :)
22:52 benabik ORdered destruction is very rarely provided by GCs
22:53 jnthn__ I'd not intented to assume ordered destruction really.
22:53 jnthn__ I just accidentally relied on it.
22:53 jnthn__ And it took quite a while to get bitten.
22:54 jnthn__ (Long story short, a points to b, and b has information relevant to freeing the memory associated with a.)
22:57 jnthn__ With a little brane application, I can re-work it. I'd been a bit bothered by the current representation factoring in other ways anyway.
23:02 whiteknight Parrot actually relies on ordered destruction in certain places. The scheduler has been notorious for it
23:03 whiteknight every now and again we get a bug cropping up related to that
23:04 jnthn__ This one is kinda tricky to figure out exactly how to resolve, but I'll come up with something. For now I'll just work around it and leak the odd type object.
23:05 jnthn__ Well, I know *an* answer, but it's not ideal in different ways.
23:05 bubaflub joined #parrot
23:06 whiteknight why would the type object leak? is it still being referenced from somewhere?
23:07 whiteknight if it's still referenced, you don't want to destroy it. If not, it will eventually be collected itself
23:07 jnthn__ whiteknight: See my comment starting Long story short
23:07 whiteknight okay, I think I can understand that
23:07 jnthn__ whiteknight: To expand a bit, an object references two things. One is its meta-object, which is no problem. The other is its representation.
23:07 whiteknight you can't cache all the information relevant to A in A itself?
23:08 jnthn__ The representation is concerned with allocation approach and so forth.
23:08 jnthn__ Yes, that's the easy solution.
23:08 jnthn__ However, it bulks up every single allocation.
23:08 jnthn__ s/allocation/object/
23:08 whiteknight ok
23:09 jnthn__ There's probably a middle way between the two that doesn't depend on ordering, but keeps the information mostly or entirely out of each allocation.
23:09 whiteknight so when A is destroyed, push any un-freed memory on a to-do stack somewhere and free it later
23:09 jnthn__ No, it's not quite that simple. A is the type object. It points to a representation. The representation is the object that knows how A is allocated and freed.
23:10 jnthn__ If it goes away first, then we don't actually have the information on how to free A.
23:10 whiteknight when does the representation get freed? only on global destruction?
23:10 jnthn__ If nothing is using it, it's elligible for collection.
23:10 whiteknight ok
23:11 whiteknight so it should still be alive longer than all objects of that type, except during global destruction?
23:11 jnthn__ It could happen well before global destruction.
23:11 jnthn__ Imagine making an anonymous type, then it becoming unreachable.
23:12 jnthn__ At that point, we'd like to free everything associated with it.
23:12 whiteknight ok
23:13 jnthn__ Anyway, just to be clear - nothing Parrot's doing here is wrong. It's an implementation flaw in the stuff I'm doing.
23:15 dalek nqp/ctmo: 85011da | jonathan++ | src/6model/reprs/ (6 files):
23:15 dalek nqp/ctmo: Write barriering in reprs, plus a re-ordering just in case that triggers an issue.
23:15 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/85011da684
23:15 dalek nqp/ctmo: d777f9e | jonathan++ | src/pmc/sixmodelobject.pmc:
23:15 dalek nqp/ctmo: Fix a segfault related to freeing of anonymous types. Note that we need a real fix for this issue, but it's relatively low impact for the time being.
23:15 dalek nqp/ctmo: review: https://github.com/perl6/nqp/commit/d777f9ef6b
23:15 jnthn__ On the upside, it made me scour the code for missing write barriers... :)
23:15 jnthn__ I'm not 100% certain all the ones I added are needed, but they all seemed reasonable.
23:19 whiteknight bacek assures me that extra write barriers are cheap
23:20 whiteknight jnthn__: I would really like to start seriously planning, if not doing the actual work, to get 6model integrated into parrot this summer
23:20 whiteknight that's a high priority for me
23:21 bacek ~~
23:21 bacek Good morning, humans.
23:21 whiteknight so whenever you think it a good time to start that work, let me know
23:21 whiteknight hello bacek
23:21 bacek whiteknight, aloha
23:22 bacek whiteknight, extra write barrier is just one check of pmc->flags.
23:22 bacek quite cheap :)
23:23 jnthn__ OK, then I won't worry :)
23:23 jnthn__ whiteknight: OK. I'd like to get the current enormous NQP refactor dealt with first.
23:24 jnthn__ whiteknight: I'm also working on 6model docs at the moment.
23:26 jnthn__ The hardest part might well be "how do we get PMCs to be real objects"
23:30 whiteknight jnthn__: that's already the hardest part of everything we do
23:31 whiteknight jnthn__: we have so much code, including some of the worst code in the entire project, devoted to working around PMCProxies and that mess
23:32 whiteknight if we can unify and stop being stupid, lots of stuff can be improved
23:33 whiteknight huge swaths of code in src/oo.c, lots of logic from src/pmc/namespace.pmc, probably a large portion of the two-stage global initialization, etc
23:35 jnthn__ whiteknight: Yes. I think Parrot will have to do a lot of "unlearning". :)
23:36 jnthn__ The methods/namespace association almost certainly wants breaking somehow.
23:38 bacek Did we just missed opportunity to deprecate all this stuff in 3.3?
23:44 whiteknight bacek: we miss many opportunities to deprecate things
23:45 whiteknight If I had my way, I would have deprecated "everything" after 1.0, and then we would be okay
23:46 jrtayloriv left #parrot
23:47 bacek Sounds like a good idea :)
23:48 benabik We should keep a list of "thing's we're looking at removing."  Not depreciated, but before each stable release we can look at it an figure out what we're likely to be working on next.
23:50 whiteknight I wanted to have an "opt-in" deprecation policy, where everything is always experimental except things we explictly mark as stable
23:50 whiteknight then, all the stuff that sucks and that we know sucks and is going to be removed violently won't ever be protected
23:57 dalek parrot: d83b2f4 | Whiteknight++ | src/packfile/api.c:
23:57 dalek parrot: when executing a packfile PMC, look up the :main sub directly instead of expecting it to be set in the current context
23:57 dalek parrot: review: https://github.com/parrot/parrot/commit/d83b2f4077
23:57 whiteknight okay, that fixes the bug where Parrot-Instrument gets into an infinite loop. Now it fails to execute completely
23:57 whiteknight I call that "progress"
23:58 benabik progress++

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

Parrot | source cross referenced