random i/o disk file

T

Tom Cloyd

Am definitely on the steep part of the ruby learning curve. I've
programmed a bit in several other languages. Now I need something like a
random disk file, so I can have a large hash or something like it
available for random access. I've looked in Programming Ruby II, and the
Ruby Cookbook. No info there. I then tried to search the arhives at
http://blade.nagaokaut.ac.jp/ruby/ruby-talk/index.shtml - the search
tool seems not to be working. I then tried to find something with
Google. No go.

I must be thinking about this wrongly, somehow.

So...how does one handle indexed (random) access to a large file - one
too large to have in memory? I can't believe that random/like disk I/O
is not possible in ruby.

Thanks in advance...

t.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tom Cloyd, MS MA, LMHC
Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< (e-mail address removed) >> (email)
<< TomCloyd.com >> (website & psychotherapy weblog)
<< sleightmind.wordpress.com >> (mental health issues weblog)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
D

Denis Hennessy

It works just like in C....

$ echo thisisatest > test.fil
$ irb=> "sis"

/dh
 
T

Tom Cloyd

Oh, man, I really DID miss something. What great news. You've made my
day, even though it hasn't really started yet.

Tks,

Tom C.

Denis said:
It works just like in C....

$ echo thisisatest > test.fil
$ irb
=> "sis"

/dh


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tom Cloyd, MS MA, LMHC
Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< (e-mail address removed) >> (email)
<< TomCloyd.com >> (website & psychotherapy weblog)
<< sleightmind.wordpress.com >> (mental health issues weblog)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top