Re: Is there any good reason why C++ namespaces are "closed" in D?

2018-08-05 Thread Manu via Digitalmars-d
On Sun, 5 Aug 2018 at 16:30, Walter Bright via Digitalmars-d wrote: > > On 8/4/2018 12:45 AM, Manu wrote: > > [...] > I get it, Manu, you don't find my arguments compelling. You've put these forth > before, and I could repeat myself rebutting each. I expect we're at a dead end > with that. So,

Re: Dpp on run.dlang.io

2018-08-05 Thread Mike Franklin via Digitalmars-d-announce
On Saturday, 4 August 2018 at 09:43:13 UTC, Dukc wrote: On Saturday, 4 August 2018 at 02:39:23 UTC, Mike Franklin wrote: Cool! Can we now deprecate and eventually jettison C/C++ bindings from druntime, please? Why? The C standard library not a true and intrinsic dependency of D, and is

Re: Implement a file system for use in embedded systems

2018-08-05 Thread Jonathan Marler via Digitalmars-d
On Sunday, 5 August 2018 at 05:53:20 UTC, Mike Franklin wrote: On Saturday, 4 August 2018 at 18:24:28 UTC, B Krishnan Iyer wrote: I had some questions regarding the project and also needed some pointers to get started with the project. Also, more it would be great if more description of the

Re: Is there any good reason why C++ namespaces are "closed" in D?

2018-08-05 Thread Walter Bright via Digitalmars-d
On 8/2/2018 5:23 PM, rikki cattermole wrote: Because it will affect mangling only, do we have any examples of c/c++ code that appends _'s to it that is used by the D community? The __ scheme won't break existing code, and we don't need a survey to show that.

[Issue 19142] ddoc inline code see # as a warning

2018-08-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19142 ag0aep6g changed: What|Removed |Added Status|NEW |RESOLVED CC|

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-08-05 Thread Nicholas Wilson via Digitalmars-d-announce
On Sunday, 5 August 2018 at 20:01:22 UTC, Nikos wrote: Thank you very much for your feedback. Unfortunately, none of the above worked. By the way, the reason I'm trying all this is to create a Jupyter notebook. I've already made a simple version of it some time ago

Re: Dpp on run.dlang.io

2018-08-05 Thread Nicholas Wilson via Digitalmars-d-announce
On Sunday, 5 August 2018 at 22:43:42 UTC, Laeeth Isharc wrote: One benefit of D is as a better glue language that integrates well with other languages and ecosystems. Many people who know a bit about D have no idea that interop can work so easily or well. So it might be worth mentioning

Re: Is there any good reason why C++ namespaces are "closed" in D?

2018-08-05 Thread Walter Bright via Digitalmars-d
On 8/4/2018 12:45 AM, Manu wrote: [...] I get it, Manu, you don't find my arguments compelling. You've put these forth before, and I could repeat myself rebutting each. I expect we're at a dead end with that. But the fact remains, I've shown both you and Atila how to make things work for

[Issue 19142] New: ddoc inline code see # as a warning

2018-08-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19142 Issue ID: 19142 Summary: ddoc inline code see # as a warning Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: enhancement

Re: Dpp on run.dlang.io

