[#7043] RUBYOPT versioning? — Caleb Tennis <caleb@...>
Matz, others:
[#7050] RDoc patches for BigDecimal in Ruby CVS — mathew <meta@...>
Now that 1.8.4 is out and the initial flurry of problem reports has died
[#7055] More on VC++ 2005 — Austin Ziegler <halostatue@...>
Okay. I've got Ruby compiling. I'm attempting to get everything in
Hi,
On 05/01/06, nobuyoshi nakada <nobuyoshi.nakada@ge.com> wrote:
On 06/01/06, Austin Ziegler <halostatue@gmail.com> wrote:
Hi,
On 09/01/06, nobuyoshi nakada <nobuyoshi.nakada@ge.com> wrote:
[#7057] 64-bit Solaris READ_DATA_PENDING Revisited — Steven Lumos <steven@...>
[#7078] CRC - a proof-of-concept Ruby compiler — Anders Hkersten <chucky@...>
Hello everyone,
Anders H旦ckersten wrote:
tis 2006-01-10 klockan 02:16 +0900 skrev Nicolas Cannasse:
[#7084] mathn: ugly warnings — hadmut@... (Hadmut Danisch)
Hi,
Hadmut Danisch wrote:
Daniel Berger wrote:
*Dean Wampler *<deanwampler gmail.com> writes:
On Fri, 13 Jan 2006, mathew wrote:
On Fri, 13 Jan 2006, Mathieu Bouchard wrote:
ara.t.howard@noaa.gov wrote:
On Fri, 13 Jan 2006, James Britt wrote:
Dean Wampler <deanwampler gmail.com> writes:
On Sat, 14 Jan 2006, mathew wrote:
[#7100] core dump with ruby 1.9.0 (2006-01-10) and bdb-0.5.8 — Tanaka Akira <akr@...17n.org>
I found following test script dumps core.
>>>>> "T" == Tanaka Akira <akr@m17n.org> writes:
In article <200601110905.k0B950Op001713@moulon.inra.fr>,
[#7109] Calling flock with block? — Bertram Scharpf <lists@...>
Hi,
On Thu, 12 Jan 2006, Bertram Scharpf wrote:
[#7129] YAML.load({[]=>""}.to_yaml) — Tanaka Akira <akr@...17n.org>
I found that current YAML doesn't round trip {[]=>""}.
Hi.
Hi.
In article <20060115202203.D3624CA0.ocean@m2.ccsnet.ne.jp>,
[#7162] FileUtils.mv does not unlink source file when moving over filesystem boundary — Pav Lucistnik <pav@...>
Hi,
On Mon, 16 Jan 2006, Pav Lucistnik wrote:
[#7178] Add XHTML 1.0 Output Support to Ruby CGI — Paul Duncan <pabs@...>
The attached patch against Ruby 1.8.4 adds XHTML 1.0 output support to
[#7186] Ruby 1.9 and FHS — "Kirill A. Shutemov" <k.shutemov@...>
Build and install system changes:
[#7195] trouble due ruby redefining posix function eaccess — noreply@...
Bugs item #3317, was opened at 2006-01-24 15:33
[#7197] SSL-enabled DRb fds on SSLError? — ctm@... (Clifford T. Matthews)
Howdy,
On Jan 24, 2006, at 12:46 PM, Clifford T. Matthews wrote:
Patch worked fine against HEAD.
[#7203] bcc32's memory manager bug — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
Hi.
[#7216] String#scan loops forefever if scanned string is modified inside block. — noreply@...
Bugs item #3329, was opened at 2006-01-26 10:55
[#7226] Fwd: Re: Question about massive API changes — "Sean E. Russell" <ser@...>
Hello,
Sean E. Russell wrote:
>
On 1/28/06, Caleb Tennis <caleb@aei-tech.com> wrote:
On Saturday 28 January 2006 17:13, Wilson Bilkovich wrote:
Sean E. Russell wrote:
[#7249] PATCH: append option to sysread — Yohanes Santoso <ysantoso-rubycore@...>
[#7259] TCP/UDP server weird lags on 1.8.4 linux — "Bill Kelly" <billk@...>
Hi !
Newbie question
Hello all and happy new year.
I just started learning Ruby. I have good experience in Java and Perl and
have read most of the doc on Ruby that I can get my hands on. I started on =
a
project to build the DICOM netwrok library as a way to learn Ruby. I have
done quite bit of coding on this project and have a working code. Well when
I say quite a bit, it is about 5% done!! What I am looking for is RubyIdiom=
s
and if there are better ways of doing things as opposed to what I have
already done. Basically DICOM messages are binary and we need to read the
data and manipulate byes. We will have to construct integers or floats from
bytes or pair of bytes and the next few bytes could be a string etc. I have
pasted some part of the code and want your opinion on this. Also, once this
project has reached a point where it could be used, I will release it to th=
e
community.
What I am looking for is recomendation to improve the speed of the code in
processing the bytes. is 'slice' the best way to do what I am doing. I am
going to re-arrange the code, so dont worry about the neatness at this
point.
Thans and here is the code.
session comes from
server =3D TCPServer.new('localhost', port)
p "waiting on connection"
while (session =3D server.accept) ........
def ae_6 session
#AE_6
p "Inside ae_6"
#stop ARTIM and issue and a-associate indiction primitive.
# all we have to do here is suck in the whole PDU, that amounts to sending
the indication primitive.
pdu=3Dsession.getc # reserved, neglect this byte
pduLen=3Dsession.read(4).unpack('N')[0] # unsigned integer 4 bytes long
print "PDU Length =3D", pduLen,"\n"
pdu=3Dsession.read(pduLen) # this is the full PDU
#version=3Dpdu.slice(0..1).unpack('n')[0]
#p version
calledAETitle =3D pdu.slice(4..19) # string of 16 chars
callingAETitle =3D pdu.slice(20..35) # string of 16 chars
p calledAETitle
p callingAETitle
#pdu.each_byte {|c| print c,"|" }
#reserved=3Dpdu.slice(36..67) # ignore this
#next item type should be 10H which is "Application Context" which is
always set to "1.2.840.10008.3.1.1.1"
itemType=3Dpdu.slice(68..68).unpack('C')[0]
#printf( "ItemType=3D%XH\n", itemType)
#ignore the next byte, byte # 69
itemLength=3Dpdu.slice(70..71).unpack('n')[0]
contextName=3Dpdu.slice(72..72+itemLength-1)
p contextName
# Next we read presentation context items
start =3D 72+itemLength
finish =3D 0
while finish < pduLen
finish =3D getNextPresentationContext(start, pdu)
print "Finish =3D ",finish," outside proc\n"
start=3Dfinish+1
end
end
def getNextPresentationContext(start, pdu)
finish =3D start
itemType=3Dpdu.slice(start..finish).unpack('C')[0] #should be20H
start =3D finish+2 # added 2 here since we need to skip on byte which is
reserved
finish =3D start + 1 # total of two bytes
itemLength=3Dpdu.slice(start..finish).unpack('n')[0]
#printf( "FIRST ItemType=3D%XH, itemLength=3D%d\n", itemType,itemLength)
start =3D finish+1
finish =3D start
presContextId=3Dpdu.slice(start..finish).unpack('C')[0]
# next 3 bytes needs to be ignored, they are reserved hence +4 below
start =3D finish +4
finish =3D start
itemType=3Dpdu.slice(start..finish).unpack('C')[0]
start =3D finish+2 # added 2 here since we need to skip on byte which is
reserved
finish =3D start + 1 # total of two bytes
itemLength=3Dpdu.slice(start..finish).unpack('n')[0]
#printf( "SECOND ItemType=3D%XH, itemLength=3D%d\n", itemType,itemLength)
start =3D finish+1
finish =3D start + itemLength-1 # total of two bytes
abstractSyntax=3Dpdu.slice(start..finish)
start =3D finish +1
finish =3D start
itemType=3Dpdu.slice(start..finish).unpack('C')[0]
while itemType =3D=3D 64
start =3D finish+2 # added 2 here since we need to skip one byte which is
reserved
finish =3D start + 1 # total of two bytes
itemLength=3Dpdu.slice(start..finish).unpack('n')[0]
#printf( "LATER ItemType=3D%XH, itemLength=3D%d\n", itemType,itemLength)
start =3D finish+1
finish =3D start + itemLength-1 # total of two bytes
transferSyntax=3Dpdu.slice(start..finish)
printf("id=3D%d, AbstractSyntax =3D%s, TxSyntax=3D%s\n",
presContextId,abstractSyntax,transferSyntax)
start=3Dfinish+1
finish =3D start
itemType=3Dpdu.slice(start..finish).unpack('C')[0]
end
return finish-1