Derelict3 running

2012-05-01 Thread Stephen Jones
I just got DMD2 Derelict3 (SDL2/GL3/SDL2Image) up and running. Since there is not much by way of documentation or running code floating about I thought I'd drop what worked for me here. The code is a basic c style main and functions. The code contains a cool snip of code for flipping images to

Re: How to make a directory?

2012-05-01 Thread Jordi Sayol
Al 02/05/12 01:45, En/na Minas ha escrit: [...] > Also, is there a way to require the root password of the user when going > create the directory in a restricted folder (like /usr) AFTER the application > has started? In Linux, files and directories have the "setuid" and "setgid" special flags

Stack overflow checking?

2012-05-01 Thread bearophile
I'd like to open an enhancement request for something like this as a feature for all D compilers, what do you think? (Generally Ada has something to teach to D design): http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gnat_ugn_unw/Stack-Overflow-Checking.html Thank you, bye, bearophile

Re: "static" means too many things

2012-05-01 Thread H. S. Teoh
On Wed, May 02, 2012 at 01:46:37AM +0200, bearophile wrote: > This is the brief of some D code, it shows one consequence of the > excessive overloading of the D "static" keyword: > > struct Foo { > bool solve() { > /*static*/ bool fill(int r, int c, Cell n) { > // ... >

Re: How to make a directory?

2012-05-01 Thread Kevin Cox
On May 1, 2012 7:49 PM, "Alex Rønne Petersen" wrote: >> >> Also, is there a way to require the root password of the user when going >> create the directory in a restricted folder (like /usr) AFTER the >> application has started? > > > No idea, sorry. > >> >> Thank you. > > > -- > - Alex You could

Re: "static" means too many things

2012-05-01 Thread Andrej Mitrovic
On 5/2/12, bearophile wrote: > This is the brief of some D code, it shows one consequence of the > excessive overloading of the D "static" keyword: You can almost cheat, but you can't: struct Foo { bool solve() { auto fill = function(int r, int c, int x) { wri

Re: How to make a directory?

2012-05-01 Thread Alex Rønne Petersen
On 02-05-2012 01:45, Minas wrote: What is the D way to create a directory? I can use the C function system("mkdir ...") but it doesn't seem very good to me. It's not in the most obvious of places: http://dlang.org/phobos/std_file.html#mkdir (But then again, an std.directory module would pro

"static" means too many things

2012-05-01 Thread bearophile
This is the brief of some D code, it shows one consequence of the excessive overloading of the D "static" keyword: struct Foo { bool solve() { /*static*/ bool fill(int r, int c, Cell n) { // ... if (fill(r + i, c + j, n + 1)) return true; } r

How to make a directory?

2012-05-01 Thread Minas
What is the D way to create a directory? I can use the C function system("mkdir ...") but it doesn't seem very good to me. Also, is there a way to require the root password of the user when going create the directory in a restricted folder (like /usr) AFTER the application has started? Tha

Re: Help: running a method from the importing file's method "space"

2012-05-01 Thread Rowan
On Tuesday, 1 May 2012 at 17:34:23 UTC, Regan Heath wrote: I'm not sure if any of this is helpful but I've had a tinker and had some measure of success :p I think you have the following issues to resolve: 1. When you build the lib, you need to tell it that the progMain symbol is to be found '

Re: Help: running a method from the importing file's method "space"

2012-05-01 Thread Regan Heath
I'm not sure if any of this is helpful but I've had a tinker and had some measure of success :p I think you have the following issues to resolve: 1. When you build the lib, you need to tell it that the progMain symbol is to be found 'extern'ally. 2. When you build the exe, you have to make sure t

Re: Does dmd use static or dynamic linking with the Phobos Library?

2012-05-01 Thread Jacob Carlborg
On 2012-05-01 04:46, WhatMeWorry wrote: Is this user configurable? I came across the sentence in the D Compiler/Linking section: "The actual linking is done by running gcc" I thought that maybe this meant that I could pass a gcc option like -static or -shared through dmd, but it errored out.

Re: mysql binding/wrapper?

2012-05-01 Thread SomeDude
On Saturday, 28 April 2012 at 17:42:42 UTC, Adam D. Ruppe wrote: On Saturday, 28 April 2012 at 16:19:37 UTC, simendsjo wrote: As it resides in this big misc repository, does it have many dependecies? It depends on the database.d module in there too. (database.d provides the base interface and

Re: Frustration [Was: mysql binding/wrapper?]

2012-05-01 Thread SomeDude
On Tuesday, 1 May 2012 at 08:40:27 UTC, SomeDude wrote: On Tuesday, 1 May 2012 at 02:04:03 UTC, Ary Manzana wrote: On 5/1/12 2:44 AM, simendsjo wrote: On Mon, 30 Apr 2012 20:55:45 +0200, Ary Manzana wrote: Looking at the code of mysql.d I see a big switch with many cases like "case 0x01: //

Re: Frustration [Was: mysql binding/wrapper?]

2012-05-01 Thread SomeDude
On Tuesday, 1 May 2012 at 02:04:03 UTC, Ary Manzana wrote: On 5/1/12 2:44 AM, simendsjo wrote: On Mon, 30 Apr 2012 20:55:45 +0200, Ary Manzana wrote: Looking at the code of mysql.d I see a big switch with many cases like "case 0x01: // TINYINT". But then there's the SQLType enum with those c

Re: Frustration [Was: mysql binding/wrapper?]

2012-05-01 Thread simendsjo
On Tue, 01 May 2012 04:04:01 +0200, Ary Manzana wrote: It's sad. I always want to give D a chance. And when I do I always bump into errors and inconveniences. (...) Every time I want to start coding in D, or helping some project, I stumble into all kind of troubles. I have the same feelin