[MacRuby-devel] trunk status update

2009-09-16 Thread Laurent Sansonetti
Another status update about the development of MacRuby. The last  
update was about a month ago, I'm sorry about that. A lot of things  
happened since, but this status only covers visible points. The  
upcoming status updates will be more detailed :)


- A lot of StringIO work was done.
- Added a new optimized Array class that is used for default  
allocations. The array is a subclass of NSMutableArray but is faster  
in our benchmarks and is able to efficiently deal with primitive types.
- Added an NSDocument-based Xcode project template, offered by James  
Granby.

- Marshal is mostly implemented.
- Added support for several missing Ruby method features (such as  
method visibility and scope).
- Added support for the following extensions: etc, fcntl, socket,  
zlib. Fixed a lot of bugs in YAML.

- Fixed a lot of bugs in instance_eval & friends.
- Improved the AOT compiler: added support for missing literals and  
compilation of shared loadable objects. The compiler is able to  
compile irb.
- Added an API that covers the GCD (Grand Central Dispatch) feature of  
Snow Leopard. The API is mostly stable modulo a few crashers.  
Documentation is available in the gcd.c source file as RDoc comments.  
Specs are being written.

- RubySpec was updated from upstream.
- Started the migration to LLVM 2.6. The work is in a branch called  
llvm26 and should work modulo a few well known problems. It will be  
merged soon.
- Re-implemented the IO layer to not use CFStreams anymore. These were  
slow, too complex to use and we had to work around too many problems.
- Added partial support for RubyGems. This is a work in progress, but  
macgem should be able to install gems.
- A lot of less-visible bug fixes and optimizations that are not  
covered here because there are too numerous and I'm a very lazy person.
- Claudio Poli contributed a web application that periodically builds  
binary installers of MacRuby trunk. It is available here: http://macruby.icoretech.org 
. Feel free to use this in case you want a simpler way to follow  
trunk. Please note that these installers won't work on Mac OS versions  
below 10.6 (Snow Leopard).


We are smoothly converging for the 0.5 release and the goal is now to  
deliver a release candidate. Our objective for the first RC is to have  
a fully working rubygems and also implement critical missing features  
(such as backtracing, symbolication and some remaining Binding bugs).  
We expect to deliver it in about 2 weeks (maybe less :)).


Laurent
___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Nib issues on Snow Leopard

2009-09-16 Thread Matt Aimonetti
Could you give us more info or even better the source code?

Thanks,

- Matt

On Tue, Sep 15, 2009 at 8:15 PM, Alex Vollmer wrote:

> I'm trying to get a project that ran on MacRuby 0.4 and Leopard working
> with 0.5 on Snow Leopard. When I launch the app I get the following errors:
>
> 2009-09-15 20:08:08.954 TwittRb[87043:a0b] Unknown class 'TwittRbDelegate',
> using 'NSObject' instead. Encountered in Interface Builder file at path
> /Users/alex/Development/peepcode-meet-macruby/build/Debug/TwittRb.app/Contents/Resources/English.lproj/MainMenu.nib.
> 2009-09-15 20:08:08.969 TwittRb[87043:a0b] Could not connect the action
> hideCredentials: to target of class NSObject
> 2009-09-15 20:08:08.970 TwittRb[87043:a0b] Could not connect the action
> submitCredentials: to target of class NSObject
> 2009-09-15 20:08:08.971 TwittRb[87043:a0b] Could not connect the action
> retrieveTweets: to target of class NSObject
> 2009-09-15 20:08:08.971 TwittRb[87043:a0b] Could not connect the action
> postTweet: to target of class NSObject
> 2009-09-15 20:08:08.991 TwittRb[87043:a0b] *** Illegal NSTableView data
> source ().  Must implement numberOfRowsInTableView:
> and tableView:objectValueForTableColumn:row:
>
> When I load the Nib in Interface Builder everything looks okay (no warnings
> or errors) so I'm not sure what I need to change to make this go. Any
> thoughts?
>
> Cheers,
>
> Alex
>
> 
> Musings & Notes — http://alexvollmer.com
> Track what you lend and borrow — http://moochbot.com
>
>
>
>
>
> ___
> MacRuby-devel mailing list
> MacRuby-devel@lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Failed Assertion from 2009-09-04 Nightly Build

2009-09-16 Thread Laurent Sansonetti

Indeed, Core Duo is 32-bit, Core 2 Duo is 64-bit.

MacRuby is a universal (both 32-bit and 64-bit) Intel binary, so it  
works on both modes. But currently, the 32-bit support was neglected,  
as you can see. A MacRuby application will run on any Intel  
architecture supported in Mac OS X.


HTH,
Laurent

On Sep 15, 2009, at 11:36 PM, s.ross wrote:

I think you got it. It's a MBP Core Duo 2.16, which means 32-bit,  
right? I'll be looking forward to the release that supports this.  
Which  brings up an interesting question: How do you now develop an  
app that targets multiple architectures?


[Side note: I reported this as a problem with the 9/15 nightly too.  
Please ignore.]


--steve


On Sep 15, 2009, at 5:23 PM, Laurent Sansonetti wrote:


Hi Steve,

Do you run by any chance a 32-bit computer? This could explain the  
problem, MacRuby trunk doesn't currently run on 32-bit machines.  
This will be solved for the upcoming release.


Laurent

On Sep 13, 2009, at 3:39 PM, s.ross wrote:

Not sure whether this is the right way to report this, but I have  
a trivial XCode MacRuby project that consistently causes the  
assertion shown below. I can package up the project if need be.


OSX 10.6.1

Here is the console log (did a Build > Clean All Targets, the  
Build & Run):


