Re: multiple `alias this` suggestion

2017-04-26 Thread Daniel N via Digitalmars-d
On Wednesday, 26 April 2017 at 18:34:48 UTC, Carl Sturtivant wrote: On Wednesday, 26 April 2017 at 15:00:30 UTC, Steven Schveighoffer wrote: I think you can appreciate that this doesn't scale. Imagine a case which has 2 or 3 optional alias this items. -Steve Agreed, not manually, as it is

Re: Shortest quine in D

2017-04-26 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 04/26/2017 11:37 PM, H. S. Teoh via Digitalmars-d wrote: On Thu, Apr 27, 2017 at 12:15:32AM +, Jon Degenhardt via Digitalmars-d wrote: On Wednesday, 26 April 2017 at 23:19:32 UTC, H. S. Teoh wrote: --hello.d:-- import std.stdio;void main(){write(import("hello.d"));}

Re: CTFE Status 2

2017-04-26 Thread Stefan Koch via Digitalmars-d
On Thursday, 27 April 2017 at 03:33:03 UTC, H. S. Teoh wrote: Is it possible at all to use any of the backend (in particular what parts of the optimizer that are pertinent), or is the API not conducive for this? T It is of course possible to use dmds backend but not very desirable, dmds

Re: Shortest quine in D

2017-04-26 Thread H. S. Teoh via Digitalmars-d
On Thu, Apr 27, 2017 at 12:15:32AM +, Jon Degenhardt via Digitalmars-d wrote: > On Wednesday, 26 April 2017 at 23:19:32 UTC, H. S. Teoh wrote: > > --hello.d:-- > > import std.stdio;void main(){write(import("hello.d"));} > > > > > > Thanks to string imports,

Re: CTFE Status 2

2017-04-26 Thread H. S. Teoh via Digitalmars-d
On Thu, Apr 27, 2017 at 02:15:30AM +, Stefan Koch via Digitalmars-d wrote: > On Thursday, 16 February 2017 at 21:05:51 UTC, Stefan Koch wrote: > > [ ... ] > Hi Guys, > > As you already probably know some work has been done in the past week > to get an x86 jit rolling. > > It is designed to

Re: How to overload member function pointer and a regualr member function

2017-04-26 Thread ParticlePeter via Digitalmars-d-learn
On Wednesday, 26 April 2017 at 08:24:08 UTC, Basile B. wrote: On Tuesday, 25 April 2017 at 18:58:58 UTC, Ali Çehreli wrote: On 04/25/2017 11:54 AM, Ali Çehreli wrote: My analysis is wrong because that writefln() is for the bar(float) overload but I still think what you want is achieved. Ali

Re: Release RDUB v1

2017-04-26 Thread Mike Parker via Digitalmars-d-announce
On Thursday, 27 April 2017 at 02:59:16 UTC, JamesD wrote: RDUB is a front end for DUB, a D language build tool. It's designed to build a single source file specified on the command line, without having to edit the dub files: dub.json, dub.sdl, src/app.d, source/app.d What advantage does

Release RDUB v1

2017-04-26 Thread JamesD via Digitalmars-d-announce
RDUB is a front end for DUB, a D language build tool. It's designed to build a single source file specified on the command line, without having to edit the dub files: dub.json, dub.sdl, src/app.d, source/app.d https://github.com/jasc2v8/rdub https://code.dlang.org/packages/rdub This tool is

Re: CTFE Status 2

2017-04-26 Thread Stefan Koch via Digitalmars-d
On Thursday, 16 February 2017 at 21:05:51 UTC, Stefan Koch wrote: [ ... ] Hi Guys, As you already probably know some work has been done in the past week to get an x86 jit rolling. It is designed to produce very simple code with _any_ optimization at all. Since optimization introduces

generate a simple quiz

2017-04-26 Thread abdullah via Digitalmars-d-learn
i to need to generate a simple quiz for the following quiz types:  Multiple-choice questions (MCQs). Which of the following …. o a) ….. o b) ….. o c) ….. the quiz generator will start by asking to enter the name of the quiz and How many questions needed for MCQs and questions. After that

