Camelia, the Perl 6 bug

IRC log for #parrot, 2011-08-10

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 not_gerd the msys build is mostly fixed, currently testing
00:13 not_gerd msys status: t/pmc/threads.t and anything which creates tempfiles fails as File::Temp::tempfile() returns unix-style paths
00:13 not_gerd I'm done for today, but a working parrot on msys is probably not too far off
00:17 tadzik joined #parrot
00:19 PerlJam joined #parrot
00:19 pmichaud joined #parrot
00:19 Util joined #parrot
00:44 whiteknight not_gerd++
00:50 cotto_work I think having him around will be a good thing, as long as he and gerd don't meet.
00:58 whiteknight the resulting annihilation will destroy vast swaths of code
01:01 benabik Well, if we can aim it at IMCC, would it be such a loss
01:01 benabik ?
01:08 whiteknight do we have a list anywhere of problems with IMCC?
01:08 whiteknight besides the obvious <html><body><h1>Everything</h1></body></html>
01:23 dalek parrot/whiteknight/frontend_parrot2: 7721cef | Whiteknight++ | / (4 files):
01:23 dalek parrot/whiteknight/frontend_parrot2: Borrow code from pbc_to_exe to create a custom build script to write prt0.pbc to a .c file. Link that in from frontend/parrot2/main.c to avoid an extra file load, extra API calls, and extra GCables
01:23 dalek parrot/whiteknight/frontend_parrot2: review: https://github.com/parrot/parrot/commit/7721cef8c4
01:23 dalek parrot/whiteknight/frontend_parrot2: 5f1e710 | Whiteknight++ | t/src/embed/api.t:
01:23 dalek parrot/whiteknight/frontend_parrot2: Fix t/src/embed/api.t
01:23 dalek parrot/whiteknight/frontend_parrot2: review: https://github.com/parrot/parrot/commit/5f1e710bae
01:23 dalek parrot/whiteknight/multisub_cleanup: 79e57fb | Whiteknight++ | src/pmc/multisub.pmc:
01:23 dalek parrot/whiteknight/multisub_cleanup: More cleanups for MultiSub
01:23 dalek parrot/whiteknight/multisub_cleanup: review: https://github.com/parrot/parrot/commit/79e57fbd36
01:26 woosley joined #parrot
01:28 rurban joined #parrot
01:43 kid51 joined #parrot
01:47 dalek parrot/soh-cah-toa/hbdb: c277b91 | soh_cah_toa++ | / (2 files):
01:47 dalek parrot/soh-cah-toa/hbdb: Applied patch for cmds.t and Parrot::Test::HBDB from kid51++.
01:47 dalek parrot/soh-cah-toa/hbdb: review: https://github.com/parrot/parrot/commit/c277b91aff
01:47 dalek parrot/soh-cah-toa/hbdb: b26df74 | soh_cah_toa++ | t/tools/hbdb/cmds.t:
01:47 dalek parrot/soh-cah-toa/hbdb: Added tests for 'list' command using ranges.
01:47 dalek parrot/soh-cah-toa/hbdb: review: https://github.com/parrot/parrot/commit/b26df74f65
01:47 dalek parrot/soh-cah-toa/hbdb: 38f8611 | soh_cah_toa++ | t/tools/hbdb/cmds.t:
01:47 dalek parrot/soh-cah-toa/hbdb: Added another test for one argument form of 'list' command.
01:47 dalek parrot/soh-cah-toa/hbdb: review: https://github.com/parrot/parrot/commit/38f8611b6b
01:48 dalek rakudo/nom: f621500 | pmichaud++ | src/core/ (3 files):
01:48 dalek rakudo/nom: Refactor handling of dispatch:<hyper> (>>.foo) to preserve structure.
01:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f621500eb1
01:51 kid51 soh_cah_toa: Which tests are passing/failing for you (cmds.t)?
01:51 soh_cah_toa all pass
01:51 kid51 Damn.  I don't understand why we're getting different results.
01:52 kid51 I'm getting: Failed tests:  3, 6-9
01:52 soh_cah_toa that's so strange. i don't have any local changes either
01:52 kid51 and moreover, that's what I'm expecting
01:52 kid51 Alright, let's ask the basics:  OS, version, Perl 5 version?
01:53 soh_cah_toa fedora 14, perl 5.12.3
01:53 kid51 And can you paste output of prove -v t/tools/hbdb/cmds.t
01:53 soh_cah_toa sure
01:54 nopaste "kid51" at 192.168.1.3 pasted "kid51's fails on cmds.t" (130 lines) at http://nopaste.snit.ch/69210
01:55 nopaste "soh_cah_toa" at 192.168.1.3 pasted "HBDB Tests" (17 lines) at http://nopaste.snit.ch/69211
01:56 kid51 which prove
01:56 soh_cah_toa you mean the TAP::Harness version?
01:57 kid51 that, but also just enter that command and tell me output
01:57 kid51 $ which prove
01:57 soh_cah_toa yeah
01:58 soh_cah_toa /usr/bin/prove
01:58 soh_cah_toa also, TAP::Harness 3.17
01:58 kid51 $ prove --version
01:58 kid51 TAP::Harness v3.23 and Perl v5.14.0
01:58 soh_cah_toa ah
01:58 kid51 but I doubt those differences are significant
01:58 soh_cah_toa yeah
01:58 soh_cah_toa i would maybe try throwing it all out and cloning a new repo
01:59 kid51 Note that in my output, the 'got' is consistently missing the first line of the 'expected'
01:59 soh_cah_toa yeah, i noticed. weird
02:00 kid51 That's why the regexes are not matching the whole set of lines (but why, if I sample lines *other than the first*, I can get some tests to pas)
02:03 dalek parrot/soh-cah-toa/hbdb: 5521376 | soh_cah_toa++ | t/tools/hbdb/cmds.t:
02:03 dalek parrot/soh-cah-toa/hbdb: Added more detailed description to 'list' tests.
02:03 dalek parrot/soh-cah-toa/hbdb: review: https://github.com/parrot/parrot/commit/5521376f70
02:05 dalek rakudo/nom: 9357e76 | (Solomon Foster)++ | src/core/ (4 files):
02:05 dalek rakudo/nom: Add Real.asin, Cool.sin, Cool.asin, Complex.sin, Complex.asin, and protos / multi subs for asin.
02:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9357e76a2c
02:07 dalek rakudo/nom: 1f48277 | (Solomon Foster)++ | t/spectest.data:
02:07 dalek rakudo/nom: Turn on sin.t.
02:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1f48277c7a
02:09 kid51 soh_cah_toa: When I step thru this test with the Perl 5 debugger, I get to this point in the first failing test (3):
02:10 kid51 DB<22> x $input_text
02:10 kid51 0  '(hbdb) List of commands:
02:10 kid51 '
02:10 kid51 Note how the line is beginning with (hbdb).
02:10 soh_cah_toa yeah, i had that problem a long time ago
02:10 kid51 This means that it gets recognized at this line:
02:10 kid51 next if $input_text =~ m|\(hbdb\) .*|;
02:10 soh_cah_toa yeah
02:11 kid51 Since the regex matches, the 'next' is activated.
02:12 kid51 Which means that it doesn't get shoved into $lines
02:12 soh_cah_toa right...but it still stays in $input_text
02:13 kid51 The function DTRT on all subsequent lines, but it misses on that first one.
02:22 dalek parrot/soh-cah-toa/hbdb: b78e1b3 | soh_cah_toa++ | t/tools/hbdb/cmds.t:
02:22 dalek parrot/soh-cah-toa/hbdb: Added test for 'backtrace' command.
02:22 dalek parrot/soh-cah-toa/hbdb: review: https://github.com/parrot/parrot/commit/b78e1b3e62
02:33 rdesfo joined #parrot
02:38 kid51 It doesn't pause at (hbdb) and treat that as a line unto itself.  It proceeds as if List of commands: ought to appear on the same line as (hbdb)
02:38 * kid51 is stumped
02:39 soh_cah_toa i don't remember how that got fixed and it makes even less sense that you're seeing again only on your machine
02:47 kid51 Hmm.
02:47 kid51 I gotta sleep soon
02:47 soh_cah_toa ok
02:47 ssqq joined #parrot
02:48 ssqq hello all.
02:48 kid51 But go to perldoc.perl.org and read the 'perldelta' for changes from Perl 5.12 to Perl 5.14.  Search for IO::Select and IPC::Open3.  Read those changes and post if you think they are significant differences.
02:49 ssqq I want to know if any editor or syntax file to Making PIR, I used Vim
02:50 ssqq Vim have not syntax highlight file for PIR and PASM, Padre could not use this ability
02:50 benabik I have Vim highlighting for PIR...
02:50 ssqq you make it or download from internent benabik?
02:51 kid51 .vim/plugin/parrot.vim
02:51 soh_cah_toa ssqq: use the 'editor' Makefile target
02:51 benabik If it's not just part of 7.3, I'm not sure where I got it from.
02:51 soh_cah_toa i'm sorry, tags-vi
02:51 soh_cah_toa was thinking of editor directory
02:52 nopaste "kid51" at 192.168.1.3 pasted "parrot vim plugin" (4 lines) at http://nopaste.snit.ch/69212
02:54 benabik If you have the parrot source code:  (cd $PARROT/editor && make help)
02:54 ssqq nopaste: your code depend pmc.vim & pasm.vim
02:54 ssqq o I know
02:56 ssqq I can not find any editor folder or any *.vim file in Parrot install folder. maybe in Rakudo?
02:56 benabik ssqq: Do you have a copy of the parrot code somewhere?
02:56 benabik ssqq: In there there's an editor directory.  `make vim-install` in there will install syntax highlighting.
02:56 ssqq benabik: you means in the folder from git
02:56 benabik ssqq: Yes.
02:57 ssqq o, Thanks I download
03:29 ssqq left #parrot
03:33 daniel-s joined #parrot
03:34 theory joined #parrot
04:21 rdesfo joined #parrot
04:22 rdesfo left #parrot
05:13 SHODAN joined #parrot
05:15 theory joined #parrot
05:21 cotto ~~
05:45 Kulag joined #parrot
06:23 fperrad joined #parrot
06:37 fperrad joined #parrot
06:50 Eclesia joined #parrot
06:50 Eclesia hi
06:56 fperrad joined #parrot
06:58 cotto hi Eclesia
07:15 dalek parrot: 7c334b2 | cotto++ | docs/dev/profiling.pod:
07:15 dalek parrot: start adding some meat to the profiling documentation
07:15 dalek parrot: review: https://github.com/parrot/parrot/commit/7c334b2c50
07:19 rohit_nsit08 joined #parrot
07:41 rohit_nsit08 joined #parrot
08:02 lucian joined #parrot
08:29 dalek rakudo/nom: 7b1fa47 | jonathan++ | src/Perl6/Metamodel/BOOTSTRAP.pm:
08:29 dalek rakudo/nom: When we do generic instantiation of a parameter, clear the nominal generic flag if needed.
08:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7b1fa47800
08:49 mj41 joined #parrot
08:58 rurban_ joined #parrot
09:08 UltraDM joined #parrot
09:08 SHODAN joined #parrot
09:24 rohit_nsit08 joined #parrot
09:27 woosley left #parrot
10:05 dalek nqp: b4e475a | pmichaud++ | src/NQPQ/ (3 files):
10:05 dalek nqp: Bring NQPQ up-to-date with latest NQP compiler.
10:05 dalek nqp: review: https://github.com/perl6/nqp/commit/b4e475a40e
10:40 dalek nqp: 6262ccf | pmichaud++ | src/ (2 files):
10:40 dalek nqp: Eliminate "#= open" from regex_declarator, restore <sym> handling.
10:40 dalek nqp: review: https://github.com/perl6/nqp/commit/6262ccfca5
10:51 dafrito joined #parrot
12:02 dalek rakudo/nom: 95b1f22 | moritz++ | / (5 files):
12:02 dalek rakudo/nom: finish cos and acos enough to run the tests
12:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/95b1f220ae
12:06 whiteknight joined #parrot
12:10 jsut_ joined #parrot
12:22 JimmyZ joined #parrot
12:22 lucian joined #parrot
12:23 bluescreen joined #parrot
12:25 Felipe morning guys
12:26 preflex_ joined #parrot
12:29 whiteknight good morning Felipe
12:30 dalek rakudo/nom: 8f74caf | moritz++ | NOMMAP.markdown:
12:30 dalek rakudo/nom: two more TODOs for NOMMAP
12:30 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8f74caf006
12:30 dalek rakudo/nom: 48a3aed | moritz++ | / (6 files):
12:30 dalek rakudo/nom: tan, atan
12:30 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/48a3aed7e8
12:35 whiteknight http://blog.regehr.org/archives/574?utm_source=fee​dburner&amp;utm_medium=feed&amp;utm_campaign=Feed%​3A+EmbeddedInAcademia+%28Embedded+in+Academia%29
12:35 whiteknight I think "#define struct union" may be one of my favorite lines of code ever
12:37 whiteknight #define while if is another good one, but could break compilation
12:37 whiteknight #define free(p)
12:37 whiteknight or #define free(p) free(p) free(p)
12:37 whiteknight all evil
12:38 atrodo the second one would be detected quickly.  the first one however, very evil
12:39 atrodo #define rand(p) 4
12:40 moritz that's the debian + xkcd connection :-)
12:43 atrodo i figured someone would catch it
12:46 whiteknight #define unsigned signed
12:46 atrodo oh, that one's good
12:46 whiteknight oh, I just thought of a great one: "#define do"
12:47 whiteknight that would be terrible to debug
12:48 whiteknight every do/while in the program would execute once, and then enter an empty while loop with a possibly infinite condition
12:53 atrodo it's been a while, but I think a {}while is not valid syntax
12:57 whiteknight { } is valid syntax, and while(x); is valid too
12:57 whiteknight they would get parsed separately
12:59 contingencyplan joined #parrot
13:00 atrodo interesting.  i thought the while(); was the invalid part.  i guess i was wrong.
13:02 Coke joined #parrot
13:03 dalek nqp: 32fb34c | pmichaud++ | src/ (2 files):
13:03 dalek nqp: nqpq: protoregex stub.
13:03 dalek nqp: review: https://github.com/perl6/nqp/commit/32fb34c46f
13:03 dalek nqp: 0ef4235 | pmichaud++ | src/NQPQ/Actions.pm:
13:03 dalek nqp: nqpq: Remove obsolete "= open" key code.
13:03 dalek nqp: review: https://github.com/perl6/nqp/commit/0ef4235d2f
13:03 dalek nqp: 285fe4f | pmichaud++ | src/QRegex/P6Regex/ (2 files):
13:03 dalek nqp: Split out parsing of sequential/parallel alternation and conjunction.
13:03 dalek nqp: review: https://github.com/perl6/nqp/commit/285fe4fea4
13:03 dalek nqp: 4c6978d | pmichaud++ | src/Q (2 files):
13:03 dalek nqp: Create separate 'alt', 'altseq', 'conj', 'conjseq' :rxtype nodes.
13:03 dalek nqp: review: https://github.com/perl6/nqp/commit/4c6978d11a
13:04 woosley joined #parrot
13:05 whiteknight It is actually very surprising to me that modern compilers would allow, silently or not, a keyword to be redefined or even undefined like that
13:05 atrodo That's because it's not the compiler doing it.  it's the preprocessor, which is very stuipd
13:06 whiteknight still, you would think a modern preprocessor would include some basic sanity checks, and require an --allow-stupid-shit flag before silently redefining keywords
13:07 atrodo that i'll give you.  but then again, this is c, that language that will not only let you shoot yourself in the foot, but give you the gun and make sure it's loaded
13:08 whiteknight as opposed to C++, which is so bent and convoluted you can never tell whether you're aiming at your own foot or not
13:09 whiteknight or perl, which only aims at the foot of the person who has to maintain the code after you get fired
13:09 pmichaud actually, I think C is more like it'll let you shoot yourself in the foot if you want, but once you start handling the gun you're also likely to shoot yourself in the gut or face :-)
13:09 atrodo pmichaud++
13:09 whiteknight C is all about flexibility
13:10 moritz it's like glorified assembler, with the really interesting parts removed
13:10 pmichaud it's like PIR, only....   nah, let's not go there.  :)
13:11 moritz for example all modern CPUs have an instruction that similtaneously calculate value and remainder of an integer division
13:11 moritz where's that in C?
13:12 moritz or you can simply ask the 'carry' flag if an overflow occured in an integer operation - why can't I access that from C?
13:12 whiteknight it occasionally magically appears when -O2
13:12 whiteknight moritz: the carry flag is certainly not universal. Many compilers will offer intrinsics or inline assembly to get at machine-dependent features
13:12 moritz or an 'mul' of two integer registers sensibly puts the result in *two* registers
13:13 moritz can I access those?
13:13 whiteknight the fact that most programmers don't want to use inline assembly is hardly an argument against it
13:15 whiteknight moritz: in the intel compiler, there is a pretty big library of intrinsic functions which allow you to do all those things
13:15 whiteknight msvc offers a certain amount as well, since they are typically only concerned with x86, historically
13:15 whiteknight gcc has some extensions, but not nearly so many
13:15 moritz whiteknight: but that's not C, that's Intel Proprietary C With Extensions
13:15 moritz whiteknight: you get my point, I think
13:16 NotFound whiteknight: C++ states that redefining keywords is not supported.
13:17 moritz does the preprocessor actually care about that?
13:20 bubaflub joined #parrot
13:21 bubaflub ~
13:22 Felipe aloha
13:28 NotFound moritz: no, but if you break the rules you should know what you are doing.
13:29 whiteknight the point of that blog post is that a malicious employee can break the software in subtle and hard-to-debug ways
13:30 whiteknight I suspect it is even easier in C++. Overload the + operator to return A + B - 1
13:30 whiteknight or something silly
13:30 mj41 joined #parrot
13:31 whiteknight or overload the dereference operator to if(rand() % 10000) *NULL;
13:31 NotFound That point was already addressed in more depth by Kernighan years ago, by inserting a trick in the C compiler itself.
13:31 NotFound Decades ago.
13:34 whiteknight it is inserting tricks that is the problem
13:39 moritz in a dynop, how do I get a PMC's type name?
13:39 nopaste "NotFound" at 192.168.1.3 pasted "A slightly improved version with prettier output of the libxml2 tests" (157 lines) at http://nopaste.snit.ch/69280
13:41 whiteknight moritz: HLL-level type name? Probably something like VTABLE_get_string(INTERP, VTABLE_get_class(INTERP, $1))
13:41 whiteknight or if you're talking about lower-level built-in types, you would do $1->vtable->whoami;
13:41 moritz whiteknight: thanks
13:41 moritz I think I want whoami
13:41 whiteknight for most HLL-defined objects, ->vtable->whoami is going to return "Object"
13:42 whiteknight or, "SixmodelObject"
13:42 moritz actually, I don't quite know what I want :-)
13:42 moritz rakudo has a perl6_code_object_from_parrot_sub opcde
13:43 whiteknight I wonder what that does :)
13:43 moritz which dies if its argument is not a parrot sub
13:43 moritz and I want to improve the error message to include what it did get
13:43 whiteknight There is a flag somewhere that determines if the PMC is an Object or not
13:44 moritz I guess I'll just try if ->vtable->whoami gives me an interesting result
13:45 whiteknight if (PObj_is_object_TEST($1)) { ... ->vtable->whoami ... } else { VTABLE_get_string...}
13:45 whiteknight of course, I don't know if SixModelObject sets that flag appropriately or not
13:45 whiteknight If not, I think it should
13:45 moritz well, for now I don't even have the slightest idea what I've got that's not a parrot sub
13:46 moritz since I got the stuff out of a backtrace
13:46 moritz oh
13:46 * moritz forgot the containerization, again
13:48 whiteknight it does not look like SixModelObject is getting that flag set. We should talk to jnthn__ and make sure that it is
13:50 jnthn__ We shouldn't set it or bits of Parrot will think they know what to do with it (e.g. treat it like an Object PMC), I suspect.
13:51 whiteknight all that flag does most of the time is prevent it from being treated like a low-level type
13:52 whiteknight basically, prevent us from looking at ->vtable->base_type or ->vtable->whoami, both of which will be nonsensical for Object and SixModelObject
13:52 whiteknight I *suspect*
13:52 whiteknight If it does more than that, It's probably a bug on the parrot side
13:58 whiteknight yeah, I just did a quick search, and it looks like that's all it does
13:59 whiteknight there's one case in imageiofreeze PMC that is "interesting", but if that causes problems it's a bug
14:13 dalek rakudo/nom: 7dc428f | Coke++ | t/spectest.data:
14:13 dalek rakudo/nom: run another test. track failure modes
14:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7dc428ff43
14:36 bluescreen_ joined #parrot
15:05 benabik o/
15:05 tadzik \o
15:25 rdesfo joined #parrot
15:35 darbelo joined #parrot
15:35 woosley left #parrot
15:39 not_gerd joined #parrot
15:39 not_gerd hello #parrot
15:41 tadzik hello not_gerd
15:51 rohit_nsit08 joined #parrot
16:08 * whiteknight just figured out, after hours of debugging data corruption errors, that somebody changed the system encryption key last November
16:09 whiteknight which means all records created before November cannot be decrypted, and cause data load errors
16:09 atrodo that seems secure
16:09 whiteknight "if we can't have the data, nobody can"
16:10 benabik "Is your data secure?  Heck, it's so secure we can't even get at it!"
16:10 whiteknight it's for the development system, so it doesn't affect customers or end users. But it does make testing recent changes a pain
16:10 Eclesia left #parrot
16:12 whiteknight and of course, the DB has a huge tangled web of foreign key constraints on a huge set of heavily normalized tables, so deleting the old records is nigh impossible
16:13 whiteknight I want to try and sell my boss on the Patented Whiteknight Nuclear Approach (c) to software fixing
16:13 not_gerd I set up a github account and pasted the two post I wrote today while sitting on a train
16:13 not_gerd https://gist.github.com/1137275 about msys
16:13 whiteknight not_gerd++
16:13 not_gerd https://gist.github.com/1137289 about m0
16:14 not_gerd got to leave for now, will be back for comments
16:14 whiteknight not_gerd: I'll review those tonight and merge if possibloe
16:14 whiteknight possible
16:15 not_gerd whiteknight: the patch is not included - wasn't sure if I should just post a patch or create a github fork
16:15 not_gerd anyway, reeally got to go now ;)
16:16 whiteknight not_found: patch or fork are both okay.
16:16 whiteknight Later
16:26 Khisanth joined #parrot
16:26 cotto ~~
16:26 cotto aloha, clock?
16:26 aloha cotto: LAX: Wed, 09:26 PDT / CHI: Wed, 11:26 CDT / NYC: Wed, 12:26 EDT / UTC: Wed, 16:26 UTC / LON: Wed, 17:26 BST / BER: Wed, 18:26 CEST / TOK: Thu, 01:26 JST / SYD: Thu, 02:26 EST
16:33 theory joined #parrot
16:41 TimToady_ it's just wrong that aloha doesn't give Hawaiian time...
16:42 cotto bacek_at_work, ^
16:44 TimToady_ the proper response is, "But they don't care about time there..."  :)
16:47 cotto HST: whatever
16:58 rurban_ joined #parrot
17:01 whiteknight I had a boss at one of my first jobs who would always answer "it's miller time", and then he would drink a beer
17:02 whiteknight he ended up intoxicated at work a lot, and I would end up having to run the cash register
17:02 whiteknight eventually, I got a watch
17:03 darbelo joined #parrot
17:03 JimmyZ my superior always said it's very easy, and finally it take at least 5x times and more developer
17:04 JimmyZ 2x more developer
17:12 Eclesia1 joined #parrot
17:12 Eclesia1 hi
17:17 cotto_work ~~
17:24 dalek nqp: 29ad65d | jonathan++ | src/how/NQPClassHOW.pm:
17:24 dalek nqp: Update NQPClassHOW.find_method for API extension.
17:24 dalek nqp: review: https://github.com/perl6/nqp/commit/29ad65d50b
17:25 rdesfo joined #parrot
17:51 dalek rakudo/nom: 4799849 | pmichaud++ | src/core/List.pm:
17:51 dalek rakudo/nom: Nonexistent List elements return Nil instead of Mu.  JimmyZ++ TimToady++
17:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4799849d7f
17:53 not_gerd joined #parrot
17:56 * JimmyZ guesses there should be a test for 4799849
18:13 JimmyZ joined #parrot
18:19 dalek rakudo/nom: 0f044f2 | jonathan++ | src/Perl6/Actions.pm:
18:19 dalek rakudo/nom: Should apply method traits before method installation (really should apply them much sooner after we parsed them, but that's a bigger refactor).
18:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0f044f2bb6
18:41 Eclesia1 question : I have a main function. and would like to return 0 or 1 when applications finishes. to tell the caller if it suceed or failed.  just adding 'return 1' doesn't seem to work. how can I do this ?
18:42 whiteknight Eclesia: exit opcode
18:42 whiteknight exit 1 or exit 0
18:42 Eclesia1 whiteknight: thanks
18:43 whiteknight I've always wondered why Parrot didn't have a return value from main
18:44 Eclesia1 what the hell ...
18:44 Eclesia1 whiteknight: I call exit(1); in winxed. the result on the other side is '256'
18:45 Eclesia1 at least when I set 0 it's still 0 ^^
18:45 whiteknight hmm...that's a bug
18:46 whiteknight I thought we had tests for that
18:46 whiteknight unless winxed exit() is different from Parrot exit
18:46 Eclesia1 whiteknight: or perhaps it's because I encapsulate it with a spawn. here is how I use it : int res = spawnw(["parrot", "-L", "target-pbc", "target-pbc/Compiler1.pbc", "lib-1"]);
18:47 Eclesia1 the compiler1 return exit(1); and res on the other side is 256
18:47 whiteknight return values are bytes, I think. It might be shifted
18:47 whiteknight res >> 8 should return 1
18:47 whiteknight but that's very weird to me
18:48 NotFound Eclesia1: What is the other side?
18:48 benabik What's spawnw from?
18:49 darbelo joined #parrot
18:49 Eclesia1 NotFound: I have a winxed function calling spawn. the 'other side' is this function, the one who called the spawn
18:49 NotFound Eclesia1: thy echo $? from the shell (or errorlevel in windows).
18:49 darbelo_ joined #parrot
18:50 Eclesia1 ??
18:50 NotFound Eclesia1: exit and spawn work that way.
18:51 NotFound There is a comment somewhere in parrot saying that we should provide some independent way.... but comments aren't executable ;)
18:53 benabik Yessss…  Status value from waitpid != exit code.  My man page says the value has to be passed to a macro WEXITSTATUS to get the exit code.
18:53 NotFound This is what the winxed driver does to check results: retval = (retval >> 8) & 0xFF;
18:53 benabik That's probably reasonably portable.
18:54 dukeleto ~~
18:57 rohit_nsit08 joined #parrot
19:06 Eclesia1 is there a parrot abreviation ?
19:06 Eclesia1 for the word 'parrot virtual machine' ?
19:11 rohit_nsit08 joined #parrot
19:12 mj41 joined #parrot
19:13 benabik Eclesia1: I think people just say "Parrot"
19:16 whiteknight Eclesia: PVM
19:23 rohit_nsit08 joined #parrot
19:26 rdesfo joined #parrot
19:30 benabik "Multiple Dispatch: No suitable candidate found for 'concatenate_str', with signature 'PSP->P'"
19:30 benabik ??
19:32 rohit_nsit08 joined #parrot
19:41 moritz what does the PIR for that look like?
19:41 benabik I think…      concat $P134, $P133, " :flat"
19:42 benabik As that's the only concat in the block listed in the backtrace.
19:44 moritz you probably need all arguments of the same type
19:44 moritz so either use $S134, $S133, " :flat"
19:44 benabik This is generated from NQP:                          @posargs.push($cpost ~ " :flat");
19:44 moritz try
19:44 moritz @posargs.push(~$cpost ~ " :flat");
19:46 benabik ...
19:46 moritz well, in Perl 6 you don't have to do that
19:46 benabik Okay, that worked…  I guess I should change the other similar uses?
19:46 moritz but nqp deosn't have that much runtime
19:47 benabik There is supposed to be a "concat PPS" opcode
19:48 benabik Eh.  It works now, so don't complain, I guess.
19:48 moritz the question is if you want 2 or 8 concat opcodes
19:49 benabik By "supposed to be", I mean it's listed in the string opcodes page.
19:50 benabik Eh.
19:52 moritz benabik: ah, iirc some of the opcodes don't like constants as arguments, they require register
19:52 benabik moritz: I think it's some oddity with the concatenate VTABLE for the POST node.
19:53 moritz nqp: say(pir::concat__PPS(my $x = 3, 'foo'))
19:53 p6eval nqp: OUTPUT«Assignment ("=") not supported in NQP, use ":=" instead at line 1, near " 3, 'foo')"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23611 (src/stage2/gen/NQPHLL.pir:6348) (src/stage2/gen/NQPHLL.pm:329)␤»
19:53 moritz nqp: say(pir::concat__PPS(my $x := 3, 'foo'))
19:53 p6eval nqp: OUTPUT«3foo␤»
19:53 moritz nqp: say(pir::concat__PPs(my $x := 3, 'foo'))
19:53 p6eval nqp: OUTPUT«3foo␤»
19:53 moritz theory disproved
19:54 benabik nqp: say(pir::concat__PPS(my $n := POST::Node.new, 'foo'))
19:54 p6eval nqp: OUTPUT«Null PMC access in find_method('new')␤current instr.: '_block1000' pc 47 ((file unknown):41) (/tmp/M_ui2LKMtA:1)␤»
19:54 benabik nqp: say(pir::concat__PPS(my $n := PCT::Node.new, 'foo'))
19:54 p6eval nqp: OUTPUT«Null PMC access in find_method('new')␤current instr.: '_block1000' pc 47 ((file unknown):41) (/tmp/X2Y9PZhq3t:1)␤»
19:54 moritz not loaded
19:54 benabik Yeah, guess not.
19:54 benabik It's loaded in interactive mode, which was my confusion.
19:55 moritz nqp: use NQPHLL; POST::Node.new
19:55 p6eval nqp: OUTPUT«Null PMC access in find_method('new')␤current instr.: '_block1000' pc 41 ((file unknown):38) (/tmp/qMnKABicC5:1)␤»
19:55 moritz nqp: PAST::Node.new
19:55 p6eval nqp:  ( no output )
19:57 * theory cries
19:58 benabik nqp: say(pir::concat__PPs(PAST::Node.new, 'foo'))
19:58 p6eval nqp: OUTPUT«Multiple Dispatch: No suitable candidate found for 'concatenate_str', with signature 'PSP->P'␤current instr.: '_block1000' pc 47 ((file unknown):39) (/tmp/Kd10AAYZvJ:1)␤»
19:58 benabik There it is!
19:59 moritz nqp: say(pir::concat__PPS(PAST::Node.new, 'foo'))
19:59 p6eval nqp: OUTPUT«Multiple Dispatch: No suitable candidate found for 'concatenate_str', with signature 'PSP->P'␤current instr.: '_block1000' pc 56 ((file unknown):70012314) (/tmp/50hq1nfQp8:1)␤»
20:00 benabik Probably a problem with the PCT or Capture VTABLE.
20:00 moritz I don't think so
20:01 moritz the opcode should call the get_string vtable under the hood, but that's not what the error message is about
20:02 benabik concat PPS calls $1 = VTABLE_concatenate_str(interp, $2, $3, $1);
20:02 jnthn__ I think the issue is that Parrot doesn't have a MMD fallback
20:02 jnthn__ That is
20:02 jnthn__ A candidate that coerces
20:02 * jnthn__ has run into this one plenty too
20:03 moritz benabik: then you're probably right, and I'm wrong
20:03 jnthn__ It's not really PCT of Capture's fault. I don't know what they could do differently to avoid this.
20:03 jnthn__ s/of/or/
20:04 benabik Have the appropriate candidate?
20:05 soh_cah_toa joined #parrot
20:12 rohit_nsit08 joined #parrot
20:17 dalek parrot: 2947ca6 | Whiteknight++ | compilers/imcc/imc (2 files):
20:17 dalek parrot: IMCC looks like it was trying to support :multi(_) and :multi('_'), but the later was handled incorrectly and nonsensically. Fix this so now we can do :multi('_') also, for generic pmcs
20:17 dalek parrot: review: https://github.com/parrot/parrot/commit/2947ca6ab5
20:23 dmalcolm joined #parrot
20:26 whiteknight msg NotFound: https://gist.github.com/1138138
20:26 aloha OK. I'll deliver the message.
20:27 whiteknight msg NotFound that works after 2947ca6, because FunctionModifierList doesn't parse [multi(_)], only [multi("_")]
20:27 aloha OK. I'll deliver the message.
20:32 dalek rakudo/nom: 856dc3d | moritz++ | src/core/BackTrace.pm:
20:32 dalek rakudo/nom: Revert accidential changes to BackTrace.pm from 48a3aed7e89
20:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/856dc3de57
20:32 dalek rakudo/nom: 4aab0e5 | moritz++ | src/core/BackTrace.pm:
20:32 dalek rakudo/nom: tweak BackTrace so that you can generate and print a bt easily from an Exception object
20:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4aab0e5334
20:33 contingencyplan joined #parrot
20:58 dalek winxed: 23dc6d8 | NotFound++ | winxedst1.winxed:
20:58 dalek winxed: new builtin var: cast to var type
20:58 dalek winxed: review: https://github.com/NotFoun​d/winxed/commit/23dc6d8a4c
21:02 Eclesia1 question : is it possible to catch was is printed when calling spawnw ?
21:05 NotFound Eclesia1: you can open a pipe in read mode
21:05 Eclesia1 NotFound: I mean redirect the output, so that the spawnw does not write in the console
21:06 NotFound Eclesia1: use the pipe and do nothing with the results read from it.
21:07 Eclesia1 NotFound: ok, so how do I create and link that pipe to the spawnw ?
21:08 NotFound handle.'open'('command', 'rp')
21:09 Eclesia1 NotFound: I don't get it, where does that handle come from ?
21:09 Eclesia1 I just have : spawnw(["parrot", "-L", "target-pbc", "target-pbc/Compiler1.pbc", "lib-1"]);
21:10 NotFound Eclesia1: new ['FileHandle']
21:10 Eclesia1 (I'm in winxed if you present to write it in wx)
21:11 Eclesia1 prefer*
21:11 NotFound In winxed you can just do: var handle = open("command", "rp")
21:11 NotFound The builtin open creates the FileHandle and call its open method.
21:11 Eclesia1 a FileHandle to open a command ... weird
21:12 NotFound The downside is that you must build the command string and be careful with possible shell handling of quotes.
21:12 NotFound Eclesia1: is like the C popen function.
21:14 Eclesia1 NotFound: with this method, I won't have the int result of the spawnw execution either ?
21:15 NotFound Eclesia1: you get the result value as the result of the close method in the handle, if I remember well.
21:25 perlite_ joined #parrot
21:26 rdesfo joined #parrot
21:30 darbelo joined #parrot
21:45 Eclesia1 time to go +++
21:45 Eclesia1 left #parrot
21:49 Psyche^ joined #parrot
22:00 cotto_work soh_cah_toa++
22:00 soh_cah_toa for?
22:08 cotto_work the post to parrot-dev
22:08 pbaker joined #parrot
22:08 soh_cah_toa ah, yes
22:08 soh_cah_toa very excited about that
22:08 cotto_work fire and forget?
22:08 cotto_work ;)
22:08 soh_cah_toa :)
22:09 jnthn__ fwiw, while the Parrot debug seg info tends to be way off, in my experience the annotations tend to be quite accurate.
22:09 soh_cah_toa it varies from compiler to compiler
22:09 jnthn__ OK
22:09 * jnthn__ can believe that
22:09 soh_cah_toa which is why its unreliable and a debug segment is a better solution
22:10 jnthn__ I'm not sure how the annotations aren't a debug segment.
22:10 jnthn__ Aside from maybe a lack of standardization.
22:10 soh_cah_toa well i have an idea for a similar line number table which i'm writing up atm
22:10 jnthn__ (e.g. compilers can emit whtever annotations they want)
22:10 jnthn__ Note that you can
22:10 jnthn__ .annotate 'any_key', 'any_value'
22:11 jnthn__ Or whatever teh syntax is.
22:11 soh_cah_toa right
22:11 jnthn__ We used that to do some stuff in Rakudo a while back.
22:11 jnthn__ Though in nom we're only using what PCT emits at the moemnt (so, line and file)
22:11 soh_cah_toa yeah
22:12 jnthn__ Anyway, just thought I'd add as a data point that I've found the line numbers I get out of NQP and Rakudo/nom to be essentially accurate.
22:12 soh_cah_toa i suppose the compiler can use annotations for its own needs but a symbolic debugger really can't do much w/ it
22:12 soh_cah_toa nqp...yeah i think they're alright
22:12 jnthn__ Well, it can if it knows what it's looking for.
22:12 jnthn__ :)
22:12 jnthn__ But I agree you're relying on convention there.
22:13 soh_cah_toa ok
22:13 jnthn__ (e.g. 'line' and 'file' aren't magical in any way)
22:13 jnthn__ Anyway, very happy somebody is focusing on this.
22:13 soh_cah_toa yup
22:14 soh_cah_toa i wouldn't be surpised to see a lot more perl 6 users once we have a real debugger using a debug segment
22:14 soh_cah_toa which makes me real happy :)
22:15 jnthn__ One thing to take into account is that the Perl 6 optimizer - which'll likely land in a couple of months - will probably do a lot of inlining style optomizations.
22:16 jnthn__ So if you're working on new debug segment stuff, that's one thing to keep in mind.
22:16 soh_cah_toa yes definitely
22:16 soh_cah_toa optimizations can cause problems for debuggers
22:16 jnthn__ One Parrot level sub could actually end up containing stuff that the user sees as having been in many different ones.
22:16 jnthn__ Aye.
22:16 soh_cah_toa escpecially runtime optimizers
22:45 daniel-s joined #parrot
22:49 darbelo_ joined #parrot
23:30 rdesfo joined #parrot
23:55 nbrown joined #parrot
23:58 kid51 joined #parrot

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

Parrot | source cross referenced