Re: Should aliasing a lambda expression be allowed?

2017-11-16 Thread Meta via Digitalmars-d
On Thursday, 16 November 2017 at 13:05:51 UTC, Petar Kirov [ZombineDev] wrote: On Wednesday, 15 November 2017 at 19:29:29 UTC, Steven Schveighoffer wrote: On 11/15/17 11:59 AM, Andrea Fontana wrote: On Wednesday, 15 November 2017 at 15:25:06 UTC, Steven Schveighoffer wrote: alias foo =

Re: Should aliasing a lambda expression be allowed?

2017-11-16 Thread Petar via Digitalmars-d
On Wednesday, 15 November 2017 at 19:29:29 UTC, Steven Schveighoffer wrote: On 11/15/17 11:59 AM, Andrea Fontana wrote: On Wednesday, 15 November 2017 at 15:25:06 UTC, Steven Schveighoffer wrote: alias foo = lambda1; alias foo = lambda2; What? Yep. Would never have tried that in a million

Re: NIO+Multithreaded TCPSocket listener, very low cpu utilisation

2017-11-16 Thread ade90036 via Digitalmars-d-learn
On Wednesday, 15 November 2017 at 23:04:46 UTC, kdevel wrote: On Wednesday, 15 November 2017 at 13:31:46 UTC, Daniel Kozak wrote: This one works ok for me, but I am on linux: https://dpaste.dzfl.pl/f54decee45bc It works, but it does not handle two connects in parallel. STR: 1. start the

Re: ESR on post-C landscape

2017-11-16 Thread Ola Fosheim Grostad via Digitalmars-d-learn
On Thursday, 16 November 2017 at 11:24:09 UTC, codephantom wrote: On Thursday, 16 November 2017 at 06:35:30 UTC, Ola Fosheim Grostad wrote: Yes, I agree that classes are a powerful modelling primitive, but my point was that Stroustrup made classes the 'primary focus of program design'. Yes,

Re: User defined type and foreach

2017-11-16 Thread Tony via Digitalmars-d-learn
On Thursday, 16 November 2017 at 13:10:11 UTC, ag0aep6g wrote: On 11/16/2017 09:03 AM, Tony wrote: However, when I use the class with foreach, the opindex gets called to create a dynamic array, rather than use the empty(),front(),popFront() routines. I would prefer it use the three methods,

Re: DConf 2018 Logo

2017-11-16 Thread JamesD via Digitalmars-d
On Wednesday, 15 November 2017 at 22:43:03 UTC, codephantom wrote: On Wednesday, 15 November 2017 at 14:56:53 UTC, Andrei Alexandrescu wrote: Hello, for all of you with expertise in graphics, we'd be in your debt if you could create a logo for DConf 2018. Proposals would be appreciated!

Re: User defined type and foreach

2017-11-16 Thread ag0aep6g via Digitalmars-d-learn
On 11/16/2017 09:03 AM, Tony wrote: However, when I use the class with foreach, the opindex gets called to create a dynamic array, rather than use the empty(),front(),popFront() routines. I would prefer it use the three methods, rather than create a dynamic array.

Re: User defined type and foreach

2017-11-16 Thread Tony via Digitalmars-d-learn
On Thursday, 16 November 2017 at 13:35:13 UTC, Tony wrote: On Thursday, 16 November 2017 at 13:10:11 UTC, ag0aep6g wrote: On 11/16/2017 09:03 AM, Tony wrote: However, when I use the class with foreach, the opindex gets called to create a dynamic array, rather than use the

Re: DConf 2018 Logo

2017-11-16 Thread Dukc via Digitalmars-d
On Wednesday, 15 November 2017 at 14:56:53 UTC, Andrei Alexandrescu wrote: Hello, for all of you with expertise in graphics, we'd be in your debt if you could create a logo for DConf 2018. Proposals would be appreciated! Thanks, Andrei Probably too crude to be worth considering but feel

