On Monday, 31 March 2014 at 06:25:40 UTC, Jonathan M Davis wrote:
On Monday, March 31, 2014 05:09:22 ed wrote:
Hi,
Just wondering what the best replacement for C timeval is in D.
I'm looking at std.datetime.SysTime, but std.datetime is huge
so
I'm not sure.
If you want an overview of std.da
On Monday, March 31, 2014 05:09:22 ed wrote:
> Hi,
>
> Just wondering what the best replacement for C timeval is in D.
> I'm looking at std.datetime.SysTime, but std.datetime is huge so
> I'm not sure.
If you want an overview of std.datetime, read
http://dlang.org/intro-to-datetime.html
But yes
On Sunday, March 30, 2014 08:25:42 Andre Artus wrote:
> Considering the international spread of D users I find it
> surprising that the date & time formatting functions in phobos
> are not localizable.
If could go back, there wouldn't even be anything to localize. toSimpleString
is there because
On Monday, 31 March 2014 at 01:03:22 UTC, Carl Sturtivant wrote:
What about destructors, are they always called, or is this
another optimization if the struct is in it's default .init
state?
AFAIK, a destructor is always called when an object goes out of
scope... unless, it's being moved out
Hi,
Just wondering what the best replacement for C timeval is in D.
I'm looking at std.datetime.SysTime, but std.datetime is huge so
I'm not sure.
Thanks,
ed
I've got a program that uses user input, but I'm having trouble
with it.
Here's an example, the unenclosed numbers (1 2 3 in example) add
entries:
0 Achievement
1 2 3 c"Won!" st"4 5 6" <- user input
(create 3 entries all with st"4 5 6")
0 Achievement
1 house [4, 5, 6]
2 rock [4, 5, 6]
3 mou
On Sunday, 30 March 2014 at 19:17:38 UTC, Carl Sturtivant wrote:
I don't know where to ask this.
How do I change the password associated with my use of this
forum?
the only way is to ask administrator.
D's structs don't have identity. That means, they can be moved
without notice at any point in the program. AFAIK the compiler
even does that when handling exceptions in a few cases (e.g.
with structs on the stack). Having moveable value types allows
for a lot of optimizations, both on the compi
On Sunday, 30 March 2014 at 12:42:16 UTC, Jack Applegame wrote:
Target is to create a template for mapping member "array
accessor" to member function.
For example:
class Foo {
...
int elementsAccessor(size_t index) { ... }
...
mixin MagicTemplateMixin!("elements", elementsAccessor);
On 03/30/14 15:36, Jack Applegame wrote:
> Wraper structure again. Is there solution without it?
No. D only allows op overloading in structs/unions/classes, so
one of those will be necessary. The simpliest solution would be
something like:
class C {
int elementsAccessor(size_t index) { .
Does DMD currently avoid range checks in array slice expressions
such as
f(x[0..$/2])
f(x[$/2..$])
typically found in divide-and-conquer algorithms such as
quicksort?
If not, what would it require to implement it?
Nordlöw:
Does DMD currently avoid range checks in array slice
expressions such as
f(x[0..$/2])
f(x[$/2..$])
You have two simple ways to answer your question: try to go past
the slices and look if D raises an error, and look at the asm
produced with various compiler switches.
Bye,
bearoph
Am 30.03.2014 21:35, schrieb Carl Sturtivant:
Context: struct values that are (non-ref) parameters & local variables.
Is there a way to arrange that a particular struct's special
constructors (postblit,destructor) should always be called even on move,
or on destruction of a default initialized
Context: struct values that are (non-ref) parameters & local
variables.
Is there a way to arrange that a particular struct's special
constructors (postblit,destructor) should always be called even
on move, or on destruction of a default initialized value,
temporary or not, etcetera, i.e. en
I don't know where to ask this.
How do I change the password associated with my use of this forum?
On Sunday, 30 March 2014 at 16:09:37 UTC, Matt wrote:
I have little experience in multi-threading programming, and
was digging into std.concurrency, but I don't really understand
the Condition class as it was used there. Could someone provide
a bare-bones use of this class? I would be much obli
On 03/30/2014 09:09 AM, Matt wrote:
I have little experience in multi-threading programming, and was digging
into std.concurrency, but I don't really understand the Condition class
as it was used there. Could someone provide a bare-bones use of this
class? I would be much obliged, thanks.
I hav
Gary Miller:
char[] ReplaceAllSubstrings(inout char[] Original,
in char[] SearchString,
in char[] Substring)
{
string SOriginal = Original.dup;
string SSearchString = SearchString.dup;
On Sunday, 30 March 2014 at 16:42:54 UTC, Matt wrote:
On Sunday, 30 March 2014 at 16:33:47 UTC, Dicebot wrote:
This is not explicitly mentioned anywhere because "runtime
type information"
(http://dlang.org/phobos/object.html#.Classinfo) is a
wide-spread term with strong meaning.
what about .
On Sunday, 30 March 2014 at 16:33:47 UTC, Dicebot wrote:
This is not explicitly mentioned anywhere because "runtime type
information" (http://dlang.org/phobos/object.html#.Classinfo)
is a wide-spread term with strong meaning.
what about .stringof? I don't think it mentions about the fact
that
On Sunday, 30 March 2014 at 16:26:48 UTC, Matt wrote:
On Friday, 28 March 2014 at 13:38:01 UTC, Dicebot wrote:
.classinfo name is name for actual class instance referenced
from the variable it was applied to. It happens to be fully
qualified but key difference here is that it uses RTTI
(run-t
On Friday, 28 March 2014 at 13:38:01 UTC, Dicebot wrote:
.classinfo name is name for actual class instance referenced
from the variable it was applied to. It happens to be fully
qualified but key difference here is that it uses RTTI
(run-time type information) to access "real" type of
polymor
I have little experience in multi-threading programming, and was
digging into std.concurrency, but I don't really understand the
Condition class as it was used there. Could someone provide a
bare-bones use of this class? I would be much obliged, thanks.
On Sunday, 30 March 2014 at 15:58:52 UTC, Gary Miller wrote:
Are there any alternate libraries for D that have a mutable
string datatype or is there a way to override the immutable
characteristic of the string datatype by reallocating it or
something?
string.dup property does a copy of origi
In a lot of my string manipulation functions I need the
flexibility of passing a string but other times I need to pass a
char[] so that I can change the contents of the string in the
function. Because the string data type is immutable I get errors
if I pass it as a parameter and try to chang
Wraper structure again. Is there solution without it?
thanks i take a look at it. actually i thought along the lines of
antlr or coo/r.
On Sunday, 30 March 2014 at 13:20:49 UTC, evilrat wrote:
On Sunday, 30 March 2014 at 13:08:08 UTC, needs wrote:
hi,
i need a scanner parser generator that generates d code. i
found
abandoned, primitive and d1 pr
On Sunday, 30 March 2014 at 12:42:16 UTC, Jack Applegame wrote:
Target is to create a template for mapping member "array
accessor" to member function.
For example:
class Foo {
...
int elementsAccessor(size_t index) { ... }
...
mixin MagicTemplateMixin!("elements", elementsAccessor);
On Sunday, 30 March 2014 at 13:08:08 UTC, needs wrote:
hi,
i need a scanner parser generator that generates d code. i found
abandoned, primitive and d1 projects. is there something one can
use with the current version and -m64?
regards
pegged?
http://code.dlang.org
hi,
i need a scanner parser generator that generates d code. i found
abandoned, primitive and d1 projects. is there something one can
use with the current version and -m64?
regards
Sorry. Not "getter", should be "elementsAccessor" instead.
Target is to create a template for mapping member "array
accessor" to member function.
For example:
class Foo {
...
int elementsAccessor(size_t index) { ... }
...
mixin MagicTemplateMixin!("elements", elementsAccessor);
// or better
alias elements = SuperMagicTemplate!elementsAccess
On Sunday, 30 March 2014 at 11:16:16 UTC, BeschBesch wrote:
have you looked at exported symbols in dll? it may be C++ from
what you said(lib not designed for C++?), so you can try
extern(C++) on D side instead extern(C). or add manually
#ifdef __cplusplus and extern "C" on lib side(if its not t
have you looked at exported symbols in dll? it may be C++ from
what you said(lib not designed for C++?), so you can try
extern(C++) on D side instead extern(C). or add manually #ifdef
__cplusplus and extern "C" on lib side(if its not that big of
course).
First of all: I started with a C++-dll
On Saturday, 29 March 2014 at 05:01:14 UTC, Gary Miller wrote:
-- SNIP --
I only need it down to the second and from my current machine
so I don't need to use any of the more accurate clocks used
for benchmarking right now.
On Saturday, 29 March 2014 at 09:30:44 UTC, Gary Willoughby
wrote:
On Saturday, 29 March 2014 at 15:03:18 UTC, BeschBesch wrote:
I want to use a set of functions that rely on a library which
is not available for D (Harfbuzz). So I just wrote myself a set
a functions that will do anything I need (Init, Free, Fonts,
Text, etc).
The DLL is working fine and dyna
36 matches
Mail list logo