On Saturday, 20 April 2013 at 03:26:29 UTC, Diggory wrote:
I've been trying to write a win32 app using opengl in D, but
none of the bindings I've found have been sufficient:
- core.sys.windows.windows:
Missing large parts of wingdi.h, including PFD_* constants,
ChoosePixelFormat(),
On Saturday, 20 April 2013 at 04:46:45 UTC, dnewbie wrote:
phobos64.lib(dmain2_4ac_1a5.obj) : error LNK2019: unresolved
external symbol _Dmain referenced in function main
Please add -L/DLL to the command line.
Ahhh ok, thanks! I assumed DMD would have detected the output
file being a DLL
Hi,
I wonder why I can't use Algebraic like this:
struct Foo(bool flag)
{
size_t bar() { return flag ? 42 : 0; }
}
Foo!false f;
Foo!true t;
Algebraic!(typeof(t), typeof(f)) v;
v = t;
Variant i = v.bar(); // or an Algebraic of the return types.
This
On Saturday, 20 April 2013 at 03:26:29 UTC, Diggory wrote:
- win32.windows:
Apparantly out of date and gives linker errors, although it
does declare all the functions needed.
Is this the ChoosePixelFormat error from your other thread?
If so - you probably need to link your program with
On 2013-04-20 05:26, Diggory wrote:
- derelict.opengl.gl:
Has all of opengl plus wgl* functions needed for windows, but has more
dependencies than an ideal opengl binding would have.
Dependencies, like what?
--
/Jacob Carlborg
It seems my resources were breaking the link! Essentially, I was
suffering from this problem:
http://stackoverflow.com/questions/10888391/link-fatal-error-lnk1123-failure-during-conversion-to-coff-file-invalid-or-c/14144713
In any case, problem solved. Thanks! :)
On Saturday, 20 April 2013 at 10:09:37 UTC, Jacob Carlborg wrote:
On 2013-04-20 05:26, Diggory wrote:
- derelict.opengl.gl:
Has all of opengl plus wgl* functions needed for windows, but
has more
dependencies than an ideal opengl binding would have.
Dependencies, like what?
Well the opengl
On Friday, 19 April 2013 at 22:56:00 UTC, bearophile wrote:
So, why isn't TimSort the default?
Probably because someone thinks that on average the other
sort is faster.
In theory the other should be faster, because if you relax the
constraints of the sort being stable I think in theory you
import std.stdio : writeln;
template Template (uint n, T)
{
T[n] statArr()
{
T[n] arr;
return arr;
}
T[] dynArr()
{
T[] dynArr = new T[n];
return dynArr;
}
}
void main()
{
alias statArr9 = Template!(9, int).statArr;
alias statArr3
On Sat, 13 Apr 2013 18:36:21 +0200, Jeremy DeHaan
dehaan.jerem...@gmail.com wrote:
I'm on Windows, and I my compilation was nothing more than dmd -O
-release main.d to get the issue I described.
Turns out, the problem starts here:
static const(float) pi = 3.141592654f;
If we compare
Made available on dpaste:
http://dpaste.dzfl.pl/7b5c36f8
On dpaste, the struct with an int didn't compile. (Same error
message)
It turns out that
Template!(2, Sint).statArr()[0].writeln();
compiles with
$ dmd test.d -m64
but not with
$ dmd test.d
On Saturday, 20 April 2013 at 13:37:55 UTC, John Colvin wrote:
On Saturday, 20 April 2013 at 12:23:20 UTC, deed wrote:
import std.stdio : writeln;
template Template (uint n, T)
{
T[n] statArr()
{
T[n] arr;
return arr;
}
T[] dynArr()
{
T[] dynArr = new T[n];
On Saturday, 20 April 2013 at 12:23:20 UTC, deed wrote:
import std.stdio : writeln;
template Template (uint n, T)
{
T[n] statArr()
{
T[n] arr;
return arr;
}
T[] dynArr()
{
T[] dynArr = new T[n];
return dynArr;
}
}
void main()
{
alias
Why can D implicitly cast from the subclass to the base class,
but not implicitly from the subclasse pointer to the base class
pointer?
This works: http://dpaste.1azy.net/30dd34a0
This not: http://dpaste.1azy.net/ffacfd83
Makes not much sense for me.
On Saturday, 20 April 2013 at 12:23:20 UTC, deed wrote:
import std.stdio : writeln;
template Template (uint n, T)
{
T[n] statArr()
{
T[n] arr;
return arr;
}
T[] dynArr()
{
T[] dynArr = new T[n];
return dynArr;
}
}
void main()
{
alias
On Saturday, 20 April 2013 at 13:37:55 UTC, John Colvin wrote:
On Saturday, 20 April 2013 at 12:23:20 UTC, deed wrote:
import std.stdio : writeln;
template Template (uint n, T)
{
T[n] statArr()
{
T[n] arr;
return arr;
}
T[] dynArr()
{
T[] dynArr = new T[n];
On 4/20/13, Namespace rswhi...@googlemail.com wrote:
Why can D implicitly cast from the subclass to the base class,
but not implicitly from the subclasse pointer to the base class
pointer?
This works: http://dpaste.1azy.net/30dd34a0
This not: http://dpaste.1azy.net/ffacfd83
Makes not much
On Saturday, 20 April 2013 at 15:32:20 UTC, Andrej Mitrovic wrote:
On 4/20/13, Namespace rswhi...@googlemail.com wrote:
Why can D implicitly cast from the subclass to the base class,
but not implicitly from the subclasse pointer to the base class
pointer?
This works:
On Saturday, 20 April 2013 at 14:56:25 UTC, Namespace wrote:
Why can D implicitly cast from the subclass to the base class,
but not implicitly from the subclasse pointer to the base class
pointer?
This works: http://dpaste.1azy.net/30dd34a0
This not: http://dpaste.1azy.net/ffacfd83
Makes not
I have all the needed files to use Direlect3, and I have Mono-D
installed on Xamarin, I was wondering how I could put it all
together in a project.
Thanks for the analysis.
On 04/20/2013 05:30 AM, Simen Kjaeraas wrote:
static const(float) pi = 3.141592654f;
If we compare that to std.math.PI, we see that they're different:
writeln( 3.141592654f - std.math.PI );
4.10207e-10
std.math.PI is a 'real'. According to the
20-Apr-2013 16:22, Chris Cain пишет:
On Friday, 19 April 2013 at 22:56:00 UTC, bearophile wrote:
So, why isn't TimSort the default?
Probably because someone thinks that on average the other sort is
faster.
In theory the other should be faster, because if you relax the
constraints of the sort
On Saturday, 20 April 2013 at 15:34:50 UTC, John Colvin wrote:
On Saturday, 20 April 2013 at 15:32:20 UTC, Andrej Mitrovic
wrote:
On 4/20/13, Namespace rswhi...@googlemail.com wrote:
Why can D implicitly cast from the subclass to the base class,
but not implicitly from the subclasse pointer to
On Saturday, 20 April 2013 at 16:36:09 UTC, Namespace wrote:
It works fine in C++ (of course with -std=c++0x)
http://codepad.org/qLIjGGd4
It's been a while since I did any c++ but:
1) I don't see any pointer to pointer polymorphism in there.
2) That c++ code is equivalent to the version of
On Saturday, 20 April 2013 at 17:24:33 UTC, John Colvin wrote:
On Saturday, 20 April 2013 at 16:36:09 UTC, Namespace wrote:
It works fine in C++ (of course with -std=c++0x)
http://codepad.org/qLIjGGd4
It's been a while since I did any c++ but:
1) I don't see any pointer to pointer
The D book has a diagram that shows implicit conversions. All
implicit conversions from integral types to floating point go to
real, not double or float.
I return a pointer from an instance of B and the compiler cast
it implicit to A*. Look what is inside of 'bstore' (instances
of B) and what the type of 'get' is (A*).
And no, the equivalent version would use 'A' as return type of
'get', not 'A*'.
Ah, I think I understand know what you
No responses? Should I post this somewhere else?
Dne 20.4.2013 20:45, Dementor561 napsal(a):
No responses? Should I post this somewhere else?
Hi,
this is the correct forum. However, you may have to wait a while. It is
Saturday and the group of people who use Derelict with Mono-D is
probably only a small subset of participants in this
On 04/20/2013 11:04 AM, Casper Færgemand shortt...@gmail.com wrote:
The D book has a diagram that shows implicit conversions.
It is Figure 2.3 on page 44 of my copy of TDPL.
All implicit
conversions from integral types to floating point go to real, not double
or float.
Yes. The figure
On Saturday, 20 April 2013 at 17:42:02 UTC, Namespace wrote:
And no, the equivalent version would use 'A' as return type of
'get', not 'A*'.
Sorry, no.
//C++
A* get(unsigned int id);
//D
A get(unsigned int id);
Those are the equivalent declarations. A reference is, for these
intents and
On Saturday, 20 April 2013 at 21:36:37 UTC, John Colvin wrote:
On Saturday, 20 April 2013 at 17:42:02 UTC, Namespace wrote:
And no, the equivalent version would use 'A' as return type of
'get', not 'A*'.
Sorry, no.
//C++
A* get(unsigned int id);
//D
A get(unsigned int id);
Those are the
32 matches
Mail list logo