Re: D2 port of Sociomantic CDGC available for early experiments

2014-10-14 Thread Regan Heath via Digitalmars-d-announce
On Sat, 11 Oct 2014 01:45:48 +0100, Leandro Lucarella l...@llucax.com.ar wrote: Walter Bright, el 9 de October a las 17:28 me escribiste: On 10/9/2014 7:25 AM, Dicebot wrote: At the same time I don't see what real benefit such runtime options brings to the table. This is why in my PR

Re: D2 (Debian) + MSSQL

2014-10-14 Thread Sergey via Digitalmars-d
On Tuesday, 14 October 2014 at 04:46:19 UTC, Sergey wrote: I try to do in this: D version: http://pastebin.com/7tGyytDh Tds file: http://pastebin.com/JCA8XQH0 C version: http://pastebin.com/FWJM4B6X First I checked the C version. When I did this: $ gcc -o connect_mssql connect_mssql.c I got

Re: UFCS in C++

2014-10-14 Thread Jacob Carlborg via Digitalmars-d
On 14/10/14 03:55, Steven Schveighoffer wrote: The concept is in D1 for arrays since as long as I've ever used D. As far as I recall, it was an accidental feature of arrays and perhaps associative arrays. Might be a bit hard to track down that. -- /Jacob Carlborg

Re: D2 (Debian) + MSSQL

2014-10-14 Thread Jacob Carlborg via Digitalmars-d
On 14/10/14 08:11, Sergey wrote: Wrong, I need to have: $ dmd test_tds_connect.d tds.d You can use rdmd to compile and run an application: $ rdmd test_tds_connect.d It will automatically find all (D) dependencies for test_tds_connect and compile those as well. But you still need to link

Re: Parameterized unit testing and benchmarking of phobos

2014-10-14 Thread Martin Nowak via Digitalmars-d
On 10/08/2014 11:37 PM, Robert burner Schadek wrote: Lately, I find myself wondering, if I should add parameterized unit tests to std.string, because the last few bugs I fixed where not caught by tests, as the test-data was not good enough. I know random data is not perfect either, but it would

Re: Worse is better?

2014-10-14 Thread via Digitalmars-d
On Tuesday, 14 October 2014 at 01:36:08 UTC, Dicebot wrote: Templates are absolutely critical for any new system level programming language for me to even consider it. I had my share of pain emulating those in plain C and don't want to ever do it again. But maybe you don't really do low

Re: Worse is better?

2014-10-14 Thread Dicebot via Digitalmars-d
On Tuesday, 14 October 2014 at 07:25:59 UTC, Ola Fosheim Grøstad wrote: But maybe you don't really do low level programming then? In which areas of low level programming are templates critical? I have trouble finding examples where I have used it or seen it used for anything non-trivial in

Re: Worse is better?

2014-10-14 Thread Walter Bright via Digitalmars-d
On 10/14/2014 1:00 AM, Dicebot wrote: Templates are not about low level or high level of domain. It is a tool to reduce code redundancy and simplify maintenance of large code base. I am not even speaking about algorithms in STL or std.algorithm sense but much more routine things - common small

Re: Parameterized unit testing and benchmarking of phobos

2014-10-14 Thread Robert burner Schadek via Digitalmars-d
On Tuesday, 14 October 2014 at 06:54:42 UTC, Martin Nowak wrote: On 10/08/2014 11:37 PM, Robert burner Schadek wrote: Lately, I find myself wondering, if I should add parameterized unit tests to std.string, because the last few bugs I fixed where not caught by tests, as the test-data was not

Re: Windows drivers written in D

2014-10-14 Thread Dan Olson via Digitalmars-d
eles eles...@gzk.dot writes: On Monday, 13 October 2014 at 23:28:05 UTC, Piotrek wrote: On Monday, 13 October 2014 at 21:50:20 UTC, eles wrote: Short answer is: yes, you cand write, but you cannot compile. Wait, what? Do you mean link or maybe load? I don't write Linux kernel modules, but

Re: Worse is better?

2014-10-14 Thread via Digitalmars-d
On Tuesday, 14 October 2014 at 08:00:21 UTC, Dicebot wrote: large code base. I am not even speaking about algorithms in STL or std.algorithm sense but much more routine things - common small snippets that either get copy-pasted or hidden behind C macros. C has macros to compensate for

Re: Worse is better?

2014-10-14 Thread ketmar via Digitalmars-d
On Tue, 14 Oct 2014 07:25:56 + via Digitalmars-d digitalmars-d@puremagic.com wrote: But maybe you don't really do low level programming then? In which areas of low level programming are templates critical? in the same areas as other things, like conditional branches, for example.

Re: D2 (Debian) + MSSQL

2014-10-14 Thread ketmar via Digitalmars-d
On Tue, 14 Oct 2014 08:34:36 +0200 Jacob Carlborg via Digitalmars-d digitalmars-d@puremagic.com wrote: On 14/10/14 08:11, Sergey wrote: Wrong, I need to have: $ dmd test_tds_connect.d tds.d You can use rdmd to compile and run an application: $ rdmd test_tds_connect.d It will

