Re: [MacRuby-devel] Scripting Terminal.app with ScriptingBridge

2011-06-02 Thread Scott Thompson
> > I'm playing around with Scripting Bridge trying to script > Terminal.app. I'm running into issues with adding a new tab to a > window, and was hoping someone could point me in the right direction. > Consider this gist: https://gist.github.com/1005066 > > The only information I could find that

Re: [MacRuby-devel] Hey Apple, please be nice and share

2011-03-09 Thread Scott Thompson
On Mar 7, 2011, at 7:56 PM, Rob Gleeson wrote: > > On 7 Mar 2011, at 22:59, Thibault Martin-Lagardette wrote: > >> Even though I totally would rather see MacRuby as a public framework just >> like everyone else here, isn't the reason because once it's in the Public >> frameworks, Apple would

Re: [MacRuby-devel] A question about OSX APIs.

2010-08-25 Thread Scott Thompson
On Aug 25, 2010, at 12:03 AM, Rob Gleeson wrote: > > Thanks for the reply Caio, > > Yeah that application looks promising but it doesn't do what I want, exactly. > It's still nice and proof that it's most likely possible to do something like > this. > > I want to create groups that you can c

Re: [MacRuby-devel] A question about OSX APIs.

2010-08-24 Thread Scott Thompson
On Aug 24, 2010, at 10:34 PM, Rob Gleeson wrote: > Hey MacRubyists, > > This question isn't strictly MacRuby related, but if I get an answer I'd like > to try and implement it in MacRuby. > > The OSX WM doesn't seem to be able to treat a stack of windows as an > individual stack that you can

Re: [MacRuby-devel] Fibers and Enumerators

2010-08-13 Thread Scott Thompson
On Aug 13, 2010, at 5:38 PM, Ernest N. Prabhakar, Ph.D. wrote: > Hi Scott, > > On Aug 13, 2010, at 1:46 PM, easco wrote: >>> Remember, nobody is defending the POSIX pthread APIs here, they're saying >>> that GCD makes Fibers less relevant... >> >> GCD makes Fibers less relevant so long as you

Re: [MacRuby-devel] Fibers and Enumerators

2010-08-11 Thread Scott Thompson
On Aug 11, 2010, at 7:23 AM, Louis-Philippe wrote: > Hi Scott, > > If you haven't done so already, you might want to have a look at: > http://www.macruby.org/documentation/gcd.html > > it speaks of MacRuby integrating Apple's latest multi-threading strategy: > Grand Central Dispatch. Grand Ce

[MacRuby-devel] Fibers and Enumerators

2010-08-10 Thread Scott Thompson
I recently had a discussion on a separate list about Coroutines and Cooperative Multitasking on Mac OS X. The general result of that discussion was that the "best" solutions were to either rely on the (deprecated) Carbon Thread Manager, use a more complex scheme involving pthreads and semaphore

Re: [MacRuby-devel] On the MacRuby web site

2010-06-03 Thread Scott Thompson
On Jun 3, 2010, at 9:17 PM, Matt Aimonetti wrote: > You are correct, the website would need an update. Thanks. I'm giving a presentation on an Introduction to Ruby tomorrow at work and I wanted to make sure I didn't misunderstand and pass on incorrect info. Scott

[MacRuby-devel] On the MacRuby web site

2010-06-03 Thread Scott Thompson
An item of curiosity more than anything else... I note that on the MacRuby.org web site, under the heading of "Why MacRuby?" the subheading of "Interpreter Performance"... it makes the claim that MacRuby is using YARV. Is this still the case? I was under the (perhaps mistaken) impression that

Re: [MacRuby-devel] MacRuby 0.5 vs. CG Bitmap Context

2010-03-06 Thread Scott Thompson
> The good news is that you might not need to worry about it in this > case. In 10.6, you can pass NULL (use 'nil' in MacRuby) as the first > argument to CGBitmapContextCreate, as long as you don't mind letting > CoreGraphics manage the memory allocation for you: I am very much aware of that. U

[MacRuby-devel] MacRuby 0.5 vs. CG Bitmap Context

2010-03-05 Thread Scott Thompson
I'm using MacRuby to work with CoreGraphics and having some trouble with pointers. My first attempt was to create the data for a bitmap context using NSMutableData: bitmap_data = NSMutableData.alloc.initWithLength(image_data_size) bitmap_context = CGBitmapContextCreate(

Re: [MacRuby-devel] dtrace and macruby

2009-12-20 Thread Scott Thompson
> I have not had any trouble running macruby through dtrace here, can you send > the contents of your dtrace script so that I can compare to my working files? Thanks to everyone for their suggestions. I was doing the prior work on my office computer (a Mac Pro). I tried the same thing on thi

[MacRuby-devel] dtrace and macruby

2009-12-17 Thread Scott Thompson
I'm trying to learn a bit more about dtrace and I thought that using it to add probes to macruby would be fun. I pulled up the sample dtrace scripts from the Macruby 0.5 b2 source and was working with the script: class World def say(message) puts message end end world = World.new world

Re: [MacRuby-devel] Low-ish level MacRuby interaction

2009-06-11 Thread Scott Thompson
Have you considered setting sync to true in your ruby code: STDOUT.sync = true This will tell stdout to flush after every write/puts etc. I was not aware of that option, but it sounds like just what I need. I will give it a try. Thank you very much! Oh noes! Busted. I had to switch to t

Re: [MacRuby-devel] Low-ish level MacRuby interaction

2009-06-11 Thread Scott Thompson
Have you considered setting sync to true in your ruby code: STDOUT.sync = true This will tell stdout to flush after every write/puts etc. I was not aware of that option, but it sounds like just what I need. I will give it a try. Thank you very much! Scott

Re: [MacRuby-devel] Low-ish level MacRuby interaction

2009-06-10 Thread Scott Thompson
On Jun 10, 2009, at 6:01 PM, Laurent Sansonetti wrote: Hi Scott! Here is a code snippet that hijacks stdout using an NSPipe. The idea is to first initialize the MacRuby VM (so that the standard descriptor objects are created), then use dup2(2), then evaluate your Ruby expressions. I

[MacRuby-devel] Low-ish level MacRuby interaction

2009-06-10 Thread Scott Thompson
Howdy folks, I'm working with MacRuby as it evolves and I've been enjoying it quite a lot. I'm trying to make use of the system in an unusual way and not having much luck. I thought I would post here and see if anyone has suggestions. What I'm trying to do is use MacRuby as an embedded