Re: User defined type and foreach

2017-11-16 Thread Tony via Digitalmars-d-learn
On Thursday, 16 November 2017 at 12:56:18 UTC, Steven Schveighoffer wrote: On 11/16/17 3:03 AM, Tony wrote: I made a stack data type and created an opIndex() so it could be turned into a dynamic array, and created empty() (unfortunate name), front() and popFront() methods, which I read allow

Re: User defined type and foreach

2017-11-16 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/16/17 3:03 AM, Tony wrote: I made a stack data type and created an opIndex() so it could be turned into a dynamic array, and created empty() (unfortunate name), front() and popFront() methods, which I read allow it to be used with foreach. However, when I use the class with foreach, the

Re: writeln, alias this and dynamic arrays.

2017-11-16 Thread Michael V. Franklin via Digitalmars-d-learn
On Friday, 17 November 2017 at 02:13:54 UTC, matthewh wrote: [...] as is it produces: [1, 2, 3, 4, 5, 6, 7, 8] [] I expected it to produce: [1, 2, 3, 4, 5, 6, 7, 8] [1, 2, 3, 4, 5, 6, 7, 8] And with the toString override included it does. Why does the version without the toString override

Re: User defined type and foreach

2017-11-16 Thread Mike Parker via Digitalmars-d-learn
On Friday, 17 November 2017 at 03:15:12 UTC, Tony wrote: Thanks T! Good information, especially "iterating over a range is supposed to consume it". I have been reading dlang.org->Documentation->Language Reference, but should have also read dlang.org->Dlang-Tour->Ranges. Although that page

Re: DConf 2018 Call for Submissions

2017-11-16 Thread Ali Çehreli via Digitalmars-d-announce
On 11/16/2017 12:20 AM, Mike James wrote: On Thursday, 16 November 2017 at 00:45:58 UTC, codephantom wrote: I would like to see Chuck Allison talk about the experiences of students approaching D. Chucks already done a talk like that - it was berry, berry good... For convenience, two

Re: ESR on post-C landscape

2017-11-16 Thread Patrick Schluter via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 16:38:58 UTC, Ola Fosheim Grostad wrote: On Tuesday, 14 November 2017 at 11:55:17 UTC, codephantom wrote: [...] Well, in another thread he talked about the Tango split, so not sure where he is coming from. [...] No, the starting point for C++ was that

Re: ESR on post-C landscape

2017-11-16 Thread Ola Fosheim Grostad via Digitalmars-d-learn
On Thursday, 16 November 2017 at 18:06:22 UTC, Patrick Schluter wrote: On Tuesday, 14 November 2017 at 16:38:58 UTC, Ola Fosheim Grostad wrote: changing. C no longer models the hardware in a reasonable manner. Because of the flawed interpretation of UB by the compiler writers, not because of

[Issue 14619] foreach implicitly slices ranges

2017-11-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14619 Steven Schveighoffer changed: What|Removed |Added CC|

[Issue 17985] New: Implement -stdin for rdmd

2017-11-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17985 Issue ID: 17985 Summary: Implement -stdin for rdmd Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1

Re: NIO+Multithreaded TCPSocket listener, very low cpu utilisation

2017-11-16 Thread ade90036 via Digitalmars-d-learn
Result: bombardier -c 200 -n 1 http://localhost: Bombarding http://localhost: with 1 requests using 200 connections 1 / 1 [===] 100.00% 1m24s Done!

Re: Language server protocol

2017-11-16 Thread Johannes Pfau via Digitalmars-d
Am Thu, 16 Nov 2017 19:09:14 + schrieb Arun Chandrasekaran : > Is someone working on D community to implement > https://langserver.org ? > > What will the D community miss out if we ignore LSP? > > PS: HackerPilot's tools are very helpful.

Re: NIO+Multithreaded TCPSocket listener, very low cpu utilisation