Re: Worse is better?

2014-10-14 Thread ketmar via Digitalmars-d
On Tue, 14 Oct 2014 09:36:33 + via Digitalmars-d digitalmars-d@puremagic.com wrote: C has macros KILL! KILL! KILL! HULK SMASH! signature.asc Description: PGP signature

allMembers trait for module

2014-10-14 Thread ketmar via Digitalmars-d
Hello. i really really wonder if the following program should ouput what it outputs: version = wtf; string listit(alias mod) () { foreach (m; __traits(allMembers, mod)) { pragma(msg, m); } return ; } enum s = listit!(mixin(__MODULE__)); i see this: object wtf

Re: UFCS in C++

2014-10-14 Thread Don via Digitalmars-d
On Tuesday, 14 October 2014 at 06:29:01 UTC, Jacob Carlborg wrote: On 14/10/14 03:55, Steven Schveighoffer wrote: The concept is in D1 for arrays since as long as I've ever used D. As far as I recall, it was an accidental feature of arrays and perhaps associative arrays. Might be a bit hard

Re: @safety of Array

2014-10-14 Thread monarch_dodra via Digitalmars-d
On Tuesday, 14 October 2014 at 01:47:10 UTC, Brad Roberts via Digitalmars-d wrote: On 10/13/2014 1:28 PM, monarch_dodra via Digitalmars-d wrote: On Monday, 13 October 2014 at 17:16:40 UTC, Brad Roberts via Digitalmars-d wrote: On 10/13/2014 7:47 AM, Andrei Alexandrescu via Digitalmars-d wrote:

Re: allMembers trait for module

2014-10-14 Thread ketmar via Digitalmars-d
On Tue, 14 Oct 2014 13:10:23 +0300 ketmar via Digitalmars-d digitalmars-d@puremagic.com wrote: mkay, mkay, we have an easy solution to sort out non-module symbols: enum isModuleMember(alias mod, alias id) = is(typeof(__traits(getMember, mod, id))); string listit(alias mod) () {

Re: Worse is better?

2014-10-14 Thread Paulo Pinto via Digitalmars-d
On Tuesday, 14 October 2014 at 09:36:34 UTC, Ola Fosheim Grøstad wrote: On Tuesday, 14 October 2014 at 08:00:21 UTC, Dicebot wrote: large code base. I am not even speaking about algorithms in STL or std.algorithm sense but much more routine things - common small snippets that either get

Re: cmdcon-ng official thread

2014-10-14 Thread ketmar via Digitalmars-d
On Tue, 14 Oct 2014 01:48:12 +0300 ketmar via Digitalmars-d digitalmars-d@puremagic.com wrote: fixed some bugs, made default function args to work again and... GDC is in game again! sorry, Iain, i'm not ready to make a bugreport. neither i'm sure it worth the efforts, as GDC will be 2.066

Re: Worse is better?

2014-10-14 Thread ketmar via Digitalmars-d
On Tue, 14 Oct 2014 11:04:01 + Paulo Pinto via Digitalmars-d digitalmars-d@puremagic.com wrote: This is what made me move away from Turbo Pascal back in the day. If UNIX variants had a Turbo Pascal 7 or Modula-2 compatible compilers, I would have stayed in that world for a lot longer.

Re: cmdcon-ng official thread

2014-10-14 Thread ketmar via Digitalmars-d
On Tue, 14 Oct 2014 01:48:12 +0300 ketmar via Digitalmars-d digitalmars-d@puremagic.com wrote: next task in the list: make AA variables work. possible task: make array variables work, supporting all kinds of array element types. ask your questions, make your suggestions! i will answer the

Re: Worse is better?

2014-10-14 Thread ketmar via Digitalmars-d
On Tue, 14 Oct 2014 14:10:09 +0300 ketmar via Digitalmars-d digitalmars-d@puremagic.com wrote: this was a hard move, as i had to drop all my fpc libraries and start writing new ones for C. p.s. transition to D is much easier, as i can use all my C libraries in D. thanks gods that i didn't

Re: Worse is better?

2014-10-14 Thread Sag Academy via Digitalmars-d
On Tuesday, 14 October 2014 at 11:16:09 UTC, ketmar via Digitalmars-d wrote: On Tue, 14 Oct 2014 14:10:09 +0300 ketmar via Digitalmars-d digitalmars-d@puremagic.com wrote: this was a hard move, as i had to drop all my fpc libraries and start writing new ones for C. p.s. transition to D is

Re: Worse is better?

2014-10-14 Thread ketmar via Digitalmars-d
On Tue, 14 Oct 2014 11:24:44 + Sag Academy via Digitalmars-d digitalmars-d@puremagic.com wrote: here c means language or drive? i never used CP/M for work. signature.asc Description: PGP signature

Re: Worse is better?

2014-10-14 Thread via Digitalmars-d
On Tuesday, 14 October 2014 at 11:04:03 UTC, Paulo Pinto wrote: Why drop down to C/C++? It would be like saying you need to drop down to them from D. Not sure what you meant here. Cocoa+tooling provides a fairly high level environment. You drop down to C when you need speed or low level

Re: Parameterized unit testing and benchmarking of phobos

2014-10-14 Thread Martin Nowak via Digitalmars-d
On 10/14/2014 10:38 AM, Robert burner Schadek wrote: well quite a nice and big library. You add the benchmark feature, get a merged into phobos and I will gladly use it to test std.string. Not sure whether a random testing library belongs into phobos.

Re: DIP66 - Multiple alias this

2014-10-14 Thread IgorStepanov via Digitalmars-d
On Monday, 13 October 2014 at 15:21:32 UTC, Daniel N wrote: On 10/11/2014 7:23 AM, IgorStepanov wrote: class A { int i; alias i this; } class B { int i; alias i this; } class C { A a; B b; alias a this; alias b this; } My preferred solution would be to reject the 2nd alias declaration

Re: Worse is better?

2014-10-14 Thread Paulo Pinto via Digitalmars-d
On Tuesday, 14 October 2014 at 11:57:44 UTC, Ola Fosheim Grøstad wrote: On Tuesday, 14 October 2014 at 11:04:03 UTC, Paulo Pinto wrote: Why drop down to C/C++? It would be like saying you need to drop down to them from D. Not sure what you meant here. Cocoa+tooling provides a fairly high

Re: Worse is better?

2014-10-14 Thread eles via Digitalmars-d
On Tuesday, 14 October 2014 at 11:29:02 UTC, ketmar via Digitalmars-d wrote: On Tue, 14 Oct 2014 11:24:44 + Sag Academy via Digitalmars-d digitalmars-d@puremagic.com wrote: here c means language or drive? i never used CP/M for work. Wow. I did use it, but only at school. :)

