Language question -- file = variable ?
G. Matthew Rice
matt-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org
Fri Aug 19 01:21:20 UTC 2011
You could also use memory mapping in C and friends:
http://en.wikipedia.org/wiki/Memory-mapped_file
--matt
On Thu, Aug 18, 2011 at 9:08 PM, Rajinder Yadav <devguy.ca-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
> On 11-08-16 10:41 AM, William Park wrote:
>>
>> Hi all,
>>
>> Is there a language which (natively or not) treats a filename like a
>> variable in memory? For example, to increment a counter stored in a file,
>> you would write something like
>> /tmp/counter = /tmp/counter + 1
>> which involves both read and write to a file. If it were normal variable,
>> then it would involve read/write to a memory instead.
>>
>> Python is the closest I can think of. But, you need to create a method
>> for read and another method for write. And, typing more verbose than I
>> would like.
>>
> If the file was xml based you can parse it with any script language that
> supports xml parsing.
>
> In Ruby you can use active resource, which is part of ruby core, it allows
> you to access an xml file like a database.
>
> --
> Kind Regards,
> Rajinder Yadav | http://DevMentor.org | Do Good! ~ Share Freely
>
> --
> The Toronto Linux Users Group. Meetings: http://gtalug.org/
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
>
--
G. Matthew Rice <mrice-WHMkLBA7RDE at public.gmane.org> gpg id: EF9AAD20
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list