run
[Switching to process 6578]
Running…
Assertion failed: (castIsValid(getOpcode(), S, Ty) && "Illegal  
SExt"), function SExtInst, file Instructions.cpp, line 2385.

Program received signal:  “SIGABRT”.
sharedlibrary apply-load-rules all
warning: Could not find object file "/Users/mattetti/src/macruby- 
gitsvn/trunk/array.o" - no debug information available for  
"array.c".




Any help appreciated.

Thanks,

Steve
___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #334: MacIrb hangs after require on Snow Leopard

2009-09-16 Thread MacRuby
#334: MacIrb hangs after require on Snow Leopard
-+--
 Reporter:  rwa...@… |   Owner:  lsansone...@…
 Type:  defect   |  Status:  new  
 Priority:  blocker  |   Milestone:  MacRuby 0.5  
Component:  MacRuby  |Keywords:   
-+--
 I installed MacRuby 0.5 from source on Snow Leopard.  MacIrb reports its
 version as 0.9.5.  MacIrb starts and can execute ruby statements, but when
 I attempt to "require 'file'" and "file" is valid ruby source that uses
 code generated by wsdl2ruby, MacIrb just hangs.  The same code works
 properly in irb using ruby 1.8.7.  I have SOAP4R installed as a gem for
 ruby, but attempting to install soap4r using MacGem fails with the
 following message:

 Assertion failed: (real_argc + count < MAX_DISPATCH_ARGS), function
 __rb_vm_resolve_args, file vm.cpp, line 3050.
 Abort trap

 The command used was:
 sudo macgem install soap4r

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #334: MacIrb hangs after require on Snow Leopard

2009-09-16 Thread MacRuby
#334: MacIrb hangs after require on Snow Leopard
-+--
 Reporter:  rwa...@… |   Owner:  lsansone...@…
 Type:  defect   |  Status:  new  
 Priority:  blocker  |   Milestone:  MacRuby 0.5  
Component:  MacRuby  |Keywords:   
-+--

Comment(by mattaimone...@…):

 Thanks for the bug report, it's actually a known bug as well as a todo
 item in the todo file available in the repo.
 (MAX_DISPATCH_ARGS assertion)

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #335: Top-level RDoc for gcd.c

2009-09-16 Thread MacRuby
#335: Top-level RDoc for gcd.c
+---
 Reporter:  ernest.prabha...@…  |   Owner:  lsansone...@…
 Type:  enhancement |  Status:  new  
 Priority:  blocker |   Milestone:  MacRuby 0.5  
Component:  MacRuby |Keywords:  gcd  
+---
 Here's some proposed language for:

 http://svn.macosforge.org/repository/ruby/MacRuby/trunk/gcd.c
 // TODO: Add a top-level rdoc for the module explaining what GCD
 // is good for (and pointing them to the dispatch(3) manpage).
 ==
 Grand Central Dispatch (GCD) is a novel approach to multicore computing
 that is built into Mac OS X version 10.6 Snow Leopard. In particular, GCD
 shifts responsibility for managing threads and their execution from
 applications to the operating system. This allows programmers to easily
 refactor their programs into small chunks of independent work, which GCD
 then schedules onto per-process thread pools.  Because GCD knows the load
 across the entire system, it ensures the resulting programs perform
 optimally on a wide range of hardware.

 GCD is built on a highly-efficient multicore engine accessed via a C API
 providing four primary abstractions, which are wrapped in this MacRuby
 implementation:
 ▪   block objects
 ▪   dispatch queues
 ▪   synchronization services
 ▪   event sources

 For more information, see the dispatch(3) man page.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #336: NoMethodError with shoulda tests

2009-09-16 Thread MacRuby
#336: NoMethodError with shoulda tests
+---
 Reporter:  macr...@…   |   Owner:  lsansone...@…
 Type:  defect  |  Status:  new  
 Priority:  major   |   Milestone:  MacRuby 0.5  
Component:  MacRuby |Keywords:  shoulda  
+---
 When running shoulda tests a NoMethodError is raised, not quite sure
 how/why as it looks like the test passes.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] macruby nightly build 2009-09-10

2009-09-16 Thread Conrad Taylor
Hi Matt, thanks for gettih back to me.  In regards to the failing  
specs, how does one determine what's failing?  I have been running the  
following:


rake spec:ci

In any case, I would like to get started on this as soon as possible.   
Thus, if someone can provide the details, it would be greatly  
appreciated.


Thanks in advance,

-Conrad

Sent from my iPhone

On Sep 15, 2009, at 4:34 PM, Matt Aimonetti   
wrote:


Unfortunately, we don't have a check list of all the std libs and  
other gems that are compatible/incompatible.


The todo list mentions the following:

Planned for 0.5
[ ] fix irb Binding bugs
[/] sockets
[ ] backtracing / symbolication
[/] rubygems should work (modulo C extensions)
  [X] fix version numbers
  [X] fix YAML deserialization of booleans
  [ ] fix ~/.gemrc
  [X] `source --add http://gems.github.com' crashes (outside gdb)
  [ ] `install rest-client' prints parsing errors (encoding problem  
in thor.gemspec)

  [ ] `gem uninstall bacon' doesn't work (Unknown gem bacon >= 0)
  [ ] `macgem install rails --version 2.3.2' crashes  
(MAX_DISPATCH_ARGS assertion)

