[MacRuby-devel] high-performance macruby: llvm and trading apps

2009-02-18 Thread Joel Reymont
I'm creating a Mac trading app, not unlike http://ninjatrader.com  
which is for Windows and uses .NET.


I need a DSL for writing trading systems which would run every time a  
price quote is received over the network, a few times per second. This  
suggests compiling trading strategies to machine code, e.g. using LLVM  
on the backend. This would allow me to make use of vector processing,  
for example, to squeeze the maximum out of multiple CPU cores.


I would also like a DSL to extend the app with new functionality,  
perhaps to build the GUI portion of the app itself.


It doesn't seem that MacRuby in its present state is suitable for  
writing trading systems that run several times per second and use  
vector processing. I don't see a good alternative either.


What would you folks suggest?

How much work would it be to run MacRuby on top of LLVM?

Thanks, Joel

---
http://tinyco.de
Mac Trading Apps




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


Re: [MacRuby-devel] HotCocoa subclassing NSView

2009-02-18 Thread Matt Aimonetti
Thanks for clarifying, since subclassing NSView seems to be pretty  
common and writing a mapping is a bit combersome, maybe we could add a  
CustomView + mapping.


What do you think?

-Matt

Sent from  my iPhone

On Feb 17, 2009, at 10:47, Richard Kilmer  wrote:

They do inherit constants, custom methods, etc (see lib/hotcocoa/ 
mapper.rb, NOTE: ugly file right now, is a target for refactor)


They are modules and those modules are mixed in.

Best,

Rich

On Feb 17, 2009, at 12:46 PM, Matt Aimonetti wrote:

Thanks Rich, but if I do what you recommended, I guess I would not  
be able to use all the NSView extra stuff defined by the existing  
NSView mapping (constants, custom methods etc..).


Wouldn't be better to make each mapping a mixin? That would allow  
us to reuse some default settings and subclassing a mapped class  
would give us all the mapping goodies.


- Matt



On Tue, Feb 17, 2009 at 4:33 AM, Richard Kilmer  
 wrote:

This is how I would do it:

class MyNewView < NSView

 def drawRect(rect)
 end

end

HotCocoa::Mappings.map :my_new_view => :"MyNewView" do
 defaults :frame => DefaultEmptyRect, :layout => {}

 def init_with_options(view, options)
   view.initWithFrame options.delete(:frame)
 end
end

Then in your code you can just use it like any HotCocoa mapped class:

my_new_view :frame => [0,0,10,10]

etc.

-rich



On Feb 17, 2009, at 4:15 AM, Matt Aimonetti wrote:

I'm working on a new HotCocoa sample and I need to subclass NSView  
to override drawRect and add few more methods.
I would like to be able to reuse all the goodies from HotCocoa and  
the view helper, what's the best way to do that?


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

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

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


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


Re: [MacRuby-devel] high-performance macruby: llvm and trading apps

2009-02-18 Thread Laurent Sansonetti

Hi Joel,

On Feb 18, 2009, at 4:38 AM, Joel Reymont wrote:

I'm creating a Mac trading app, not unlike http://ninjatrader.com  
which is for Windows and uses .NET.


I need a DSL for writing trading systems which would run every time  
a price quote is received over the network, a few times per second.  
This suggests compiling trading strategies to machine code, e.g.  
using LLVM on the backend. This would allow me to make use of vector  
processing, for example, to squeeze the maximum out of multiple CPU  
cores.


I would also like a DSL to extend the app with new functionality,  
perhaps to build the GUI portion of the app itself.


It doesn't seem that MacRuby in its present state is suitable for  
writing trading systems that run several times per second and use  
vector processing. I don't see a good alternative either.


What would you folks suggest?

How much work would it be to run MacRuby on top of LLVM?


Not that much, and to tell you the truth, the work is already done in  
a private branch on my machine. I need to clean the sources and push  
them into the SVN repository (wait a few more days). The new source  
base does not use YARV anymore (yay!) but a fresh new VM based on LLVM  
(and also on an internal vectorization library). Stay tuned for more  
details!


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


Re: [MacRuby-devel] accessing ruby objects from Objective-C

2009-02-18 Thread Benjamin Stiglitz
That being said, it’d be nice if the runtime could dump a header  
for the current state of a class, ScriptingBridge-style. I might  
look into this.


That would be awesome. Something like sdef/sdp for Ruby classes  
maybe those tools would be useful already.


Would be trivial to implement, maybe we could even introduce a  
parameter to the macruby executable to do this post-evaluation! Ben,  
wanna look at this? :-)


Yes, I do. It’ll go to the top of my MacRuby-When-I-Have-Time-And-No- 
Young-Children list. =)


(Actually I can probably take a look sooner than that.)

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


[MacRuby-devel] 0.4 release

2009-02-18 Thread Laurent Sansonetti

Hi guys,

I think that trunk has been under development for too long. It  
contains lots of fixes and improvements over 0.3, the current release,  
and we should push a 0.4 release out of the doors.


I thought that we would be able to write a new IO subsystem for 0.4,  
despite the fact that this effort has started it seems that it won't  
be completed any time soon. I don't see the new IO subsystem rewrite  
as a blocker because trunk is already used by several projects.


