On Tuesday, 12 January 2016 at 20:48:37 UTC, Dav1d wrote:
On Tuesday, 12 January 2016 at 19:16:51 UTC, Jason Jeffory
wrote:
So, I finally got it to work by abandoning demios and static
linking. Derelict + dynamic linking worked with only about a
min of problems(copying the proper dll to the cor
On Wednesday, 13 January 2016 at 01:40:59 UTC, Mike Parker wrote:
On Tuesday, 12 January 2016 at 21:08:30 UTC, Jason Jeffory
wrote:
(I should mention that I am exaggerating a bit, and some of
the complaints about D are actually more directed to the
programming community in general. D has the sa
Why is there no way to specify the desired memory order with
these?
What memory order am I supposed to assume? The documentation is
sparse.
Hello. Compiling the following code:
mixin template intCtor() { this(int i) {} }
struct Test { mixin intCtor; this(string s) {} }
void main()
{
auto a = Test("hello");
auto b = Test(1);
}
...gives the error:
(6): Error: constructor .Test.this (string s) is not callable
using argument ty
On Sunday, 10 January 2016 at 14:32:02 UTC, Jack wrote:
Hello. So I was trying to pass a delegate as an argument in a
function and was wondering if I'm writing the correct code for
it.
You see my code is :
//
class Foo()
{
void bar()
{
writeln("He
On Tuesday, 12 January 2016 at 21:08:30 UTC, Jason Jeffory wrote:
(I should mention that I am exaggerating a bit, and some of the
complaints about D are actually more directed to the
programming community in general. D has the same fundamental
issues though and it is just a matter of scale. Pro
On Tuesday, 12 January 2016 at 19:16:51 UTC, Jason Jeffory wrote:
So, I finally got it to work by abandoning demios and static
linking. Derelict + dynamic linking worked with only about a
min of problems(copying the proper dll to the correct place).
Every operating system has a well-defined se
Have anybody been thinking about adding a scale-hierarchy
structure on top of ndslice?
I need this to implementing some cool signal/image processing
algorithms in D.
When processing an image this structure is called a Mipmap.
On Tuesday, 12 January 2016 at 21:22:46 UTC, Jacob Carlborg wrote:
Is this supposed to work:
template Foo()
{
extern(C) int printf(in char*, ...);
}
mixin Foo;
void main()
{
printf("foo\n");
}
It fails with a linker error, undefined symbol, due to not
applying C mangling:
Undefined
Is this supposed to work:
template Foo()
{
extern(C) int printf(in char*, ...);
}
mixin Foo;
void main()
{
printf("foo\n");
}
It fails with a linker error, undefined symbol, due to not applying C
mangling:
Undefined symbols for architecture x86_64:
"__D4main8__mixin76printfUxPaYi"
On Tuesday, 12 January 2016 at 20:38:50 UTC, Laeeth Isharc wrote:
On Tuesday, 12 January 2016 at 19:38:32 UTC, Jason Jeffory
wrote:
It seems the whole state of affairs in programming is "Lets do
the most minimal work to get X to work in environment Y. To
hell with everything else!". The program
(I should mention that I am exaggerating a bit, and some of the
complaints about D are actually more directed to the programming
community in general. D has the same fundamental issues though
and it is just a matter of scale. Programming is way more fun
when you are actually programming and get
On Tuesday, 12 January 2016 at 19:16:51 UTC, Jason Jeffory wrote:
So, I finally got it to work by abandoning demios and static
linking. Derelict + dynamic linking worked with only about a
min of problems(copying the proper dll to the correct place).
I'd prefer static linking but I can deal with
On Tuesday, 12 January 2016 at 19:38:32 UTC, Jason Jeffory wrote:
It seems the whole state of affairs in programming is "Lets do
the most minimal work to get X to work in environment Y. To
hell with everything else!". The programmers tend to do the
most minimal work to code stuff that they can
On Tuesday, 12 January 2016 at 08:42:19 UTC, Robert M. Münch
wrote:
On 2016-01-12 04:15:36 +, Mike Parker said:
You can avoid all of these headaches by using dynamic bindings
like those at DerelictOrg [4] if they are available for the
libraries you use. Then the compile-time dependency on
So, I finally got it to work by abandoning demios and static
linking. Derelict + dynamic linking worked with only about a min
of problems(copying the proper dll to the correct place). I'd
prefer static linking but I can deal with that later.
My current problem is: 1. The code doesn't work as e
Hi,
I am not sure, whether this is a current limitation of the
windows dll functionality of D
or I am doing s.th. which will not work.
I have developed in D a windows DLL which creates class instances
by passing the name (using object.factory method).
In another D application I am using thi
On Tuesday, 12 January 2016 at 17:50:45 UTC, Meta wrote:
On Tuesday, 12 January 2016 at 16:20:10 UTC, naptime wrote:
[...]
Yes, symbols in the form of `_Foo` are not reserved in D. Only
symbols beginning with two underscores, such as __traits or
__gshared. Technically the different `op*` nam
On Tuesday, 12 January 2016 at 16:20:10 UTC, naptime wrote:
Hello,
I already know the answer to my question, but I would like
someone to reassure me that I'm not mistaken before I rename
literally hundreds of identifiers in my code (and refactor at
least two large templates).
TL;DR: Am I
On Tuesday, 12 January 2016 at 17:03:49 UTC, Ali Çehreli wrote:
On 01/12/2016 08:55 AM, ParticlePeter wrote:
> I have a function "otherFunc" which takes a function with
lots of
> parameters as argument:
>
> void otherFunc( void function( ref int p1, float p2, ubyte
p3, ... ) mf );
Ok.
> otherF
On Tuesday, 12 January 2016 at 17:28:35 UTC, Marc Schütz wrote:
On Tuesday, 12 January 2016 at 16:55:48 UTC, ParticlePeter
wrote:
[...]
If I understand you correctly (not sure), you would like to
write `MF` so that you don't need to specify the parameters in
the lambda? That's not possible,
On 12.01.2016 17:55, ParticlePeter wrote:
When I pass a parameter to otherFunc I use this syntax for an anonymous
function parameter:
otherFunc( void function( ref int p1, float p2, ubyte p3 ) { myCode; } );
You don't. That's not valid code. You can be using this:
otherFunc( function void ( r
On Tuesday, 12 January 2016 at 16:55:48 UTC, ParticlePeter wrote:
I can rewrite the definition of otherFunc like this:
void otherFunc( MF mf );
But I cannot pass an anonymous function to otherFunc like this:
otherFunc( MF { myCode; } );
Thats what I want. Any working example?
If I understand
On 01/12/2016 08:55 AM, ParticlePeter wrote:
> I have a function "otherFunc" which takes a function with lots of
> parameters as argument:
>
> void otherFunc( void function( ref int p1, float p2, ubyte p3, ... )
mf );
Ok.
> otherFunc( void function( ref int p1, float p2, ubyte p3 ) { myCode;
On Tuesday, 12 January 2016 at 16:22:48 UTC, ParticlePeter wrote:
Actually, I do use only one param, and not int as well, hence I
would like the parameter list to be part of the alias.
Your example works though.
This was confusing, lets start fresh:
I have a function "otherFunc" which takes
On 01/12/2016 07:41 AM, ParticlePeter wrote:
> Please, if possible, also show me where I should have found the answer
> (D Reference, Alis book
It is not used with a function literal but searching for 'alias' below
yields something close: :)
http://ddili.org/ders/d.en/lambda.html
Function
On Tuesday, 12 January 2016 at 16:00:37 UTC, Daniel Kozak wrote:
V Tue, 12 Jan 2016 15:41:02 +
ParticlePeter via Digitalmars-d-learn
napsáno:
I have a function type and variable and assign a function to
it:
void function( int i ) myFunc;
myFunc = void function( int i ) { myCode; }
How w
On 01/12/2016 08:22 AM, ParticlePeter wrote:
> On Tuesday, 12 January 2016 at 15:57:03 UTC, Marc Schütz wrote:
> Not what I wanted, I wanted the parameter to be part of the alias:
> myFunc = MF { ... }
>
> I want to pass such a function to another function:
>
> alias MF = void function(int i);
>
Hello,
I already know the answer to my question, but I would like
someone to reassure me that I'm not mistaken before I rename
literally hundreds of identifiers in my code (and refactor at
least two large templates).
TL;DR: Am I understanding correctly that "_Foo" is NOT reserved
as an id
On Tuesday, 12 January 2016 at 15:57:03 UTC, Marc Schütz wrote:
On Tuesday, 12 January 2016 at 15:41:02 UTC, ParticlePeter
wrote:
I have a function type and variable and assign a function to
it:
void function( int i ) myFunc;
myFunc = void function( int i ) { myCode; }
How would I declare an
On 12.01.2016 16:41, ParticlePeter wrote:
// alias MF = void function( int i ); // not working
// alias void function( int i ) MF; // not working
These are both fine. The first one is the preferred style.
MF myFunc;
myFunc = MF { myCode };
This line doesn't work. Function literals don't
V Tue, 12 Jan 2016 15:41:02 +
ParticlePeter via Digitalmars-d-learn
napsáno:
> I have a function type and variable and assign a function to it:
>
> void function( int i ) myFunc;
> myFunc = void function( int i ) { myCode; }
>
> How would I declare an alias for void function( int i ) such t
On Tuesday, 12 January 2016 at 15:41:02 UTC, ParticlePeter wrote:
I have a function type and variable and assign a function to it:
void function( int i ) myFunc;
myFunc = void function( int i ) { myCode; }
How would I declare an alias for void function( int i ) such
that the case above would w
I have a function type and variable and assign a function to it:
void function( int i ) myFunc;
myFunc = void function( int i ) { myCode; }
How would I declare an alias for void function( int i ) such that
the case above would work like this:
// alias MF = void function( int i ); // not work
On Monday, 11 January 2016 at 00:46:38 UTC, Jason Jeffory wrote:
...
OK, I'll give it a try. What about GLUT and WGL? Whats the
difference between them all and glfw? Are all these just OS
helpers to reduce the boilerplate code?
These kind of questions are best clarified on the OpenGL wiki.
htt
On 1/12/16 8:03 AM, Jacob Carlborg wrote:
The following example compiles work as expected:
import std.stdio;
import std.typecons;
void main()
{
Nullable!(int) a;
static if(is(typeof(a) == Nullable!(U), U))
writeln("true");
else
writeln("false");
}
But if I use
The following example compiles work as expected:
import std.stdio;
import std.typecons;
void main()
{
Nullable!(int) a;
static if(is(typeof(a) == Nullable!(U), U))
writeln("true");
else
writeln("false");
}
But if I use the fully qualified name in the condition, i.e.
On Tuesday, 12 January 2016 at 12:32:11 UTC, Mike Parker wrote:
On Tuesday, 12 January 2016 at 08:42:19 UTC, Robert M. Münch
wrote:
I have seen countless problems because apps are using dynamic
linking and whole IT environements getting into DLL hell. IMO
one of the worst ideas these days.
On Tuesday, 12 January 2016 at 08:42:19 UTC, Robert M. Münch
wrote:
I have seen countless problems because apps are using dynamic
linking and whole IT environements getting into DLL hell. IMO
one of the worst ideas these days.
I'm not talking about dynamic linking, but dynamic loading. This
On 2016-01-11 02:22, Jason Jeffory wrote:
Dmd's setup construction is a bit weird and has some difficult issue
tracking.
How about if dmd supported, if it already doesn't, some ways to help the
user check the configuration of dmd. It would be quick and easy to
implement.
e.g.,
dmd -showinfo
T
On 2016-01-12 04:15:36 +, Mike Parker said:
You can avoid all of these headaches by using dynamic bindings like
those at DerelictOrg [4] if they are available for the libraries you
use. Then the compile-time dependency on the C library goes away and
all you need is the DLL at runtime.
I
41 matches
Mail list logo