I am still trying to get GDAL[1] work with D. I found tool for
automatic binding generation it's named SWIG[2].
I looked at gdal binding examples, and look like all of them are
automatically generated with SWIG. I am not sure, but possible
binding is generation by one few lines, like is bindin
How do conditionally compile code for either release ("-release")
or debug ("-debug")?
Something like this:
version(Debug) {
pragma(lib, "libcmtd.lib");
} else {
pragma(lib, "libcmt.lib");
}
In the documentation [1], I don't see any predefined version
identifiers for this purpose.
Th
On Monday, 6 April 2015 at 14:50:29 UTC, Johan Engelen wrote:
How do conditionally compile code for either release
("-release") or debug ("-debug")?
Something like this:
version(Debug) {
pragma(lib, "libcmtd.lib");
} else {
pragma(lib, "libcmt.lib");
}
In the documentation [1], I don't
On Monday, 6 April 2015 at 14:55:58 UTC, Namespace wrote:
debug {
pragma(lib, "libcmtd.lib");
} else {
pragma(lib, "libcmt.lib");
}
Thanks for the quick reply!
Worth adding an example like that to
http://dlang.org/version.html ?
On Monday, 6 April 2015 at 15:15:48 UTC, Johan Engelen wrote:
On Monday, 6 April 2015 at 14:55:58 UTC, Namespace wrote:
debug {
pragma(lib, "libcmtd.lib");
} else {
pragma(lib, "libcmt.lib");
}
Thanks for the quick reply!
Worth adding an example like that to
http://dlang.org/version.h
On Monday, 6 April 2015 at 15:24:53 UTC, Namespace wrote:
On Monday, 6 April 2015 at 15:15:48 UTC, Johan Engelen wrote:
On Monday, 6 April 2015 at 14:55:58 UTC, Namespace wrote:
debug {
pragma(lib, "libcmtd.lib");
} else {
pragma(lib, "libcmt.lib");
}
Thanks for the quick reply!
Worth a
So a very basic question about using vibed for a REST service. I
am serving data using REST to another application. For the time
being it is internal so it is not a disaster if the fiber blocks.
But I wanted to understand what I should be doing - the small
server app calls library code to re
Do you even need to use swig? It looks like gdal has a C
interface. I think that htod would be what you're looking for
http://dlang.org/htod.html
On 4/3/15 6:08 PM, Kitt wrote:
On Friday, 3 April 2015 at 22:06:06 UTC, Namespace wrote:
On Friday, 3 April 2015 at 22:02:13 UTC, Kitt wrote:
Hello. I’m trying to write my own version of a list that doesn’t rely
on the garbage collector. I’m working on a very bare bones
implementation using mal
2. When you malloc, you use 'two.sizeof' and 'ten.sizeof'.
Integers are 4 bytes, so you were allocating 4 bytes for each
of these (not 2 or 10 bytes as is alluded to above).
Yeah, my mistake. I saw the mistake but could not describe it
correctly. :)
On Monday, 6 April 2015 at 15:46:32 UTC, Jeremy DeHaan wrote:
Do you even need to use swig? It looks like gdal has a C
interface. I think that htod would be what you're looking for
http://dlang.org/htod.html
+1 for htod if there is a c interface!
Hi,
I am surprised that this doesn't work:
class Foo
{
void bar(string) {}
}
void bar(Foo foo, int i)
{
}
auto foo = new Foo();
foo.bar(123); // <=== error
causing compilation error:
main.d(24): Error: function main.Foo.bar (string _param_0) is not
callable using argument types (int)
do
Hello everyone,
I have a problem with the fromStringz function
(std.string.fromStringz) when I try to compile with the GDC
compiler (it works fine with DMD).
Here is a minimal code to see the error:
import std.stdio, std.string, std.c.stdlib;
int main () {
char* s;
s = cast(char*)
On 4/6/15 12:23 PM, Szymon Gatner wrote:
Hi,
I am surprised that this doesn't work:
class Foo
{
void bar(string) {}
}
void bar(Foo foo, int i)
{
}
auto foo = new Foo();
foo.bar(123); // <=== error
causing compilation error:
main.d(24): Error: function main.Foo.bar (string _param_0) is no
On Monday, 6 April 2015 at 17:47:27 UTC, chardetm wrote:
Hello everyone,
I have a problem with the fromStringz function
(std.string.fromStringz) when I try to compile with the GDC
compiler (it works fine with DMD).
Here is a minimal code to see the error:
import std.stdio, std.string, std.
On Monday, 6 April 2015 at 17:53:13 UTC, Steven Schveighoffer
wrote:
On 4/6/15 12:23 PM, Szymon Gatner wrote:
Hi,
I am surprised that this doesn't work:
class Foo
{
void bar(string) {}
}
void bar(Foo foo, int i)
{
}
auto foo = new Foo();
foo.bar(123); // <=== error
causing compilation err
On Monday, 6 April 2015 at 17:55:42 UTC, Iain Buclaw wrote:
On Monday, 6 April 2015 at 17:47:27 UTC, chardetm wrote:
Hello everyone,
I have a problem with the fromStringz function
(std.string.fromStringz) when I try to compile with the GDC
compiler (it works fine with DMD).
Here is a minima
I think I found solution using opBinaryRight
import std.range;
struct S
{
int i;
string s;
int opCmp(int i) {
return this.i - i;
}
int opCmp(ref const S s) {
return this.i - s.i;
}
int opBinaryRight(string op)(int i) if (op == "<") {
return
some time ago I tried it, but without success
http://forum.dlang.org/thread/hnlrhschfgumaxzgi...@forum.dlang.org
On 4/6/15 2:00 PM, Szymon Gatner wrote:
On Monday, 6 April 2015 at 17:53:13 UTC, Steven Schveighoffer wrote:
On 4/6/15 12:23 PM, Szymon Gatner wrote:
Hi,
I am surprised that this doesn't work:
class Foo
{
void bar(string) {}
}
void bar(Foo foo, int i)
{
}
auto foo = new Foo();
foo.bar(123
What's the best way to do this? I'm assuming this should be best
practice:
http://dlang.org/traits.html#isSame
struct S { }
writeln(__traits(isSame, S, S));
On 4/6/15, Jonathan via Digitalmars-d-learn
wrote:
> What's the best way to do this? I'm assuming this should be best
> practice:
> http://dlang.org/traits.html#isSame
>
> struct S { }
> writeln(__traits(isSame, S, S));
>
I'm not even sure when or why this trait was introduced, but you could
use
On Mon, 06 Apr 2015 19:16:33 +, Jonathan wrote:
> What's the best way to do this? I'm assuming this should be best
> practice:
> http://dlang.org/traits.html#isSame
>
> struct S { }
> writeln(__traits(isSame, S, S));
struct S {}
auto s0 = S();
auto s1 = S();
static if (is(typeof(s0) == ty
On Monday, 6 April 2015 at 18:31:13 UTC, chardetm wrote:
On Monday, 6 April 2015 at 17:55:42 UTC, Iain Buclaw wrote:
On Monday, 6 April 2015 at 17:47:27 UTC, chardetm wrote:
Hello everyone,
I have a problem with the fromStringz function
(std.string.fromStringz) when I try to compile with the
Greetings.
I am using,
15:32:35.63>dmd
Digital Mars D Compiler v1.046
Copyright (c) 1999-2009 by Digital Mars written by Walter Bright
Documentation: http://www.digitalmars.com/d/1.0/index.html
And I have a program that reads a file into UTF8 and does a
series of string handling to create rep
Greetings!
Has anyone written any quick program to convert d1 code to d2? I
believe it will be a fine piece of program. :-) Thanks.
josé
On Monday, 6 April 2015 at 20:25:39 UTC, jicman wrote:
Greetings!
Has anyone written any quick program to convert d1 code to d2?
I believe it will be a fine piece of program. :-) Thanks.
josé
It is surprisingly difficult, to the point of being almost
impossible, to write such program. P
Hi!
i'm trying to get devisualization/window [1] working with some
simple opengl calls. I have created a windows with opengl context
using
Window window = new Window(800, 600, "My window!"w,
WindowContextType.Opengl);
If i run
writeln("type: ", context.type);
writeln("toolkit version: ", c
Hi. I'm a D newbie(!) coming from a Fortran/C/Python background.
I'm
struggling with the many new concepts needed in order to make any
sense out
of the documentation or traceback messages
(ranges/templates/...). For
example, the std.csv documentation is great but all the examples
read from a
st
On 7/04/2015 10:07 a.m., ddos wrote:
Hi!
i'm trying to get devisualization/window [1] working with some simple
opengl calls. I have created a windows with opengl context using
Window window = new Window(800, 600, "My window!"w,
WindowContextType.Opengl);
If i run
writeln("type: ", context.type
it's getting warmer, window doesnt freeze anymore and opengl
calls don't crash the window, but it's still all white after
calling
glClearColor(1,0,1,1);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
updated src:
https://github.com/oggs91/OpenVG_D/blob/master/demo_DvisualizationWT/source/
On 7/04/2015 10:34 a.m., ddos wrote:
it's getting warmer, window doesnt freeze anymore and opengl calls don't
crash the window, but it's still all white after calling
glClearColor(1,0,1,1);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
updated src:
https://github.com/oggs91/OpenVG_D/blob/m
On Monday, 6 April 2015 at 22:56:15 UTC, Rikki Cattermole wrote:
On 7/04/2015 10:34 a.m., ddos wrote:
it's getting warmer, window doesnt freeze anymore and opengl
calls don't
crash the window, but it's still all white after calling
glClearColor(1,0,1,1);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_B
On 7/04/2015 12:10 p.m., ddos wrote:
On Monday, 6 April 2015 at 22:56:15 UTC, Rikki Cattermole wrote:
On 7/04/2015 10:34 a.m., ddos wrote:
it's getting warmer, window doesnt freeze anymore and opengl calls don't
crash the window, but it's still all white after calling
glClearColor(1,0,1,1);
glC
On Monday, 6 April 2015 at 20:48:05 UTC, Dicebot wrote:
On Monday, 6 April 2015 at 20:25:39 UTC, jicman wrote:
Greetings!
Has anyone written any quick program to convert d1 code to d2?
I believe it will be a fine piece of program. :-) Thanks.
josé
It is surprisingly difficult, to the poin
Hi,
Is it OK?
-
import std.stdio : writeln;
import std.range : takeNone;
void main() {
auto s = takeNone("test");
s ~= 5;
writeln(s); // prints ♣
}
-
Windows 8.1 x64, DMD 2.067.0
On Tuesday, 7 April 2015 at 02:24:00 UTC, Dennis Ritchie wrote:
Is it OK?
Although, perhaps, everything is fine. I just thought that
creates takeNone not string type string, and the string array of
type string[].
import std.stdio : writeln;
void main() {
string s;
s ~= 5;
I got this to work with:
```
import std.stdio, std.file, std.csv, std.range;
void main()
{
std.file.write("test.csv", "0,1,abc\n2,3,def");
scope(exit) std.file.remove("test.csv");
static struct Rec { int a, b; char[] c; }
auto file = File("test.csv", "r");
On Tuesday, 7 April 2015 at 05:49:48 UTC, yazd wrote:
I got this to work with:
```
import std.stdio, std.file, std.csv, std.range;
void main()
{
std.file.write("test.csv", "0,1,abc\n2,3,def");
scope(exit) std.file.remove("test.csv");
static struct Rec { int a, b; char[]
static if (is(T == V))
Are static ifs always checked outside of runtime? Is it possible
for a static if condition to be undeterminable outside of
runtime, or would such a condition throw a compiler error?
40 matches
Mail list logo