Re: [MacRuby-devel] How dead is dead...

2014-04-29 Thread Patrick Hanevold
(Sorry if this mail shows up multiple times, the mailing list suddenly has
some issues with my gmail accounts, so this is yet another repost attempt)

Cool, another dead horse to kick.
It works for starters.

cocoa is a more direct approach where methods are equivalent to the apple
docs - as they are bindings, not some wrapped up stubs.
I would probably guess there is a lot of stuff not even accessible through
rubyobjc - if you even get that 6 year old thing up and running.

cocoa exploits modern ruby to use keyword arguments and everything that
makes ruby quite equivalent to what you would do in objective-c.

cocoa is a modern integration, and here is a example usage that will
probably massage your marble for a moment.
Here you see multiple tasks of NSTableViewDelegate. Notice how cocoa
exploit keyword arguments to allow you to define the same method twice,
with different keyword arguments equivalent to the two tasks selectors.


def tableView(table_view, objectValueForTableColumn: nil, row: nil)
  cache[row].send(objectValueForTableColumn.identifier.to_s.to_sym).to_s
end


def tableView(table_view, shouldSelectRow: nil)
  hooks[:on_select_row].call(shouldSelectRow) if hooks[:on_select_row]
  true
end

Patrick

Mvh.
Patrick Hanevold



On Tue, Apr 29, 2014 at 2:48 AM, Kevin Walzer  wrote:

