It is currently Thu Apr 27, 2017 5:34 pm



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: fast read/write bundles to files
Unread postPosted: Tue Sep 20, 2016 2:02 pm 
Offline

Joined: Wed Apr 15, 2015 3:57 am
Posts: 421
I don't know if this is easy enough to do, but I use string and numeric bundles a lot
and it seems to take a lot of time to save and load them to files. I find bundles very handy
for storing persistent settings and lookup tuples but when they get too large the time to save and load
them from a file increases quite a bit. In many cases, I can use SQLITE but bundle operations are much simpler (and faster?)

It might be nice to have a BUNDLE.SAVE f$,b and BUNDLE.LOAD f$,&b commands.

Otherwise maybe even just a very efficient bundle to string dump/parse might work well.

I am mainly concerned about using pure string and pure numeric bundles, though it would be
great if it could handle bundles of lists and bundles of bundles also.


Report this post
Top
 Profile  
 
 Post subject: Re: fast read/write bundles to files
Unread postPosted: Tue Sep 20, 2016 9:48 pm 
Offline

Joined: Mon Feb 08, 2016 9:07 am
Posts: 106
cterp,
I strongly support your request. I use mixed string and number bundles for storage of graphical objects a lot.
Would be great to have simple BUNDLE.SAVE and BUNDLE.LOAD commands.

nobs


Report this post
Top
 Profile  
 
 Post subject: Re: fast read/write bundles to files
Unread postPosted: Wed Sep 21, 2016 5:38 am 
Offline
User avatar

Joined: Wed Jul 10, 2013 8:11 am
Posts: 299
Quote:
It might be nice to have a BUNDLE.SAVE f$,b and BUNDLE.LOAD f$,&b commands.
:idea:
Quote:
I am mainly concerned about using pure string and pure numeric bundles, though it would be
great if it could handle bundles of lists
:idea: , arrays :mrgreen:
Quote:
and bundles of bundles
:idea:
Quote:
also.

See under
http://rfobasic.freeforums.org/post31251.html#p31251

Cterp and Nobs are you my test engineers?

Happy coding
Gregor

EDIT:
You can put all types in one bundle!


Last edited by aFox on Wed Sep 21, 2016 10:41 am, edited 1 time in total.

Report this post
Top
 Profile  
 
 Post subject: Re: fast read/write bundles to files
Unread postPosted: Wed Sep 21, 2016 9:03 am 
Offline

Joined: Mon Feb 08, 2016 9:07 am
Posts: 106
Way to high for me ...


Report this post
Top
 Profile  
 
 Post subject: Re: fast read/write bundles to files
Unread postPosted: Sun Sep 25, 2016 2:47 pm 
Offline

Joined: Wed Apr 15, 2015 3:57 am
Posts: 421
I got an error running my voice food diary on it....I think BUNDLE.PUT doesn't autocreate bundles like jMarc's does.

Looks like it will be pretty cool though :)


Attachments:
2016-09-25 21.40.55.png
2016-09-25 21.40.55.png [ 75.41 KiB | Viewed 633 times ]
2016-09-25 21.40.51.png
2016-09-25 21.40.51.png [ 133.99 KiB | Viewed 633 times ]
Report this post
Top
 Profile  
 
 Post subject: Re: fast read/write bundles to files
Unread postPosted: Sun Sep 25, 2016 2:52 pm 
Offline

Joined: Wed Apr 15, 2015 3:57 am
Posts: 421
My offending code:


Attachments:
2016-09-25 21.51.09.png
2016-09-25 21.51.09.png [ 79.41 KiB | Viewed 631 times ]
Report this post
Top
 Profile  
 
 Post subject: Re: fast read/write bundles to files
Unread postPosted: Sun Sep 25, 2016 3:12 pm 
Offline

Joined: Wed Apr 15, 2015 3:57 am
Posts: 421
Specifically, this causes an error in Olibas, which I am pretty sure is legal.

Code:
bundle.clear b
bundle.put b,"test","mydate"


Report this post
Top
 Profile  
 
 Post subject: Re: fast read/write bundles to files
Unread postPosted: Mon Sep 26, 2016 6:09 am 
Offline
User avatar

Joined: Wed Jul 10, 2013 8:11 am
Posts: 299
@cterp
thank you very much for testing!
I will investigate auto creation.
It seems that bundle.clear b fails.
I hope I can fix it soon, because I have a small handicap.
My Barracuda HD quits the service, so I have to rebuild my system.
Stay tuned!

Gregor


Report this post
Top
 Profile  
 
 Post subject: Re: fast read/write bundles to files
Unread postPosted: Mon Oct 10, 2016 1:02 pm 
Offline
User avatar

Joined: Wed Jul 10, 2013 8:11 am
Posts: 299
BUNDLE.CLEAR is fixed ;)

Download the test version under:
https://github.com/RFO-BASIC/Basic/files/520290/OliBasicV.zip

/Gregor


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
suspicion-preferred