www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - tiny alternative to std library

reply Anthony <anthoq88 gmail.com> writes:
Hello,

I noticed that importing some std libraries causes the build time 
to jump to around 1 - 3 secs.

I started creating my own helper functions to avoid importing std 
for scripting and prototyping in order to keep the compile time 
at around 0.5 secs.

I was wondering if anyone knows of any libraries that are geared 
towards something like this?

Thanks
Feb 25 2021
parent reply Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Thursday, 25 February 2021 at 22:39:11 UTC, Anthony wrote:
 Hello,

 I noticed that importing some std libraries causes the build 
 time to jump to around 1 - 3 secs.

 I started creating my own helper functions to avoid importing 
 std for scripting and prototyping in order to keep the compile 
 time at around 0.5 secs.

 I was wondering if anyone knows of any libraries that are 
 geared towards something like this?

 Thanks
What part of std? Have you tried selective imports?
Mar 01 2021
parent reply Anthony Quizon <anthoq88 gmail.com> writes:
On Monday, 1 March 2021 at 08:52:35 UTC, Imperatorn wrote:
 On Thursday, 25 February 2021 at 22:39:11 UTC, Anthony wrote:
 Hello,

 I noticed that importing some std libraries causes the build 
 time to jump to around 1 - 3 secs.

 I started creating my own helper functions to avoid importing 
 std for scripting and prototyping in order to keep the compile 
 time at around 0.5 secs.

 I was wondering if anyone knows of any libraries that are 
 geared towards something like this?

 Thanks
What part of std? Have you tried selective imports?
Don't know specifically, but I tried doing this and it always eventually creeps over 2secs. Even with gold linker or rdmd. Having a library with bare minimum meta programming would help with this I think. I'm willing to pay the cost of safety.
Mar 02 2021
parent reply Siemargl <inqnone gmail.com> writes:
On Wednesday, 3 March 2021 at 03:52:13 UTC, Anthony Quizon wrote:
 On Monday, 1 March 2021 at 08:52:35 UTC, Imperatorn wrote:

 Having a library with bare minimum meta programming would help 
 with this I think. I'm willing to pay the cost of safety.
Strange, usual D programs builds fast. As a alternative to Phobos, you can see to D1 standard library - Tango, ported to D2. https://github.com/SiegeLord/Tango-D2 Without mass template magic, its easier. There is also print book "Learn to Tango with D".
Mar 02 2021
parent reply Anthony <anthoq88 gmail.com> writes:
On Wednesday, 3 March 2021 at 07:23:58 UTC, Siemargl wrote:
 On Wednesday, 3 March 2021 at 03:52:13 UTC, Anthony Quizon 
 wrote:
 On Monday, 1 March 2021 at 08:52:35 UTC, Imperatorn wrote:

 Having a library with bare minimum meta programming would help 
 with this I think. I'm willing to pay the cost of safety.
Strange, usual D programs builds fast. As a alternative to Phobos, you can see to D1 standard library - Tango, ported to D2. https://github.com/SiegeLord/Tango-D2 Without mass template magic, its easier. There is also print book "Learn to Tango with D".
Thanks! I'll take a look.
 Strange, usual D programs builds fast.
What build times do you get? Seems like some other people have similar issues: https://forum.dlang.org/post/pvseqkfkgaopsnhqecdb forum.dlang.org https://forum.dlang.org/thread/mailman.4286.1499286065.31550.digitalmars-d puremagic.com
Mar 03 2021
parent reply Siemargl <inqnone gmail.com> writes:
On Wednesday, 3 March 2021 at 09:02:54 UTC, Anthony wrote:
 Strange, usual D programs builds fast.
What build times do you get? Seems like some other people have similar issues: https://forum.dlang.org/post/pvseqkfkgaopsnhqecdb forum.dlang.org https://forum.dlang.org/thread/mailman.4286.1499286065.31550.digitalmars-d puremagic.com
All you mentioned are template issues. Some was fixed. I test full rebuild of dlang-IDE (20k loc) now for dmd under Windows: (Result is 5.5Mb .exe file) -full rebuild with all libs take ~21s >dub build --build=debug --arch=x86_mscoff --force -change one file and rebuild <7s >dub build --build=debug --arch=x86_mscoff
Mar 03 2021
parent reply Siemargl <inqnone gmail.com> writes:
On Wednesday, 3 March 2021 at 14:12:54 UTC, Siemargl wrote:
 I test full rebuild of dlang-IDE (20k loc) now for dmd under
Update, 20k loc without counting libraries.
Mar 03 2021
parent reply Anthony Quizon <anthoq88 gmail.com> writes:
On Wednesday, 3 March 2021 at 14:17:02 UTC, Siemargl wrote:
 On Wednesday, 3 March 2021 at 14:12:54 UTC, Siemargl wrote:
 I test full rebuild of dlang-IDE (20k loc) now for dmd under
Update, 20k loc without counting libraries.
Thanks for the info. Yeah the times I'm trying to reach are around 0.5secs so as to have the same feel as a scripting language. I'm having some success pulling out small bits of code from other libraries and keeping things minimal and c-style-ish.
Mar 03 2021
parent reply Kagamin <spam here.lot> writes:
On Wednesday, 3 March 2021 at 20:54:43 UTC, Anthony Quizon wrote:
 I'm having some success pulling out small bits of code from 
 other libraries and keeping things minimal and c-style-ish.
If you're really ok with minimalism, I'm writing such a library https://filebin.net/7gtyh5j01gk1ofly I didn't publish it anywhere yet, feel free to do so. Not everything is finished there yet.
Mar 05 2021
next sibling parent ryuukk_ <ryuukk_ gmail.com> writes:
On Friday, 5 March 2021 at 16:54:48 UTC, Kagamin wrote:
 On Wednesday, 3 March 2021 at 20:54:43 UTC, Anthony Quizon 
 wrote:
 I'm having some success pulling out small bits of code from 
 other libraries and keeping things minimal and c-style-ish.
If you're really ok with minimalism, I'm writing such a library https://filebin.net/7gtyh5j01gk1ofly I didn't publish it anywhere yet, feel free to do so. Not everything is finished there yet.
I was too looking for something like this, thanks! you should definitely host it somewhere, maybe on github, i'd love to contribute!
Mar 05 2021
prev sibling parent reply Siemargl <inqnone gmail.com> writes:
On Friday, 5 March 2021 at 16:54:48 UTC, Kagamin wrote:
 On Wednesday, 3 March 2021 at 20:54:43 UTC, Anthony Quizon 
 wrote:
 I'm having some success pulling out small bits of code from 
 other libraries and keeping things minimal and c-style-ish.
If you're really ok with minimalism, I'm writing such a library https://filebin.net/7gtyh5j01gk1ofly I didn't publish it anywhere yet, feel free to do so. Not everything is finished there yet.
GPL "virus" license does not fit for any commercial or even shareware work (
Mar 05 2021
parent Kagamin <spam here.lot> writes:
I suppose commercial vendors aren't interested in suckless 
paradigm, so this library is for people and only for people.
Mar 06 2021