with a
bulitin D expression evaulator and the usual features the very
good Visual Studio debugger comes with.
Kind Regards
Benjamin Thaut
program? Check your compiler flags and ansure that they are the same
over your entire build process. Especiall -debug -relase -inline -O -version
--
Kind Regards
Benjamin Thaut
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
hen trying to understand how floating point works I would highly
recommend that you read these articles (oldest first):
https://randomascii.wordpress.com/category/floating-point/
Kind Regards
Benjamin Thaut
options like -O -inline
-noboundscheck -g -debug -relase. Those are the most commoly used
options.
Kind Regards
Benjamin Thaut
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
am:
229a290fd60 <- same
229a2932570 <- leaked?
pass 11
229a290fd60 <- same
Or can anyone see a bug in my program?
Kind Regards
Benjamin Thaut
however is that
std.paralellism.Task is a struct and the only way to instanciate
it is to use std.paralelism.task which returns it as a value. I
have no idea at the moment how to allocate a instance of
std.paralellism.Task on the heap. Any suggestions?
Kind Regards
Benjamin Thaut
is not scanned by the GC
so the pointer might become dangling if the GC chooses to
collect. I'm wondering if std.experimental.allocator has any
building blocks or mechanism to automatically call GC.addRange.
Kind Regards
Benjamin Thaut
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
functions. You should double check that the functions
match the fmod headers.
Kind Regards
Benjamin Thaut
trace" into each of your modules.
That will force the module system to initialize the stacktracing
code before the module ctors. The underlying issue is that the
module system does not know about the implicit dependeny of every
module on the stacktracing module.
Kind Regards
Benjamin Thaut
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
Gene
You shouldn't be calling Runtime.initialize() manually. Just do
the following in one of your source files:
import core.sys.windows.dll;
mixin SimpleDllMain;
This will generate a DllMain that will correctly initialize and
deinitialize druntime.
Kind Regards
Benjamin Thaut
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
. That means the cells overlap a
bit to accomondate for the problem of objects that are on the
border between to cells. I don't know though if you can rip out
the implementation without some modifications.
Kind Regards
Benjamin Thaut
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
t have to know about it. But it helps when reading linker
errors. In case my talk gets accepted for dconf 2016 I'm going to cover
this there in more detail.
--
Kind Regards
Benjamin Thaut
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
Benjamin Thaut
-like interface. If you need any kind of D
interface (classes, modules, etc) it won't work. I'm currently
working on this, if you need it really badly and are willing to
help bug testing send me a mail to code at benjamin-thaut.de
Kind Regards
Benjamin Thaut
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
is laeeth@
Will do.
Kind Regards
Benjamin Thaut
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
have to duplicate
everything once more. An automated tool for this would be nice,
but unfotunately there is currently none.
Kind Regards
Benjamin Thaut
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
will tell you why
the dll does not load: http://www.dependencywalker.com/
Kind Regards
Benjamin Thaut
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:
https://gist.github.com/Extrawurst
the way your c++ library returns a value type
32-bit is not compatible with what dmd expects. Do you have debug
symbols for the third party c++ library? Can you step into the
virtual function call to actually see if it ends up in the
correct function on the c++ side?
Kind Regards
Benjamin Thaut
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
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.
assembly code context switch, close to the way that
core.thread.Fiber is implemented. The Fiber implementation is
20 times faster at 32 bits.
I can reproduce this issue with dmd 2.066.1,
please go forward and open a issue on https://issues.dlang.org/
Kind Regards
Benjamin Thaut
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
in your new function, release the memory and rethrow.
Kind Regards
Benjamin Thaut
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; }
but couldn't find
any way to do that.
Any help is appreciated.
Kind Regards
Benjamin Thaut
, the
MongoClient instance can - and should - be shared among all fibers in a
thread by storing in in a thread local variable.
So wouldn't it make more sense that the MongoDB example initializes the
client variable in a static this() instead of a shared static this() ?
Kind Regards
Benjamin Thaut
at some point, but I went back to
double buffering, because tripple buffering can cause micro lags and you
don't want that.
Kind Regards
Benjamin Thaut
.
https://code.dawg.eu/reducing-vibed-turnaround-time-part-1-faster-linking.html
(I'm on linux)
Kind Regards
Benjamin Thaut
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
only supported by
dmd meaning that yuo have to rewrite the code in case you want to go to
ldc or gdc. If you need simd with dmd, write inline assembly. If you
need simd with the other two compilers, use the gcc intrinsics, they
work on both compilers.
Kind Regards
Benjamin Thaut
on github: https://github.com/Ingrater/Spacecraft
Kind Regards
Benjamin Thaut
{
// do something with m
}
}
Kind Regards
Benjamin Thaut
is within the same module, but thats not
the case in practice.)
Kind Regards
Benjamin Thaut
for the solution. It didn't come to my mind, to use the
index from iterating over the type tuple to index the symbol tuple.
Kind Regards
Benjamin Thaut
-function returns.
If that C-Function returns, it is very likely however that this was the
only reference and the string will be freed the next time the garbage
collector runs.
Kind Regards
Benjamin Thaut
for
example if you use std.algorithm.move. To be fully correct your struct
should handle the .init state in the destructor (or assert at least so
you can find and fix those occurences).
Kind Regards
Benjamin Thaut
also
proposed a move constructor in the past, but the idea was not well
recieved. When I needed a move constructor, usually adding another level
of indirection solved the problem.
Kind Regards
Benjamin Thaut
to a dmd build with dmc.
Kind Regards
Benjamin Thaut
Am 03.03.2014 21:49, schrieb Remo:
On Monday, 3 March 2014 at 19:51:45 UTC, Benjamin Thaut wrote:
Am 28.02.2014 21:14, schrieb Remo:
How to build DMD on windows ?
And then run all the test for it?
README.md is pretty empty at the moment.
Of course it is possible to wait for some Fixes in DMD
dlls, so I don't recommend it.
In case you are interrested read: http://wiki.dlang.org/DIP45
Kind Regards
Benjamin Thaut
On Saturday, 25 January 2014 at 15:34:57 UTC, Philippe Sigaud
wrote:
On Fri, Jan 24, 2014 at 10:25 PM, Benjamin Thaut
c...@benjamin-thaut.de wrote:
What Plattform are you profiling on?
Linux 32bits. Does it change something? I'm not using any
OS-specific
part of Phobos, AFAICT.
Doesn't
). DLL support on
Windows is nowhere near the shared library support on linux.
I tried pushing for a fix, but its currently not a priority. See
http://wiki.dlang.org/DIP45
Kind Regards
Benjamin Thaut
Am 24.01.2014 17:31, schrieb Philippe Sigaud:
I'm trying to use the `-profile` flag for DMD and, without any
documentation, I can't really understand the resulting log files:
* They contain only mangled names. Is there a way to get demangled,
human-readable symbols?
* Can someone tell me what
Am 22.01.2014 06:16, schrieb unknown soldier:
I'm confused by shared and how to use it.
import std.stdio;
class Foo {
File logFile;
void log(in string line) shared {
synchronized(this){
logFile.writeln(line);
}
}
}
This (or the equivalent code in my full
Am 22.01.2014 11:46, schrieb bearophile:
Uplink_Coder:
is there any workaround for this ?
For me this is a feature, not a bug.
Bye,
bearophile
Why that? D is supposed to support unicode identifiers, and in this case
it cleary does not?
a bug report at
https://d.puremagic.com/issues/
Kind Regards
Benjamin Thaut
to move the glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,9)
right before the glDrawElements call.
Kind Regards
Benjamin Thaut
)
updateDebugMesh(); // put breakpoint here
mDebugMesh.draw();
if ((implicitWidth != float.nan implicitHeight != float.nan)
(implicitWidth != mSize.x implicitHeight != mSize.y))
mDebugImplicitMesh.draw();
}
Have fun debugging ;-)
Kind Regards
Benjamin
Am 12.01.2014 17:18, schrieb Xavier Bigand:
Le 12/01/2014 11:16, Benjamin Thaut a écrit :
Am 12.01.2014 00:47, schrieb Xavier Bigand:
I didn't know this menu settings, but activate Access Violation don't
change anything.
It seems that your crash happens inside the OpenGL part
add null ptr call checks in debug mode?
For x64 exeuctables compile with -g.
For x86 executables compile with -g and then run cv2pdb on the final
executable. cv2pdb is part of VisualD.
Kind Regards
Benjamin Thaut
Am 11.01.2014 19:16, schrieb Xavier Bigand:
Le 11/01/2014 18:45, Benjamin Thaut a écrit :
Am 11.01.2014 17:24, schrieb Xavier Bigand:
I get some troubles to solve a memory bug, just cause I don't have any
informations for debuggers and I can't neither use DrMemory.
Is it possible to get
Am 11.01.2014 20:50, schrieb Xavier Bigand:
Yes I have no stack trace and adding import core.sys.windows.stacktrace
change nothing.
That is very strange. Can you reduce this? Or is this project on github
somewhere? Did you try using a debugger?
Kind Regards
Benjamin Thaut
Am 11.01.2014 22:56, schrieb Xavier Bigand:
Le 11/01/2014 22:15, Benjamin Thaut a écrit :
Am 11.01.2014 20:50, schrieb Xavier Bigand:
Yes I have no stack trace and adding import core.sys.windows.stacktrace
change nothing.
That is very strange. Can you reduce this? Or is this project
would recommend renaming the debug versions so
you can use them whenever needed. I will take a deeper look tomorrow.
Kind Regards
Benjamin Thaut
Am 08.01.2014 21:25, schrieb Xavier Bigand:
Is there a way to get backtrace outside exceptions?
Found a plattform independend way:
import core.runtime;
import std.stdio;
void main(string[] args)
{
auto trace = defaultTraceHandler(null);
foreach(t; trace)
{
Am 08.01.2014 21:25, schrieb Xavier Bigand:
Is there a way to get backtrace outside exceptions?
On which plattform?
before debugging with visual
studio. cv2pdb is part of VisualD which I recommend using for any
windows development.
Kind Regards
Benjamin Thaut
:
http://icon-theme.freedesktop.org/releases
Do I need a special version of these icon themes for windows, or will
the normal version just work? Is there something special I need to do
for installation?
Kind Regards
Benjamin Thaut
-theme.zip which you can extract in:
C:\Program Files\Gtk Runtime\share\
That should be enough to get rid of the errors.
Thank you very much. That worked.
Kind Regards
Benjamin Thaut
I get lots of duplicate symbol errors from the linker. I know
that I can work around this using mixin(string) but I wonder if there is
a other solution to the problem.
Kind Regards
Benjamin Thaut
Am 23.12.2013 11:59, schrieb Dicebot:
On Monday, 23 December 2013 at 10:57:09 UTC, Benjamin Thaut wrote:
Doing lots of C interfacing lately I wonder if there is a way to
create a D function with C calling convention but D mangeling. I need
this to place C callbacks onto functions inside D
Am 22.12.2013 15:15, schrieb Amateur:
Yeah, I installed dub and ran commands dub init main and dub fetch
--local gtk-d. It worked properly, but how to continue? I tried compile
simple app which contains only import gtk.MainWindow; and compiler
yells that source for this cannot be found.
What
: char const * const *
const. (But you won't ever needs this)
Kind Regards
Benjamin Thaut
Am 22.12.2013 20:34, schrieb Gary Willoughby:
On Sunday, 22 December 2013 at 18:28:43 UTC, Benjamin Thaut wrote:
Am 22.12.2013 18:39, schrieb Gary Willoughby:
Ah right, so:
struct Tcl_Obj * CONST * objv
would be:
const(Tcl_Obj*)* objv or const(Tcl_Obj*)[] objv
Yes
Great thanks! I
1 - 100 of 205 matches
Mail list logo