2017-11-16 Thread ade90036 via Digitalmars-d-learn
Mediocre result... let me create a java equivalent program so we have a direct comparison.. These are the tests for a similar program in java. bombardier -c 200 -n 1 http://localhost:8081 Bombarding http://localhost:8081/ with 1 requests using 200 connections 1 / 1

Re: NIO+Multithreaded TCPSocket listener, very low cpu utilisation

2017-11-16 Thread ade90036 via Digitalmars-d-learn
So, what is next? Can we enable some sort of profiling to see what is going on?

Re: Language server protocol

2017-11-16 Thread Arun Chandrasekaran via Digitalmars-d
On Thursday, 16 November 2017 at 19:22:37 UTC, Johannes Pfau wrote: Am Thu, 16 Nov 2017 19:09:14 + https://github.com/Pure-D/serve-d We should probably get it listed in the homepage.

Re: Inference of GC allocation scope

2017-11-16 Thread Petar via Digitalmars-d-learn
On Thursday, 16 November 2017 at 17:29:56 UTC, Nordlöw wrote: Are there any plans on a compiler pass that finds scoped GC-allocations and makes their destructors deterministic similar to D's struct scope behaviour?

Re: NIO+Multithreaded TCPSocket listener, very low cpu utilisation

2017-11-16 Thread ade90036 via Digitalmars-d-learn
On Thursday, 16 November 2017 at 18:20:36 UTC, Daniel Kozak wrote: Hmm works ok for me. What OS? Dne 16. 11. 2017 12:05 dop. napsal uživatel "kdevel via Digitalmars-d-learn" : [...] I'm running MacOS..

Re: NIO+Multithreaded TCPSocket listener, very low cpu utilisation

2017-11-16 Thread Daniel Kozak via Digitalmars-d-learn
It works for me because I have multiple threads, but when I use only one thread per pool (defaultPoolThreads(1)), it obviosly blocks, which is correct behavior On Thu, Nov 16, 2017 at 7:20 PM, Daniel Kozak wrote: > Hmm works ok for me. What OS? > > Dne 16. 11. 2017 12:05 dop.

Language server protocol

2017-11-16 Thread Arun Chandrasekaran via Digitalmars-d
Is someone working on D community to implement https://langserver.org ? What will the D community miss out if we ignore LSP? PS: HackerPilot's tools are very helpful.

Inference of GC allocation scope

2017-11-16 Thread Nordlöw via Digitalmars-d-learn
Are there any plans on a compiler pass that finds scoped GC-allocations and makes their destructors deterministic similar to D's struct scope behaviour?

[Issue 10310] VRP for bitwise &|^ does not always produce the tightest bounds.

2017-11-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10310 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: NIO+Multithreaded TCPSocket listener, very low cpu utilisation

2017-11-16 Thread ade90036 via Digitalmars-d-learn
On Thursday, 16 November 2017 at 18:44:11 UTC, Daniel Kozak wrote: It works for me because I have multiple threads, but when I use only one thread per pool (defaultPoolThreads(1)), it obviosly blocks, which is correct behavior Ok, let me force the: "defaultPoolThreads(8)" and let me

Re: ESR on post-C landscape

2017-11-16 Thread Ola Fosheim Grostad via Digitalmars-d-learn
On Thursday, 16 November 2017 at 18:02:10 UTC, Patrick Schluter wrote: The shear amount of inscrutable cruft and rules, plus the moving target of continuously changing semantics an order or two of magnitude bigger than C added to the fact that you still need to know C's gotchas, makes it one

Re: ESR on post-C landscape

2017-11-16 Thread Patrick Schluter via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 09:43:07 UTC, Ola Fosheim Grøstad wrote: On Tuesday, 14 November 2017 at 06:32:55 UTC, lobo wrote: "[snip]...Then came the day we discovered that a person we incautiously gave commit privileges to had fucked up the games’s AI core. It became apparent that I was

Re: User defined type and foreach

