Re: License of RosettaCode examples (for bearophile:-)

2013-09-17 Thread bearophile
Joseph Rushton Wakeling: Well, I guess the best thing would be just to write here, I license the code under the terms of the Boost license or something similar (public domain is in some ways less good because not every jurisdiction recognizes it, but as far as I'm concerned it's fine too).

Re: Windows DLLs with D

2013-09-17 Thread Buk
On Saturday, 14 September 2013 at 16:46:06 UTC, Buk wrote: Hi all, I've read http://dlang.org/dll.html, and frankly there seems to be a lot of boilerplate rote process to build a DLL. I realise that many of the do nothing functions /can/ be used to do a lot more; and these may be required

Re: Windows DLLs with D

2013-09-17 Thread Dicebot
On Tuesday, 17 September 2013 at 16:05:13 UTC, Buk wrote: Thanks for the help guys. Sorry for the silence. It has just happened that your question touches relatively under-explored area of the language and thus finding someone with actual experience on topic is hard. I don't even know if we

Re: GC.collect bug ?

2013-09-17 Thread Sean Kelly
On Sep 17, 2013, at 4:14 AM, Temtaime temta...@gmail.com wrote: I cannot use the delete/destroy. I want to call dtor at all unreferenced objects. Manual from Dlang size says that GC.collect triggers a full collection. But it doesn't. It does. But the collector isn't guaranteed to collect

Re: Windows DLLs with D

2013-09-17 Thread Rainer Schuetze
On 14.09.2013 18:46, Buk wrote: Hi all, I've read http://dlang.org/dll.html, and frankly there seems to be a lot of boilerplate rote process to build a DLL. I realise that many of the do nothing functions /can/ be used to do a lot more; and these may be required for some purposes. But, for

Re: Compile time data structure

