Re: [MacRuby-devel] macruby produces strings with encodings that differ from MRI
Hi Steve,
It would be nice to know what exactly in ruby-mysql causes the
problem. If you can reduce the problem to a simple code snippet or
point us to the ruby-mysql source code it would be great.
Thanks
Laurent
On Sun, Sep 18, 2011 at 8:38 AM, Steve Clarke wrote:
> Yes, looks like the same issue as ticket 742. I did look at tickets but
> failed to spot that.
>
> The comment on the ticket re only UTF-8 being required may be true - it
> certainly is for me. Sadly the ruby-mysql gem works in such a way that the
> difference between MRI and macruby breaks it.
>
> Steve
>
> On 18 Sep 2011, at 06:07, Watson wrote:
>
>> Hi,
>>
>> Maybe related to http://www.macruby.org/trac/ticket/742.
>> MacRuby ignore magic-comment, and uses default encoding UTF8.
>>
>> Thanks.
>>
>> 2011/9/18 Steve Clarke :
>>> Code
>>>
>>>
>>> ABC='ABC'
>>> puts "ABC[0] encoding is #{ABC[0].encoding}"
>>> puts "?\\xff encoding is #{?\xff.encoding}"
>>>
>>>
>>> Output
>>>
>>>
>>>
>>> MRI output
>>>
>>> ABC[0] encoding is US-ASCII
>>> ?\xff encoding is ASCII-8BIT
>>>
>>>
>>>
>>> macruby output
>>>
>>> ABC[0] encoding is UTF-8
>>> ?\xff encoding is UTF-8
>>>
>>>
>>> The encodings reported above did not seem to be effected by the encoding of
>>> the source file. I tried both ASCII and UTF-8.
>>>
>>> When the same code is executed in (mac)irb the results are the same for
>>> macirb as they are for macruby.
>>> irb for MRI however produces UTF-8 strings in both cases! This seemed very
>>> odd but I'm fairly sure it's because I have an environment variable:
>>> LANG=GB.UTF-8
>>> When I changed to LANG=GB.US_ASCII irb for MRI rendered 'abc'[0] with
>>> US_ASCII encoding. macirb still used UTF-8.
>>>
>>> (I discovered this when trying to get ruby-mysql to work with macruby. It
>>> doesn't work as-is but seems to work with a few mods that use
>>> force_encoding to make MRI and macruby produce the same outputs).
>>> I abandoned my earlier attempts to use postgres with macruby via the pg
>>> gem. It failed regularly but in unpredictable ways associated, as far as I
>>> could tell, with memory management problems.
>>>
>>>
>>> ___
>>> MacRuby-devel mailing list
>>> [email protected]
>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>>
>> ___
>> MacRuby-devel mailing list
>> [email protected]
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] linking an NSTextView with my AppDelegate
Hi Brice, AFAIK, IB support in Xcode4 was broken for a long time but has been fixed in the beta builds. Unless you can't use the beta, http://www.macruby.org/trac/ticket/1322 contains a workaround. Laurent On Mon, Sep 12, 2011 at 9:37 PM, Brice Ruth wrote: > Good afternoon - > > I saw a thread from August indicating that there was an issue with Xcode 4 > on Lion w/r/t linking in IB (matched exactly what I'm seeing). I went and > grabbed the latest Xcode 3.x and installed it on Lion - I now have the old > IB, but I still can't seem to see the attrs defined in my AppDelegate when I > try to link the TextView. Not sure what I'm doing wrong ... would anyone > mind stepping me through in a little more detail or pointing me to a more > detailed walk through? I was using Xcode 4 on Snow Leopard and everything > seemed to be working peachy ... I'm now on Lion, working on a new NSTextView > and I can't get it to link to anything anymore. > > I saw one response indicating that you need to tell IB to read the files - I > see a "Read class files ..." option in the menu - when I point that at my > AppDelegate, I get an error dialog in IB, when I point it at main_rb, I > don't get an error, but it still doesn't appear to work. > > I can't make heads or tails of the XML in the .xib, either - so no hope > there. > > Much obliged, > > Brice Ruth, FCD > Software Engineer, Madison WI > > ___ > MacRuby-devel mailing list > [email protected] > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] Serialport IO and OS X Lion
Hi Robert I guess it can be either a problem in MacRuby or a problem in Lion. Can you share more details on this? Some system frameworks shipped with GC regressions in Lion, maybe that's the problem here. Laurent On Sat, Aug 20, 2011 at 9:42 PM, Robert Rice wrote: > Hi devotees, > > I was using an Obj-C wrapper for serial port IO written by Paolo Bosetti but > I found that it no longer works in Lion. Does anyone know what might have > changed? Does MacRuby have a better solution for serial IO yet than using an > Obj-C wrapper? > > Thanks, > Bob Rice > > ___ > MacRuby-devel mailing list > [email protected] > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] -twolevel_namespace issue?
Hi Jeremy, Could the problem be fixed by linking statically your own copy of SQLite against the Amalgalite library, and perhaps passing all SQLite symbols to -unexported_symbols_list during ld time? I am guessing symbols wouldn't collide anymore this way. >From what I understand, it looks like it would be better to fix the problem in Amalgalite itself, and not in each client requiring it. Laurent On Mon, Sep 12, 2011 at 8:39 PM, Jeremy Hinegardner wrote: > Hey all, > > I develop the Amalgalite gem[1] and it ships with its own copy of SQLite. > It does this as it adds in additional compile-time features, and I try and > keep it as current as posssible. > > The problem is that since MacRuby is linked to CoreServices etc, the sqlite > library that ships with OSX gets linked at runtime before the sqlite library > that is built into the amalgalite gem extension. I've encountered this > before[2] with amalgalite, when it was loaded with my 'hitimes' gem (which on > osx links > against -framework CoreServes). > > I am wondering what the appropriate approach is here. I was able to fix this > in > MRI by compiling MRI with -twolevel_namespace and I think there is an open > ticket > with ruby-core to see if MRI on osx should be compiled with that flag. > > I attempted to compile MacRuby with -twolevel_namespace to resolve this, and I > was unsuccessful. There appeared to be other flags that conflicted with it. > > I would expect something like this may also affect the nokogiri gem as limxml2 > is also a system library on osx, and may conflict with the version that > nokogiri > expects. > > Thoughts? Opinions? I'm sure this is a rare case, Amalgalite may be the only > project that could experience an issue like this. What is the best way to > handle > this in the MacRuby ecosystem? > > enjoy, > > -jeremy > > [1] - https://github.com/copiousfreetime/amalgalite > [2] - > https://github.com/copiousfreetime/amalgalite/blob/master/lib/amalgalite/sqlite3/version.rb#L42-L56-54 > -- > > Jeremy Hinegardner [email protected] > > ___ > MacRuby-devel mailing list > [email protected] > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] Invoking an obj-c method requiring a block
Hi Andy,
Blocks should work. Perhaps there is a problem with this very specific
API. Could you file a ticket? We will investigate.
Thanks
Laurent
On Sat, Aug 20, 2011 at 11:52 PM, Andy Park wrote:
> I tried using blocks today, to no avail.
>
> This didn't work:
> NSNotificationCenter.defaultCenter.addObserverForName
> "kDocSetSelection
> Changed", object:nil, queue:nil, usingBlock:Proc.new{ |notification|
> NSLog("notified")
> }
>
> But this did:
> NSNotificationCenter.defaultCenter.addObserver(self, selector:
> "handleM
> e:", name: "kDocSetSelectionChanged", object: nil)
>
> I found http://www.macruby.org/trac/ticket/760 that hinted MacRuby does
> impleme
> nt blocks, but also had references to BridgeSupport. I installed the preview-3
> version; what would be the reason the above didn't work?
>
> Thanks.
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] [ANN] Launch: MemoryCloud - Where memories live
A bit late to the party... but congratulations, it looks great, and thanks for using MacRuby :-) Laurent On Thu, Sep 1, 2011 at 6:16 PM, Steven Buxton wrote: > > http://memorycloudapp.com - We built this 100% in MacRuby 0.10 and it was a > blast to build. Started building it in 0.6 and worked on it all the way to > Lion and 0.10. Never had 1 issue in app approval with it being macruby! > About MemoryCloud -- > MemoryCloud stores your favorite photos and videos for you, allowing you to > reclaim precious hard drive space. > > Not backup, not synchronization. MemoryCloud is simple and safe storage for > the files that typically take up a lot of room. > > Here’s how it works: photos and videos occupy a lot of space on your Mac. > With MemoryCloud, you just drag and drop these files to store them on > the cloud; drag and drop again to retrieve. Smaller versions of the > originals are kept on your hard drive so you can still view a favorite photo > any time you want. > > Want to know what is being stored for you? MemoryCloud places a small > watermark on your compressed files, so you instantly know what has > been archived to the cloud. > > MemoryCloud provides a simple alternative to multiple CDs, memory cards and > external storage devices, allowing you to carry smaller versions of your > media with you. Finally, you don’t have to choose between cherished memories > and hard drive space. > > MemoryCloud offers: > > * Safe storage utilizing Amazon’s state-of-the-art cloud technology. > * A simple way to organize and access your favorite photos and videos. > * Full compatibility with both iPhoto and iTunes. > * The only cloud storage solution that also allows you to reclaim precious > hard drive space. > > Thanks! > Steven > > > > > > ___ > MacRuby-devel mailing list > [email protected] > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
[MacRuby-devel] Fwd: macruby produces strings with encodings that differ from MRI
Hi Laurent,
The problem is in the self.eof_packet? method of protocol.rb.
The statement that causes the problem is:
data[0] == ?\xfe && data.length == 5
When run under macruby this is what happens:
Encoding of data[0] is ASCII-8BIT. Encoding of ?\xfe
is UTF-8
The compare fails in macruby but in MRI it succeeds (because in MRI the
encoding of ?\xfe is ascii - actually it's US_ASCII, but that seems to compare
equal)
If I use force_encoding UTF-8 then things work OK - as far as I've tested.
Steve
Begin forwarded message:
> From: Laurent Sansonetti
> Subject: Re: [MacRuby-devel] macruby produces strings with encodings that
> differ from MRI
> Date: 18 September 2011 10:00:13 GMT+01:00
> To: "MacRuby development discussions."
> Reply-To: "MacRuby development discussions."
>
>
> Hi Steve,
>
> It would be nice to know what exactly in ruby-mysql causes the
> problem. If you can reduce the problem to a simple code snippet or
> point us to the ruby-mysql source code it would be great.
>
> Thanks
> Laurent
>
> On Sun, Sep 18, 2011 at 8:38 AM, Steve Clarke wrote:
>> Yes, looks like the same issue as ticket 742. I did look at tickets but
>> failed to spot that.
>>
>> The comment on the ticket re only UTF-8 being required may be true - it
>> certainly is for me. Sadly the ruby-mysql gem works in such a way that the
>> difference between MRI and macruby breaks it.
>>
>> Steve
>>
>> On 18 Sep 2011, at 06:07, Watson wrote:
>>
>>> Hi,
>>>
>>> Maybe related to http://www.macruby.org/trac/ticket/742.
>>> MacRuby ignore magic-comment, and uses default encoding UTF8.
>>>
>>> Thanks.
>>>
>>> 2011/9/18 Steve Clarke :
Code
ABC='ABC'
puts "ABC[0] encoding is #{ABC[0].encoding}"
puts "?\\xff encoding is #{?\xff.encoding}"
Output
MRI output
ABC[0] encoding is US-ASCII
?\xff encoding is ASCII-8BIT
macruby output
ABC[0] encoding is UTF-8
?\xff encoding is UTF-8
The encodings reported above did not seem to be effected by the encoding
of the source file. I tried both ASCII and UTF-8.
When the same code is executed in (mac)irb the results are the same for
macirb as they are for macruby.
irb for MRI however produces UTF-8 strings in both cases! This seemed very
odd but I'm fairly sure it's because I have an environment variable:
LANG=GB.UTF-8
When I changed to LANG=GB.US_ASCII irb for MRI rendered 'abc'[0] with
US_ASCII encoding. macirb still used UTF-8.
(I discovered this when trying to get ruby-mysql to work with macruby. It
doesn't work as-is but seems to work with a few mods that use
force_encoding to make MRI and macruby produce the same outputs).
I abandoned my earlier attempts to use postgres with macruby via the pg
gem. It failed regularly but in unpredictable ways associated, as far as
I could tell, with memory management problems.
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>> ___
>>> MacRuby-devel mailing list
>>> [email protected]
>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>> ___
>> MacRuby-devel mailing list
>> [email protected]
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] linking an NSTextView with my AppDelegate
Thanks Laurent! I don't have access to the beta, but the workaround works. On Sep 18, 2011, at 4:02 AM, Laurent Sansonetti wrote: > Hi Brice, > > AFAIK, IB support in Xcode4 was broken for a long time but has been > fixed in the beta builds. Unless you can't use the beta, > http://www.macruby.org/trac/ticket/1322 contains a workaround. > > Laurent > > On Mon, Sep 12, 2011 at 9:37 PM, Brice Ruth wrote: >> Good afternoon - >> >> I saw a thread from August indicating that there was an issue with Xcode 4 >> on Lion w/r/t linking in IB (matched exactly what I'm seeing). I went and >> grabbed the latest Xcode 3.x and installed it on Lion - I now have the old >> IB, but I still can't seem to see the attrs defined in my AppDelegate when I >> try to link the TextView. Not sure what I'm doing wrong ... would anyone >> mind stepping me through in a little more detail or pointing me to a more >> detailed walk through? I was using Xcode 4 on Snow Leopard and everything >> seemed to be working peachy ... I'm now on Lion, working on a new NSTextView >> and I can't get it to link to anything anymore. >> >> I saw one response indicating that you need to tell IB to read the files - I >> see a "Read class files ..." option in the menu - when I point that at my >> AppDelegate, I get an error dialog in IB, when I point it at main_rb, I >> don't get an error, but it still doesn't appear to work. >> >> I can't make heads or tails of the XML in the .xib, either - so no hope >> there. >> >> Much obliged, >> >> Brice Ruth, FCD >> Software Engineer, Madison WI >> >> ___ >> MacRuby-devel mailing list >> [email protected] >> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel >> >> > ___ > MacRuby-devel mailing list > [email protected] > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
[MacRuby-devel] Apps in the MAS built with MacRuby
Hey guys, For an upcoming presentation I’m giving (on saturday at SecondConf) I’d like to have an updated list of apps built with MacRuby which are available in the Mac App Store. So please let me know about your apps! Cheers, Eloy ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] Apps in the MAS built with MacRuby
Briquette - http://briquetteapp.com/ On Sunday, September 18, 2011 at 11:52 AM, Eloy Duran wrote: > Hey guys, > > For an upcoming presentation I’m giving (on saturday at SecondConf) I’d like > to have an updated list of apps built with MacRuby which are available in the > Mac App Store. > > So please let me know about your apps! > > Cheers, > Eloy > ___ > MacRuby-devel mailing list > [email protected] (mailto:[email protected]) > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] Apps in the MAS built with MacRuby
http://www.coon-and-friends.com/html-slide-presenter.html http://www.thumperapp.com/ dw On Sep 18, 2011, at 9:53 AM, Eloy Duran wrote: > Hey guys, > > For an upcoming presentation I’m giving (on saturday at SecondConf) I’d like > to have an updated list of apps built with MacRuby which are available in the > Mac App Store. > > So please let me know about your apps! > > Cheers, > Eloy > ___ > MacRuby-devel mailing list > [email protected] > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] Apps in the MAS built with MacRuby
Mine's a simple little app: http://luckymac.com/ If you want a code for it just let me know! Aston On 18 Sep 2011, at 16:52, Eloy Duran wrote: > Hey guys, > > For an upcoming presentation I’m giving (on saturday at SecondConf) I’d like > to have an updated list of apps built with MacRuby which are available in the > Mac App Store. > > So please let me know about your apps! > > Cheers, > Eloy > ___ > MacRuby-devel mailing list > [email protected] > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] Apps in the MAS built with MacRuby
if I make a little game with gosu, can I put it on MAS? On Sun, Sep 18, 2011 at 7:11 PM, [email protected] wrote: > Mine's a simple little app: > > http://luckymac.com/ > > If you want a code for it just let me know! > > Aston > > On 18 Sep 2011, at 16:52, Eloy Duran wrote: > > > Hey guys, > > > > For an upcoming presentation I’m giving (on saturday at SecondConf) I’d > like to have an updated list of apps built with MacRuby which are available > in the Mac App Store. > > > > So please let me know about your apps! > > > > Cheers, > > Eloy > > ___ > > MacRuby-devel mailing list > > [email protected] > > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > ___ > MacRuby-devel mailing list > [email protected] > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > -- Pavlos Vinieratos ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] Apps in the MAS built with MacRuby
If it's made with MacRuby, yes: http://astonj.com/tech/how-to-submit-your-macruby-app-to-the-mac-app-store/ On 18 Sep 2011, at 17:20, Pavlos Vinieratos wrote: > if I make a little game with gosu, can I put it on MAS? > > On Sun, Sep 18, 2011 at 7:11 PM, [email protected] wrote: > Mine's a simple little app: > > http://luckymac.com/ > > If you want a code for it just let me know! > > Aston > > On 18 Sep 2011, at 16:52, Eloy Duran wrote: > > > Hey guys, > > > > For an upcoming presentation I’m giving (on saturday at SecondConf) I’d > > like to have an updated list of apps built with MacRuby which are available > > in the Mac App Store. > > > > So please let me know about your apps! > > > > Cheers, > > Eloy > > ___ > > MacRuby-devel mailing list > > [email protected] > > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > ___ > MacRuby-devel mailing list > [email protected] > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > > > -- > Pavlos Vinieratos > ___ > MacRuby-devel mailing list > [email protected] > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] -twolevel_namespace issue?
I will see if that can work. So the approache would be to statically compile the sqlite lib that ships with amalgalite, and separately link it to the extension vs. compiling it all together as it does today. I will give those options a try and see who it all works. Thanks for the info, compiler flags and linking options are not my forte. -jeremy On Sun, Sep 18, 2011 at 11:10:49AM +0200, Laurent Sansonetti wrote: > Hi Jeremy, > > Could the problem be fixed by linking statically your own copy of > SQLite against the Amalgalite library, and perhaps passing all SQLite > symbols to -unexported_symbols_list during ld time? I am guessing > symbols wouldn't collide anymore this way. > > From what I understand, it looks like it would be better to fix the > problem in Amalgalite itself, and not in each client requiring it. > > Laurent > > On Mon, Sep 12, 2011 at 8:39 PM, Jeremy Hinegardner > wrote: > > Hey all, > > > > I develop the Amalgalite gem[1] and it ships with its own copy of SQLite. > > It does this as it adds in additional compile-time features, and I try and > > keep it as current as posssible. > > > > The problem is that since MacRuby is linked to CoreServices etc, the sqlite > > library that ships with OSX gets linked at runtime before the sqlite library > > that is built into the amalgalite gem extension. ?I've encountered this > > before[2] with amalgalite, when it was loaded with my 'hitimes' gem (which > > on osx links > > against -framework CoreServes). > > > > I am wondering what the appropriate approach is here. I was able to fix > > this in > > MRI by compiling MRI with -twolevel_namespace and I think there is an open > > ticket > > with ruby-core to see if MRI on osx should be compiled with that flag. > > > > I attempted to compile MacRuby with -twolevel_namespace to resolve this, > > and I > > was unsuccessful. There appeared to be other flags that conflicted with it. > > > > I would expect something like this may also affect the nokogiri gem as > > limxml2 > > is also a system library on osx, and may conflict with the version that > > nokogiri > > expects. > > > > Thoughts? Opinions? I'm sure this is a rare case, Amalgalite may be the only > > project that could experience an issue like this. What is the best way to > > handle > > this in the MacRuby ecosystem? > > > > enjoy, > > > > -jeremy > > > > [1] - https://github.com/copiousfreetime/amalgalite > > [2] - > > https://github.com/copiousfreetime/amalgalite/blob/master/lib/amalgalite/sqlite3/version.rb#L42-L56-54 > > -- > > > > ?Jeremy Hinegardner ? ? ? ? ? ? ? ? ? ? ? ? ? ? [email protected] > > > > ___ > > MacRuby-devel mailing list > > [email protected] > > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > -- Jeremy Hinegardner [email protected] ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] Apps in the MAS built with MacRuby
Thanks everybody! I’ll compile a list tomorrow and also add it to the github wiki. ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
