librelist archives

« back to archive

Mac OS X Framework

Mac OS X Framework

From:
Michael
Date:
2010-09-25 @ 19:31
Hi,
I spend the last few days porting Rice to a mac Framework and adding some 
functionality:
• I redirected some #includes to the Ruby Framework.
• The "Only one VM" test does not work for the Framework (ruby 1.8), I 
disabled the test for __APPLE__
• Added an ExtensibleArray (witch mainly adds an extend() function that 
returns the Array itself).
• Added a class wrapping ruby Lambdas
• Added some code to call ruby code with "ruby($code_as_string)"
• Added tests for the extensions
• The tests for Lambdas and rubyCalls need an own VM, passing "-c" makes 
the testprogramm start an independent  test.

Currently, the build-process includes running the whole 
pre-build-configuration to generate some code. How can I call the 
generator directly?
The source is stored at 
http://www.mediafire.com/file/n1lnc1fjs8dnwna/rice_mosx_framework.zip .

mapc

Re: [rice] Mac OS X Framework

From:
Jason Roelofs
Date:
2010-09-27 @ 12:39
On Sep 25, 2010, at 3:31 PM, Michael wrote:

> Hi,
> I spend the last few days porting Rice to a mac Framework and adding 
some functionality:
> • I redirected some #includes to the Ruby Framework.
> • The "Only one VM" test does not work for the Framework (ruby 1.8), I 
disabled the test for __APPLE__
> • Added an ExtensibleArray (witch mainly adds an extend() function that 
returns the Array itself).
> • Added a class wrapping ruby Lambdas
> • Added some code to call ruby code with "ruby($code_as_string)"
> • Added tests for the extensions
> • The tests for Lambdas and rubyCalls need an own VM, passing "-c" makes
the testprogramm start an independent  test.
> 
> Currently, the build-process includes running the whole 
pre-build-configuration to generate some code. How can I call the 
generator directly?
> The source is stored at 
http://www.mediafire.com/file/n1lnc1fjs8dnwna/rice_mosx_framework.zip .
> 
> mapc

