Re: mysql-native v2.1.0-rc1: New features

2018-02-24 Thread Suliman via Digitalmars-d-announce
What about string interpolation like: conn.exec("INSERT INTO table_name VALUES ({i}, {s})"); ? Instead of: conn.exec("INSERT INTO table_name VALUES (?, ?)", i, s);

Re: iota to array

2018-02-24 Thread H. S. Teoh via Digitalmars-d-learn
On Sun, Feb 25, 2018 at 06:22:03AM +, psychoticRabbit via Digitalmars-d-learn wrote: [..] > printArray(doubleArr); // why is it printing ints instead of doubles?? [...] > void printArray(T)(const ref T[] a) if (isArray!(T[])) > { > foreach(t; a) > writeln(t); Try:

Re: iota to array

2018-02-24 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, February 25, 2018 06:22:03 psychoticRabbit via Digitalmars-d- learn wrote: > On Sunday, 25 February 2018 at 05:40:19 UTC, Jonathan M Davis > > wrote: > > int[] intArr = iota(1, 11).array(); > > > > - Jonathan M Davis > > thanks! > > oh man. It's so easy to do stuff in D ;-) > > But

Re: iota to array

2018-02-24 Thread Uknown via Digitalmars-d-learn
On Sunday, 25 February 2018 at 06:22:03 UTC, psychoticRabbit wrote: On Sunday, 25 February 2018 at 05:40:19 UTC, Jonathan M Davis wrote: int[] intArr = iota(1, 11).array(); - Jonathan M Davis thanks! oh man. It's so easy to do stuff in D ;-) But this leads me to a new problem now.

Re: iota to array

2018-02-24 Thread psychoticRabbit via Digitalmars-d-learn
On Sunday, 25 February 2018 at 05:40:19 UTC, Jonathan M Davis wrote: int[] intArr = iota(1, 11).array(); - Jonathan M Davis thanks! oh man. It's so easy to do stuff in D ;-) But this leads me to a new problem now. When I run my code below, I get ints printed instead of doubles??

Re: How do you get comfortable with Dlang.org's Forum?

2018-02-24 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 02/24/2018 08:31 PM, psychoticRabbit wrote: NNTP is not the future..it's the past. Uhh, so? This isn't fasion. Merit matters, not fad-compliance.

Re: iota to array

2018-02-24 Thread Seb via Digitalmars-d-learn
On Sunday, 25 February 2018 at 05:24:54 UTC, psychoticRabbit wrote: Hi. Anyone know whether something like this is possible? I've tried various conversions/casts, but no luck yet. Essentially, I want to cast the result set of the iota to an array, during initialisation of the variable. You

Re: iota to array

2018-02-24 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, February 25, 2018 05:24:54 psychoticRabbit via Digitalmars-d- learn wrote: > Hi. Anyone know whether something like this is possible? > > I've tried various conversions/casts, but no luck yet. > > Essentially, I want to cast the result set of the iota to an > array, during

iota to array

2018-02-24 Thread psychoticRabbit via Digitalmars-d-learn
Hi. Anyone know whether something like this is possible? I've tried various conversions/casts, but no luck yet. Essentially, I want to cast the result set of the iota to an array, during initialisation of the variable. no, I don't want to use 'auto'. I want an array object ;-)

Re: Aliasing multiple delegates to the same name - very strange behaviour

2018-02-24 Thread Meta via Digitalmars-d
On Sunday, 25 February 2018 at 04:59:58 UTC, Basile B. wrote: Use templates to prevent implicit conversion: alias f(T = int) = (T n) => 0; alias f(T = char) = (T n) => 'a'; alias f(T = bool) = (T n) => false; Bug report is invalid and can be closed. Please don't be so hasty. The main focus

[Issue 18520] Different functions and function/delegate literals can be aliased to the same name

2018-02-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18520 monkeywork...@hotmail.com changed: What|Removed |Added Status|RESOLVED|REOPENED

[Issue 18520] The same alias can be declared multiple times if a function or function/delegate literal is aliased

2018-02-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18520 monkeywork...@hotmail.com changed: What|Removed |Added Summary|Different functions and |The same alias can be

Re: Aliasing multiple delegates to the same name - very strange behaviour

2018-02-24 Thread Meta via Digitalmars-d
On Sunday, 25 February 2018 at 04:47:47 UTC, Nicholas Wilson wrote: On Sunday, 25 February 2018 at 04:06:43 UTC, Meta wrote: I just filed this bug: https://issues.dlang.org/show_bug.cgi?id=18520 Not only does the following code compile and link successfully, it prints 0 three times when ran:

[Issue 18520] Different delegates can be aliased to the same name multiple times

2018-02-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18520 Basile B. changed: What|Removed |Added Status|NEW |RESOLVED

Re: Aliasing multiple delegates to the same name - very strange behaviour

2018-02-24 Thread Basile B. via Digitalmars-d
On Sunday, 25 February 2018 at 04:06:43 UTC, Meta wrote: I just filed this bug: https://issues.dlang.org/show_bug.cgi?id=18520 Not only does the following code compile and link successfully, it prints 0 three times when ran: alias f = (int n) => 0; alias f = (char c) => 'a'; alias f = (bool

Re: Aliasing multiple delegates to the same name - very strange behaviour

2018-02-24 Thread Nicholas Wilson via Digitalmars-d
On Sunday, 25 February 2018 at 04:06:43 UTC, Meta wrote: I just filed this bug: https://issues.dlang.org/show_bug.cgi?id=18520 Not only does the following code compile and link successfully, it prints 0 three times when ran: alias f = (int n) => 0; alias f = (char c) => 'a'; alias f = (bool

Re: Template Constraints

2018-02-24 Thread Jonathan via Digitalmars-d-learn
On Saturday, 24 February 2018 at 03:04:07 UTC, Adam D. Ruppe wrote: On Saturday, 24 February 2018 at 02:54:13 UTC, Jonathan wrote: I am having trouble finding many useful explanations of using template constraints beyond basic usage. The constraint is just like static if as to what it allows

Aliasing multiple delegates to the same name - very strange behaviour

2018-02-24 Thread Meta via Digitalmars-d
I just filed this bug: https://issues.dlang.org/show_bug.cgi?id=18520 Not only does the following code compile and link successfully, it prints 0 three times when ran: alias f = (int n) => 0; alias f = (char c) => 'a'; alias f = (bool b) => false; void main() { import std.stdio;

[Issue 18520] Different delegates can be aliased to the same name multiple times

2018-02-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18520 --- Comment #1 from monkeywork...@hotmail.com --- The code seemingly functions correctly when I change it as follows: int f1(int n) { return 0; } char f2(char c) { return 'a'; } bool f3(bool b) { return false; } alias f = f1; alias f = f2; alias

[Issue 18520] New: Different delegates can be aliased to the same name multiple times

2018-02-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18520 Issue ID: 18520 Summary: Different delegates can be aliased to the same name multiple times Product: D Version: D2 Hardware: All OS: All Status: NEW

Re: countUntil to print all the index of a given string.

2018-02-24 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, February 25, 2018 02:58:33 Seb via Digitalmars-d-learn wrote: > On Sunday, 25 February 2018 at 02:37:00 UTC, Jonathan M Davis > > wrote: > > If any exceptions could be thrown, then a lazy solution can't > > be @nogc (something that's often the case with strings thanks > > to

Re: Postgres and other database interfaces

2018-02-24 Thread Seb via Digitalmars-d
On Saturday, 24 February 2018 at 23:17:46 UTC, Denis F wrote: On Saturday, 24 February 2018 at 22:24:58 UTC, bachmeier wrote: 3. Looking at the source code, you have already written a bunch of comments. Those are documentation once you turn them into html. I'm for the comments to be

Re: compilers w/ different language features: version block

2018-02-24 Thread Seb via Digitalmars-d-learn
On Sunday, 25 February 2018 at 01:19:02 UTC, Seb wrote: On Sunday, 25 February 2018 at 00:42:20 UTC, Seb wrote: On Sunday, 25 February 2018 at 00:36:16 UTC, kdevel wrote: [...] Are you looking for something like this? --- static if (__traits(compiles, () { static foreach (i; [0]){} }))

Re: Postgres and other database interfaces

2018-02-24 Thread Joe via Digitalmars-d
On Saturday, 24 February 2018 at 23:04:39 UTC, Denis F wrote: If anyone really want to impliment your idea, at my first glance at the PEP 249 I had a feeling that this is work for time less than a 1-2 weeks. It can be a simple wrapper over dpq2, mysql-native, sqlite3, etc. I'm not saying

Re: countUntil to print all the index of a given string.

2018-02-24 Thread Seb via Digitalmars-d-learn
On Sunday, 25 February 2018 at 02:37:00 UTC, Jonathan M Davis wrote: If any exceptions could be thrown, then a lazy solution can't be @nogc (something that's often the case with strings thanks to auto-decoding and UTFExceptions), and a solution could be eager without allocating if the result

Re: countUntil to print all the index of a given string.

2018-02-24 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, February 25, 2018 01:49:05 Seb via Digitalmars-d-learn wrote: > On Tuesday, 20 February 2018 at 08:44:37 UTC, aberba wrote: > > On Sunday, 18 February 2018 at 15:23:14 UTC, Cym13 wrote: > >> On Sunday, 18 February 2018 at 14:48:59 UTC, Cym13 wrote: > >>> [...] > >> > >> Just thought of

Re: Double link list

2018-02-24 Thread Joel via Digitalmars-d-learn
On Saturday, 24 February 2018 at 09:48:13 UTC, Joel wrote: I'm trying some code for practice, but it isn't working properly - it prints just one number when printing in reverse. [snip] Thanks guys. And I got it working with 'if (head is tail)' etc.

Re: NNTP client configuration

2018-02-24 Thread Walter Bright via Digitalmars-d
On 2/24/2018 1:58 AM, Jonathan M Davis wrote: LOL. The cost of going to dconf when it's in Germany and you live in the US isn't exactly small, and for some folks, it's not easy to get away even if they can afford the cost. Of course, when it's in the US, then the folks in Europe would have the

Re: countUntil to print all the index of a given string.

2018-02-24 Thread Seb via Digitalmars-d-learn
On Tuesday, 20 February 2018 at 08:44:37 UTC, aberba wrote: On Sunday, 18 February 2018 at 15:23:14 UTC, Cym13 wrote: On Sunday, 18 February 2018 at 14:48:59 UTC, Cym13 wrote: [...] Just thought of a much better/simpler solution for that last case that also doesn't force you to read all

Re: How do you get comfortable with Dlang.org's Forum?

2018-02-24 Thread rikki cattermole via Digitalmars-d
On 25/02/2018 2:31 PM, psychoticRabbit wrote: NNTP is not the future..it's the past. Good news, mailing lists will exist long after we're all dead and gone. Right along with those stupid little phpbb installs. You'd have to transition some very massive and important projects off of it and

Re: mysql-native v2.1.0-rc1: New features

2018-02-24 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce
Minor second release candidate, 'v2.1.0-rc2'. Only thing this changes is to update the example in the readme to include the new simplified prepared statement interface.

Re: How do you get comfortable with Dlang.org's Forum?

2018-02-24 Thread psychoticRabbit via Digitalmars-d
On Saturday, 24 February 2018 at 20:29:34 UTC, Walter Bright wrote: Yeah, the immutability of NNTP posts is a feature, not a bug. but aren't git changes essentially immutable too? as long is there is a history of the changes, there is no problem with changes. I'm really only interested in

Re: compilers w/ different language features: version block

2018-02-24 Thread Seb via Digitalmars-d-learn
On Sunday, 25 February 2018 at 00:42:20 UTC, Seb wrote: On Sunday, 25 February 2018 at 00:36:16 UTC, kdevel wrote: [...] Are you looking for something like this? --- static if (__traits(compiles, () { static foreach (i; [0]){} })) version = supportsStaticForeach; void main() {

Re: Vibe.d no more using static this() {}

2018-02-24 Thread Seb via Digitalmars-d-learn
On Friday, 23 February 2018 at 23:11:13 UTC, aberba wrote: I recently noticed vibe.d now using main loop which call the vibe.d event loop. "Recently"? FWIW this has been phased out a long time ago ;-) --- 0.7.23 (2015) Definition of either VibeCustomMain or VibeDefaultMain is now a hard

[Issue 18515] freebsd 11 ships with gcc unable to link 32 bit binaries, dmd uses it by default

2018-02-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18515 --- Comment #7 from Jonathan M Davis --- Well, I'm able to build and run the tests for Phobos, druntime, and dmd without having gcc installed on a 64-bit FreeBSD 11.1 system. I'd guess that that works for 32-bit as well

Re: compilers w/ different language features: version block

2018-02-24 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, February 25, 2018 00:36:16 kdevel via Digitalmars-d-learn wrote: > A code fragment using static foreach > > https://forum.dlang.org/thread/jiefcxwqbjzqnmtaz...@forum.dlang.org#post-b > eruryblsptnunsowjph:40forum.dlang.org > > does not compile with the current GDC (GCC 4.9.4 and 5.5.0).

Re: compilers w/ different language features: version block

2018-02-24 Thread Seb via Digitalmars-d-learn
On Sunday, 25 February 2018 at 00:36:16 UTC, kdevel wrote: A code fragment using static foreach https://forum.dlang.org/thread/jiefcxwqbjzqnmtaz...@forum.dlang.org#post-beruryblsptnunsowjph:40forum.dlang.org does not compile with the current GDC (GCC 4.9.4 and 5.5.0). I tried to encapsulate

compilers w/ different language features: version block

2018-02-24 Thread kdevel via Digitalmars-d-learn
A code fragment using static foreach https://forum.dlang.org/thread/jiefcxwqbjzqnmtaz...@forum.dlang.org#post-beruryblsptnunsowjph:40forum.dlang.org does not compile with the current GDC (GCC 4.9.4 and 5.5.0). I tried to encapsulate this code into a version block but GDC still checks the

[Issue 18480] [Reg 2.079] dmd hangs with self-alias declaration

2018-02-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18480 Martin Nowak changed: What|Removed |Added CC||c...@dawg.eu

Re: short s, t; t = -s: no (longer) works: Deprecation: integral promotion not done for -s, use

2018-02-24 Thread ixid via Digitalmars-d-learn
On Saturday, 24 February 2018 at 20:07:04 UTC, kdevel wrote: I don't get the point of the deprecation message: --- intprom.d import std.stdio; void main () { short s, t; t = -s; } --- $ dmd intprom.d intprom.d(6): Deprecation: integral promotion not done for -s, use

Re: Postgres and other database interfaces

2018-02-24 Thread Denis F via Digitalmars-d
On Saturday, 24 February 2018 at 22:24:58 UTC, bachmeier wrote: On Saturday, 24 February 2018 at 18:41:21 UTC, Denis F wrote: Hi! Here is dpq2 and vibe-d-postgresql developer. The problem is that I do not know English very well. So,I think it's better not to write any documentation than to

Re: Postgres and other database interfaces

2018-02-24 Thread Denis F via Digitalmars-d
On Saturday, 24 February 2018 at 20:45:03 UTC, Joe wrote: On Saturday, 24 February 2018 at 18:56:23 UTC, Denis F wrote: It seems to me that this is a common misconception that it is possible to create a good universal tool for accessing the database in place of the many existing ones. I

Re: short s, t; t = -s: no (longer) works: Deprecation: integral promotion not done for -s, use

2018-02-24 Thread kdevel via Digitalmars-d-learn
On Saturday, 24 February 2018 at 22:30:09 UTC, Steven Schveighoffer wrote: The prime example is this: byte b = -128; int x = -b; What would you expect x to be? a) 128 b) -128 Neither nor. I would prefer the codomain of "-" be the range of byte and hence an exception thrown in that

[Issue 18519] New: freebsd 11 + phobos + curl, timing out

2018-02-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18519 Issue ID: 18519 Summary: freebsd 11 + phobos + curl, timing out Product: D Version: D2 Hardware: x86 OS: FreeBSD Status: NEW Severity: critical

Aedi, v0.4.0 release

2018-02-24 Thread Alexandru Ermicioi via Digitalmars-d-announce
Hello everyone, There is new release of Aedi, a dependency injection framework v0.4.0. The new release contains changes below, of which the most notable is manual memory management for components using std.experimental.allocators. Changelog: - Added manual memory management mechanisms to

Re: short s, t; t = -s: no (longer) works: Deprecation: integral promotion not done for -s, use

2018-02-24 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/24/18 4:42 PM, kdevel wrote: On Saturday, 24 February 2018 at 20:17:12 UTC, Steven Schveighoffer wrote: https://dlang.org/changelog/2.078.0.html#fix16997 My goodness! So there is currently no negation operator defined on short and some other types? No, that's not the case. It's simply

Re: Postgres and other database interfaces

2018-02-24 Thread bachmeier via Digitalmars-d
On Saturday, 24 February 2018 at 18:41:21 UTC, Denis F wrote: Hi! Here is dpq2 and vibe-d-postgresql developer. The problem is that I do not know English very well. So,I think it's better not to write any documentation than to write the wrong one. There are still some steps you can take:

Re: Where can get the strsafe.d by strsafe.h ? Thanks.

2018-02-24 Thread bauss via Digitalmars-d-learn
On Saturday, 24 February 2018 at 14:58:52 UTC, FrankLike wrote: Hi,everyone, Now,I use some code in strsafe.h,but where can get the strsafe.d ? Thanks. Basically nowhere. strsafe.h is non-standard. What you have to do is create the binding yourself.

[Issue 18515] freebsd 11 ships with gcc unable to link 32 bit binaries, dmd uses it by default

2018-02-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18515 --- Comment #6 from Brad Roberts --- I wasn't thinking about this last night, but the behavior that's in question isn't master or stable branch, but rather 2.068.2. That compiler's behavior is where things are going wrong.

[Issue 18515] freebsd 11 ships with gcc unable to link 32 bit binaries, dmd uses it by default

2018-02-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18515 --- Comment #5 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/0527f4eef35b56afd67c65382a0e395d86db93f4 issue 18515: Fix it so that neither g++ nor CC is required.

[Issue 5570] 64 bit C ABI not followed for passing structs and complex numbers as function parameters

2018-02-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5570 Timothee Cour changed: What|Removed |Added CC|

Re: short s, t; t = -s: no (longer) works: Deprecation: integral promotion not done for -s, use

2018-02-24 Thread kdevel via Digitalmars-d-learn
On Saturday, 24 February 2018 at 20:17:12 UTC, Steven Schveighoffer wrote: On 2/24/18 3:07 PM, kdevel wrote: I don't get the point of the deprecation message: --- intprom.d import std.stdio; void main () {    short s, t;    t = -s; } --- https://dlang.org/changelog/2.078.0.html#fix16997

[Issue 16243] wrong C++ argument passing with empty struct when interfacing with Clang

2018-02-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16243 --- Comment #20 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/6966e6e0a9bf4ddf2760a46619e0c247ae8405ff Temporary workaround for Issue 16243

formattedRead string without allocation?

2018-02-24 Thread Steven Schveighoffer via Digitalmars-d-learn
I want to use formattedRead to enforce a certain format, and easily parse out the data from a string. But if I do: string s = "123:abc:123"; string y; assert(s.formattedRead!"123:%s:123"(y) == 1); y is now a newly-allocated string, not a slice of the input. In the case of parsing strings

Re: Postgres and other database interfaces

2018-02-24 Thread Joe via Digitalmars-d
On Saturday, 24 February 2018 at 18:56:23 UTC, Denis F wrote: It seems to me that this is a common misconception that it is possible to create a good universal tool for accessing the database in place of the many existing ones. I don't think what is needed a "good universal tool" but a good

[Issue 16243] wrong C++ argument passing with empty struct when interfacing with Clang

2018-02-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16243 --- Comment #19 from Walter Bright --- (In reply to Walter Bright from comment #18) > Temporary workaround https://github.com/dlang/dmd/pull/7952 --

[Issue 16243] wrong C++ argument passing with empty struct when interfacing with Clang

2018-02-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16243 Walter Bright changed: What|Removed |Added Summary|wrong C++ argument passing |wrong C++ argument

[Issue 16243] wrong C++ argument passing with empty struct and 6 integers

2018-02-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16243 --- Comment #18 from Walter Bright --- Temporary workaround --

Re: How do you get comfortable with Dlang.org's Forum?

2018-02-24 Thread Walter Bright via Digitalmars-d
On 2/23/2018 8:41 PM, H. S. Teoh wrote: +1. In the old days, it was called "bait and switch". After people reply to an initial post, edit it and change it into something else completely. It was one of the trolls' favorite tools. Yeah, the immutability of NNTP posts is a feature, not a bug. It

Re: short s, t; t = -s: no (longer) works: Deprecation: integral promotion not done for -s, use

2018-02-24 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/24/18 3:07 PM, kdevel wrote: I don't get the point of the deprecation message: --- intprom.d import std.stdio; void main () {    short s, t;    t = -s; } --- https://dlang.org/changelog/2.078.0.html#fix16997 $ dmd intprom.d intprom.d(6): Deprecation: integral promotion not done for

Re: Postgres and other database interfaces

2018-02-24 Thread Joe via Digitalmars-d
On Saturday, 24 February 2018 at 18:41:21 UTC, Denis F wrote: On Saturday, 24 February 2018 at 05:33:56 UTC, Joe wrote: 2. dpq2. Second most downloaded and built on top of derelict-pq. The "documentation" consists of a README listing the features and a single example, which appears to focus

short s, t; t = -s: no (longer) works: Deprecation: integral promotion not done for -s, use

2018-02-24 Thread kdevel via Digitalmars-d-learn
I don't get the point of the deprecation message: --- intprom.d import std.stdio; void main () { short s, t; t = -s; } --- $ dmd intprom.d intprom.d(6): Deprecation: integral promotion not done for -s, use '-transition=intpromote' switch or -cast(int)(s) What shall I do in order to

Re: Postgres and other database interfaces

2018-02-24 Thread Erik Smith via Digitalmars-d
On Saturday, 24 February 2018 at 18:56:23 UTC, Denis F wrote: On Saturday, 24 February 2018 at 05:45:45 UTC, rikki cattermole wrote: There is plenty of desire to build a generalized SQL interface for Phobos. But somebody needs to do it and it won't be all that much fun to do. I want to

Re: How do you get comfortable with Dlang.org's Forum?

2018-02-24 Thread Patrick Schluter via Digitalmars-d
On Saturday, 24 February 2018 at 18:46:50 UTC, Steven Schveighoffer wrote: On 2/24/18 7:00 AM, Patrick Schluter wrote: On Saturday, 24 February 2018 at 04:41:44 UTC, H. S. Teoh wrote: [...] Last week I saw a video showing how a forum was shutdown because it was alledgedly full of racists.

Re: Vibe.d no more using static this() {}

2018-02-24 Thread bauss via Digitalmars-d-learn
On Friday, 23 February 2018 at 23:11:13 UTC, aberba wrote: I recently noticed vibe.d now using main loop which call the vibe.d event loop. Why that change? I can only assume it's because static constructors are a pain in the ass. https://dlang.org/spec/module.html#order_of_static_ctor

Re: Postgres and other database interfaces

2018-02-24 Thread Denis F via Digitalmars-d
On Saturday, 24 February 2018 at 18:56:23 UTC, Denis F wrote: Postgres quarantiees that result of query will be immutable libpq, of course, not Postgres itself.

Re: Postgres and other database interfaces

2018-02-24 Thread Denis F via Digitalmars-d
On Saturday, 24 February 2018 at 05:45:45 UTC, rikki cattermole wrote: There is plenty of desire to build a generalized SQL interface for Phobos. But somebody needs to do it and it won't be all that much fun to do. I want to dwell on this. It seems to me that this is a common misconception

[Issue 13855] Allow multiple selective imports from different modules in a single import statement

2018-02-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13855 Steven Schveighoffer changed: What|Removed |Added Status|RESOLVED|REOPENED

Re: How do you get comfortable with Dlang.org's Forum?

2018-02-24 Thread Steven Schveighoffer via Digitalmars-d
On 2/24/18 7:00 AM, Patrick Schluter wrote: On Saturday, 24 February 2018 at 04:41:44 UTC, H. S. Teoh wrote: On Sat, Feb 24, 2018 at 04:18:29AM +, MattCoder via Digitalmars-d wrote: On Friday, 23 February 2018 at 13:47:16 UTC, biocyberman wrote: > 1. No post editing... You should be

[Issue 1839] Give D a modern varargs system that allows forwarding

2018-02-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1839 Martin Nowak changed: What|Removed |Added Status|ASSIGNED|RESOLVED CC|

Re: Postgres and other database interfaces

2018-02-24 Thread Denis F via Digitalmars-d
On Saturday, 24 February 2018 at 05:33:56 UTC, Joe wrote: 2. dpq2. Second most downloaded and built on top of derelict-pq. The "documentation" consists of a README listing the features and a single example, which appears to focus on support for JSON/BSON. Hi! Here is dpq2 and

Re: How do you get comfortable with Dlang.org's Forum?

2018-02-24 Thread Steven Schveighoffer via Digitalmars-d
On 2/24/18 1:18 AM, Nick Sabalausky (Abscissa) wrote: On 02/23/2018 10:18 AM, Steven Schveighoffer wrote: TB has these, though I prefer plain text. It supports a crude form of markdown, so *bold*, _underline_ all are enhanced by TB. Emoticons turn into graphics too ;) I turned those off

[Issue 18518] New: use stable names for multilib object files (to enable incremental update of archives)

2018-02-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18518 Issue ID: 18518 Summary: use stable names for multilib object files (to enable incremental update of archives) Product: D Version: D2 Hardware: All OS: All

Re: Postgres and other database interfaces

2018-02-24 Thread Joe via Digitalmars-d
On Saturday, 24 February 2018 at 15:44:49 UTC, Paolo Invernizzi wrote: Joe: I think this is also a terrific 'welcome aboard' about how fast and quickly things can be done in D! I'm a bit overwhelmed by all the replies and "goodies" but I'd like to say thanks to Adam while I digest it all.

Re: Postgres and other database interfaces

2018-02-24 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 24 February 2018 at 16:42:26 UTC, Adam D. Ruppe wrote: source viewer This now works: http://dpq.dpldocs.info/source/dpq.query.d.html#L29 the "see implementation" links lead to pages like that. You'll notice in the source view that many names are links. You can click on them to

Re: Postgres and other database interfaces

2018-02-24 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 24 February 2018 at 05:33:56 UTC, Joe wrote: The main issue is that, other than derelict-pq, using any of these libraries involves reading the library code and understanding the sui generis interfaces implemented by each. So often in threads like this I chime in to point out my

Re: Postgres and other database interfaces

2018-02-24 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 24 February 2018 at 16:41:09 UTC, Martin Tschierschke wrote: Please make a post to announce and place the direct link to it inside code.dlang.org :-) Well, I forgot to log errors on the server so I see a few generation failures and I'm not sure if it is because the code is

Re: Postgres and other database interfaces

2018-02-24 Thread Martin Tschierschke via Digitalmars-d
On Saturday, 24 February 2018 at 15:44:49 UTC, Paolo Invernizzi wrote: On Saturday, 24 February 2018 at 15:32:32 UTC, Adam D. Ruppe wrote: On Saturday, 24 February 2018 at 14:13:18 UTC, Joe wrote: [...] You can try going to http://any-dub-package.dpldocs.info [...] :-O Adam, you are the

Re: Postgres and other database interfaces

2018-02-24 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 24 February 2018 at 15:44:49 UTC, Paolo Invernizzi wrote: :-O Adam, you are the man! worship me! So I'm gonna tell you guys a dirty little secret: I intend to take the documentation throne by means of subterfuge. I've been generating docs for popular packages already but it

Re: countUntil to print all the index of a given string.

2018-02-24 Thread Vino via Digitalmars-d-learn
On Tuesday, 20 February 2018 at 08:50:27 UTC, Jonathan M Davis wrote: On Tuesday, February 20, 2018 08:44:37 aberba via Digitalmars-d-learn wrote: On Sunday, 18 February 2018 at 15:23:14 UTC, Cym13 wrote: > On Sunday, 18 February 2018 at 14:48:59 UTC, Cym13 wrote: >> [...] > > Just thought of a

Re: PackedAliasSeq?

2018-02-24 Thread John Colvin via Digitalmars-d
On Thursday, 22 February 2018 at 19:26:54 UTC, Andrei Alexandrescu wrote: After coding https://github.com/dlang/phobos/pull/6192 with AliasSeq, the experience has been quite pleasurable. However, in places the AliasSeq tends to expand too eagerly, leading to a need to "keep it together" e.g.

[Issue 18517] New: Import order is not invariant

2018-02-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18517 Issue ID: 18517 Summary: Import order is not invariant Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1

Re: Postgres and other database interfaces

2018-02-24 Thread Paolo Invernizzi via Digitalmars-d
On Saturday, 24 February 2018 at 15:32:32 UTC, Adam D. Ruppe wrote: On Saturday, 24 February 2018 at 14:13:18 UTC, Joe wrote: Again, coming from Python, I'm familiar with RTD So I actually just made this extension to my dpldocs website: http://ddb.dpldocs.info/ddb.postgres.html You can try

[Issue 18244] Generic functions in std.math cannot be overloaded

2018-02-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18244 hst...@quickfur.ath.cx changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED

Re: Postgres and other database interfaces

2018-02-24 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 24 February 2018 at 14:13:18 UTC, Joe wrote: Again, coming from Python, I'm familiar with RTD So I actually just made this extension to my dpldocs website: http://ddb.dpldocs.info/ddb.postgres.html You can try going to http://any-dub-package.dpldocs.info and it will try to

Re: Postgres and other database interfaces

2018-02-24 Thread bachmeier via Digitalmars-d
On Saturday, 24 February 2018 at 14:54:21 UTC, Martin Tschierschke wrote: I would even go so far 'force' people publishing to dub, to provide documentation. If no docs, present, than the libs should be marked as *docs missing*. (Beside the number of Github stars) If there's no

Where can get the strsafe.d by strsafe.h ? Thanks.

2018-02-24 Thread FrankLike via Digitalmars-d-learn
Hi,everyone, Now,I use some code in strsafe.h,but where can get the strsafe.d ? Thanks.

Re: Postgres and other database interfaces

2018-02-24 Thread Martin Tschierschke via Digitalmars-d
On Saturday, 24 February 2018 at 14:13:18 UTC, Joe wrote: On Saturday, 24 February 2018 at 10:13:35 UTC, Paolo Invernizzi [...] As I said, I'm new and still not familiar with those facilities although I saw those things and they looked like embedded HTML and was wondering what they were

Re: Double link list

2018-02-24 Thread ag0aep6g via Digitalmars-d-learn
On 02/24/2018 11:26 AM, TheFlyingFiddle wrote: On Saturday, 24 February 2018 at 09:48:13 UTC, Joel wrote: [...] void popFront() { head = head.next;  if (head !is null) head.prev = null; } void popBack() { tail = tail.prev; if (tail !is null) tail.next = null; } Head and tail will point to