Re: Persistent key-value-store for D?

2017-04-26 Thread Matthias Klumpp via Digitalmars-d-learn
On Wednesday, 26 April 2017 at 17:06:52 UTC, krylon wrote: [...] If I understand what I have read so far correctly, it is possible to access libraries written in C or C++ from D - in that case, I could just use Tokyocabinet directly, but I have not found any pointers on how to do this. Is

Re: Python : Pythonista / Ruby: Rubyist : / D : ?

2017-04-26 Thread Jordan Wilson via Digitalmars-d
On Friday, 21 April 2017 at 17:20:14 UTC, Vasudev Ram wrote: Hi list, I hope the question is self-evident from the message subject. If not, it means: what are D developers generally called (to indicate that they develop in D)? The question occurred to me somehow while browsing some D posts

Re: multiple `alias this` suggestion

2017-04-26 Thread Carl Sturtivant via Digitalmars-d
On Wednesday, 26 April 2017 at 20:19:19 UTC, Walter Bright wrote: On 4/21/2017 5:17 AM, Andrei Alexandrescu wrote: This is interesting, and would be timely to discuss before an implementation of multiple alias this gets started. -- Andrei mixin templates already have an established method

Re: Shortest quine in D

2017-04-26 Thread Ali Çehreli via Digitalmars-d
On 04/26/2017 04:48 PM, Stefan Koch wrote: On Wednesday, 26 April 2017 at 23:19:32 UTC, H. S. Teoh wrote: --hello.d:-- import std.stdio;void main(){write(import("hello.d"));} Thanks to string imports, quines in D are actually trivial. :-D T use __FILE__ to make

Re: Move construction from !is(T == typeof(this))

2017-04-26 Thread Stanislav Blinov via Digitalmars-d
On Wednesday, 26 April 2017 at 13:38:59 UTC, Steven Schveighoffer wrote: ~this() { data.destroy(); } Don't do this. It's not a good idea, since data could be invalid at this point. In this case, destroy does nothing (it just sets the array to null), so I would just

Re: Shortest quine in D

2017-04-26 Thread Jon Degenhardt via Digitalmars-d
On Wednesday, 26 April 2017 at 23:19:32 UTC, H. S. Teoh wrote: --hello.d:-- import std.stdio;void main(){write(import("hello.d"));} Thanks to string imports, quines in D are actually trivial. :-D T :)

Re: Shortest quine in D

2017-04-26 Thread Stefan Koch via Digitalmars-d
On Wednesday, 26 April 2017 at 23:19:32 UTC, H. S. Teoh wrote: --hello.d:-- import std.stdio;void main(){write(import("hello.d"));} Thanks to string imports, quines in D are actually trivial. :-D T use __FILE__ to make it a little more portable

Shortest quine in D

2017-04-26 Thread H. S. Teoh via Digitalmars-d
--hello.d:-- import std.stdio;void main(){write(import("hello.d"));} Thanks to string imports, quines in D are actually trivial. :-D T -- Knowledge is that area of ignorance that we arrange and classify. -- Ambrose Bierce

Re: COM Expertise needed: COM Callbacks

2017-04-26 Thread Nierjerson via Digitalmars-d-learn
On Wednesday, 26 April 2017 at 15:30:37 UTC, John Chapman wrote: On Tuesday, 25 April 2017 at 18:39:56 UTC, Nierjerson wrote: [...] When you use DISPATCH_PROPERTYPUT you need to set cNamedArgs and rgdispidNamedArgs like so: int dispidNamed = DISPID_PROPERTYPUT; params.cNamedArgs = 1;

[Issue 17355] Path to lib64 and $(DMDInstallDir) not correct

2017-04-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17355 --- Comment #1 from Thomas --- Additional notes: No other Visual Studio versions are installed, although the new vs2017 is installed on another drive (not c: ). --