2017-11-16 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/16/17 8:10 AM, ag0aep6g wrote: On 11/16/2017 09:03 AM, Tony wrote: However, when I use the class with foreach, the opindex gets called to create a dynamic array, rather than use the empty(),front(),popFront() routines. I would prefer it use the three methods, rather than create a

Re: Language server protocol

2017-11-16 Thread WebFreak001 via Digitalmars-d
On Thursday, 16 November 2017 at 19:42:09 UTC, Arun Chandrasekaran wrote: On Thursday, 16 November 2017 at 19:22:37 UTC, Johannes Pfau wrote: https://github.com/Pure-D/serve-d -- Johannes BTW, what are the feature available with serve-d? Does it support all of the below? Code

Re: Deprecate implicit `int` to `bool` conversion for integer literals

2017-11-16 Thread Andrei Alexandrescu via Digitalmars-d
On 11/16/2017 02:29 AM, Michael V. Franklin wrote: On Thursday, 16 November 2017 at 07:24:44 UTC, Andrei Alexandrescu wrote: Try it here: https://run.dlang.io/is/nfMGfG DMD-nightly Cool, thanks. That seems to be an unrelated bug. Have you added it to bugzilla? Thanks! -- Andrei Bugzilla

Re: Language server protocol

2017-11-16 Thread Arun Chandrasekaran via Digitalmars-d
On Thursday, 16 November 2017 at 19:22:37 UTC, Johannes Pfau wrote: https://github.com/Pure-D/serve-d -- Johannes BTW, what are the feature available with serve-d? Does it support all of the below? Code completion, Hover, Jump to def, Workspace symbols, Find references, Stream reference

Re: ESR on post-C landscape

2017-11-16 Thread sarn via Digitalmars-d-learn
On Thursday, 16 November 2017 at 11:52:45 UTC, Ola Fosheim Grostad wrote: On Thursday, 16 November 2017 at 11:24:09 UTC, codephantom I would never say OO itself is a failure. But the idea that is should be the 'primary focus of program design' .. I think that is a failure...and I think that

Re: ESR on post-C landscape

2017-11-16 Thread sarn via Digitalmars-d-learn
On Tuesday, 14 November 2017 at 09:43:07 UTC, Ola Fosheim Grøstad wrote: ESR got famous for his cathedral vs bazaar piece, which IMO was basically just a not very insightful allegory over waterfall vs evolutionary development models, but since many software developers don't know the basics of

Re: ESR on post-C landscape

2017-11-16 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Thursday, 16 November 2017 at 22:27:58 UTC, sarn wrote: In the 90s (and a bit into the 00s) there was a pretty extreme "everything must be an object; OO is the solution to everything" movement in the industry. Yes, around 1991, the computer mags were all over C++ and the bookshelves in

Re: Zig mentions D in justifying its existence

2017-11-16 Thread solidstate1991 via Digitalmars-d
On Tuesday, 14 November 2017 at 01:01:16 UTC, codephantom wrote: As someone new to D, I think this point stood out the most(for me): "C++, Rust, and D have a large number of features and it can be distracting from the actual meaning of the application you are working on. One finds themselves

Re: [OT] mobile rising

2017-11-16 Thread solidstate1991 via Digitalmars-d
On Wednesday, 15 November 2017 at 11:46:48 UTC, Joakim wrote: I just saw this post about the upcoming Lenovo/AT Moto Tab and thought of you: https://www.phonearena.com/news/Lenovo-Moto-Tab-ATT-features_id99782 For $300, you can buy a tablet that lets you do everything you normally do on a

Re: DConf 2018 Logo

2017-11-16 Thread H. S. Teoh via Digitalmars-d
On Thu, Nov 16, 2017 at 08:21:41PM +, user1234 via Digitalmars-d wrote: > On Thursday, 16 November 2017 at 14:11:22 UTC, Dukc wrote: > > On Wednesday, 15 November 2017 at 14:56:53 UTC, Andrei Alexandrescu > > wrote: > > > Hello, for all of you with expertise in graphics, we'd be in your > > >