[ ] rewrite load.c (needed for RubyGems' #require hack)

For 0.5 (must do):

[ ] implement Enumerable::Enumerator
[/] 32-bit should be back
[X] Array subclass for immediates
[ ] Hash subclass for immediates
[ ] try/catch should use a C++ exception
[ ] ObjC exceptions should be catchable in Ruby
[ ] fully implement FFI API
[ ] support for bigdecimal
[ ] support for json
[/] support for yaml
[ ] support for openssl
[/] support for zlib
[ ] merge stdlib from 1.9.2 trunk
[/] most language/core/library specs should run (modulo a very few  
exceptions)

[X] port all rb_define_method() calls to rb_objc_define_method()
[/] port all rb_funcall() calls to rb_vm_call()
[/] port all rb_num_coerce_bin() calls to rb_objc_num_coerce_bin()
[/] port all rb_obj_respond_to() calls to rb_vm_respond_to()

For 0.5 (tentative):

[ ] write a pass manager to eliminate unnecessary arrays generated  
by massigns

[ ] vectorize bignums
[ ] block inlining
[ ] fast regexp =~
[ ] rakefile-ize instruby.rb
[/] finish AOT compiler (only normal mode)
[/] sync with LLVM 2.6 (DONE in llvm26 branch, blocked by LLVM  
regressions)

[ ] multithreaded JIT
[ ] debugger interface


We identified some bugs that cause ERB to not work properly and they  
will be fixed for 0.5, however the work on the webserver didn't  
start. Stuff like CGI and openssl would first need to work.
If you want to help, the best thing you could do is to work on the  
specs with Eloy. (flag/tag the specs that fail so we know what libs  
are working, which are not) if you find bugs,replorting them in a  
simple/reproducible example is also super useful.


- Matt


On Tue, Sep 15, 2009 at 4:20 PM, Conrad Taylor   
wrote:
Is there a page where can locate what's not working?  Or open  
projects that need help?  I would be interested in both erb and the  
webserver (i.e. webrick, mongrel, and/or thin)?


Thanks in advance,

-Conrad

On Tue, Sep 15, 2009 at 4:02 PM, Matt Aimonetti > wrote:

You should always use macgem when working with macruby.
However, Sinatra isn't running yet as erb isn't fully working  
neither rack and we don't have a compatible webserver ;)


You will have to wait a little before that works, but as we are  
going through the std libs, things should start looking better.


- Matt



On Tue, Sep 15, 2009 at 2:13 PM, Conrad Taylor   
wrote:
On Thu, Sep 10, 2009 at 11:24 AM, Matt Aimonetti > wrote:

Latest trunk code available as an unofficial pkg ready to install: 
http://rubyurl.com/5K3W

Lots of bug fixes, improved macgem (not finished yet but you can  
install gems and load them using `gem 'gem_name'; require  
'whatever'`).

Things are looking pretty good on trunk :)

Hi, should one use 'macgem' instead of 'gem'?  In any case, I wanted  
to give it a try by installing sinatra:


sudo macgem install sinatra

and I received the following error message:

ERROR:  While executing gem ... (ArgumentError)
wrong number of arguments (1 for 2)

In a clean installation, the following directory doesn't exist but  
attempting to install something creates the directory and the  
installation of the gem fails:


/Library/Frameworks/MacRuby.framework/Versions/0.5/usr/lib/ruby/Gems/ 
1.9.0


Now, when I tried to install the gem again, everything worked as  
expected.  For example,


$ sudo macgem install sinatra
Password:
Successfully installed rack-1.0.0
Successfully installed sinatra-0.9.4
2 gems installed

-Conrad


- Matt

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel



___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel



___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
htt

Re: [MacRuby-devel] [MacRuby] #336: NoMethodError with shoulda tests

2009-09-16 Thread MacRuby
#336: NoMethodError with shoulda tests
+---
 Reporter:  macr...@…   |   Owner:  lsansone...@…
 Type:  defect  |  Status:  new  
 Priority:  major   |   Milestone:  MacRuby 0.5  
Component:  MacRuby |Keywords:  shoulda  
+---