> On 4/28/14, 7:21 PM, Patrick Hanevold wrote:
>
>> There is only the github at the moment
>> (https://github.com/patrickhno/cocoa).
>> If you guys have a suggestion for a particular flavor of mailing list,
>> sure - I can set one up and participate.
>>
>> Patrick
>>
>>
> How does this gem compare to rubyobjc:
>
> https://github.com/timburks/rubyobjc
>
> ?
>
>
> --
> Kevin Walzer
> Code by Kevin/Mobile Code by Kevin
> http://www.codebykevin.com
> http://www.wtmobilesoftware.com
>
> ___
> MacRuby-devel mailing list
> [email protected]
> https://lists.macosforge.org/mailman/listinfo/macruby-devel
>
___
MacRuby-devel mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macruby-devel


Re: [MacRuby-devel] How dead is dead...

2014-04-29 Thread Patrick Hanevold

OK, lets do a poll then, the target audience is right here I would guess.

What's your preferred flavour of mailing list / group manager for the cocoa gem?

Patrick

On 29 Apr 2014, at 15:57, Perry E. Metzger  wrote:

> On Tue, 29 Apr 2014 15:48:38 +0200 Patrick Hanevold
>  wrote:
>> 
>> There is only github for now:
>> https://github.com/patrickhno/cocoa
> 
> You should fix that. It would make it easier to have a community
> develop, and google groups are trivial to start...
> 
> Perry
> 
>> 
>> Pro tip: Quite easy to look up the repository origin of gems on
>> rubygems.org
>> 
>> Patrick
>> 
>> On 29 Apr 2014, at 15:42, Perry E. Metzger 
>> wrote:
>> 
>>> You mention no mailing list or web site...
>>> 
>>> Perry
>>> 
>>> On Tue, 29 Apr 2014 10:07:50 +0200 Patrick Hanevold
>>>  wrote:
 (Sorry if this mail shows up multiple times, the mailing list
 suddenly has some issues with my gmail accounts, so this is yet
 another repost attempt)
 
 Cool, another dead horse to kick.
 It works for starters.
 
 cocoa is a more direct approach where methods are equivalent to
 the apple docs - as they are bindings, not some wrapped up stubs.
 I would probably guess there is a lot of stuff not even
 accessible through rubyobjc - if you even get that 6 year old
 thing up and running.
 
 cocoa exploits modern ruby to use keyword arguments and
 everything that makes ruby quite equivalent to what you would do
 in objective-c.
 
 cocoa is a modern integration, and here is a example usage that
 will probably massage your marble for a moment.
 Here you see multiple tasks of NSTableViewDelegate. Notice how
 cocoa exploit keyword arguments to allow you to define the same
 method twice, with different keyword arguments equivalent to the
 two tasks selectors.
 
 
   def tableView(table_view, objectValueForTableColumn: nil, row:
 nil)
 cache[row].send(objectValueForTableColumn.identifier.to_s.to_sym).to_s
 end
 
 
   def tableView(table_view, shouldSelectRow: nil)
 hooks[:on_select_row].call(shouldSelectRow) if
 hooks[:on_select_row] true
   end
 
 Patrick
 
 Mvh.
 Patrick Hanevold
 
 
 
 On Tue, Apr 29, 2014 at 2:48 AM, Kevin Walzer
  wrote:
 
> On 4/28/14, 7:21 PM, Patrick Hanevold wrote:
> 
>> There is only the github at the moment
>> (https://github.com/patrickhno/cocoa).
>> If you guys have a suggestion for a particular flavor of
>> mailing list, sure - I can set one up and participate.
>> 
>> Patrick
>> 
>> 
> How does this gem compare to rubyobjc:
> 
> https://github.com/timburks/rubyobjc
> 
> ?
> 
> 
> --
> Kevin Walzer
> Code by Kevin/Mobile Code by Kevin
> http://www.codebykevin.com
> http://www.wtmobilesoftware.com
> 
> ___
> MacRuby-devel mailing list
> [email protected]
> https://lists.macosforge.org/mailman/listinfo/macruby-devel
> 
>>> 
>>> 
>>> 
>>> -- 
>>> Perry E. [email protected]
>> 
> 
> 
> 
> -- 
> Perry E. Metzger  [email protected]

___
MacRuby-devel mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macruby-devel


Re: [MacRuby-devel] How dead is dead...

2014-04-29 Thread Kevin Walzer

On 4/29/14, 10:01 AM, Patrick Hanevold wrote:


OK, lets do a poll then, the target audience is right here I would guess.

What's your preferred flavour of mailing list / group manager for the
cocoa gem?

Patrick


Any way to expand the focus here?

A "Ruby-Mac" list (focusing on using Ruby in general for app development 
on the Mac) would bring in devs from non-Cocoa frameworks. My model here 
is the Python-Mac SIG list, which includes PyObjC, wxPython, 
Python-Tkinter, PyQt and others.


One reason I found MacRuby so frustrating to work with (and hence of 
little interest) was that it wasn't really Ruby. A lot of Ruby gems 
wouldn't build, you couldn't use it with other UI toolkits, and its app 
deployment tools could not be abstracted.


One benefit of a "Ruby-Mac" list (as opposed to MacRuby) is that it 
allow developers from various frameworks to exchange ideas, and perhaps 
the community could evolve that would develop some best practices that 
can be used in both a Cocoa and non-Cocoa context.


One immediate example is "rb2app." I'm developing a prototype tool that 
will allow me to deploy Ruby-Tk apps in a standalone manner. Right now 
it's a stub launcher written in C, a custom build of Ruby in MacPorts, 
and a shell script to run install_name_tool. It would be great if this 
could be generalized into a more useful package that can handle 
Ruby-Cocoa apps, and others.


I'm not an expert in Ruby...still learning the language...but I like 
what I see in the language, its libraries, and community, and definitely 
want to dive in and do some real app development in it.


While the tool exist for Ruby desktop app development on the Mac, there 
is a real poverty of deployment tools. There are two or three different 
such tools on Ruby for Windows but they are non-portable. By my count 
there are at least three actively maintained deployment tools for Python 
(py2app, cx_freeze, and pyinstaller). It's baffling to me why no such 
tool has been developed for Ruby on the Mac.


The Python-Mac list supports all kinds of discussion: PyObjC, other GUI 
toolkits with Mac-specific quirks, general Python questions that may be 
specific to the Mac, and deployment questions.


It would be great if this list could be similarly expanded. Cocoa would 
perhaps be its main focus because most of the developers are interested 
in that. But there should be room for others also. JRuby could also find 
a home here as well.


Thoughts?

--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
___
MacRuby-devel mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macruby-devel


Re: [MacRuby-devel] How dead is dead...

2014-04-29 Thread Perry E. Metzger
On Tue, 29 Apr 2014 16:01:08 +0200 Patrick Hanevold
 wrote:
> 
> OK, lets do a poll then, the target audience is right here I would
> guess.
> 
> What's your preferred flavour of mailing list / group manager for
> the cocoa gem?

Not Yahoo. Beyond that, not much matters. Google Groups seems no worse
than anything else, and has the advantage that you can set it up with
nearly no effort. 

-- 
Perry E. [email protected]
___
MacRuby-devel mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macruby-devel


Re: [MacRuby-devel] How dead is dead...

2014-04-29 Thread Perry E. Metzger
On Tue, 29 Apr 2014 10:23:21 -0400 Kevin Walzer 
wrote:
> Any way to expand the focus here?
> 
> A "Ruby-Mac" list (focusing on using Ruby in general for app
> development on the Mac) would bring in devs from non-Cocoa
> frameworks.

That seems like a good idea, too, though I would expect Patrick would
still like a list just for his stuff.

Anyway, you need not really ask, you can just set up a Google group
called "Ruby-Mac", and maybe tell the Ruby Weekly people about it as
well as us...

-- 
Perry E. [email protected]
___
MacRuby-devel mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macruby-devel


Re: [MacRuby-devel] How dead is dead...

2014-04-29 Thread Francis Chong
Hey this look very interesting! 

First question when I checked the examples, when should I use autorelease 
“NSMenu.new.autorelease” and when should I not to? Do I need to retain manually?

On Apr 29, 2014, at 7:21 AM, Patrick Hanevold  
wrote:

> There is only the github at the moment (https://github.com/patrickhno/cocoa).
> If you guys have a suggestion for a particular flavor of mailing list, sure - 
> I can set one up and participate.
> 
> Patrick
> 
> On 29. apr. 2014, at 01:10, "Perry E. Metzger"  wrote:
> 
>> On Mon, 28 Apr 2014 23:00:28 +0200 Patrick Hanevold
>>  wrote:
>>> I suggest people interested in cocoa in ruby help out refining the
>>> cocoa gem instead of hoping for any progress on mac ruby which is
>>> abandoned by its creators for commercial interests. The cocoa gem
>>> is quite useful all ready, but need to mature a bit in some cases.
>> 
>> Is there a list or web site for the cocoa gem?
>> 
>> Perry
>> -- 
>> Perry E. [email protected]
> ___
> MacRuby-devel mailing list
> [email protected]
> https://lists.macosforge.org/mailman/listinfo/macruby-devel

___
MacRuby-devel mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macruby-devel


Re: [MacRuby-devel] How dead is dead...

2014-04-29 Thread Patrick Hanevold
I think we should release all instances on garbage collection, but currently we 
don't.
But I guess it's the next thing up.

Patrick

On 29. apr. 2014, at 19:03, Francis Chong  wrote:

> Hey this look very interesting! 
> 
> First question when I checked the examples, when should I use autorelease 
> “NSMenu.new.autorelease” and when should I not to? Do I need to retain 
> manually?
> 
> On Apr 29, 2014, at 7:21 AM, Patrick Hanevold  
> wrote:
> 
>> There is only the github at the moment (https://github.com/patrickhno/cocoa).
>> If you guys have a suggestion for a particular flavor of mailing list, sure 
>> - I can set one up and participate.
>> 
>> Patrick
>> 
>> On 29. apr. 2014, at 01:10, "Perry E. Metzger"  wrote:
>> 
>>> On Mon, 28 Apr 2014 23:00:28 +0200 Patrick Hanevold
>>>  wrote:
 I suggest people interested in cocoa in ruby help out refining the
 cocoa gem instead of hoping for any progress on mac ruby which is
 abandoned by its creators for commercial interests. The cocoa gem
 is quite useful all ready, but need to mature a bit in some cases.
>>> 
>>> Is there a list or web site for the cocoa gem?
>>> 
>>> Perry
>>> -- 
>>> Perry E. [email protected]
>> ___
>> MacRuby-devel mailing list
>> [email protected]
>> https://lists.macosforge.org/mailman/listinfo/macruby-devel
> 
> ___
> MacRuby-devel mailing list
> [email protected]
> https://lists.macosforge.org/mailman/listinfo/macruby-devel
___
MacRuby-devel mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macruby-devel