Re: Parameterized unit testing and benchmarking of phobos

2014-10-14 Thread Robert burner Schadek via Digitalmars-d
On Tuesday, 14 October 2014 at 12:17:05 UTC, Martin Nowak wrote: On 10/14/2014 10:38 AM, Robert burner Schadek wrote: well quite a nice and big library. You add the benchmark feature, get a merged into phobos and I will gladly use it to test std.string. Not sure whether a random testing

Re: Worse is better?

2014-10-14 Thread via Digitalmars-d
On Tuesday, 14 October 2014 at 12:39:37 UTC, Paulo Pinto wrote: Objective-C is a C superset and Swift offers the required unsafe constructs for the ultimate performance if I really want to. My remark was that what should be emphasized is coding in a more performance aware style, no need to

Re: On Phobos GC hunt

2014-10-14 Thread Dmitry Olshansky via Digitalmars-d
On Wednesday, 8 October 2014 at 07:52:37 UTC, Dmitry Olshansky wrote: On Tuesday, 7 October 2014 at 21:59:08 UTC, Peter Alexander Okay, I think I should go a bit futher with the second version of the tool. Things on todo list: - make tool general enough to work for any GitHub based

Re: Worse is better?

2014-10-14 Thread Paulo Pinto via Digitalmars-d
On Tuesday, 14 October 2014 at 13:02:52 UTC, Ola Fosheim Grøstad wrote: On Tuesday, 14 October 2014 at 12:39:37 UTC, Paulo Pinto wrote: Objective-C is a C superset and Swift offers the required unsafe constructs for the ultimate performance if I really want to. My remark was that what

Re: Windows drivers written in D

2014-10-14 Thread eles via Digitalmars-d
On Monday, 13 October 2014 at 23:28:05 UTC, Piotrek wrote: On Monday, 13 October 2014 at 21:50:20 UTC, eles wrote: Check out the betterC switch to get away with runtime A hand here?: http://forum.dlang.org/post/spgdillzvmnvskyzq...@forum.dlang.org

[OT] Ada gems

2014-10-14 Thread eles via Digitalmars-d
Just a bunch of links: http://www.horstpeterhermann.de/ada_related/gems.html This one reminded me D, with some hints about what could still be offered: http://www.adacore.com/adaanswers/gems/ada-gem-7/

Re: [OT] Ada gems

2014-10-14 Thread eles via Digitalmars-d
On Tuesday, 14 October 2014 at 13:52:24 UTC, eles wrote: Just a bunch of links: http://www.horstpeterhermann.de/ada_related/gems.html This one reminded me D, with some hints about what could still be offered: http://www.adacore.com/adaanswers/gems/ada-gem-7/ Hijack, also OT: using C++

Re: [OT] Ada gems