[Issue 17355] New: Path to lib64 and $(DMDInstallDir) not correct

2017-04-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17355 Issue ID: 17355 Summary: Path to lib64 and $(DMDInstallDir) not correct Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: normal

Re: multiple `alias this` suggestion

2017-04-26 Thread Walter Bright via Digitalmars-d
On 4/21/2017 5:17 AM, Andrei Alexandrescu wrote: This is interesting, and would be timely to discuss before an implementation of multiple alias this gets started. -- Andrei mixin templates already have an established method for resolving overloads and such with the names they introduce. Any

[Issue 17354] An overload in a final class can silently hide base methods

2017-04-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17354 --- Comment #1 from b2.t...@gmx.com --- No it's not detected in the first (final class) and detected in the second --

[Issue 17354] New: An overload in a final class can silently hide base methods

2017-04-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17354 Issue ID: 17354 Summary: An overload in a final class can silently hide base methods Product: D Version: D2 Hardware: All OS: All Status: NEW

Re: Persistent key-value-store for D?

2017-04-26 Thread bachmeier via Digitalmars-d-learn
On Wednesday, 26 April 2017 at 17:06:52 UTC, krylon wrote: If I understand what I have read so far correctly, it is possible to access libraries written in C or C++ from D - in that case, I could just use Tokyocabinet directly, but I have not found any pointers on how to do this. Is this a

[Issue 15692] Allow struct member initializer everywhere

2017-04-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15692 --- Comment #3 from Jacob Carlborg --- (In reply to Lionello Lunesu from comment #2) > My 2c: this is more D-like, > > auto foo = cast(Foo){ a: 3, b: 4 }; I disagree, this looks weird. --

[Issue 13607] BigInt math not usable in @safe code

2017-04-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13607 --- Comment #6 from hst...@quickfur.ath.cx --- What should be done about the inline asm heavily used by the BigInt implementation? We could use the sledgehammer approach and slap @trusted on all the inline asm code, but I'm a bit hesitant to do

[Issue 16303] covariant delegates should implicitly convert

2017-04-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16303 --- Comment #2 from Walter Bright --- https://github.com/dlang/dmd/pull/6731 --

Re: multiple `alias this` suggestion

2017-04-26 Thread Carl Sturtivant via Digitalmars-d
On Wednesday, 26 April 2017 at 15:00:30 UTC, Steven Schveighoffer wrote: I think you can appreciate that this doesn't scale. Imagine a case which has 2 or 3 optional alias this items. -Steve Agreed, not manually, as it is exponential in the number of conditions. But I think some template

[Issue 17349] Covariant overrides should be allowed

2017-04-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17349 --- Comment #1 from Walter Bright --- https://github.com/dlang/dmd/pull/6731 --

[Issue 17353] is expression type specialization matching strips const

2017-04-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17353 Mathias Lang changed: What|Removed |Added CC|

[Issue 13607] BigInt math not usable in @safe code

2017-04-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13607 hst...@quickfur.ath.cx changed: What|Removed |Added Keywords||pull CC|

Persistent key-value-store for D?

2017-04-26 Thread krylon via Digitalmars-d-learn
Hello everyone, After several unsuccessful attempts over the last couple of years, I made a new attempt at learning D last weekend and this time ... something clicked. So first of all, let me say that I like it very much so far! Over the years, I have fallen into the habit when learning a

Re: grammer questions

2017-04-26 Thread Basile B. via Digitalmars-d
On Wednesday, 26 April 2017 at 00:45:44 UTC, Philip Miess wrote: On the grammar page it says ModuleDeclaration: module ModuleFullyQualifiedName ; On the module page it says ModuleDeclaration: ModuleAttributesopt module ModuleFullyQualifiedName ; Is the difference and accident? Which

Re: Python : Pythonista / Ruby: Rubyist : / D : ?

