Category Archives: RubyCocoa

Feature added to RubyCocoa Regular Expression Checker

Get the new app in the Box widget (to your right). This version lets you see the string(or substring) that was matched. I have not tested this extensively. The usual disclaimers apply.

Advertisements

Major RubyCocoa update

Very nice update and a new wiki based site for RubyCocoa. Check out the new version. The documentation seems to be better, etc. I’ll be updating my little Regular Expression utility so that potential users don’t have to download RubyCocoa to actually run it. I’ll keep you posted.

It looks like other RubyCocoa programmers can register and contribute to the community through the Wiki on the website.

In other news, BridgeSupport offers a framework for helping create new bridges between language “X” and Cocoa. A nod from Apple to the bridge developers.

(news from Daring Fireball and MacResearch)

A Basic RubyCocoa tutorial

I have uploaded a pdf file in the blue Box widget to your left. The pdf file is called rbcocoa.pdf. Drop me a comment if you can’t see the Box widget for some reason(recent versions of Safari, Camino and Firefox should display it fine)

The document is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 license

Disclaimer stuff:

5. Representations, Warranties and Disclaimer

UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND ONLY TO THE EXTENT OF ANY RIGHTS HELD IN THE LICENSED WORK BY THE LICENSOR. THE LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MARKETABILITY, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.

6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

A RubyCocoa Regular Expression Checker

Update: 6:45 p.m. GMT, As far as I know, you can just install the binary package of RubyCocoa and the default Apple installation of Ruby will be sufficient to make this app work.

Update: 6:19 p.m. GMT, I fixed a bug in the checker. Get the new one as usual from the Box widget.

Application icon credits: rox-ruby

I have uploaded a little Regular Expression checker I made in RubyCocoa(see RegEx.dmg in my Box widget to your left). I only have an Intel Mac to test it on, so I have no idea whether it will run correctly on PPC Macs. The code is licensed under the GPLv2. It may be the case the that you need RubyCocoa properly installed to run this app. See my post on installing BioRuby for Mac OS X for a link to Dan Benjamin’s instructions on updating your Ruby installation(adapt these instructions accordingly for Ruby 1.8.5). For installing RubyCocoa under Ruby 1.8.5, if memory serves, these commands (once you extract the files from the archive and go to the to-level directory of RubyCocoa),

$ ruby install.rb –help # print all options

$ ruby install.rb config

$ ruby install.rb setup

from this website are the key instructions. You may have to prefix sudo in one of the above three commands.

Screenshot:

Screenshot


			    NO WARRANTY
  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.

Exploring the RubyCocoa binding

The RubyCocoa binding is pretty neat(similar to the PyObjC binding, except the PyObjC binding is probably more mature). I was able to add a nice Cocoa GUI to my bioinformatics class very easily(well, I had to install RubyCocoa properly first). Apparently, if you are not using the Apple-supplied version of Ruby, it is better to build the RubyCocoa library from source.

Among other cool features, this gives me easy access to the regular expression library of Ruby(not to mention other easy to use libraries). I am aware of OgreKit and OmniGroup’s regular expression library, but those are a bear to install(well, I suppose OgreKit is not that hard, but Ruby’s style of regular expressions is just so much easier to use).

I will put up guidelines on how to get the RubyCocoa binding working later.