Slack discussion group?

2015-10-27 Thread Andrew Benton via Digitalmars-d
Slack seems like it is becoming more and more popular. Have we considered setting up a Slack chat group?

[Issue 15082] Output of process is not captured on Win64

2015-10-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15082 --- Comment #4 from Steven Schveighoffer --- Sorry, I've never tested Win64 dmd, and the version I have used is VS 2010 --

[Issue 15252] [REG 2.069.0-rc1] Compilation error in std.uni

2015-10-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15252 --- Comment #1 from briancsch...@gmail.com --- Given the common "cannot cast ... to void at compile time" error message, this may be a duplicate of 15251. --

[Issue 15233] TypeTuple causes segfault in dmd 2.68.2

2015-10-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15233 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/62fc013ee2614e8e68317ad8d2ba9a157e9302e9 fix Issue 15233 - TypeTuple

[Issue 15252] New: [REG 2.069.0-rc1] Compilation error in std.uni

2015-10-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15252 Issue ID: 15252 Summary: [REG 2.069.0-rc1] Compilation error in std.uni Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: regression

Re: Fixing spurious "statement is not reachable" in template code

2015-10-27 Thread Timon Gehr via Digitalmars-d
On 10/27/2015 06:35 PM, Steven Schveighoffer wrote: I understand how the compiler treats it. In some cases, the statement is reachable, the compiler is unhelpfully pointing out cases where it was unreachable. The reachable statement is not the same as the statement that is flagged

Re: Slack discussion group?

2015-10-27 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 27 October 2015 at 17:49:51 UTC, Andrew Benton wrote: Slack seems like it is becoming more and more popular. Have we considered setting up a Slack chat group? What does it have to offer? I know two groups who use it... and I kinda hate it. One of the users is a part-time client

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread Joseph Rushton Wakeling via Digitalmars-d
On Tuesday, 27 October 2015 at 18:10:18 UTC, deadalnix wrote: The problem at hand here is escape analysis. The compiler must be able to ensure that a reference doesn't escape the RC mechanism in an uncontrolled manner. I'd like to add such mechanism to the language rather than bake in

[Issue 15250] Grammar does not contain rules for multiple slices in an index expression

2015-10-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15250 --- Comment #1 from briancsch...@gmail.com --- I think that it might be useful to delete the SliceExpression rule and modify the IndexExpression rule to look like this: IndexExpression: PostfixExpression '[' ']' | PostfixExpression '['

Re: DMD is slow for matrix maths?

2015-10-27 Thread Walter Bright via Digitalmars-d
On 10/25/2015 7:37 PM, Etienne Cimon wrote: I think the best option would be for an inline feature in DMD that works, but I'm wondering what the stance is right now about the subject? There have been some recent changes to improve inlining in dmd:

Re: Lifetime study group

2015-10-27 Thread Jacob Carlborg via Digitalmars-d
On 2015-10-27 03:45, Andrei Alexandrescu wrote: Normally we'd be holding this on the forum, but as we all know, forum discussions tend to meander a lot and lose focus. For that reason, please write me email about joining a mailing list dedicated to discussions on object lifetime - a study

[Issue 15250] Grammar does not contain rules for multiple slices in an index expression

2015-10-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15250 briancsch...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #2 from

Re: Lifetime study group

2015-10-27 Thread Meta via Digitalmars-d
On Tuesday, 27 October 2015 at 02:45:24 UTC, Andrei Alexandrescu wrote: Normally we'd be holding this on the forum, but as we all know, forum discussions tend to meander a lot and lose focus. For that reason, please write me email about joining a mailing list dedicated to discussions on object

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread Namespace via Digitalmars-d
On Tuesday, 27 October 2015 at 20:19:42 UTC, PuglyWUgly wrote: Why care about this? Even Rust doesn't try to solve this problem...because it isn't really a problem in practice. In c++/rust code you use value/unique types 99.9% of the time, and reference counting is only for

Re: Automatic method overriding in sub-classes