2013-09-17 Thread Ali Çehreli
On 09/16/2013 01:24 PM, Marek Janukowicz wrote: static string[string] columns () { // ... } Although the function itself is static, it returns a dynamic value. foreach( attr, col; columns() ) { __traits(getMember, me, attr) = typeof(__traits(getMember, me, attr)).init;

Re: Compile time data structure

2013-09-17 Thread John Colvin
On Wednesday, 18 September 2013 at 01:24:37 UTC, Ali Çehreli wrote: As far as I know, static foreach is only for tuples (or TypeTuples) TypeTuples are tuples. Sortof. We really need to get that whole situation sorted

Re: Compile time data structure

2013-09-17 Thread H. S. Teoh
On Wed, Sep 18, 2013 at 04:12:01AM +0200, John Colvin wrote: On Wednesday, 18 September 2013 at 01:24:37 UTC, Ali Çehreli wrote: As far as I know, static foreach is only for tuples (or TypeTuples) TypeTuples are tuples. Sortof. We really need to get that whole situation sorted Not to

I cannot understand problem with argument of the function

2013-09-17 Thread mrd
// Simple function called for unsigned integers: static ubyte[] packVarint(T)( T value ) if( isIntegral!T isUnsigned!T ) out( arr ) { T d; size_t size = d.unpackVarint( arr[0] ); import std.stdio; import std.conv; writeln( out contract, type=, typeid(T), isUnsigned=,

Re: I cannot understand problem with argument of the function

2013-09-17 Thread mrd
(question is not about function body realisation - body just don't receives right argument value)

this(T...) not called in struct constructor

2013-09-17 Thread Timothee Cour
This may have been discussed before, but I'm not sure whether this is a bug or not. In any case it's a bit confusing. struct Foo2{ this(T...)(T args){ assert(0); } } void main(){ auto a2=Foo2();//doesn't call assert(0) (ie this(T...) not called) }

[Issue 11053] Regression (2.064 git-head): Recursive template expansion error with -unittest switch

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11053 --- Comment #7 from github-bugzi...@puremagic.com 2013-09-17 00:34:49 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos

[Issue 11055] New: Regression (2.064 git-head): 'pure' function prevents its in-contract from checking parameters

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11055 Summary: Regression (2.064 git-head): 'pure' function prevents its in-contract from checking parameters Product: D Version: D2 Platform: All OS/Version: All

[Issue 9571] link error due to using unique ids in anonymous funcliteral

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9571 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #12

[Issue 9571] link error due to using unique ids in anonymous funcliteral

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9571 --- Comment #11 from Kenji Hara k.hara...@gmail.com 2013-09-17 01:26:10 PDT --- (In reply to comment #10) The root cause of this issues got hidden / fixed by https://github.com/D-Programming-Language/dmd/pull/2550 (as only one template

[Issue 9571] link error due to using unique ids in anonymous funcliteral

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9571 --- Comment #13 from github-bugzi...@puremagic.com 2013-09-17 02:51:20 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 10996] Subtyping with alias this conflicts with private base type

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10996 --- Comment #2 from Joseph Rushton Wakeling joseph.wakel...@webdrake.net 2013-09-17 03:09:41 PDT --- The issue also affects module-level aliases, e.g.: alias fun = Impl!int; private template Impl(T) { void Impl(){} }

[Issue 11053] Regression (2.064 git-head): Recursive template expansion error

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11053 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Component|Phobos |DMD

[Issue 11053] Recursive template expansion error

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11053 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Summary|Regression (2.064 |Recursive

[Issue 11054] ICE with -property when importing std.traits

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11054 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added CC|

[Issue 11056] New: synchronized methods are marked shared in ddoc output

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11056 Summary: synchronized methods are marked shared in ddoc output Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: ddoc Severity: normal

[Issue 11055] Regression (2.064 git-head): 'pure' function prevents its in-contract from checking parameters

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11055 Henning Pohl henn...@still-hidden.de changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 10981] Contracts in pure class methods are useless

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10981 Henning Pohl henn...@still-hidden.de changed: What|Removed |Added CC|

[Issue 10976] thread_joinAll after main exit performed too late

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10976 --- Comment #2 from github-bugzi...@puremagic.com 2013-09-17 06:15:40 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/druntime

[Issue 11041] Some function in core.stdc should be CTFEable

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11041 --- Comment #2 from Don clugd...@yahoo.com.au 2013-09-17 06:59:34 PDT --- The initial bug report is too vague. We need a list of functions. Is it just memcpy() and memmove() ? Or are there others? We also need to consider if the use of those

[Issue 11054] ICE with -property when importing std.traits

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11054 --- Comment #6 from hst...@quickfur.ath.cx 2013-09-17 08:11:27 PDT --- Created an attachment (id=1249) Test case reduced from a suitably altered version of Phobos This is a reduced test case created by running dustmite on a copy of Phobos

[Issue 11054] ICE with -property when importing std.traits

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11054 --- Comment #8 from hst...@quickfur.ath.cx 2013-09-17 08:27:39 PDT --- Still happening on dmd commit 9a321180e0c74f0c8006a8ebb70f18f371ec44c2. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are

[Issue 11054] ICE with -property when importing std.traits

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11054 --- Comment #7 from hst...@quickfur.ath.cx 2013-09-17 08:25:04 PDT --- (In reply to comment #5) I can't even compile git-head with -property, but that's not a big issue since we're going to deprecate this switch soon. - import

[Issue 11057] New: [REG2.064dev] New std.uni has icmp() partly broken

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11057 Summary: [REG2.064dev] New std.uni has icmp() partly broken Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: wrong-code Severity:

[Issue 11058] New: deprecated message doesn't work with selective imports

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11058 Summary: deprecated message doesn't work with selective imports Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal

[Issue 11059] New: alias to symbol in different conditional compilation scope depends on lexical order

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11059 Summary: alias to symbol in different conditional compilation scope depends on lexical order Product: D Version: D2 Platform: All OS/Version: All Status: NEW

[Issue 11054] ICE with -property when importing std.traits

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11054 --- Comment #10 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-09-17 11:18:31 PDT --- (In reply to comment #9) Ok I can reproduce it with the test-case from #c6. I've compiled with: dmd -unittest test.d Actually I don't need to

[Issue 11054] ICE with -property when importing std.traits

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11054 --- Comment #11 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-09-17 11:21:07 PDT --- (In reply to comment #7) and phobos git HEAD (a54bc74277427133baf59185be36d7a5cb1de1a4). Note: You should rebase and try the newest Phobos. I've

[Issue 11054] ICE with -property when importing std.traits

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11054 --- Comment #9 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-09-17 11:17:24 PDT --- Ok I can reproduce it with the test-case from #c6. I've compiled with: dmd -unittest test.d Where test.d is: import dts.traits; void main() { }

[Issue 11054] ICE with -property when importing std.traits

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11054 --- Comment #12 from hst...@quickfur.ath.cx 2013-09-17 11:27:28 PDT --- I updated to the latest git HEAD (dmd, druntime, phobos), and the test case in comment #6 is still causing an ICE. You're right, though, that it doesn't seem to need the

[Issue 11054] ICE: interpret.c:357: virtual void Statement::ctfeCompile(CompiledCtfeFunction*): Assertion `0' failed.

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11054 --- Comment #13 from hst...@quickfur.ath.cx 2013-09-17 11:30:20 PDT --- OK, confirmed that the original case (import std.traits) no longer fails with latest Phobos. The test case in comment #6 continues to generate the ICE. -- Configure

[Issue 3438] struct ctor with defaulted parameters should be rejected

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3438 --- Comment #5 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-09-17 12:15:54 PDT --- *** Issue 10952 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email

[Issue 10952] struct ctor with defaulted parameters should not be allowed

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10952 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 5060] Order of interface implementations affects code

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5060 --- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-09-17 13:05:41 PDT --- P.S.: OP code is missing an import to std.stdio. Perhaps the right way to implement this is to simply allow shadowing via an alias declaration: class

[Issue 5060] Order of interface implementations affects code

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5060 --- Comment #2 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-09-17 13:07:28 PDT --- (In reply to comment #1) Otherwise, emit a compiler error. I meant emit the error at the call site when run is called but both interfaces define the

[Issue 6039] C-style initialization of structs doesn't take field initializers into account

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6039 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 5460] enum of struct not calling constructor

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5460 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 4734] immutable return type specifier without parantheses confuses the compiler

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4734 --- Comment #7 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-09-17 12:58:02 PDT --- (In reply to comment #6) (In reply to comment #5) In any case, at minimum, the error message needs to be improved. How about we implement these

[Issue 4595] [tdpl] Accessing non-static member of a null reference compiles

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4595 --- Comment #13 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-09-17 12:54:33 PDT --- (In reply to comment #12) Failing unittest in TDPL: unittest { class A { int x; } A a; assert(!__traits(compiles, a.x = 5)); } Such

[Issue 11010] Regression (2.063.2) typeid doesn't work on a member of an instance.

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11010 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added CC|

[Issue 4576] [tdpl] 0/1 argument calls to overloaded function is allowed in presence of variadic function

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4576 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added OS/Version|Windows |All ---

[Issue 6989] Implement toString for std.concurrency.Tid

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6989 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Keywords||pull

[Issue 7799] Can't use alias for overload resolution with alias this subtype

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7799 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 7057] Compiler errors on different functions on argument mismatch

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7057 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 7283] Add error info to failed shell call

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7283 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 8082] Invalid error messages based on module compilation order

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8082 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 8018] Template fails to instantiate with templated argument

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8018 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 8451] cv2pdb does not work properly with 2.060-produced binaries

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8451 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 8415] Forward reference error with static nested classes

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8415 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 8746] rehash AA property doesn't work with constant Tuple

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8746 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 8413] function breaks compilation of property function

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8413 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 7191] ctor/opAssign doesn't play nice with field initialization

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7191 --- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-09-17 14:40:33 PDT --- Simpler example: - struct A { this(B) { } } struct B { } struct C { A a; } void main() { // field initialization, c.a = B(), 'a'

[Issue 8732] std.typecons: BlackHole/WhiteHole always declare methods public

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8732 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 8851] std.string.join should allow 'char' as joiner

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=8851 --- Comment #5 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-09-17 15:26:11 PDT --- (In reply to comment #4) I believe in the change, so I'm assigning to self. Is this part of any open pulls you've made? -- Configure issuemail:

[Issue 9303] ICE(glue.c) template mixin with property switch

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9303 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 7191] ctor/opAssign doesn't play nice with field initialization

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7191 bearophile_h...@eml.cc changed: What|Removed |Added CC||bearophile_h...@eml.cc ---

[Issue 9310] escapeShellCommand unittests are never run

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9310 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Keywords||pull

[Issue 9809] Need a better diagnostic on accessing 'alias this' to private symbols

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9809 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 9825] Add ability to auto-generate a specific field constructor

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9825 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 7191] ctor/opAssign doesn't play nice with field initialization

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7191 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Severity|normal |enhancement

[Issue 9547] typeof() which requires .init must be properly documented

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=9547 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 10098] byLine should return empty string instead of null when line is empty

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10098 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Keywords||pull

[Issue 11060] New: delete gives InvalidMemoryOperationError

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11060 Summary: delete gives InvalidMemoryOperationError Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: major Priority: P2

[Issue 11061] New: std.variant.Variant equality comparison always returns false for static array literals.

2013-09-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11061 Summary: std.variant.Variant equality comparison always returns false for static array literals. Product: D Version: D2 Platform: All OS/Version: All Status: NEW

<    1   2