Re: DConf 2018 Logo

2017-11-16 Thread solidstate1991 via Digitalmars-d
On Wednesday, 15 November 2017 at 14:56:53 UTC, Andrei Alexandrescu wrote: Hello, for all of you with expertise in graphics, we'd be in your debt if you could create a logo for DConf 2018. Proposals would be appreciated! Thanks, Andrei I think I'll do something in Illustrator, probably our

Re: Treating a slice as an InputRange

2017-11-16 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, November 15, 2017 22:48:12 unleashy via Digitalmars-d-learn wrote: > On Wednesday, 15 November 2017 at 21:02:35 UTC, Jonathan M Davis > wrote: > > If you specifically want a function to accept a range and > > mutate it without returning it, then it should take its > > argument by

Re: The latest Terrarium TV 1.8.1 has been updated.

2017-11-16 Thread Bruno Ben via Digitalmars-d-announce
On Wednesday, 8 November 2017 at 09:40:01 UTC, Theresa Henson wrote: The update is compatible with the latest Android OS as well as all others over Android 4.0 Here are updated version of Terrarium TV: https://terrariumtvforpcdownload.com/terrarium-tv-apk/

Re: User defined type and foreach

2017-11-16 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, November 16, 2017 08:43:17 Tony via Digitalmars-d-learn wrote: > On Thursday, 16 November 2017 at 08:26:25 UTC, Andrea Fontana > > wrote: > > On Thursday, 16 November 2017 at 08:03:48 UTC, Tony wrote: > >> I made a stack data type and created an opIndex() so it could > >> be turned

Re: ESR on post-C landscape

2017-11-16 Thread codephantom via Digitalmars-d-learn
On Thursday, 16 November 2017 at 06:35:30 UTC, Ola Fosheim Grostad wrote: No, classes is a powerful modelling primitive. C++ got that right. C++ is also fairly uniform because of it. Yes, I agree that classes are a powerful modelling primitive, but my point was that Stroustrup made classes

Re: NIO+Multithreaded TCPSocket listener, very low cpu utilisation

2017-11-16 Thread Daniel Kozak via Digitalmars-d-learn
Hmm works ok for me. What OS? Dne 16. 11. 2017 12:05 dop. napsal uživatel "kdevel via Digitalmars-d-learn" : > On Wednesday, 15 November 2017 at 13:31:46 UTC, Daniel Kozak wrote: > >> This one works ok for me, but I am on linux: >>

Re: Inference of GC allocation scope

2017-11-16 Thread Nordlöw via Digitalmars-d-learn
On Thursday, 16 November 2017 at 17:39:02 UTC, Petar Kirov [ZombineDev] wrote: https://github.com/ldc-developers/ldc/blob/master/gen/passes/GarbageCollect2Stack.cpp Does this include GC allocations that don't fit on stack?

[Issue 10310] VRP for bitwise &|^ does not always produce the tightest bounds.

2017-11-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10310 --- Comment #5 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/1757224765982088b8454500aeecdd0a08473475 VRP and,or,xor + fix issue 10310

Re: DConf 2018 Logo

2017-11-16 Thread user1234 via Digitalmars-d
On Wednesday, 15 November 2017 at 22:43:03 UTC, codephantom wrote: On Wednesday, 15 November 2017 at 14:56:53 UTC, Andrei Alexandrescu wrote: Hello, for all of you with expertise in graphics, we'd be in your debt if you could create a logo for DConf 2018. Proposals would be appreciated!

Re: DConf 2018 Logo

2017-11-16 Thread user1234 via Digitalmars-d
On Thursday, 16 November 2017 at 14:11:22 UTC, Dukc wrote: On Wednesday, 15 November 2017 at 14:56:53 UTC, Andrei Alexandrescu wrote: Hello, for all of you with expertise in graphics, we'd be in your debt if you could create a logo for DConf 2018. Proposals would be appreciated! Thanks,