2015-10-27 Thread MrSmith via Digitalmars-d
On Monday, 26 October 2015 at 23:25:49 UTC, Tofu Ninja wrote: I know this has basically no chance of ever actually being added because that is the way of all "I want feature X" threads, but I thought I would post this anyways because I seem to want it constantly. Hey, that is what I needed

Re: Fixing spurious "statement is not reachable" in template code

2015-10-27 Thread tsbockman via Digitalmars-d
On Tuesday, 27 October 2015 at 17:23:21 UTC, Jonathan M Davis wrote: On Tuesday, 27 October 2015 at 16:05:31 UTC, tsbockman wrote: On Tuesday, 27 October 2015 at 13:23:51 UTC, Timon Gehr wrote: Versions of the same statement in different instantiations are independent. Templates are just a

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, 27 October 2015 at 20:19:42 UTC, PuglyWUgly wrote: Why care about this? Even Rust doesn't try to solve this problem...because it isn't really a problem in practice. In c++/rust code you use value/unique types 99.9% of the time, and reference counting is only for

Re: Automatic method overriding in sub-classes

2015-10-27 Thread Jacob Carlborg via Digitalmars-d
On 2015-10-27 09:05, Tofu Ninja wrote: The method is instantiated when the subclass is defined so T would obviously be right on hand. Sub-classing a class with an auto override method would implicitly instantiate and override the method. Calling a.bar() would have no problems because bar would

Re: Fixing spurious "statement is not reachable" in template code

2015-10-27 Thread Steven Schveighoffer via Digitalmars-d
On 10/27/15 12:04 PM, tsbockman wrote: On Tuesday, 27 October 2015 at 12:28:38 UTC, Steven Schveighoffer wrote: On 10/26/15 1:08 PM, tsbockman wrote: My solution #2 is the same as the one you proposed - the dummy parameter stuff is my vague proposal for a way to actual implement this behavior

Re: Automatic method overriding in sub-classes

2015-10-27 Thread Tofu Ninja via Digitalmars-d
On Tuesday, 27 October 2015 at 14:47:03 UTC, bitwise wrote: [...] Going a bit further, I think you could override an auto override fun too manually as well. This would be helpful both for adding additional functionality, and as a fallback if the definition of the auto override function was

[Issue 15082] Output of process is not captured on Win64

2015-10-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15082 --- Comment #5 from Rainer Schuetze --- Works for me with VS2015, too. Both -m64 and -m32mscoff. What version of dmd are you using? I just tried dmd-2.069-rc1. --

Re: DMD is slow for matrix maths?

2015-10-27 Thread David Nadlinger via Digitalmars-d
On Tuesday, 27 October 2015 at 18:19:38 UTC, Etienne Cimon wrote: On Tuesday, 27 October 2015 at 18:18:36 UTC, Etienne Cimon wrote: LDC couldn't inline it either. My only options at this point is to write the assembly or link to a C library. Btw, DMD and LDC had similar performance. This

splitter, compilation issue

2015-10-27 Thread sigod via Digitalmars-d-learn
Here's simple code: import std.algorithm; import std.array; import std.file; void main(string[] args) { auto t = args[1].readText() .splitter('\n') .filter!(e => e.length)

Re: Lifetime study group

2015-10-27 Thread tsbockman via Digitalmars-d
Sign me up as read-only, if there won't be public archives somewhere.

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread PuglyWUgly via Digitalmars-d
Why care about this? Even Rust doesn't try to solve this problem...because it isn't really a problem in practice. In c++/rust code you use value/unique types 99.9% of the time, and reference counting is only for shared/aliased objects. Reference counting == rare and unimportant

Re: Fixing spurious "statement is not reachable" in template code

2015-10-27 Thread tsbockman via Digitalmars-d
On Tuesday, 27 October 2015 at 19:30:08 UTC, Timon Gehr wrote: On 10/27/2015 06:35 PM, Steven Schveighoffer wrote: I understand how the compiler treats it. In some cases, the statement is reachable, the compiler is unhelpfully pointing out cases where it was unreachable. The reachable

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 27 October 2015 at 20:19:42 UTC, PuglyWUgly wrote: Why care about this? Even Rust doesn't try to solve this problem...because it isn't really a problem in practice. In c++/rust code you use value/unique types 99.9% of the time, and reference counting is only for

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread rsw0x via Digitalmars-d
On Tuesday, 27 October 2015 at 20:41:49 UTC, Jonathan M Davis wrote: On Tuesday, 27 October 2015 at 20:19:42 UTC, PuglyWUgly wrote: Why care about this? Even Rust doesn't try to solve this problem...because it isn't really a problem in practice. In c++/rust code you use value/unique