2018-08-05 Thread Laeeth Isharc via Digitalmars-d-announce
On Saturday, 4 August 2018 at 13:15:24 UTC, Seb wrote: On Saturday, 4 August 2018 at 01:27:49 UTC, Laeeth Isharc wrote: Thanks to Seb and Atila it is now very easy to show a D program just #includeing C headers. If just works. Modulo bugs. In time I am hopeful Atila will start to have more

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-08-05 Thread Laeeth Isharc via Digitalmars-d-announce
On Sunday, 5 August 2018 at 20:01:22 UTC, Nikos wrote: On Tuesday, 31 July 2018 at 09:09:11 UTC, Nicholas Wilson wrote: On Sunday, 29 July 2018 at 18:14:31 UTC, Nikos wrote: But when I try to export the whole dmdEngine export: auto engine(char[] txt) { return

Re: weak_ptr alternative

2018-08-05 Thread Kamil Koczurek via Digitalmars-d-learn
On Sunday, 5 August 2018 at 20:57:32 UTC, aliak wrote: On Sunday, 5 August 2018 at 20:10:49 UTC, Kamil Koczurek wrote: Is there a way to keep track of objects without owning them? That is, could I have a smart pointer that behaves somewhat like this: WeakPtr!Class wptr = getSomeInstance();

Re: weak_ptr alternative

2018-08-05 Thread aliak via Digitalmars-d-learn
On Sunday, 5 August 2018 at 20:10:49 UTC, Kamil Koczurek wrote: Is there a way to keep track of objects without owning them? That is, could I have a smart pointer that behaves somewhat like this: WeakPtr!Class wptr = getSomeInstance(); auto obj = wptr.peek; //[1] if(obj !is null) {

weak_ptr alternative

2018-08-05 Thread Kamil Koczurek via Digitalmars-d-learn
Is there a way to keep track of objects without owning them? That is, could I have a smart pointer that behaves somewhat like this: WeakPtr!Class wptr = getSomeInstance(); auto obj = wptr.peek; //[1] if(obj !is null) { obj.stuff(); } [1]: If wptr points to something that is still reachable

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-08-05 Thread Nikos via Digitalmars-d-announce
On Tuesday, 31 July 2018 at 09:09:11 UTC, Nicholas Wilson wrote: On Sunday, 29 July 2018 at 18:14:31 UTC, Nikos wrote: But when I try to export the whole dmdEngine export: auto engine(char[] txt) { return interpreter(dmdEngine()); } Can you export an instance of

Re: What does std.traits.hasAliasing do

2018-08-05 Thread Venkat via Digitalmars-d-learn
Thankyou.

[Issue 19141] Destructors are called for multiple anonymous union members

2018-08-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19141 Simen Kjaeraas changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 19122] Multiple destruction of union members

2018-08-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19122 Simen Kjaeraas changed: What|Removed |Added CC||snarwin+bugzi...@gmail.com --- Comment #1

[Issue 19141] New: Destructors are called for multiple anonymous union members

2018-08-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19141 Issue ID: 19141 Summary: Destructors are called for multiple anonymous union members Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW

Re: Can you tell if an template alias parameter is of a specific template?

2018-08-05 Thread aliak via Digitalmars-d-learn
On Saturday, 4 August 2018 at 12:54:49 UTC, Steven Schveighoffer wrote: Once you have an alias, it's the original thing in all respects. So there's no way to get the specific alias that was used. That's not a bug, but a feature. Aha. Thanks. I've tried std.traits.TemplateOf and

[Issue 19126] Compiler removes inout on templated parameter and then complains it's not there

2018-08-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19126 --- Comment #12 from Ali Ak --- (In reply to Steven Schveighoffer from comment #11) > > I'm still finding trouble understanding why you want to specify immutable > explicitly as the T value. Why not just mutable T? Then you don't need that >

Re: @nogc closures

2018-08-05 Thread Paul Backus via Digitalmars-d-learn
On Sunday, 5 August 2018 at 12:23:17 UTC, vit wrote: Yes, it isn't possible. I modify filter a and map from std.algorithm: void main()@nogc{ import std.experimental.all; const int j = 2; int i = 0; const int[3] tmp = [1, 2, 3]; tmp[]

Re: foreach on a tuple using aliases