Re: NIO+Multithreaded TCPSocket listener, very low cpu utilisation

2017-11-16 Thread Daniel Kozak via Digitalmars-d-learn
can you post both code, java and d, for sure we are all testing the sames On Thu, Nov 16, 2017 at 8:37 PM, ade90036 via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > So, what is next? > > Can we enable some sort of profiling to see what is going on? >

Re: User defined type and foreach

2017-11-16 Thread Andrea Fontana via Digitalmars-d-learn
On Thursday, 16 November 2017 at 08:03:48 UTC, Tony wrote: I made a stack data type and created an opIndex() so it could be turned into a dynamic array, and created empty() (unfortunate name), front() and popFront() methods, which I read allow it to be used with foreach. However, when I use

Re: User defined type and foreach

2017-11-16 Thread Tony via Digitalmars-d-learn
On Thursday, 16 November 2017 at 08:26:25 UTC, Andrea Fontana wrote: On Thursday, 16 November 2017 at 08:03:48 UTC, Tony wrote: I made a stack data type and created an opIndex() so it could be turned into a dynamic array, and created empty() (unfortunate name), front() and popFront() methods,

User defined type and foreach

2017-11-16 Thread Tony via Digitalmars-d-learn
I made a stack data type and created an opIndex() so it could be turned into a dynamic array, and created empty() (unfortunate name), front() and popFront() methods, which I read allow it to be used with foreach. However, when I use the class with foreach, the opindex gets called to create a

Re: DConf 2018 Call for Submissions

2017-11-16 Thread Mike James via Digitalmars-d-announce
On Thursday, 16 November 2017 at 00:45:58 UTC, codephantom wrote: On Wednesday, 15 November 2017 at 23:53:40 UTC, Ali Çehreli wrote: I would like to see Chuck Allison talk about the experiences of students approaching D. I think that would be really worthwhile - or even yourself for that

Re: Should aliasing a lambda expression be allowed?

2017-11-16 Thread Meta via Digitalmars-d
On Thursday, 16 November 2017 at 16:10:50 UTC, Meta wrote: int function(int) f1 = (int n) => n; int function(int) f2 = (char c) => c; Should be int function(char)

Re: DConf 2018 Call for Submissions

2017-11-16 Thread codephantom via Digitalmars-d-announce
On Thursday, 16 November 2017 at 18:08:07 UTC, Ali Çehreli wrote: For convenience, two talks by Chuck: http://dconf.org/2014/talks/allison.html Thanks. I must have missed this one. I'll watch it today. (youtube one seems to be missing though) http://dconf.org/2015/talks/allison.html

Re: User defined type and foreach

2017-11-16 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Nov 17, 2017 at 01:06:31AM +, Tony via Digitalmars-d-learn wrote: [...] > But I do have a complaint about the methods empty(), popFront() and > pop(). I think they should have a special syntax or name to reflect > that they are not general purpose methods. __empty() or preferably >

Introducing Nullable Reference Types in C#. Is there hope for D, too?

2017-11-16 Thread Michael V. Franklin via Digitalmars-d
I ran into this blog post today: https://blogs.msdn.microsoft.com/dotnet/2017/11/15/nullable-reference-types-in-csharp/ It peeked my interested, because when I first started studying D, the lack of any warning or error for this trivial case surprised me. // Example A class Test { int

Re: ESR on post-C landscape

2017-11-16 Thread codephantom via Digitalmars-d-learn
On Thursday, 16 November 2017 at 11:52:45 UTC, Ola Fosheim Grostad wrote: Uhm, no? What do you mean by 'primary focus of program design' and in which context? I the context that, this is specifically what Stroustrup says in his book (The Design and Evolution of C++ 1994) "Simula's class

Re: User defined type and foreach

