[Ironruby-core] Sinatra, and web enabling existing .NET codebases

2009-07-10 Thread Kevin Radcliffe
Aaron Quint gave a very interesting talk at GoGaRuCo: http://pivotallabs.com/gogaruco/talks/51-sinatra-the-framework-within About using sinatra to quickly and easily REST-enable libraries. I think this might be a very good fit where we'd like to web/REST enable our existing .NET codebase assets.

[Ironruby-core] IronRuby "Fusion" (VB6 , VBScript, Javascript)

2009-07-10 Thread Kevin Radcliffe
In the same vein as VB "Fusion": http://msdn.microsoft.com/en-us/vbrun/ms788241.aspx I've found that creating a COM-callable wrapper that hosts IronRuby is pretty easy to put together. I actually was initially trying to be able to execute IronRuby from VB6 (using vbScript) and I got that working.

Re: [Ironruby-core] win32console and color

2009-07-10 Thread Will Green
Though it's not gemified, it does work for very simple strings (one control code), and only for Kernel#print. Overriding Kernel#puts would be very similar. What I could really use help on is parsing the ANSI control codes, for more complex strings (like setting both foreground and background). Sad

Re: [Ironruby-core] Use of case operator

2009-07-10 Thread Ryan Riley
Not sure, but this thread may shed some light: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/103216. You could get the result from the =~ operation, then transform using the .to_bool extension suggested above. Ryan Riley ryan.ri...@panesofglass.org http://panesofglass.org/ http://w

Re: [Ironruby-core] Use of case operator

2009-07-10 Thread Ivan Porto Carrero
you can always do something like!!(/[AEIOU]/i =~ self) That will return true or false --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Fri,

Re: [Ironruby-core] Use of case operator

2009-07-10 Thread CDurfee
Agreed, only nil and false are false. In my scenario, I take the result of the Ruby function and feed it back to C#. Here's where it is nice to have either an instance of the TrueClass or FalseClass; otherwise, I need to teach my C# application the Ruby rules for converting an integer to a Bool

Re: [Ironruby-core] Use of case operator

2009-07-10 Thread Pete Bacon Darwin
That's OK because in Ruby 0 is true! (Only nil and false are false) From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of cdur...@tsys.com Sent: 10 July 2009 16:21 To: ironruby-core@rubyforge.org Cc: ironruby-core@rubyforge.org; ironruby-core-boun.

Re: [Ironruby-core] Use of case operator

2009-07-10 Thread CDurfee
Sorry, yes, I know about the =~ operator, but I believe that returns an integer (the position of the first match) or nil, not a Boolean as I require. -- Chuck -- Chuck Durfee Sr. Internet Software Developer TSYS iSolutions, Golden Email cdur...@tsys.com Kibiz0r Sent by: ironruby-core-bou

Re: [Ironruby-core] Use of case operator

2009-07-10 Thread Kibiz0r
Chuck, Yes, there's an operator just for this scenario! The regular expression operator: =~ Mike On Fri, Jul 10, 2009 at 10:34 AM, wrote: > > I'm fairly new to Ruby, and I have a usage question. > > There are times when I want to know if a regular expression matches a given > input. For exam

[Ironruby-core] Use of case operator

2009-07-10 Thread CDurfee
I'm fairly new to Ruby, and I have a usage question. There are times when I want to know if a regular expression matches a given input. For example: class String def containsVowel? /[AEIOU]/i === self end end Is there a common Ruby idiom for this, or is usi