% katie_d has left katie_d!~bojangles@c-24-18-106-126.hsd1.wa.comcast.net % katie_d has joined #parrot % uniejo has joined #parrot % iblechbot has joined #parrot % AndyA has left AndyA!~andy@82.152.157.85 % AndyA has joined #parrot r26308 | fperrad++ | pdd17pmc: : [Lua] : - fix tonumber() & tobase() in PMC LuaString diff: http://parrotvm.org/svn/parrot/revision/?rev=26308 * Tene looks for documentation on parrot io layers in an attempt to understand open() in parrotio.pmc % kj has joined #parrot % ruoso has joined #parrot % svnbotl has left svnbotl!diakopter@feather.perl6.nl % svnbotl has joined #parrot allison++ # PMC merge % Coke has left Coke!~coke@cpe-72-228-52-192.nycap.res.rr.com % rdice has joined #parrot % iblechbot has left iblechbot!~iblechbot@88.4-dial.augustakom.net % kj has left kj!~IceChat7@ip565fd420.direct-adsl.nl % kj has joined #parrot jonathan? i heard jonathan was at jnthn@jnthn.net or Jonathan Worthington or the dotnet guy or c, according to coke % kj has left kj!~IceChat7@ip565fd420.direct-adsl.nl % Coke has joined #parrot % iblechbot has joined #parrot * Coke notices that he doesn't have an email for r26308. That's going to take a whle to percolate through... % skids has left skids!~bri@c-71-233-204-100.hsd1.ma.comcast.net r26311 | fperrad++ | trunk: : [Lua] : - fix merge diff: http://parrotvm.org/svn/parrot/revision/?rev=26311 % kj has joined #parrot % jjore is now known as zz_jjore % zz_jjore is now known as jjore allison: ping pmichaud: ping % gryphon has joined #parrot % rhr has left rhr!~ryan@bas3-montreal02-1096689035.dsl.bell.ca % rhr has joined #parrot % katie_d has left katie_d!~bojangles@c-24-18-106-126.hsd1.wa.comcast.net % katie_d has joined #parrot % skids has joined #parrot % iblechbot has left iblechbot!~iblechbot@ppp-62-216-204-207.dynamic.mnet-online.de r26312 | coke++ | trunk: : [tcl] : The target we were aiming for has been released; simplify the docs. : Eliminate the trial {expand} syntax: now only spelled {*}. : {*} was broken some time back and still needs fixing. someone verify my time math, #PS (1830 UTC) is at 1430 EDT? Yes. simon@forty-five ~ % TZ=US/Eastern date Tue Mar 11 10:06:53 EDT 2008 simon@forty-five ~ % TZ=UTC date Tue Mar 11 14:06:55 UTC 2008 Coke: i'll be gone at #ps time; shall I pm you my report? kj: Go ahead and just post it into the channel. oki lathos: danke. I did not think of that obvious solution. * Coke wanders away to find more koohii % jhorwitz has joined #parrot * particle hands jhorwitz an old arm he's not using anymore * jhorwitz grabs his welding tools % po_boy has joined #parrot % po_boy has left po_boy!~amoore@65.165.109.82 r26313 | coke++ | trunk: : [tcl] : Note to self: when removing a syntax, remove all *uses* of the syntax : as well. diff: http://parrotvm.org/svn/parrot/revision/?rev=26313 I have an ARM, but still no cross-compiling Parrot. lathos: what about miniparrot? miniparrot isn't very the problem is the config system assuming the idea behind miniparrot is to get parrot with "just" a C compiler, then miniparrot becomes a good bootstrap path % peeps[work] has joined #parrot Anyone bored? Tcl is having a PAST issue that could use some tender care. =-) r26314 | coke++ | trunk: : [tcl] : Shave about 0.2s off each invocation of source lib/test_more.tcl when running : against a partcl test. (as opposed to one of the 8.5 tests) : (Defer loading of 'what to skip' unless we actually care.) diff: http://parrotvm.org/svn/parrot/revision/?rev=26314 % davidfetter has joined #parrot % uniejo has left uniejo!~uniejo@langebro.adapt.dk r26315 | jkeenan++ | trunk: : Applying most recent (Mar 10 2008) patch submitted by Matt Kraai in http://rt.perl.org/rt3/Ticket/Display.html?id=51300. diff: http://parrotvm.org/svn/parrot/revision/?rev=26315 % kj has left kj!~IceChat7@ip565fd420.direct-adsl.nl % peeps[work] has left peeps[work]!~peepsalot@bwext.kpimdp.com r26316 | coke++ | trunk: : [tcl] : "Resolve" RT #45659. : Avoid auto-morph using evil hack, which: : * allows us to reclaim some TODO'd tests... % rdice has left rdice!~richarddi@CPE001217e365c7-CM00159a01d44c.cpe.net.cable.rogers.com % cotto_work has joined #parrot % iblechbot has joined #parrot % teknomunk_ has joined #parrot % teknomunk has left teknomunk!~teknomunk@kerr-dip0.nat.okstate.edu % marmic has left marmic!~chatzilla@89-253-66-101.customers.ownit.se % cosimo has joined #parrot % cosimo_ has left cosimo_!~cosimo@pat-tdc.opera.com % marmic has joined #parrot % mj41 has left mj41!chatzilla@pc-jurosz.ro.vutbr.cz % mj41 has joined #parrot svnbotl, why do you hate america? (trimming log msgs) % teknomunk_ is now known as teknomunk % Theory has joined #parrot * spinclad makes witty distinction between america and Perl 6 svnbotl gets throttled after 5 or 6 lines -- sleeping between lines not working yet, it seems * davidfetter picks an irreverent track from the "team america: world police" soundtrack can obama win against mac cain. Is he able to change anything? re able to change: yes, same as anyone else with a venal congress? may be he could take lessig as an adviser * spinclad declines this debate :) parrotio.pmc doesn't have a set_pmc() function. I'm trying to implement some IO stuff for rakudo, and trying to go about it in the same way I see the other builtins in src/classes/*.pir working That is, subclass an existing pmc what would set_pmc do there? Or is this just some boilerplate that needs set_pmc ? * Coke looks at the one of those pir files. alas, I will probably miss #parrotsketch again this week pmichaud: no problemo. If you have a report, feel free to paste it in. purl: pastebin purl: nopaste nopaste is at http://nopaste.snit.ch/ (ask TonyC for new channels) or http://rafb.net/paste or http://paste.husk.org/ or http://poundperl.pastebin.com/ or http://paste.scsys.co.uk/ or don't bother me while I'm eating my report is simply that I worked on closing out old tickets, especially RT#48028 (converting P6Regex to Perl6Regex) "tene" at 166.70.38.237 pasted "open()" (8 lines) at http://nopaste.snit.ch/12470 % rgrjr has joined #parrot % rdice has joined #parrot % mj41 has left mj41!chatzilla@pc-jurosz.ro.vutbr.cz With 'List' being set up as a subclass of ParrotIO do the synopses discuss Perl 6 IO yet? pmichaud: I don't think so (other than to say such a built-in class exists) tene: OOC, have you done an update since the pdd17 merge? there's a draft of S16 in pugs/docs/Perl6/Spec/IO.pod ah follow the draft :-) TimToady++ I am unlikely to make the phone call tomorrow, btw Coke: no, not yet. I should. having tranfusions later today, and endoscopy sometime tomorrow, most likely TimToady: good to know, i'll make sure it gets relayed I will probably miss it also -- I forgot about the time change when scheduling this week particle: thanks (I didn't forget about the time change for parrotsketch, but did for the call) if you put the phone on mute, we can minute the endoscopy 'sokay, TimToady will be asleep mostly... one can remember it vaguely sometimes I think we should get TimToady's report anyway, and leave it to everyone to infer what should happen from the silence :-) I have too much experience with this already... yes, I'm getting far more experience with health care than I ever wanted :-| i've got plenty of experience myself, TimToady you can expect you'll be the butt of all our jokes tomorrow, though well, hopefully the stomach endoscopy will be sufficient just as soon they stop there... i know we all hope it'll be okay in the end not fair to get into a punning war with someone who's effectively at about 12,000 ft altitude... ok, i'll be at 12000 feet next week. let's talk :) that would put me up at about 24000, which would not be pretty I'll probably be at 6000 or 7000 feet next week pmichaud: where to? to is Tonga Islands TimToady: that's pretty near the death zone maybe you should try scuba therapy I don't think a scuba would fit. % barney has joined #parrot % ruoso has left ruoso!~ruoso@195.23.92.2 I don't know if it's my C that's rusty or if I just don't understand the parrot guts yet. if the guts are leaking red stuff it's probably not rust... "tene" at 166.70.38.237 pasted "broken IO for rakudo" (109 lines) at http://nopaste.snit.ch/12471 assign_pmc() there was cargo-culted from assign_pmc() in sub.pmc and from clone() in parrotio.pmc It results in a double free on termination if you actually use it. And probably some other horrible things. % purl has left purl!~purl@209.218.54.66 % purl has joined #parrot % chromatic has joined #parrot uhoh. You've summoned the sleepth chromatic. "sleepth"!? fingers, you need better autocorrection. Quick, hide the segfaults! #ps in 5 % IllvilJa has left IllvilJa!~jilves@emea-netcache1.oracle.co.uk Okay, yeah, the main problem is that I suck at C. I need to fix this. #ps time % Psyche^ has joined #parrot % katie_d has left katie_d!~bojangles@c-24-18-106-126.hsd1.mn.comcast.net % Patterner has left Patterner!~Psyche@e177236093.adsl.alicedsl.de % Psyche^ is now known as Patterner % IllvilJa has joined #parrot holy inconvenient timing, batman. % gryphon has left gryphon!~gryphon@dsl-209-221-185-54.zipcon.net I blame society. particle: just tell me what I need to do and I'll see what I can do with it. tene: ww. chromatic: it's a fair cop Coke: expand that please purl, ww? ww is wrong window tene: will do. i'll get in touch with jmcadams and we'll start the process rolling on the list or not. just seemed like were just having that convo in #ps. Coke: seemed like time to move it out of that channel. % Ron has joined #parrot fairnuff allison, do you know the time and building when you're speaking at the MS campus yet? cotto: the time is 10am, I don't know the building yet, and John Lam was on vacation last week. Will check again. second!allInFavor!Aye! *scatter* Coke: ww no, it was intentional. =-) but thank you. standing vote to adjourn! % b2gills has joined #parrot % buchetc has joined #parrot ... I used to run meetings for my fraternity in college; I still have the opening speech memorized. I want those brain cells back. (the three sharp taps of the gavel signify the three-fold purpose of this meeting...) I read two pages in Roberts Rules once. barney: I found it takes the longest to make sure News is up to date if others haven't done it piecework before the release. I'd block out ... meh, 2 hours? (less if you have a fast machine to run 'make fulltest' on.) That's good. I can check the changelogs on the weekend. On tuesday I probably can leave $WORK early. Yah; I used to do a 'svn log' since last release and try to keep it up to date on a weekly basis, but it's a PITA. nice when all that work happens in a branch and you get one summary commit to trunk. =-) allison++ do we have a good blurb on the pdd17 changes to point to? (other than the pdd itself) (do we need one) s/)/?)/ I think the news bullet point can be "implemented PDD17" - we can write up something more for the press release, though. I'm not sure people reading the press release who aren't already on this channel right now will care. I tend to agree, but I also know I undervalue marketing. we can do a quick set of bullet points to include in release messages (or just mention the top 3 features in the one bullet point) stick it in NEWS chromatic: ... damnit, I seem to be fresh out of segfaults for you. in an effort to get you more, I'm re-running the official tcl test suite. barney: fwiw, i took the whole tuesday off $work, and was glad i did. barney: it took 11H, after writing news. next time faster, i hope. URK. chromatic: no go on smoke on PA-RISC -- won't even get all the way through make. Something about casts changing alignment requirements (scads of same warning). Have yet to delve. % gryphon has joined #parrot * barney will get an early start from European timezone * chromatic wonders if there's an alignment problem in PObj, Buffer, STRING, and PMC. "barney" at 84.58.154.103 pasted "deprecated PIR syntax ?" (35 lines) at http://nopaste.snit.ch/12473 allison: in pdd17:77 and :79, C should be C? barney, the first two should be deprecated. spinclad, yes. spinclad: yes % rgrjr has left rgrjr!~user@c-98-216-94-251.hsd1.ma.comcast.net allison: src/pmc/object.pmc has a double /* /* and some commented out code. er, allison & chromatic . Line? while resolving conflicts last night, I also noted src/pmc/namespace.pmc has an extra comment open on line 551 Coke, in the freeze() entry? chromatic: yes. Saw the compiler warning, wasn't sure if the right thing to do was rip out the entire entry. hi all - sorry I missed #ps and for general not being around. Had folks visiting for the last week, and $DAYJOB is busy... jonathan: if you have a report, feel free to paste it into #ps. jonathan: and no worries. Coke, that looks like Allison's code. I only remember fixing the PBC tests after she kept changing freeze/thaw. Coke: Not really, I've done nothing Parrot/Rakudo related for the last week. Saw someone reverted one of my patches, though. ;-) chromatic: line#? % buchetc has left buchetc!~christoph@pD9E327D2.dip.t-dialin.net jonathan: was that does does_pmc? src/pmc/object.pmc:605 allison: Yeah. % gbacon has joined #parrot I put it in to get smartmatch on roles working in Rakudo. I thought I'd covered all the bases and nothing was failing...alas, it seems not. jonathan, can you review and check in my patch http://rt.perl.org/rt3/Public/Bug/Display.html?id=51350 I corrected and extended your stuff about pairs coke: it's been like that as long as we've been running on the new object stuf see r22180, where we reintegrated the pdd15oo branch I am trying to do a lexical self to be able to access it in inner block but so far I fail also, looking at the code, it wouldn't work under the current implementation cognominal: Great, thanks; will take a look shortly I hope; kinda snowed under right now. :-( allison: then by all means lets rip it out. VTABLE_elements doesn't return the number of slots in the attribute data array coke: yes, delete it k. I'm on it. allison: Did the does stuff end up back in when the pdd17 branch was merged? I read it was fixed in the branch... jonathan: yes, it's there now OK, great. I wonder if anyone has information about cross compiling a WIN32 parrot on a linux distribution, I already have the MingW GCC. * Coke needs to update the binary search app to allow the ability to ignore certain versions as not counting. Will hopefully be back and looking at more stuff shortly...like after this week's $DAYJOB madness ends. % buchet has joined #parrot % jrt4 has joined #parrot pdd17: does C take one argument, an element to resolve, or does it declare all conflicting elements resolved? b2gills: I don't think anyone has done a cross compile yet. I know lathos is trying so he can run parrot on the iPhone. (a question for the list, i'll take it there) I want to make it so that parrot won't lock up when doing the wspawn test on Win9x * Coke tries to remember to only ever run coretest. Oy. the whole "Parrot for small platforms" thing from PDD01 is vapor, right? it says its not a requirement of the 1.0 release. pdd17: other modifiers apparently taking an argument: provides, hll, maps. short version: yes, vapor. long version: but we wannnnnna! yeah, it sounds like fun :) There is a google calendar for parrot. Need to share it amongst more people for editing to make it useful. chromatic's answer was better than mine :) pdd17:238: 'attribue' 239: 'throught' (conservation of 't's) But what symmetry does that conservation law come from? patch: **** Only garbage was found in the patch input. % peeps[work] has joined #parrot Tene: phase shift of 2pi*hbar across each t or better, isomorphism under shift of t (hm. conservation of time: invariance under shift in energy) % barney has left barney!~bernhard@dslb-084-058-154-103.pools.arcor-ip.net * Tene harasses someone to look at the parrotio.pmc part of http://nopaste.snit.ch/12471 r26317 | bernhard++ | trunk: : #42769: Remove unneeded type names from PIR : Avoid deprecated PIR syntax. r26318 | coke++ | trunk: : [codingstd] : Eliminate method that had a completely commented out body. : Found because the compiler warned about the /* /* */ comment. diff: http://parrotvm.org/svn/parrot/revision/?rev=26318 Tene, it looks compilable. I don't understand the base_type comparison completely. I copied it from one of the other pmcs. I end up with a corruption or double free on exit after using an IO object with that patch. I'm not surprised. One of those PMCs will free its PMC data before the other does. That's what I thought. So I need to memcpy it, but I'm still trying to figure out what exactly I'm copying, and so what size to copy. The naive approach is to clone the other PMC, assign the pointers, and then unset any custom destroy flag on the PMC. On the clone, I mean. The GC will reclaim it during the next sweep, but it won't free its PMC data. It's fine for multiple PMCs to share pointers, as long as only one ever tries to free it. (Of course, if we only ever allocated memory from GCable pools, we wouldn't have this problem. We'd have at least two different problems.) % marmic has left marmic!~chatzilla@89-253-66-101.customers.ownit.se % marmic has joined #parrot r26319 | coke++ | trunk: : [codingstd] : Remove unused variables. diff: http://parrotvm.org/svn/parrot/revision/?rev=26319 I'm guessing we want to eventually remove all #if 0 blocked out code, also. % gbacon has left gbacon!~gbacon@24.214.236.114 "tene" at 166.70.38.237 pasted "broken IO for rakudo" (112 lines) at http://nopaste.snit.ch/12475 Hm, should have changed the title. shouldn't 'open' be a method? (warning: haven't read synopsis draft yet) pmichaud: there's also a method ah. In general 'open' (the sub) should call the method but there are exceptions. anyway, I've been aiming to try to make most things method-based pmichaud: and what would it be calling the method on if there's no object yet? does open() return an IO object? Do I need to call anything other than PObj_active_destroy_CLEAR to unset custom destroy flags? pmichaud: I thought so, but I'm not certain. Perhaps I should check before I spend more time on this. the IO.pod draft says that most items are methods on an IO handle, and corresponding global functions are really exported versions of the method however, it also says: my $fh = open($filename); so... I dunno maybe 'open' falls outside of 'most items' Probably does. I see 'open' as more of a constructor. (constructors/creators are often that way) I'm still getting a double free with PObj_active_destroy_CLEAR on a clone... maybe that's not clearing what I need to clear. % Andy has left Andy!~AndyL@host3130.follett.com No, that's the same operation I'm seeing elsewere in src/ Look at copy in src/ops/set.ops That's where I copied it from. Is there something freeable in PMC_struct_val too? I don't know. I should probably find out what that is, anyway. Look in the mark() vtable entry. Parrot_default_mark is saying that it uses a default mark(), yes? Does this PMC not have a separate mark? It does not. Then it's probably not that. Can you get a backtrace of the double free? "tene" at 166.70.38.237 pasted "broken IO for rakudo" (28 lines) at http://nopaste.snit.ch/12476 Ack, forgot to change the title again Maybe assign NULL to PMC_data and PMC_struct_val in the clone instead of clearing the destroy flag. % jhorwitz has left jhorwitz!~chatzilla@pool-96-245-95-72.phlapa.fios.verizon.net Looks like still a double free. Let's see if it's the same bt. Yeah, still through PIO_destroy, which is in src/io/io.c and is called by parrotio's destroy() PMC_data0() ? What's the actual pointer that causes the double free? (ParrotIO *)PMC_data0(pmc); Which is called on the pmc being destroyed. % sjansen has joined #parrot ... which is in PMC_ext I'm looking in Parrot_readbc() right now, and when it calls Packfile_new(), PackFile_set_header() sets up the packfile header, but then, when we get into Packfile_unpack() it memcpy()s the header info from the PBC into the Packfile header again, overwriting what we put in the header in Packfile_new(). Why is it setting up the header twice? It's the same as PMC_data, but it evaluates to 0. Looks like I still get a double free when I set clone->pmc_ext = NULL % rdice has left rdice!~richard_d@CPE0014bfafbbd5-CM0011e6ecf48a.cpe.net.cable.rogers.com ... oh, the problem is that ParrotIO's clone() just copies pointers. Ah. I assumed it did the right thing. jrt4, no idea. leo might know. chromatic: OK, thanks. % kj has joined #parrot % skids has left skids!bri@charon.clarku.edu % davidfetter has left davidfetter!~davidfett@start.fetter.org % davidfetter has joined #parrot % buchet has left buchet!~christoph@pD9E327D2.dip.t-dialin.net segfaults yay! % teknomunk_ has joined #parrot % teknomunk has left teknomunk!~teknomunk@kerr-dip0.nat.okstate.edu % kj has left kj!~IceChat7@ip565fd420.direct-adsl.nl % cognominal has left cognominal!~cognomina@82.67.232.89 % Ron has left Ron!rblasch@M4355P018.adsl.highway.telekom.at % Limbic_Region has joined #parrot % kid51 has joined #parrot So, it's the IO stream that's getting double-free'd. A copy of an IO object probably should share the same IO stream, though, right? Probably. Really? Probably? Are you Certain it's not certain? Are you sure it's unsure? I think you need to look harder. So ParrotIO's destroy() is flush()ing and close()ing the stream, then calling PIO_destroy() on it. % peeps[work] has left peeps[work]!~peepsalot@bwext.kpimdp.com Should we dup the stream, or will that help? What happens when you close() a dup'd fd? Well you can have multiple fds open to the same file, so I assume the kernel knows what to do. Okay, so we probably need to dup the stream on clone. but multiple fd's is a result of multiple opens, no? I'm not sure the kernel cares. fds persist across fork() too. % sjansen has left sjansen!~sjansen@hq-nat2.gurulabs.com % skids has joined #parrot Does PIO_dup in src/io/io.c sound sane? It does, if it works. I *think* it will work. IO is not my gig though. That's what 'make test' is for. :) I'm unsure if I need to do anything special to handle network sockets. Not on Unix. sockets behave the same as files what kind of clone() are you doing? are you spawning a thread, or doing a fork()? duplicating the data structure? % wknight8111 has joined #parrot Infinoid: dup'ing a stream for ParrotIO's clone() ok. (I was confused by the linux syscall of the same name, upon which fork() and pthread_create() are implemented.) in that case, you definitely want to do a dup(), but note that duplicated fds generally have weird behavior dup() and dup2() on linux result in 2 fds that behave interchangeably... doing a seek on one affects the other and you probably should flush any pending output before doing the dup, otherwise it'll end up being written twice that weird behavior is exactly what we want. the kernel does some refcounting magic and only destroys its data structures once the last fd is closed. "tene" at 166.70.38.237 pasted "PIO_dup" (21 lines) at http://nopaste.snit.ch/12477 I can't speak for the portability of dup() I'd use PMC_data_typed() instead of PMC_data0(), and you can remove the curlies... otherwise looks fine, pending Infinoid's concern. man dup here says " SVr4, 4.3BSD, POSIX.1-2001." yeah I have no idea how to do this on win32 That's one reason I keep the Perl 5 sources around. Yay, segfault! heh. I don't understand perlio.c, either. #define PerlLIO_dup(fd) dup((fd)) #define PerlLIO_dup2(fd1, fd2) dup2((fd1), (fd2)) ah. win32 uses stdio, not file descriptors, so they specialcase their dup routine to call win32_dup(win32_fileno(file)) Hmm... there's a problem with the io layer. Hey, we're down to one. Nice. "tene" at 166.70.38.237 pasted "problems with PIO_dup" (86 lines) at http://nopaste.snit.ch/12478 fd=-1 Ahh. Well, that's a problem. Welcome to PDP-8 assembly language. What's the difference between dup'ing the fd and re-opening the same fd? depends a lot on where it came from if you open a file twice, changes made to one fd will supercede changes made to the other Infinoid: fdopen() the same fd, that is. oh. fdopen() is just C library stuff, it will behave the same as a dup()'d fd I'm doing something wrong with the ParrotIOLayer. hrm except that fclose() on both FILE*'s will try to close() the same underlying fd twice when you destroy one file handle, the other one becomes inoperative did you figure out why dup() returned -1? was the input valid? can you check errno? The problem I'm working on right now is that I can't get a valid ParrotIOLayer. Both ->stack of the pmc it's called with and interp->piodata->default_stack throw segfaults when fdopen_down tries to access ->api on them. they're 0x20 and 0x1b respectively, which don't look like valid pointers. ok. in PIO_dup, layer is a copy of io->stack io is the pmc data pointer, casted to ParrotIO if io->stack is 0x20, are you sure that was really a ParrotIO PMC? It's called like: PMC * const dest = PIO_dup(SELF); from parrotio.pmc % gryphon has left gryphon!~gryphon@dsl-209-221-185-54.zipcon.net ok, that makes sense % GeJ has left GeJ!~geraud@edna.nealab.net % GeJ has joined #parrot do you have to pass in INTERP too, or does the pmc2c thingy handle that for you? ... I think I have to pass that myself. the odd thing is, if it was supposed to be "PMC * const dest = PIO_dup(INTERP, SELF);", I would have expected the compiler to barf Yeah, me too. missing a prototype perhaps? I don't know where I should put a prototype. i could find one mentioned for PIO_destroy anywhere. compiles fine with INTERP being passed in and seems to run fine, too. the prototype for that is in include/parrot/io.h Except for that same double free I was trying to get rid of in the first place. ;) so, invalid pointer problem solved? :) Yes. great. so, your strategy is basically to take a new fd (created with dup()), and wrap a new ParrotIO around it, right? Right. that sounds good... no chance of sharing the same allocated buffers, thus, no chance of double frees what's your PIO_dup() look like currently? "tene" at 166.70.38.237 pasted "PIO_dup" (30 lines) at http://nopaste.snit.ch/12479 if newfd is -1, I'm really curious what io->fd was, and also, what errno is Do you mean to use io->fd or newfd in PIO_fopen_down? he replaced newfd with io->fd because newfd was -1 the disturbing thing is, even after creating a new ParrotIO around the same fd, he still sees a double free. There's no code in the -1 case here. No, newfd isn't getting set to -1 anymore. Works fine with newfd, just put it back. getting a double free? Yes. Now trying to figure out where. valgrind might help % iblechbot has left iblechbot!~iblechbot@ppp-62-216-196-139.dynamic.mnet-online.de also, at some point it's probably a good idea to put some real error checking in there for the return value of dup()... you never know, big processes might run out of fds real_exception... errno... "tene" at 166.70.38.237 pasted "assign_pmc" (20 lines) at http://nopaste.snit.ch/12480 When I add that PMC_data(other) = NULL; the double-free goes away. Doesn't go away when I do it to the clone. ... oh. I was returning new_io_pmc(io), not (newio) awesome Huh. It works. of course it works tello? * Coke pats purl onna head. hurm. I'm supposed to see a 3 element list. instead, I see the number '3'. This *should* be easy to track down. scalar context? :) Scalar context and Tcl... yeah, that's head-explodey. % Ademan has left Ademan!~dan@h-67-101-40-175.snfccasy.dynamic.covad.net some tests in t/postconfigure/ always hang for me, but seem to complete successfully if I ^C them. puts [join [list {*}{a b c}] ,] # should print "a,b,c\n", instead prints "3\n". It's related to the {*} syntax. (yes, tcl has syntax now. Shhh. It'll be ok.) what does {*} do? it expands the next word into multiple words. it's as if you had typed: puts [join [list a b c]] which is much handier when the thing following {*} is not a literal, obviously. % Ademan has joined #parrot * Coke is lost in sea of trace output and gives up for the night. Tene: can you send me instances of those t/postconfigure/ tests hanging, including OS/platform details? And can you pinpoint hang locations by running prove -v? I wrote the tests, but have never experienced this hanging or heard reports of that. Also: Are they hanging during 'perl Configure.pl --test' or during 'make test'? % Limbic_Region has left Limbic_Region!~Limbic_Re@c-68-49-236-220.hsd1.md.comcast.net % particl1 has joined #parrot % particle has left particle!~particle@c-24-19-3-148.hsd1.mn.comcast.net % chromatic has left chromatic!~chromatic@sub17-30.member.dsl-only.net % chromatic has joined #parrot % particl1 is now known as particle % rdice has joined #parrot % Ademan has left Ademan!~dan@h-67-101-40-175.snfccasy.dynamic.covad.net % peepsalot has left peepsalot!~peeps@cpe-67-9-161-48.austin.res.rr.com % rdice has left rdice!~richarddi@CPE001217e365c7-CM00159a01d44c.cpe.net.cable.rogers.com % kid51 has left kid51!~jkeen@pool-70-107-9-55.ny325.east.verizon.net % teknomunk_ has left teknomunk_!~teknomunk@kerr-dip0.nat.okstate.edu % teknomunk has joined #parrot % pjcj has left pjcj!~pjcj@84-73-177-217.dclient.hispeed.ch % b2gills has left #parrot So, if 'make test' passes just the same after my ParrotIO changes, it should be okay to commit? yep Tene: if not, someone will scream at you :-) % Ademan has joined #parrot % Theory has left Theory!~Theory@c-24-21-175-208.hsd1.or.comcast.net woo ... I'm losing it. I just tried "perl perl6.pbc" several times and was puzzled why it wasn't working. Heh. hrmm... maybe you should build perl with an embedded parrot and direct it to run .pbc files via parrot. it's definitely a sign. Well ... I /have/ wanted access to p6 regex (PGE) in perl 5 on occasion ... ;) ext/Parrot-Embed/ Are there any examples of how to use specific pir libs w. Parrot::Embed and how to convert pir->perl datastructures? avar: I don't know how chromatic's parrot column it going, but that sounds like a good topic at some point ;) Okay, I'm looking at include/parrot/io.h and I'm uncertain about the attribute and FUNC_MODIFIES stuff. It looks autogenerated. Is it a generated file? if it's generated, it'll be in a comment at the top Oh, clever! Okay, thanks. particle++ PerlJam: If someone parrot-y could spoonfeed me info I might bother to write re::engine::PGE :) avar: what info do you need? (how much spoon feeding do you require?) * particle looks for a silver spoon are the pmcs in languages/perl6/src/pmc used for anything? yes or, put another way, how can I make perl6.pbc use the perl6bool.pmc? see languages/perl6/Makefile PerlJam: I'm not sure, I just remember peeking at it once and being very confused:) How to make a match and access match buffers and such would be nice particle: been there, done that, but my changes don't seem to have affected anything. And how to feed it a new grammar etc. But I really don't want to bother anyone else with it unless they're really excited about it since I'm being really lazy about it:) omg my head just exploded i imagined using re:engine:PGE to run Perl5Rules in perl 5 er, Perl5Regex I'm rather uncertain about my addition to include/parrot/io.h Is it enough to bother asking the list, or just commit and let someone complain to me about it? well, we don't like it when trunk breaks but if make test passes. what's the prob? particle: for instance, as a test, I made perl6str.pmc's get_integer routine always add 7 to the value it returns, yet I can't get perl6.pbc to ever do that. i've fallen way behind on reviewing commits, but chromatic reviews most (and all c commits afaict) PerlJam: It's probably best not to make it a re::engine avar: there is a bit of an impedence mismatch between the perl5 "interface" and the perl6 semantics. $0 vs $1 for instnace The main problem is that p5 regexes are strings and p6 regexes are objects p5 regexes are still strings? yeah, I was just about to say something about hacking a "match object" :) hrmm. a reentrant string. avar: qr// gives an object doesn't it? No they're first class objects (in 5.11) but you always end up with the quote problem i suppose that makes as much sense as "a reentrant object" yeah, but the // part quotes which will screw you up in lots of cases avar: you can't turn off the quoting and just grab what's in between and shunt it off to the re engine? no, it'll still be interpolated avar: or, better yet, morph the quoting to use perl6 rules. But generally it's just a lot of troble and it would be easier to start by doing my $rule = Grammar::Foo->new; my $m = $rule->match($str): say $m->[0]; and so on % Theory has joined #parrot could possible be shimmed in with m/(?p6).../ Yes, I'm just saying if you want a p5 interface to pge it's best to start by doing a regular XS/Parrot::Embed module rather than using re::engine stuff yep. i'm not too interested in that, though i'd rather get p5 on p6 or parrot or just xlate % Theory has left Theory!~Theory@c-24-21-175-208.hsd1.mn.comcast.net Well, if you'd get PGE working on something people actually use in production you'd have a lot more .pg stuff to play with once p6 becomes usable:) i hope that as parrot approaches 1.0 this year, it'll be used in production I hope that as rakudo approaches perl 6, it'll be used in production :) (I'm not so hopeful for "this year" as I should be though) yeah, meetoo my tuit supply is near nil lately particle: do you know why Str.pir does $P0('String', 'Str') and $P0('Perl6Str', 'Str') (where $P0 is make_proto) > er ? derrr.. or http://www.imdb.com/title/tt0108757/ that would seem to map both String and Perl6Str to the Str type in perl 6 that's exactly right but that doesn't make much sense to me since Perl6Str extends String but sometimes you are dealing with a parrot String and you want to treat it as a Str it's a bit of a mess that needs cleaning eventually okay, then how would I do the same for Bool? (All I wanted to do was something simple to whet my appetite and hone my skills a little before I tried something slightly more complex and simple is turning out to not be so) what do yo want to do with bool? I was just trying to implement increment() and decrement() (in Perl6Bool.pmc) currently it appears that the only pmc that's actually used is perl6str.pmc hrmm c:\usr\local\parrot\trunk\languages\perl6>perl6 -e "say 1 ~~ Bool::True" 1 Maybe I should just skip to my next trick which was to implement increment() and decrement() for Perl6Str the ACCEPTS method is definitely called for Bool um ... where is ACCEPTS documented? r26320 | tene++ | trunk: : Fix ParrotIO's clone() : Add PIO_dup to dup an fd : Add a set_pmc to ParrotIO : chromatic++ pmichaud++ Infinoid++ Tene++ again! :) .sub 'increment' :method $P0 = get_global 'True' .return ($P0) .end that'd be my off-the-cuff guess for increment particle: I can do it in pir, the execise here was for me to do it in the .pmc file. oh. i see. src/classes/Bool.pir is where i was looking i guess i didn't realize you were looking at src/pmc/ I'm looking at both because they apparently interact. or, they would if I could make make_proto('Perl6Bool','Bool') work :) ok, well perl6bool isn't built there's no perl6bool.c file on my system particle: it is in my copy :) as I said, perl6str.pmc appears to be the only one of the pmcs that's actually in use. ok, so you have METHOD increment() { ... } PerlJam: onload in bool.pir makes objects of type Boolean and sets them as globals I can tell you exactly what I have: METHOD increment() { SELF.set_bool(1); } and then in Bool.pir, I replaced $P0('Boolean', 'Bool') with $P0('Perl6Bool', 'Bool'); ok what happens? of course, you also modified the makefile to build perl6bool.pbc yep and my test is: parrot perl6.pbc -e 'my $x = Bool::True; $x++; $x++; say $x;' # I expect to get a 1 as output. I get 3 ok, so find out what type $x is er, how? i think er, how is that a problem ? i bet it's Integer $x.WHAT iirc oh, right. I'm not fully in perl6-think right now. Bool maybe $x.WHAT.WHAT still Bool :) Is there a way to trace the method calls? not really, no * particle is in really-tired-wife-is-away-two-beers-for-dinner-mode * davidfetter hands particle another beer PerlJam: try SELF.set_integer(1) I've convinced myself that my increment() method isn't being called at all. Force your increment method to output an error diagnostic. It's crude, but it should show you if something is happening (I added a printf(), re-make, and don't see the output. I did the same with perl6str and I do see the output (yay! a positive result) ) :-) ...nevermind then okay, that's weird. oh, no it's not. % teknomunk has left teknomunk!~teknomunk@kerr-dip0.nat.okstate.edu alert('foo'); get_string() is called from the pmc just fine. % teknomunk has joined #parrot please tell me your increment sub is before the final } yes. :-P good, because i would have been upset if you weren't getting compile errors aha! s/METHOD/VTABLE void/ * PerlJam does the happy dance ahhhh.... duh. * PerlJam doesn't understand it all yet, but it's sinking into the grey matter slowly good point, though. i find it odd that the perl 6 pmc's functions aren't decorated with METHOD or VTABLE it should be REQUIRED by pdd17 perhaps chromatic's parser is still forgiving % wknight8111 has left wknight8111!~nobody@c-71-230-33-251.hsd1.pa.comcast.net now to adding increment and decrement to perl6str :-) s/ing// er, how do I remake the Makefile? make Makefile i heard make Makefile was a shortcut i.e., it's generated from config/makefiles/root.in that's one of my favorite hacks It mildly bothers me as it's so close to make -f Makefile but, still neat :) r26321 | duff++ | trunk: : [rakudo] implement auto{increment,decrement} semantics as per S03 diff: http://parrotvm.org/svn/parrot/revision/?rev=26321 boy that was a useless message. It didn't even mention Bool * PerlJam was distracted by using "git svn" to push something upstream for the first time. Is Bool now one of the Rakudo PMCs, and built by default? yes. Good stuff. Hm, the commit mail is taking a while to come through. I can't abuse you^Hyour patch until it does. Sigh. chromatic: my next commit will venture into territory I'm even less familiar with (I'm going to flesh out initial implementations for auto{inc,dec} strings) I'm not really sure about STRING* v. char and such. (I assume that I should use INTVAL rather than int too) er, s/char/char*/ There are encoding considerations. That could be tricky. Start with STRING and only use char if lathos says you can. (I suspect that he will not.) well, I figure I'll do something very ASCII (since that's better than /* do nothing */) and then let someone else show me the right way to respect encodings, etc. also, there appears to be some prior art of ignoring the encoding in perl6str.pmc so I wouldn't be treading anywhere someone else hasn't already tread :) If only someone wrote a design document about all this. * PerlJam senses sarcasm http://svn.perl.org/viewvc/parrot/trunk/docs/pdds/draft/pdd28_character_sets.pod?view=markup lathos's url is at http://xrl.us/bhjfk I skimmed the doc; it's not entirely clear to me how to make increment/decrement respect encodings. lathos: tell me, how do I do the equivalent of isalpha() or isdigit()? Then again, I have very much not the smartest person in the room syndrome with regard to this. The problem is that the whole infrastructure just isn't there right now, so it can't be helped. Right now it's unfortunately probably best just to hack away and we'll clean it up later. that's exactly what I figured. When you commit, then file a bug that it needs robustification. will do But if you're doing stuff like isalpha (or anything really), it could be worth creating a stub Parrot_string_isalpha (or whatever) abstraction and we'll make *that* do the right thing later, rather than having to go through everyone's code looking for all the different ways they've done things.. There are some suspicious functions in src/charset/*.c Everything in src/charset is suspicious. :( heh ... I'll just use to_ascii() first ;) is_cclass does look like the right thing. perhaps someone who knows what's what could satisfy RT#48260 is there a pastebot on this channel? oh, never mind Okie dokie purl: nopaste nopaste is at http://nopaste.snit.ch/ (ask TonyC for new channels) or http://rafb.net/paste or http://paste.husk.org/ or http://poundperl.pastebin.com/ or http://paste.scsys.co.uk/ or don't bother me while I'm eating Tene: yeah, I got it. (there are so many different names to remember in all of the channels I frequent) "PerlJam" at 75.43.16.244 pasted "Perl6Str autodecrement implementation." (42 lines) at http://nopaste.snit.ch/12488 here's a first cut at autodecrement. Be kind I haven't coded in C in a while. but feedback is *most* welcome. I'm getting lost in the single- and double-character variable names. s and i I get, but.... sx and ex are just the previous values of s and e so we can take care of finding the . if there is one. (so that blah-999.jpg becomes blah-998.jpg) Do extra characters really cost that much? :) % jjore is now known as zz_jjore % zz_jjore is now known as jjore btw, is there a tool that tidies C code to whatever the standard is for parrot? (well, something that I can apply to the .pmc file) svk diff | mail -s 'chromatic|Andy please tidy my code' chromatic: well, if you don't mind the busy work, feel free to recast that paste in a more parroty manner. :-) If you fix up the variable names and throw in some newlines, I'll poke at it. It's nigh on my bedtime, so perhaps tomorrow. good night all.