On Friday, 10 July 2015 at 03:38:49 UTC, Craig Dillabaugh wrote:
I am trying to bind to a C union with a number of nested
structs declared as follows:
typedef union {
int Integer;
struct {
int nCount;
int *paList;
} IntegerList;
struct {
I am trying to bind to a C union with a number of nested structs
declared as follows:
typedef union {
int Integer;
struct {
int nCount;
int *paList;
} IntegerList;
struct {
int nCount;
GIntBig *paList;
} Integer64List;
}
On Thursday, 9 July 2015 at 17:42:33 UTC, Alex Parrill wrote:
On Thursday, 9 July 2015 at 17:11:36 UTC, Per Nordlöw wrote:
On Thursday, 9 July 2015 at 16:12:27 UTC, Timon Gehr wrote:
No. You'll need explicit pass by reference on the D side.
So, how should I modify my call to `image_copy` with
On Friday, 10 July 2015 at 00:53:38 UTC, codenstuff wrote:
The path is ${HOME}/d_apps/steering/steering/game_object.d
Compile command is
dmd map/map.d main_visual.d -ofmain_visual -H -gc -unittest
-L-lDgame -L-lDerelictUtil -L-lDerelictGL3 -L-lDerelictSDL2
-L-ldl -I/home/real/d_apps/dgame/so
On Friday, 10 July 2015 at 00:24:44 UTC, anonymous wrote:
On Thursday, 9 July 2015 at 22:05:23 UTC, codenstuff wrote:
I am trying to import module and compile.
The compiler produces message
map/map.d(9): Error: module game_object is in file
'steering/game_object.d' which cannot be read
impor
On Thursday, 9 July 2015 at 22:05:23 UTC, codenstuff wrote:
I am trying to import module and compile.
The compiler produces message
map/map.d(9): Error: module game_object is in file
'steering/game_object.d' which cannot be read
import path[0] = /usr/include/dmd/phobos
import path[1] = /usr/i
On Thursday, 9 July 2015 at 22:10:53 UTC, Adam D. Ruppe wrote:
The best thing to do is to pass all the modules in the project
to the compiler at once, so like:
dmd map/map.d steering/game_object.d
The import path could be changed to not include the steering/
folder - give it the folder that c
The best thing to do is to pass all the modules in the project to
the compiler at once, so like:
dmd map/map.d steering/game_object.d
The import path could be changed to not include the steering/
folder - give it the folder that contains steering - but that
still won't actually link without a
I am trying to import module and compile.
The compiler produces message
map/map.d(9): Error: module game_object is in file
'steering/game_object.d' which cannot be read
import path[0] = /usr/include/dmd/phobos
import path[1] = /usr/include/dmd/druntime/import
make: *** [main] Error 1
How can
On 7/9/15 1:04 PM, bachmeier wrote:
On Thursday, 9 July 2015 at 15:18:18 UTC, Adam D. Ruppe wrote:
On Thursday, 9 July 2015 at 15:14:43 UTC, Binarydepth wrote:
float prom;
You didn't initialize this variable. Set it to 0.0 and it will work.
Like how pointers are initialized to null autom
On Thursday, 9 July 2015 at 17:11:36 UTC, Per Nordlöw wrote:
On Thursday, 9 July 2015 at 16:12:27 UTC, Timon Gehr wrote:
No. You'll need explicit pass by reference on the D side.
So, how should I modify my call to `image_copy` with respect to
the four first parameters?
In C, array parameter
On Thursday, 9 July 2015 at 16:12:27 UTC, Timon Gehr wrote:
No. You'll need explicit pass by reference on the D side.
So, how should I modify my call to `image_copy` with respect to
the four first parameters?
On Thursday, 9 July 2015 at 17:04:43 UTC, bachmeier wrote:
Is there a reason the compiler doesn't identify this as an
error?
The compiler just doesn't really try to trace if variables have
actually been initialized or not. It punts it to runtime for
simplicity of compiler implementation.
On Thursday, 9 July 2015 at 15:18:18 UTC, Adam D. Ruppe wrote:
On Thursday, 9 July 2015 at 15:14:43 UTC, Binarydepth wrote:
float prom;
You didn't initialize this variable. Set it to 0.0 and it will
work.
Like how pointers are initialized to null automatically in D,
floats are auto
On Thu, 09 Jul 2015 16:20:56 +, tcak wrote:
> Is there any way to get the type of enum without interacting with its
> items?
std.traits.OriginalType
> Is there any way to get string representation of an item of enum without
> casting?
I think casting to the OriginalType and then using to!stri
[code]
const enum FieldLength: uint{
Title = 64
}
const string SQL1 = "title CHAR(" ~ std.conv.to!string(
FieldLength.Title ) ~ ")";
void main() {
writeln( FieldLength.Title );
writeln( SQL1 );
}
[/code]
Result is
---
Title
Char(Title)
I can do cast(uint
On 07/09/2015 05:19 PM, "Nordlöw" wrote:
Given
extern(C):
struct AVFrame
{
uint8_t*[AV_NUM_DATA_POINTERS] data;
int[AV_NUM_DATA_POINTERS] linesize;
int width, height;
...
}
void av_image_copy(ubyte *[4] dst_data, int[4] dst_linesizes
On Thursday, 9 July 2015 at 15:19:41 UTC, Nordlöw wrote:
uint8_t*[AV_NUM_DATA_POINTERS] data;
int[AV_NUM_DATA_POINTERS] linesize;
Forgot
enum AV_NUM_DATA_POINTERS = 8;
On Thursday, 9 July 2015 at 15:18:18 UTC, Adam D. Ruppe wrote:
On Thursday, 9 July 2015 at 15:14:43 UTC, Binarydepth wrote:
float prom;
You didn't initialize this variable. Set it to 0.0 and it will
work.
Like how pointers are initialized to null automatically in D,
floats are auto
On Thursday, 9 July 2015 at 15:14:43 UTC, Binarydepth wrote:
float prom;
You didn't initialize this variable. Set it to 0.0 and it will
work.
Like how pointers are initialized to null automatically in D,
floats are auto initalized to NaN in D. The idea is to make use
of an uninitia
Given
extern(C):
struct AVFrame
{
uint8_t*[AV_NUM_DATA_POINTERS] data;
int[AV_NUM_DATA_POINTERS] linesize;
int width, height;
...
}
void av_image_copy(ubyte *[4] dst_data, int[4] dst_linesizes,
const ubyte *[4] src_data,
This is my code :
import std.stdio : writeln, readf;
void main() {
int[3] nums;
float prom;
foreach(nem; 0..2) {
writeln("input a number : ");
readf(" %d", &nums[nem]);
prom+=nums[nem];
}
writeln(prom/
On Tuesday, 7 July 2015 at 12:26:33 UTC, Per Nordlöw wrote:
I'm currently developing a high-level wrapper for FFMPEG at
https://github.com/nordlow/justd/blob/master/tests/t_ffmpeg.d
My question now becomes how to most easily wrap the iteration
over streams at
https://github.com/nordlow/justd
On 7/9/15 4:44 AM, "Marc =?UTF-8?B?U2Now7x0eiI=?= " wrote:
On Wednesday, 8 July 2015 at 21:04:27 UTC, jmh530 wrote:
On Wednesday, 8 July 2015 at 18:31:00 UTC, Steven Schveighoffer wrote:
You can use a function lambda:
auto fp = (real a) => cos(a);
Note, I had to put (real a) even though I wou
On Thursday, 9 July 2015 at 02:33:23 UTC, tcak wrote:
BTW, as a tutorial to demonstrate use of gnuplot with D, is
there any place I can write an article?
http://wiki.dlang.org/Tutorials
On Thursday, 9 July 2015 at 02:33:23 UTC, tcak wrote:
I have written a code to run gnuplot.
[code]
...
auto script = std.stdio.File("/tmp/waveletscript.gnuplot", "w");
script.writeln("set term wxt 1; plot '/tmp/wavelet1.dat';");
script.writeln("set term wxt 2; plot '/tmp/wavelet2.dat';");
scrip
On Wednesday, 8 July 2015 at 21:04:27 UTC, jmh530 wrote:
On Wednesday, 8 July 2015 at 18:31:00 UTC, Steven Schveighoffer
wrote:
You can use a function lambda:
auto fp = (real a) => cos(a);
Note, I had to put (real a) even though I would have expected
"a => cos(a)" to work.
-Steve
Interest
27 matches
Mail list logo