As Adam already said D on Pi is adventurous.
For MongoDB and web stuff, you should look into Vibe.d [0]. For
parsing I would suggest Pegged [1].
Welcome to D and Happy Hacking! :)
[0] http://vibed.org/
[1] https://github.com/PhilippeSigaud/Pegged
Thanks both. Well after several hours of
On 2013-10-10 19:23, H. S. Teoh wrote:
I have a template used for storing compile-time values:
template Def(int x, string y) {
alias impl = TypeTuple!(x,y);
}
How do I define a template isDef that, given some template alias A,
evaluates to true if A is some insta
On Thursday, 10 October 2013 at 01:24:03 UTC, Jesse Phillips
wrote:
On Wednesday, 9 October 2013 at 14:54:32 UTC, Colin Grogan
wrote:
is blocking. However, its not meant to be blocking is it not?
That new /bin/bash process is meant to run in parallel to the
main process?
I'm not sure exactly
On 2013-10-11 07:49, luminousone wrote:
import std.traits;
bool ChildInheritsFromParent( parent, child )( ) {
foreach ( k, t; BaseClassesTuple!child ) {
if( typeid(t) == typeid(parent) )
return true;
}
return false;
}
That will perform a runtime check and
On Friday, 11 October 2013 at 09:37:33 UTC, Jacob Carlborg wrote:
On 2013-10-11 07:49, luminousone wrote:
import std.traits;
bool ChildInheritsFromParent( parent, child )( ) {
foreach ( k, t; BaseClassesTuple!child ) {
if( typeid(t) == typeid(parent) )
return true;
Am 11.10.2013 00:27, schrieb Spacen Jasset:
Hello,
I am after a fast floor function; In fact a fast truncation and
conversion to integer. I see that std.math takes a real, and that
std.c.math takes a double.
Is there a quicker function, and what might cast(int)1.5f do?
Regards,
Spacen.
For
This is actually a very interesting question.
Usual approach is to use pattern matching on types but template
instance symbol is not a type on its own, it is just a symbol.
(with typeof == void)
My second guess was to check __traits(identifier, AliasParam) but
it looks like for aliased insta
On 2013-10-11 11:49, luminousone wrote:
Is is just the typeid call that makes it unable to be ran at compile
time or is their something else wrong in their?,
Would a string compare with type.classInfo.name fix that, or is their
not a tool yet in place for that?
Hmm, it may actually be possibl
On Friday, 11 October 2013 at 05:49:38 UTC, luminousone wrote:
On Friday, 11 October 2013 at 04:13:55 UTC, Agustin wrote:
I have a function that needs to check if the template provided
inherit a class.
For example:
public void function(T, A...)(auto ref A values)
{
// static assert(IsBaseOf(
On Friday, 11 October 2013 at 04:35:38 UTC, Ali Çehreli wrote:
On 10/10/2013 09:13 PM, Agustin wrote:
> I have a function that needs to check if the template
provided inherit a
> class.
>
> For example:
>
> public void function(T, A...)(auto ref A values)
function happens to be a keyword. :)
>
On 10/10/13 20:54, Dicebot wrote:
> On Thursday, 10 October 2013 at 17:47:54 UTC, Namespace wrote:
>>
>> import std.stdio;
>>
>> void foo1(void function(void*) fp) { }
>> void foo2(void function(int) fp) { }
>> void foo3(void*) { }
>>
>> void main()
>> {
>> foo1((void* ptr) => ( assert(ptr
On Friday, 11 October 2013 at 15:55:17 UTC, Artur Skawina wrote:
It's probably not just "incompetence" (the compiler is able to
figure this
out in other contexts), but a deliberate choice. Having
function types
depend on their bodies would not be a good idea. Eg
int c;
auto f() {
Hey, I'm curious about this linker error:
OPTLINK (R) for Win32 Release 8.00.13
Copyright (C) Digital Mars 1989-2010 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
bar.obj(bar)
Error 42: Symbol Undefined _D3foo1A6__dtorMFZv
--- errorlevel 1
foo.d:
debug import std.stdio
On Friday, October 11, 2013 15:34:28 Jacob Carlborg wrote:
> On 2013-10-11 11:49, luminousone wrote:
> > Is is just the typeid call that makes it unable to be ran at compile
> > time or is their something else wrong in their?,
> >
> > Would a string compare with type.classInfo.name fix that, or is
On Friday, 11 October 2013 at 14:09:09 UTC, Gary Willoughby wrote:
On Friday, 11 October 2013 at 05:49:38 UTC, luminousone wrote:
On Friday, 11 October 2013 at 04:13:55 UTC, Agustin wrote:
I have a function that needs to check if the template
provided inherit a class.
For example:
public voi
On Friday, October 11, 2013 21:19:29 luminousone wrote:
> Using casts that way won't always be correct, it would be better
> to use reflection in some way if possible.
The only reason that the casts wouldn't be correct would be if the class
overrode opCast for the type that you're casting to or h
It's annoying and I don't get it. What is the problem of Optlink?
I tried version(unittest) instead of debug. It works then with
-debug, but if you compile with -unittest you get the same error.
On 11/10/2013 07:25, monarch_dodra wrote:> On Thursday, 10 October 2013
at 22:27:14 UTC, Spacen Jasset wrote:
>> Hello,
>>
>> I am after a fast floor function; In fact a fast truncation and
>> conversion to integer. I see that std.math takes a real, and that
>> std.c.math takes a double.
>>
>> Is
On Friday, 11 October 2013 at 07:09:17 UTC, Andrew wrote:
As Adam already said D on Pi is adventurous.
For MongoDB and web stuff, you should look into Vibe.d [0].
For parsing I would suggest Pegged [1].
Welcome to D and Happy Hacking! :)
[0] http://vibed.org/
[1] https://github.com/Philip
On Friday, 11 October 2013 at 19:19:31 UTC, luminousone wrote:
On Friday, 11 October 2013 at 14:09:09 UTC, Gary Willoughby
wrote:
On Friday, 11 October 2013 at 05:49:38 UTC, luminousone wrote:
On Friday, 11 October 2013 at 04:13:55 UTC, Agustin wrote:
I have a function that needs to check if th
On Friday, 11 October 2013 at 19:54:39 UTC, Jonathan M Davis
wrote:
On Friday, October 11, 2013 21:19:29 luminousone wrote:
Using casts that way won't always be correct, it would be
better
to use reflection in some way if possible.
The only reason that the casts wouldn't be correct would be i
It's due to having the destructor versioned out when building foo and visible when building bar.
When brought together, you've created an incompatible whole. There's no destructor actually
included in foo's .o file that you told it it could expect to find.
There's no bug in the compiler or lin
On Friday, October 11, 2013 23:06:53 luminousone wrote:
> On Friday, 11 October 2013 at 19:54:39 UTC, Jonathan M Davis
>
> wrote:
> > On Friday, October 11, 2013 21:19:29 luminousone wrote:
> >> Using casts that way won't always be correct, it would be
> >> better
> >> to use reflection in some wa
Ok, that is what I wanted to hear.
On Friday, 11 October 2013 at 21:16:38 UTC, Brad Roberts wrote:
It's due to having the destructor versioned out when building
foo and visible when building bar. When brought together,
you've created an incompatible whole. There's no destructor
actually included in foo's .o file that you told i
On Sunday, 6 October 2013 at 13:11:02 UTC, Andrej Mitrovic wrote:
On 10/6/13, Namespace wrote:
And I should write a blog post about your and my solution. :)
Let me try to hack on __PRETTY_FUNCTION__ first and I'll post a
working example here soon.
Is there something new?
On Friday, 11 October 2013 at 21:49:50 UTC, Jonathan M Davis
wrote:
On Friday, October 11, 2013 23:06:53 luminousone wrote:
On Friday, 11 October 2013 at 19:54:39 UTC, Jonathan M Davis
wrote:
> On Friday, October 11, 2013 21:19:29 luminousone wrote:
>> Using casts that way won't always be corre
On Friday, 11 October 2013 at 22:39:18 UTC, Namespace wrote:
On Sunday, 6 October 2013 at 13:11:02 UTC, Andrej Mitrovic
wrote:
On 10/6/13, Namespace wrote:
And I should write a blog post about your and my solution. :)
Let me try to hack on __PRETTY_FUNCTION__ first and I'll post a
working ex
On Saturday, 12 October 2013 at 01:35:48 UTC, Agustin wrote:
Like the the title says, i cannot inherit a class and have
interfaces.
class A
{
}
interface B
{
}
class C : A, B -> Error
{
}
I know that D doesn't support multiple classes, but that means
i cannot mix a class and an interface?
Like the the title says, i cannot inherit a class and have
interfaces.
class A
{
}
interface B
{
}
class C : A, B -> Error
{
}
I know that D doesn't support multiple classes, but that means i
cannot mix a class and an interface?
On Saturday, October 12, 2013 00:54:48 luminousone wrote:
> The inability to handle null is pretty big, specially considering
> that at not point is the class instance itself cared about!,
No. It's expected. When you are casting to a particular object to test whether
the object is of that type, y
On Friday, October 11, 2013 22:31:25 Jonathan M Davis wrote:
> On Saturday, October 12, 2013 00:54:48 luminousone wrote:
> > The inability to handle null is pretty big, specially considering
> > that at not point is the class instance itself cared about!,
>
> No. It's expected. When you are castin
32 matches
Mail list logo