Perl 6 - the future is here, just unevenly distributed

IRC log for #inline, 2015-03-13

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

All times shown according to UTC.

Time Nick Message
12:43 Mithaldu how would i compile this with Inline::C? https://gist.github.com/wchristian/c871df0c607b0b85a98b
15:53 mohawk Mithaldu, easiest is put it under __DATA__ and do "use Inline C => 'DATA';"
15:53 Mithaldu that's not the issue
15:53 mohawk or, if you'd like it done immediately as if it's a perl sub decl
15:53 mohawk ok, what's the issue?
15:53 Mithaldu the issue is that with Module::Inline it doesn't get converted to xs at all
15:53 mohawk do you mean Inline::Module?
15:53 Mithaldu yes
15:54 mohawk could you gist your simple I::C version first, with a demo bit of code calling it?
15:54 mohawk let's make sure I::C correctly deals with it
15:54 Mithaldu i didn't make one, too busy to play whackamole
15:55 Mithaldu i assume right now that simply going int *foo and handing it an array handle is not correct
15:58 mohawk Mithaldu, that's the idiomatic C way
15:59 mohawk let me look in the I::C cookbook to see if it's the idiomatic I::C way
16:02 Mithaldu didn't think of that
16:02 mohawk looks like there's nothing in there
16:02 Mithaldu looking at the cookbook there's documentation for something similar, but still very different
16:02 Mithaldu and nothing for array references
16:02 mohawk this is a classic C <-> Perl problem
16:02 mohawk perl arrays inherently know how big they are
16:02 Mithaldu and i'm not sure i can simply throw two arrays at it
16:02 mohawk C arrays inherently don't
16:03 mohawk let's consider the typemap
16:03 mohawk i fear you would need a C struct that has a count and an int *
16:03 mohawk in order to fit into the perl idiom
16:03 mohawk what do you think?
16:04 Mithaldu dude this is all black magic to me
16:04 Mithaldu if you have better things to do, don't let me keep you, i replaced the whole thing with one single perl multiplication a while ago
16:05 Mithaldu but if someone actually knows how to make the code above workable so i can call it from perl, that'd be nice to know for the future
16:06 mohawk OR you can just use an opaque pointer type
16:06 mohawk i found a doc bug in I::C, just fixing
16:07 mohawk ingy, current https://metacpan.org/pod/Inline::C#VERSION shows `. ";` on end of line, that looks wrong
16:07 mohawk i don't know how to fix it in ZD
16:07 mohawk Mithaldu, it's an important question
16:09 GitHub16 [inline-c-pm] mohawk2 pushed 1 new commit to master: http://git.io/pH9i
16:09 GitHub16 inline-c-pm/master f53a7b3 Ed J: Fix SWIM incorrect wiki-link to Cookbook
16:09 mohawk ingy, you may want to release a new I::C if you like the above change
16:09 Mithaldu maybe, i'm just saying that i don't have the tuits to investigate it and don't actually need it investigated personally anymore
16:09 mohawk Mithaldu, thanks for raising it anyway
16:21 mohawk current repo master is failing prove -j4 -l test on 25 and 27
16:21 mohawk 25 is passing run standalone so that needs fixing
16:22 mohawk 27 is still failing on its own
20:09 ingy mohawk: I'll add it to my sinking list :[
22:53 mohawk ingy, ha ha, ok
22:53 mohawk ingy, want me to release I::C 0.75 with that change?
23:10 ingy mohawk: diff url?
23:11 ingy sorry just busy :[
23:11 mohawk see channel above
23:11 ingy ta
23:11 mohawk https://github.com/ingydotnet/inline-c-pm/commit/f53a7b3d1396c9f131064c5f6aaafffa0e2455b4
23:11 ingy please release. thank you!
23:11 mohawk welcome
23:12 ingy I still owe you a zd fix from 3+ weeks ago
23:12 * ingy cries
23:13 mohawk ingy, do you have any quick thoughts on how to handle an int * as an array param?
23:13 mohawk is it just T_OPAQUEPTR?
23:13 mohawk (in inline::c)
23:18 mohawk jesus h corbett, updating ZD off cpan is taking a long time
23:21 ingy cpanm -n (ftw)
23:21 ingy still takes 15 mins from scratch
23:21 ingy but -n is your fiend
23:27 mohawk unfortunately test/27 is failing so i'll need to fix that
23:51 mohawk ingy, i've found a parallel-build problem in Inline::MakeMaker
23:51 mohawk are you happy to let me fix and release that too?
23:51 mohawk (it's what was causing the 27 fails above)
23:55 ingy mohawk: just push and ping
23:55 mohawk ok
23:55 ingy I'll review and wave
23:56 mohawk ha, ok
23:56 mohawk i'll add a Changes section in same commit
23:56 ingy sweet

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