Hello,
Given:
class SomeClass {
public {
void someSimpleMethod() {}
template setOfTemplatedMethods(Type) {
void templatedMethodOne() {}
void templatedMethodTwo() {}
}
}
}
Is there a way to detect at compile time if a member of
On Thursday, 10 September 2015 at 18:01:10 UTC, Russel Winder
wrote:
Is there an easy way of knowing when you do not have to
initialize the D runtime system to call D code from, in this
case, Python via a C adapter?
I naïvely transformed some C++ to D, without consideration of D
runtime
On Sunday, 13 September 2015 at 10:10:32 UTC, Jakob Ovrum wrote:
On Thursday, 10 September 2015 at 18:01:10 UTC, Russel Winder
wrote:
Is there an easy way of knowing when you do not have to
initialize the D runtime system to call D code from, in this
case, Python via a C adapter?
I naïvely
On Sunday, 13 September 2015 at 08:26:55 UTC, Alexandru Ermicioi
wrote:
Hello,
Given:
class SomeClass {
public {
void someSimpleMethod() {}
template setOfTemplatedMethods(Type) {
void templatedMethodOne() {}
void templatedMethodTwo() {}
}
Just wondering if anyone here might know how I can accomplish
this... basically I'm editing my D code in Sublime using the Dkit
plugin to access DCD which so far is more reliable than
monodevelop's autocomplete but I do need to reset the server
pretty often... but that's neither here nor
On 2015-09-13 12:10, Jakob Ovrum wrote:
On Linux and other ELF-using platforms, initialization and
deinitialization functions could be placed in the .init and .deinit
special sections, but I don't know if druntime has any convenient
provisions for this. With GDC and LDC you can probably use a
On Sunday, 13 September 2015 at 03:20:31 UTC, deed wrote:
string s = "Some text";
s.retro.find("e"); // `Some te` (Surprising to me.
Error? 2.067.1)
Sorry, the above is wrong, .retro.find does indeed return what's
expected.
string s = "Some text";
s.retro.find("e").writeln; //
Hi everybody! I'm new to this forum so, please excuse me in
advance for asking silly questions. I think I'm not the first
person which wondering about this topic, but I'm trying to
combine Unique type and concurrency module, getting the compiler
error
struct std.typecons.Unique!(S).Unique is
On Sunday, 13 September 2015 at 15:35:07 UTC, Jonathan M Davis
wrote:
But the idea that your average D program is going to run into
problems with the GC while using Phobos is just plain wrong.
The folks who need to care are the rare folks who need extreme
enough performance that they can't
On Sunday, 13 September 2015 at 03:20:31 UTC, deed wrote:
...
and since `string` is an alias for `const(char)[]`, it's not ...
string is an alias for immutable(char)[], not const(char)[].
http://dlang.org/arrays.html#strings
Sorry about the noise.
can I check if a member of a T has a member without using a mixin?
hid_t createDataType(T)()
if (__traits(isSame, TemplateOf!(T), PriceBar))
{
auto tid=H5T.create(H5TClass.Compound,T.sizeof);
enum offsetof(alias type, string field) = mixin(type.stringof
~"."~field~".offsetof");
On Sunday 13 September 2015 15:32, xky wrote:
> [ pipe.d ]:
> ==
> import std.process;
> import std.stdio;
>
> void main(){
> auto info = pipeProcess("child.exe");
> scope(exit) wait(info.pid);
>
>
On Sunday, 13 September 2015 at 13:34:18 UTC, Adam D. Ruppe wrote:
I'm in a super rush, running late to something else, but try
using readln in the child before writing and see what happens.
You sent data to it but the child never read it.
oh my... you're right. lol
so, i fix "pipe.d" this:
On Sunday, 13 September 2015 at 12:45:02 UTC, Gary Willoughby
wrote:
On Sunday, 13 September 2015 at 10:00:13 UTC, SuperLuigi wrote:
but whatever I put in messes up and I just get errors...
So what are the errors?
Depends what I put in, but they're just basically saying what I'm
putting in
On Saturday, September 12, 2015 13:42:42 Prudence via Digitalmars-d-learn wrote:
> On Saturday, 12 September 2015 at 06:23:12 UTC, Jonathan M Davis
> wrote:
> > On Friday, September 11, 2015 23:29:05 Laeeth Isharc via
> > Digitalmars-d-learn wrote:
> >> On Friday, 11 September 2015 at 21:58:28
On Friday, 11 September 2015 at 17:29:47 UTC, Prudence wrote:
I don't care about "maybe" working. Since the array is hidden
inside a class I can control who and how it is used and deal
with the race conditions.
Looks like destruction slipped out of your control. That is
solved by making
On Sunday, 13 September 2015 at 10:00:13 UTC, SuperLuigi wrote:
but whatever I put in messes up and I just get errors...
So what are the errors?
I'm in a super rush, running late to something else, but try
using readln in the child before writing and see what happens.
You sent data to it but the child never read it.
Hello. :)
I just got a this problem when i read "D Cookbook".
[ pipe.d ]:
==
import std.process;
import std.stdio;
void main(){
auto info = pipeProcess("child.exe");
scope(exit) wait(info.pid);
On Sunday, 13 September 2015 at 16:53:20 UTC, ponce wrote:
GC is basically ok for anything soft-realtime, where you
already spend a lot of time to go fast enough. And if you want
hard-realtime, well you wouldn't want malloc either.
It's a non-problem.
If this was true then Go would not have
On Sunday, 13 September 2015 at 16:58:22 UTC, Ola Fosheim Grøstad
wrote:
On Sunday, 13 September 2015 at 15:35:07 UTC, Jonathan M Davis
wrote:
the GC heavily. And the reality of the matter is that the vast
majority of programs will have _no_ problems with using the GC
so long as they don't use
On Sunday, 13 September 2015 at 17:24:20 UTC, Laeeth Isharc wrote:
On Sunday, 13 September 2015 at 17:09:57 UTC, wobbles wrote:
Use __traits(compiles, date.second)?
Thanks.
This works:
static if (__traits(compiles, { T bar; bar.date.hour;}))
pragma(msg,"hour");
else
On Sunday, 13 September 2015 at 17:16:02 UTC, ponce wrote:
On Sunday, 13 September 2015 at 17:00:30 UTC, Ola Fosheim
If this was true then Go would not have a concurrent collector.
I was speaking of the D language.
Go only added concurrent GC now at version 1.5 and keep improving
it to
Some special interest thingamabob:
I've tried to redefine "else if" as "elif" using "alias elif =
else if;". No matter what to no avail.
I know this is probably useless fancy stuff, but is there any way
to get this done without much ado?
On Sunday, 13 September 2015 at 16:46:54 UTC, Laeeth Isharc wrote:
can I check if a member of a T has a member without using a
mixin?
hid_t createDataType(T)()
if (__traits(isSame, TemplateOf!(T), PriceBar))
{
auto tid=H5T.create(H5TClass.Compound,T.sizeof);
enum offsetof(alias type,
On Sunday, 13 September 2015 at 17:09:57 UTC, wobbles wrote:
Use __traits(compiles, date.second)?
Thanks.
This works:
static if (__traits(compiles, { T bar; bar.date.hour;}))
pragma(msg,"hour");
else
pragma(msg,"nohour");
On Sunday, 13 September 2015 at 15:35:07 UTC, Jonathan M Davis
wrote:
the GC heavily. And the reality of the matter is that the vast
majority of programs will have _no_ problems with using the GC
so long as they don't use it heavily. Programming like you're
in Java and allocating everything on
On Sunday, 13 September 2015 at 17:00:30 UTC, Ola Fosheim Grøstad
wrote:
On Sunday, 13 September 2015 at 16:53:20 UTC, ponce wrote:
GC is basically ok for anything soft-realtime, where you
already spend a lot of time to go fast enough. And if you want
hard-realtime, well you wouldn't want
On Sunday, 13 September 2015 at 17:16:02 UTC, ponce wrote:
On Sunday, 13 September 2015 at 17:00:30 UTC, Ola Fosheim
Grøstad wrote:
On Sunday, 13 September 2015 at 16:53:20 UTC, ponce wrote:
GC is basically ok for anything soft-realtime, where you
already spend a lot of time to go fast enough.
On Sunday, 13 September 2015 at 19:51:38 UTC, anonymous wrote:
On Sunday 13 September 2015 21:47, Thunderbird wrote:
Some special interest thingamabob:
I've tried to redefine "else if" as "elif" using "alias elif =
else if;". No matter what to no avail.
I know this is probably useless
On Sunday 13 September 2015 21:47, Thunderbird wrote:
> Some special interest thingamabob:
>
> I've tried to redefine "else if" as "elif" using "alias elif =
> else if;". No matter what to no avail.
>
> I know this is probably useless fancy stuff, but is there any way
> to get this done
On Sunday, 13 September 2015 at 19:39:20 UTC, Ola Fosheim Grostad
wrote:
The theoretical limit for 10ms mark sweep collection on current
desktop cpus is 60 megabytes at peak performance. That means
you'll have to stay below 30 MiB in total memory use with
pointers.
30 MiB of scannable
On Sunday, September 13, 2015 17:17:01 Ali Çehreli via Digitalmars-d-learn
wrote:
> On 09/13/2015 08:21 AM, Jonathan M Davis via Digitalmars-d-learn wrote:
> > On Saturday, September 12, 2015 14:59:23 Ali Çehreli via
> Digitalmars-d-learn wrote:
> >> On 09/12/2015 02:29 PM, Marco Leise wrote:
>
On 09/13/2015 09:09 AM, Alex wrote:
> I'm new to this forum so, please excuse me in advance for
> asking silly questions.
Before somebody else says it: There are no silly questions. :)
> struct std.typecons.Unique!(S).Unique is not copyable because it is
> annotated with @disable
I have made
On Sunday, September 13, 2015 16:53:18 ponce via Digitalmars-d-learn wrote:
> On Sunday, 13 September 2015 at 15:35:07 UTC, Jonathan M Davis
> wrote:
> > But the idea that your average D program is going to run into
> > problems with the GC while using Phobos is just plain wrong.
> > The folks who
On Sunday, September 13, 2015 16:58:21 Ola Fosheim Grøstad via
Digitalmars-d-learn wrote:
> On Sunday, 13 September 2015 at 15:35:07 UTC, Jonathan M Davis
> wrote:
> > the GC heavily. And the reality of the matter is that the vast
> > majority of programs will have _no_ problems with using the GC
On Monday, 14 September 2015 at 00:41:28 UTC, Jonathan M Davis
wrote:
stop-the-world GC. For instance, this has come up in
discussions on games where a certain framerate needs to be
maintained. Even a 100 ms stop would be way too much for them.
In fact, it came up with the concurrent GC that
On 09/13/2015 08:21 AM, Jonathan M Davis via Digitalmars-d-learn wrote:
> On Saturday, September 12, 2015 14:59:23 Ali Çehreli via
Digitalmars-d-learn wrote:
>> On 09/12/2015 02:29 PM, Marco Leise wrote:
>>
>> > Note that often the original dynamic array has additional
>> > capacity beyond
On Sunday, September 13, 2015 17:14:05 Prudence via Digitalmars-d-learn wrote:
> On Sunday, 13 September 2015 at 16:58:22 UTC, Ola Fosheim Grøstad
> wrote:
> > On Sunday, 13 September 2015 at 15:35:07 UTC, Jonathan M Davis
> > wrote:
> >> the GC heavily. And the reality of the matter is that the
On Sunday, 13 September 2015 at 01:49:56 UTC, deed wrote:
zip(arr[0 .. $-1], arr[1 .. $])
?
Assumes arrays. Better is
zip(arr.dropOne, arr)
If I have a static array `x` defined as
enum N = 3;
int[N] x;
how do I pass it's elements into a variadic function
f(T...)(T xs) if (T.length >= 3)
?
On Saturday, 12 September 2015 at 10:17:19 UTC, Nordlöw wrote:
How do I most elegantly iterate all the adjacent pairs in an
`InputRange` using Phobos?
Something like
[1,2,3,4] => [(1,2), (2,3), (3,4)]
What about using zip and a slice?
```
void main()
{
auto a = [1,2,3,4];
42 matches
Mail list logo