Re: [MacRuby-devel] Sequel and macruby

2011-09-14 Thread Morgan Schweers
-- Morgan On Tue, Sep 13, 2011 at 8:53 AM, Wladjmir Godioz wrote: > Hi, > > thanks your tweak still works for this basic example. > you filed a bug report for this? > > > Message: 1 > Date: Thu, 8 Sep 2011 11:00:05 -0700 > From: Morgan Schweers > To: "MacRu

Re: [MacRuby-devel] Sequel and macruby

2011-09-08 Thread Morgan Schweers
Greetings, You can check out an old thread on this subject: http://lists.macosforge.org/pipermail/macruby-devel/2011-April/007547.html I lost the plot somewhere in there, and never got back to it. :( -- Morgan On Wed, Sep 7, 2011 at 9:15 AM, Wladjmir Godioz wrote: > Hi, > > in my first exper

Re: [MacRuby-devel] macruby does not compile for me on Lion with xcode 4.1

2011-07-23 Thread Morgan Schweers
Greetings, +1; I can't even get past: encoding.h:22:30: error: unicode/ustring.h: No such file or directory Sad fox. I'm pulling down XCode 4.2 to see if that works better... -- Morgan On Fri, Jul 22, 2011 at 6:39 AM, Marvin Frick wrote: > Hi, > > I have some trouble compiling MacRuby on Lio

Re: [MacRuby-devel] 0.11 schedule

2011-06-20 Thread Morgan Schweers
gt; > Laurent > > On Mon, Jun 20, 2011 at 3:43 PM, Morgan Schweers > wrote: > > Greetings, > > I just yesterday ran into a problem with the head of MacRuby on GitHub > that > > makes it not possible to use Mechanize/Nokogiri, specifically the > > redefiniti

Re: [MacRuby-devel] 0.11 schedule

2011-06-20 Thread Morgan Schweers
Greetings, I just yesterday ran into a problem with the head of MacRuby on GitHub that makes it not possible to use Mechanize/Nokogiri, specifically the redefinition of Node? I see this if I just go $ macirb irb> require 'rubygems' irb> require 'mechanize' It looks like a bundle gets loaded that

Re: [MacRuby-devel] Fwd: How do I get gems into XCode/MacRuby environment?

2011-04-15 Thread Morgan Schweers
Greetings, Interesting; I actually eschew rvm for macruby stuff, so I use 'rvm system' whenever I want to interact with MacRuby, otherwise the gems get confused. -- Morgan On Thu, Apr 14, 2011 at 8:59 PM, Paul Davis wrote: > Okay, one elegant way to do make gems visible to MacRuby in XCode4 is

Re: [MacRuby-devel] MacRuby 0.10 Sqlite3 and Sequel

2011-04-12 Thread Morgan Schweers
record end end end Adding that to the gist, after the requires makes it work. I'll fork the gist and add that code, to demonstrate. Hope that formats okay, and helps! -- Morgan Schweers On Sat, Apr 9, 2011 at 4:55 PM, Morgan Schweers wrote: > Greetings, > It is a pret

Re: [MacRuby-devel] MacRuby 0.10 Sqlite3 and Sequel

2011-04-09 Thread Morgan Schweers
Greetings, It is a pretty reduced test case, in fact. I dug into it briefly, but it quickly went over my head... It's clear there's a difference in how the stack is unwound when a block return happens eight-ish levels down, between the two. It looks like in MRI code that is later in methods that

Re: [MacRuby-devel] MacRuby-devel Digest, Vol 37, Issue 51

2011-03-31 Thread Morgan Schweers
Greetings, Yeah, I remember being shocked when I poked at a 'method_missing' kind of thing on Objective C and realized that it was totally doable... I had a little fun with it, before punting and going back to a language where it's easy. :) Check out: http://goo.gl/bz50U -- Morgan On Thu, Mar

[MacRuby-devel] How to do Drag and Drop

2011-03-30 Thread Morgan Schweers
he 40k limit on the mailing list. You can view my drag-and-drop answer here: https://docs.google.com/document/pub?id=1htdHAArZ0g0ooDiSdTJ89vUhUHmPoHJjlsF9MNrYA1A Hopefully it helps... I should build it into a proper blog post and gists and stuff... -- Morgan Schweers, CyberFOX! On Wed, Mar 3

Re: [MacRuby-devel] Tyro Needs Ruby vs. O-C Advice

2011-03-30 Thread Morgan Schweers
Greetings, Hell, I spend most of my time in Java, and I find the objc verbosity to be...uhhh...pretty familiar. ;) Joking aside, I'll often take common ObjC patterns and 're-do' them the Ruby way so they're more efficient to the way my brain works. As an example from a recent bit of code, you hav

[MacRuby-devel] Shoulda incompatible with MacRuby

2011-03-19 Thread Morgan Schweers
Greetings, Shoulda defines tests via: test_name = ["test: ", full_name, "should", "#{should[:name]}. " ].flatten.join(' ').to_sym test_unit_class.send(:define_method, test_name) do . . . end which fails because the ':' is treated as a selector part of the function name... I've pa

