On 12/06/2019 11:40 AM, Rémy Mouëza wrote:
If I recall correctly, there is (or was) also a precise GC in the work,
but I currently don't have any links to it.
Its already in.
Its a modification on the conservative GC to make it more efficient.
https://github.com/dlang/druntime/blob/master/src
On Tuesday, 11 June 2019 at 17:12:17 UTC, Robert M. Münch wrote:
Is there a simple and elegant way to do this? Or is just using
a foreach(...) with canFind() the best way?
I made it this way, I consider it elegant. I don't know if others
will like it.
Here it is:
import std.stdio : writeln;
i
On Tuesday, 11 June 2019 at 18:20:59 UTC, KnightMare wrote:
please write some explanation about subj.
- what exactly it scans?
- why it scan data-segment?
https://issues.dlang.org/show_bug.cgi?id=15723
https://issues.dlang.org/show_bug.cgi?id=19947
precise GC doesn't help with issues.
- maybe add
On Tuesday, 11 June 2019 at 18:39:38 UTC, KnightMare wrote:
probably strstr
https://dlang.org/library/core/stdc/string/strstr.html
implemented over it. there is a tendency to remove dependency
from C-runtime.
*FIX*
strpbrk
https://dlang.org/phobos/core_stdc_string.html#.strpbrk
On Tuesday, 11 June 2019 at 17:12:17 UTC, Robert M. Münch wrote:
Is there a simple and elegant way to do this? Or is just using
a foreach(...) with canFind() the best way?
not elegant, not simple. for byte/short/ubye/ushort only
https://www.strchr.com/strcmp_and_strlen_using_sse_4.2
https://dla
please write some explanation about subj.
- what exactly it scans?
- why it scan data-segment?
https://issues.dlang.org/show_bug.cgi?id=15723
https://issues.dlang.org/show_bug.cgi?id=19947
precise GC doesn't help with issues.
- maybe add new type like gcpointer or something (making word
"pointer"
On Tuesday, 11 June 2019 at 17:12:17 UTC, Robert M. Münch wrote:
Is there a simple and elegant way to do this? Or is just using
a foreach(...) with canFind() the best way?
It's a space/time tradeoff. foreach with canFind is O(n^2) time
and O(1) space. If you use an associative array or a set,
On Tuesday, 11 June 2019 at 17:12:17 UTC, Robert M. Münch wrote:
Is there a simple and elegant way to do this? Or is just using
a foreach(...) with canFind() the best way?
There is also find_among, but the performance is the same, I
assume.
https://dlang.org/library/std/algorithm/searching/fi
Is there a simple and elegant way to do this? Or is just using a
foreach(...) with canFind() the best way?
--
Robert M. Münch
http://www.saphirion.com
smarter | better | faster
On Tue, Jun 11, 2019 at 02:46:03PM +, dangbinghoo via Digitalmars-d-learn
wrote:
> On Tuesday, 11 June 2019 at 12:40:39 UTC, Adam D. Ruppe wrote:
> > On Tuesday, 11 June 2019 at 08:59:01 UTC, dangbinghoo wrote:
> > > We need to make sure we use only @nogc API when writing code, not
> > > when
On Tuesday, 11 June 2019 at 10:24:05 UTC, KnightMare wrote:
On Tuesday, 11 June 2019 at 08:05:31 UTC, dangbinghoo wrote:
I think that D compiler needs -nogc switch to fully disable gc
for a project,
LDC -nogc?
thanks for help. It's a shame that I didn't look in details of
the LCD help inf
On Tuesday, 11 June 2019 at 14:44:20 UTC, KnightMare wrote:
Stroustrup said about C++ (not exactly quote. I translated it
from my lang not English):
since C and C ++ will be used by the same people on
many years, the differences between languages should be
either minimal or maximal to minimize t
On Tuesday, 11 June 2019 at 12:42:03 UTC, Adam D. Ruppe wrote:
On Tuesday, 11 June 2019 at 10:24:05 UTC, KnightMare wrote:
people who are interested only in betterC/nogc shouldn't see
documentation to api that they are not suitable.
I've considered doing that before, but it is actually
imposs
On Tuesday, 11 June 2019 at 12:40:39 UTC, Adam D. Ruppe wrote:
On Tuesday, 11 June 2019 at 08:59:01 UTC, dangbinghoo wrote:
We need to make sure we use only @nogc API when writing code,
not when running the app.
That's what the @nogc annotation does, statically forces you to
only use other @n
On Tuesday, 11 June 2019 at 09:26:56 UTC, realhet wrote:
static bool processId(bool captureIntId, alias r, alias a)(){
mixin("alias ta = typeof("~a.stringof~");");
As I have been saying a lot, mixin and stringof should almost
never be used together. You could write this a lot easier:
a
On Tuesday, 11 June 2019 at 08:59:01 UTC, dangbinghoo wrote:
We need to make sure we use only @nogc API when writing code,
not when running the app.
That's what the @nogc annotation does, statically forces you to
only use other @nogc stuff via compiler errors.
On Tuesday, 11 June 2019 at 10:24:05 UTC, KnightMare wrote:
people who are interested only in betterC/nogc shouldn't see
documentation to api that they are not suitable.
I've considered doing that before, but it is actually impossible
to get right in the general case due to attribute inference
On Tuesday, 11 June 2019 at 08:05:31 UTC, dangbinghoo wrote:
I think that D compiler needs -nogc switch to fully disable gc
for a project,
LDC -nogc?
and document of phobos also needs a friendly way to list-out
all @nogc API.
+1
people who are interested only in betterC/nogc shouldn't see
Hi again,
I'm trying to do variadic parameter processing, and I have the
following function that works fine:
static bool same(T1, T2)(){
pragma(msg, "same? "~T1.stringof~" "~T2.stringof);
return is(immutable(T1)==immutable(T2));
}
Btn btn(T...)(string params, T args){
enum c
This is the second in a series (Custom Dialogs) within a series
(Dialogs) and deals with the action area. It's available here:
http://gtkdcoding.com/2019/06/11/0043-custom-dialog-ii.html
On Tuesday, 11 June 2019 at 08:16:31 UTC, Basile B. wrote:
On Tuesday, 11 June 2019 at 08:08:14 UTC, Basile B. wrote:
you can do this with a druntime switch or by calling GC.disable
in your main()
the druntime switch is "--DRT-gc=gc:manual". You pass it the
compiled program after its own
On Tuesday, 11 June 2019 at 08:08:14 UTC, Basile B. wrote:
On Tuesday, 11 June 2019 at 08:05:31 UTC, dangbinghoo wrote:
hi there,
I think that D compiler needs -nogc switch to fully disable gc
for a project, and document of phobos also needs a friendly
way to list-out all @nogc API.
we alre
hi there,
I think that D compiler needs -nogc switch to fully disable gc
for a project, and document of phobos also needs a friendly way
to list-out all @nogc API.
we already have -betterC, and betterC disabled GC, why we could
not have a standalone option for doing this?
binghoo da
On Tuesday, 11 June 2019 at 08:05:31 UTC, dangbinghoo wrote:
hi there,
I think that D compiler needs -nogc switch to fully disable gc
for a project, and document of phobos also needs a friendly way
to list-out all @nogc API.
we already have -betterC, and betterC disabled GC, why we could
no
24 matches
Mail list logo