Hey all,
I'm currently using D for a hook-based project that requires me
to build both a 32bit and 64bit DLL. Naturally, the 32bit DLL
builds fine, however I'm encountering linking issues for the
64bit.
I followed the instructions at
On Thu, 18 Apr 2013 18:13:14 -0400, Ali Çehreli acehr...@yahoo.com wrote:
Interesting.
Personally, I would not even bother with the second one and expect the
caller to simply put square brackets around the arguments:
[snip]
It is now safe, right?
Yes, for this case it is OK. But I
On Thu, 18 Apr 2013 18:08:48 -0400, bearophile bearophileh...@lycos.com
wrote:
To avoid those bugs I have suggested the simpler possible thing: (V[]
elems...) to dup the data on the heap every time. In theory if you write
(scope V[] elems...) it will be free to not dup the data, avoiding the
On Thu, 18 Apr 2013 19:15:06 -0400, H. S. Teoh hst...@quickfur.ath.cx
wrote:
I'm all for making this @system at the very least, if not outright
compile error. Storing a persistent reference to a stack-allocated
object is outright wrong... in the case of variadic array args, if the
compiler
Steven Schveighoffer:
we increasingly need scope to work for D to be easy to avoid
mistakes.
But I don't see any plan/implementation timeframe for scope :-(
I don't know why. I'd like to know Hara opinion on this.
Bye,
bearophile
Ok, i understand now the diference...
my question is how I should solve this problem?
Thanks,
Bogdan
On Thursday, 18 April 2013 at 20:57:23 UTC, Ali Çehreli wrote:
On 04/18/2013 12:37 PM, John Colvin wrote:
However, by a wider definition of the word, a struct could
also be said
to be an
Hi!
Consider a sorted array. Append an element that is less than all
the previous elements. Then sort the array again by the sort
function from std.algorithm.
An example follows:
-
import std.algorithm;
import std.datetime;
import std.range;
import std.stdio;
void main ()
{
Ivan Kazmenko:
Consider a sorted array. Append an element that is less than
all the previous elements. Then sort the array again by the
sort function from std.algorithm.
If you know that, then don't do a sort. Make some free space in
the array, shift the items, sort just the first part
20-Apr-2013 01:03, Ivan Kazmenko пишет:
With n = 30_000 as in the example, this takes time of the order of a
second on a modern computer, which is clearly O(n^2). I am using DMD
2.062.
Optimization flags if any?
--
Dmitry Olshansky
With n = 30_000 as in the example, this takes time of the
order of a
second on a modern computer, which is clearly O(n^2). I am
using DMD
2.062.
Optimization flags if any?
Both -O and no-flags give quadratic behavior.
Well, if that does not convince you the time grows faster than
20-Apr-2013 02:12, Ivan Kazmenko пишет:
With n = 30_000 as in the example, this takes time of the order of a
second on a modern computer, which is clearly O(n^2). I am using DMD
2.062.
Optimization flags if any?
Both -O and no-flags give quadratic behavior.
I sought after
-O -inline
Ivan Kazmenko:
A seemingly easy way to provide the choice globally would be to
have an assignable SwapStrategy.default in std.algorithm... or
would that be a bad design decision to have such a global state?
With that I think there is no way to write a pure sort. Hopefully
someday the sort()
Steven Schveighoffer:
we increasingly need scope to work for D to be easy to avoid
mistakes.
I have added a note about scope:
http://d.puremagic.com/issues/show_bug.cgi?id=5212
Bye,
bearophile
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(), SwapBuffers(), wgl*() functions.
- win32.windows:
Apparantly out of
phobos64.lib(dmain2_4ac_1a5.obj) : error LNK2019: unresolved
external symbol _Dmain referenced in function main
Please add -L/DLL to the command line.
15 matches
Mail list logo