[#11439] comments needed for Random class — "NAKAMURA, Hiroshi" <nakahiro@...>

-----BEGIN PGP SIGNED MESSAGE-----

15 messages 2007/06/12

[#11450] Re: new method dispatch rule (matz' proposal) — David Flanagan <david@...>

This is a late response to the very long thread that started back in

17 messages 2007/06/13

[#11482] Ruby Changes Its Mind About Non-Word Characters — James Edward Gray II <james@...>

Does this look like a bug to anyone else?

10 messages 2007/06/16

[#11505] Question about the patchlevel release cycle — Sylvain Joyeux <sylvain.joyeux@...4x.org>

1.8.6 thread support was broken in bad ways. It stayed for three months

20 messages 2007/06/20
[#11512] Re: Question about the patchlevel release cycle — Urabe Shyouhei <shyouhei@...> 2007/06/20

Hi, I'm the 1.8.6 branch manager.

[#11543] Re: Apple reportedly to ship with ruby 1.8.6-p36 unless informed what to patch — James Edward Gray II <james@...>

On Jun 27, 2007, at 4:47 PM, Bill Kelly wrote:

10 messages 2007/06/27

Efficient storage for messages

From: Gaspard Bucher <gaspard@...>
Date: 2007-06-27 12:35:25 UTC
List: ruby-core #11540
I am creating an open source multimedia controller in ruby. The idea  
is to use ruby to glue together extensions written in C/C++.  
Actually, the server will be used for a project in which we use  
serial communication, artificial intelligence signal recognition and  
midi. This is the current processing line:

serial in  ---> buffer ---> (window on the buffer) pattern  
recognition ---> midi out

I am now starting to write a proper message class to pass the data  
between the different objects. Data can be large (if we process  
video) and needs to be processed fast (eventually using BLAS or Blitz+ 
+).

struct RKMessage {
   long len;     // can be used as a direct value (integer)
   double value; // direct value (floating point)
   int  ctype;   // type of data RK_DIRECT_LONG, RK_DIRECT_DOUBLE,  
RK_LIST_DOUBLE, ...
   void * ptr;  // storage for lists, matrices
};

Is it a good idea to use a single class (RKMessage) to pass messages  
or should I create specialized classes for each kind of data  
providing common accessors ?

Could I create subclasses of RKMessage, sharing the same struct as  
their internal storage ?

Can a specialized class have additional data, or is it "one class",  
"one struct" ?

I understand these questions are very general and might reflect my  
lack of ruby internals knowledge but I would greatly appreciate any  
advice or comment.

Thanks for your help,

Gaspard



----------------------------
Zena, the peaceful cms
http://zenadmin.org


In This Thread

Prev Next