Gamestudio Links
Zorro Links
Newest Posts
TradeVars not working with pending trades
by jcl
2 seconds ago
Creating a Directory
by txesmi
Yesterday at 10:15
Multi asset correlation
by jcl
Yesterday at 09:57
Help in analysis...
by MINER
Yesterday at 09:13
Strange problem with a global int
by jcl
Yesterday at 08:48
New Zorro version 2.03
by jcl
Yesterday at 08:28
not using profit targets during strategy development
by laz
Yesterday at 00:23
AUM Magazine
Latest Screens
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Evonet Beta v1.0 : Online Project Development Template
Who's Online
6 registered (kvm, 20BN, Dalla, AndrewAMD, 2 invisible), 581 Guests and 7 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
Pelin27, Aziz, lucianopneto, j45p41, Max_Ahn
18173 Registered Users
Topic Options
Rate This Topic
#472602 - 05/07/18 19:34 In Beta - New Dynamic Array Library
AndrewAMD Online
User

Registered: 02/21/17
Posts: 572
Loc: Chicago
Hi guys,

I wrote a basic dynamic array library for use with Lite-C.

The purpose of this library is to provide a higher-level approach to memory allocation. The overhead should be non-existent (as long as the library is used correctly).

Included is an example script. In it, we create an arbitrary struct, fill it with values, and we push back. This behavior is much like a C++ std::vector; in fact, a C++ std::vector is used in the backend.

I'm sure you will have questions and/or feature requests. Please let me know in this thread.

Source code is here:
https://github.com/AndrewAMD/DynamicArray

The current build is attached.

I do apologize for the lack of documentation - right now, it is all in the include/dynamic.h header. Formal documentation to follow.

Thanks,
Andrew

EDIT: File removed. Scroll down for the latest build.


Edited by AndrewAMD (05/08/18 03:28)
Edit Reason: new build

Top
#472605 - 05/07/18 22:23 Re: In Beta - New Dynamic Array Library [Re: AndrewAMD]
MatPed Offline
User

Registered: 02/28/15
Posts: 535
Loc: Milano, Italy
Thank you, nice share.

Top
#472608 - 05/08/18 03:27 Re: In Beta - New Dynamic Array Library [Re: MatPed]
AndrewAMD Online
User

Registered: 02/21/17
Posts: 572
Loc: Chicago
New function, new build!

Added darr_destroy_all(). It clears all of the dynamic arrays from memory (in the DLL).

I recommend running this function either at the beginning of main or at the beginning of INITRUN. I believe Zorro does not clean this stack between runs of the script.


Attachments
DynamicArray_beta20180507c.zip (39 downloads)


Top
#472698 - 05/15/18 05:22 REVISED - Dynamic Array Library [Re: AndrewAMD]
AndrewAMD Online
User

Registered: 02/21/17
Posts: 572
Loc: Chicago
Major revision, new build!

Known changes:
* Added insert functionality.
* Can add multiple elements at a time.
* "destroy" was renamed to "delete" for consistency of syntax purposes. (That is, OOP regulars know what "new" and "delete" implies.)
* darr_ renamed to da_ to make functions less annoying to type.
* The example is far clearer in its demonstration of functionality, and well-commented.
* The Zorro header is the same file as the DLL header.

Other than fixing the documentation, I hope that this will be my last build before we go to first release.

I appreciate any feedback. If I receive no complaints in the next week, I will recommend it for redistribution with Zorro.

Cheers,
Andrew


Attachments
DynamicArray_beta20180514.zip (31 downloads)


Top
#472873 - 05/27/18 11:25 Re: REVISED - Dynamic Array Library [Re: AndrewAMD]
sdh309795gaas Offline
Member

Registered: 12/07/14
Posts: 106
Loc: Germany
Looks awesome, thanks for sharing!
_________________________
Skype: simeon.p@web.de

Top
#473243 - 06/23/18 17:18 RELEASED - Dynamic Array Library [Re: sdh309795gaas]
AndrewAMD Online
User

Registered: 02/21/17
Posts: 572
Loc: Chicago
I guess no news is good news?

RELEASED FOR PRODUCTION!

Attached is the latest build.

Regarding documentation:
* Overview and build instructions: https://github.com/AndrewAMD/DynamicArray
* Function descriptions are in the header.
* The example script should have more than enough info to get you started.

Thanks,
Andrew


Attachments
DynamicArray_release_20180623.zip (24 downloads)


Top
#473431 - 07/05/18 16:12 Re: RELEASED - Dynamic Array Library [Re: AndrewAMD]
AndrewAMD Online
User

Registered: 02/21/17
Posts: 572
Loc: Chicago
The software is now in the downloads section under Zorro Tools:
http://zorro-project.com/download.php

Top



Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de