Comple error in std.experimental.logger.core.d

2015-10-27 Thread Chris Piker via Digitalmars-d-learn
Using DMD64 (v2.068.2) on Linux CentOS 6.7, compiler was downloaded from this link: http://downloads.dlang.org/releases/2.x/2.068.2/dmd-2.068.2-0.fedora.x86_64.rpm I get the following compile errors from the experimental logger class:

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread Andrei Alexandrescu via Digitalmars-d
On 10/27/2015 05:26 PM, rsw0x wrote: It has been a great success for Rust, I rarely ever see RC used anywhere in Rust code thanks to borrowing. The new C++ core guidelines are also heavily based on this cf. *_view types in GSL. You can safely ignore the C++ part, the views are unsafe. I'd

Re: Fixing spurious "statement is not reachable" in template code

2015-10-27 Thread Timon Gehr via Digitalmars-d
On 10/27/2015 10:33 PM, deadalnix wrote: On Saturday, 24 October 2015 at 17:25:23 UTC, tsbockman wrote: While improving the DMD front-end's constant folding: https://github.com/D-Programming-Language/dmd/pull/5229 I found out about DMD issue 14835:

Re: splitter, compilation issue

2015-10-27 Thread sigod via Digitalmars-d-learn
Well, problem boils down to `splitter` having a greater constraints than most functions can meet. Thanks everyone for clarification. P.S. Maybe I should repost my question on SO? I really thought it was a bug, so I posted it here.

Re: Automatic method overriding in sub-classes

2015-10-27 Thread bitwise via Digitalmars-d
On Tuesday, 27 October 2015 at 20:05:17 UTC, Tofu Ninja wrote: On Tuesday, 27 October 2015 at 14:47:03 UTC, bitwise wrote: [...] Is there ever a chance the auto override definition would not be available, I think the class chain all the way up to Object always needs to be available at

Metaprogramming get type and field at compile time