Comment(by macr...@…):

 Apologies for the extremely bad formatting, here is a slightly better
 formatted version

 {{{
 #!ruby
 require 'test/unit'
 require 'rubygems'
 require 'shoulda'
 require 'shoulda/test_unit'

 framework 'Foundation'

 class MacRubyShouldaTest < Test::Unit::TestCase
   context "NSString instance" do
 setup do
   @string = NSString.stringWithString("~/Documents")
 end
 should "expand tilde in path" do
   assert
 
@string.stringByExpandingTildeInPath.isEqualToString("#{ENV['HOME']}/Documents")
 end
   end
 end
 }}}

 with the output of

 {{{
 Started
 E.
 Finished in 0.096728 seconds.

   1) Error:
 test: NSString instance should expand tilde in path.(MacRubyShouldaTest):
 NoMethodError: undefined method `test: NSString instance should expand
 tilde in path.' for #
 0:in `send:'
 0:in `run:'
 0:in `each'
 0:in `each'
 0:in `run_test_suites:'
 0:in `run:'

 2 tests, 1 assertions, 0 failures, 1 errors, 0 skips
 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #336: NoMethodError with shoulda tests

2009-09-16 Thread MacRuby
#336: NoMethodError with shoulda tests
+---
 Reporter:  macr...@…   |   Owner:  lsansone...@…
 Type:  defect  |  Status:  new  
 Priority:  major   |   Milestone:  MacRuby 0.5  
Component:  MacRuby |Keywords:  shoulda  
+---

Comment(by eloy.de.en...@…):

 Thanks for the report!

 In the meantime you could give Bacon a try if you want. It's a sweet lean
 test framework and all of it's tests run on MacRuby 0.5. However, until a
 new version is released you will have to grab the HEAD version from:
 http://github.com/chneukirchen/bacon

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #337: Bug in rb_source_new_timer in gcd.c

2009-09-16 Thread MacRuby
#337: Bug in rb_source_new_timer  in gcd.c
+---
 Reporter:  ernest.prabha...@…  |   Owner:  lsansone...@…
 Type:  defect  |  Status:  new  
 Priority:  minor   |   Milestone:  MacRuby 0.5  
Component:  MacRuby |Keywords:   
+---
 Maybe I'm missing something, but shouldn't "&delay" be in this argument
 list?

 rb_scan_args(argc, argv, "21", &queue, &interval, &leeway);

 If not, where is delay initialized?
 
 rb_source_new_timer(VALUE klass, SEL sel, int argc, VALUE* argv)
 {
 dispatch_time_t start_time;
 VALUE queue = Qnil, interval = Qnil, delay = Qnil, leeway = Qnil;
 rb_scan_args(argc, argv, "21", &queue, &interval, &leeway);
 if (NIL_P(leeway)) {
 leeway = INT2FIX(0);
 }
 if (NIL_P(delay)) {
 start_time = DISPATCH_TIME_NOW;
 }
 else {
 start_time = dispatch_walltime(NULL,
 number_to_nanoseconds(delay));
 }

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #338: Typo in rb_source_on_cancellation in gcd.c

2009-09-16 Thread MacRuby
#338: Typo in rb_source_on_cancellation in gcd.c
+---
 Reporter:  ernest.prabha...@…  |   Owner:  lsansone...@…
 Type:  defect  |  Status:  new  
 Priority:  trivial |   Milestone:  MacRuby 0.5  
Component:  MacRuby |Keywords:   
+---
 In static VALUE rb_source_on_cancellation(VALUE self, SEL sel)

 rb_raise(rb_eArgError, "on_event() requires a block argument");

 should presumably be:

 rb_raise(rb_eArgError, "on_cancellation() requires a block
 argument");

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] macruby nightly build 2009-09-10

2009-09-16 Thread Matt Aimonetti
Actually it's a bit more complicated than that since we need to tag  
specs before adding them to rake spec:ci


I'm sure Eloy will explain where to find the spec readme and conventions

Sent from my iPhone

On Sep 16, 2009, at 13:54, Conrad Taylor  wrote:

Hi Matt, thanks for gettih back to me.  In regards to the failing  
specs, how does one determine what's failing?  I have been running  
the following:


rake spec:ci

In any case, I would like to get started on this as soon as  
possible.  Thus, if someone can provide the details, it would be  
greatly appreciated.


Thanks in advance,

-Conrad

Sent from my iPhone

On Sep 15, 2009, at 4:34 PM, Matt Aimonetti  
 wrote:


Unfortunately, we don't have a check list of all the std libs and  
other gems that are compatible/incompatible.


The todo list mentions the following:

Planned for 0.5
[ ] fix irb Binding bugs
[/] sockets
[ ] backtracing / symbolication
[/] rubygems should work (modulo C extensions)
  [X] fix version numbers
  [X] fix YAML deserialization of booleans
  [ ] fix ~/.gemrc
  [X] `source --add http://gems.github.com' crashes (outside gdb)
  [ ] `install rest-client' prints parsing errors (encoding problem  
in thor.gemspec)

  [ ] `gem uninstall bacon' doesn't work (Unknown gem bacon >= 0)
  [ ] `macgem install rails --version 2.3.2' crashes  
(MAX_DISPATCH_ARGS assertion)

[ ] rewrite load.c (needed for RubyGems' #require hack)

For 0.5 (must do):

[ ] implement Enumerable::Enumerator
[/] 32-bit should be back
[X] Array subclass for immediates
[ ] Hash subclass for immediates
[ ] try/catch should use a C++ exception
[ ] ObjC exceptions should be catchable in Ruby
[ ] fully implement FFI API
[ ] support for bigdecimal
[ ] support for json
[/] support for yaml
[ ] support for openssl
[/] support for zlib
[ ] merge stdlib from 1.9.2 trunk
[/] most language/core/library specs should run (modulo a very few  
exceptions)

[X] port all rb_define_method() calls to rb_objc_define_method()
[/] port all rb_funcall() calls to rb_vm_call()
[/] port all rb_num_coerce_bin() calls to rb_objc_num_coerce_bin()
[/] port all rb_obj_respond_to() calls to rb_vm_respond_to()

For 0.5 (tentative):

[ ] write a pass manager to eliminate unnecessary arrays generated  
by massigns

[ ] vectorize bignums
[ ] block inlining
[ ] fast regexp =~
[ ] rakefile-ize instruby.rb
[/] finish AOT compiler (only normal mode)
[/] sync with LLVM 2.6 (DONE in llvm26 branch, blocked by LLVM  
regressions)

[ ] multithreaded JIT
[ ] debugger interface


We identified some bugs that cause ERB to not work properly and  
they will be fixed for 0.5, however the work on the webserver  
didn't start. Stuff like CGI and openssl would first need to work.
If you want to help, the best thing you could do is to work on the  
specs with Eloy. (flag/tag the specs that fail so we know what libs  
are working, which are not) if you find bugs,replorting them in a  
simple/reproducible example is also super useful.


- Matt


On Tue, Sep 15, 2009 at 4:20 PM, Conrad Taylor   
wrote:
Is there a page where can locate what's not working?  Or open  
projects that need help?  I would be interested in both erb and the  
webserver (i.e. webrick, mongrel, and/or thin)?


Thanks in advance,

-Conrad

On Tue, Sep 15, 2009 at 4:02 PM, Matt Aimonetti > wrote:

You should always use macgem when working with macruby.
However, Sinatra isn't running yet as erb isn't fully working  
neither rack and we don't have a compatible webserver ;)


You will have to wait a little before that works, but as we are  
going through the std libs, things should start looking better.


- Matt



On Tue, Sep 15, 2009 at 2:13 PM, Conrad Taylor   
wrote:
On Thu, Sep 10, 2009 at 11:24 AM, Matt Aimonetti > wrote:

Latest trunk code available as an unofficial pkg ready to install: 
http://rubyurl.com/5K3W

Lots of bug fixes, improved macgem (not finished yet but you can  
install gems and load them using `gem 'gem_name'; require  
'whatever'`).

Things are looking pretty good on trunk :)

Hi, should one use 'macgem' instead of 'gem'?  In any case, I  
wanted to give it a try by installing sinatra:


sudo macgem install sinatra

and I received the following error message:

ERROR:  While executing gem ... (ArgumentError)
wrong number of arguments (1 for 2)

In a clean installation, the following directory doesn't exist but  
attempting to install something creates the directory and the  
installation of the gem fails:


/Library/Frameworks/MacRuby.framework/Versions/0.5/usr/lib/ruby/ 
Gems/1.9.0


Now, when I tried to install the gem again, everything worked as  
expected.  For example,


$ sudo macgem install sinatra
Password:
Successfully installed rack-1.0.0
Successfully installed sinatra-0.9.4
2 gems installed

-Conrad


- Matt

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel



___

Re: [MacRuby-devel] [MacRuby] #335: Top-level RDoc for gcd.c

2009-09-16 Thread Matt Aimonetti

Thanks Ernie, I'll add your doc to the file.

- Matt

Sent from my iPhone

On Sep 16, 2009, at 13:48, "MacRuby"   
wrote:



#335: Top-level RDoc for gcd.c
 
+---
Reporter:  ernest.prabha...@…  |   Owner:  lsansonetti 
@…

Type:  enhancement |  Status:  new
Priority:  blocker |   Milestone:  MacRuby 0.5
Component:  MacRuby |Keywords:  gcd
 
+---

Here's some proposed language for:

http://svn.macosforge.org/repository/ruby/MacRuby/trunk/gcd.c
// TODO: Add a top-level rdoc for the module explaining what GCD
// is good for (and pointing them to the dispatch(3) manpage).
==
Grand Central Dispatch (GCD) is a novel approach to multicore  
computing
that is built into Mac OS X version 10.6 Snow Leopard. In  
particular, GCD

shifts responsibility for managing threads and their execution from
applications to the operating system. This allows programmers to  
easily
refactor their programs into small chunks of independent work, which  
GCD
then schedules onto per-process thread pools.  Because GCD knows the  
load

across the entire system, it ensures the resulting programs perform
optimally on a wide range of hardware.

GCD is built on a highly-efficient multicore engine accessed via a C  
API

providing four primary abstractions, which are wrapped in this MacRuby
implementation:
▪   block objects
▪   dispatch queues
▪   synchronization services
▪   event sources

For more information, see the dispatch(3) man page.

--
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Nib issues on Snow Leopard

2009-09-16 Thread Alex Vollmer
Yeah, sorry for the lack of details. The code is posted on GitHub at http://github.com/peepcode/peepcode-035-macruby 
. I was curious if this was some well-known 0.5 issue. It appears that  
it's not so the next step is probably to start re-building the app a  
bit at a time in 0.5 (it's not that much code).


Cheers,

Alex V.

On Sep 16, 2009, at Sep 16, 1:51 AM, Matt Aimonetti wrote:


Could you give us more info or even better the source code?

Thanks,

- Matt

On Tue, Sep 15, 2009 at 8:15 PM, Alex Vollmer  
 wrote:
I'm trying to get a project that ran on MacRuby 0.4 and Leopard  
working with 0.5 on Snow Leopard. When I launch the app I get the  
following errors:


2009-09-15 20:08:08.954 TwittRb[87043:a0b] Unknown class  
'TwittRbDelegate', using 'NSObject' instead. Encountered in  
Interface Builder file at path /Users/alex/Development/peepcode-meet- 
macruby/build/Debug/TwittRb.app/Contents/Resources/English.lproj/ 
MainMenu.nib.
2009-09-15 20:08:08.969 TwittRb[87043:a0b] Could not connect the  
action hideCredentials: to target of class NSObject
2009-09-15 20:08:08.970 TwittRb[87043:a0b] Could not connect the  
action submitCredentials: to target of class NSObject
2009-09-15 20:08:08.971 TwittRb[87043:a0b] Could not connect the  
action retrieveTweets: to target of class NSObject
2009-09-15 20:08:08.971 TwittRb[87043:a0b] Could not connect the  
action postTweet: to target of class NSObject
2009-09-15 20:08:08.991 TwittRb[87043:a0b] *** Illegal NSTableView  
data source ().  Must implement  
numberOfRowsInTableView: and tableView:objectValueForTableColumn:row:


When I load the Nib in Interface Builder everything looks okay (no  
warnings or errors) so I'm not sure what I need to change to make  
this go. Any thoughts?


Cheers,

Alex


Musings & Notes — http://alexvollmer.com
Track what you lend and borrow — http://moochbot.com





___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel



http://alexvollmer.com
http://moochbot.com




___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Nib issues on Snow Leopard

2009-09-16 Thread Matt Aimonetti
I'll look at it after work, there shouldn't be anything to write for it to
work under 0.5.

- Matt

On Wed, Sep 16, 2009 at 3:26 PM, Alex Vollmer wrote:

> Yeah, sorry for the lack of details. The code is posted on GitHub at
> http://github.com/peepcode/peepcode-035-macruby. I was curious if this was
> some well-known 0.5 issue. It appears that it's not so the next step is
> probably to start re-building the app a bit at a time in 0.5 (it's not that
> much code).
> Cheers,
>
> Alex V.
>
> On Sep 16, 2009, at Sep 16, 1:51 AM, Matt Aimonetti wrote:
>
> Could you give us more info or even better the source code?
>
> Thanks,
>
> - Matt
>
> On Tue, Sep 15, 2009 at 8:15 PM, Alex Vollmer wrote:
>
>> I'm trying to get a project that ran on MacRuby 0.4 and Leopard working
>> with 0.5 on Snow Leopard. When I launch the app I get the following errors:
>>
>> 2009-09-15 20:08:08.954 TwittRb[87043:a0b] Unknown class
>> 'TwittRbDelegate', using 'NSObject' instead. Encountered in Interface
>> Builder file at path
>> /Users/alex/Development/peepcode-meet-macruby/build/Debug/TwittRb.app/Contents/Resources/English.lproj/MainMenu.nib.
>> 2009-09-15 20:08:08.969 TwittRb[87043:a0b] Could not connect the action
>> hideCredentials: to target of class NSObject
>> 2009-09-15 20:08:08.970 TwittRb[87043:a0b] Could not connect the action
>> submitCredentials: to target of class NSObject
>> 2009-09-15 20:08:08.971 TwittRb[87043:a0b] Could not connect the action
>> retrieveTweets: to target of class NSObject
>> 2009-09-15 20:08:08.971 TwittRb[87043:a0b] Could not connect the action
>> postTweet: to target of class NSObject
>> 2009-09-15 20:08:08.991 TwittRb[87043:a0b] *** Illegal NSTableView data
>> source ().  Must implement numberOfRowsInTableView:
>> and tableView:objectValueForTableColumn:row:
>>
>> When I load the Nib in Interface Builder everything looks okay (no
>> warnings or errors) so I'm not sure what I need to change to make this go.
>> Any thoughts?
>>
>> Cheers,
>>
>> Alex
>>
>> 
>> Musings & Notes — http://alexvollmer.com
>> Track what you lend and borrow — http://moochbot.com
>>
>>
>>
>>
>>
>> ___
>> MacRuby-devel mailing list
>> MacRuby-devel@lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>
> ___
> MacRuby-devel mailing list
> MacRuby-devel@lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
> 
> http://alexvollmer.com
> http://moochbot.com
>
>
>
>
>
> ___
> MacRuby-devel mailing list
> MacRuby-devel@lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] macruby nightly build 2009-09-10

2009-09-16 Thread Eloy Duran

Hey Conrad,

The readme that should get you started with the specs is available in  
spec/README.rdoc (http://github.com/masterkain/macruby/blob/master/spec/README.rdoc 
).
I'm sure there will be some issues you run into as I haven't updated  
it in a while. Feel free to update it and/or ask me questions on the  
topic of the specs.


Eloy

On 16 sep 2009, at 23:50, Matt Aimonetti wrote:

Actually it's a bit more complicated than that since we need to tag  
specs before adding them to rake spec:ci


I'm sure Eloy will explain where to find the spec readme and  
conventions


Sent from my iPhone

On Sep 16, 2009, at 13:54, Conrad Taylor  wrote:

Hi Matt, thanks for gettih back to me.  In regards to the failing  
specs, how does one determine what's failing?  I have been running  
the following:


rake spec:ci

In any case, I would like to get started on this as soon as  
possible.  Thus, if someone can provide the details, it would be  
greatly appreciated.


Thanks in advance,

-Conrad

Sent from my iPhone

On Sep 15, 2009, at 4:34 PM, Matt Aimonetti  
 wrote:


Unfortunately, we don't have a check list of all the std libs and  
other gems that are compatible/incompatible.


The todo list mentions the following:

Planned for 0.5
[ ] fix irb Binding bugs
[/] sockets
[ ] backtracing / symbolication
[/] rubygems should work (modulo C extensions)
  [X] fix version numbers
  [X] fix YAML deserialization of booleans
  [ ] fix ~/.gemrc
  [X] `source --add http://gems.github.com' crashes (outside gdb)
  [ ] `install rest-client' prints parsing errors (encoding  
problem in thor.gemspec)

  [ ] `gem uninstall bacon' doesn't work (Unknown gem bacon >= 0)
  [ ] `macgem install rails --version 2.3.2' crashes  
(MAX_DISPATCH_ARGS assertion)

[ ] rewrite load.c (needed for RubyGems' #require hack)

For 0.5 (must do):

[ ] implement Enumerable::Enumerator
[/] 32-bit should be back
[X] Array subclass for immediates
[ ] Hash subclass for immediates
[ ] try/catch should use a C++ exception
[ ] ObjC exceptions should be catchable in Ruby
[ ] fully implement FFI API
[ ] support for bigdecimal
[ ] support for json
[/] support for yaml
[ ] support for openssl
[/] support for zlib
[ ] merge stdlib from 1.9.2 trunk
[/] most language/core/library specs should run (modulo a very few  
exceptions)

[X] port all rb_define_method() calls to rb_objc_define_method()
[/] port all rb_funcall() calls to rb_vm_call()
[/] port all rb_num_coerce_bin() calls to rb_objc_num_coerce_bin()
[/] port all rb_obj_respond_to() calls to rb_vm_respond_to()

For 0.5 (tentative):

[ ] write a pass manager to eliminate unnecessary arrays generated  
by massigns

[ ] vectorize bignums
[ ] block inlining
[ ] fast regexp =~
[ ] rakefile-ize instruby.rb
[/] finish AOT compiler (only normal mode)
[/] sync with LLVM 2.6 (DONE in llvm26 branch, blocked by LLVM  
regressions)

[ ] multithreaded JIT
[ ] debugger interface


We identified some bugs that cause ERB to not work properly and  
they will be fixed for 0.5, however the work on the webserver  
didn't start. Stuff like CGI and openssl would first need to work.
If you want to help, the best thing you could do is to work on the  
specs with Eloy. (flag/tag the specs that fail so we know what  
libs are working, which are not) if you find bugs,replorting them  
in a simple/reproducible example is also super useful.


- Matt


On Tue, Sep 15, 2009 at 4:20 PM, Conrad Taylor  
 wrote:
Is there a page where can locate what's not working?  Or open  
projects that need help?  I would be interested in both erb and  
the webserver (i.e. webrick, mongrel, and/or thin)?


Thanks in advance,

-Conrad

On Tue, Sep 15, 2009 at 4:02 PM, Matt Aimonetti > wrote:

You should always use macgem when working with macruby.
However, Sinatra isn't running yet as erb isn't fully working  
neither rack and we don't have a compatible webserver ;)


You will have to wait a little before that works, but as we are  
going through the std libs, things should start looking better.


- Matt



On Tue, Sep 15, 2009 at 2:13 PM, Conrad Taylor  
 wrote:
On Thu, Sep 10, 2009 at 11:24 AM, Matt Aimonetti > wrote:

Latest trunk code available as an unofficial pkg ready to install: 
http://rubyurl.com/5K3W

Lots of bug fixes, improved macgem (not finished yet but you can  
install gems and load them using `gem 'gem_name'; require  
'whatever'`).

Things are looking pretty good on trunk :)

Hi, should one use 'macgem' instead of 'gem'?  In any case, I  
wanted to give it a try by installing sinatra:


sudo macgem install sinatra

and I received the following error message:

ERROR:  While executing gem ... (ArgumentError)
wrong number of arguments (1 for 2)

In a clean installation, the following directory doesn't exist but  
attempting to install something creates the directory and the  
installation of the gem fails:


/Library/Frameworks/MacRuby.framework/Versions/0.5/usr/lib/ruby/ 
Gems/1.9.0


Now, when I tried to install the gem again, everyth

[MacRuby-devel] unrecognised defined?

2009-09-16 Thread Ben Schwarz

Hey folks,

After installing the 'grit' gem I required' it in macirb and received  
the following:


b...@homeslice ~ Ϟ macirb
irb(main):001:0> require 'grit'
	unrecognized defined? arg: 21 (NODE_AND)fish: Job 1, 'macirb'  
terminated by signal SIGABRT (Abort)



Which, I believe is responding to line 12 in grit.rb – http://github.com/mojombo/grit/blob/master/lib/grit.rb#L 
12
Is this a bug that should be logged? I've tried defined? RUBY_ENGINE  
in macirb and it appears to execute without a problem


Cheers,


--

Ben Schwarz
Web architect

Web:http://www.germanforblack.com

--
Please consider your environment before printing or distributing this  
material.

--

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] unrecognised defined?

2009-09-16 Thread Matt Aimonetti
hmm are you on 0.5 trunk? macgem isn't fully working and require on a gem
doesn't work However it also fails on trunk:

$ macruby -e "require 'rubygems'; gem 'grit'; require 'grit'"
unrecognized defined? arg: 21 (NODE_AND)Abort trap

Please open a ticket so we can look into it.

Thanks,

- Matt





On Wed, Sep 16, 2009 at 5:01 PM, Ben Schwarz  wrote:

> Hey folks,
> After installing the 'grit' gem I required' it in macirb and received the
> following:
>
> b...@homeslice ~ Ϟ macirb
> irb(main):001:0> require 'grit'
> unrecognized defined? arg: 21 (NODE_AND)fish: Job 1, 'macirb' terminated by
> signal SIGABRT (Abort)
>
>
> Which, I believe is responding to line 12 in grit.rb –
> http://github.com/mojombo/grit/blob/master/lib/grit.rb#L12
> Is this a bug that should be logged? I've tried defined? RUBY_ENGINE in
> macirb and it appears to execute without a problem
>
> Cheers,
>
>
> --
>
> *Ben Schwarz*
> *Web architect *
> *
> *
> Web: http://www.germanforblack.com
>
> --
> Please consider your environment before printing or distributing this
> material.
> --
>
>
> ___
> MacRuby-devel mailing list
> MacRuby-devel@lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #336: NoMethodError with shoulda tests

2009-09-16 Thread MacRuby
#336: NoMethodError with shoulda tests
+---
 Reporter:  macr...@…   |   Owner:  lsansone...@…
 Type:  defect  |  Status:  new  
 Priority:  major   |   Milestone:  MacRuby 0.5  
Component:  MacRuby |Keywords:  shoulda  
+---

Comment(by macr...@…):

 Thanks, not sure what I've done now but I can't seem to get macruby or
 macirb to load any gems at all. Can't work out why as it was working this
 morning.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Nib issues on Snow Leopard

2009-09-16 Thread Bjoern Paschen

Hello Alex...

I watched that peepcode screencast a couple of days ago and build the  
app from scratch with macruby 0.5. If it is of any help, I put the  
project directory on my ftp:


ftp://witwenmacher.com/TwittRb.zip

The app works so far, except for the "require 'cgi'" in  
TwittRbDelegate.rb. That one throws an ArgumentError in define_method.  
If you comment it out the application will run but be unable to send  
tweets. I wasn't able to find a solution for that yet.


Cheers, Bjoern.

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #336: NoMethodError with shoulda tests

2009-09-16 Thread MacRuby
#336: NoMethodError with shoulda tests
+---
 Reporter:  macr...@…   |   Owner:  lsansone...@…
 Type:  defect  |  Status:  new  
 Priority:  major   |   Milestone:  MacRuby 0.5  
Component:  MacRuby |Keywords:  shoulda  
+---

Comment(by macr...@…):

 Replying to [comment:3 macr...@…]:
 > Thanks, not sure what I've done now but I can't seem to get macruby or
 macirb to load any gems at all. Can't work out why as it was working this
 morning.
 Noticed that `rip` was in my $LOAD_PATH so I've installed Bacon with that,
 working much more smoothly now.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Nib issues on Snow Leopard

2009-09-16 Thread Matt Aimonetti
CGI isn't fully working on 0.5 yet, it's on the todo list tho.

- Matt

On Wed, Sep 16, 2009 at 6:12 PM, Bjoern Paschen wrote:

> Hello Alex...
>
> I watched that peepcode screencast a couple of days ago and build the app
> from scratch with macruby 0.5. If it is of any help, I put the project
> directory on my ftp:
>
> ftp://witwenmacher.com/TwittRb.zip
>
> The app works so far, except for the "require 'cgi'" in TwittRbDelegate.rb.
> That one throws an ArgumentError in define_method. If you comment it out the
> application will run but be unable to send tweets. I wasn't able to find a
> solution for that yet.
>
> Cheers, Bjoern.
>
>
> ___
> MacRuby-devel mailing list
> MacRuby-devel@lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Nib issues on Snow Leopard

2009-09-16 Thread Bjoern Paschen

Hello Matt...

Thanks for the info. I didn't check that list, I should do it right  
away. :)


Cheers, Bjoern.

Am 17.09.2009 um 03:17 schrieb Matt Aimonetti:


CGI isn't fully working on 0.5 yet, it's on the todo list tho.

- Matt

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Nib issues on Snow Leopard

2009-09-16 Thread Matt Aimonetti
Actually... it's in the "TODO" list, I'm not sure it's in the official todo
list available in the repo.
I'll check with Laurent to see what priority he wants to assign to that std
lib.

Thanks for the report and the 0.5 version of the example app.

- Matt

On Wed, Sep 16, 2009 at 6:21 PM, Bjoern Paschen wrote:

> Hello Matt...
>
> Thanks for the info. I didn't check that list, I should do it right away.
> :)
>
> Cheers, Bjoern.
>
> Am 17.09.2009 um 03:17 schrieb Matt Aimonetti:
>
>  CGI isn't fully working on 0.5 yet, it's on the todo list tho.
>>
>> - Matt
>>
>> ___
>> MacRuby-devel mailing list
>> MacRuby-devel@lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>
> ___
> MacRuby-devel mailing list
> MacRuby-devel@lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] objc block and ruby block?

2009-09-16 Thread Benjamin Stiglitz
This is currently not implemented. It is not planned for the  
upcoming release mostly because I don't think it's that important,  
since all block methods in Cocoa also have methods dealing with  
function pointers, which will be supported.


Not true of some of the new Foundation and AppKit APIs. This should be  
doable since we know what the low-level implementation for blocks is  
and we can build a the right trampoline.


Of course, given my circumstances (not enough time for anything), “me”  
means “you.”


-Ben
___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #335: Top-level RDoc for gcd.c

2009-09-16 Thread MacRuby
#335: Top-level RDoc for gcd.c
+---
 Reporter:  ernest.prabha...@…  |Owner:  lsansone...@…
 Type:  enhancement |   Status:  closed   
 Priority:  blocker |Milestone:  MacRuby 0.5  
Component:  MacRuby |   Resolution:  fixed
 Keywords:  gcd |  
+---
Changes (by mattaimone...@…):

  * status:  new => closed
  * resolution:  => fixed


Comment:

 Documentation added, thanks Ernest.

 - Matt

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] unrecognised defined?

2009-09-16 Thread Laurent Sansonetti

Hi Ben,

This is a missing feature in the compiler, in the way we compile the  
defined? expression.


It's easily reproducible here:

$ ./miniruby -e 'p (defined? FOO && 42)'
unrecognized defined? arg: 21 (NODE_AND)Abort trap

I filed a test_vm case.

Now, it looks like the code you found this problem is bugged.

if defined? RUBY_ENGINE && RUBY_ENGINE == 'jruby'

should probably be written as

if (defined? RUBY_ENGINE) && RUBY_ENGINE == 'jruby'

otherwise, it seems to be the equivalent of

if defined?(RUBY_ENGINE && RUBY_ENGINE == 'jruby')

which is probably not what the code wants to do.

Laurent

On Sep 16, 2009, at 5:01 PM, Ben Schwarz wrote:


Hey folks,

After installing the 'grit' gem I required' it in macirb and  
received the following:


b...@homeslice ~ Ϟ macirb
irb(main):001:0> require 'grit'
	unrecognized defined? arg: 21 (NODE_AND)fish: Job 1, 'macirb'  
terminated by signal SIGABRT (Abort)



Which, I believe is responding to line 12 in grit.rb – http://github.com/mojombo/grit/blob/master/lib/grit.rb#L 
12
Is this a bug that should be logged? I've tried defined? RUBY_ENGINE  
in macirb and it appears to execute without a problem


Cheers,


--

Ben Schwarz
Web architect

Web:http://www.germanforblack.com

--
Please consider your environment before printing or distributing  
this material.

--

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] objc block and ruby block?

2009-09-16 Thread Laurent Sansonetti

On Sep 16, 2009, at 6:49 PM, Benjamin Stiglitz wrote:

This is currently not implemented. It is not planned for the  
upcoming release mostly because I don't think it's that important,  
since all block methods in Cocoa also have methods dealing with  
function pointers, which will be supported.


Not true of some of the new Foundation and AppKit APIs. This should  
be doable since we know what the low-level implementation for blocks  
is and we can build a the right trampoline.


Yeah, it's doable, but is it urgent? I don't think so.

Of course, given my circumstances (not enough time for anything),  
“me” means “you.”


I'm sure you can hack something in the bus, come on :-)

Laurent
___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel