Re: SegFault with HibernateD

2018-01-12 Thread Ali Çehreli via Digitalmars-d-learn
On 01/12/2018 06:50 PM, Venkat wrote: > Sorry about all these posts. Wish there were an edit button. That's ok. :) These are actually newsgroups (see NNTP protocol). Newsgroups don't have any edit functionality. The "forum" is just a web interface to newsgroups. Ali

Re: Using Postgres connection functions

2018-01-12 Thread Joe via Digitalmars-d-learn
Going beyond the connection, there are various other libpq functions that use a similar pattern of values passed using multiple parallel C arrays, e.g., PGresult *PQexecParams(PGconn *conn, const char *command, int nParams,

Re: [howto] Serve ddox documentation on github.io deployed by Travis CI

2018-01-12 Thread Seb via Digitalmars-d-announce
On Saturday, 13 January 2018 at 04:59:25 UTC, Martin Nowak wrote: On Wednesday, 10 January 2018 at 08:50:37 UTC, Bastiaan Veelo wrote: [...] What do you mean with "taking care of it"? It's a bit of a hen and egg problem, first you need a project before you can register it with

Re: [howto] Serve ddox documentation on github.io deployed by Travis CI

2018-01-12 Thread Martin Nowak via Digitalmars-d-announce
On Wednesday, 10 January 2018 at 08:50:37 UTC, Bastiaan Veelo wrote: Maybe worthwile to add this scaffolding to dub or some other tool? Anyone volunteering? This could be a good idea. Probably even better is to let code.dlang.org take care of it, which would make the whole token issue and

Re: Using Postgres connection functions

2018-01-12 Thread Joe via Digitalmars-d-learn
On Saturday, 13 January 2018 at 04:26:06 UTC, Adam D. Ruppe wrote: If and only if the values are known at compile time, you can do: const char** keywords = ["hostaddr".ptr, "port".ptr, "dbname".ptr, null].ptr; or even do it inline: PQconnectdbParams(["hostaddr".ptr, "port".ptr,

Re: Using Postgres connection functions

2018-01-12 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 13 January 2018 at 04:17:02 UTC, Joe wrote: It only compiled after I removed the second 'const' in the first and second arguments. Yeah, D's const applies down the chain automatically, so you don't write it twice there. string[] keywords = ["hostaddr", "port", "dbname"];

Using Postgres connection functions

2018-01-12 Thread Joe via Digitalmars-d-learn
I'm trying to learn how to use D to connect (and send queries) to Postgres, i.e., libpq in C. Postgres has three families of connection functions: PQsetdbLogin which takes multiple individual arguments (all as const char *), PQconnectdb which takes a single connection string (which Postgres

Re: Some Observations on the D Development Process

2018-01-12 Thread Walter Bright via Digitalmars-d
On 1/9/2018 6:53 PM, Mike Franklin wrote: I couldn't find any cases like that. If you know of them, please explicitly identify them for me. I already fixed them.

Re: continue in static foreach

2018-01-12 Thread Seb via Digitalmars-d-learn
On Saturday, 13 January 2018 at 01:07:24 UTC, Marc wrote: On Friday, 12 January 2018 at 22:03:53 UTC, H. S. Teoh wrote: On Fri, Jan 12, 2018 at 10:03:40PM +, Marc via Digitalmars-d-learn wrote: How do I use? > static foreach(enum string member; members) { >static

Re: Tuple DIP

2018-01-12 Thread jmh530 via Digitalmars-d
On Saturday, 13 January 2018 at 02:15:37 UTC, Basile B. wrote: On Saturday, 13 January 2018 at 02:08:03 UTC, jmh530 wrote: [snip] Also, Proposal 1 starts with this example auto (a, b) = tuple(1, "2"); (int a, string b) = tuple(1, "2"); but it also looks natural to be able to write (int, string)

Re: SegFault with HibernateD

2018-01-12 Thread Venkat via Digitalmars-d-learn
Sorry about all these posts. Wish there were an edit button. I meant PreparedStatement in mysqlddbc driver, not HibernateD.

Re: SegFault with HibernateD

2018-01-12 Thread Venkat via Digitalmars-d-learn
I think there is a bug with PreparedStatement class in HibernateD. ddbc fails when I use a PreparedStatement. The code below shows that. I will create an issue with HibernateD. int main(string[] args) { string url = "mysql://localhost:3306/webmarx?user=webmarx_dev,password=webm@rx";

Re: Tuple DIP

2018-01-12 Thread Basile B. via Digitalmars-d
On Saturday, 13 January 2018 at 02:18:20 UTC, Basile B. wrote: On Saturday, 13 January 2018 at 02:15:37 UTC, Basile B. wrote: On Saturday, 13 January 2018 at 02:08:03 UTC, jmh530 wrote: [...] Really ? After the type should be the declarator. In this example there's no declarator but if you

Re: Tuple DIP

2018-01-12 Thread Basile B. via Digitalmars-d
On Saturday, 13 January 2018 at 02:08:03 UTC, jmh530 wrote: On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote: As promised [1], I have started setting up a DIP to improve tuple ergonomics in D: [snip] I'm glad you're working on this. Proposal 1 is a little terse in explaining

Re: Tuple DIP

2018-01-12 Thread Basile B. via Digitalmars-d
On Saturday, 13 January 2018 at 02:15:37 UTC, Basile B. wrote: On Saturday, 13 January 2018 at 02:08:03 UTC, jmh530 wrote: On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote: As promised [1], I have started setting up a DIP to improve tuple ergonomics in D: [snip] I'm glad you're

Re: Tuple DIP

2018-01-12 Thread jmh530 via Digitalmars-d
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote: As promised [1], I have started setting up a DIP to improve tuple ergonomics in D: [snip] I'm glad you're working on this. Proposal 1 is a little terse in explaining what you mean by unpacking AliasSeqs. You might explain it in a

Re: Tuple DIP

2018-01-12 Thread SrMordred via Digitalmars-d
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote: As promised [1], I have started setting up a DIP to improve +1, please.

Re: Another take on decimal data types

2018-01-12 Thread rumbu via Digitalmars-d-announce
On Friday, 12 January 2018 at 13:09:42 UTC, kdevel wrote: $ dmd nosine.d decimal.git/libdecimal.a decimal/package.d(10505): Error: undefined identifier decimalCapAngle Sorry, broke some code when I made the split. Now it's working.

Re: Tuple DIP

2018-01-12 Thread rikki cattermole via Digitalmars-d
On 12/01/2018 10:44 PM, Timon Gehr wrote: As promised [1], I have started setting up a DIP to improve tuple ergonomics in D: https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md This DIP aims to make code like the following valid D: --- auto (a, b) = (1, 2); (int a, int b) =

Re: continue in static foreach

2018-01-12 Thread Marc via Digitalmars-d-learn
On Friday, 12 January 2018 at 22:03:53 UTC, H. S. Teoh wrote: On Fri, Jan 12, 2018 at 10:03:40PM +, Marc via Digitalmars-d-learn wrote: How do I use? > static foreach(enum string member; members) { >static if(isFunction!(__traits(getMember, C, member))) { >

Re: SegFault with HibernateD

2018-01-12 Thread Venkat via Digitalmars-d-learn
On Friday, 12 January 2018 at 08:55:13 UTC, Rene Zwanenburg wrote: Hard to guess what the issue is, I'd attach a debugger to see where it crashes. It fails at the sql() method in Command struct in mysql-native-1.1.4/mysql-native/source/mysql/commands.d. This is what gdb says when I do a disp

Re: Tuple DIP

2018-01-12 Thread Timon Gehr via Digitalmars-d
On 13.01.2018 01:20, Mark wrote: Could we also support function tuples? In principle, yes, though I imagine it is a lot harder to argue for its inclusion than for that of the features currently proposed in the DIP, because existing language features already come rather close. For

Re: Tuple DIP

2018-01-12 Thread Rubn via Digitalmars-d
Should include an example of returning a tuple from a function. I know one of the pains with variadic templates is that they can't be returned. So maybe something that goes over the following use case: auto returnTuple(Args...)(Args args) { return args; } (int a, float b) =

Re: SegFault with HibernateD

2018-01-12 Thread Venkat via Digitalmars-d-learn
On Friday, 12 January 2018 at 12:41:34 UTC, Mike Parker wrote: I see now. I glossed right over that execution output. On Windows, I don't recall ever seeing a dub exception from dub from a segfault. Just checked by accessing a null pointer and there's nothing thrown from dub. Is that a Linux

Re: Tuple DIP

2018-01-12 Thread Chris M. via Digitalmars-d
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote: As promised [1], I have started setting up a DIP to improve tuple ergonomics in D: [...] Yes please

Re: Tuple DIP

2018-01-12 Thread Timon Gehr via Digitalmars-d
On 13.01.2018 00:16, Basile B. wrote: On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote: As promised [1], I have started setting up a DIP to improve tuple ergonomics in D: https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md markdown trick: you can use ```diff ```

Re: Tuple DIP

2018-01-12 Thread Mark via Digitalmars-d
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote: As promised [1], I have started setting up a DIP to improve tuple ergonomics in D: https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md This DIP aims to make code like the following valid D: --- auto (a, b) = (1,

[Issue 18233] building with -m64 doesn't work with sc.ini from the zip distribution and VS2017

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18233 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/e9b2864e1b0f59415045533423c64447b3e468aa fix issue 18233 - building with -m64 doesn't work with sc.ini

[Issue 18233] building with -m64 doesn't work with sc.ini from the zip distribution and VS2017

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18233 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: The name "Phobos" in user-facing docs

2018-01-12 Thread ag0aep6g via Digitalmars-d
On 01/12/2018 11:26 PM, Michael wrote: Tango was the original, and Phobos was introduced for D2 as a competing library. Phobos is the original. In D1, Tango was an alternative standard library. With D2, you have Phobos as the standard library and you can use Tango on top of it.

Re: The name "Phobos" in user-facing docs

2018-01-12 Thread John Gabriele via Digitalmars-d
On Friday, 12 January 2018 at 22:24:16 UTC, Dukc wrote: On Friday, 12 January 2018 at 21:24:40 UTC, John Gabriele wrote: 1. It has its own name. Phobos. This is unusual. I don't know of any other language who's std lib has any name other than "the {lang} standard library". Why does it have

Re: Tuple DIP

2018-01-12 Thread Basile B. via Digitalmars-d
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote: As promised [1], I have started setting up a DIP to improve tuple ergonomics in D: https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md markdown trick: you can use ```diff ``` for a nicer grammar section.

Re: Tuple DIP

2018-01-12 Thread Timon Gehr via Digitalmars-d
On 12.01.2018 23:44, Timon Gehr wrote: --- auto (a, b) = (1, 2); (int a, int b) = (1, 2); --- (The two lines are two independent examples :o).)

Re: Tuple DIP

2018-01-12 Thread Timon Gehr via Digitalmars-d
On 12.01.2018 23:44, Timon Gehr wrote: ... Before going ahead with it, I'd like some preliminary community input: ... Also, if you have more links to forum posts requesting related features, that would be useful (googling turned up the ones that are in the DIP, but I know that there were

Tuple DIP

2018-01-12 Thread Timon Gehr via Digitalmars-d
As promised [1], I have started setting up a DIP to improve tuple ergonomics in D: https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md This DIP aims to make code like the following valid D: --- auto (a, b) = (1, 2); (int a, int b) = (1, 2); --- --- foreach((sum, diff); [(1,

Re: The name "Phobos" in user-facing docs

2018-01-12 Thread Michael via Digitalmars-d
On Friday, 12 January 2018 at 22:26:38 UTC, Michael wrote: On Friday, 12 January 2018 at 21:24:40 UTC, John Gabriele wrote: [...] I mean, you're correct to say it's an artifact of D being an old language. Tango was the original, and Phobos was introduced for D2 as a competing library. I

Re: The name "Phobos" in user-facing docs

2018-01-12 Thread Tony via Digitalmars-d
I had similar feelings when starting out with D - "why don't they say "standard library" instead of "Phobos"? I don't know that it would change D's image, but I think it would be better for newcomers if they only saw "standard library".

Re: The name "Phobos" in user-facing docs

2018-01-12 Thread Michael via Digitalmars-d
On Friday, 12 January 2018 at 21:24:40 UTC, John Gabriele wrote: After having started learning some D lately, two things about the standard library have struck me: 1. It has its own name. Phobos. This is unusual. I don't know of any other language who's std lib has any name other than "the

Re: The name "Phobos" in user-facing docs

2018-01-12 Thread Dukc via Digitalmars-d
On Friday, 12 January 2018 at 21:24:40 UTC, John Gabriele wrote: 1. It has its own name. Phobos. This is unusual. I don't know of any other language who's std lib has any name other than "the {lang} standard library". Why does it have its own distinct name, and why do I (as a user) need to

Re: continue in static foreach

2018-01-12 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Jan 12, 2018 at 10:03:40PM +, Marc via Digitalmars-d-learn wrote: > How do I use? > > > static foreach(enum string member; members) { > > static if(isFunction!(__traits(getMember, C, member))) { > > continue; > > } >

continue in static foreach

2018-01-12 Thread Marc via Digitalmars-d-learn
How do I use? static foreach(enum string member; members) { static if(isFunction!(__traits(getMember, C, m ember))) { continue; } give error: must use labeled continue within static foreach then I tried:

The name "Phobos" in user-facing docs

2018-01-12 Thread John Gabriele via Digitalmars-d
After having started learning some D lately, two things about the standard library have struck me: 1. It has its own name. Phobos. This is unusual. I don't know of any other language who's std lib has any name other than "the {lang} standard library". Why does it have its own distinct name,

Re: Some Observations on the D Development Process

2018-01-12 Thread Ali Çehreli via Digitalmars-d
On 01/11/2018 02:15 PM, Johan Engelen wrote: And I've been working for a long time on a fuzzing article. It's almost done! - Johan A fuzzy font would suit that article. :o) Ali

Re: How to move an associative array between modules?

2018-01-12 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Jan 12, 2018 at 08:46:50PM +, WhatMeWorry via Digitalmars-d-learn wrote: [...] > I hate to keep being a bother, but my project with the below static > this() now compiles fine, but aborts during runtime with a "a problem > caused the program to stop working ..." Is there a way to get

Re: How to move an associative array between modules?

2018-01-12 Thread WhatMeWorry via Digitalmars-d-learn
On Thursday, 11 January 2018 at 23:29:30 UTC, Adam D. Ruppe wrote: On Thursday, 11 January 2018 at 23:20:44 UTC, WhatMeWorry wrote: When I simply move the array out of main() but still in app.d, the compiler returns Error: expression ["SCRATCH":Track("scratch.wav", cast(Sound)1, 0, null),...

Re: union/toString: crash/segfault: What's happening here?

2018-01-12 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Jan 12, 2018 at 10:49:45AM -0800, H. S. Teoh via Digitalmars-d-learn wrote: > On Fri, Jan 12, 2018 at 11:09:47AM +, kdevel via Digitalmars-d-learn > wrote: > [...] [...] > > https://issues.dlang.org/show_bug.cgi?id=18232 > > Yep, definitely a codegen bug. Apparently, local

[Issue 18232] Union methods fail to initialize local variables to .init

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18232 hst...@quickfur.ath.cx changed: What|Removed |Added Keywords||pull --- Comment #5 from

Re: Bump the minimal version required to compile DMD to 2.076.1

2018-01-12 Thread Thomas Mader via Digitalmars-d
On Friday, 12 January 2018 at 16:13:39 UTC, Seb wrote: Motivation -- 1) It's required for Walter's work on using -betterC for the backend conversion: https://github.com/dlang/dmd/pull/6907 2) We start to run into random failures lately, e.g.

Re: Why is this valued zeroed?

2018-01-12 Thread Marc via Digitalmars-d-learn
On Friday, 12 January 2018 at 05:14:12 UTC, Jonathan M Davis wrote: On Thursday, January 11, 2018 14:07:18 Ali Çehreli via Digitalmars-d-learn wrote: [...] And if all what you're doing is printing the value out, you might as well just print the Duration directly rather than calling total.

[Issue 18232] Union methods fail to initialize local variables to .init

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18232 --- Comment #4 from hst...@quickfur.ath.cx --- More interesting clues: running a union method inside CTFE containing a local variable without an explicit initializer causes a CTFE error "cannot modify variable at compile time", whereas explicitly

Re: union/toString: crash/segfault: What's happening here?

2018-01-12 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Jan 12, 2018 at 11:09:47AM +, kdevel via Digitalmars-d-learn wrote: [...] > On Friday, 12 January 2018 at 02:16:39 UTC, Adam D. Ruppe wrote: [...] > > I'd file this as a compiler codegen bug. > > https://issues.dlang.org/show_bug.cgi?id=18232 Yep, definitely a codegen bug.

Re: Release D 2.078.0

2018-01-12 Thread Andre Pany via Digitalmars-d-announce
On Friday, 12 January 2018 at 18:25:37 UTC, Rainer Schuetze wrote: IMO removing the detected entries from sc.ini should be good enough: https://github.com/dlang/dmd/pull/7686. The linker path is built from the other VC variables. I've based it on stable in the hope it will make it into

Re: Possible dmd 2.078 regression ?

2018-01-12 Thread Basile B. via Digitalmars-d-learn
On Friday, 12 January 2018 at 18:50:10 UTC, Basile B. wrote: On Friday, 12 January 2018 at 17:58:30 UTC, Stefan Koch wrote: On Friday, 12 January 2018 at 14:13:22 UTC, Basile B. wrote: I have a simple program that only compiles if the dependency is not pre-compiled as a static library. It

Re: Bump the minimal version required to compile DMD to 2.076.1

2018-01-12 Thread Joakim via Digitalmars-d
On Friday, 12 January 2018 at 17:17:02 UTC, Seb wrote: On Friday, 12 January 2018 at 16:50:21 UTC, Joakim wrote: On Friday, 12 January 2018 at 16:13:39 UTC, Seb wrote: Motivation -- 1) It's required for Walter's work on using -betterC for the backend conversion:

[Issue 18232] Union methods fail to initialize local variables to .init

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18232 --- Comment #3 from hst...@quickfur.ath.cx --- Minimized code: -- union U { int method() { int x; return x; } } -- The disassembly shows that x is never initialized to 0, and a garbage value is returned. --

[Issue 18232] Union methods fail to initialize local variables to .init

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18232 hst...@quickfur.ath.cx changed: What|Removed |Added Summary|string variable in toString |Union methods fail to

Re: Release D 2.078.0

2018-01-12 Thread Rainer Schuetze via Digitalmars-d-announce
On 12.01.2018 12:42, Andre Pany wrote: On Monday, 8 January 2018 at 22:41:31 UTC, Rainer Schuetze wrote: Unfortunately the corresponding installer PRs didn't make it into the release, so you still have to remove most options of section Environment64 from sc.ini yourself. This should be

[Issue 18232] string variable in toString method of Union: invalid code (crash/segfault)

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18232 --- Comment #2 from hst...@quickfur.ath.cx --- Note also, the name `toString` is irrelevant to this bug. The same codegen bug appears if you rename the method to something else, like 'member'. Furthermore, the local variable doesn't have to be a

[Issue 18233] building with -m64 doesn't work with sc.ini from the zip distribution and VS2017

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18233 Rainer Schuetze changed: What|Removed |Added Keywords||pull --- Comment #1

[Issue 18232] string variable in toString method of Union: invalid code (crash/segfault)

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18232 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --- Comment

[Issue 18233] New: building with -m64 doesn't work with sc.ini from the zip distribution and VS2017

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18233 Issue ID: 18233 Summary: building with -m64 doesn't work with sc.ini from the zip distribution and VS2017 Product: D Version: D2 Hardware: x86_64 OS: Windows

Re: Possible dmd 2.078 regression ?

2018-01-12 Thread Stefan Koch via Digitalmars-d-learn
On Friday, 12 January 2018 at 14:13:22 UTC, Basile B. wrote: I have a simple program that only compiles if the dependency is not pre-compiled as a static library. It worked fine before. Please test this --- if [ ! -d "iz" ]; then git clone https://www.github.com/BBasile/iz.git fi cd

[Issue 18193] module config is in file 'rt/config.d' which cannot be read

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18193 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/10afa6944bb3ac479cbcabc5499a86136907b95f Fix issue 18193 - module config is in file

Re: Bump the minimal version required to compile DMD to 2.076.1

2018-01-12 Thread Seb via Digitalmars-d
On Friday, 12 January 2018 at 16:50:21 UTC, Joakim wrote: On Friday, 12 January 2018 at 16:13:39 UTC, Seb wrote: Motivation -- 1) It's required for Walter's work on using -betterC for the backend conversion: https://github.com/dlang/dmd/pull/6907 Not really, he just wants to

Re: Bump the minimal version required to compile DMD to 2.076.1

2018-01-12 Thread Jonathan Marler via Digitalmars-d
On Friday, 12 January 2018 at 16:50:21 UTC, Joakim wrote: On Friday, 12 January 2018 at 16:13:39 UTC, Seb wrote: 2) We start to run into random failures lately, e.g. https://github.com/braddr/d-tester/issues/63 https://github.com/dlang/dmd/pull/7569#issuecomment-356992048 Seem like issues

Re: invalid or corrupt file: duplicate COMDAT / Previous Definition Different

2018-01-12 Thread Anonymouse via Digitalmars-d-learn
On Wednesday, 10 January 2018 at 20:53:24 UTC, Anonymouse wrote: None of the (version specifiers in the) build configurations I have touch upon the part of the fairly innocent code mentioned in the error message, if I'm reading it right.

Re: Bump the minimal version required to compile DMD to 2.076.1

2018-01-12 Thread Joakim via Digitalmars-d
On Friday, 12 January 2018 at 16:13:39 UTC, Seb wrote: Motivation -- 1) It's required for Walter's work on using -betterC for the backend conversion: https://github.com/dlang/dmd/pull/6907 Not really, he just wants to dogfood betterC on the dmd backend when it's ported to D. 2)

Re: Can you introspect predicate arity and if it's an equality predicate?

2018-01-12 Thread Seb via Digitalmars-d-learn
On Friday, 12 January 2018 at 13:04:30 UTC, aliak wrote: On Friday, 12 January 2018 at 10:55:53 UTC, Seb wrote: On Friday, 12 January 2018 at 00:16:07 UTC, aliak wrote: Hi, so basically is there a way to: void func(alias pred = null, Range)(Range range) { // 1) check if

Re: Bump the minimal version required to compile DMD to 2.076.1

2018-01-12 Thread Seb via Digitalmars-d
On Friday, 12 January 2018 at 16:21:25 UTC, Stefan Koch wrote: On Friday, 12 January 2018 at 16:13:39 UTC, Seb wrote: Motivation -- 1) It's required for Walter's work on using -betterC for the backend conversion: https://github.com/dlang/dmd/pull/6907 2) We start to run into random

Re: Bump the minimal version required to compile DMD to 2.076.1

2018-01-12 Thread Stefan Koch via Digitalmars-d
On Friday, 12 January 2018 at 16:13:39 UTC, Seb wrote: Motivation -- 1) It's required for Walter's work on using -betterC for the backend conversion: https://github.com/dlang/dmd/pull/6907 2) We start to run into random failures lately, e.g.

Bump the minimal version required to compile DMD to 2.076.1

2018-01-12 Thread Seb via Digitalmars-d
Motivation -- 1) It's required for Walter's work on using -betterC for the backend conversion: https://github.com/dlang/dmd/pull/6907 2) We start to run into random failures lately, e.g. https://github.com/braddr/d-tester/issues/63

Re: Proposal for a standard Decimal type in alpha

2018-01-12 Thread Jack Stouffer via Digitalmars-d-announce
On Thursday, 21 December 2017 at 13:59:28 UTC, Jack Stouffer wrote: ... While I believe my library has certain API advantages, I'm really not interested in duplicating a bunch of work when rumbu's version is pretty much complete, so I'm dropping this.

Re: Exposing pred from SortedRange and changes to algorithms that assumeSorted

2018-01-12 Thread aliak via Digitalmars-d
On Friday, 12 January 2018 at 10:53:04 UTC, Seb wrote: canFind uses find internally, which already has a shortcut for SortedRange. I don't like contains either, but the idea was to have a separate method with different performance guarantees as canFind is typically O(n). Anyways I have tried

Possible dmd 2.078 regression ?

2018-01-12 Thread Basile B. via Digitalmars-d-learn
I have a simple program that only compiles if the dependency is not pre-compiled as a static library. It worked fine before. Please test this --- if [ ! -d "iz" ]; then git clone https://www.github.com/BBasile/iz.git fi cd iz/scripts sh compile.sh cd ../ #fails to link dmd

Re: Another take on decimal data types

2018-01-12 Thread Joakim via Digitalmars-d-announce
On Thursday, 11 January 2018 at 22:07:42 UTC, H. S. Teoh wrote: On Thu, Jan 11, 2018 at 04:38:57PM -0500, Steven Schveighoffer via Digitalmars-d-announce wrote: On 1/11/18 4:12 PM, kdevel wrote: > On Thursday, 11 January 2018 at 20:40:01 UTC, Dmitry > Olshansky wrote: > > What did you expect?

[Issue 17462] Order of base interfaces affects compiler behavior

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17462 RazvanN changed: What|Removed |Added CC|

[Issue 17462] Order of base interfaces affects compiler behavior

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17462 RazvanN changed: What|Removed |Added Severity|enhancement |normal --

Re: Another take on decimal data types

2018-01-12 Thread kdevel via Digitalmars-d-announce
On Monday, 8 January 2018 at 22:16:25 UTC, rumbu wrote: - all std.math functions implemented (even logarithms and trigonometry); nosine.d ``` import std.stdio; // import std.math; import decimal; void nosine (T) () { T d = T(1.1); writeln (sin(d)); } void main () { nosine!decimal32;

Re: Floating Point Literals: float (f) and real (L) suffix issue

2018-01-12 Thread Simen Kjærås via Digitalmars-d-learn
On Friday, 12 January 2018 at 12:57:37 UTC, kdevel wrote: On Friday, 12 January 2018 at 12:45:59 UTC, kdevel wrote: suffix.d ``` void main () { real r = 1.L; float f = 1.f; } ``` $ dmd suffix.d suffix.d(3): Error: no property 'L' for type 'int' suffix.d(4): Error: no property 'f' for

Re: Can you introspect predicate arity and if it's an equality predicate?

2018-01-12 Thread aliak via Digitalmars-d-learn
On Friday, 12 January 2018 at 10:55:53 UTC, Seb wrote: On Friday, 12 January 2018 at 00:16:07 UTC, aliak wrote: Hi, so basically is there a way to: void func(alias pred = null, Range)(Range range) { // 1) check if pred(ElementType!Range.init, ElementType!Range.init) is equality // 2)

Re: Can you introspect predicate arity and if it's an equality predicate?

2018-01-12 Thread aliak via Digitalmars-d-learn
On Friday, 12 January 2018 at 08:18:02 UTC, Simen Kjærås wrote: On Friday, 12 January 2018 at 00:16:07 UTC, aliak wrote: Hi, so basically is there a way to: void func(alias pred = null, Range)(Range range) { // 1) check if pred(ElementType!Range.init, ElementType!Range.init) is equality

Re: Floating Point Literals: float (f) and real (L) suffix issue

2018-01-12 Thread kdevel via Digitalmars-d-learn
On Friday, 12 January 2018 at 12:45:59 UTC, kdevel wrote: suffix.d ``` void main () { real r = 1.L; float f = 1.f; } ``` $ dmd suffix.d suffix.d(3): Error: no property 'L' for type 'int' suffix.d(4): Error: no property 'f' for type 'int' According to the grammar in

Re: Another take on decimal data types

2018-01-12 Thread kdevel via Digitalmars-d-announce
On Friday, 12 January 2018 at 05:18:15 UTC, rumbu wrote: On Thursday, 11 January 2018 at 23:57:29 UTC, kdevel wrote: What about the failed comparison: You are right in fact, there is also a failed comparison. Now corrected. Works. Thanks for the changes!

Floating Point Literals: float (f) and real (L) suffix issue

2018-01-12 Thread kdevel via Digitalmars-d-learn
suffix.d ``` void main () { real r = 1.L; float f = 1.f; } ``` $ dmd suffix.d suffix.d(3): Error: no property 'L' for type 'int' suffix.d(4): Error: no property 'f' for type 'int' According to the grammar in dmd2/html/d/spec/lex.html both are valid FloatLiterals. Any comments?

[Issue 18232] string variable in toString method of Union: invalid code (crash/segfault)

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18232 ag0ae...@gmail.com changed: What|Removed |Added Keywords||wrong-code CC|

Re: SegFault with HibernateD

2018-01-12 Thread Mike Parker via Digitalmars-d-learn
On Friday, 12 January 2018 at 08:55:13 UTC, Rene Zwanenburg wrote: It looks to me like the program is being run through dub, and dub is just reporting the program's exit code. I see now. I glossed right over that execution output. On Windows, I don't recall ever seeing a dub exception

Re: Is old style compile-time foreach redundant?

2018-01-12 Thread Seb via Digitalmars-d-learn
On Sunday, 7 January 2018 at 02:17:02 UTC, Stefan Koch wrote: On Sunday, 7 January 2018 at 01:08:44 UTC, H. S. Teoh wrote: On Sun, Jan 07, 2018 at 12:55:27AM +, Stefan Koch via Digitalmars-d-learn wrote: On Saturday, 6 January 2018 at 23:25:58 UTC, Ali Çehreli wrote: > Is 'static foreach'

Re: Release D 2.078.0

2018-01-12 Thread Andre Pany via Digitalmars-d-announce
On Monday, 8 January 2018 at 22:41:31 UTC, Rainer Schuetze wrote: Unfortunately the corresponding installer PRs didn't make it into the release, so you still have to remove most options of section Environment64 from sc.ini yourself. This should be enough [Environment64] LIB=%@P%\..\lib64

Re: Can you introspect predicate arity and if it's an equality predicate?

2018-01-12 Thread cuxu via Digitalmars-d-learn
мinterest Ask. our service https://reviews-up.com/android-app-reviews/ with the help of specialists will help you in promoting your application and solving this issue

Re: Release D 2.078.0

2018-01-12 Thread Andre Pany via Digitalmars-d-announce
On Friday, 12 January 2018 at 10:13:13 UTC, Leandro Lucarella wrote: From what I saw in the code, I think what it does is just override where the code was actually placed when you compiled, so tools to visualize the coverage can show you the source code. *

Re: union/toString: crash/segfault: What's happening here?

2018-01-12 Thread kdevel via Digitalmars-d-learn
Thanks for the quick answer! On Friday, 12 January 2018 at 02:16:39 UTC, Adam D. Ruppe wrote: On Friday, 12 January 2018 at 00:54:03 UTC, kdevel wrote: $ dmd crash.d $ ./crash Nicholas Wilson is right that you can use = "" to work around it, but with strings, null is supposed to behave the

[Issue 18232] New: string variable in toString method of Union: invalid code (crash/segfault)

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18232 Issue ID: 18232 Summary: string variable in toString method of Union: invalid code (crash/segfault) Product: D Version: D2 Hardware: x86_64 OS: Linux

[Issue 18231] New: multiwayMerge could be optimized

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18231 Issue ID: 18231 Summary: multiwayMerge could be optimized Product: D Version: D2 Hardware: x86_64 OS: All Status: NEW Severity: enhancement Priority:

[Issue 18230] multiwayUnion sets wrong pred lambdas

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18230 Seb changed: What|Removed |Added OS|Linux |All --

[Issue 18230] New: multiwayUnion sets wrong pred lambdas

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18230 Issue ID: 18230 Summary: multiwayUnion sets wrong pred lambdas Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement

Re: Can you introspect predicate arity and if it's an equality predicate?

2018-01-12 Thread Seb via Digitalmars-d-learn
On Friday, 12 January 2018 at 00:16:07 UTC, aliak wrote: Hi, so basically is there a way to: void func(alias pred = null, Range)(Range range) { // 1) check if pred(ElementType!Range.init, ElementType!Range.init) is equality // 2) check if isUnary!pred // 3) check if isBinary!pred }

Re: Exposing pred from SortedRange and changes to algorithms that assumeSorted

2018-01-12 Thread Seb via Digitalmars-d
On Friday, 12 January 2018 at 09:52:36 UTC, aliak wrote: Would it be an acceptable enhancement to phobos to expose the predicate in SortedRange (https://dlang.org/library/std/range/sorted_range.html)? The rationale behind it would be so that functions like setDifference

Re: Release D 2.078.0

2018-01-12 Thread Leandro Lucarella via Digitalmars-d-announce
On Wednesday, 10 January 2018 at 05:35:05 UTC, Andre Pany wrote: On Wednesday, 3 January 2018 at 17:43:36 UTC, Martin Nowak wrote: Glad to announce D 2.078.0. This release comes with runtime detection of Visual Studio installation paths, an integral promotion transition for unary operations

[Issue 18218] __traits(isDeprecated, creal) should return true

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18218 --- Comment #1 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/18accb5d8dc4edc4afcf45d72897f774e08f7431 Fix Issue 18218 - __traits(isDeprecated, creal) should return

[Issue 18218] __traits(isDeprecated, creal) should return true

2018-01-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18218 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

  1   2   >