2015-10-27 Thread bioinfornatics via Digitalmars-d-learn
Dear, I use FieldTypeTuple and FieldNameTuple to get type and correponding field name but I fail to loop over these tuple. As example: struct Person{ private string name; private ushort age; private bool isMale; this(string name, ushort age, bool isMale){

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread deadalnix via Digitalmars-d
On Tuesday, 27 October 2015 at 20:45:34 UTC, rsw0x wrote: if they're using shared_ptr all over the place, they're doing it wrong. shared_ptr is supposed to be a last resort According to Herb Sutter, it is a zero cost abstraction, not like these pesky GC that makes your program slow.

Re: Fixing spurious "statement is not reachable" in template code

2015-10-27 Thread tsbockman via Digitalmars-d
On Tuesday, 27 October 2015 at 21:14:26 UTC, Timon Gehr wrote: On 10/27/2015 09:18 PM, tsbockman wrote: I don't think any dead code is being generated, This seems to be a misunderstanding. I mean generated using mixins or template instantiation. Sure, it will usually be removed, but why

Re: What's in a empty class?

2015-10-27 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 27 October 2015 at 21:23:45 UTC, TheFlyingFiddle wrote: I can account for the first thing a vtable. But that should only cover 4bytes. What's in the other 4bytes? The monitor used for `synchronized`. (yes, this is something a lot of people want to remove as it is rarely all that

Re: scod - a clean and lightweight theme for ddox

2015-10-27 Thread Bastiaan Veelo via Digitalmars-d-announce
On Tuesday, 27 October 2015 at 11:03:05 UTC, Rory McGuire wrote: I also prefer centre aligned with a max-width. I think its mainly because people mostly centre their screens from their viewpoint and often have large screens "Also"? Nobody argued for max-width but you. Why buy a large

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread PuglyWUgly via Digitalmars-d
Really? I've seen tons of C++ code that's written using smart pointers with objects living on the heap which then get passed around all over the place. Yes there is lots of old C++ code that does this, largely because unique_ptr wasn't implementable until C++11 added R value refs and move

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread bitwise via Digitalmars-d
On Tuesday, 27 October 2015 at 20:41:49 UTC, Jonathan M Davis wrote: On Tuesday, 27 October 2015 at 20:19:42 UTC, PuglyWUgly wrote: [...] Really? I've seen tons of C++ code that's written using smart pointers with objects living on the heap which then get passed around all over the place.

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread Andrei Alexandrescu via Digitalmars-d
On 10/27/2015 04:19 PM, PuglyWUgly wrote: Reference counting == rare and unimportant That doesn't seem to be the case at all. -- Andrei

Re: Fixing spurious "statement is not reachable" in template code

2015-10-27 Thread deadalnix via Digitalmars-d
On Saturday, 24 October 2015 at 17:25:23 UTC, tsbockman wrote: While improving the DMD front-end's constant folding: https://github.com/D-Programming-Language/dmd/pull/5229 I found out about DMD issue 14835: https://issues.dlang.org/show_bug.cgi?id=14835 Briefly:

Re: scod - a clean and lightweight theme for ddox

2015-10-27 Thread Bastiaan Veelo via Digitalmars-d-announce
On Tuesday, 27 October 2015 at 21:28:25 UTC, Bastiaan Veelo wrote: Nobody argued for max-width but you. Sorry - have to take that back on closer reading.

Re: What's in a empty class?

2015-10-27 Thread TheFlyingFiddle via Digitalmars-d-learn
On Tuesday, 27 October 2015 at 21:28:31 UTC, Adam D. Ruppe wrote: On Tuesday, 27 October 2015 at 21:23:45 UTC, TheFlyingFiddle wrote: I can account for the first thing a vtable. But that should only cover 4bytes. What's in the other 4bytes? The monitor used for `synchronized`. (yes, this is

Re: splitter, compilation issue

2015-10-27 Thread Ali Çehreli via Digitalmars-d-learn
On 10/27/2015 02:55 PM, Adam D. Ruppe wrote: On Tuesday, 27 October 2015 at 21:45:10 UTC, Ali Çehreli wrote: split's documentation says that it requires a ForwardRange but the output of filter is an InputRange. (I can't imagine now why split has that requirement.) You need to .save at the

Re: splitter, compilation issue

2015-10-27 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 27 October 2015 at 21:45:10 UTC, Ali Çehreli wrote: split's documentation says that it requires a ForwardRange but the output of filter is an InputRange. (I can't imagine now why split has that requirement.) You need to .save at the beginning so when you hit the split point, it

Re: Fixing spurious "statement is not reachable" in template code

2015-10-27 Thread Timon Gehr via Digitalmars-d
On 10/27/2015 10:29 PM, tsbockman wrote: On Tuesday, 27 October 2015 at 21:14:26 UTC, Timon Gehr wrote: On 10/27/2015 09:18 PM, tsbockman wrote: I don't think any dead code is being generated, This seems to be a misunderstanding. I mean generated using mixins or template instantiation. Sure,

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread rsw0x via Digitalmars-d
On Tuesday, 27 October 2015 at 21:50:15 UTC, Andrei Alexandrescu wrote: On 10/27/2015 05:26 PM, rsw0x wrote: It has been a great success for Rust, I rarely ever see RC used anywhere in Rust code thanks to borrowing. The new C++ core guidelines are also heavily based on this cf. *_view types

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread PuglyWUgly via Digitalmars-d
You can safely ignore the C++ part, the views are unsafe. I'd appreciate if you backed up your claim on Rust. -- Andrei I did a rough check of the Rust compiler source(from a copy I downloaded a couple months ago). I think the compiler is supposedly filled with old code, not sure if it is

Re: splitter, compilation issue