2018-08-05 Thread Timon Gehr via Digitalmars-d-learn
On 05.08.2018 16:07, Steven Schveighoffer wrote: I have found something that looks like a bug to me, but also looks like it could simply be a limitation of the foreach construct. Consider this code: struct Foo {} enum isFoo(alias x) = is(typeof(x) == Foo); void main() {     Foo foo;    

Re: Is there any hope for "lazy" and @nogc?

2018-08-05 Thread Nick Treleaven via Digitalmars-d
On Tuesday, 31 July 2018 at 20:03:39 UTC, ag0aep6g wrote: Looks like you can do it with a "lazy variadic function" [1], Interesting, thanks. I've made a pull to add a See Also link about this to the Lazy Parameters docs: https://github.com/dlang/dlang.org/pull/2439

Re: foreach on a tuple using aliases

2018-08-05 Thread Alex via Digitalmars-d-learn
On Sunday, 5 August 2018 at 14:07:30 UTC, Steven Schveighoffer wrote: I have found something that looks like a bug to me, but also looks like it could simply be a limitation of the foreach construct. Consider this code: struct Foo {} enum isFoo(alias x) = is(typeof(x) == Foo); void main()

foreach on a tuple using aliases

2018-08-05 Thread Steven Schveighoffer via Digitalmars-d-learn
I have found something that looks like a bug to me, but also looks like it could simply be a limitation of the foreach construct. Consider this code: struct Foo {} enum isFoo(alias x) = is(typeof(x) == Foo); void main() { Foo foo; assert(isFoo!foo); static struct X { int i; Foo

Re: @nogc closures

2018-08-05 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/5/18 8:23 AM, vit wrote: On Sunday, 5 August 2018 at 10:57:32 UTC, Steven Schveighoffer wrote: On 8/5/18 5:20 AM, vit wrote: It's possible create something like this without errors? void main()@nogc{   //Error: function `app.main` is `@nogc` //  yet allocates

Re: Dub project has both .sdl and .json files. Is this normal or did I do something wrong?

2018-08-05 Thread Jacob Carlborg via Digitalmars-d-learn
On 2018-08-05 10:30, Bastiaan Veelo wrote: You mean the dependency range in dub.selections.json of an app on code.dlang.org? I would be in favour of it being a range, but I think that is unusual. Usually people just commit the generated file unedited, which seems to always be pinned to the

Re: @nogc closures

2018-08-05 Thread vit via Digitalmars-d-learn
On Sunday, 5 August 2018 at 10:57:32 UTC, Steven Schveighoffer wrote: On 8/5/18 5:20 AM, vit wrote: It's possible create something like this without errors? void main()@nogc{   //Error: function `app.main` is `@nogc`     //  yet allocates closures with the GC     import

[Issue 19140] [REG master] AssertError@dmd/ctfeexpr.d(229): Assertion failure

2018-08-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19140 Iain Buclaw changed: What|Removed |Added Assignee|nob...@puremagic.com|ibuc...@gdcproject.org --

[Issue 19140] [REG master] AssertError@dmd/ctfeexpr.d(229): Assertion failure

2018-08-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19140 Iain Buclaw changed: What|Removed |Added Status|NEW |ASSIGNED --

[Issue 19140] [REG master] AssertError@dmd/ctfeexpr.d(229): Assertion failure

2018-08-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19140 --- Comment #1 from Iain Buclaw --- https://github.com/dlang/dmd/pull/8537 --

Re: @nogc closures

2018-08-05 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/5/18 5:20 AM, vit wrote: It's possible create something like this without errors? void main()@nogc{   //Error: function `app.main` is `@nogc`     //  yet allocates closures with the GC     import std.experimental.all;     const int j = 2;     int i = 0;     const

Re: Compiler build error

2018-08-05 Thread Nicholas Wilson via Digitalmars-d-learn
On Sunday, 5 August 2018 at 10:12:39 UTC, Alex wrote: On Sunday, 5 August 2018 at 01:15:07 UTC, Nicholas Wilson wrote: On Saturday, 4 August 2018 at 18:12:05 UTC, Alex wrote: On Saturday, 4 August 2018 at 13:26:01 UTC, Nicholas Wilson That is a very long stacks trace and combined with the very

[Issue 19140] New: [REG master] AssertError@dmd/ctfeexpr.d(229): Assertion failure

2018-08-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19140 Issue ID: 19140 Summary: [REG master] AssertError@dmd/ctfeexpr.d(229): Assertion failure Product: D Version: D2 Hardware: All OS: All Status: NEW

[Issue 19140] [REG master] AssertError@dmd/ctfeexpr.d(229): Assertion failure

2018-08-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19140 Iain Buclaw changed: What|Removed |Added CC||ibuc...@gdcproject.org --

Re: @nogc closures

2018-08-05 Thread Alex via Digitalmars-d-learn
On Sunday, 5 August 2018 at 09:20:21 UTC, vit wrote: It's possible create something like this without errors? void main()@nogc{ //Error: function `app.main` is `@nogc` // yet allocates closures with the GC import std.experimental.all; const int j = 2; int i =

Re: Compiler build error

2018-08-05 Thread Alex via Digitalmars-d-learn
On Sunday, 5 August 2018 at 01:15:07 UTC, Nicholas Wilson wrote: On Saturday, 4 August 2018 at 18:12:05 UTC, Alex wrote: On Saturday, 4 August 2018 at 13:26:01 UTC, Nicholas Wilson That is a very long stacks trace and combined with the very short stack trace on OSX, this is probably a stack

[Issue 19139] Need a convenient syntax for invoking nested templates

2018-08-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19139 Simen Kjaeraas changed: What|Removed |Added CC||simen.kja...@gmail.com

@nogc closures

2018-08-05 Thread vit via Digitalmars-d-learn
It's possible create something like this without errors? void main()@nogc{ //Error: function `app.main` is `@nogc` // yet allocates closures with the GC import std.experimental.all; const int j = 2; int i = 0; const int[3] tmp = [1, 2, 3]; tmp[]

Re: Symmetry Autumn of Code

2018-08-05 Thread Mike Parker via Digitalmars-d-announce
On Sunday, 5 August 2018 at 08:01:47 UTC, Ecstatic Coder wrote: Btw I *had* ("And I'd be glad to mentor you on this :)", here on July 24th). Thanks for remembering me why I now better enjoy the Crystal community... Sorry, I seem to have missed that. But to quote from the SAoC page [1]:

Re: Symmetry Autumn of Code

2018-08-05 Thread Ecstatic Coder via Digitalmars-d-announce
On Sunday, 5 August 2018 at 05:22:44 UTC, Mike Franklin wrote: On Sunday, 5 August 2018 at 04:47:42 UTC, tanner00 wrote: Hi, I’m interested in working on this project and just wanted to touch base. Is there any word on who will be mentoring this project? I’m entering college this fall but

Re: Dub project has both .sdl and .json files. Is this normal or did I do something wrong?

2018-08-05 Thread Bastiaan Veelo via Digitalmars-d-learn
On Saturday, 4 August 2018 at 17:53:45 UTC, Neia Neutuladh wrote: On Friday, 3 August 2018 at 19:41:32 UTC, Bastiaan Veelo wrote: But if you commit it, and a compiler deprecation causes a dependency in that pinned version to fail to compile, then your app won't compile either, even though your

Re: Symmetry Autumn of Code

2018-08-05 Thread Ecstatic Coder via Digitalmars-d-announce
On Sunday, 5 August 2018 at 05:16:50 UTC, Mike Parker wrote: On Sunday, 5 August 2018 at 04:47:42 UTC, tanner00 wrote: [...] Hi, I’m interested in working on this project and just wanted to touch base. Is there any word on who will be mentoring this project? I’m entering college this fall

Re: Symmetry Autumn of Code

2018-08-05 Thread rikki cattermole via Digitalmars-d-announce
On 05/08/2018 5:22 PM, Mike Franklin wrote: The project is mostly about creating high-performance, resource-efficient 2D software rasterizer, something like this (http://nothings.org/gamedev/rasterize/) or

Re: Is there any hope for "lazy" and @nogc?

2018-08-05 Thread Jacob Carlborg via Digitalmars-d
On 2018-07-31 09:17, Shachar Shemesh wrote: I'm trying to figure out what's the signature of the built-in assert. It does not seem that I can define a similar function myself. First attempt: void myAssert(bool cond, string msg) @nogc nothrow; No, because msg gets evaluated unconditionally.