[MacRuby-devel] Core Data brain-o

2011-03-19 Thread Morgan Schweers
Greetings, I was trying to set up automatic migration, and did this brain-o, which will be obvious to most folks, but stumped me for a little bit: psc_options = { NSMigratePersistentStoresAutomaticallyOption:NSNumber.numberWithBool(true), NSInferMappingModelAutomaticallyOption:NSNumber.n

Re: [MacRuby-devel] TIL - Uncaught exceptions in threads cause SIGABRT in the main thread!

2011-03-14 Thread Morgan Schweers
milar is true in MacRuby. Matt > Hope that helps. -- Morgan Schweers On Mar 13, 2011, at 6:31 PM, Morgan Schweers wrote: > > Greetings, > Today I Learned :) if a thread throws an exception that isn't rescued by > the top of the thread, it'll crash the app's main thread

[MacRuby-devel] TIL - Uncaught exceptions in threads cause SIGABRT in the main thread!

2011-03-13 Thread Morgan Schweers
Greetings, Today I Learned :) if a thread throws an exception that isn't rescued by the top of the thread, it'll crash the app's main thread with 'Program received signal: “SIGABRT”.' That's been plaguing me since I started doing MacRuby development; every time I tried to start up multiple thread

[MacRuby-devel] Yellow Fade Technique on NSTableView

2011-02-27 Thread Morgan Schweers
real will be to make it a module, and 'include' it into delegates as needed. Hope folks enjoy! -- Morgan Schweers p.s. Please don't hesitate to let me know if you have problems with it, or if I'm making some tyro mistakes! ___ MacR

Re: [MacRuby-devel] MacRuby 0.8 EXC_BAD_ACCESS using NSPredicate against Core Data

2011-02-24 Thread Morgan Schweers
Greetings, What's the output up to the crash point? I didn't realize you could do Pointer.new(:id), I'm still using Pointer.new_from_type('@'). :) Check entityDescription for nil, also. If for some reason it can't resolve your entity it'll return nil, and that might blow up in a way like you're

[MacRuby-devel] Core Data / MacRuby article

2011-02-10 Thread Morgan Schweers
o not a really great technical writer, so feedback on how it's written is also welcome. Thanks muchly! -- Morgan Schweers ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Re: [MacRuby-devel] MacRuby Book discount

2011-02-03 Thread Morgan Schweers
coa, using predicates, contexts, and entities, but it's not clear if there's a way to do it in MacRuby which isn't just a 1:1 translation of Objective C to MacRuby. Hope that helps! -- Morgan Schweers ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Re: [MacRuby-devel] MacRuby Book discount

2011-02-03 Thread Morgan Schweers
Greetings, It's looking very interesting, and I bought it...! I have to admit I'm slightly frustrated by the parts that go deep into the non-MacRuby aspects of Mac OS X development (IB and the entity designer) and then skim over what I feel are important details. The chapter I always come back to

Re: [MacRuby-devel] Ruby sort algorithm

2011-01-31 Thread Morgan Schweers
> > Thanks, > Bob Rice > > On Jan 31, 2011, at 4:57 AM, Morgan Schweers wrote: > > Greetings, > The long example didn't work quite right. You can see it here: > https://gist.github.com/803842 > > -- Morgan > > On Mon, Jan 31, 2011 at 1:55 AM, Morgan

Re: [MacRuby-devel] Ruby sort algorithm

2011-01-31 Thread Morgan Schweers
Greetings, On Mon, Jan 31, 2011 at 11:00 AM, Charles Oliver Nutter wrote: > FWIW, JRuby originally had a stable Array#sort, but because it was > slower than MRI's unstable sort (and we got bug reports to that > effect) we replaced it with an unstable hybrid sort based on > quicksort. Shortly aft

Re: [MacRuby-devel] Ruby sort algorithm

2011-01-31 Thread Morgan Schweers
Greetings, The long example didn't work quite right. You can see it here: https://gist.github.com/803842 -- Morgan On Mon, Jan 31, 2011 at 1:55 AM, Morgan Schweers wrote: > Greetings, > Ouch. That's...probably painfully expensive for large @children arrays. > Trying to u

Re: [MacRuby-devel] Ruby sort algorithm

2011-01-31 Thread Morgan Schweers
> new_arr.insert( index - 1, new_child ) > > > else > new_arr[ index ] = new_child > prior_child = new_child > end > end > break unless change > > > modified = true > arr = new_arr > end > return unless modified > > > @children = arr.map{ |

Re: [MacRuby-devel] Ruby sort algorithm

2011-01-30 Thread Morgan Schweers
Greetings, Ruby's sort algorithm is quicksort, last I checked, and quicksort is not stable (which is the property you're looking for in a sort). There are a bunch of ways around this, including writing your own, but one cute, quick, but possibly performance-impairing, approach I've seen (Matz's su