Thoughts? I would like to release trunk as 0.4 next week.

On a related note, the blog is not very active at the moment.  Would  
someone be willing to contribute articles to it?


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


Re: [MacRuby-devel] high-performance macruby: llvm and trading apps

2009-02-18 Thread S. Woodside
Bit off topic but I'm confused about this. Are you using llvmruby to  
compile ruby to LLVM bytecode and then running on LLVM? So YARV will  
not be involved at all? I didn't think that llvmruby/ruby2llvm was  
that advanced yet, to handle the entire ruby language?


--simon

--
http://simonwoodside.com

On 2009-02-18, at 3:44 PM, Laurent Sansonetti wrote:

Not that much, and to tell you the truth, the work is already done  
in a private branch on my machine. I need to clean the sources and  
push them into the SVN repository (wait a few more days). The new  
source base does not use YARV anymore (yay!) but a fresh new VM  
based on LLVM (and also on an internal vectorization library). Stay  
tuned for more details!


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


[MacRuby-devel] macruby, llvm, and iphone

2009-02-18 Thread S. Woodside
I would kill to be able to write my iphone apps in Ruby. Could LLVM or  
something like it be used to do that? (like, write an app in ruby,  
compile to llvm bytecode, and package the app with the llvm virtual  
machine?) (given that apple does not ship a ruby runtime on iphone,  
and says "no interpreted languages" is their policy)


Some of the people on the list work at apple, maybe you can't talk  
about this.


But can anyone (like if you don't work at apple) possibly say whether  
this is possible?


--simon

--
http://simonwoodside.com

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


Re: [MacRuby-devel] macruby, llvm, and iphone

2009-02-18 Thread Joel Reymont


On Feb 18, 2009, at 10:30 PM, S. Woodside wrote:

I would kill to be able to write my iphone apps in Ruby. Could LLVM  
or something like it be used to do that? (like, write an app in  
ruby, compile to llvm bytecode, and package the app with the llvm  
virtual machine?) (given that apple does not ship a ruby runtime on  
iphone, and says "no interpreted languages" is their policy)


Technically, the answer should be yes. I think you can run any chunk  
of binary code linked against static libraries. Code signing can be  
taken care of by the codesign command-line tool and you can drag  
properly signed apps into iTunes for installation onto the iPhone.


Tethered (on the iPhone) debugging would not be possible without  
reverse-engineering the usbmuxd protocol, unless you manage to use gdb  
to debug Ruby code.


---
http://tinyco.de
--- Mac & iPhone





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


Re: [MacRuby-devel] macruby, llvm, and iphone

2009-02-18 Thread Matt Aimonetti
Just wait for the official announcement that Laurent mentioned. I'm  
sure he will explain everything in details. Not using YARV means that  
the new VM built on top of core foundation, can use various tips to  
improve the perfs.


-Matt

Sent from my iPhone

On Feb 18, 2009, at 14:44, Joel Reymont  wrote:



On Feb 18, 2009, at 10:30 PM, S. Woodside wrote:

I would kill to be able to write my iphone apps in Ruby. Could LLVM  
or something like it be used to do that? (like, write an app in  
ruby, compile to llvm bytecode, and package the app with the llvm  
virtual machine?) (given that apple does not ship a ruby runtime on  
iphone, and says "no interpreted languages" is their policy)


Technically, the answer should be yes. I think you can run any chunk  
of binary code linked against static libraries. Code signing can be  
taken care of by the codesign command-line tool and you can drag  
properly signed apps into iTunes for installation onto the iPhone.


Tethered (on the iPhone) debugging would not be possible without  
reverse-engineering the usbmuxd protocol, unless you manage to use  
gdb to debug Ruby code.


---
http://tinyco.de
--- Mac & iPhone





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

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


Re: [MacRuby-devel] 0.4 release

2009-02-18 Thread John Shea
Hi Laurent,
What sort of articles are you thinking of? I assume the blog's aim is to
attract new people.

I personally would not mind seeing an article on deploying an app to Leopard
without ruby/MacRuby installed.

I guess there will need to be a 0.4 article also (which i assume you are the
only one qualified to do).

I have the kernel of a simple tutorial on www.johnmacshea.org, about writing
a gui app communicating to a remote server (a vocab tester) - would that be
suitable? (i would need to clean and expand it)  I wont be able to do for
2-3 weeks however. The other stuff on that site are for people already
familiar with MacRuby so are probably not appropriate for the main blog.

Otherwise suggest something - and if its in my competence I am happy to do
it!
Cheers,
John

On Thu, Feb 19, 2009 at 8:10 AM, Laurent Sansonetti
wrote:

> Hi guys,
>
> I think that trunk has been under development for too long. It contains
> lots of fixes and improvements over 0.3, the current release, and we should
> push a 0.4 release out of the doors.
>
> I thought that we would be able to write a new IO subsystem for 0.4,
> despite the fact that this effort has started it seems that it won't be
> completed any time soon. I don't see the new IO subsystem rewrite as a
> blocker because trunk is already used by several projects.
>
> Thoughts? I would like to release trunk as 0.4 next week.
>
> On a related note, the blog is not very active at the moment.  Would
> someone be willing to contribute articles to it?
>
> Laurent
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel