This afternoon I'll first try using dstep to generate the binding
automatically.
If that doesn't work as expected, I'll try to bind the main
functions manually as detailed in the "fancylib" example...
In both cases, at least now I'm confident that I know precisely
how to proceed, so thanks
Actually I think that John's explanations are much more concrete
and useful than what's in the official docs.
Why not integrate it into D's wiki ?
I'm new to the D language, but I really enjoy its execution speed
and ease of programming, and I'd like to implement the web server
of my next project in D instead of C++ or Go.
Unfortunately my server needs to communicate with an Aerospike
database (an ultra-fast open-source distributed
I agree, one step at a time...
Anyway, as I've never used D's type introspection and
compile-time code generation, my options are quite limited at the
moment :(
Thanks for proposing it !
I've just added John's sample code to the wiki (hoping that he
doesn't mind).
I've finally stopped working on Aerospike's wrapper.
My company has finally decided to use another database (probably
CouchBase).
Anyway, I had noticed an obvious lack of interest of Aerospike's
company for the D language.
It's not even worth any short answer (even negative) to a request
Indeed.
That's a curious statement, because I was trained mainly as a
C/C++ programmer, and still use them for my job every day. I
was very well-versed in the intricacies of C, and somewhat C++,
yet I was very unhappy with them. For several years I would
scour the net during my free time to look for
void loop() {
// code
}
void loadLevel() {
import core.memory : GC;
GC.disable();
while(stuff)
loop();
GC.collect();
}
Also see EMSI containers for no gc containers with
deterministic destruction
https://github.com/economicmodeling/containers
Thanks for
maybe that's what you're looking for:
https://dlang.org/phobos/core_memory.html#.GC.collect
What is nice with Nim it that it has a GC heap PER THREAD. No
need to stop the other threads during a GC...
https://nim-lang.org/docs/threads.html
https://nim-lang.org/docs/manual.html#threads
"Nim's
If this isn't a perfect example of D's marketing problem I
don't know what is. Someone who likes D and takes the time to
write on the forum yet thinks the GC will randomly run no
matter what.
To make it abundantly clear: I'm not bashing on you in the
slightest, Rico Decho. I'm just pointing
GC.disable doesn't guarantee the garbage collector won't run:
https://dlang.org/phobos/core_memory.html#.GC.disable I'm not
sure how much impact that has in practice.
That's why I'd like D to allow also Nim's alternative GC method.
https://nim-lang.org/docs/gc.html
Basically, you have the
maybe that's what you're looking for:
https://dlang.org/phobos/core_memory.html#.GC.collect
Indeed !
I'll try to make some benchmarks with a 3D rendering loop to see
how much time it takes if there is not much to GC.
Btw, I'm not promoting Nim here, just asking to take inspiration
from its memory model ;)
I've used Nim in the past, and while it's a nice language, D is
much closer to perfection regarding my personal needs and tastes.
I've actually converted all my Nim scripts to D, because :
1/ it doesn't
If you have a lot of total allocated memory, GC may still be
somewhat slow (because it has to scan a lot of memory, most of
which is still live). One possible approach is to do your
large-scale, long-term allocations outside the GC heap (i.e.,
use malloc) so that the amount of GC memory that
It's actually rather rare to *need* to avoid the GC -- only
niche applications need that, like if you're writing a game
engine that has to avoid stop-the-world pauses (which can be
easily worked around, btw), or real-time medical applications
where if it stops for 10ms somebody dies. 90% of
Slant does a pretty good job of providing a platform to these
opinionated questions.
https://www.slant.co/topics/25/viewpoints/11/~best-programming-language-to-learn-first~d
That's right.
Btw I've tested this simple "opinionated" search :
D seems to be in a situation where those who don't care have a
crap GC which needs to be improved and those who do care have
the tools to deal with it. So there needs to be ongoing
replacement of the D GC until there is something good, this is
a technical problem. That people who care about
May I ask to those of you who actually agree that D is a nice
language to learn programming and implement many kinds of
applications to vote for my answers to the following questions on
Quora ?
https://www.quora.com/What-is-the-best-language-to-learn-as-a-beginner-programmer
Here is another one :
https://www.quora.com/Which-language-is-best-for-a-beginner-programmer
Two more answers :
https://www.quora.com/How-do-I-get-started-with-programming-What-kind-of-laptop-do-I-need-What-is-the-best-programming-language-for-beginners
https://www.quora.com/Which-should-I-learn-as-my-first-programming-language-C-or-C++
Feel free to vote for my answers if you agree
So, editing and answering old questions is encouraged on
stackoverflow and imho it is a good thing, nothing is more
annoying than googling for a question and only finding answers
in old mailing lists that apply only to a
compiler/system/language from the '90s.
I absolutely agree.
We should
22 matches
Mail list logo