[MacRuby-devel] [MacRuby] #159: "%d" with large integer argument gives conversion error

MacRuby ruby-noreply at macosforge.org
Tue Jan 5 09:52:43 PST 2010


#159: "%d" with large integer argument gives conversion error
---------------------------------+------------------------------------------
 Reporter:  jamis@…              |       Owner:  lsansonetti@…        
     Type:  defect               |      Status:  new                  
 Priority:  major                |   Milestone:                       
Component:  MacRuby              |    Keywords:                       
---------------------------------+------------------------------------------

Comment(by pthomson@…):

 Hi, Ed!

 Firstly, let me say that overall your changes seem really good. The
 bugfixes, descriptive IR patch, and changes to sprintf (especially the
 addition of %@) are really awesome.

 As far as printing out the Ruby class rather than the ObjC class
 (pola.diff), I don't really think that's necessary - actually, I kind of
 like how it prints out ObjC classes, as it's a good demonstration to
 skeptics that string literals are NSMutableStrings. Laurent, do you have
 any opinions on this? Are there any Rubyspecs that clarify this issue?

 The strictness option is kind of cool, but I'm not sure whether or not
 it's a big enough issue to require the introduction of another environment
 variable. Thoughts?

 I am slightly concerned about forcing 32-bit to use RFloat structs instead
 of FixFloats - yes, there is a huge loss in precision, but the speed boost
 we get from not having to call malloc() every time we need to create a new
 Float is really compelling. Perhaps we could have a command-line flag
 (something like {{{--force-fixfloats}}}) on 32-bit so that applications
 that need speed over precision (games, mobile apps) can get speed boosts
 when necessary. But for the time being I think it's worth integrating
 these FP changes, as most people are on 64-bit. Additionally, this would
 fix the problem we're having with the non-representable nature of negative
 powers of 10, which is pretty embarrassing:

 {{{ p 0.1 # prints 0.0999999940395355 }}}

 (I've been thinking about whether we could use some sort of slab-
 allocation technique for Floats. Any ideas?)

 Anyway, your changes look really good. I need to talk with Laurent about
 the best way to fix some merge conflicts in dispatcher.cpp and compiler.h,
 but other than that I think we should be able to merge these changes soon
 (probably within a couple of days).

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/159#comment:11>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list