2017-11-16 Thread Tony via Digitalmars-d-learn
On Thursday, 16 November 2017 at 18:34:54 UTC, Steven Schveighoffer wrote: On 11/16/17 8:10 AM, ag0aep6g wrote: On 11/16/2017 09:03 AM, Tony wrote: However, when I use the class with foreach, the opindex gets called to create a dynamic array, rather than use the empty(),front(),popFront()

writeln, alias this and dynamic arrays.

2017-11-16 Thread matthewh via Digitalmars-d-learn
I am new to D and have been fiddling with bits and pieces. I have this code: import std.stdio : writeln; import std.format : format; class Base { override { //string toString() //{ // return format("%s", store); //} } ubyte[] store; alias

Re: writeln, alias this and dynamic arrays.

2017-11-16 Thread Michael V. Franklin via Digitalmars-d-learn
On Friday, 17 November 2017 at 02:13:54 UTC, matthewh wrote: And with the toString override included it does. Why does the version without the toString override output an empty array? I think that is due to this bug: https://issues.dlang.org/show_bug.cgi?id=13189 It's actually on my todo

TLC for ddox

2017-11-16 Thread Andrei Alexandrescu via Digitalmars-d
Whenever I look at the documentation, I find things that could be improved. Consider https://dlang.org/library/, one of the most important pages - the portal - of the hopefully future default documentation renderer. It goes something like this: Module Description

Re: Introducing Nullable Reference Types in C#. Is there hope for D, too?

2017-11-16 Thread codephantom via Digitalmars-d
On Friday, 17 November 2017 at 01:47:01 UTC, Michael V. Franklin wrote: In C#, you get a compiler error. // Example B class Test { public int Value; } public class Program { public static void Main() { Test t; t.Value++; //

[Issue 17382] void main(){}pragma(msg,main()); crashes DMD

2017-11-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17382 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 17382] void main(){}pragma(msg,main()); crashes DMD

2017-11-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17382 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/db8c74b6cfccb4ac14d32b3f9d16aaff1e806a0c Fix Issue 17382 - void main(){}pragma(msg,main()); crashes

Re: User defined type and foreach

2017-11-16 Thread Tony via Digitalmars-d-learn
On Friday, 17 November 2017 at 01:16:38 UTC, H. S. Teoh wrote: It should be .empty, .popFront, and .front, not .pop. Also, these methods are *range* primitives, and over time, we have come to a consensus that generally speaking, it's a bad idea to conflate containers with ranges over

Re: Note from a donor

2017-11-16 Thread solidstate1991 via Digitalmars-d
On Wednesday, 15 November 2017 at 04:34:09 UTC, Walter Bright wrote: On 11/14/2017 7:15 PM, solidstate1991 wrote: Walter Bright: What's the licensing state of DMC and OPTLINK? Boost Can it made open-source? Yes. If yes, we should patch in a COFF32/64 support, maybe even port it to D for

Re: Introducing Nullable Reference Types in C#. Is there hope for D, too?

2017-11-16 Thread codephantom via Digitalmars-d
On Friday, 17 November 2017 at 01:47:01 UTC, Michael V. Franklin wrote: // Example A class Test { int Value; } void main(string[] args) { Test t; t.Value++; // No compiler error, or warning. Runtime error! } //Test t; Test t = new Test;

Re: Introducing Nullable Reference Types in C#. Is there hope for D, too?

2017-11-16 Thread codephantom via Digitalmars-d
On Friday, 17 November 2017 at 01:47:01 UTC, Michael V. Franklin wrote: It peeked my interested, because when I first started studying D, the lack of any warning or error for this trivial case surprised me. // Example A class Test { int Value; } void main(string[] args) { Test t;

[Issue 17986] New: Erratic failure with std/experimental/allocator/common.d(445): unittest failure

2017-11-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17986 Issue ID: 17986 Summary: Erratic failure with std/experimental/allocator/common.d(445): unittest failure Product: D Version: D2 Hardware: All

Re: [OT] mobile rising

2017-11-16 Thread Joakim via Digitalmars-d
On Thursday, 16 November 2017 at 23:03:41 UTC, solidstate1991 wrote: On Wednesday, 15 November 2017 at 11:46:48 UTC, Joakim wrote: [...] I'm thinking on picking up some Android tablet for development purposes, would be good to port my game engine for mobile devices, probably have to resort

Re: How to define variadic delegate with a ref/out argument?

2017-11-16 Thread Jerry A. via Digitalmars-d-learn
On Friday, 17 November 2017 at 05:08:23 UTC, pham wrote: struct DelegateList(Args...) { public: alias DelegateHandler = void delegate(Args args) nothrow; DelegateHandler[] items; void opCall(Args args) nothrow { foreach (i; items) i(args); } }

Re: writeln, alias this and dynamic arrays.

2017-11-16 Thread Michael V. Franklin via Digitalmars-d-learn
On Friday, 17 November 2017 at 02:16:35 UTC, Michael V. Franklin wrote: On Friday, 17 November 2017 at 02:13:54 UTC, matthewh wrote: And with the toString override included it does. Why does the version without the toString override output an empty array? I think that is due to this bug:

Re: ESR on post-C landscape

2017-11-16 Thread Ola Fosheim Grostad via Digitalmars-d-learn
On Friday, 17 November 2017 at 00:36:21 UTC, codephantom wrote: On Thursday, 16 November 2017 at 11:52:45 UTC, Ola Fosheim Grostad wrote: Uhm, no? What do you mean by 'primary focus of program design' and in which context? I the context that, this is specifically what Stroustrup says in

Re: Introducing Nullable Reference Types in C#. Is there hope for D, too?

2017-11-16 Thread codephantom via Digitalmars-d
On Friday, 17 November 2017 at 05:50:24 UTC, rumbu wrote: You are not ending with nothing, you are ending with a run time error in D. In C# it's a compile-time error. Ideally, something ending for sure in an error at run time, must be catch at compile-time. Well.. sometimes it's just

How to define variadic delegate with a ref/out argument?

2017-11-16 Thread pham via Digitalmars-d-learn
struct DelegateList(Args...) { public: alias DelegateHandler = void delegate(Args args) nothrow; DelegateHandler[] items; void opCall(Args args) nothrow { foreach (i; items) i(args); } } DelegateList!(string, int) list; // Compile OK so far

Re: Zig mentions D in justifying its existence

2017-11-16 Thread bauss via Digitalmars-d
On Thursday, 16 November 2017 at 22:58:32 UTC, solidstate1991 wrote: Often I just don't find a use for them, so I won't make the compiler to do CTFE if it's not needed. Why wouldn't you? It gives less overhead at run-time, giving your application better performance.

Re: Introducing Nullable Reference Types in C#. Is there hope for D, too?

2017-11-16 Thread rumbu via Digitalmars-d
On Friday, 17 November 2017 at 02:25:21 UTC, codephantom wrote: On Friday, 17 November 2017 at 01:47:01 UTC, Michael V. Franklin wrote: It peeked my interested, because when I first started studying D, the lack of any warning or error for this trivial case surprised me. // Example A class

Re: Bloat in Executable

2017-11-16 Thread Joakim via Digitalmars-d
On Thursday, 16 November 2017 at 03:32:26 UTC, codephantom wrote: // --- module test; import core.stdc.stdio; extern (C) int main() { printf("hello world\n"); return 0; } // --- compiled with dmd v2.077.0, using the

Re: Zig mentions D in justifying its existence

2017-11-16 Thread Ola Fosheim Grøstad via Digitalmars-d
On Thursday, 16 November 2017 at 02:48:27 UTC, Tony wrote: I am surprised C hasn't tried to become a "better C". Most of the people that wanted to work on a spec for a better C has already moved to C++ or other languages. The ones that remain want C to stay simple, but they have added new