Camelia, the Perl 6 bug

IRC log for #parrot, 2011-06-20

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 soh_cah_toa the only parrot-related headers it includes is parrot/api.h and parrot/longopt.h both of which are listed as dependencies
00:01 mikehh probably one of the major ones like parrot.h
00:01 mikehh or extend.h or embed.h or something like that
00:01 soh_cah_toa it's a frontend program though. if it uses the api, isn't it not supposed to include anything but parrot/api.h?
00:04 whiteknight soh_cah_toa: right. Just api.h
00:04 whiteknight unless you are trying to use funcions from elsewhere
00:04 soh_cah_toa hmm...b/c if i do include parrot/parrot.h, it passes
00:08 whiteknight weird
00:09 dukeleto mikehh: i am seeing t/pmc/threads.t randomly fail: https://gist.github.com/1034700
00:09 soh_cah_toa yeah, there isn't a single non-Parrot_api_* call anywhere. could it be b/c it defines PFOPT_UTILS? whatever that does
00:10 mikehh dukeleto: it tends to fail on me about once a week or so,but if I re-run the test it nearly always passes
00:13 mikehh dukeleto: I have seen that one before I think, I usually fail with a Segmentation fault though
00:15 mikehh dukeleto: but there does not seem to be any consistancy about it, and it tends to fail in different test areas
00:15 dukeleto mikehh: it it GC-related. It seems to usually fail during large test suite runs, but passes when run with prove individually
00:17 mikehh dukeleto: yeah, probably, it has most often failed for me when running make fulltest, but usually not in the same test, testb, testf or testr
00:18 mikehh and I don't think I have had it fail more thatn once
00:22 mikehh I wonder if it could be a write barrier or something like that
00:24 daniel-s left #parrot
00:36 dukeleto https://github.com/nlemke/nyan/raw/master/2.jpg
01:17 dalek parrot: 7684807 | soh_cah_toa++ | / (5 files):
01:17 dalek parrot: Fix for TT #2134
01:17 dalek parrot: review: https://github.com/parrot/parrot/commit/7684807f56
01:30 dalek parrot: 9411d47 | soh_cah_toa++ | frontend/pbc_disassemble/main.c:
01:30 dalek parrot: Removed ctype.h from pbc_disassemble because it didn't rely on anything in it
01:30 dalek parrot: review: https://github.com/parrot/parrot/commit/9411d47f36
01:31 kid51 joined #parrot
01:38 whiteknight left #parrot
01:47 ligne joined #parrot
01:59 kid51 Some testing results.
01:59 kid51 at 037628f8a
01:59 kid51 make test; make fulltest PASS on linux/i386
02:00 kid51 make test PASS on Darwin/PPC
02:00 kid51 at 9411d47f3624 (latest); make test PASS with all g++ build on linux/i386
02:05 woosley joined #parrot
02:12 dalek parrot: 4b296a2 | soh_cah_toa++ | src/ (17 files):
02:12 dalek parrot: Fixed several perldoc rendering issues and added a few "SEE ALSO" sections
02:12 dalek parrot: review: https://github.com/parrot/parrot/commit/4b296a2fcc
02:21 kid51 soh_cah_toa: Links like http://svn.perl.org/perl6/d​oc/trunk/design/syn/S12.pod do not appear to be valid any more.
02:22 soh_cah_toa kid51: i was gonna remove that but i didn't wanna make anyone angry
02:23 kid51 We'd probably be better off asking the Perl 6 people what the current definitive location for the Synopses is.
02:23 soh_cah_toa kid51: ok. so remove it or leave it?
02:24 kid51 Perhaps (i) grep our repository for similar links; (ii) post to perl6-users about a more current location
02:24 soh_cah_toa sure
02:25 soh_cah_toa what is it exactly? the synopsis for perl 6 objects?
02:26 kid51 The Synopsis, IIRC, was Larry Wall's plan for Perl 6 ... or maybe Damian Conway's summary thereof
02:27 soh_cah_toa how about this? http://perlcabal.org/syn/S12.html
02:28 kid51 That looks better.
02:28 soh_cah_toa alright
02:29 kid51 Thanks.
02:29 * kid51 must sleep
02:29 kid51 left #parrot
02:30 rurban_ joined #parrot
02:33 rurban left #parrot
02:33 rurban_ is now known as rurban
02:35 dalek parrot: cb9eaf0 | soh_cah_toa++ | src/multidispatch.c:
02:35 dalek parrot: Updated links to Perl 6 synopsis and apocalypse 12. Also deleted a few duplicate blank lines
02:35 dalek parrot: review: https://github.com/parrot/parrot/commit/cb9eaf0dea
02:44 bubaflub joined #parrot
03:02 cotto ~
03:13 soh_cah_toa cotto: hey
03:14 cotto hi soh_cah_toa
03:15 soh_cah_toa while i was working on pbc_disassemble, i had to take a look at a few of its tests and i got a few ideas
03:15 soh_cah_toa just to get atleast something working, i'm gonna test that it recognizes switches and displays the right output just like t/tools/pbc_disassemble.t
03:15 cotto sure.  That's a start.
04:01 bubaflub left #parrot
04:08 SHODAN left #parrot
04:31 soh_cah_toa left #parrot
05:47 theory left #parrot
06:20 fperrad joined #parrot
07:01 cotto msg dukeleto M0 primitive strings (i.e. not objects) need to have a discoverable length.  The options I see are C-style null-terminated strings and length-prefixed strings.  Thoughts?
07:01 aloha OK. I'll deliver the message.
07:01 * cotto sleeps
07:02 mj41 joined #parrot
07:14 zby_home left #parrot
07:17 mj41_nb joined #parrot
07:18 mj41 left #parrot
07:28 bacek_at_work left #parrot
07:55 ligne left #parrot
08:05 aloha left #parrot
08:20 cotto left #parrot
08:50 daniel-s joined #parrot
08:57 bacek_at_work joined #parrot
09:00 aloha joined #parrot
09:20 perlite joined #parrot
09:39 JimmyZ joined #parrot
10:07 woosley left #parrot
10:30 rurban_ joined #parrot
10:35 rurban left #parrot
10:35 rurban_ is now known as rurban
10:38 klavspr joined #parrot
11:12 JimmyZ_ joined #parrot
11:16 JimmyZ left #parrot
11:16 JimmyZ_ is now known as JimmyZ
11:22 klavs joined #parrot
11:38 klavs left #parrot
11:48 JimmyZ_ joined #parrot
11:48 dod left #parrot
11:53 JimmyZ left #parrot
11:53 JimmyZ_ is now known as JimmyZ
11:53 dod joined #parrot
12:41 * Coke yawns
12:50 mtk joined #parrot
12:54 bubaflub joined #parrot
12:54 smash joined #parrot
12:54 smash hello everyone
13:10 daniel-s hey Dr Nick
13:10 daniel-s I mean smash
13:15 klavspr left #parrot
13:53 jsut_ joined #parrot
13:53 jsut left #parrot
13:54 PacoLinux joined #parrot
13:57 lucian joined #parrot
14:16 lucian_ joined #parrot
14:16 lucian left #parrot
14:18 whiteknight joined #parrot
14:21 whiteknight good morning, #parrot
14:31 bubaflub morning whiteknight
14:33 whiteknight hello bubaflub. How are things going with you and your work?
14:34 bubaflub whiteknight: not bad at all.  didn't have as much time this weekend as i thought i would to work on it, but i'm still ahead of my schedule.
14:34 bubaflub whiteknight: still go that segfault i need to look into, but i have a feeling it'll be straightforward.
14:34 bubaflub seen plobsing
14:34 aloha plobsing was last seen in #parrot 2 days 11 hours ago joining the channel.
14:35 whiteknight bubaflub: Do you have a backtrace for this segfault?
14:35 bubaflub whiteknight: no - how would i produce one?
14:35 whiteknight do you have gdb?
14:35 bubaflub (backtrace, not segfault)
14:35 bubaflub yes
14:35 bubaflub gdb winxed while i run the test?
14:35 whiteknight run the program in gdb. When you get to the segfault, type "bt"
14:35 bubaflub whiteknight: ok, one sec.
14:35 whiteknight then, copy+paste as much of the result as you reasonably can
14:36 whiteknight (if there's like an infinite loop, and there are a few thousand lines, don't give me all of that :)
14:37 bubaflub hmm, i thought i could just do gdb "winxed t/integer/get/01-get.t"
14:37 bubaflub but it's not liking that
14:37 bubaflub do i need some other incantation?
14:37 Coke gdb needs an executable.
14:38 bubaflub Coke: i thought that was the winxed part
14:38 Coke gdb "thing args" treats "thing args" as as a single arg.
14:38 bubaflub Coke: ah, ok
14:38 klavs joined #parrot
14:38 bubaflub do i need something like
14:38 moritz gdb exec
14:38 bubaflub gdb winxed -- args
14:38 moritz run your arguments here
14:38 Coke I usually do what moritz said - gdb executable in the shell, then the literal "run" with args after it in gdb.
14:38 whiteknight gdb --args winxed t/integer/get/01-get.t
14:39 whiteknight then, type "start", "c", and "bt"
14:39 daniel-s left #parrot
14:41 bubaflub well, the back trace is pretty simple
14:41 bubaflub Program received signal EXC_BAD_ACCESS, Could not access memory.
14:41 bubaflub Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
14:41 bubaflub 0x00000001003ede4a in __gmpz_get_d_2exp ()
14:41 bubaflub (gdb) bt
14:41 bubaflub #0  0x00000001003ede4a in __gmpz_get_d_2exp ()
14:41 bubaflub #1  0x000000010047e364 in ffi_call_unix64 ()
14:41 bubaflub #2  0x000000010059a070 in ?? ()
14:42 whiteknight that's it? Doesn't even look like there is any parrot in there
14:42 bubaflub that's it
14:42 whiteknight and you're running your program from Parrot?
14:42 bubaflub well, from winxed
14:43 moritz maybe the parrot doesn't have any debug symbols?
14:43 bubaflub i can compile the winxed test to PIR and run it htere
14:43 bubaflub i can make realclean and re compile the parrot with other options
14:49 whiteknight bubaflub: compile parrot without --optimize
14:49 bubaflub whiteknight: ok.  is --optimize turned on by default?
15:00 whiteknight no, it shouldn't be
15:01 whiteknight if you just do a basic "perl Configure.pl" without options, you should get a deubg build
15:01 whiteknight debug
15:06 bubaflub whiteknight: still not getting any bigger backtrace
15:08 cosimo joined #parrot
15:13 contingencyplan left #parrot
15:14 whiteknight okay, weird
15:15 whiteknight okay, you need to step through the program. Type "start" to restart the program
15:15 whiteknight Then you probably want to break at something like "break Parrot_NCI_invoke"
15:16 whiteknight then "c" to run the program until that point
15:17 bubaflub whiteknight: ok
15:20 atrodo whiteknight> ping
15:20 whiteknight atrodo: pong
15:21 atrodo whiteknight> I just realized this weekend I didn't have a YAPC project
15:21 atrodo So i decided it's either going to be updating draak to use the new embedding API or work on opsc_lasm
15:21 whiteknight atrodo: both cool projects
15:21 whiteknight I'm still not nearly as familiar with draak as I should be
15:21 atrodo I'm leaning towards the former, so I'm probably going to be looking for some help the next couple days to get acquanted with the new api
15:22 whiteknight okay, definitely. I'd be glad to help
15:22 whiteknight or, at least answer questions
15:22 atrodo sweet, tahnks
15:22 atrodo whiteknight> Actually, i was hoping you'd write it for me ;)
15:22 atrodo whiteknight> actually, is there a good primer doc for the new api?
15:23 whiteknight There were some docs, I can't remember exactly where or how great condition they are in
15:23 whiteknight I can start digging those out and dusting them off
15:23 benabik G'morning, #parrot
15:24 whiteknight The code is probably the best example. frontend/parrot/main.c is where to look for most uses
15:24 theory joined #parrot
15:25 atrodo whiteknight> Thanks.  I'll probably check it out during lunch
15:25 whiteknight I'll look through some docs tonight when I get home and see what I can do about improving them.
15:25 whiteknight or, at least exposing them
15:26 whiteknight here's what we have now: https://github.com/parrot/parrot​/blob/master/docs/embed_new.pod
15:26 whiteknight I'll go over that with a fine-toothed comb and improve it for you
15:27 atrodo whiteknight++
15:29 daniel-s joined #parrot
15:29 theory left #parrot
15:32 bubaflub whiteknight: hah! i figured it out.  it was a stupid mistake on my part.  i was passing in a pointer that i didn't have a structview for
15:32 dalek dm0: e638bd1 | klavs++ | item.c:
15:32 dalek dm0: minor fix
15:32 dalek dm0: review: https://github.com/klavs/dm0/commit/e638bd1f7d
15:32 dalek dm0: c12e302 | klavs++ | dm0.c:
15:32 dalek dm0: print x with ops, if str const has >0 NL char - do not print
15:32 dalek dm0: review: https://github.com/klavs/dm0/commit/c12e302d0a
15:32 dalek dm0: d224bc2 | klavs++ | / (2 files):
15:32 dalek dm0: fixed convert_x_x
15:32 dalek dm0: review: https://github.com/klavs/dm0/commit/d224bc2548
15:32 dalek dm0: ebf1243 | klavs++ | dm0.c:
15:32 dalek dm0: update
15:32 dalek dm0: review: https://github.com/klavs/dm0/commit/ebf1243087
15:32 dalek dm0: e9b4ba6 | klavs++ | item.c:
15:32 dalek dm0: fixed HasItem()
15:32 dalek dm0: review: https://github.com/klavs/dm0/commit/e9b4ba68d9
15:37 bubaflub whiteknight: what does the [immediate] tag on a function do?  i imagine it's something like inlining, right?
15:37 PerlJam bubaflub: immediate execution (as soon as its parsed)
15:39 bubaflub PerlJam: ok.
15:44 bubaflub whiteknight: could you take a look at https://gist.github.com/1035844 and tell me what i'm doing wrong?  when define int_t in the test file everything passes; i'd like to move that definition of int_t out of the test file and into Integer.winxed but i'm getting an error.
15:51 daniel-s left #parrot
15:51 whiteknight so when you break out int_t into a separate file, you get an error?
15:53 bubaflub yep
15:54 whiteknight what kind of error? runtime? compile-time?
15:54 moritz does returning a value from an :immediate sub work?
15:54 whiteknight moritz: yes. You can return one value. It gets stored in the constants table in place of the function
15:54 moritz whiteknight: ok
15:54 bubaflub whiteknight: run-time.  "Null PMC access in find_method('alloc')"
15:55 bubaflub which i imagine means something like int_t isn't actually returning anything and then i'm calling alloc() on a big ole nothing
15:55 whiteknight bubaflub: I don't know how immediate subs work in Winxed. In PIR, I don't know if they work in separate files
15:55 whiteknight immediates create a staticly visible constant, that might not be visible between separately loaded pbcs
15:55 bubaflub whiteknight: ok.  i'll try nix-ing the immediate.  can i do a chained method call like int_t().alloc()
15:56 whiteknight bubaflub: sure, you can do that. You can get a similar effect with a coroutine
15:56 whiteknight function int_t() { var int_t = ...; while(1) yield int_t}
15:56 whiteknight that way you aren't creating a new StructView on every call to int_t, if you're worried about churn
15:56 moritz somehow that has the smell of premature optimization
15:57 moritz or are you trying to create a singleton for semantic reasons?
15:57 whiteknight moritz: I'm only suggesting that as a replacement for his current code
15:58 whiteknight Winxed doesn't have an easy way to store global data, so the best way to do it without dropping to PIR is a coroutine right now
15:58 moritz so in the current way, can't int_t be an ordinary routine?
15:58 whiteknight sure, it can be. But if you do that you create a new StructView on each invocation
15:58 whiteknight it's different semantics, I don't want to blindly mix and match if the application has specific needs
16:00 bubaflub whiteknight: interesting;  i might not use it for int_t because currently it's only needed for one function
16:01 bubaflub whiteknight: but i'll keep it in mind for gmpz_t - that way every time we create a big int we don't have to create a separate structview
16:01 whiteknight okay, then just use a regular function or something
16:01 bubaflub although currently gmpz_t is in the same file as the constructor so i can use [immediate]
16:02 bubaflub whiteknight: updated https://gist.github.com/1035844 with working code.  it seems a bit ugly but it works.
16:02 whiteknight doesn't look ugly to me at all
16:02 whiteknight brb, food
16:02 bubaflub whiteknight: good enough.  thanks.
16:05 dalek parrot-gmp: 1bda307 | bubaflub++ | src/GMP/Integer. (3 files):
16:05 dalek parrot-gmp: add int_t type function
16:05 dalek parrot-gmp:
16:05 dalek parrot-gmp: this will allow us to call functions that take int * as a parameter
16:05 dalek parrot-gmp: review: https://github.com/bubaflub/​parrot-gmp/commit/1bda30760a
16:05 theory joined #parrot
16:05 dalek parrot-gmp: 3182194 | bubaflub++ | t/integer/get/01-get.t:
16:05 dalek parrot-gmp: fix test that was segfaulting
16:05 dalek parrot-gmp:
16:05 dalek parrot-gmp: i was foolishly passing in a blank var instead of a StructView allocated
16:05 dalek parrot-gmp: for an integer
16:05 dalek parrot-gmp: review: https://github.com/bubaflub/​parrot-gmp/commit/31821941d5
16:07 mj41_nb left #parrot
16:23 JimmyZ left #parrot
16:23 JimmyZ joined #parrot
16:29 klavs left #parrot
16:44 cotto joined #parrot
16:46 preflex left #parrot
16:49 preflex joined #parrot
16:56 soh_cah_toa joined #parrot
16:59 soh_cah_toa ~~
17:09 JimmyZ left #parrot
17:11 cotto_work ~
17:12 soh_cah_toa cotto_work: hey
17:12 soh_cah_toa cotto_work: well, i have my first tests and they pass. they're not very important ones but at least it's something :)
17:13 cotto_work Having something is great.
17:13 cotto_work Are you just testing cli args or are you actually having the tests run hbdb and check its output?
17:14 soh_cah_toa the cli switches test work so that's my next task
17:14 ambs joined #parrot
17:15 soh_cah_toa i have to dig through IPC::Open3 still. i think it will work nicely though
17:17 cotto_work Yup.  Just read the documentation carefully.
17:17 Eclesia joined #parrot
17:17 Eclesia hi
17:18 cotto_work Contact over the next two weeks will be interesting.  I'm at OS Bridge starting Tuesday through Friday, then I'm taking off on Saturday to YAPC::NA, getting back Friday and heading out again for the 4th of July weekend.
17:19 cotto_work I won't be unreachable during that time, but it'll be harder than normal.
17:19 dmalcolm joined #parrot
17:19 soh_cah_toa well, i'll be at yapc so that's not an issue
17:19 cotto_work I'll probably end up leaving a lot of comments on github.
17:19 alester joined #parrot
17:20 soh_cah_toa hopefully, i can get some much needed advice during the hackathon :)
17:21 soh_cah_toa and as for the other days you'll be away, i can always ask the other devs here
17:21 soh_cah_toa so i don't think any of that will be a problem
17:21 cotto_work great
17:21 * soh_cah_toa crosses his fingers
17:22 soh_cah_toa i'm going away for two weeks at the end of july
17:22 soh_cah_toa but i'll still have internet access and will continue to work as usual
17:25 lucian joined #parrot
17:25 dukeleto ~~
17:28 lucian__ joined #parrot
17:29 lucian_ left #parrot
17:31 bubaflub left #parrot
17:31 dalek parrot/soh-cah-toa/hbdb: 918811f | soh_cah_toa++ | / (5 files):
17:31 dalek parrot/soh-cah-toa/hbdb: Removed old tests and added two new tests for checking command-line switches
17:31 dalek parrot/soh-cah-toa/hbdb: review: https://github.com/parrot/parrot/commit/918811f1cb
17:33 lucian left #parrot
17:33 cotto_work soh_cah_toa: I'd encourage you to write and nopaste a quick & dirty minimal example of using IPC::Open3 to run hbdb once you understand it well enough to do so.
17:34 soh_cah_toa sure, i'm looking through the docs now
17:36 Eclesia question : is winxed in parrot by default ?
17:36 cotto_work Eclesia: it is now
17:36 Eclesia ok
17:37 cotto_work It was added within the last couple weeks.
17:40 dukeleto cotto_work: i am not sure what kind of primitive strings m0 should have. Null-terminated seems reasonable, I guess
17:41 dukeleto Eclesia: it just got added. The 3.6.0 release (in one month) will be the first supported release containing winxed
17:41 dukeleto Eclesia: tuesday's 3.5.0 release will be the first dev release with Winxed
17:42 smash left #parrot
17:45 lucian__ left #parrot
17:46 lucian joined #parrot
17:46 cotto_work I may end up cutting the release tonight so I don't have to try doing that on the road.
17:47 cotto_work also not quite sure how #ps is going to work
17:48 atrodo dukeleto> I vote for pascal style, length specified style
17:48 cotto_work atrodo: what does that buy us?
17:49 atrodo cotto_work> nulls in strings
17:49 cotto_work Having null-terminated string will make translating between C and the M0 overlay easier.
17:49 atrodo and a small benefit, speed of knowing how long a string is
17:49 Eclesia winxed code must be compiler before being usable ?
17:51 atrodo cotto_work> that's true, but that assumes a c world and could enforce those assumptions on all HLLs
17:53 cotto_work HLL strings won't need to be M0 strings underneath, similarly to how STRINGs aren't a wrapper around C strings.
17:54 bubaflub joined #parrot
17:54 lucian_ joined #parrot
17:54 atrodo But HLLs would have to translate from HLL string to M0 string for some operations, wouldn't they?
17:54 Eclesia parrot file.winxed ? not possible ?
17:54 cotto_work You can pretend that they are by messing with ->strstart, but there's a reason we strongly discourage that.
17:55 cotto_work Eclesia: you need to use the winxed compiler.
17:55 cotto_work atrodo: sure, but that's not the majority of what the code will be doing.
17:56 Eclesia ok, so parrot do not reconize file extension an associate the correct compiler
17:56 cotto_work only for pir and pasm
17:56 cotto_work and pbc
17:57 atrodo but what if there is null in a HLL string?  Say, for a key lookup or something?
17:58 lucian left #parrot
17:59 cotto_work Hash lookups are usually done with STRING* keys if a stringy thing is needed.
17:59 atrodo So maybe a better question is what are m0 strings used for?
18:01 cotto_work almost by definition, they'll be used wherever we use C strings now
18:01 NotFound Eclesia: you can compile winxed to pir, or use the 'winxed' executable.
18:01 cotto_work anything between when a string gets passed to Parrot and when it can be converted to a STRING*
18:02 atrodo So is the S register a m0 string or STRING*?
18:03 cotto_work Currently I'm using them for M0 strings, but that's just because there aren't any object strings yet.
18:04 bubaflub dukeleto: whiteknight++ helped me fix the one test i had that was segfaulting so now all tests pass.
18:06 lucian joined #parrot
18:06 lucian_ left #parrot
18:07 whiteknight bubflub: All tests pass? Time to add more tests!
18:08 tadzik I had that attidute on last week's GSoC task
18:08 tadzik I was _annoyed_ by the fact that everything passes
18:08 atrodo tadzik++
18:09 tadzik not sure if that's really the Right Attitude
18:09 atrodo tadzik> Sure it is.  It means you're never done
18:12 cotto_work tadzik++
18:12 cotto_work It's a great attitude until you have complete test coverage.
18:14 atrodo whiteknight> ping
18:14 tadzik it's quite different when writing parsers, methinks. The coverage is never 100% :)
18:15 atrodo code coverage rarely reaches 100%, and that's usually not the right goal to aim for
18:16 cotto_work That's why I didn't say 100%. ;]
18:17 tadzik :)
18:17 atrodo cotto_work++ # subtle and correct
18:18 cotto_work obvious and correct would have been a better choice
18:18 Eclesia in winxed, how do I transform an int to a char ?
18:18 atrodo subtle wording
18:19 NotFound Eclesia: use the chr builtin
18:20 dukeleto whiteknight: ping
18:22 Eclesia NotFound: thanks
18:23 whiteknight dukeleto: pong
18:25 dukeleto whiteknight: i need your help in trying to add test coverage to Parrot_sub_new_from_c_func . I attempted to register a PIR compreg to make the TODO tests for it actually run, but failed
18:26 dukeleto whiteknight: my grant is done except I need 0.9% more test coverage and Parrot_sub_new_from_c_func is the only way to get there: http://tapir2.ro.vutbr.cz/cover/​latest-c_cover/src-extend-c.html
18:26 whiteknight is that function used anywhere?
18:27 whiteknight oh, you don't need a compiler or anything like that. This is an easy one
18:27 dukeleto whiteknight: this is my failed attempt https://github.com/parrot/parrot/commit/​a0911dbf766eeff370f28b9dbbd47854aaeb472a
18:27 lucian_ joined #parrot
18:28 whiteknight no, you don't need anything like that
18:28 dukeleto whiteknight: if you could make just one of the tests in t/src/embed.t pass, then I can take over from there.
18:28 whiteknight let me put together an example
18:28 dukeleto whiteknight: i figured I was barking up the wrong tree
18:28 dukeleto whiteknight: thanks so much!
18:29 dukeleto whiteknight: that function is only used in the tests. I don't see any use of it anywhere in Parrot core
18:29 dukeleto whiteknight: do you think anybody outside core is using it?
18:29 whiteknight I suspect we can deprecate it. I also suspect it's duplicate functionality of something else
18:30 dukeleto whiteknight: i have verified that neither Rakudo nor PL/Parrot use it
18:31 dukeleto nor does Blizkost
18:31 lucian left #parrot
18:31 whiteknight https://gist.github.com/1036232
18:32 lucian joined #parrot
18:32 whiteknight that's an extremely quick stab at it. Should point you in the right direction
18:32 dukeleto whiteknight: i also fixed a bunch of missing PARROT_CALLIN_START/END in extend.c
18:32 rurban_ joined #parrot
18:32 whiteknight Actually, Parrot_ext_call should use a signature "I->I"
18:32 whiteknight but other than that, I think that's pretty close to what your test wants to be
18:32 dukeleto whiteknight: awesome, thanks
18:33 whiteknight basically, that function wraps a C function in an NCI PMC
18:33 dukeleto whiteknight: your TODO comments in the tests lead me to believe that some kind of PIR compiler needed to be registered for stuff to work
18:33 whiteknight for some tests, at least as they were previously written
18:34 lucian__ joined #parrot
18:35 whiteknight the coverage, and the quality of tests wasn't too great back then, so I didn't pain myself to really dig in and sort it all out
18:35 rurban left #parrot
18:35 whiteknight so it's good you're doing it. Don't let my lazy comments get in your way
18:35 rurban_ is now known as rurban
18:36 lucian___ joined #parrot
18:36 lucian_ left #parrot
18:39 lucian left #parrot
18:40 lucian__ left #parrot
18:40 ambs left #parrot
18:44 lucian joined #parrot
18:46 elmex left #parrot
18:47 Eclesia can someone translate this error in some human words ? http://pastebin.com/2yZb8D0y
18:48 whiteknight Eclesia: Looks like an internal Winxed compile error of some variety
18:48 Eclesia found it. case sensitive on a variable name
18:48 NotFound Eclesia: it's a winxed bug. Let me see the source that triggers it.
18:48 mj41_nb joined #parrot
18:49 lucian___ left #parrot
18:49 Eclesia NotFound: 10sec, finishing something
18:49 NotFound Eclesia: 'k
18:51 dalek website: lucian++ | Compiler work
18:51 dalek website: http://www.parrot.org/content/compiler-work
18:52 lucian dukeleto: there :P
18:52 * lucian wishes blog posts would write themselves from residual brain waves
18:52 Tene lucian: let me know when you get that working
18:53 lucian Tene: right after M:N language interop :P
18:54 Tene lucian: I had that working two years ago :P
18:54 lucian Tene: how 'bout now? :P
18:55 Eclesia NotFound: just to be sure. there are no colored outputs in parrot ?
18:55 lucian Tene: and i think the answer is "secretary"
18:56 Eclesia NotFound: http://pastebin.com/C95db11D
18:56 Tene lucian: "secretary" doesn't pick up from residual brain waves; you still have to dictate the content verbally.
18:56 lucian Tene: not if you mutter while you work
18:56 Eclesia whiteknight: would a x3.64 class be a good contribution for rosella ?
18:57 Tene oh man, I really wouldn't want anything produced from my work-mutterings to be published with my name on it.
18:57 lucian Tene: you'd seem a little crazy, though. and the secretary would have to be a good editor too
18:58 NotFound Eclesia: there is a curses module, but I don't think it can do colors well.
18:58 NotFound Eclesia: that code doesn't trigger the bug for me.
18:59 whiteknight Eclesia: depends. What is x3.64?
18:59 Tene There would be lots of cursing, and lots of horrible misleading ideas.
18:59 Eclesia NotFound: to reproduce the bug replace the named var x364 by X364
18:59 NotFound Eclesia: in functon init?
18:59 Eclesia NotFound: when you use it : X364.FOREGROUND_REd
19:00 lucian Tene: just like my blog posts! see?
19:00 NotFound Eclesia: fine, thanks.
19:00 Tene Huh; I don't remember cursing on your blog posts; apparently I've been reading the wrong blog.
19:01 lucian Tene: hmm, it's possible i read the drafts before publishing :)
19:01 Eclesia NotFound: X3.64 are some codes handle by all terminals. works pretty well on windows/linux/mac. http://en.wikipedia.org/wiki/ANSI_escape_code
19:01 Eclesia (well not all, but a waste majority)
19:02 Eclesia (waste = huge , sorry french word)
19:02 NotFound Eclesia: yes, it seems useful.
19:02 Eclesia NotFound: is there no way to declare a string in a winxed class ?
19:03 NotFound Eclesia: no, parrot attributes are PMCs and I've not implemented yet a way to work around that,
19:04 Eclesia NotFound: can not make any constants ?
19:06 NotFound Eclesia: At class level?
19:06 Eclesia NotFound: yes
19:06 elmex joined #parrot
19:06 NotFound There was some problems with that, I don't remeber if they got fixed.
19:06 Eclesia NotFound: and also, is there a somthing similar to 'say' but without at line jump at the end
19:07 NotFound Eclesia: print
19:07 Eclesia thx
19:13 mj41_nb left #parrot
19:13 dalek winxed: r1053 | NotFound++ | trunk/winxedst1.winxed:
19:13 dalek winxed: fix bug class name being recognized as a function, Eclesia++
19:13 dalek winxed: review: http://code.google.com/p/w​inxed/source/detail?r=1053
19:13 dalek winxed: r1054 | NotFound++ | trunk/pir/winxed_compiler.pir:
19:13 dalek winxed: update installable compiler
19:13 dalek winxed: review: http://code.google.com/p/w​inxed/source/detail?r=1054
19:13 Eclesia ?
19:14 lucian_ joined #parrot
19:16 Eclesia NotFound: sorry to bother again : I'm trying to make a concatenation of different types . (String) "\u001B[" + (byte)31 + (char)'m'
19:16 Eclesia NotFound: how can I write that in winxed ?
19:17 lucian left #parrot
19:23 NotFound Eclesia: chr should do it, but looks like there is a bug in chr with const argument that I thought it was fixed.
19:24 NotFound This should work, but fails right now: "\u001B[" + chr(31) + chr(m)
19:25 Eclesia I had the same problem in pir. so looks like in parrot, not winxed.
19:26 NotFound You can use: "\u001B[\x1F" + chr(m) for a now.
19:27 NotFound Don't know about that parrot problem, but winxed is generating wrong pir.
19:34 dalek parrot: 9420e50 | jkeenan++ | frontend/pbc_disassemble/main.c:
19:34 dalek parrot: [codingstd] Fix formatting of copyright line.
19:35 dalek parrot: review: https://github.com/parrot/parrot/commit/9420e5058e
19:42 klavs joined #parrot
19:43 dodathome joined #parrot
19:44 ambs joined #parrot
19:45 Eclesia NotFound: here every code works : http://pastebin.com/Ak5rv6Di   . do you know anything I could do avoid any modification on vars ?
19:45 Eclesia do to avoid*
19:49 NotFound Eclesia: you can use methods that return the values, instead of exposing the attributes.
19:51 Eclesia hm... I think I'll wait for you to make the constants work ^^
19:52 NotFound Eclesia: if you want to hide them, you can put the values in a namespace and use them in the class.
19:55 Eclesia NotFound: that enough for today. thanks for the help :) ++
19:55 Eclesia left #parrot
20:05 klavs left #parrot
20:09 dalek winxed: r1055 | NotFound++ | trunk/winxedst1.winxed:
20:09 dalek winxed: fix generated pir of strings results from constant expressions with low-ascii
20:09 dalek winxed: values, Eclesia++
20:09 dalek winxed: review: http://code.google.com/p/w​inxed/source/detail?r=1055
20:09 dalek winxed: r1056 | NotFound++ | trunk/pir/winxed_compiler.pir:
20:09 dalek winxed: update installable compiler
20:09 dalek winxed: review: http://code.google.com/p/w​inxed/source/detail?r=1056
20:14 dalek parrot: f31e96b | NotFound++ | ext/winxed/compiler.pir:
20:14 dalek parrot: update winxed snapshot to r1054
20:14 dalek parrot: review: https://github.com/parrot/parrot/commit/f31e96b3ca
20:14 dalek parrot: acf170c | NotFound++ | ext/winxed/compiler.pir:
20:14 dalek parrot: update winxed snapshot to r1056
20:14 dalek parrot: review: https://github.com/parrot/parrot/commit/acf170c555
20:14 mj41 joined #parrot
20:19 contingencyplan joined #parrot
20:27 whiteknight left #parrot
20:28 dodathome left #parrot
20:31 lucian_ left #parrot
20:39 lucian joined #parrot
20:45 ambs left #parrot
20:50 lucian_ joined #parrot
20:54 lucian left #parrot
20:54 fperrad left #parrot
21:05 lucian joined #parrot
21:08 lucian__ joined #parrot
21:10 lucian_ left #parrot
21:12 lucian left #parrot
21:13 lucian joined #parrot
21:17 lucian__ left #parrot
21:24 RobertLJ joined #parrot
21:29 simcop2387_ joined #parrot
21:31 simcop2387 left #parrot
21:31 simcop2387_ is now known as simcop2387
21:41 PurityControl joined #parrot
21:47 Patterner left #parrot
21:47 PurityControl is now known as Patterner
21:49 lucian_ joined #parrot
21:54 lucian left #parrot
21:58 mj41 left #parrot
22:01 whiteknight joined #parrot
22:06 dalek parrot/leto/embed_grant: 706cdf2 | dukeleto++ | t/src/embed.t:
22:06 dalek parrot/leto/embed_grant: [t] Parrot_sub_new_from_c_func, whiteknight++
22:06 dalek parrot/leto/embed_grant: review: https://github.com/parrot/parrot/commit/706cdf2d48
22:07 dukeleto With that commit, I think my TPF grant is done. Running a final "make fullcover" to be sure.
22:08 bubaflub dukeleto: does that finish your grant?
22:08 whiteknight dukeleto++
22:08 bubaflub dukeleto++ indeed
22:08 whiteknight it's about time. I'm tired of hearing about our extending and embedding subsystems
22:09 cotto_work dukeleto++
22:11 lucian joined #parrot
22:13 NotFound dukeleto++
22:13 tadzik dukeleto++ # very nice! :)
22:14 sorear wasn't somebody else in the process of rewriting embedding?
22:15 lucian_ left #parrot
22:16 cotto_work sorear: you're probably thinking of whiteknight
22:30 kid51 joined #parrot
22:31 RobertLJ left #parrot
22:33 lucian left #parrot
22:41 dalek parrot/leto/embed_grant: cb9d88b | dukeleto++ | t/src/embed.t:
22:41 dalek parrot/leto/embed_grant: Pay the ANSI 89 tax yet again
22:41 dalek parrot/leto/embed_grant: review: https://github.com/parrot/parrot/commit/cb9d88b2d2
22:43 dalek parrot/leto/embed_grant: 0744112 | dukeleto++ | src/extend.c:
22:43 dalek parrot/leto/embed_grant: Attempt to make the MSWin32-x86-multi-thread ttbot happy by ANSI-89-ification
22:43 dalek parrot/leto/embed_grant: review: https://github.com/parrot/parrot/commit/0744112a78
22:51 soh_cah_toa cotto_work: you were right about IPC::Open3 ;)
22:52 soh_cah_toa it's very tricky
22:54 dukeleto cotto_work: just a heads up, i am to blame for a codingstd test failure in master currently, but i am in process of fixing it
22:56 dalek parrot/leto/embed_grant: 31aede0 | dukeleto++ | src/extend.c:
22:56 dalek parrot/leto/embed_grant: Make t/codingstd/c_macro_args.t pass again
22:56 dalek parrot/leto/embed_grant: review: https://github.com/parrot/parrot/commit/31aede0be2
22:57 nopaste "soh_cah_toa" at 192.168.1.3 pasted "IPC::Open3 Problems" (48 lines) at http://nopaste.snit.ch/53390
22:58 soh_cah_toa i can't figure out why i get "Can't use an undefined value as a symbol reference at ipc.pl line 40"
22:59 cotto_work dukeleto: good to know
23:00 dmalcolm left #parrot
23:01 dukeleto soh_cah_toa: while (my @fd_ready = $select->can_read()) {
23:01 kid51 soh_cah_toa: How can you be certain that $fd is defined before you use it?
23:01 dukeleto soh_cah_toa: you might want parens around @fd_ready to do what you want it to do
23:02 dukeleto soh_cah_toa: you are in scalar context there, iirc
23:02 dukeleto soh_cah_toa: Data::Dumper is your friend :)
23:03 soh_cah_toa parenthesis didn't help
23:03 dukeleto soh_cah_toa: use Data::Dumper and find the first variable which doesn't match what your brain thinks it should be
23:04 dukeleto soh_cah_toa: warn Dumper [ $fd ] is probably undef
23:04 bubaflub soh_cah_toa: also, to get $bad_cmd to work you should have = qr/.../
23:04 soh_cah_toa ok
23:05 dukeleto soh_cah_toa: qr is for compiled regexen
23:05 soh_cah_toa but select() blocks until one of the filehandles can be read so anytime it reaches the foreach, @fd_ready should have something in it
23:05 dukeleto soh_cah_toa: perl 5 only parses stuff inside qr// once, which can lead to big savings
23:06 * dukeleto has to go
23:06 dukeleto soh_cah_toa: good luck!
23:06 soh_cah_toa ok
23:06 bubaflub soh_cah_toa: it looks like $stderr is undefined
23:07 soh_cah_toa $stderr? how is that possible?
23:07 bubaflub soh_cah_toa: i'll have to look. i'm not terribly familiar with IPC::Open3.
23:08 kid51 soh_cah_toa: I don't understand why you need the 'while' loop at all.
23:08 soh_cah_toa oh wait, if i change the args for open3() to typeglob references, it runs but not how i want it to :(
23:08 kid51 perldoc IO::Select suggests:
23:08 kid51 my @fd_ready = $select->can_read();
23:08 soh_cah_toa yeah, you're right
23:08 kid51 foreach my $fd (@fd_ready) {
23:08 jnthn__ Anybody with IMCC opinions: .lex '$x', $P0 works, but with $[ISN]0 it doesn't.
23:09 jnthn__ The one seems to call decalre_preg or some such on the LexInfo
23:09 kid51 next unless defined $fd;d
23:09 kid51 next unless defined $fd;
23:09 * soh_cah_toa tries
23:09 kid51 if (fileno($fd) == fileno($stderr)) { print "STDERR: ", scalar <$stderr> }
23:09 kid51 etc
23:09 jnthn__ Wondering if we can extend this, to give langauges with lexpads that can handle native types a shot at working... :)
23:09 cotto_work jnthn__: only PMCs can be lexicals.  What would you expect .lex 'foo', $I0 to do?
23:10 jnthn__ cotto_work: Yes, that's what I'm trying to fix.
23:10 cotto_work ah
23:10 jnthn__ cotto_work: Parrot's own LexPad doesn't need to implement this Right Away.
23:10 cotto_work jnthn__: I can see why it's something you want though.
23:11 bubaflub soh_cah_toa: check out http://annocpan.org/~LBROCARD/perl-5.12.4​/ext/IPC-Open3/lib/IPC/Open3.pm#note_2486
23:11 jnthn__ cotto_work: Right, we have a custom lexpad type in Rakudo.
23:11 bubaflub the note mentions that std_err *does not* autovivify
23:11 soh_cah_toa bubaflub: yeah, i've read the perldoc for it. it's horrible though
23:12 bubaflub soh_cah_toa: i concur
23:12 RobertLJ joined #parrot
23:13 whiteknight jnthn__: I have lots of IMCC opinions. Most of them are not positive
23:13 cotto_work That's decidedly wacky, but the documentation does mention how to get around it.
23:13 whiteknight jnthn__: I see no technical reason why .lex cannot work with other types
23:13 whiteknight jnthn__: the bigger issue is adding in the necessary ops to store/fetch lexical values into the lexpad. .lex only populates the lexinfo
23:19 kid51 is now known as kid51_at_dinner
23:19 bubaflub soh_cah_toa: https://gist.github.com/1036843 - this works for me.  note i added 'use Symbol;' and '$stderr = gensym();' at the advice here: http://www.perlmonks.org/?node_id=151886
23:20 soh_cah_toa bubaflub: i saw that in the perldoc and was looking at the perldoc for Symbol but didn't really udnerstand what it does
23:20 soh_cah_toa ha! hubdub :)
23:20 bubaflub that's how i say it in my head
23:21 sorear people still use &Symbol::gensym?
23:21 soh_cah_toa bubaflub: why'd you take away the print $stdin "this_is_not_a_command";? that's supposed (i hope) to enter a command. it really worked w/o it?
23:22 soh_cah_toa oh i see
23:22 bubaflub soh_cah_toa: oh, sorry.  that was just for my own testing purposes.  since i don't have a copy of hubdub i just replaced it with 'echo "oh hai"' and what not
23:22 soh_cah_toa spoke too soon
23:23 soh_cah_toa i now understand all the warnings i've heard for years about ipc programming
23:23 * soh_cah_toa gives it a try
23:25 alester left #parrot
23:29 soh_cah_toa it appears that after i call open3(), nothing happens. i placed a print before and after the call and only the before printed
23:29 soh_cah_toa i'll nopaste it
23:30 bubaflub soh_cah_toa: there is a chance that your stuff could hang waiting for input... i'm not sure how to check
23:31 soh_cah_toa it does it even if i use another program besides hbdb
23:32 nopaste "soh_cah_toa" at 192.168.1.3 pasted "open3() Doesn't Return?" (59 lines) at http://nopaste.snit.ch/53391
23:32 bubaflub soh_cah_toa: does this look like a possible solution? http://www.perlmonks.org/?node_id=836165
23:32 sorear it's a shame your code has to run on non-POSIX platforms
23:35 soh_cah_toa bubaflub: hmmm...not really. though maybe i'll try placing the waitpid elsewhere
23:35 soh_cah_toa sorear: indeed
23:36 bubaflub soh_cah_toa: i'm running your script in the perl debugger, `perl -d temp.pl`, and the code executes past open3.  it just doesn't print to stdout.  is that because it's being read by something else?
23:37 soh_cah_toa i just moved waitpid() to right after open3() and it does block. just waiting for input. weird
23:38 soh_cah_toa and hbdb is running during that time b/c ps aux says so
23:38 cotto_work soh_cah_toa: use variables in open3().
23:39 daniel-s joined #parrot
23:39 cotto_work That gets me a nice message about hello.pbc not existing.
23:40 soh_cah_toa oh! progress!
23:40 soh_cah_toa w/ variables and no waitpid() i do get some hbdb output
23:40 soh_cah_toa but not all
23:41 nopaste "soh_cah_toa" at 192.168.1.3 pasted "Almost There" (65 lines) at http://nopaste.snit.ch/53392
23:42 cotto_work I like where this is going.
23:42 soh_cah_toa yes, it's close
23:42 soh_cah_toa but there's 2 more lines after HBDB blah blah that aren't outputting
23:42 bubaflub soh_cah_toa: i think it's because you are only reading stdout and stderr once
23:43 bubaflub you should maybe have some kind of while loop somewhere to keep reading from those things until you hit EOF
23:43 bubaflub the <$stdout> is only going to read one line at a time
23:43 soh_cah_toa hmm...yes
23:44 pjcj left #parrot
23:44 bubaflub soh_cah_toa: i'm not exactly where it should go, but you should be able to do something like a
23:44 pjcj joined #parrot
23:44 bubaflub while (<$stdout>) { print "STDOUT: $_"; }
23:44 soh_cah_toa yeah
23:49 nopaste "soh_cah_toa" at 192.168.1.3 pasted "More Output!" (24 lines) at http://nopaste.snit.ch/53393
23:49 soh_cah_toa oh man, so close. but now i think that ^Z null pmc issue is popping up again :(
23:50 soh_cah_toa sorear suggested that it was b/c i'm not checking for EOF or null or something after readline_interactive() but i don't know how to do that
23:52 bubaflub soh_cah_toa: that's possible
23:53 cotto_work soh_cah_toa: get the test working and you can watch it go from failing to passing.
23:53 jnthn__ cotto_work: If I were to do a patch that enabled non-P-register lexicals, would it be ok?
23:53 jnthn__ cotto_work: Looks like I may be able to make it work.
23:54 cotto_work jnthn__: I don't believe that the limitation is there for any reason other than expediency.  I want to verify with pmichaud, but I'd be surprised if there were a reason to reject such a patch.
23:55 soh_cah_toa cotto_work: ok
23:59 jnthn__ cotto_work: OK, have asked pmichaud++ to comment :)

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

Parrot | source cross referenced