2015-10-27 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 27 October 2015 at 22:18:55 UTC, sigod wrote: P.S. Maybe I should repost my question on SO? I really thought it was a bug, so I posted it here. You could, but I'd say the same thing there - it is no bug, the algorithm legitimately needs that functionality to split successfully.

Re: splitter, compilation issue

2015-10-27 Thread sigod via Digitalmars-d-learn
On Tuesday, 27 October 2015 at 22:33:32 UTC, Adam D. Ruppe wrote: On Tuesday, 27 October 2015 at 22:18:55 UTC, sigod wrote: P.S. Maybe I should repost my question on SO? I really thought it was a bug, so I posted it here. You could, but I'd say the same thing there I don't expect different

Re: splitter, compilation issue

2015-10-27 Thread Ali Çehreli via Digitalmars-d-learn
On 10/27/2015 01:58 PM, sigod wrote: Here's simple code: import std.algorithm; import std.array; import std.file; void main(string[] args) { auto t = args[1].readText() .splitter('\n') .filter!(e => e.length)

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread deadalnix via Digitalmars-d
On Tuesday, 27 October 2015 at 21:50:15 UTC, Andrei Alexandrescu wrote: On 10/27/2015 05:26 PM, rsw0x wrote: It has been a great success for Rust, I rarely ever see RC used anywhere in Rust code thanks to borrowing. The new C++ core guidelines are also heavily based on this cf. *_view types

How to set Global Log level in an application

2015-10-27 Thread Chris Piker via Digitalmars-d-learn
On Tuesday, 27 October 2015 at 21:50:31 UTC, Chris Piker wrote: I get the following compile errors from the experimental logger class: /usr/include/dmd/phobos/std/experimental/logger/core.d(702): Error: long has no effect in expression (cast(ubyte)160u) Solved: Finally found how to set

Re: Metaprogramming get type and field at compile time

2015-10-27 Thread Ali Çehreli via Digitalmars-d-learn
On 10/27/2015 03:34 PM, bioinfornatics wrote: > I use FieldTypeTuple and FieldNameTuple to get type and correponding > field name but I fail to loop over these tuple. You can use the .tupleof property and a compile-time foreach: http://dlang.org/class.html (Search for .tuplof on that page)

Re: Fixing spurious "statement is not reachable" in template code

2015-10-27 Thread Timon Gehr via Digitalmars-d
On 10/27/2015 09:18 PM, tsbockman wrote: On Tuesday, 27 October 2015 at 19:30:08 UTC, Timon Gehr wrote: On 10/27/2015 06:35 PM, Steven Schveighoffer wrote: I understand how the compiler treats it. In some cases, the statement is reachable, the compiler is unhelpfully pointing out cases where

Re: Option types and pattern matching.

