On Thursday, 8 February 2018 at 21:09:33 UTC, JN wrote:
Hi,
is there any way to debug binaries on Windows? I'd at least
like to know which line of code made it crash. If it's D code,
I get a call trace usually, but if it's a call to a C library,
I get a crash and that's it. I am using VSCode
Am 10.01.2018 um 20:32 schrieb Anonymouse:
I don't have a reduced testcase yet. I figured I'd ask if it's something
known before making the effort.
Are you by any chance mixing debug and release builds? Or are the
-version specifiers different when compiling the various parts of your
On Wednesday, 27 December 2017 at 20:04:29 UTC, Marc wrote:
I'd like to set the members of a class by its name at runtime,
I would do something like this:
__traits(getMember, myClass, name) = value;
but since name is only know at runtime, I can't use __traits().
What's a workaround for
On Wednesday, 27 December 2017 at 13:40:28 UTC, rumbu wrote:
Is that normal?
use std.math;
float f = float.max;
f += 1.0;
assert(IeeeFlags.overflow) //failure
assert(f == float.inf) //failure, f is in fact float.max
On the contrary, float.max + float.max will overflow. The
behavior is the
On Monday, 25 December 2017 at 16:35:26 UTC, realhet wrote:
Now I have my first DMD 64bit windows console app running. (And
I'm already afraid of the upcoming windowed application haha)
My recommendation for getting setup on Windows with D is as
follows:
1) Install the latest visual studio
On Wednesday, 20 December 2017 at 10:15:45 UTC, Benjamin Thaut
wrote:
I found that both the make that comes with msys and the make
that comes with mingw work for me. I‘m currently on vacation
but once I‘m back and in case you are interrested I can post
the batch file I use to run the dmd
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 Monday, 10 April 2017 at 18:56:42 UTC, BBasile wrote:
Hello, I have a trait for this:
https://github.com/BBasile/iz/blob/master/import/iz/types.d#L650
Hi BBasile,
I think your trait is a good starting point for my needs. Thanks.
In particular I want to know if the vtable of the class has the
class info member.
Is there any way to do this at compile time? At runtime?
Kind Regards
Benjamin Thaut
Please consider the following program:
import std.experimental.allocator.mallocator;
import std.experimental.allocator.building_blocks.allocator_list
: AllocatorList;
import std.experimental.allocator.building_blocks.free_list;
import std.experimental.allocator;
import std.stdio;
enum uint
I would like to use std.paralellism.TaskPool to schedule various
tasks I create. The problem however is that these tasks don't
have a lifetime which is bound to any function scope I have. So I
need to create a new task object on the heap and push it into a
array for bookkeeping. The problem
Lets assume I have a allocator which cains together multiple
building blocks from std.experimental.allocator and at the end
there is a mallocator providing the underlying memory. Now I
alloacte a type which contains a pointer into GC memory.
Obviously the memory of the mallocator is not
On Wednesday, 4 May 2016 at 17:53:32 UTC, cc wrote:
The OS is Win64 though the program is being compiled as 32-bit
and I'm using the 32-bit distributed DLL.
fmod.dll: PE32 executable (DLL) (GUI) Intel 80386, for MS
Windows
Tried int and long as the return type, same issue both ways.
Tried
On Tuesday, 3 May 2016 at 19:06:30 UTC, cc wrote:
it fails to link with "Error 42: Symbol Undefined
_FMOD_System_CreateSound@20". With extern(C) it compiles and
runs but the problem from above persists.
Is this on Windows x64? Try replacing FMOD_RESULT by int. When
declaring the fmod
On Wednesday, 4 May 2016 at 06:37:28 UTC, Nordlöw wrote:
On Tuesday, 3 May 2016 at 12:31:10 UTC, Benjamin Thaut wrote:
I assume this is on windows? Yes its a known issue (I know
No, the problem occurs on my Linux aswell.
From core.runtime:
static this()
{
// NOTE: Some module ctors
On Tuesday, 3 May 2016 at 11:32:31 UTC, cc wrote:
Hello, I've been encountering a strange problem that seems to
occur after calling some external C functions. I've been
working on a program that incorporates the FMOD C API for
playing sound, with a simple D binding based off the C headers,
On Tuesday, 3 May 2016 at 10:52:20 UTC, Nordlöw wrote:
On Tuesday, 3 May 2016 at 10:48:51 UTC, Nordlöw wrote:
AFAICT, stacktraces are not emitted with debug information when
Should be static shared module constructors.
errors occur in static module constructors. Is this a know bug?
My
On Tuesday, 29 March 2016 at 23:41:28 UTC, Thalamus wrote:
dmd dllmain.d dll.def -w -wi -g
-map -ofLogic.dll -m64
-debug -shared
Anyone know what I should try next? Am I missing something
simple? :)
thanks!
Thalamus
You should be using "-gc" instead of "-g" when building 64-bit D
On Thursday, 25 February 2016 at 17:46:18 UTC, Thalamus wrote:
On Thursday, 25 February 2016 at 16:05:37 UTC, Benjamin Thaut
wrote:
[...]
Thanks Benjamin. When I went to whittle this down to its barest
essentials, though, the repro is pretty simple. It involves
LIBs, but not Dlls, and it
On Thursday, 25 February 2016 at 14:42:14 UTC, Thalamus wrote:
your entry point.
Hi Guillaume,
Thanks for responding so quickly! I had found that wiki page
before and I'd been following the "DLLs with a C Interface"
section closely. I had forgotten to add -shared when building
the DLL, but
On Saturday, 13 February 2016 at 12:44:40 UTC, Tofu Ninja wrote:
Is the TypeInfo given by typeid() guaranteed to be the same for
a type regardless of where I call it? I guess my question is,
is the TypeInfo a valid way to dynamically check types?
I am implementing a message passing system for
On Monday, 1 February 2016 at 02:56:06 UTC, Tofu Ninja wrote:
Just out of curiosity, does anyone have an octree
implementation for D laying around? Just looking to save some
time.
https://github.com/Ingrater/thBase/blob/master/src/thBase/container/octree.d
Its a loose octree implementation.
On Thursday, 28 January 2016 at 18:33:19 UTC, Nordlöw wrote:
Thanks, I'm aware of these tools.
But it's easier to use the stacktrace...if I only get one. The
function where the assert() is called is, in turn, called in
hundreds of places.
Which platform are you on? Are all your binaries
On Monday, 25 January 2016 at 19:45:21 UTC, Igor wrote:
Am I off target here?
Dlls are currently not properly supported in D, I would strongly
advice against using them. Just link everything statically and be
happy for now.
Kind Regards
Benjamin Thaut
On Saturday, 23 January 2016 at 00:38:45 UTC, Dibyendu Majumdar
wrote:
On Friday, 22 January 2016 at 22:06:35 UTC, Dibyendu Majumdar
wrote:
Hi
I am trying to create a simple shared library that exports a D
function, but when I try to link to it I get errors such as:
error LNK2001:
On Tuesday, 12 January 2016 at 19:00:26 UTC, Andre wrote:
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
Am 11.01.2016 um 18:27 schrieb Robert M. Münch:
Import symbols are symbols used for dll linking and start with "__imp_"
Is this a DMD convention or a general one? Never heard about this.
This seems to be a general convetion on windows. All c++ compilers I've
seen on windows so far emit
On Sunday, 10 January 2016 at 22:22:03 UTC, Robert M. Münch wrote:
I made to compile a bunch of libs on Win64 and got my D project
compiled as well. Only problem left are some strange unresolved
externals.
Linking...
dmd
Am 09.01.2016 um 16:45 schrieb Thalamus:
Hi Benjamin,
I wouldn't say I need DLLs to work fully _really_ badly. The only
non-negligible issue with single very large binaries that's crossed my
mind is patching, but we're years away from having to worry about that
too much. That being said, I'm
On Thursday, 7 January 2016 at 19:29:43 UTC, Thalamus wrote:
Hi everyone,
First off, I've been working with D for a couple of weeks now
and I think it's the bee's knees! :) Except for DLLs.
thanks! :)
Dlls don't currently work on Windows. The only thing that works
is giving your dlls a
On Friday, 6 November 2015 at 16:21:35 UTC, Suliman wrote:
On Friday, 6 November 2015 at 13:50:56 UTC, Kagamin wrote:
MSVCR is a C runtime. On Linux it will depend on a C runtime
too.
But which part of my App depend on C runtime?
All of it. Phobos and druntime use the C runtime, that means
On Saturday, 3 October 2015 at 14:47:02 UTC, Nachtraaf wrote:
I'm trying to create some linear algebra functions using simd
intrinsics. I watched the dconf 2013 presentation by Manu Evans
but i'm still confused about some aspects and the following
piece of code doesn't work. I'm trying to copy
On Tuesday, 8 September 2015 at 12:56:00 UTC, Laeeth Isharc wrote:
This is really very clear and helpful, and I appreciate your
taking the time. I will place it on the wiki if that's okay.
Thats ok.
Library support is surely one of the largest impediments to the
adoption of D, and we
On Monday, 7 September 2015 at 19:30:44 UTC, drug wrote:
07.09.2015 21:37, Benjamin Thaut пишет:
snip
So far I haven't found a situation where I couldn't make it
work the way
I wanted. Its just some work to write the D headers for the
C++ classes
and vise versa, because you have to
On Friday, 4 September 2015 at 16:19:49 UTC, Laeeth Isharc wrote:
Hi Benjamin
Would you be able to give a little more colour on what the
limits are of interoperability for C++ with DMD master or
release ? As I understand it destructors and constructors
don't work, and obviously it will get
On Friday, 4 September 2015 at 08:53:27 UTC, Szymon Gatner wrote:
Hi,
what is the current status of:
- Win x86/32bit/coff32 interop with C++?
- improvements for general C++ interop that were suppose to
come with 2.068
If you use either the -m64 or -mscoff32 interop should be pretty
good.
On Friday, 4 September 2015 at 09:07:39 UTC, Szymon Gatner wrote:
What about 32bit phobos? Last time I checked (2.067) only x64
was distributed.
You have to compile it yourself. Use the win64 makefile and
replace the arch=64 with
arch=32mscoff.
For more details see here:
On Friday, 4 September 2015 at 10:04:48 UTC, Szymon Gatner wrote:
On Friday, 4 September 2015 at 09:27:14 UTC, Benjamin Thaut
wrote:
On Friday, 4 September 2015 at 09:07:39 UTC, Szymon Gatner
wrote:
What about 32bit phobos? Last time I checked (2.067) only x64
was distributed.
You have to
On Friday, 12 June 2015 at 14:39:55 UTC, Chris wrote:
I wish it were an error in the Python code so I could fix it,
but it works on all other machines (at least those with Intel).
It's only on the HP625 with AMD that this error occurs. Another
DLL (which isn't mine) also failed to load,
On Wednesday, 13 May 2015 at 08:53:10 UTC, Kagamin wrote:
There was no word about windows, but process explorer shows
page faults and cycles per process from unprivileged account,
so I guess, this information is available through some API. Not
sure is such system-wide statistics is available
On Wednesday, 13 May 2015 at 03:38:33 UTC, Maxime
Chevalier-Boisvert wrote:
I was wondering if anyone has written D code to access the x86
performance counters, to get information such as the number of
cache misses and cycle count.
I considered doing that at one point. So I looked for
On Wednesday, 29 April 2015 at 19:04:11 UTC, extrawurst wrote:
On Wednesday, 29 April 2015 at 13:55:46 UTC, Benjamin Thaut
wrote:
On Monday, 27 April 2015 at 21:19:02 UTC, extrawurst wrote:
here is the shortened version of the returned class CSteamID:
On Monday, 27 April 2015 at 21:19:02 UTC, extrawurst wrote:
here is the shortened version of the returned class CSteamID:
https://gist.github.com/Extrawurst/936f56ceaa87cf287257
this is the shortened interface (no destructors in the rest of
the code either):
On Monday, 27 April 2015 at 13:08:33 UTC, extrawurst wrote:
Don't ask me about the compiler, like stated above I have no
control over the binaries, it is proprietary.
Thats bad to start with.
the C++ class basically is:
```
class S
{
union SteamID_t
{
struct
On Monday, 27 April 2015 at 11:00:23 UTC, extrawurst wrote:
Thought about that too and tried uint aswell. does not work
either..
Please post the c++ declarations as well. Which c++ compiler do
you use for win32? (dmc or msvc)
Kind Regards
Benjamin
Am 27.04.2015 um 17:16 schrieb extrawurst:
On Monday, 27 April 2015 at 13:14:21 UTC, Benjamin Thaut wrote:
On Monday, 27 April 2015 at 13:08:33 UTC, extrawurst wrote:
Don't ask me about the compiler, like stated above I have no control
over the binaries, it is proprietary.
Thats bad to
On Thursday, 19 March 2015 at 12:58:42 UTC, Robert M. Münch wrote:
On 2015-03-18 21:50:39 +, Adam D. Ruppe said:
It will not work because a function with an auto return value
is actually a template, and unused templates won't be put into
a dll.
Ok, that makes it clear. Thanks.
On Monday, 9 March 2015 at 14:39:34 UTC, Carl Sturtivant wrote:
Please confirm or deny that this is a real bug, as its getting
in the way of a genuine project. How should I proceed?
I'm working on a 64-bit Windows port of the following.
http://www.cs.arizona.edu/icon/
Here's the 32-bit Windows
On Friday, 6 March 2015 at 15:36:47 UTC, anon wrote:
Hi,
I can't figure this out.
struct Pair(T)
{
T x;
T y;
alias x c;
alias y r;
}
What would like is that the x and y to be initialized to
different values depending on type eg:
struct Container
{
Pair!double sample1; //
Am 05.03.2015 um 21:00 schrieb Taylor Hillegeist:
How to I cast a Int to float without changing its binary representation?
int someValue = 5;
float sameBinary = *(cast(float*)cast(void*)someValue);
Am 21.02.2015 um 11:30 schrieb Marc =?UTF-8?B?U2Now7x0eiI=?=
schue...@gmx.net:
For C++, you can just use the newly added namespace support:
extern(C++, nobody.uses.this.name) myFunc() {}
Thats actually a good idea. Thanks.
On Thursday, 19 February 2015 at 21:34:57 UTC, John Colvin wrote:
I would duplicate the declaration, once without extern(C++),
once with, the use the .mangleof from the 1st to set the mangle
of the 2nd with pragma(mangle
Yes that would work. But using pragma(mangle) feels so hacky...
On Friday, 20 February 2015 at 13:00:39 UTC, John Colvin wrote:
I agree. Wrap it in a mixin / mixin template?
Why do you need this? Presumably it'll be hidden in the depths
of some library / bindings where beauty is somewhat optional?
Using the .mangleof from an extern(D) function should
Is it possible to declare a function in D which gets the C++ calling
convetion but not the C++ mangling?
Kind Regards
Benjamin Thaut
Am 16.02.2015 um 18:55 schrieb Jonathan Marler:
Why is the 'in' operator nogc but the index operator is not?
void main() @nogc
{
int[int] a;
auto v = 0 in a; // OK
auto w = a[0]; // Error: indexing an associative
// array in @nogc function main may
Hi,
you can also take a look at my implementation:
https://github.com/Ingrater/druntime/blob/master/src/core/allocator.d
Look at AllocatorNew and AllocatorDelete
Especially important is, that you correctly handle the
constructor throwing an exception. You have to catch that
exception in
When binding C++ value types you might want to use them by placing them
on the D-Stack. This however seems to be not supported as the mangling
for the constructor is completely wrong. Is this supposed to work?
Kind Regards
Benjamin Thaut
Am 01.02.2015 um 17:15 schrieb ketmar:
On Sun, 01 Feb 2015 16:07:58 +, John Chapman wrote:
On Sunday, 1 February 2015 at 08:37:23 UTC, ketmar wrote:
seems that my idea of using D to write a simple windows utility was
very wrong. ok, another attempt to use D for our windows developement
On Thursday, 29 January 2015 at 11:50:29 UTC, FG wrote:
@property auto info() @safe @nothrow @pure @return const {
return this; }
It is mesmerizing... (@ _ @)
And soon its gong to look like this:
export @property auto info() @safe @nothrow @pure @return const {
return this; }
I want to read all input from stdin without blocking. That means
I simply want to read the remaining input from stdin. All ways I
tried so far always end up in me waiting for the user to enter
additional input, which is not what I want.
I tried around a lot with D's files / streams but
I'm currently trying around with vibe.d and I'm confused about the
MongoDB example:
import vibe.d;
MongoClient client;
void test()
{
auto coll = client.getCollection(test.collection);
foreach (doc; coll.find([name: Peter]))
logInfo(Found entry: %s,
Am 02.01.2015 um 19:45 schrieb Vlad Levenfeld:
My personal favorite method is to use the primitives in core.atomic with
a double or triple buffer. To double buffer, keep two buffers in an
array (data[][] or something) and an integer index that points to the
active buffer, then use atomicStore
Is it possible to get dub to build vibe.d into a dynamic library?
Or is it at least possible to make dub link against the shared version
of phobos?
I found this blog post about dynamic linktimes, unfortunately it does
not describe how to actually make dub use the dynamic version of phobos.
Am 08.10.2014 21:12, schrieb Etienne:
On 2014-10-08 3:04 PM, Benjamin Thaut wrote:
I strongly advise to not use core.simd at this point. It is in a
horribly broken state and generates code that is far from efficient. If
I think I'll have to re-write the xmmintrin.h functions I need as string
Am 09.10.2014 21:04, schrieb Etienne:
On 2014-10-09 2:32 PM, Benjamin Thaut wrote:
I know that GDC stopped supporting D style inline asm a while ago. If
you need inline asm with GDC you have to use the gcc style inline
assembly. I don't know about ldc though. But generally you want to use
the
Am 08.10.2014 20:56, schrieb Etienne:
I can't seem to find this function anywhere: __simd(void16*, void16)
The mangling seems to go through to dmd's glue.lib
This is for SSE2 operations:
MOVDQU = void _mm_storeu_si128 ( __m128i *p, __m128i a)
MOVDQU = __m128i _mm_loadu_si128 ( __m128i *p)
Am 22.05.2014 17:39, schrieb David:
Hey, I'm really new to D, and pretty new to programming overall too,
But I want to make a 3d Game, (just sth. small). I really like D and
want to do it in D, but in the Internet there is no shit about
programming a game in D ^^
Is there any engine written in
67 matches
Mail list logo