2017-04-26 Thread Martin Tschierschke via Digitalmars-d
On Wednesday, 26 April 2017 at 15:38:16 UTC, Brad Anderson wrote: On Friday, 21 April 2017 at 17:20:14 UTC, Vasudev Ram wrote: [snip] DLanger? DLangist? D'er? Doer? :) Martian. These seem to be all Dlighted programmers :D

Re: Python : Pythonista / Ruby: Rubyist : / D : ?

2017-04-26 Thread Brad Anderson via Digitalmars-d
On Friday, 21 April 2017 at 17:20:14 UTC, Vasudev Ram wrote: [snip] DLanger? DLangist? D'er? Doer? :) Martian.

Re: COM Expertise needed: COM Callbacks

2017-04-26 Thread John Chapman via Digitalmars-d-learn
On Tuesday, 25 April 2017 at 18:39:56 UTC, Nierjerson wrote: void RGB(icRGBColor ic, cSolidColor s) { import main; EXCEPINFO exception; uint argErr = 0; auto iidNULL = IID_NULL; auto RT = new SafeVariantPtr(); VARIANT[1] paramVars; DISPPARAMS

Re: multiple `alias this` suggestion

2017-04-26 Thread Steven Schveighoffer via Digitalmars-d
On 4/24/17 12:52 PM, Carl Sturtivant wrote: On Friday, 21 April 2017 at 14:55:31 UTC, Steven Schveighoffer wrote: I agree, I like how this solves the ambiguity problem nicely. However, this disallows using introspection to declare multiple alias this piecemeal. e.g.: struct S(bool foo) { int

Re: multiple `alias this` suggestion

2017-04-26 Thread Carl Sturtivant via Digitalmars-d
On Monday, 24 April 2017 at 16:52:49 UTC, Carl Sturtivant wrote: On Friday, 21 April 2017 at 14:55:31 UTC, Steven Schveighoffer wrote: I agree, I like how this solves the ambiguity problem nicely. However, this disallows using introspection to declare multiple alias this piecemeal. e.g.:

[Issue 17351] Static const array can't be evaluated at compile time when passed as ref argument

2017-04-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17351 Andrei Alexandrescu changed: What|Removed |Added CC||and...@erdani.com

Re: Move construction from !is(T == typeof(this))

2017-04-26 Thread Steven Schveighoffer via Digitalmars-d
On 4/26/17 2:17 AM, Stanislav Blinov wrote: On Wednesday, 26 April 2017 at 02:19:03 UTC, Manu wrote: Right, yeah I see. So, basically, you admit that it is required to have 3 overloads; foo(X), foo(ref X) and foo(ref const X), in the event that I want to avoid needlessly copying X prior to

[Issue 17352] [REG 2.075a] Internal error: ddmd/backend/elfobj.c 1739 on duplicate definition

2017-04-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17352 b2.t...@gmx.com changed: What|Removed |Added CC||b2.t...@gmx.com

[Issue 17353] New: is expression type specialization matching strips const

2017-04-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17353 Issue ID: 17353 Summary: is expression type specialization matching strips const Product: D Version: D2 Hardware: All OS: All Status: NEW

[Issue 17352] Internal error: ddmd/backend/elfobj.c 1739 on duplicate definition

2017-04-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17352 --- Comment #1 from Ketmar Dark --- some details regarding the bug: previously, dmd happily creates .o file, and then linker complains about duplicate definition. and now, i have no way to know *what* symbol was defined

Re: DIP 1007 Preliminary Review Round 1

2017-04-26 Thread Steven Schveighoffer via Digitalmars-d
On 4/26/17 4:32 AM, Olivier FAURE wrote: On Tuesday, 25 April 2017 at 18:32:09 UTC, Steven Schveighoffer wrote: I missed this part. Now that I read that, I think we aren't going to gain much by having this language feature internal to the compiler. The way I understood it, the feature will

Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-04-26 Thread Atila Neves via Digitalmars-d-announce
On Tuesday, 25 April 2017 at 22:21:33 UTC, Ali Çehreli wrote: On 04/25/2017 01:20 PM, jmh530 wrote: > [...] numbers, allocate > [...] to free the > [...] Yes. > [...] freed by D > [...] Correct. > [...] of just the > [...] C++ smart > [...] totally grok it > [...] Just by guessing, what we

[Issue 17352] Internal error: ddmd/backend/elfobj.c 1739 on duplicate definition

2017-04-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17352 Ketmar Dark changed: What|Removed |Added CC|

[Issue 17352] New: Internal error: ddmd/backend/elfobj.c 1739 on duplicate definition

2017-04-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17352 Issue ID: 17352 Summary: Internal error: ddmd/backend/elfobj.c 1739 on duplicate definition Product: D Version: D2 Hardware: x86 OS: Linux Status:

[Issue 17351] New: Static const array can't be evaluated at compile time when passed as ref argument

2017-04-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17351 Issue ID: 17351 Summary: Static const array can't be evaluated at compile time when passed as ref argument Product: D Version: D2 Hardware: x86_64 OS: Linux

[Issue 17350] New: bitmanip checks min, while Ternary does not have this property

2017-04-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17350 Issue ID: 17350 Summary: bitmanip checks min, while Ternary does not have this property Product: D Version: D2 Hardware: x86_64 OS: Mac OS X Status:

Re: DIP 1007 Preliminary Review Round 1

2017-04-26 Thread Olivier FAURE via Digitalmars-d
On Tuesday, 25 April 2017 at 18:32:09 UTC, Steven Schveighoffer wrote: I missed this part. Now that I read that, I think we aren't going to gain much by having this language feature internal to the compiler. The way I understood it, the feature will only stay internal to the compiler until

Re: DIP 1006 - Preliminary Review Round 1

2017-04-26 Thread Olivier FAURE via Digitalmars-d
On Wednesday, 12 April 2017 at 17:16:33 UTC, H. S. Teoh wrote: Overall, I support the idea of this DIP. However, as others have mentioned, it needs to make it clear whether/how `-contracts=assert` here interacts with unittests. According to the discussion, apparently a different druntime

[Issue 17349] New: Covariant overrides should be allowed

2017-04-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17349 Issue ID: 17349 Summary: Covariant overrides should be allowed Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1

Re: How to overload member function pointer and a regualr member function

2017-04-26 Thread Basile B. via Digitalmars-d-learn
On Tuesday, 25 April 2017 at 18:58:58 UTC, Ali Çehreli wrote: On 04/25/2017 11:54 AM, Ali Çehreli wrote: My analysis is wrong because that writefln() is for the bar(float) overload but I still think what you want is achieved. Ali No it's ok, it works. The additional indirection is well

Re: How to fix date format?

2017-04-26 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, April 26, 2017 06:55:01 Suliman via Digitalmars-d-learn wrote: > Thanks! That's work! > > But why I can't do it in single line like: > string dt = > DateTime.toISOExtString(DateTime.fromSimpleString(point[1].coerce!string)) > ; "Error: function std.datetime.DateTime.toISOExtString ()

Re: How to fix date format?

2017-04-26 Thread Suliman via Digitalmars-d-learn
On Wednesday, 26 April 2017 at 05:21:32 UTC, Jonathan M Davis wrote: On Wednesday, April 26, 2017 04:02:12 Suliman via Digitalmars-d-learn wrote: I tried to do: writeln(DateTime.toISOExtString(DateTime.fromSimpleString(point[1].coerce! string))); But got error: Error: function

Re: Move construction from !is(T == typeof(this))

2017-04-26 Thread Stanislav Blinov via Digitalmars-d
On Wednesday, 26 April 2017 at 02:19:03 UTC, Manu wrote: Right, yeah I see. So, basically, you admit that it is required to have 3 overloads; foo(X), foo(ref X) and foo(ref const X), in the event that I want to avoid needlessly copying X prior to constructing from it in the non-const case...