I'd be happy to check this out, but the download link doesn't work for me.
Could you use a better file host, like dropbox? (use this link: 
http://www.dropbox.com/referrals/NTQ3MjIyNTc5 to set up your own account, 
it's free!)

As for the generator, make sure you're in the rice/rice directory and just
call it (ruby generate_code.rb) You'll need the mustache gem installed.

Jason

Re: [rice] Mac OS X Framework

From:
Michael
Date:
2010-09-30 @ 21:16
> As for the generator, make sure you're in the rice/rice directory and 
just call it (ruby generate_code.rb) You'll need the mustache gem 
installed.

There i no file named generate_code.rb. Neither in my source nor in the master.
mapc

Re: [rice] Mac OS X Framework

From:
Jason Roelofs
Date:
2010-09-30 @ 23:25
On Thu, Sep 30, 2010 at 5:16 PM, Michael <michi.varner@musikvarner.de>wrote:

> > As for the generator, make sure you're in the rice/rice directory and
> just call it (ruby generate_code.rb) You'll need the mustache gem installed.
>
> There i no file named generate_code.rb. Neither in my source nor in the
> master.
> mapc
>

Yes, I sent my reply before I realized that your code was built on an older
version of Rice.

I'd appreciate it if you could grab the latest source at
http://github.com/jameskilton/rice and get your changes working there.
Otherwise when I find time I'll take a look at that myself.

Jason

Re: [rice] Mac OS X Framework

From:
Michael
Date:
2010-10-01 @ 23:38
Am 01.10.2010 um 01:25 schrieb Jason Roelofs:

> On Thu, Sep 30, 2010 at 5:16 PM, Michael <michi.varner@musikvarner.de>wrote:
> 
>>> As for the generator, make sure you're in the rice/rice directory and
>> just call it (ruby generate_code.rb) You'll need the mustache gem installed.
>> 
>> There i no file named generate_code.rb. Neither in my source nor in the
>> master.
>> mapc
>> 
> 
> Yes, I sent my reply before I realized that your code was built on an older
> version of Rice.
> 
> I'd appreciate it if you could grab the latest source at
> http://github.com/jameskilton/rice and get your changes working there.
> Otherwise when I find time I'll take a look at that myself.
> 
> Jason

Of course i will make it running with the actual master. But there is no 
file named "generate_code.rb" in the master. (I grabbed the latest master 
and searched for "generate_code.rb", but found nothing).
So witch file is the file-generator in the master?

I added some files at "ruby/rice extension" and "rice/test extension". I 
did not change the native build configuration, so these files will not be 
included to the build process. Maybe this is causing some trouble.

mapc

Re: [rice] Mac OS X Framework

From:
Jason Roelofs
Date:
2010-10-01 @ 23:56
On Fri, Oct 1, 2010 at 7:38 PM, Michael <michi.varner@musikvarner.de> wrote:

>
> Am 01.10.2010 um 01:25 schrieb Jason Roelofs:
>
> > On Thu, Sep 30, 2010 at 5:16 PM, Michael <michi.varner@musikvarner.de
> >wrote:
> >
> >>> As for the generator, make sure you're in the rice/rice directory and
> >> just call it (ruby generate_code.rb) You'll need the mustache gem
> installed.
> >>
> >> There i no file named generate_code.rb. Neither in my source nor in the
> >> master.
> >> mapc
> >>
> >
> > Yes, I sent my reply before I realized that your code was built on an
> older
> > version of Rice.
> >
> > I'd appreciate it if you could grab the latest source at
> > http://github.com/jameskilton/rice and get your changes working there.
> > Otherwise when I find time I'll take a look at that myself.
> >
> > Jason
>
> Of course i will make it running with the actual master. But there is no
> file named "generate_code.rb" in the master. (I grabbed the latest master
> and searched for "generate_code.rb", but found nothing).
> So witch file is the file-generator in the master?
>
> I added some files at "ruby/rice extension" and "rice/test extension". I
> did not change the native build configuration, so these files will not be
> included to the build process. Maybe this is causing some trouble.
>
> mapc
>

Geez, I can't even keep my own code straight ...

It's rice/code_gen/gen.rb and the other files in code_gen define how to
generate code. You'll find the templates used in code generation in file
named *.mustache

Sorry about that.

Jason

Re: [rice] Mac OS X Framework

From:
Michael
Date:
2010-09-27 @ 13:41
Am 27.09.2010 um 14:39 schrieb Jason Roelofs:

> On Sep 25, 2010, at 3:31 PM, Michael wrote:
> 
>> Hi,
>> I spend the last few days porting Rice to a mac Framework and adding 
some functionality:
>> • I redirected some #includes to the Ruby Framework.
>> • The "Only one VM" test does not work for the Framework (ruby 1.8), I 
disabled the test for __APPLE__
>> • Added an ExtensibleArray (witch mainly adds an extend() function that
returns the Array itself).
>> • Added a class wrapping ruby Lambdas
>> • Added some code to call ruby code with "ruby($code_as_string)"
>> • Added tests for the extensions
>> • The tests for Lambdas and rubyCalls need an own VM, passing "-c" 
makes the testprogramm start an independent  test.
>> 
>> Currently, the build-process includes running the whole 
pre-build-configuration to generate some code. How can I call the 
generator directly?
>> The source is stored at 
http://www.mediafire.com/file/n1lnc1fjs8dnwna/rice_mosx_framework.zip .
>> 
>> mapc
> 
> I'd be happy to check this out, but the download link doesn't work for 
me. Could you use a better file host, like dropbox? (use this link: 
http://www.dropbox.com/referrals/NTQ3MjIyNTc5 to set up your own account, 
it's free!)
> 
> As for the generator, make sure you're in the rice/rice directory and 
just call it (ruby generate_code.rb) You'll need the mustache gem 
installed.
> 
> Jason

Hmm, OK.
I uploadet it to the brezn…
https://brezn.muc.ccc.de/~mappleconfusers/rice_mosx_framework.zip

mapc

Re: [rice] Mac OS X Framework

From:
Jason Roelofs
Date:
2010-09-27 @ 13:47
On Sep 27, 2010, at 9:41 AM, Michael wrote:

> Am 27.09.2010 um 14:39 schrieb Jason Roelofs:
> 
>> On Sep 25, 2010, at 3:31 PM, Michael wrote:
>> 
>>> Hi,
>>> I spend the last few days porting Rice to a mac Framework and adding 
some functionality:
>>> • I redirected some #includes to the Ruby Framework.
>>> • The "Only one VM" test does not work for the Framework (ruby 1.8), I
disabled the test for __APPLE__
>>> • Added an ExtensibleArray (witch mainly adds an extend() function 
that returns the Array itself).
>>> • Added a class wrapping ruby Lambdas
>>> • Added some code to call ruby code with "ruby($code_as_string)"
>>> • Added tests for the extensions
>>> • The tests for Lambdas and rubyCalls need an own VM, passing "-c" 
makes the testprogramm start an independent  test.
>>> 
>>> Currently, the build-process includes running the whole 
pre-build-configuration to generate some code. How can I call the 
generator directly?
>>> The source is stored at 
http://www.mediafire.com/file/n1lnc1fjs8dnwna/rice_mosx_framework.zip .
>>> 
>>> mapc
>> 
>> I'd be happy to check this out, but the download link doesn't work for 
me. Could you use a better file host, like dropbox? (use this link: 
http://www.dropbox.com/referrals/NTQ3MjIyNTc5 to set up your own account, 
it's free!)
>> 
>> As for the generator, make sure you're in the rice/rice directory and 
just call it (ruby generate_code.rb) You'll need the mustache gem 
installed.
>> 
>> Jason
> 
> Hmm, OK.
> I uploadet it to the brezn…
> https://brezn.muc.ccc.de/~mappleconfusers/rice_mosx_framework.zip
> 
> mapc

Ok, that worked. Looks like you are using some old Rice code though 
(rubypp.rb is the generator in your case, that hasn't been the case for a 
few months). When I get a chance I'll see if it merges cleanly with the 
current master (github.com/jameskilton/rice), and I'll check out what 
you've done.

Jason

Re: [rice] Mac OS X Framework

From:
Michael
Date:
2010-09-27 @ 13:51
Am 27.09.2010 um 15:47 schrieb Jason Roelofs:

> On Sep 27, 2010, at 9:41 AM, Michael wrote:
> 
>> Am 27.09.2010 um 14:39 schrieb Jason Roelofs:
>> 
>>> On Sep 25, 2010, at 3:31 PM, Michael wrote:
>>> 
>>>> Hi,
>>>> I spend the last few days porting Rice to a mac Framework and adding 
some functionality:
>>>> • I redirected some #includes to the Ruby Framework.
>>>> • The "Only one VM" test does not work for the Framework (ruby 1.8), 
I disabled the test for __APPLE__
>>>> • Added an ExtensibleArray (witch mainly adds an extend() function 
that returns the Array itself).
>>>> • Added a class wrapping ruby Lambdas
>>>> • Added some code to call ruby code with "ruby($code_as_string)"
>>>> • Added tests for the extensions
>>>> • The tests for Lambdas and rubyCalls need an own VM, passing "-c" 
makes the testprogramm start an independent  test.
>>>> 
>>>> Currently, the build-process includes running the whole 
pre-build-configuration to generate some code. How can I call the 
generator directly?
>>>> The source is stored at 
http://www.mediafire.com/file/n1lnc1fjs8dnwna/rice_mosx_framework.zip .
>>>> 
>>>> mapc
>>> 
>>> I'd be happy to check this out, but the download link doesn't work for
me. Could you use a better file host, like dropbox? (use this link: 
http://www.dropbox.com/referrals/NTQ3MjIyNTc5 to set up your own account, 
it's free!)
>>> 
>>> As for the generator, make sure you're in the rice/rice directory and 
just call it (ruby generate_code.rb) You'll need the mustache gem 
installed.
>>> 
>>> Jason
>> 
>> Hmm, OK.
>> I uploadet it to the brezn…
>> https://brezn.muc.ccc.de/~mappleconfusers/rice_mosx_framework.zip
>> 
>> mapc
> 
> Ok, that worked. Looks like you are using some old Rice code though 
(rubypp.rb is the generator in your case, that hasn't been the case for a 
few months). When I get a chance I'll see if it merges cleanly with the 
current master (github.com/jameskilton/rice), and I'll check out what 
you've done.
> 
> Jason


I'm not programming in C++ for a long time, so I would be glad if you 
would look over my code and give me some feedback.
Thanks a lot :)

Mac OS X Framework

From:
Michael
Date:
2010-10-29 @ 16:14
Yeah, about 100 000 errors fixed, my personal record ^^

http://dl.dropbox.com/u/13371134/RIce/Rice_29.10.2010.zip

This should run with any computer using  Mac OS X 10.4.* or higher with 
PPC, i386, x86_64, but have the newest 10.6 with x86_64 and i386 so I 
can't test it.
If you add any file or remove one, the xCOde file has to be updated, so 
please write a mail to me, I'll do it :-).

Cheers,
	mapc

Re: [rice] Mac OS X Framework

From:
Michael
Date:
2010-12-21 @ 01:28
Ping?
Greeings,
	mapc
Am 29.10.2010 um 18:14 schrieb Michael:

> Yeah, about 100 000 errors fixed, my personal record ^^
> 
> http://dl.dropbox.com/u/13371134/RIce/Rice_29.10.2010.zip
> 
> This should run with any computer using  Mac OS X 10.4.* or higher with 
PPC, i386, x86_64, but have the newest 10.6 with x86_64 and i386 so I 
can't test it.
> If you add any file or remove one, the xCOde file has to be updated, so 
please write a mail to me, I'll do it :-).
> 
> Cheers,
> 	mapc
> 

Re: [rice] Mac OS X Framework

From:
Jason Roelofs
Date:
2010-12-21 @ 04:06
I'm sorry. Between work, family, the holidays, and a little bit of WoW I
haven't prioritized Rice work very highly as of late. Got a few days off
coming up, I'll make a note to get this stuff looked at and taken care of.

Jason

On Mon, Dec 20, 2010 at 8:28 PM, Michael <michi.varner@musikvarner.de>wrote:

> Ping?
> Greeings,
>        mapc
> Am 29.10.2010 um 18:14 schrieb Michael:
>
> > Yeah, about 100 000 errors fixed, my personal record ^^
> >
> > http://dl.dropbox.com/u/13371134/RIce/Rice_29.10.2010.zip
> >
> > This should run with any computer using  Mac OS X 10.4.* or higher with
> PPC, i386, x86_64, but have the newest 10.6 with x86_64 and i386 so I can't
> test it.
> > If you add any file or remove one, the xCOde file has to be updated, so
> please write a mail to me, I'll do it :-).
> >
> > Cheers,
> >       mapc
> >
>
>

Re: [rice] Mac OS X Framework

From:
Jason Roelofs
Date:
2010-12-27 @ 13:23
On Dec 20, 2010, at 8:28 PM, Michael wrote:

> Ping?
> Greeings,
> 	mapc
> Am 29.10.2010 um 18:14 schrieb Michael:
> 
>> Yeah, about 100 000 errors fixed, my personal record ^^
>> 
>> http://dl.dropbox.com/u/13371134/RIce/Rice_29.10.2010.zip
>> 
>> This should run with any computer using  Mac OS X 10.4.* or higher with
PPC, i386, x86_64, but have the newest 10.6 with x86_64 and i386 so I 
can't test it.
>> If you add any file or remove one, the xCOde file has to be updated, so
please write a mail to me, I'll do it :-).
>> 
>> Cheers,
>> 	mapc
>> 
> 

Michael,

Had a chance to really dive into what you've got and I've got a few 
questions and issues:

First, can't compile with XCode, you have a hard-coded path to your 
development directory. Now I'm not terribly familiar with XCode so maybe 
this is something I'm doing wrong. Steps on properly compiling the 
framework would be helpful.

I don't quite understand the reason for ExtensibleArray or AnyCallRuby. 
Rice already has Object::instance_eval and Object::call that should do 
everything you need to do. 

I could see a case for a Lambda/Proc construct in Rice given the right 
circumstance where the normal define_method methods wouldn't suffice to 
map C++ methods and functions to Ruby and vis-versa, but I can't think of 
any specific reasons Rice would need this right now.

Jason