2015-10-27 Thread TheFlyingFiddle via Digitalmars-d
On Tuesday, 27 October 2015 at 17:48:04 UTC, Meta wrote: On Tuesday, 27 October 2015 at 15:06:07 UTC, TheFlyingFiddle wrote: This can arguably already be done cleaner in D. if (auto worldFile = getAFile("world.json")) { auto world = parseJSON(worldFile); if (auto mapFile =

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread rsw0x via Digitalmars-d
On Tuesday, 27 October 2015 at 21:20:58 UTC, Andrei Alexandrescu wrote: On 10/27/2015 04:45 PM, rsw0x wrote: On Tuesday, 27 October 2015 at 20:41:49 UTC, Jonathan M Davis wrote: On Tuesday, 27 October 2015 at 20:19:42 UTC, PuglyWUgly wrote: Why care about this? Even Rust doesn't try to

Re: splitter, compilation issue

2015-10-27 Thread sigod via Digitalmars-d-learn
On Tuesday, 27 October 2015 at 21:54:33 UTC, Jonathan M Davis wrote: Well, split calls splitter, and it doesn't make much of an attempt to check its arguments in its template constraint, mostly passing the buck onto splitter, since it's really just a wrapper around splitter that calls array on

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread PuglyWUgly via Digitalmars-d
Well perhaps D prefers the Swift route, with everyone ref counted & some compiler help. Nothing wrong with that I guess, I haven't been paying attention to what D is planning exactly.

What's in a empty class?

2015-10-27 Thread TheFlyingFiddle via Digitalmars-d-learn
With this code: class A { } pragma(msg, __traits(classInstanceSize, A)); I get the output 8 (32-bit). I can account for the first thing a vtable. But that should only cover 4bytes. What's in the other 4bytes?

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread Andrei Alexandrescu via Digitalmars-d
On 10/27/2015 04:45 PM, rsw0x wrote: On Tuesday, 27 October 2015 at 20:41:49 UTC, Jonathan M Davis wrote: On Tuesday, 27 October 2015 at 20:19:42 UTC, PuglyWUgly wrote: Why care about this? Even Rust doesn't try to solve this problem...because it isn't really a problem in practice. In

Re: splitter, compilation issue

2015-10-27 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, October 27, 2015 20:58:56 sigod via Digitalmars-d-learn wrote: > Here's simple code: > > import std.algorithm; > import std.array; > import std.file; > > void main(string[] args) > { > auto t = args[1].readText() > .splitter('\n') > .filter!(e =>

Re: splitter, compilation issue

2015-10-27 Thread sigod via Digitalmars-d-learn
On Tuesday, 27 October 2015 at 21:45:10 UTC, Ali Çehreli wrote: On 10/27/2015 01:58 PM, sigod wrote: Here's simple code: import std.algorithm; import std.array; import std.file; void main(string[] args) { auto t = args[1].readText()

Re: splitter, compilation issue

2015-10-27 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 28 October 2015 at 00:07:23 UTC, sigod wrote: Only removed `filter` from code. You know, I was just writing an answer for this and I kinda changed my mind. Without filter... I think splitter.splitter ought to work. The implementation requires slicing unless you pass it a

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, 27 October 2015 at 21:50:15 UTC, Andrei Alexandrescu wrote: On 10/27/2015 05:26 PM, rsw0x wrote: It has been a great success for Rust, I rarely ever see RC used anywhere in Rust code thanks to borrowing. The new C++ core guidelines are also heavily based on this cf. *_view types

Re: Automatic method overriding in sub-classes

2015-10-27 Thread Tofu Ninja via Digitalmars-d
On Tuesday, 27 October 2015 at 22:23:15 UTC, bitwise wrote: [...] I just did a test for this. Using dmd's -H flag to generate header files, the bodies of member functions are removed. If you link a static library containing the compiled class though, everything will work, and you can still

Re: Make all new symbols go through std.experimental?

2015-10-27 Thread Jakob Ovrum via Digitalmars-d
On Wednesday, 28 October 2015 at 00:28:51 UTC, Andrei Alexandrescu wrote: I was looking at https://github.com/D-Programming-Language/phobos/pull/3765 and whilst it's a sensible addition, I'm thinking we'd want to pass it and all other library additions through std.experimental first. So we'd

Re: splitter, compilation issue

2015-10-27 Thread sigod via Digitalmars-d-learn
On Tuesday, 27 October 2015 at 22:56:07 UTC, sigod wrote: On Tuesday, 27 October 2015 at 22:33:32 UTC, Adam D. Ruppe wrote: On Tuesday, 27 October 2015 at 22:18:55 UTC, sigod wrote: P.S. Maybe I should repost my question on SO? I really thought it was a bug, so I posted it here. You could,

Make all new symbols go through std.experimental?

2015-10-27 Thread Andrei Alexandrescu via Digitalmars-d
I was looking at https://github.com/D-Programming-Language/phobos/pull/3765 and whilst it's a sensible addition, I'm thinking we'd want to pass it and all other library additions through std.experimental first. So we'd have a std.experimental.range package that would be a purgatory for things

Re: Make all new symbols go through std.experimental?

2015-10-27 Thread Jack Stouffer via Digitalmars-d
On Wednesday, 28 October 2015 at 00:28:51 UTC, Andrei Alexandrescu wrote: I was looking at https://github.com/D-Programming-Language/phobos/pull/3765 and whilst it's a sensible addition, I'm thinking we'd want to pass it and all other library additions through std.experimental first. So we'd

Re: Metaprogramming get type and field at compile time

2015-10-27 Thread bioinfornatics via Digitalmars-d-learn
On Tuesday, 27 October 2015 at 22:53:35 UTC, Ali Çehreli wrote: On 10/27/2015 03:34 PM, bioinfornatics wrote: > I use FieldTypeTuple and FieldNameTuple to get type and correponding > field name but I fail to loop over these tuple. You can use the .tupleof property and a compile-time foreach:

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread Walter Bright via Digitalmars-d
On 10/27/2015 11:10 AM, deadalnix wrote: I've made the claim that we should implement reference counting as a library many time, so I think I should explicit my position. Indeed, RC require some level a compiler support to be safe. That being said, the support does not need to be specific to RC.

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread Walter Bright via Digitalmars-d
On 10/27/2015 9:03 AM, Andrei Alexandrescu wrote: On 10/27/15 11:59 AM, Jonathan M Davis wrote: What's the lifetime mailing list? To be created. -- Andrei And you'll be in it for life, so be sure you want to join :-)

Re: Make all new symbols go through std.experimental?

2015-10-27 Thread Rikki Cattermole via Digitalmars-d
On 28/10/15 1:28 PM, Andrei Alexandrescu wrote: I was looking at https://github.com/D-Programming-Language/phobos/pull/3765 and whilst it's a sensible addition, I'm thinking we'd want to pass it and all other library additions through std.experimental first. So we'd have a std.experimental.range

Re: Fixing spurious "statement is not reachable" in template code

2015-10-27 Thread Daniel Murphy via Digitalmars-d
On 28/10/2015 8:29 AM, tsbockman wrote: On Tuesday, 27 October 2015 at 21:14:26 UTC, Timon Gehr wrote: On 10/27/2015 09:18 PM, tsbockman wrote: I don't think any dead code is being generated, This seems to be a misunderstanding. I mean generated using mixins or template instantiation. Sure,

Re: Fixing spurious "statement is not reachable" in template code

2015-10-27 Thread tsbockman via Digitalmars-d
On Tuesday, 27 October 2015 at 21:33:04 UTC, deadalnix wrote: If this was a static if, then generating a error is reasonable, but with a regular if, it isn't. As Daniel Murphy pointed out earlier, a surefire way to *prevent* the warning is to use `static if`; code hidden by a `static if`

Re: asm+D build bootloader

2015-10-27 Thread lobo via Digitalmars-d-learn
On Tuesday, 27 October 2015 at 12:13:13 UTC, guodemone wrote: sorry,My english is poot. file asm.h [...] Can ldc work with C header files? I don't think it can but I could be wrong. Here's how I build my 32-bit bootloader and link with my kernel main (you will have to replace names

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread deadalnix via Digitalmars-d
On Wednesday, 28 October 2015 at 01:13:16 UTC, Walter Bright wrote: It's not just safety. If the compiler knows that reference counting is going on, it can potentially elide a lot of the overhead. If it is faced with an arbitrary library solution, it only has a worm's eye view of it, and

[Issue 15251] [REG2.069.0-rc1] std.datetime bug with -inline

2015-10-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15251 Kenji Hara changed: What|Removed |Added Keywords||CTFE, pull

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread rsw0x via Digitalmars-d
On Wednesday, 28 October 2015 at 03:55:25 UTC, deadalnix wrote: If I had to go about this, I'd rather see the introduction a scope(exit/success/failure) like mechanism for destructors rather than something ref counting specific. can you expand upon this?

Re: Fixing spurious "statement is not reachable" in template code

2015-10-27 Thread tsbockman via Digitalmars-d
On Wednesday, 28 October 2015 at 03:38:37 UTC, Daniel Murphy wrote: I personally like the style of that code, and agree that it allows less repetition. But it does this at the cost of intentionally introducing dead code in some instantiations. If you enable the compiler warnings about dead

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread Sebastiaan Koppe via Digitalmars-d
On Tuesday, 27 October 2015 at 11:41:52 UTC, Andrei Alexandrescu wrote: The crux of the matter is modular typechecking. Consider the following example: // module widget.d @safe class Widget { void fun() { g_widget = this; } } static Widget g_widget; // end of module widget.d Now, once

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, 28 October 2015 at 02:08:18 UTC, Sebastiaan Koppe wrote: On Tuesday, 27 October 2015 at 11:41:52 UTC, Andrei Alexandrescu wrote: The crux of the matter is modular typechecking. Consider the following example: // module widget.d @safe class Widget { void fun() { g_widget =

Re: Lifetime study group

2015-10-27 Thread Vladimir Panteleev via Digitalmars-d
On Tuesday, 27 October 2015 at 21:12:24 UTC, Andrei Alexandrescu wrote: Thanks to all interested! Brad Roberts created a mailing list. Please subscribe here: http://lists.puremagic.com/cgi-bin/mailman/listinfo/dlang-study That will be a list for several other topics, so please prefix new

Re: Make all new symbols go through std.experimental?

2015-10-27 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, 28 October 2015 at 00:28:51 UTC, Andrei Alexandrescu wrote: I was looking at https://github.com/D-Programming-Language/phobos/pull/3765 and whilst it's a sensible addition, I'm thinking we'd want to pass it and all other library additions through std.experimental first. So we'd

My email: 704975...@qq.com

2015-10-27 Thread guodemone via Digitalmars-d-learn
thank you.

Hello,Can you give me your files[kickstart32.s kmain.d linker32.ld makefile]?

2015-10-27 Thread guodemone via Digitalmars-d-learn
My english is poor. My code to build is wrong.so need make some improvements. I would like to refer to your 32-bit code, make some improvements.

Re: Fixing spurious "statement is not reachable" in template code

2015-10-27 Thread tsbockman via Digitalmars-d
On Tuesday, 27 October 2015 at 21:55:28 UTC, Timon Gehr wrote: On 10/27/2015 10:29 PM, tsbockman wrote: On Tuesday, 27 October 2015 at 21:14:26 UTC, Timon Gehr wrote: On 10/27/2015 09:18 PM, tsbockman wrote: I don't think any dead code is being generated, This seems to be a

[Issue 15246] Destructor inheritance doesn't inherit attributes properly

2015-10-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15246 --- Comment #6 from Marco Leise --- I'd agree with you if this was all not observable, but your change causes friction that I object against. It should be either inheritance all the way or just sequential calls as right now.

[Issue 15251] [REG2.069.0-rc1] std.datetime bug with -inline

2015-10-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15251 --- Comment #5 from Martin Nowak --- (In reply to Martin Nowak from comment #3) > Confirmed, currently reducing. Not much better. cat > bug.d << CODE import std.concurrency; void receiveAsyncChunks(Tid fromTid) {

[Issue 15246] Destructor inheritance doesn't inherit attributes properly

2015-10-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15246 --- Comment #7 from Andrei Alexandrescu --- @mleise that is surprising. I assumed calling __dtor also invokes the base destructors. What is the canonical way to destroy a D class properly? (This bug report stands.) --

Re: Automatic method overriding in sub-classes

2015-10-27 Thread bitwise via Digitalmars-d
On Tuesday, 27 October 2015 at 07:52:27 UTC, Jacob Carlborg wrote: On 2015-10-27 00:25, Tofu Ninja wrote: I know this has basically no chance of ever actually being added because that is the way of all "I want feature X" threads, but I thought I would post this anyways because I seem to want

Re: Fastest JSON parser in the world is a D project

2015-10-27 Thread Martin Nowak via Digitalmars-d-announce
On Tuesday, 27 October 2015 at 13:14:36 UTC, wobbles wrote: How can `coordinates` member be known at compile-time when the input argument is a run-time string? I suspect through the opDispatch operator overload. http://dlang.org/operatoroverloading.html#dispatch Yikes, this is such an

[Issue 15248] Function in current module is not allowed to overload imported function

2015-10-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15248 --- Comment #3 from Shriramana Sharma --- @Vladimir: Thanks, but I realize that workarounds exist. However if http://dlang.org/hijack.html is an accurate description of the hijacking prevention mechanism then the compiler (and the

<    1   2