Re: SQLite3

2014-05-07 Thread Jesse Phillips via Digitalmars-d-learn
On Wednesday, 7 May 2014 at 06:21:10 UTC, Jack wrote: First off a Disclaimer: I'm a noob and still learning. Please don't bash me like some forums. Now to the questions: I'm searching for a quick and easy way to integrate SQLite3 in my application. I came across the etc.c.sqlite3 and the DSQLite

Re: SQLite3

2014-05-07 Thread Jack via Digitalmars-d-learn
On Wednesday, 7 May 2014 at 19:03:34 UTC, Arjan wrote: On Wednesday, 7 May 2014 at 06:21:10 UTC, Jack wrote: First off a Disclaimer: I'm a noob and still learning. Please don't bash me like some forums. Now to the questions: I'm searching for a quick and easy way to integrate SQLite3 in my appl

__traits with alias

2014-05-07 Thread sigod via Digitalmars-d-learn
void registerAll(alias module_)() { foreach (m; __traits(derivedMembers, module_)) { regInner!(__traits(getMember, module_, m)); // compiles alias a = __traits(getMember, module_, m); // fails //Error: basic type expected, not __traits //Error: semicolon e

Re: Implicit static->dynamic arr and modifying

2014-05-07 Thread monarch_dodra via Digitalmars-d-learn
On Wednesday, 7 May 2014 at 20:09:22 UTC, H. S. Teoh via Digitalmars-d-learn wrote: On Wed, May 07, 2014 at 06:31:15PM +, Rene Zwanenburg via Digitalmars-d-learn wrote: On Wednesday, 7 May 2014 at 15:41:19 UTC, Nick Sabalausky wrote: >On 5/6/2014 6:46 PM, Rene Zwanenburg wrote: [...] >>st

Re: Any chance to avoid monitor field in my class?

2014-05-07 Thread Rene Zwanenburg via Digitalmars-d-learn
On Wednesday, 7 May 2014 at 14:44:57 UTC, Yuriy wrote: Hello, is there a way of reducing size of an empty class to just vtbl? I tried to declare it as extern(C++) which works, but has a nasty side effect of limited mangling. May I ask what your use case is? Perhaps there's another solution to

Re: Implicit static->dynamic arr and modifying

2014-05-07 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, May 07, 2014 at 06:31:15PM +, Rene Zwanenburg via Digitalmars-d-learn wrote: > On Wednesday, 7 May 2014 at 15:41:19 UTC, Nick Sabalausky wrote: > >On 5/6/2014 6:46 PM, Rene Zwanenburg wrote: [...] > >>struct S > >>{ > >>@safe: > >>string str; > >> > >>this(string data) > >>

Re: SQLite3

2014-05-07 Thread Arjan via Digitalmars-d-learn
On Wednesday, 7 May 2014 at 06:21:10 UTC, Jack wrote: First off a Disclaimer: I'm a noob and still learning. Please don't bash me like some forums. Now to the questions: I'm searching for a quick and easy way to integrate SQLite3 in my application. maybe: https://github.com/buggins/ddbc/wiki ?

Re: [Rosettacode] D code line length limit

2014-05-07 Thread Meta via Digitalmars-d-learn
On Wednesday, 7 May 2014 at 18:51:59 UTC, Meta wrote: On Wednesday, 7 May 2014 at 14:40:37 UTC, Jonathan M Davis via Digitalmars-d-learn wrote: My eyes... Oh, how that hurts readibily. While I agree that pure @safe @nogc nothrow void doSomething(int n) { } is quite ugly, it is really not muc

Re: [Rosettacode] D code line length limit

2014-05-07 Thread Meta via Digitalmars-d-learn
On Wednesday, 7 May 2014 at 14:40:37 UTC, Jonathan M Davis via Digitalmars-d-learn wrote: My eyes... Oh, how that hurts readibily. While I agree that pure @safe @nogc nothrow void doSomething(int n) { } is quite ugly, it is really not much worse than void doSomething(int n) pure @safe @nogc

Re: Implicit static->dynamic arr and modifying

2014-05-07 Thread Rene Zwanenburg via Digitalmars-d-learn
On Wednesday, 7 May 2014 at 15:41:19 UTC, Nick Sabalausky wrote: On 5/6/2014 6:46 PM, Rene Zwanenburg wrote: On Tuesday, 6 May 2014 at 02:17:06 UTC, Nick Sabalausky wrote: So all is well, and deliberately so. Pardon the noise. IMO it's not. I once had a particularly nasty bug because of this

Re: Any chance to avoid monitor field in my class?

2014-05-07 Thread bearophile via Digitalmars-d-learn
Yuriy: Hello, is there a way of reducing size of an empty class to just vtbl? I tried to declare it as extern(C++) which works, but has a nasty side effect of limited mangling. extern(C++) classes is only for interfacing with C++ code. It's not to write regular D code. Bye, bearophile

Re: [Rosettacode] D code line length limit

2014-05-07 Thread bearophile via Digitalmars-d-learn
Nick Sabalausky: 72-73 chars would indeed be a pain. In my own code I like to use a soft limit of 80, FWIW. This is not regular code, it's an online wiki. The situation is a little different. But I think 80 is now acceptable. Bye, bearophile

Re: [Rosettacode] D code line length limit

2014-05-07 Thread Ali Çehreli via Digitalmars-d-learn
On 05/07/2014 06:25 AM, bearophile wrote: > limit to about 80 chars. I've never worked at a place where the limit was not 80. So, from my point of view it is still the industry standard and I like it. :) Ali

Re: [Rosettacode] D code line length limit

2014-05-07 Thread Nick Sabalausky via Digitalmars-d-learn
On 5/7/2014 9:25 AM, bearophile wrote: So far in Rosettacode D entries I've kept a line length limit of 72 or 73 chars. But now a little larger monitors are common, D UFCS chains are common, and we also have longer function signatures with "pure nothrow @safe @nogc" (that usually I put on a new

Re: Implicit static->dynamic arr and modifying

2014-05-07 Thread Nick Sabalausky via Digitalmars-d-learn
On 5/6/2014 6:46 PM, Rene Zwanenburg wrote: On Tuesday, 6 May 2014 at 02:17:06 UTC, Nick Sabalausky wrote: So all is well, and deliberately so. Pardon the noise. IMO it's not. I once had a particularly nasty bug because of this: struct S { @safe: string str; this(string data)

Re: [Rosettacode] D code line length limit

2014-05-07 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, May 07, 2014 at 01:25:52PM +, bearophile via Digitalmars-d-learn wrote: > So far in Rosettacode D entries I've kept a line length limit of 72 or > 73 chars. > > But now a little larger monitors are common, D UFCS chains are common, > and we also have longer function signatures with "p

Any chance to avoid monitor field in my class?

2014-05-07 Thread Yuriy via Digitalmars-d-learn
Hello, is there a way of reducing size of an empty class to just vtbl? I tried to declare it as extern(C++) which works, but has a nasty side effect of limited mangling.

Re: [Rosettacode] D code line length limit

2014-05-07 Thread Jonathan M Davis via Digitalmars-d-learn
On Wed, 07 May 2014 13:39:55 + Meta via Digitalmars-d-learn wrote: > Maybe D programmers need to adopt a new convention for > annotations in the long term. Instead of: > > void doSomething(int n) pure @safe @nogc nothrow > { > } > > We should write: > > pure @safe @nogc nothrow > void doSometh

Re: newbie question about dub

2014-05-07 Thread Mike Parker via Digitalmars-d-learn
On 5/6/2014 8:29 PM, Oleg wrote: QUESTION: How to define the dfuse library version of I'm doing it wrong way? I believe you might find this thread[1] in the dub forum helpful. [1] http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub/thread/1328/

Re: newbie question about dub

2014-05-07 Thread Mike Parker via Digitalmars-d-learn
On 5/7/2014 10:41 PM, Mike Parker wrote: On 5/6/2014 8:29 PM, Oleg wrote: QUESTION: How to define the dfuse library version of I'm doing it wrong way? I believe you might find this thread[1] in the dub forum helpful. Sorry, wrong link. It should be: http://forum.rejectedsoftware.com/groups

Re: [Rosettacode] D code line length limit

2014-05-07 Thread Meta via Digitalmars-d-learn
On Wednesday, 7 May 2014 at 13:25:55 UTC, bearophile wrote: So far in Rosettacode D entries I've kept a line length limit of 72 or 73 chars. But now a little larger monitors are common, D UFCS chains are common, and we also have longer function signatures with "pure nothrow @safe @nogc" (that

[Rosettacode] D code line length limit

2014-05-07 Thread bearophile via Digitalmars-d-learn
So far in Rosettacode D entries I've kept a line length limit of 72 or 73 chars. But now a little larger monitors are common, D UFCS chains are common, and we also have longer function signatures with "pure nothrow @safe @nogc" (that usually I put on a new line), so keeping that line length l

Re: SQLite3

2014-05-07 Thread Jack via Digitalmars-d-learn
On Wednesday, 7 May 2014 at 08:52:04 UTC, Robert Schadek via Digitalmars-d-learn wrote: On 05/07/2014 08:21 AM, Jack via Digitalmars-d-learn wrote: First off a Disclaimer: I'm a noob and still learning. Please don't bash me like some forums. Now to the questions: I'm searching for a quick and e

Re: static if (__ctfe)

2014-05-07 Thread Yuriy via Digitalmars-d-learn
On Wednesday, 7 May 2014 at 09:51:01 UTC, John Colvin wrote: On Wednesday, 7 May 2014 at 09:47:20 UTC, Yuriy wrote: Hello, is there any way to static if(__ctfe)? I want to declare class members which are only available in ctfe. Thanx. Sadly not as far as I know. What's the use-case? There may

Re: static if (__ctfe)

2014-05-07 Thread John Colvin via Digitalmars-d-learn
On Wednesday, 7 May 2014 at 09:47:20 UTC, Yuriy wrote: Hello, is there any way to static if(__ctfe)? I want to declare class members which are only available in ctfe. Thanx. Sadly not as far as I know. What's the use-case? There may be a nice solution none-the-less.

static if (__ctfe)

2014-05-07 Thread Yuriy via Digitalmars-d-learn
Hello, is there any way to static if(__ctfe)? I want to declare class members which are only available in ctfe. Thanx.

Re: SQLite3

2014-05-07 Thread Robert Schadek via Digitalmars-d-learn
On 05/07/2014 08:21 AM, Jack via Digitalmars-d-learn wrote: > First off a Disclaimer: I'm a noob and still learning. Please > don't bash me like some forums. > > Now to the questions: I'm searching for a quick and easy way to > integrate SQLite3 in my application. I came across the > etc.c.sqlite3

Re: strange error with std.net.curl

2014-05-07 Thread Mengu via Digitalmars-d-learn
On Sunday, 4 May 2014 at 16:40:08 UTC, Suliman wrote: I am trying to compile next code: import std.net.curl; import std.stdio; void main() { writeln(get("https://google.com/";)); } and got next error http://www.everfall.com/paste/id.php?y37dr6qmu54h this is related to verifying cert

Re: SQLite3

2014-05-07 Thread Oleg via Digitalmars-d-learn
On Wednesday, 7 May 2014 at 06:21:10 UTC, Jack wrote: void* NotUsedAtAll, // Null variable int argc, // What? char** results, // Results? char** columnNames //Column Names? You can read about this agruments on http://www.sqlite.org/c3ref/exec.html

SQLite3

2014-05-07 Thread Jack via Digitalmars-d-learn
First off a Disclaimer: I'm a noob and still learning. Please don't bash me like some forums. Now to the questions: I'm searching for a quick and easy way to integrate SQLite3 in my application. I came across the etc.c.sqlite3 and the DSQLite library(https://github.com/bioinfornatics/DSQLite). T