On Thursday, 20 September 2018 at 20:48:50 UTC, spikespaz wrote:
I downloaded a known-good 32-bit libcurl.dll to distribute with
the project
I just figured that the multilib package is indeed missing a
32-bit libcurl.dll. It can be found in the bin dir of the win32
package (which btw is the
On Thursday, 20 September 2018 at 20:48:50 UTC, spikespaz wrote:
When comping with the command below, I get linker errors saying
that '/SUBSYSTEM:WINDOWS" isn't recognized and is ignored
Then you're most likely accidentally using DMD's link.exe. When
using a multilib LDC build on Win64 and
On Saturday, 1 September 2018 at 19:35:53 UTC, Per Nordlöw wrote:
What should I grep for when trying to Dustmite this?
`_Z7DtoLValP6DValue` may be suitable. - I don't use dustmite and
prefer manual minimization; e.g., by adding `-vv > bla.log` to
the crashing commandline. The last lines in
On Saturday, 1 September 2018 at 18:46:32 UTC, Nordlöw wrote:
Thanks! Is there usually only apps and not libs that are
supposed to have linker flags like these?
In this specific case, I'm not sure it's a good idea to set the
linker in the dub config. Does it absolutely require gold, i.e.,
On Thursday, 30 August 2018 at 19:41:38 UTC, Nordlöw wrote:
I'm using the tar.xz for x64 Linux. Ok?
You're explicitly adding `-link-internally` in your top-level
dub.sdl:
dflags "-link-internally" platform="linux-ldc" # use GNU gold
linker
If you want to go with gold, as your comment
Nope, I now think this is more likely an issue with the default
config (etc/ldc2.conf). It contains a new section for
WebAssembly, which specificies `-link-internally`, which seems to
be wrongly used for non-WebAssembly too in your case.
I take it you're not using an official package, but a
On Thursday, 30 August 2018 at 13:36:58 UTC, Per Nordlöw wrote:
[...]
LDC uses the C compiler as linker driver by default, exactly
because the linker needs some setup (default lib dirs etc.). So
this is almost certainly a dub issue.
On Friday, 24 August 2018 at 13:10:40 UTC, John Burton wrote:
Is in the subject. Are there any cross compilers that will run
on a linux system but compile D code using Win32 into a windows
.exe file, preferably 64 bit? I can find hints of cross
compilers but not really seen anything packaged
For LDC, just rename your main() to WinMain().
Or alternatively, `-L/SUBSYSTEM:WINDOWS -L/ENTRY:mainCRTStartup`
in the LDC cmdline.
On Monday, 20 August 2018 at 13:49:19 UTC, rikki cattermole wrote:
That is for Optlink not for MSVC link which ldc uses.
Exactly. For LDC, just rename your main() to WinMain().
On Sunday, 19 August 2018 at 11:20:41 UTC, Dennis wrote:
I have a two dimensional static array in a game board struct
and want to explicitly set the default value for each cell. Now
typing the whole 9x9 array out would be cumbersome and I can't
change the default constructor of a struct, so I
On Saturday, 4 August 2018 at 18:12:05 UTC, Alex wrote:
/snap/ldc2/78/bin/ldc2(_start+0x29)[0x8b7ee9]
You haven't specified the DMD version you are using. Your LDC is
'outdated', so make sure to first check whether it still fails
with an up-to-date version before potentially wasting time.
On Saturday, 4 August 2018 at 13:29:36 UTC, kinke wrote:
[...] as it features debuginfos
Sorry, scrach that (it used to for the Windows CI build but
doesn't anymore).
You're most likely hitting an ICE in the front-end (as both
compilers crash). What you can always do is invoke the compiler
in a GDB session. That's especially useful with an LDC CI build
(download:
https://github.com/ldc-developers/ldc/releases/tag/CI), as it
features debuginfos and enabled
You could give LDC's armhf build a try. It's built on Debian
Jessie and requires ARMv6 or newer, so it might work. Download:
https://github.com/ldc-developers/ldc/releases
On Thursday, 2 August 2018 at 02:13:41 UTC, Hakan Aras wrote:
I do want it at compiletime though.
Totally understandable; that's a regression and needs to be
fixed. See
https://github.com/dlang/dmd/pull/8362#pullrequestreview-142565787.
On Thursday, 2 August 2018 at 02:52:44 UTC, Hakan Aras wrote:
LDC complains about the type of initializer though:
onlineapp.d(22): Error: Global variable type does not match
previous declaration with same mangled name:
_D5bclib3Baz6__initZ
onlineapp.d(22):Previous IR type: %bclib.Baz
Sorry, scratch that, I forgot the `extern` before the dummy
global. After fixing that, I didn't quickly find a solution for
referencing the symbol in the .data.rel.ro section (LLVM asm,
e.g., `void* getInit() { return __asm!(void*)("movq
test.C.__init, %rax", "={rax}"); }` doesn't work
On Tuesday, 31 July 2018 at 01:16:29 UTC, Hakan Aras wrote:
I was hoping it would be possible without tinkering with the
compiler, but it doesn't seem to be the case.
I've been playing around with LDC. There is an init symbol for
classes, which is normally used as payload for the ClassInfo's
On Thursday, 19 July 2018 at 12:44:30 UTC, Radu wrote:
---
int foo()
{
import std.algorithm, std.range;
auto r = 100.iota.stride(2).take(5);
return r.sum();
}
---
ldc2 -mtriple=wasm32-unknown-unknown-wasm -betterC
-link-internally -L-allow-undefined -release -Os wasm.d
On Wednesday, 4 July 2018 at 20:36:55 UTC, Chris M. wrote:
On Tuesday, 3 July 2018 at 18:35:43 UTC, kinke wrote:
On Tuesday, 3 July 2018 at 17:54:08 UTC, Seb wrote:
[...]
AFAICT, the issue is that MinGW is used, as opposed to
MinGW-w64 (a confusingly separate project unfortunately
AFAIK).
On Tuesday, 3 July 2018 at 17:54:08 UTC, Seb wrote:
BTW in case someone has a bit of time to look at the MinGW
headers. They are built as part of the `build-mingw-libs`
branch at the installer repo:
https://github.com/dlang/installer/blob/build-mingw-libs/windows/build_mingw.bat
This is
On Saturday, 19 May 2018 at 17:33:08 UTC, Robert M. Münch wrote:
On 2018-05-18 14:42:17 +, Adam D. Ruppe said:
A value struct return is actually done via a hidden pointer
parameter (so the function can construct it in-place for the
caller, a standard optimization), so it just shifted all
On Thursday, 3 May 2018 at 23:47:40 UTC, IntegratedDimensions
wrote:
Maybe this is a cross compilation issue?
Looks like you simply didn't download the LDC multilib package.
On Thursday, 3 May 2018 at 07:00:03 UTC, Robert M. Münch wrote:
using struct won't give the correct signature
That's why there's `extern(C++, class) struct Image`, see
https://dlang.org/spec/cpp_interface.html#classes.
Not sure about the const part too, if this is correct on the D
side...
On Tuesday, 24 April 2018 at 16:22:04 UTC, Steven Schveighoffer
wrote:
On 4/24/18 10:31 AM, Byron Heads wrote:
I will start ignoring win32 when win64 doesn't require dealing
with visual studio installs.
Also I have a feeling a client will ask for it.
Unfortunately I don't think the VS
On Sunday, 22 April 2018 at 14:05:53 UTC, kinke wrote:
On Sunday, 22 April 2018 at 02:08:40 UTC, fevasu wrote:
what flags to use so that the intermediate .o files are
discared by ldc and only a.out is written to disk
There's no such functionality, the .o files are required as
linker input.
On Sunday, 22 April 2018 at 02:08:40 UTC, fevasu wrote:
what flags to use so that the intermediate .o files are
discared by ldc and only a.out is written to disk
There's no such functionality, the .o files are required as
linker input. You can place the object files into some temp dir
with
On Tuesday, 17 April 2018 at 11:01:21 UTC, Nicholas Wilson wrote:
You should also be able to use -link-internally /LLMV's lld if
you don't want to install MSVC
Nope, the MSVC libs are still required, and no, the ancient ones
shipping with DMD can't be used.
On Tuesday, 10 April 2018 at 18:34:54 UTC, n0fun wrote:
Why the destructor is called in the second case and why not in
the first?
The first case is RAII, where destruction isn't done for not
fully constructed instances.
The second case is GC finalization at program shutdown and looks
like a
On Saturday, 7 April 2018 at 21:53:23 UTC, Guillaume Piolat wrote:
Have you tried LLVM intrinsics? say llvm_exp
While LLVM does have math intrinsics, they seem to boil down to C
runtime calls in many/most cases. I.e., on Linux x86_64,
`llvm_exp(real)` simply maps to the C function `expl()`
On Sunday, 8 April 2018 at 05:35:10 UTC, Arun Chandrasekaran
wrote:
Did you also generate the bar graph plot using D?
Heh nope, I used LibreOffice Calc for that.
On Saturday, 7 April 2018 at 20:33:13 UTC, Arun Chandrasekaran
wrote:
Much better with mir.math.common, still a bit slower than C
(even with larger loops):
As this appears to be benchmarking mostly the std.math.exp(float)
performance - some/many basic algos in std.math, incl. exp(), are
On Monday, 26 March 2018 at 23:32:59 UTC, Nordlöw wrote:
forwarded as `-L-flto=thin` but still errors as
Which is wrong, it's not a ld command-line option (i.e., the `-L`
prefix is wrong). I don't use dub though, so I don't know how to
fix it.
On Sunday, 25 March 2018 at 22:09:43 UTC, Nordlöw wrote:
And I haven't found a way to conditionally qualify these inner
loop functions with `pragma(inline, true)` for the ldc case
only.
From https://dlang.org/spec/pragma.html#inline: 'If inside a
function, it affects the function it is
On Sunday, 25 March 2018 at 10:58:37 UTC, Dave Jones wrote:
Is this stuff documented somewhere?
See https://dlang.org/spec/abi.html#function_calling_conventions.
It defines the D calling convention for Win32 (int return value
in EAX) and states that it matches the C calling convention on
On Thursday, 8 March 2018 at 17:03:18 UTC, Robert M. Münch wrote:
Using Dub and pretty simple setup, that links in 3 C/C++ static
libraries, I get these linker errors:
libyogacore.lib(Yoga.obj) : error LNK2019: unresolved external
symbol __imp_fmodf referenced in function "void __cdecl
On Sunday, 4 March 2018 at 15:23:41 UTC, Nordlöw wrote:
When zeroing a slice of memory (either stack or heap) such as
enum n = 100;
ubyte[n] chunk;
should I use `memset` such as
memset(chunk.ptr, 0, n/2); // zero first half
or an array assignment such as
chunk[0 .. n/2] = 0;
On Tuesday, 30 January 2018 at 15:05:38 UTC, ikod wrote:
Hello,
Several times I faced with next problem: I have "@safe" routine
with few calls to @system functions inside: OS calls (recv,
send, kqueue) os some phobos unsafe functions like
assumeUnique. I'd like not to wrap these @system
On Wednesday, 24 January 2018 at 21:48:21 UTC, Nordlöw wrote:
Why is the memory overhead for a class instance as high as 3
words (24 bytes on 64-bit systems? I find that annoyingly much
for my knowledge database application. I'm aware of
extern(C++), having one word overhead, but such
On Wednesday, 17 January 2018 at 22:01:57 UTC, Johan Engelen
wrote:
```
struct GSharedVariable(AddrSpace as, T)
{
static __gshared T val;
alias val this;
}
alias Global(T) = GSharedVariable!(AddrSpace.Global, T);
Global!float bar1; // __gshared
```
Only 1 value per T though. ;)
On Sunday, 14 January 2018 at 01:38:17 UTC, Nordlöw wrote:
My current proposal for a solution is to make `byElement` a
free unary function
byElement(auto ref X x)
which statically checks via
static if (__traits(isRef, x))
whether the `X`-instance is passed as either an
- l-value,
On Monday, 18 December 2017 at 16:06:33 UTC, Jonathan Marler
wrote:
Trying to run the dmd test suite on windows, looks like Digital
Mars "make" doesn't work with the Makefile, I tried Gnu Make
3.81 but no luck with that either. Anyone know which version
of make it is supposed to work with on
On Tuesday, 10 October 2017 at 22:00:27 UTC, kinke wrote:
[...]
Ah sorry, overlooked that it's the initializer for a struct field.
On Tuesday, 10 October 2017 at 14:15:07 UTC, Simon Bürger wrote:
On Tuesday, 10 October 2017 at 13:48:16 UTC, Andrea Fontana
wrote:
Maybe:
double[n] bar = 0.repeat(n).array;
This works fine, thanks a lot. I would have expected `.array`
to return a dynamic array. But apparently the compiler
On Saturday, 7 October 2017 at 09:04:26 UTC, kerdemdemir wrote:
Error: static assert "Need to use a DCompute enabled compiler"
Are you using latest LDC 1.4? The CUDA backend wasn't enabled for
earlier versions.
On Saturday, 30 September 2017 at 12:07:21 UTC, Nicholas Wilson
wrote:
Hmm. Everything except for the main function was in a different
module, I dont see why that would cause it to not be run, but
then bugs have a tendency to do strange things like that. I'll
have to dust mite DCompute and see
On Thursday, 28 September 2017 at 10:24:28 UTC, Jonathan M Davis
wrote:
On Wednesday, September 27, 2017 22:01:26 DreadKyller via
Digitalmars-d- learn wrote:
Also off-topic slightly, but am I the only one with massive
latency on this site? It took like almost 2 minutes from me
hitting reply
On Wednesday, 27 September 2017 at 11:59:16 UTC, Arav Ka wrote:
GCC supports a `__attribute((section("...")))` for variables to
put them in specific sections in the final assembly. Is there
any way this can be achieved in D? Does GDC support this?
LDC does, see
On Friday, 8 September 2017 at 22:30:16 UTC, dark777 wrote:
ex3.d(19): Error: cannot pass dynamic arrays to extern(C)
vararg functions
printf("Writef Hello %.*s!\n", name.length, name.ptr);
On Saturday, 2 September 2017 at 02:37:08 UTC, Mike Parker wrote:
It's not a bug, but a feature. Data structure alignment is
important for efficient reads, so several languages (D, C, C++,
Ada, and more) will automatically pad structs so that they can
maintain specific byte alignments. On a
On Wednesday, 16 August 2017 at 18:11:05 UTC, bitwise wrote:
If I define a non-default constructor for a struct, are the
fields initialized to T.init by the time it's called?
The struct instance is initialized with T.init before invoking
the constructor.
On Monday, 7 August 2017 at 20:39:40 UTC, Dmitry Olshansky wrote:
What is the status of the platform?
I might be doing some number crunching on one of the power8
beasts, would be nice to have D working there.
Not that bad afaik. LDC should be able to build itself, the
runtime libs and their
On Friday, 30 June 2017 at 16:39:16 UTC, Stefan Koch wrote:
On Friday, 30 June 2017 at 16:29:22 UTC, kinke wrote:
On Friday, 30 June 2017 at 16:21:18 UTC, kinke wrote:
CTFE only (incl. parsing of literals). Just make sure you
don't happen to call a std.math function only accepting
reals; I
On Friday, 30 June 2017 at 16:21:18 UTC, kinke wrote:
CTFE only (incl. parsing of literals). Just make sure you don't
happen to call a std.math function only accepting reals; I
don't know how many of those are still around.
Oh, apparently most still are. There are even some mean overloads
On Friday, 30 June 2017 at 11:42:39 UTC, Luis wrote:
On Thursday, 29 June 2017 at 12:00:53 UTC, Simon Bürger wrote:
Thanks a lot for your comments.
On Wednesday, 28 June 2017 at 23:56:42 UTC, Stefan Koch wrote:
[...]
This is only happening on CTFE ? Enforcing to use the old 8086
FPU for
On Wednesday, 28 June 2017 at 22:16:48 UTC, Simon Bürger wrote:
I am currently using LDC on 64-bit-Linux if that is relevant.
It is, as LDC on Windows/MSVC would use 64-bit compile-time
reals. ;)
Changing it to double on other platforms is trivial if you
compile LDC yourself. You'll want
On Sunday, 14 May 2017 at 15:11:09 UTC, Richard Delorme wrote:
On Sunday, 14 May 2017 at 15:05:08 UTC, Richard Delorme wrote:
I did not touch at std.conv nor std.stdio. On LDC, the only
modification concerned math.d and gammafuntion.d, missing
support for 128-bit floating points. On GDC, I had
Hey guys,
can anyone recommend a more or less production-ready dev
environment for vibe.d on Linux?
I'm evaluating vibe.d against Phoenix (Elixir/Erlang) for a new
project. Today I gave Visual Studio Code a quick shot (with LDC
1.1.1 and DMD 2.071/72/74), with Webfreak's plugins, but I'm not
On Saturday, 29 April 2017 at 18:54:36 UTC, سليمان السهمي
(Soulaïman Sahmi) wrote:
But still, this needs to be fixed, copy pasting the name
mangling is in my opinion just a hack for your specific cpp
compiler on your specific platform.
It can't be fixed on the D side as the Visual C++
On Saturday, 29 April 2017 at 18:08:16 UTC, سليمان السهمي
(Soulaïman Sahmi) wrote:
GCC has this attribute called abi_tag that they put on any
function that returns std::string or std::list
The usual workaround is compiling the C++ source with
_GLIBCXX_USE_CXX11_ABI=0 for gcc >= 5.
On Friday, 28 April 2017 at 18:07:49 UTC, ParticlePeter wrote:
Interesting, your example corresponds to my third case, the
linker error. I am on Window, building an x64 App, afaik in
that case the MS Visual Studio linker is used instead of
optilink. Will add your findings to the bug report.
On Friday, 28 April 2017 at 15:56:17 UTC, ParticlePeter wrote:
So what next? How can I interface to the cpp function?
*** C++:
bool cppFunc(float ()[3])
{
color[0] = 1;
color[1] = 2;
color[2] = 3;
return true;
}
*** D:
extern(C++) bool cppFunc(ref float[3] color);
void
On Friday, 28 April 2017 at 16:24:55 UTC, Suliman wrote:
import std.stdio;
import std.variant;
void main()
{
Variant b = 56.051151;
float x = b.coerce!float;
writeln(x);
}
56.0512
void main()
{
import core.stdc.stdio;
import std.stdio;
double d =
On Saturday, 22 April 2017 at 20:51:46 UTC, XavierAP wrote:
I can do:
int[3] arr = void;
arr[] = 1;
But apparently I can't do:
int[3][4] arr = void;
arr[][] = 1;
What is the best way? What am I missing?
int[3][4] arr = void;
(cast(int[]) arr)[] = 1;
assert(arr[3][2] == 1);
On Thursday, 20 April 2017 at 01:16:11 UTC, Tofu Ninja wrote:
My question is, why is it passed twice, both in xmm0 and rcx?
The MSDN docs say floating point are passed in xmm registers,
why is it also copied in into rcx? Is it necessary for anything?
That is only required for variadics,
That's a mangling compression scheme (possibly tunable via gcc
options), from
https://github.com/gchatelet/gcc_cpp_mangling_documentation:
To save space a compression scheme is used where symbols that
appears multiple times are then substituted by an item from the
sequence : S_, S0_, S1_, S2_,
On Saturday, 25 March 2017 at 22:45:22 UTC, ketmar wrote:
zabruk70 wrote:
//DMD 2.073.1 and latest 2.075.0-master-972eaed
//Windows 7 32-bit
union Union1
{
align(1):
byte[5] bytes5;
struct
{
align(1):
char char1;
uint int1;
}
}
void main ()
{
import
On Saturday, 25 March 2017 at 22:54:30 UTC, zabruk70 wrote:
But for clearness...
I was thinked, that align not changes SIZE, but changes
LOCATION.
I was thinked, that "align(X) union Union1"
just force compiler to place Union1 on boundaries of X bytes...
In order for all Union1 instances in
On Tuesday, 21 March 2017 at 21:01:31 UTC, thorstein wrote:
C:\..\AppData\Roaming\dub>dub run mir-algorithm
Building package mir-algorithm in
C:\..\AppData\Roaming\dub\packages\mir-algorithm-0.1.1\mir-algorithm\
Fetching mir-internal 0.0.5 (getting selected version)...
Main package must have a
The Win64 LDC releases
[https://github.com/ldc-developers/ldc/releases] feature a 64-bit
compiler.
On Tuesday, 7 March 2017 at 14:26:18 UTC, Jack Applegame wrote:
I'm pretty sure this is a bug. And very bad bug. I spent
several hours looking for it.
What do you think?
Definitely a very bad bug. It works too if you mark `fun()` as
nothrow. Please file a DMD issue.
On Thursday, 23 February 2017 at 18:46:58 UTC, kinke wrote:
A constructor is just a factory function with a special name...
Wrt. the special name, that's obviously extremely useful for
generic templates (containers etc.).
On Thursday, 23 February 2017 at 14:24:14 UTC, Adam D. Ruppe
wrote:
On Thursday, 23 February 2017 at 10:48:38 UTC, kinke wrote:
That's not elegant. You need a factory function for each type
containing one of these structs then.
A constructor is just a factory function with a special name...
On Thursday, 23 February 2017 at 09:57:09 UTC, ketmar wrote:
Arun Chandrasekaran wrote:
Is there an elegant way to achieve this in D?
why not static method or free function that returns struct? due
to NRVO[0] it won't even be copied.
That's not elegant. You need a factory function for each
On Wednesday, 22 February 2017 at 20:07:34 UTC, Ali Çehreli wrote:
One more:
bool isAscii(string s) {
import std.string : representation;
import std.algorithm : canFind;
return !s.representation.canFind!(c => c >= 0x80);
}
unittest {
assert(isAscii("hello world"));
On Monday, 20 February 2017 at 22:45:09 UTC, Adam D. Ruppe wrote:
I don't
believe it does anything (except perhaps pad bytes again) for a
stack-defined struct.
LDC does respect explicit type-alignments when allocating
instances on the stack. The instances are obviously padded to
their full
On Sunday, 19 February 2017 at 22:44:54 UTC, Satoshi wrote:
Why is not possible to create documentation, compile code and
generate header files simultaneously?
When I pass -D and -Dd flags to ldc2 command it won't create
doc until I don't pass -o- flag too.
That is an LDC bug which has been
On Thursday, 16 February 2017 at 12:07:40 UTC, Atila Neves wrote:
This fails for me in a DLL:
auto tid = spawn();
assert(tid != Tid.init);
If I print out the tid, I find that its message box is null.
This is odd, since according the code in std.concurrency
there's nothing weird about how it
On Wednesday, 8 February 2017 at 17:21:03 UTC, Oleg B wrote:
If I understand correctly with vanilla LDC I can't
cross-compiling from host linux-x86_64, but with your patch I
can. Right?
Right. Joakim Noah has worked on LDC for Android and as far as I
know provides some prebuilt compilers, a
On Wednesday, 8 February 2017 at 14:57:41 UTC, Oleg B wrote:
Hello all! I want to build ldc cross compiller. I found this
instruction
https://wiki.dlang.org/LDC_cross-compilation_for_ARM_GNU/Linux,
but I have some doubts: will it works with ldc-1.1.0?
Particularly interested in the patch
On Tuesday, 7 February 2017 at 10:15:09 UTC, Atila Neves wrote:
I can declare a C++ struct like so:
extern(C++, mynamespace)
struct Foo {
//...
}
But... I don't want to repeat the initialisation code for that
struct's default constructor. I can't declare one in D because
D doesn't allow
On Saturday, 4 February 2017 at 14:33:12 UTC, Alex wrote:
Having read this
https://dlang.org/spec/template.html#auto-ref-parameters
I tried to do something like this
// Code starts here
void main()
{
initStruct iSb;
iSb.var = 3;
A b = A(iSb);
assert(*b.myVar ==
On Wednesday, 1 February 2017 at 23:32:12 UTC, bitwise wrote:
On Wednesday, 1 February 2017 at 23:24:27 UTC, kinke wrote:
It's not that bad. D just doesn't support a default ctor for
structs at all and simply initializes each instance with
T.init. Your `s2` initialization is most likely seen
On Wednesday, 1 February 2017 at 23:02:11 UTC, bitwise wrote:
On Wednesday, 1 February 2017 at 01:52:40 UTC, Adam D. Ruppe
wrote:
On Wednesday, 1 February 2017 at 00:43:39 UTC, bitwise wrote:
Container!int c; // = Container!int() -> can't do this.
Can you live with
Container!int c =
You'll probably be more successful with a static .lib library
generated with the MS compiler (Visual Studio). I'd suggest
compiling sqlite yourself and then using DMD with the
`-m32mscoff` switch (32-bit) or `-m64` for 64-bit. Google is your
friend in case you don't know how to build a static
On Monday, 23 January 2017 at 12:13:30 UTC, albert-j wrote:
There's not much object creation going on there, mostly loops
over arrays, so I assume GC is not an issue.
When passing arrays around, beware that static arrays are value
types in D and are copied unless passed by reference.
On Wednesday, 18 January 2017 at 03:36:39 UTC, Nicholas Wilson
wrote:
Alternatively use %a to print in hex to verify exact bit
patterns.
+1, if it doesn't have to be human-readable.
On Tuesday, 17 January 2017 at 00:08:24 UTC, Nordlöw wrote:
How do I best initialize a D double to an exact mantissa and
exponent representation?
I'm specifically interested in
2^^i for all i in [min_exp, max_exp]
If it doesn't have to be D ;), it can be as simple as
On Monday, 16 January 2017 at 22:08:56 UTC, JN wrote:
Am I correctly understanding, that after going out of scope,
it's possible for GC to destroy my thread before the file
finishes loading? How to prevent GC from destroying my thread
before it finishes and make sure the file is loaded
On Sunday, 15 January 2017 at 14:33:25 UTC, Nordlöw wrote:
A call to `isRef!T` inside the function `f` is always `false`
for `l-value` and `r-value` passing.
According to
https://dlang.org/spec/template.html#auto-ref-parameters, it
should be `__traits(isRef, x)`.
On Friday, 13 January 2017 at 16:56:43 UTC, WhatMeWorry wrote:
A vec and scalar can't be added together. So why (or how) is
the glm code working?
The C++ source disagrees:
https://github.com/g-truc/glm/blob/master/glm/detail/type_vec2.hpp#L219
It works via operator overloading, and adding a
On Wednesday, 21 December 2016 at 18:02:54 UTC, bauss wrote:
It removes an unnecessary allocation for the returning copy of
the struct, as the return value is never used. Hence why it's
pointless that it would be compiled anyway.
That's incorrect, it doesn't have anything to do with the
On Wednesday, 21 December 2016 at 15:01:20 UTC, Eugene Wissner
wrote:
On Wednesday, 21 December 2016 at 14:15:06 UTC, John C wrote:
On Wednesday, 21 December 2016 at 11:45:18 UTC, Eugene Wissner
wrote:
This prints 3 times "Destruct" with dmd 0.072.1. If I remove
the if block, it prints
On Tuesday, 20 December 2016 at 13:30:54 UTC, Kagamin wrote:
On Friday, 16 December 2016 at 18:29:33 UTC, Ilya Yaroshenko
wrote:
Undefined symbols for architecture x86_64:
"__D14TypeInfo_Class6__vtblZ", referenced from:
__D8cppclass2Hw7__ClassZ in cppclass-7ed89bd.o
By using typeid
https://issues.dlang.org/show_bug.cgi?id=16987
https://github.com/ldc-developers/ldc/issues/1935
On Monday, 19 December 2016 at 09:49:13 UTC, kinke wrote:
That's rather interesting. The COM function really seems to
return the struct directly, not returning an HRESULT and
setting some output pointee as most COM functions I've seen so
far. According to the Win64 ABI, the returned
On Monday, 19 December 2016 at 12:23:46 UTC, evilrat wrote:
x64 still has messed up 'this'(both dmd and ldc, not tested
with gdc)
Please file an LDC issue then, as I'm pretty sure it works for
regular (non-COM) C++ classes.
On Saturday, 3 December 2016 at 09:51:00 UTC, John C wrote:
Some DirectX methods return structs by value, but when I try
calling them I either get garbage or an access violation.
Usually COM methods return structs by pointer as a parameter,
but these are returning the struct as the actual
On Sunday, 18 December 2016 at 13:14:08 UTC, Picaud Vincent wrote:
bool opEquals()(auto ref const BigInt y) const pure @nogc
{
return sign == y.sign && y.data == data;
}
my problem is that I do not understand the role/meaning of
"auto" in this context.
See
201 - 300 of 309 matches
Mail list logo