2014-10-14 Thread bearophile via Digitalmars-d
eles: Just a bunch of links: http://www.horstpeterhermann.de/ada_related/gems.html This one reminded me D, with some hints about what could still be offered: http://www.adacore.com/adaanswers/gems/ada-gem-7/ Two nice ones: http://www.adacore.com/adaanswers/gems/ada-gem-24/

Re: [OT] Ada gems

2014-10-14 Thread eles via Digitalmars-d
On Tuesday, 14 October 2014 at 14:56:53 UTC, eles wrote: On Tuesday, 14 October 2014 at 13:52:24 UTC, eles wrote: http://ask-beta.slashdot.org/story/14/04/30/1344224/c-and-the-stl-12-years-later-what-do-you-think-now I've been using it professionally for 15 years now, and if I observe

Re: UFCS in C++

2014-10-14 Thread Jesse Phillips via Digitalmars-d
On Monday, 13 October 2014 at 18:50:52 UTC, Walter Bright wrote: On 10/13/2014 1:53 AM, Peter Alexander wrote: Looks like Bjarne has proposed UFCS for C++ http://isocpp.org/files/papers/N4174.pdf No mention of D though...

Re: Program logic bugs vs input/environmental errors

2014-10-14 Thread eles via Digitalmars-d
On Saturday, 4 October 2014 at 05:26:52 UTC, eles wrote: On Friday, 3 October 2014 at 20:31:42 UTC, Paolo Invernizzi wrote: On Friday, 3 October 2014 at 18:00:58 UTC, Piotrek wrote: On Friday, 3 October 2014 at 15:43:59 UTC, Sean Kelly wrote: For the curious, the flight analysis here:

Re: So what exactly is coming with extended C++ support?

2014-10-14 Thread Dan Olson via Digitalmars-d
Chris wend...@tcd.ie writes: iOS/ARM are very important. What's the latest state of affairs? I know some progress has been made but it has been off my radar for a month or two now. The iOS project with LDC has been idle during the windsurfing season :-). Days are geting shorter so I plan to

Re: Make const, immutable, inout, and shared illegal as function attributes on the left-hand side of a function

2014-10-14 Thread Daniel Murphy via Digitalmars-d
Jonathan M Davis via Digitalmars-d wrote in message news:mailman.768.1413233509.9932.digitalmar...@puremagic.com... I don't know that we need to wait for dfix, but we never remove deprecated stuff from the language very quickly anyway. So, I expect that it'll be around for at least a year

Re: Make const, immutable, inout, and shared illegal as function attributes on the left-hand side of a function

2014-10-14 Thread Daniel Murphy via Digitalmars-d
John Colvin wrote in message news:ljjtmnnckwzenvhaw...@forum.dlang.org... [2] By easily managed I don't mean sed-able, or even tooling-fixable. For me it pivots on being able to maintain one code-base that will compile with multiple compiler versions. An example where this fails: @nogc, being

Re: UFCS in C++

2014-10-14 Thread Steven Schveighoffer via Digitalmars-d
On 10/14/14 11:34 AM, Jesse Phillips wrote: On Monday, 13 October 2014 at 18:50:52 UTC, Walter Bright wrote: On 10/13/2014 1:53 AM, Peter Alexander wrote: Looks like Bjarne has proposed UFCS for C++ http://isocpp.org/files/papers/N4174.pdf No mention of D though...

Re: std.experimental.logger formal review round 3

2014-10-14 Thread Marco Leise via Digitalmars-d
Am Sun, 12 Oct 2014 12:07:55 + schrieb Robert burner Schadek rburn...@gmail.com: On Saturday, 11 October 2014 at 23:37:42 UTC, Marco Leise wrote: I had the same feeling as Jakob about an `Appender` already in the base class and would have expected a bare bones abstract class + a

Re: Make const, immutable, inout, and shared illegal as function attributes on the left-hand side of a function

2014-10-14 Thread John Colvin via Digitalmars-d
On Tuesday, 14 October 2014 at 16:11:34 UTC, Daniel Murphy wrote: John Colvin wrote in message news:ljjtmnnckwzenvhaw...@forum.dlang.org... [2] By easily managed I don't mean sed-able, or even tooling-fixable. For me it pivots on being able to maintain one code-base that will compile with

Re: @safety of Array

2014-10-14 Thread Brad Roberts via Digitalmars-d
On 10/14/2014 3:49 AM, monarch_dodra via Digitalmars-d wrote: You say I'm focused on impl, but @safe *is* an implementation certification. I'm not derailing the thread or talking about process. If Array can't be certified memory safe, then it can't be marked as @safe. That's really all there

Re: [OT] Ada gems

2014-10-14 Thread Paulo Pinto via Digitalmars-d
Am 14.10.2014 um 16:56 schrieb eles: On Tuesday, 14 October 2014 at 13:52:24 UTC, eles wrote: Just a bunch of links: http://www.horstpeterhermann.de/ada_related/gems.html This one reminded me D, with some hints about what could still be offered:

Re: [OT] Ada gems

2014-10-14 Thread Paulo Pinto via Digitalmars-d
Am 14.10.2014 um 17:30 schrieb eles: On Tuesday, 14 October 2014 at 14:56:53 UTC, eles wrote: On Tuesday, 14 October 2014 at 13:52:24 UTC, eles wrote: http://ask-beta.slashdot.org/story/14/04/30/1344224/c-and-the-stl-12-years-later-what-do-you-think-now I've been using it professionally for

Re: @safety of Array

2014-10-14 Thread monarch_dodra via Digitalmars-d
On Tuesday, 14 October 2014 at 17:59:43 UTC, Brad Roberts via Digitalmars-d wrote: On 10/14/2014 3:49 AM, monarch_dodra via Digitalmars-d wrote: You say I'm focused on impl, but @safe *is* an implementation certification. I'm not derailing the thread or talking about process. If Array can't

Re: [OT] Ada gems

2014-10-14 Thread via Digitalmars-d
On Tuesday, 14 October 2014 at 19:49:08 UTC, Paulo Pinto wrote: Am 14.10.2014 um 17:30 schrieb eles: On Tuesday, 14 October 2014 at 14:56:53 UTC, eles wrote: On Tuesday, 14 October 2014 at 13:52:24 UTC, eles wrote:

Re: So what exactly is coming with extended C++ support?

2014-10-14 Thread Nick Sabalausky via Digitalmars-d
On 09/30/2014 04:48 AM, Szymon Gatner wrote: On Monday, 29 September 2014 at 20:15:06 UTC, bachmeier wrote: On Monday, 29 September 2014 at 10:00:27 UTC, Szymon Gatner wrote: Is that all it would take? Do you also need a GC-free standard library, which seems to be the need of all the others

Re: [OT] Ada gems

2014-10-14 Thread Paulo Pinto via Digitalmars-d
Am 14.10.2014 um 22:08 schrieb Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= ola.fosheim.grostad+dl...@gmail.com: On Tuesday, 14 October 2014 at 19:49:08 UTC, Paulo Pinto wrote: Am 14.10.2014 um 17:30 schrieb eles: On Tuesday, 14 October 2014 at 14:56:53 UTC, eles wrote: On Tuesday, 14 October 2014 at

Re: So what exactly is coming with extended C++ support?

2014-10-14 Thread Szymon Gatner via Digitalmars-d
On Tuesday, 14 October 2014 at 20:41:25 UTC, Nick Sabalausky wrote: On 09/30/2014 04:48 AM, Szymon Gatner wrote: On Monday, 29 September 2014 at 20:15:06 UTC, bachmeier wrote: On Monday, 29 September 2014 at 10:00:27 UTC, Szymon Gatner wrote: Is that all it would take? Do you also need a

Re: So what exactly is coming with extended C++ support?

2014-10-14 Thread Szymon Gatner via Digitalmars-d
On Tuesday, 14 October 2014 at 16:09:31 UTC, Dan Olson wrote: Chris wend...@tcd.ie writes: iOS/ARM are very important. What's the latest state of affairs? I know some progress has been made but it has been off my radar for a month or two now. The iOS project with LDC has been idle during

Re: Will D ever get optional named parameters?