Re: How to convert C macro to D? Thanks.

2018-02-24 Thread FrankLike via Digitalmars-d-learn
On Saturday, 24 February 2018 at 13:57:27 UTC, Adam D. Ruppe wrote: On Saturday, 24 February 2018 at 13:50:16 UTC, FrankLike wrote: #define IOCTL_NDIS_QUERY_GLOBAL_STATS _NDIS_CONTROL_CODE(0, METHOD_OUT_DIRECT) auto IOCTL_NDIS_QUERY_GLOBAL_STATS () { return _NDIS_CONTROL_CODE(0,

Re: Postgres and other database interfaces

2018-02-24 Thread Joe via Digitalmars-d
On Saturday, 24 February 2018 at 10:13:35 UTC, Paolo Invernizzi wrote: Have you tried to generate the documentation? Look for example inside the source files... https://github.com/pszturmaj/ddb/blob/bd55beea0df6e5da86a71535ff6d9800c0711c7c/source/ddb/postgres.d#L2

Re: How do you get comfortable with Dlang.org's Forum?

2018-02-24 Thread number via Digitalmars-d
On Friday, 23 February 2018 at 14:25:55 UTC, psychoticRabbit wrote: If there is one change that I would really like, it's dark theme I used to use Firefox Addon 'Colour That Site!' but its not available for current Firefox version. Today the built-in Reader Mode might just do it (click the

[Issue 18509] [Beta 2.079] lld-link.exe needs msvcp140.dll

2018-02-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18509 Martin Nowak changed: What|Removed |Added Status|NEW |RESOLVED

Re: How to convert C macro to D? Thanks.

2018-02-24 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 24 February 2018 at 13:50:16 UTC, FrankLike wrote: #define IOCTL_NDIS_QUERY_GLOBAL_STATS _NDIS_CONTROL_CODE(0, METHOD_OUT_DIRECT) use alias or enum,how to do? neither. those are little functions. auto IOCTL_NDIS_QUERY_GLOBAL_STATS () { return _NDIS_CONTROL_CODE(0,

How to convert C macro to D? Thanks.

2018-02-24 Thread FrankLike via Digitalmars-d-learn
Hi,everyone, I can convert some simple C macros, but a bit more complicated will need your help. For example: #define _NDIS_CONTROL_CODE(request,method) \ CTL_CODE(FILE_DEVICE_PHYSICAL_NETCARD, request, method, FILE_ANY_ACCESS) #define IOCTL_NDIS_QUERY_GLOBAL_STATS

Re: Postgres and other database interfaces

2018-02-24 Thread Kagamin via Digitalmars-d
On Saturday, 24 February 2018 at 05:33:56 UTC, Joe wrote: 3. vibe-d-postgresql. Third most downloaded and built on top of dpq2. Docs consist of a single example program. If you write docs and examples, I'd expect vibe to accept them, but ask them anyway.

2.079.0-beta.2 [Re: Beta 2.079.0]

2018-02-24 Thread Martin Nowak via Digitalmars-d-announce
On Monday, 19 February 2018 at 10:49:03 UTC, Martin Nowak wrote: http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.079.0.html Second beta is published now. The website build server has some issues, so the website update is still stuck for a while. You can see a changelog

Re: d.godbolt.org now supports DMD

2018-02-24 Thread Martin Nowak via Digitalmars-d-announce
On Friday, 23 February 2018 at 18:11:58 UTC, Seb wrote: https://godbolt.org/g/EQCTNy [1] https://github.com/mattgodbolt/compiler-explorer/issues/306 Great news, bad code ;).

Re: Anybody still using the chm docs

2018-02-24 Thread Seb via Digitalmars-d
On Saturday, 24 February 2018 at 11:23:17 UTC, notna wrote: On Thursday, 16 June 2016 at 02:32:05 UTC, Jack Stouffer wrote: On Wednesday, 15 June 2016 at 10:58:04 UTC, Martin Nowak wrote: So I'm wondering if in 2016 someone really needs an offline copy of a website shipped with a binary

Re: How to split a string to a 2D array

2018-02-24 Thread Seb via Digitalmars-d-learn
On Saturday, 24 February 2018 at 09:06:09 UTC, Domain wrote: On Saturday, 24 February 2018 at 08:59:46 UTC, Domain wrote: On Saturday, 24 February 2018 at 07:51:27 UTC, Domain wrote: [...] And why this not compile: rows.each!(a => data ~= a.split(",").map!(b => b.strip).padRight("", 2));

  1   2   >