On Tuesday, 15 March 2016 at 18:47:22 UTC, Adam D. Ruppe wrote:
Like you would another D library.
Now I get it! Yes, that works as expected.
The problem isn't the struct itself, but the D initializer.
Structs in C don't have initalizers but do in D:
struct Foo {
int a = 10; /*
On 3/12/16 8:09 AM, Adam D. Ruppe wrote:
On Saturday, 12 March 2016 at 12:59:02 UTC, ciechowoj wrote:
Nice article :), thanks. But still, what about clear()? In the
documentation https://dlang.org/spec/hash-map.html#properties there is
written that associative arrays have clear property.
I
On 3/13/16 4:33 AM, Jonathan M Davis via Digitalmars-d-learn wrote:
On Sunday, March 13, 2016 02:35:27 stunaep via Digitalmars-d-learn wrote:
Is there any sorted map in D? I need a map and I need to be able
to get the highest key in the map. In java I would use a TreeMap
and use map.lastKey(),
On Tuesday, 15 March 2016 at 18:04:00 UTC, Chris wrote:
I'm not 100% sure what you mean with compile+link in the
modules.
Like you would another D library.
The structs are all defined in the original (third party) C
header file. It's nothing I added (in which case I would have
to recompile
On 03/15/2016 02:45 AM, Orkhan wrote:
> output of the gdc is :
>
> root@ubuntu:/home/alikoza/Downloads/i686-pc-linux-gnu# gdc
> gdc: fatal error: no input files
> compilation terminated.
That makes sense. It should produce an executable if you give it a .d file:
gdc foo.d
Since you
On 03/15/2016 07:08 AM, Suliman wrote:
For my regret I need way to work with FireBird. I have found only one
driver for D https://github.com/jiorhub/fired
Before I did not work with C-bindigs and D. So I can't understand how to
use this files.
Could anybody help and explain how to work with
On Tuesday, 15 March 2016 at 17:10:03 UTC, Adam D. Ruppe wrote:
On Tuesday, 15 March 2016 at 16:56:00 UTC, Chris wrote:
Do you mean I need to void initialize them in the C code or in
D? And if in D, how would I do that, with `static this`?
in D, at the usage point with =void where you declare
On 03/15/2016 12:27 AM, stunaep wrote:
> I need to find the source of this InvalidMemoryOperationError. I tried
> loading the project in visuald but it wont break on the error.
Just to make sure, you tried to break inside the constructor of
InvalidMemoryOperationError, right? Right where it
would be easy with compiler as a library...
also i thought 'dmd -v -version=foo -c -o- bar.d' would show -version
identifiers used on the command line but doesn't seem to
On Tue, Mar 15, 2016 at 8:51 AM, Iakh via Digitalmars-d-learn <
digitalmars-d-learn@puremagic.com> wrote:
> On Sunday, 13
On Tuesday, 15 March 2016 at 15:01:09 UTC, Kagamin wrote:
The same as you would do it in C.
I do not know C :(
Please explain me what i should to do with this binding
On Tuesday, 15 March 2016 at 16:56:00 UTC, Chris wrote:
Do you mean I need to void initialize them in the C code or in
D? And if in D, how would I do that, with `static this`?
in D, at the usage point with =void where you declare the
variable of that type. So in your code:
struct C
{
A a
On Tuesday, 15 March 2016 at 16:44:10 UTC, Adam D. Ruppe wrote:
On Tuesday, 15 March 2016 at 16:32:56 UTC, Chris wrote:
The error I get is something like
undefined reference to `_D3test7testmodule13A6__initZ'
undefined reference to `_D3test7testmodule13B6__initZ'
You still need to
On Tuesday, 15 March 2016 at 16:32:56 UTC, Chris wrote:
The error I get is something like
undefined reference to `_D3test7testmodule13A6__initZ'
undefined reference to `_D3test7testmodule13B6__initZ'
You still need to compile/link in the module (or in this specific
case, void initialize the
I've converted a C.h file to D according to this guide:
http://wiki.dlang.org/Converting_C_.h_Files_to_D_Modules
and examples in deimos:
https://github.com/D-Programming-Deimos/
However, I get an error when trying to use a struct that uses
structs.
struct A
{
size_t i;
}
struct B
{
On Sunday, 13 March 2016 at 20:16:36 UTC, Basile B. wrote:
On Sunday, 13 March 2016 at 16:28:50 UTC, Iakh wrote:
On Sunday, 13 March 2016 at 15:50:47 UTC, Basile B. wrote:
trivial answer, let's say you have dcd-server running in the
background:
dcd-client -c8 <<< "version("
Thanks. Will
On 03/15/2016 07:29 AM, WhatMeWorry wrote:
>> SpriteRenderer Renderer; // Although, I would name it 'renderer'
> Ok. I was trying something more D like, by doing:
>
> SpriteRenderer Renderer = new SpriteRenderer();
That would work if the variable were const or immutable and if
everything
The same as you would do it in C.
On Monday, 14 March 2016 at 22:19:50 UTC, Ali Çehreli wrote:
On 03/14/2016 03:14 PM, WhatMeWorry wrote:
>
> sprite_renderer.h --
>
> class SpriteRenderer
> {
> ...
> };
Same thing in D without the semicolon. :)
> game.cpp
For my regret I need way to work with FireBird. I have found only
one driver for D https://github.com/jiorhub/fired
Before I did not work with C-bindigs and D. So I can't understand
how to use this files.
Could anybody help and explain how to work with it?
On Sunday, 13 March 2016 at 13:02:16 UTC, Bastien wrote:
Hi, apologies for what may be a fairly obvious question to some.
## The background:
I have been tasked with building software to process data
output by scientific instruments for non-experts - basically
with GUI, menus, easy config
On Tuesday, 15 March 2016 at 08:40:31 UTC, Jaocb Carlborg wrote:
On Tuesday, 15 March 2016 at 06:54:45 UTC, Zardoz wrote:
Not would be more easy to simply add a dependency to tango on
dub.SDL ? I ask...
Yes. Mike gave a very long explanation that can be summed up by
saying: add Tango as a
On Monday, 14 March 2016 at 17:08:24 UTC, Marc Schütz wrote:
On Monday, 14 March 2016 at 14:46:06 UTC, Orkhan wrote:
[...]
What does `which gdc` print? If it says something like "which:
no gdc in ...", there is a problem with the installation of
GDC. Otherwise, you can use the following as
On Monday, 14 March 2016 at 18:13:33 UTC, Ali Çehreli wrote:
On 03/14/2016 10:08 AM, Marc Schütz wrote:
> What does `which gdc` print? If it says something like
"which: no gdc in
> ...", there is a problem with the installation of GDC.
Otherwise, you
> can use the following as a quick
On Monday, 14 March 2016 at 17:08:24 UTC, Marc Schütz wrote:
On Monday, 14 March 2016 at 14:46:06 UTC, Orkhan wrote:
On Monday, 14 March 2016 at 11:11:28 UTC, Ali Çehreli wrote:
On 03/14/2016 02:56 AM, Orkhan wrote:
> THe output like that :
> root@ubuntu:/opt/xcomm# gdmd
> Can't exec
On Tuesday, 15 March 2016 at 05:56:36 UTC, Ellery Newcomer wrote:
On 03/13/2016 02:36 PM, Laeeth Isharc wrote:
InterpContext context = new InterpContext();
context.py_stmts(outdent("
import numpy
a = numpy.eye(2, dtype='complex128')
"));
On Tuesday, 15 March 2016 at 06:54:45 UTC, Zardoz wrote:
Not would be more easy to simply add a dependency to tango on
dub.SDL ? I ask...
Yes. Mike gave a very long explanation that can be summed up by
saying: add Tango as a dependency to your dub.json/sdl.
--
/Jacob Carlborg
I need to find the source of this InvalidMemoryOperationError. I
tried loading the project in visuald but it wont break on the
error.
I also tried adding
extern(C) void onInvalidMemoryOperationError(void*) {
asm { int 3; }
}
building with
dub build --build=debug --arch=x86_64
and then
On Sunday, 13 March 2016 at 01:08:29 UTC, Mike Parker wrote:
On Sunday, 13 March 2016 at 01:06:33 UTC, Mike Parker wrote:
it. Assuming both files live in the same directory, they can
be compiled with this command:
Somehow I deleted that line:
dmd main.d something.d
Not would be more easy
On 03/13/2016 02:36 PM, Laeeth Isharc wrote:
InterpContext context = new InterpContext();
context.py_stmts(outdent("
import numpy
a = numpy.eye(2, dtype='complex128')
"));
context.a.to_d!(Complex!double[][] )();
nitpicking, but the outdent is unnecessary,
29 matches
Mail list logo