2014-10-14 Thread 岩倉 澪
On Tuesday, 14 October 2014 at 03:34:06 UTC, Ary Borenszweig wrote: One simple thing we did in Crystal is to allow invoking a function with named arguments only for arguments that have a default value. For example: void foo(int x, int y = 2, int z = 3) { ... } foo(x, y: 10); foo(x, y: 10, z:

Wouldn't it be nice (case range statements)

2014-10-14 Thread John Colvin via Digitalmars-d
if code like this worked: http://dpaste.dzfl.pl/7ea4eb03f02e A few reasons why it doesn't: You have to duplicate the case keyword when declaring case ranges. Why? Case ranges are inclusive at both ends of the range, unlike in foreach. Again, why? exponential notation (e.g. `2e9`) returns

Re: Wouldn't it be nice (case range statements)

2014-10-14 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 14 October 2014 at 21:29:59 UTC, John Colvin wrote: You have to duplicate the case keyword when declaring case ranges. Why? Case ranges are inclusive at both ends of the range, unlike in foreach. Again, why? It comes from writing: switch(foo) { case 1: case 2: case 3:

Re: Wouldn't it be nice (case range statements)

2014-10-14 Thread Andrei Alexandrescu via Digitalmars-d
On 10/14/14, 2:29 PM, John Colvin wrote: if code like this worked: http://dpaste.dzfl.pl/7ea4eb03f02e A few reasons why it doesn't: You have to duplicate the case keyword when declaring case ranges. Why? Case ranges are inclusive at both ends of the range, unlike in foreach. Again, why?

Re: UFCS in C++

2014-10-14 Thread Walter Bright via Digitalmars-d
On 10/14/2014 3:38 AM, Don wrote: and then Walter confessed to having done it. I was threatened with the Comfy Chair. What else could I do?

Re: So what exactly is coming with extended C++ support?

2014-10-14 Thread Walter Bright via Digitalmars-d
On 9/29/2014 3:00 AM, Szymon Gatner wrote: Hi, recently there is much talk about extending C++ interop in D but it is unclear to me what that means. Functions and virtual class methods are already callable. What else is planned in the near future? Exceptions? Support for C++ templates? (that

Re: So what exactly is coming with extended C++ support?

2014-10-14 Thread Meta via Digitalmars-d
On Tuesday, 14 October 2014 at 22:27:35 UTC, Walter Bright wrote: Currently, D supports C++: * function calling * name mangling * namespaces * templates * member functions * single inheritance * basic types that exist in C++ but not D (like 'long') Note that there are no plans to support C++

Re: So what exactly is coming with extended C++ support?

2014-10-14 Thread Andrei Alexandrescu via Digitalmars-d
On 10/14/14, 3:53 PM, Meta wrote: On Tuesday, 14 October 2014 at 22:27:35 UTC, Walter Bright wrote: Currently, D supports C++: * function calling * name mangling * namespaces * templates * member functions * single inheritance * basic types that exist in C++ but not D (like 'long') Note that

Re: So what exactly is coming with extended C++ support?

2014-10-14 Thread Szymon Gatner via Digitalmars-d
On Tuesday, 14 October 2014 at 23:01:49 UTC, Andrei Alexandrescu wrote: On 10/14/14, 3:53 PM, Meta wrote: On Tuesday, 14 October 2014 at 22:27:35 UTC, Walter Bright wrote: Currently, D supports C++: * function calling * name mangling * namespaces * templates * member functions * single

Re: So what exactly is coming with extended C++ support?

2014-10-14 Thread Szymon Gatner via Digitalmars-d
On Tuesday, 14 October 2014 at 22:27:35 UTC, Walter Bright wrote: On 9/29/2014 3:00 AM, Szymon Gatner wrote: Hi, recently there is much talk about extending C++ interop in D but it is unclear to me what that means. Functions and virtual class methods are already callable. What else is

Re: Program logic bugs vs input/environmental errors

2014-10-14 Thread Walter Bright via Digitalmars-d
On 10/11/2014 1:34 PM, Nick Sabalausky wrote: Having previously played around with PRNG's (using them, not actually creating them), I had noticed that you do tend to get surprisingly long runs of one value missing, or the occasional clustering. I carefully used that knowledge to help me cheat.

Re: So what exactly is coming with extended C++ support?

2014-10-14 Thread Walter Bright via Digitalmars-d
On 10/14/2014 5:40 PM, Szymon Gatner wrote: I do understand current situation tho I admit I am not aware of the single inheritance. Does it mean that one can derive in D from a C++ class (don't see it in the docs)? It's part of D's COM support.

Re: D2 (Debian) + MSSQL

2014-10-14 Thread Sergey via Digitalmars-d
Yes, it works now: $ rdmd -L-lsybdb test_tds_connect.d (If somehow get rid of -L-lsybdb. Maybe add it somewhere in the code ...?) I got some data from the server, and it is certainly: 005��... etc. I've written before transcoding function, and I

Re: D2 (Debian) + MSSQL

2014-10-14 Thread ketmar via Digitalmars-d
On Wed, 15 Oct 2014 01:48:58 + Sergey via Digitalmars-d digitalmars-d@puremagic.com wrote: Now it's like: DBCHAR[255] table_field; dbbind(dbconn, 1, NTBSTRINGBIND, 0, cast(BYTE*)table_field); But I need to may be: ubyte[] ubyte_value = []; dbbind(dbconn, 1, NTBSTRINGBIND, 0,

Re: D2 (Debian) + MSSQL

2014-10-14 Thread Sergey via Digitalmars-d
Do you mean: ubyte[] ubyte_value = []; dbbind(dbconn, 1, NTBSTRINGBIND, 0, cast(ubyte[])ubyte_value); This error is: test_tds_connect.d(84): Error: function tds.dbbind (tds_dblib_dbprocess* dbproc, int column, int vartype, int varlen, ubyte* varaddr) is not callable using argument types

Re: D2 (Debian) + MSSQL

2014-10-14 Thread ketmar via Digitalmars-d
On Wed, 15 Oct 2014 02:37:23 + Sergey via Digitalmars-d digitalmars-d@puremagic.com wrote: Do you mean: ubyte[] ubyte_value = []; dbbind(dbconn, 1, NTBSTRINGBIND, 0, cast(ubyte[])ubyte_value); of course not. cast your DBCHAR array from the first example *after* you called 'dbbind'.

Re: DIP66 - Multiple alias this

2014-10-14 Thread Dicebot via Digitalmars-d
On Tuesday, 14 October 2014 at 12:33:50 UTC, IgorStepanov wrote: This code tell that C is subtype of A and C is subtype of B. User can use this fact in his code: void foo(B); C c = new C; foo(c); //Ok. Of course, we shouldn't allow user to cast c to int: int i = c; //wrong However, user can

Re: std.experimental.logger formal review round 3

2014-10-14 Thread Dicebot via Digitalmars-d
As there was quite some last moment feedback I am giving some more time for me to research issues a bit and Robert to address them :)

Re: @safety of Array

2014-10-14 Thread Dicebot via Digitalmars-d
On Tuesday, 14 October 2014 at 17:59:43 UTC, Brad Roberts via Digitalmars-d wrote: On 10/14/2014 3:49 AM, monarch_dodra via Digitalmars-d wrote: You say I'm focused on impl, but @safe *is* an implementation certification. I'm not derailing the thread or talking about process. If Array can't

Re: Program logic bugs vs input/environmental errors

2014-10-14 Thread Dicebot via Digitalmars-d
On Saturday, 11 October 2014 at 22:06:38 UTC, Walter Bright wrote: All assert actually does is call a function in druntime. You can override and insert your own assert handling function, and have it do as you need. It was deliberately designed that way. A while ago I have been a looking for a

Re: Program logic bugs vs input/environmental errors

2014-10-14 Thread Walter Bright via Digitalmars-d
On 10/14/2014 8:03 PM, Dicebot wrote: On Saturday, 11 October 2014 at 22:06:38 UTC, Walter Bright wrote: All assert actually does is call a function in druntime. You can override and insert your own assert handling function, and have it do as you need. It was deliberately designed that way. A

Re: @safety of Array

2014-10-14 Thread Jakob Ovrum via Digitalmars-d
On Tuesday, 14 October 2014 at 01:47:10 UTC, Brad Roberts via Digitalmars-d wrote: That's why I asked the question I did. The core question isn't about what the current implementation is or does but about where it should end up. Should Array be usable in @safe code. Well, I think it goes

Re: Program logic bugs vs input/environmental errors

2014-10-14 Thread Dicebot via Digitalmars-d
On Wednesday, 15 October 2014 at 03:18:31 UTC, Walter Bright wrote: However, the compiler is still going to regard the assert() as nothrow, so the unwinding from an Exception won't happen until up stack a throwing function is encountered. This makes impossible to have non-fatal unittests and

Re: std.experimental.logger formal review round 3

2014-10-14 Thread Jakob Ovrum via Digitalmars-d
On Wednesday, 15 October 2014 at 02:54:27 UTC, Dicebot wrote: As there was quite some last moment feedback I am giving some more time for me to research issues a bit and Robert to address them :) The Pareto Principle could be worth mentioning here. We were 80% of the way to a quality

Re: DIP66 - Multiple alias this

2014-10-14 Thread Daniel N via Digitalmars-d
On Wednesday, 15 October 2014 at 02:46:05 UTC, Dicebot wrote: On Tuesday, 14 October 2014 at 12:33:50 UTC, IgorStepanov wrote: This code tell that C is subtype of A and C is subtype of B. User can use this fact in his code: void foo(B); C c = new C; foo(c); //Ok. Of course, we shouldn't allow

immutable and RC

2014-10-14 Thread Marco Leise via Digitalmars-d
Is it possible to write a wrapper for file handles, that is immutable if we don't plan to swap out the handle and the ref count is in some external data structure and only accessed in ctors/dtors of the struct ? It would look quite a bit like some sort of head immutable, but with no access to the

Re: D2 (Debian) + MSSQL

2014-10-14 Thread Sergey via Digitalmars-d
Exactly, it's just, sorry... :) Well, now everything works, thanks! Now I will test and then will create a convenient wrapper.

Re: Can someone explain how glfw3.dll gets created?

2014-10-14 Thread Mike Parker via Digitalmars-d-learn
On 10/14/2014 5:21 AM, WhatMeWorry wrote: I have a simple GLFW3 program running in Visual D integrated shell, that kept aborting at DerelictFLFW3.load() with a failed to load the shared libraries: glfw3.dll.' So I found a glfw3.dll somewhere and moved it into the project folder (I know this is

Re: dsource and WinAPI

2014-10-14 Thread dcrepid via Digitalmars-d-learn
Which project are you looking at? Bindings for the Windows API: http://www.dsource.org/projects/bindings/wiki/WindowsApi This is a pretty important project, especially for getting more Windows programmers on board.. thanks for your help

Re: Really in need of help with std.container.array.d

2014-10-14 Thread Nordlöw
On Monday, 13 October 2014 at 13:46:56 UTC, Robert burner Schadek wrote: other than that I'm not sure how to go about this. I tried replace inout with a C++-style member duplication at https://github.com/nordlow/phobos/commit/b2a4ca28bf25bf7c6149566d066cbb54118b36b4 Now it instead errors as

Re: Really in need of help with std.container.array.d

2014-10-14 Thread Nordlöw
On Monday, 13 October 2014 at 13:46:56 UTC, Robert burner Schadek wrote: A blunt force solution would be to create a range as Range!(ReturnType!Array...)(cast(Array!T)this, low, high); and then do the correct casts in Range. The ReturnType would be the ReturnType of opIndex of the Range type

Re: dsource and WinAPI

2014-10-14 Thread Steven Schveighoffer via Digitalmars-d-learn
On 10/14/14 5:03 AM, dcrepid wrote: Which project are you looking at? Bindings for the Windows API: http://www.dsource.org/projects/bindings/wiki/WindowsApi This is a pretty important project, especially for getting more Windows programmers on board.. thanks for your help Looks like they

When betterC triggers errors in compilation?

2014-10-14 Thread eles via Digitalmars-d-learn
Hello, According to this: http://forum.dlang.org/post/lddug4$jgv$1...@digitalmars.com -betterC should disable support for exception handling. So I expected dmd to reject the following code: === import std.stdio; int readDieFromFile() { auto

Re: When betterC triggers errors in compilation?

2014-10-14 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 14 October 2014 at 13:20:50 UTC, eles wrote: http://forum.dlang.org/post/lddug4$jgv$1...@digitalmars.com That was just a speculative thread, that stuff isn't implemented. (And I think that went way too far, IMO betterC should just remove the mandatory stuff like ModuleInfo and

Re: When betterC triggers errors in compilation?

2014-10-14 Thread ketmar via Digitalmars-d-learn
On Tue, 14 Oct 2014 13:20:49 + eles via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: What code would fail under -betterC and how? currently betterC disables module info generation and some module helper functions generation. that's all. just grep DMD sources for betterC and

Re: When betterC triggers errors in compilation?

2014-10-14 Thread eles via Digitalmars-d-learn
On Tuesday, 14 October 2014 at 13:31:47 UTC, Adam D. Ruppe wrote: On Tuesday, 14 October 2014 at 13:20:50 UTC, eles wrote: http://forum.dlang.org/post/lddug4$jgv$1...@digitalmars.com -betterC right now is still an undocumented hack that doesn't do much. Thank you.

Re: dsource and WinAPI

2014-10-14 Thread Vladimir Panteleev via Digitalmars-d-learn
On Tuesday, 14 October 2014 at 13:06:06 UTC, Steven Schveighoffer wrote: dsource is no longer actively maintained. I don't think anyone knows how to contact the admin. I've contacted Brad on a few occasions. Looks like they are still using dsource for that project, latest update is 9/7/14.

Re: Really in need of help with std.container.array.d

2014-10-14 Thread Robert burner Schadek via Digitalmars-d-learn
On Tuesday, 14 October 2014 at 12:51:29 UTC, Nordlöw wrote: Could you please give me a code example? I'm not skilled enough in D to follow this description. struct Range(T) { Array!S array; T opIndex(size_t i) { return cast(T)array[i]; } } struct Array(T) { Range!(const(T))

Re: dsource and WinAPI

2014-10-14 Thread Trass3r via Digitalmars-d-learn
the long-term solution is to include the [win32] headers in druntime ™

Re: dsource and WinAPI

2014-10-14 Thread dcrepid via Digitalmars-d-learn
Vladimir, thanks for looking at the pull request. It'd be great if the whole project was moved to GitHub to allow more people to contribute.

Re: how to get the \uxxxx unicode code from a char

2014-10-14 Thread Sean Kelly via Digitalmars-d-learn
On Tuesday, 14 October 2014 at 19:47:00 UTC, jicman wrote: Greetings. Imagine this code, char[] s = ABCabc; foreach (char c; s) { // how do I convert c to something an Unicode code? ie. \u. } I'd look at the JSON string encoder.

how to get the \uxxxx unicode code from a char

2014-10-14 Thread jicman via Digitalmars-d-learn
Greetings. Imagine this code, char[] s = ABCabc; foreach (char c; s) { // how do I convert c to something an Unicode code? ie. \u. } thanks.

Re: how to get the \uxxxx unicode code from a char

2014-10-14 Thread ketmar via Digitalmars-d-learn
On Tue, 14 Oct 2014 19:46:57 + jicman via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: char[] s = ABCabc; foreach (char c; s) { // how do I convert c to something an Unicode code? ie. \u. } string res; foreach (dchar ch; s) res ~= \\u%04X.format(ch); //

Re: how to get the \uxxxx unicode code from a char

2014-10-14 Thread jicman via Digitalmars-d-learn
On Tuesday, 14 October 2014 at 19:49:16 UTC, Sean Kelly wrote: On Tuesday, 14 October 2014 at 19:47:00 UTC, jicman wrote: Greetings. Imagine this code, char[] s = ABCabc; foreach (char c; s) { // how do I convert c to something an Unicode code? ie. \u. } I'd look at the JSON string

  1   2   >