|
Parrot 3.4.0 released | parrot.org | Log: irclog.perlgeek.de/parrot/today Set by moderator on 17 May 2011. |
|||
| soh_cah_toa | and honestly, unless you're playing a video game while editing a movie while you're running photoshop while you're using firefox (new firefox), you never will reach that 4GB limit | 00:01 | |
| sorear | whiteknight: the assertion that Ubuntu is "one of the most usable" is oft made but rarely substantiated | 00:07 | |
| cotto_work | seen dukeleto | 00:09 | |
| aloha | dukeleto was last seen in #parrot 1 days ago joining the channel. | ||
|
00:25
theory left
00:27
darbelo left
|
|||
| plobsing | bubaflub: pong | 00:31 | |
| bubaflub | plobsing: could you briefly describe the difference between 'p' and 'P' NCI types? | ||
| plobsing | 'P' passes the PMC* through unaltered. 'p' uses the {get,set}_pointer convention for representing pointers with PMCs. | 00:32 | |
| bubaflub | plobsing: ok. i think i get it. | 00:35 | |
|
00:35
cotto joined
|
|||
| cotto | ~~ | 00:42 | |
| bubaflub | plobsing: so in Winxed, if i have some var ptr set to an allocated StructView, when i pass that ptr into an NCI function should that be a 'p' or a 'P'? | ||
| if that question even makes sense | 00:43 | ||
| sorear | do you want the NCI function to get the struct, or the PMC*? | ||
| should the passed pointer point to a Parrot_Obj header, or to your own struct? | 00:44 | ||
| plobsing | ^^ | ||
| sorear | plobsing: when does 'p' use set_pointer? | 00:45 | |
| plobsing | sorear: for returns | ||
| and pass-by-reference | |||
| which are treated like returns by the NCI layer | |||
| sorear | How do returns know what kind of PMC to make? | 00:46 | |
| plobsing | they don't. they just make Ptr PMCs | ||
| I suppose one might conceivably want to HLL map that | 00:47 | ||
| sorear | does NCI ever set_pointer a non-Ptr? | ||
| plobsing | no. What situation would make that desirable? | 00:48 | |
| sorear | none; I just was getting clarification | ||
| bubaflub | plobsing: hmmm, i'm still a bit foggy on all this. almost all my functions take an mpz_t which i have for the StructView. i've got it working with a 'p' NCI type but i'm not totally sure that's right. | 00:56 | |
| plobsing | unless your function takes a 'PMC*' (or in rare cases a passthrough 'void*'), you want 'p'. | 00:58 | |
| bubaflub | plobsing: ok, that makes sense. i saw some NCI signatures in the extra_thunks file that took a 'P' and was wondering why that was. | 01:00 | |
| plobsing: so those functions have to be designed to *explicitly* take a PMC* | |||
| plobsing | yes, exactly | ||
| such functionality is generally only useful for calling into parrot internals or parrot extensions | 01:01 | ||
| bubaflub | plobsing: great. also, pdd16 is still in draft mode - is there anything that's stopping that from becoming a non-draft PDD? more docs or updates? | ||
| (i'm willing to put in the time to edit it or fill it out, just curious) | |||
|
01:01
theory joined
|
|||
| plobsing | it looks like PDD16 describes parrot's NCI circa 1-4 years ago. | 01:03 | |
| bubaflub | plobsing: bummer. | 01:04 | |
| plobsing: well, i'm still willing to edit it to get it up to date but i'll need some pointers in the right direction | 01:06 | ||
| sorear | isn't that the way PDDs always are? | ||
| plobsing | bubaflub: I'm not exactly the best person to ask about writting PDDs. my view is that they are ill-conceived and are doomed to uselessness. | 01:07 | |
| bubaflub | sorear: yes, but i'll put some time to fix at least this one | ||
| plobsing | I think we'd be much better off with docs that didn't try to define "what should be", but in stead, focused on "what is" | ||
| and documented that in a sequence meaningful to users, not devs | 01:08 | ||
| bubaflub | plobsing: for the most part i agree - i'd love to see the PDD at least get to the point where it's describing what currently is | ||
| plobsing | but that's not a PDD. a PDD is a waterfall-design-type thing. | 01:10 | |
| I'd encourage you to look at writting up a "How to work with native code from Parrot" document in stead, if you have the time. | 01:11 | ||
| bubaflub | plobsing: yeah, i'd like to incorporate that as part of my GSoC project - a tutorial documenting the steps i took to get these bindings to work | 01:12 | |
|
01:14
pjcj left
|
|||
| bubaflub | plobsing: but i think my project is pretty simple and has some idiosyncrasies that won't be too relevant to others | 01:14 | |
| plobsing | you can use your discretion about inclusions and omissions, but perhaps those idiosyncrasies are simply "advanced material" | 01:15 | |
| which would go at the bottom | 01:16 | ||
| bubaflub | plobsing: yeah. i have some specific scripts which "parse" (fsvo parse) the header and the docs to generate the code that i use. that's specific but the techniques are good. generating an extra thunk is something i think others will need. | 01:19 | |
|
01:44
whiteknight left
01:53
kid51 joined
|
|||
| kid51 | msg dukeleto Something is amiss with the way planet.parrotcode.org is handling your latest post. | 01:54 | |
| aloha | OK. I'll deliver the message. | ||
|
02:00
davidfetter left
02:05
bubaflub left
02:07
lichtkind_ joined
02:09
lichtkind left,
lichtkind_ is now known as lichtkind
02:16
lichtkind left
02:20
benabik joined
02:22
kid51 left
02:24
woosley joined
02:29
rurban_ joined
02:32
rurban left,
rurban_ is now known as rurban
|
|||
| benabik | Good evening! | 02:33 | |
| soh_cah_toa | tcurtis: ping | ||
| benabik | Random Q: Where does the value of a lexical get stored? In the register in the .lex declaration? | 02:34 | |
| soh_cah_toa | i think its the LexPad pmc | 02:35 | |
| or LexInfo, one of those two | |||
| benabik: look at docs/book/pir/ch06_subroutines.pod | 02:37 | ||
| particularly in the "Lexicals" section | 02:38 | ||
| benabik | The LexInfo doc says that a lexical is an alias for a register. | ||
| soh_cah_toa | look at that pod file. i think that section is exactly what you're looking for | 02:39 | |
| benabik | soh_cah_toa: Well, I'm looking at the HTML on parrot.org. | ||
| soh_cah_toa | benabik: LexInfo stores compile time info about lexicals while LexPad stores runtime info about lexicals | 02:41 | |
| i'm not sure what you're trying to do but i don't think you can access those two pmc's directly from pir code | 02:42 | ||
|
02:43
pjcj joined
|
|||
| benabik | soh_cah_toa: I'm pondering possible optimization. If the register in the .lex declaration is the actual storage location, then there's no need to use find_lex in the same sub it's declared in. If it's stored in the LexPad... well, then, I'm sad. | 02:45 | |
| soh_cah_toa: Also just trying to understand register use and whatnot because I'm playing with PAST's register allocation. | |||
| (By playing with, I may mean "screwing up"... Getting weird compilation issues.) | 02:46 | ||
| soh_cah_toa | alright | ||
| benabik: www.onyxneon.com/books/parrotdev/pa..._guide.pdf | 02:52 | ||
| benabik: page 41 | 02:53 | ||
| it's outdated but i still read it sometimes :) | |||
| benabik | soh_cah_toa: This seems identical to docs/book | ||
| soh_cah_toa | it is | 02:54 | |
| dalek | rrot: 3874860 | petdance++ | src/pmc.c: consted a pointer |
03:14 | |
| benabik | I have the sudden urge to make a crickets IRCbot, that just sits in the channel and chirps after a given amount of inactivity. | 03:15 | |
| soh_cah_toa | yeah, today has been unusually quite. thursday normally sees a lot of activity | 03:52 | |
| github.com/parrot/parrot/graphs/punch_card | 03:53 | ||
|
04:13
benabik left
04:27
theory left
04:41
benabik joined
|
|||
| dalek | rrot/soh-cah-toa/hbdb: 0f058bc | soh_cah_toa++ | src/hbdb.c: Renamed a few structs by adding the prefix 'hbdb' to avoid possible name collisions in the future |
04:46 | |
| rrot/soh-cah-toa/hbdb: bb3a61c | soh_cah_toa++ | src/hbdb.c: Re-organized a few comments in src/hbdb.c to be more consistent with Parrot conventions |
|||
| rrot/soh-cah-toa/hbdb: 13887fd | soh_cah_toa++ | src/hbdb.c: Added skeleton for parse_command() and renamed hbdb_command_line() to command_line() because static functions shouldn't have the hbdb prefix. Also made a perldoc section for static functions |
|||
| rrot/soh-cah-toa/hbdb: 42fc16a | soh_cah_toa++ | / (3 files): Added src/embed/hbdb.c to the SEE ALSO section in all relevant perldoc |
|||
|
04:50
soh_cah_toa left
05:37
fperrad joined
05:39
athomason left
06:16
SHODAN joined
06:48
Drossel left,
Kulag joined
|
|||
| dalek | p: af3db5b | pmichaud++ | src/6model/reprs/P6opaque.c: Improve NYFI 4 message to include name of attribute not located. |
06:57 | |
|
07:26
PacoLinux left
07:27
PacoLinux joined,
mj41 joined
07:39
woosley left
|
|||
| dukeleto | ~~ | 07:44 | |
| cotto | nice to see you alive, dukeleto | 07:45 | |
| dukeleto | cotto: took a midweek vacation | ||
| cotto | getting relaxed before OS Bridge? | ||
| dukeleto | cotto: just in general | 07:46 | |
| cotto: surprised to hear about perl-ctypes not working. I thought it was going into p5p core | |||
| cotto | orly? That'd be amazing. | ||
|
08:20
dodathome joined
|
|||
| dalek | Heuristic branch merge: pushed 29 commits to parrot/leto/embed_grant by leto | 08:28 | |
|
08:49
Drossel joined
08:50
Kulag left
08:59
Drossel left
09:10
mikehh left
|
|||
| dalek | website: rohit_nsit08++ | CorellaScript : AST and LALR parsing. | 09:20 | |
| website: www.parrot.org/content/corellascrip...r-parsing. | |||
|
09:21
Kulag joined
09:23
mikehh joined
09:29
SHODAN left
10:29
rurban_ joined
10:32
rurban left,
rurban_ is now known as rurban
10:59
dodathome left
11:05
redicaps joined
11:06
SHODAN joined
11:08
lichtkind joined
11:33
mtk left
11:39
mtk joined
11:59
jsut_ joined
12:04
jsut left
12:23
contingencyplan left
12:26
cosimo joined
12:30
redicaps left
12:52
estrabd left,
estrabd joined
12:54
rohit_nsit08 joined
|
|||
| rohit_nsit08 | hello #parrot | 12:54 | |
|
12:59
bubaflub joined
13:05
darbelo joined
13:17
whiteknight joined
|
|||
| whiteknight | good morning, #parrot | 13:17 | |
| tadzik | good morning whiteknight | ||
| whiteknight | hello tadzik, how are you today? | 13:19 | |
| tadzik | not bad. I happened to fail my yesterday exam though | ||
| moritz | :( | 13:20 | |
| which one was that, math? | |||
| tadzik | yes | ||
| whiteknight | what subject in math? | 13:21 | |
| tadzik | I passed the exam itself, but I don't have enough points from the excercises: I wasn't present on the last of mini-exams, because I was writing physics then | ||
| it's named "Probabilistics and Statistics" | |||
| moritz | that sucks, probably | 13:22 | |
| tadzik | if it wasn't for physics, I'll have my exercises passed too, and I'll be drinking right now. But in the situation I am, I need more points from the exam than the passing border | ||
|
13:23
plobsing left
|
|||
| whiteknight | tadzik: algebra-based or calculus-based probability? | 13:23 | |
| tadzik | this semester is a semester of second-attempt exams | ||
| whiteknight: I don't think my language interoperability applies to maths :) But I'll vote for algebra based, I think | 13:24 | ||
| there are matrixes :P | |||
| no, honestly, I don't know :) I can show you the tasks, but they're in polish | 13:25 | ||
| whiteknight | tadzik: okay, that's the most common. I had it with a lot of calculus for the engineering curriculum. I don't recommend that for anybody | ||
| but probability is a tricky subject to wrap your mind around no matter what. Lots of formulas to memorize and all that | 13:26 | ||
| tadzik | covariation. Do you know such a term? | 13:27 | |
| oh, we have the card of formulas with us that's not a problem | |||
| calculus is a problem. I approach the woman today and ask "why do I have 3/10 points for this task?" ā "well, a calculus mistake over here, so the eventual solution is wrong" ā "so I don't get no points for the good method?" ā "You get, 3 points" | 13:28 | ||
| out of 6 tasks, I couldn't really solve one, the rest was not a problem. And still I get 31/60 points. Calculus mistakes, typos, mistakes with integrals... Sigh. | 13:29 | ||
| PerlJam | tadzik: make fewer mistakes :) | ||
| tadzik | I will have to, yes :) | 13:30 | |
| moritz | tadzik: I know that all too well. I usually had all the methods correct and all the results wrong | ||
| PerlJam | tadzik: do you usually take the whole time to work the problems? | ||
| tadzik | PerlJam: very rarely, but this time I did | 13:31 | |
| there were a few tasks I saw for the first time in my life, and I needed to figure out the way to solve them | |||
| otherwise I'll re-check everything, yes | 13:32 | ||
| I usually do | |||
| bah, whatever. 29th is the day then | |||
| your favourite Signal Theory, whiteknight, is on monday | |||
| whiteknight | tadzik: yeah, I loved that course. I took several like that. | 13:33 | |
| signals, communications, filters, random signals, adaptive filters, etc | 13:34 | ||
| tadzik | I don't really share the love, to say it gently. But >half of the exam is information theory, which I have no problems with | 13:35 | |
|
13:35
darbelo_ joined
13:37
darbelo left
|
|||
| whiteknight | that's fine, it's not for everybody | 13:40 | |
| The first thing I learned when I became a teaching assistant is that the other students didn't enjoy the subject as much as I did | 13:41 | ||
| PerlJam | drest: I bet they enjoyed it when it was over more than you did ;) | 13:42 | |
| er, s/drest/whiteknight/ | |||
| rohit_nsit08 | whiteknight: hello | 13:46 | |
| Coke | show of hands. who can see: 3.bp.blogspot.com/-O5-gNs4YwCk/TfsC.../varrj.png | 13:49 | |
| (i'm getting a DNS error. rohit_nsit08 is not.) | |||
| atrodo | shows an image for me | ||
| rohit_nsit08 | i'm able to see | ||
| i made it in google docs ;-) | 13:50 | ||
| moritz | fine here | ||
| bubaflub | fine here | ||
| moritz | Coke: should I mirror it somewhere you can see it? | ||
| Coke | moritz: eh. I'll check it out when I get home. | ||
| danke. | |||
| rohit_nsit08: remind me of this the next time I complain about broken images. ;) | |||
| tadzik | fine here | 13:51 | |
| arnsholt | rohit_nsit08: Small nitpick on your blog post: LR isn't Left-to-Right, but Left-to-right Rightmost derivation | ||
| rohit_nsit08 | Coke: sure ;) | ||
| whiteknight | good morning rohit_nsit08 | ||
| rohit_nsit08 | aarnsholt: thanks, I have mentioned that it produces rightmost derivation using leftmost reductions | 13:52 | |
| whiteknight | rohit_nsit08++ # Nice blog post | ||
| rohit_nsit08 | whiteknight: good morning | ||
| whiteknight: thanks. I'm working on toPIR functions associated with each of the nodes to get the PIR convertion | |||
| whiteknight: found cloud9 IDE a good tool for javascript development. I am able to debug code | 13:53 | ||
| arnsholt | rohit_nsit08: Ah, right. Just me failing reading again. Sorry =) | ||
|
13:53
woosley joined
|
|||
| rohit_nsit08 | arnsholt: thanks for reading. I am new to blogging so any feedback is valuable :-) please free to comment and correct if I made any mistake | 13:54 | |
|
13:55
woosley left
|
|||
| whiteknight | rohit_nsit08: oh good, I can't wait to see toPIR working! That's a very important part of the project | 13:56 | |
|
13:57
SHODAN left
|
|||
| rohit_nsit08 | whiteknight: yup , I am struggling on some topics related to PIR, just discussed few with Coke and hope to get the solutions asap. | 13:58 | |
| whiteknight | rohit_nsit08: okay. I can probably help answer questions too. Let me know what you need | 13:59 | |
| rohit_nsit08 | whiteknight: Coke suggesting me some opcodes for read ( related to namespace ). After getting clear idea of questions and my approach. I'll put them on developer list tomorrow | 14:01 | |
| suggested* | 14:03 | ||
| whiteknight | okay, awesome. Namespaces can be tricky | 14:07 | |
|
14:08
lucian joined
14:20
lucian left,
lucian joined
14:26
ambs joined
14:39
bluescreen joined
14:56
lucian_ joined
15:01
lucian left
15:16
dmalcolm joined
15:20
rohit_nsit08 left
|
|||
| dalek | p: 5e83168 | pmichaud++ | src/6model/reprs/P6opaque.c: Improve NYFI 1 error message with attribute name. |
15:29 | |
| whiteknight | NYFI? | 15:30 | |
| PerlJam | Not Yet Fully Implemented | 15:31 | |
| or ... you can choose another word for the F if you like ;) | |||
| cotto_work | ~~ | ||
| whiteknight | okay | 15:33 | |
|
15:43
alester joined
15:50
rohit_nsit08 joined
15:55
mj41 left
|
|||
| dukeleto | tcurtis: pong | 15:56 | |
| alester | blog.wikimedia.org/2011/06/13/serve...donations/ | 16:12 | |
| Do we need boxen? | |||
| whiteknight | I've got a boxen under my bed that I couldn't find a place to host | ||
| dukeleto | whiteknight: what kind of boxen? | 16:13 | |
| whiteknight | Dell Poweredge something or other | 16:14 | |
| I can't run it out of my apartment, because it's too loud | 16:15 | ||
|
16:22
theory joined
|
|||
| atrodo | whiteknight> I have a dell 1U in my basement. Difference is it's running (not quiet either) and I built a shelf just for it | 16:26 | |
| whiteknight | atrodo: I don't have a basement. I have an apartment the size of a volkswagon | 16:28 | |
| when my kid generates too much wind, we hear it. The server will not go unnoticed | 16:29 | ||
| atrodo | whiteknight> Then yes. When I was in the apartment when I first bought it, it was in a closet and was borderline too loud | ||
| alester | I'll host servers. I've already got one. | 16:34 | |
| Right now it's just running the odd build and splint. And folding@home. And a proxy server. | |||
|
17:00
hercynium joined
|
|||
| whiteknight | alester: where do you live? shipping on these hogs is non-trivial | 17:02 | |
| at least, not if you want to use it for more than modern art on arrival | |||
| alester | Chicago area. | ||
| whiteknight | I'll have to price out shipping for that. | 17:03 | |
|
17:04
particle1 left
17:05
particle joined
|
|||
| whiteknight | actually, we're in the process of buying a house right now, but I promised my wife I would throw the server away if I couldn't find a home for it by the time we moved out of the apt | 17:06 | |
| atrodo | whiteknight> 1U? Specs? | 17:08 | |
|
17:09
bubaflub left
|
|||
| whiteknight | I think it's 1U. I have to look at the specs again | 17:09 | |
| it was a hand-me-down | |||
| dukeleto has 4U's of servers collecting dust in his closet | 17:11 | ||
| and a 20U rack collecting rust outside | 17:19 | ||
| whiteknight | if dust were worth anything, you could sell the collection on ebay | ||
| dukeleto | whiteknight: can you tell me how one would go about adding coverage to the uncovered code in Parrot_ext_try ? tapir2.ro.vutbr.cz/cover/latest-c_c...end-c.html | 17:21 | |
| whiteknight: it that code even reachable? | |||
| whiteknight | oh wow, that's a doozie | 17:22 | |
| dukeleto | whiteknight: i have to cover Parrot_ext_try to hit 95% coverage in that file | ||
| whiteknight | it's reachable, but...damn | ||
| dukeleto | whiteknight: yeah, not simple. Do I have to install an exception handler and not pop it off? | 17:23 | |
| whiteknight: i see that i have to mess with the current context, but I don't fully understand the code. I stared at it for about an hour last night. | |||
| whiteknight | yeah, this is going to take some thought | 17:24 | |
| The "do_panic" part is probably not reachable | 17:25 | ||
| unless somebody craps on the curctx pretty hard | |||
| you may need to call a Sub, create an inner runloop (through a vtable override on Object, etc) and throw an unhandled exception from there | 17:26 | ||
| We added those checks because of the IMCC refactor work, so I know it's necessary | |||
| I just cant remember the specific steps that caused us to trigger that | |||
| that's a great example of code that needs tests, precisely because of how complicated it is | 17:27 | ||
| dukeleto | whiteknight: joy | 17:37 | |
|
17:39
dodathome joined
|
|||
| dukeleto | whiteknight: well now at least I have an idea of what needs to happen, thanks | 17:39 | |
| whiteknight | It's entirely possible one of those two zones is not reachable. I suspect they both are, but you might have to get pretty malicious to do it | 17:40 | |
| I *know* we added that code for the IMCC refactor work, so a test involving IMCCompiler PMC might not be a bad place to start | |||
| IMCCompiler pushes a context on the stack, to hold space for temporary registers. If IMCC throws a parse exception, it might not clean that up. | 17:41 | ||
| ]I suspect we've addressed those problems, but maybe I am misremembering | |||
| if you're willing to get real down-n-durty, you can manually construct a faulty case | |||
| Parrot_push_context, then throw an exception, etc | 17:42 | ||
| dukeleto | whiteknight: i think i have triggered this thing from PL/Parrot | ||
| whiteknight: but it was from an IMCC misparse | |||
| whiteknight: this looks shiny: github.com/tolmasky/language | 17:44 | ||
| msg rohit_nsit08 you may want to take a look at github.com/tolmasky/language | 17:45 | ||
| aloha | OK. I'll deliver the message. | ||
| whiteknight | who would have thought that something so simple as "add exception try/catch to C" would involve such complicated code | 17:52 | |
| I mean, C++ does it, and that isn't complicated at all | 17:53 | ||
| :) | |||
| atrodo | whiteknight> Where's your closing sarcasm tag? | ||
| whiteknight | atrodo: burned by the heat of my burning wit | 17:54 | |
|
17:54
cosimo left
|
|||
| atrodo | whiteknight++ | 17:54 | |
|
18:12
bubaflub joined
|
|||
| lucian_ | whiteknight: i may have said this before, but cyclone's exceptions are rather simple | 18:16 | |
| dukeleto | bubaflub: wazzup | 18:17 | |
| bubaflub | hey dukeleto - not much, how are you? | ||
| dukeleto | bubaflub: goodly | 18:18 | |
| bubaflub | dukeleto: great. my tests are coming along quite nicely - i've almost finished all the division tests | ||
| dukeleto: there three major kinds of divisions, round ceiling, round floor, and truncate | 18:19 | ||
| dukeleto: and then all the permutations for quotient, remainder, both; use an GMP integer or unsigned int, so on and so forth | |||
|
18:21
rohit_nsit08 left
|
|||
| dukeleto | bubaflub: mmmm, tests | 18:22 | |
| whiteknight | bubaflub: that almost sounds like something you could put into table form | 18:23 | |
| and then have a loop that runs over each row, divide A by B using method C, expect result D | 18:24 | ||
| actually, I had wanted to add a similar mechanism to Rosella.Test to do parameterized tests like that | 18:25 | ||
|
18:29
rurban_ joined
18:32
rurban left,
rurban_ is now known as rurban
|
|||
| bubaflub | whiteknight: i've seen that done with Cucumber | 18:33 | |
| that is, parameterized testing | |||
| it can be very very nice | |||
| and yes, there is an awful lot of the code that could be refactored and simplified | |||
| create an Integer, set it to this, pass it to this function, get the result, check the result... | |||
| whiteknight | I'll play around with that tonight | 18:34 | |
| I've got a good idea for it in my head. Problem is making it work well and be pluggable | 18:35 | ||
| bubaflub | whiteknight: i'm also thinking of maybe adding a script to my project to generate winxed test files like that | 18:36 | |
| whiteknight | ok | 18:37 | |
| It will probably be something like Rosella.Test.test_data(<array>, <function>, <optional named args>) | 18:38 | ||
| will execute <function> as a test on each item in <array> | |||
| or, I guess <array> could also be a <hash> for "test name" => "test data" | |||
| that works fine for me | 18:39 | ||
|
18:43
lucian joined
|
|||
| whiteknight | bubaflub: How does something like this look for you? gist.github.com/1032022 | 18:46 | |
|
18:47
lucian_ left
|
|||
| bubaflub | whiteknight: ooooh, shiny | 18:47 | |
| whiteknight: that's kinda what i was thinking, except way better | 18:48 | ||
| whiteknight: i also have a random Winxed question - what exactly does the "using" statement do? and when do i need / not need it? | |||
| whiteknight | I think we're going to run into a hell of a lot of problems getting the function to be treated as a method, when it isn't declared as a method | ||
| bubaflub: that's a great question. I don't know everything it does | 18:49 | ||
| basically, it does a namespace lookup, and stores a value in a named variable | |||
| so "using Rosella.Test.test_vector" would look up the "test_vector" function in namespace ["Rosella"; "Test"], and store it in a local variable named "test_vector" | |||
| the "using static" sequence used to create a static reference to a named function in the same file. I don't think it does that anymore | 18:50 | ||
| "using extern" will do a library load, though I've never played with that so I don't know the details | |||
| bubaflub | whiteknight: ok, that makes sense. | 18:51 | |
| whiteknight | and I think "using namespace" makes the contents of another namespace visible to the compiler, so you can use functions from that namespace in your code without a million little "using" statement for each function you want | ||
| but I think that only works at compile time | |||
| bubaflub | whiteknight: ok, that makes a lot of sense. | ||
| whiteknight | NotFound tends to put lots of namespaces and classes in a single file, so he uses those kinds of tools himself. I tend to write each class and namespace in a separate file, so I lose out on some fancy compile-time magic | 18:52 | |
|
18:58
mj41 joined
|
|||
| bubaflub | whiteknight: yeah, my NCI bindings are in a PIR file under GMP::Raw | 18:59 | |
| the winxed class GMP::Integer uses those, and then has functions that wrap those with sugar | |||
| like automatic conversion of C-strings <-> Parrot strings, type checking, constructor and destructor | 19:00 | ||
| and eventually some vtable overrides | |||
| whiteknight | I think there is a syntax for putting in forward-declarations, so you can use "using namespace", but I haven't played with that at all either | 19:01 | |
|
19:07
bluescreen left,
bluescreen joined
|
|||
| bubaflub | whiteknight: ok. since my Winxed code is generated, i've just got a bunch of 'using ...' statements | 19:09 | |
|
19:11
mj41 left
19:13
mj41 joined
19:14
hercynium left
19:37
contingencyplan joined
19:38
dmalcolm_ joined
19:42
dmalcolm__ joined
19:43
dmalcolm left
19:46
dmalcolm_ left
20:10
mj41 left
20:14
jevin left
20:27
perlite_ joined
20:30
whiteknight left
20:31
perlite left,
perlite_ is now known as perlite
20:49
dodathome left
21:33
fperrad left
21:42
PurityControl joined
21:46
Patterner left,
PurityControl is now known as Patterner
21:47
ambs left
|
|||
| dalek | rrot-gmp: 29123cb | bubaflub++ | t/integer/div/ (3 files): add coverage for the 27 division functions mpz_cdiv*, mpz_fdiv*, mpz_tdiv*: mpz_cdiv_q, mpz_cdiv_r, mpz_cdiv_qr, mpz_cdiv_q_ui, mpz_cdiv_r_ui, mpz_cdiv_qr_ui, mpz_cdiv_ui, mpz_cdiv_q_2exp, mpz_cdiv_r_2exp, mpz_fdiv_q, mpz_fdiv_r, mpz_fdiv_qr, mpz_fdiv_q_ui, mpz_fdiv_r_ui, mpz_fdiv_qr_ui, mpz_fdiv_ui, mpz_fdiv_q_2exp, mpz_fdiv_r_2exp, mpz_tdiv_q, mpz_tdiv_r, mpz_tdiv_qr, mpz_tdiv_q_ui, mpz_tdiv_r_ui, mpz_tdiv_qr_ui, mpz_tdiv_ui, mpz_tdiv_q_2exp, mpz_tdiv_r_2exp |
22:03 | |
|
22:11
bluescreen left
22:15
soh_cah_toa joined
|
|||
| soh_cah_toa | ~~ | 22:15 | |
| bubaflub | evening soh_cah_toa | 22:16 | |
| soh_cah_toa | bubaflub: hey | ||
| bubaflub | how goes the debugger? | 22:17 | |
| dukeleto | bubaflub: nice tests | ||
| bubaflub | dukeleto: thanks | ||
| soh_cah_toa | bubaflub: i'm on the verge of a breakthrough. i'm very close to command recognition. working on parsing input | 22:18 | |
| bubaflub | soh_cah_toa: that's excellent. | ||
| soh_cah_toa | yup | ||
| then i have to look at some test examples for ideas. i need to test that feature but i can't figure how to fake input since it's an interactive program | 22:19 | ||
| bubaflub | soh_cah_toa: one way to do it is if you have a separate function that parses the input, test only that | ||
| soh_cah_toa | bubaflub: yeah, i thought of that but it's a static function | 22:20 | |
| bubaflub | soh_cah_toa: let's say you've got a function like (psuedocode): string parse_input(string input); | ||
| soh_cah_toa: is there source i can look at? i may be able to help | 22:21 | ||
| soh_cah_toa | sure, let me look quick. i think i have to push | ||
| dalek | rrot/soh-cah-toa/hbdb: 0b4c473 | soh_cah_toa++ | src/hbdb.c: Beginnings of parse_command(). Not yet complete |
22:23 | |
| cotto_work | soh_cah_toa: you should be able to fake input and output to the debugger by messing with stdin, stdout and stderr from the Perl testing code. | ||
| write a function to start the debugger with a given set of arguments and another to run a single command and check that it returns the right output | 22:24 | ||
| soh_cah_toa | bubaflub: github.com/parrot/parrot/blob/0b4c...src/hbdb.c it's the parse_command() function around line 410 (it's not finished yet) | 22:25 | |
| soh_cah_toa thinks about this | |||
| cotto_work | testing the output of a static function won't be fun | ||
| soh_cah_toa | wonderful | ||
| bubaflub | soh_cah_toa: here's what i'd do - i'd break out the parsing of the input from the commands into a separate function | 22:27 | |
| cotto_work | I highly recommend an alternate approach. | ||
| soh_cah_toa | the thing that i'm struggling to figure out is how do i actually "reach" that function? how can i call a static function in a c source file from a completely unrelated perl script? | ||
| cotto_work: approach to what? | |||
| bubaflub | soh_cah_toa: the perl script can compile a simple C program that #include's your file | ||
| cotto_work | testing C functions directly as opposed to testing them by having the test suite running the debugger | 22:28 | |
| bubaflub | soh_cah_toa: it ain't pretty but it's possible | ||
| soh_cah_toa | hmm...ok | ||
| so i could pass a command on the command-line. like w/ `` or system() | 22:29 | ||
| but my program doesn't do that | |||
|
22:29
alester left
|
|||
| soh_cah_toa | wouldn't it make sense to test the program exactly how it would be used by the user rather than defining some special condition in my program for testing? b/c then it's testing a different behavior | 22:30 | |
| cotto_work | soh_cah_toa: that's exactly what I'm recommending | 22:31 | |
| soh_cah_toa | alright | ||
| but then there's still the matter of automating a pretend interactive session | 22:32 | ||
| hmm...i wonder if i could do it w/ pipes like | | 22:33 | ||
| cotto_work | You'd have to keep the handles around, but I think it'd be doable. | ||
| soh_cah_toa | for instance: open FOO, "echo 'command' | hbdb" | 22:34 | |
| yeah, i don't see why that wouldn't work | |||
| cotto_work | make sure to write up a minimal proof of concept so you understand what you need to do | 22:35 | |
| soh_cah_toa | i'm not sure i follow :/ | 22:36 | |
| cotto_work | search.cpan.org/~jesse/perl-5.14.1/...C/Open3.pm looks like what you'd want | 22:37 | |
|
22:37
preflex left
|
|||
| soh_cah_toa | it looks like that may help. however, then i'm adding another dependency | 22:39 | |
| cotto_work | dukeleto may be able to suggest a better alternative | ||
|
22:41
preflex joined
|
|||
| dukeleto | cotto_work: better alternative for what? | 22:42 | |
| cotto_work | dukeleto: is IPC::Open3 the best option for testing a debugger by writing to stdin and reading from stdout and stderr on the same process? | 22:44 | |
| sorear | I recomment IO::Pty::HalfDuplex personally | 22:45 | |
| soh_cah_toa | i think i'm headed in the right direction. however, when i execute "echo 'foobar' | ./hbdb hello.pbc", i get "ERROR: Null PMC access in get_string()" | 22:46 | |
| sorear | soh_cah_toa: readline probably returns NULLPMC for EOF | ||
| soh_cah_toa | oh, i see | 22:47 | |
| i guess that method won't work then. IPC::Open3 does seem like it's what i'm looking for but i'm still worried about dependencies | 22:48 | ||
| sorear | no, you need to fix hbdb | ||
| user pressing ^D at the prompt shouldn't cause a crash!! | 22:49 | ||
|
22:49
darbelo_ left
|
|||
| soh_cah_toa | i didn't though | 22:49 | |
| sorear | echo ' | ||
| echo 'foobar' is exactly the same as typing foobar, enter, control-D | 22:50 | ||
| soh_cah_toa | oh, ok | ||
| cotto_work | dukeleto: is IPC::Open3 in core? | ||
| sorear | has been since 5.0 | ||
| IO::Pty::HalfDuplex isn't in core yet though :( | 22:51 | ||
| soh_cah_toa | well that's great. except now i need to figure out why ^D causes it to crash ;) | 22:52 | |
|
22:52
darbelo joined
|
|||
| sorear | check your input loop | 22:52 | |
| are you doing "isnull" after readline? | 22:53 | ||
| soh_cah_toa | no | ||
| sorear | oh | 22:54 | |
| readline returns '' if EOF | |||
| but also sets eof | |||
| well, check the backtrace | |||
|
22:56
dmalcolm__ left
|
|||
| soh_cah_toa | so if i have "Parrot_pcc_invoke_method_from_c_args(interp, stdinput, readline, "S->S", prompt, &input)" i need to check "input" for null? | 22:57 | |
| sorear | only if you think the method might return null! | 22:58 | |
| soh_cah_toa | you said it did | 22:59 | |
| sorear | no | 23:01 | |
| 15:54 <@sorear> readline returns '' if EOF | |||
| soh_cah_toa | aren't empty strings equal to null? | 23:02 | |
| sorear | not at all | ||
| soh_cah_toa | wait, so then what does isnull have to do w/ it then? by which i thought you meant PMC_IS_NULL | 23:04 | |
| dukeleto | github.com/tanoku/spym : MIPS R2000 Virtual Machine written entirely in Python | 23:11 | |
|
23:23
mtk left
|
|||
| cotto_work | dukeleto: interesting | 23:25 | |
| TiMBuS | now to port python to mips r2000 | 23:36 | |
|
23:42
lucian_ joined
23:44
darbelo left,
lucian left
23:49
whiteknight joined
|
|||
| whiteknight | good evening, #parrot | 23:53 | |
| cotto_work goes home | |||
|
23:54
Kulag left
|
|||
| soh_cah_toa | whiteknight: hey | 23:54 | |
|
23:55
Kulag joined
|
|||
| whiteknight | hello soh_cah_toa | 23:57 | |
|
23:58
Kulag left,
Drossel joined
|
|||
| soh_cah_toa | whiteknight: your mouse still acting up? ;) | 23:59 | |