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

2017-11-20 Thread Atila Neves via Digitalmars-d
On Sunday, 19 November 2017 at 04:04:04 UTC, Walter Bright wrote: On 11/18/2017 6:25 PM, Timon Gehr wrote: I.e., baseClass should have type Nullable!ClassDeclaration. This does not in any form imply that ClassDeclaration itself needs to have a null value. Converting back and forth between

One liner alternatives for initing and pushing some values into array

2017-11-20 Thread kerdemdemir via Digitalmars-d-learn
I need to init and push some values into a array something like: //DMD64 D Compiler 2.072.2 import std.stdio; import std.array; void main() { bool a = true; bool b = false; bool c = false; bool[] boolList; auto boolListAppender = boolList.appender(); boolListAppender ~=

Re: One liner alternatives for initing and pushing some values into array

2017-11-20 Thread Nicholas Wilson via Digitalmars-d-learn
On Monday, 20 November 2017 at 08:37:32 UTC, kerdemdemir wrote: I need to init and push some values into a array something like: //DMD64 D Compiler 2.072.2 import std.stdio; import std.array; void main() { bool a = true; bool b = false; bool c = false; bool[] boolList;

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

2017-11-20 Thread rumbu via Digitalmars-d
On Monday, 20 November 2017 at 06:24:31 UTC, Tobias Müller wrote: Timon Gehr wrote: I wish there was a null for int types. AFAIU, C# will now have 'int?'. C# had 'int?' (nullable value types) for ages. The new thing is explicitly nullable classes (reference types). I'm

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

2017-11-20 Thread codephantom via Digitalmars-d
On Monday, 20 November 2017 at 08:55:54 UTC, Biotronic wrote: On Monday, 20 November 2017 at 08:49:41 UTC, rumbu wrote: In fact, this is the introduction of a new operator "!", probably named "I know better" operator. It's called the "bang" operator, because of how things blow up when you're

Re: Looking for a job in USA

2017-11-20 Thread Adam Wilson via Digitalmars-d
On 11/17/17 17:31, Indigo wrote: What is your reasoning for coming to the US? You might want to rethink this as America is collapsing. This is news to me, and I live in the US. Also, if the US is collapsing, that is very bad news for D, seeing as how I live about 45 minutes from Walter, and

Re: GtkD help

2017-11-20 Thread Ivan Trombley via Digitalmars-d-learn
Since I wanted people to just be able to run the executable and not have to go through some install process, glib.Settings turned out to be a no-go since it requires a schema file to be installed in a specific place. Instead, I just create a json sidecar file next to the app in order to store

Re: [OT] D merch

2017-11-20 Thread Walter Bright via Digitalmars-d
Thanks to you and Aravinda VK!

[Issue 16022] [REG2.069] dmd assertion failure due to misplaced comma operator

2017-11-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16022 --- Comment #5 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/64980c29006945d9b0a5abbe096edd2c92913584 Issue 16022 - assertion failure due to misplaced comma

[Issue 17995] template NoDuplicates(TList...) bug.

2017-11-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17995 --- Comment #3 from Simen Kjaeraas --- Uhm... or possibly https://github.com/dlang/phobos/pull/5867 --

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

2017-11-20 Thread Biotronic via Digitalmars-d
On Monday, 20 November 2017 at 08:49:41 UTC, rumbu wrote: In fact, this is the introduction of a new operator "!", probably named "I know better" operator. It's called the "bang" operator, because of how things blow up when you're wrong.

Re: One liner alternatives for initing and pushing some values into array

2017-11-20 Thread codephantom via Digitalmars-d-learn
On Monday, 20 November 2017 at 08:37:32 UTC, kerdemdemir wrote: bool boolList[] = { a, b, c }; D alternative(at least my D alternative) seem long. Is there any better way for initialing and pushing values at the same time. Erdem Your use of the appender method suggest to me you want to

Re: Looking for a job in USA

2017-11-20 Thread ikod via Digitalmars-d
On Saturday, 18 November 2017 at 12:39:18 UTC, jmh530 wrote: On Saturday, 18 November 2017 at 01:31:09 UTC, Indigo wrote: What is your reasoning for coming to the US? You might want to rethink this as America is collapsing. America is collapsing? This is ever lasting story: "decaying

[Issue 12496] __traits(parent, x) returns incorrect type

2017-11-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12496 --- Comment #4 from Mike --- Potential fix here: https://github.com/dlang/dmd/pull/7097 --

Re: Looking for a job in USA

2017-11-20 Thread codephantom via Digitalmars-d
On Monday, 20 November 2017 at 09:15:15 UTC, Adam Wilson wrote: On 11/17/17 17:31, Indigo wrote: What is your reasoning for coming to the US? You might want to rethink this as America is collapsing. This is news to me, and I live in the US. Also, if the US is collapsing, that is very bad

[Issue 17996] [Reg 2.077] getopt fails to recognize argument

2017-11-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17996 --- Comment #1 from Martin Nowak --- Apparently happens due to usage of -fPIC when compiling phobos. While this is a bug with the PIC code generation, the 32-bit libphobos2.a should not use PIC. Introduced by

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

2017-11-20 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 20 November 2017 at 11:27:15 UTC, Timon Gehr wrote: On 20.11.2017 11:07, Atila Neves wrote: As you can guess, I happen to like null, because there are no hidden bugs from pretending it is a valid value - you get an immediate program halt - rather than subtly corrupted results.

RAII in betterC

2017-11-20 Thread Oleg B via Digitalmars-d
Hello. I know about some implementation issues http://forum.dlang.org/thread/nqctbzhrdldmnffch...@forum.dlang.org What work must be done for fix it? For what time is it scheduled?

[Issue 17966] chunkBy cannot accept an input range (from multiwayMerge)

2017-11-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17966 --- Comment #1 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/84ac676d1d26edd8b3611d857adc5caed42c92d5 fix Issue 17966 - don't build libphobos2.a with PIC

Re: DConf 2014 YouTube videos unavailable

2017-11-20 Thread Steven Schveighoffer via Digitalmars-d
On 11/20/17 11:48 AM, Luís Marques wrote: The DConf 2014 talk pages have links to YouTube, but all of the links I tried resulted in an YouTube error, "This video is unavailable." They still exist, but the links are different. e.g.: https://www.youtube.com/watch?v=FGgFMZhnXvU Is different

Re: RAII in betterC

2017-11-20 Thread Nick Treleaven via Digitalmars-d
On Monday, 20 November 2017 at 17:13:37 UTC, Oleg B wrote: Hello. I know about some implementation issues http://forum.dlang.org/thread/nqctbzhrdldmnffch...@forum.dlang.org What work must be done for fix it? For what time is it scheduled? Looks like Walter is working on it:

DConf 2014 YouTube videos unavailable

2017-11-20 Thread Luís Marques via Digitalmars-d
The DConf 2014 talk pages have links to YouTube, but all of the links I tried resulted in an YouTube error, "This video is unavailable."

Re: Looking for a job in USA

2017-11-20 Thread sarn via Digitalmars-d
On Monday, 20 November 2017 at 09:41:16 UTC, codephantom wrote: On Monday, 20 November 2017 at 09:15:15 UTC, Adam Wilson wrote: On 11/17/17 17:31, Indigo wrote: What is your reasoning for coming to the US? You might want to rethink this as America is collapsing. This is news to me, and I

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

2017-11-20 Thread Walter Bright via Digitalmars-d
On 11/20/2017 3:27 AM, Timon Gehr wrote: On 20.11.2017 11:07, Atila Neves wrote: The problem with null as seen in C++/Java/D is that it's a magical value that different types may have. It breaks the type system. In Java, quite literally so. The Java type system is /unsound/ because of null.

Re: RAII in betterC

2017-11-20 Thread Oleg B via Digitalmars-d
On Monday, 20 November 2017 at 18:14:46 UTC, Nick Treleaven wrote: On Monday, 20 November 2017 at 17:13:37 UTC, Oleg B wrote: Hello. I know about some implementation issues http://forum.dlang.org/thread/nqctbzhrdldmnffch...@forum.dlang.org What work must be done for fix it? For what time is

Re: GtkD help

2017-11-20 Thread Ivan Trombley via Digitalmars-d-learn
On Monday, 20 November 2017 at 08:01:28 UTC, Ivan Trombley wrote: I solved the TreeView text cooler l color issue by using markup. Phoned.

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

2017-11-20 Thread Nick Treleaven via Digitalmars-d
On Sunday, 19 November 2017 at 22:54:38 UTC, Walter Bright wrote: There's also an issue of how to derive a class from a base class. If you want null, use a nullable type: Base b = ...; Derived? d = cast(Derived?) base; if (d !is null) d.method; This implies one must know all the use cases of

[Issue 15289] VRP not working as expected on division

2017-11-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15289 Lucia Cojocaru changed: What|Removed |Added CC|

Re: Looking for a job in USA

2017-11-20 Thread codephantom via Digitalmars-d
On Monday, 20 November 2017 at 23:48:44 UTC, sarn wrote: Ignoring the whole American Doom thing: Australia, the UK, Canada and New Zealand are all English-speaking countries with decent job prospects and good enough crime/corruption levels by world standards. Sydney's expensive, but there

dub: Use Alternate Dependency

2017-11-20 Thread jmh530 via Digitalmars-d-learn
I'm working on two related dub projects on code.dlang.org. One has a dependency on the other. However, I've made changes to both and to run the tests properly requires me to use both versions in my working directory, rather than the versions (specifically for the dependency) that is registered

dmd/ldc failed with exit code -11

2017-11-20 Thread Anonymouse via Digitalmars-d-learn
I have a large named enum (currently 645 members) of IRC event types. It's big by neccessity[1]. I'm using dub, and both dmd and ldc successfully build it in test and debug modes, but choke and die on plain and release. I bisected it down to when I did a big addition to the enum to encompass

Re: dmd/ldc failed with exit code -11

2017-11-20 Thread rikki cattermole via Digitalmars-d-learn
On 21/11/2017 12:15 AM, Anonymouse wrote: I have a large named enum (currently 645 members) of IRC event types. It's big by neccessity[1]. I'm using dub, and both dmd and ldc successfully build it in test and debug modes, but choke and die on plain and release. I bisected it down to when I

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

2017-11-20 Thread Mark via Digitalmars-d
On Monday, 20 November 2017 at 22:56:44 UTC, Walter Bright wrote: On 11/20/2017 3:27 AM, Timon Gehr wrote: On 20.11.2017 11:07, Atila Neves wrote: The problem with null as seen in C++/Java/D is that it's a magical value that different types may have. It breaks the type system. In Java,

Re: DConf 2014 YouTube videos unavailable

2017-11-20 Thread Mike Parker via Digitalmars-d
On Monday, 20 November 2017 at 17:46:25 UTC, Steven Schveighoffer wrote: Not sure if this is youtube's doing or not, but feel free to PR dconf.org if you want to fix the links: https://github.com/dlang/dconf.org I'll be doing in the next couple of days.

Re: Project Highlight: Diamond MVC Framework

2017-11-20 Thread bauss via Digitalmars-d-announce
On Monday, 20 November 2017 at 14:39:43 UTC, Mike Parker wrote: You may have seen announcements regarding Diamond here in the forums. The project maintainer, Jason Jensen, a.k.a bauss, provided me with some info about it for a Project Highlight on the D Blog. Blog:

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

2017-11-20 Thread Meta via Digitalmars-d
On Tuesday, 21 November 2017 at 01:03:36 UTC, Mark wrote: On Monday, 20 November 2017 at 22:56:44 UTC, Walter Bright wrote: On 11/20/2017 3:27 AM, Timon Gehr wrote: On 20.11.2017 11:07, Atila Neves wrote: The problem with null as seen in C++/Java/D is that it's a magical value that different

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

2017-11-20 Thread Dmitry Olshansky via Digitalmars-d
On Tuesday, 21 November 2017 at 06:03:33 UTC, Meta wrote: On Tuesday, 21 November 2017 at 01:03:36 UTC, Mark wrote: On Monday, 20 November 2017 at 22:56:44 UTC, Walter Bright wrote: On 11/20/2017 3:27 AM, Timon Gehr wrote: This blog post seems to summarize the paper he linked to:

Re: dub: Use Alternate Dependency

2017-11-20 Thread bauss via Digitalmars-d-learn
On Tuesday, 21 November 2017 at 02:51:13 UTC, jmh530 wrote: I'm working on two related dub projects on code.dlang.org. One has a dependency on the other. However, I've made changes to both and to run the tests properly requires me to use both versions in my working directory, rather than the

Re: Looking for a job in USA

2017-11-20 Thread Adam Wilson via Digitalmars-d
On 11/20/17 05:11, Satoshi wrote: On Monday, 20 November 2017 at 09:15:15 UTC, Adam Wilson wrote: To get an H1B you'll want to get a job with one of the majors. Microsoft, Google, Apple, Amazon. There are smaller companies, but the majors have a dedicated team of lawyers who can guide your H1B

DMD test suite assertion failure in test_cdvecfill.d

2017-11-20 Thread Michael V. Franklin via Digitalmars-d-learn
I'm getting this error when I try to run the DMD test suite. cd dmd make -C test -f Makefile ... runnable/test_cdvecfill.d -O (-mcpu=avx -mcpu=avx2) Test failed. The logged output: ../src/dmd -conf= -m64 -Irunnable -O -odtest_results/runnable -oftest_results/runnable/test_cdvecfill_0

Re: TickDuration deprecation

2017-11-20 Thread bauss via Digitalmars-d
On Sunday, 19 November 2017 at 19:29:06 UTC, Jon Degenhardt wrote: On Sunday, 19 November 2017 at 16:02:34 UTC, Jonathan M Davis wrote: [...] [...] 1) Finding the documentation for Duration from the documentation of std.datetime.stopwatch is not quick enough. There is only one link from

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

2017-11-20 Thread Walter Bright via Digitalmars-d
On 11/20/2017 5:03 PM, Mark wrote: On Monday, 20 November 2017 at 22:56:44 UTC, Walter Bright wrote: On 11/20/2017 3:27 AM, Timon Gehr wrote: On 20.11.2017 11:07, Atila Neves wrote: The problem with null as seen in C++/Java/D is that it's a magical value that different types may have. It

Visual D >> TRACKER : error TRK0004: Failed to locate: "FileTracker32.dll". The system cannot find the file specified.

2017-11-20 Thread A Guy With a Question via Digitalmars-d-learn
I'm trying to learn D using Visual D in Visual Studio Community 2015. Both dmd and ldc give me this error when building from Visual Studio. Any ideas? I'm able to build C++ projects...

[Issue 9433] Deprecate delete

2017-11-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9433 Mike changed: What|Removed |Added CC||slavo5...@yahoo.com --- Comment

Re: dub: Use Alternate Dependency

2017-11-20 Thread drug via Digitalmars-d-learn
21.11.2017 07:42, bauss пишет: On Tuesday, 21 November 2017 at 02:51:13 UTC, jmh530 wrote: I'm working on two related dub projects on code.dlang.org. One has a dependency on the other. However, I've made changes to both and to run the tests properly requires me to use both versions in my

[Issue 17995] template NoDuplicates(TList...) bug.

2017-11-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17995 Martin Nowak changed: What|Removed |Added CC||c...@dawg.eu

Re: Looking for a job in USA

2017-11-20 Thread Satoshi via Digitalmars-d
On Monday, 20 November 2017 at 10:38:59 UTC, user1234 wrote: On Saturday, 18 November 2017 at 08:59:53 UTC, Satoshi wrote: On Saturday, 18 November 2017 at 01:31:09 UTC, Indigo wrote: On Wednesday, 15 November 2017 at 17:32:50 UTC, Satoshi wrote: Hi, as the title says, I'm looking for a job

Re: Looking for a job in USA

2017-11-20 Thread Satoshi via Digitalmars-d
On Monday, 20 November 2017 at 09:15:15 UTC, Adam Wilson wrote: To get an H1B you'll want to get a job with one of the majors. Microsoft, Google, Apple, Amazon. There are smaller companies, but the majors have a dedicated team of lawyers who can guide your H1B through the process. It is the

Re: Looking for a job in USA

2017-11-20 Thread user1234 via Digitalmars-d
On Saturday, 18 November 2017 at 08:59:53 UTC, Satoshi wrote: On Saturday, 18 November 2017 at 01:31:09 UTC, Indigo wrote: On Wednesday, 15 November 2017 at 17:32:50 UTC, Satoshi wrote: Hi, as the title says, I'm looking for a job opportunity in the Salary... In US you get $100,000/year as a

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

2017-11-20 Thread Dukc via Digitalmars-d
On Sunday, 19 November 2017 at 04:04:04 UTC, Walter Bright wrote: Interestingly, `int` isn't nullable, and we routinely use rather ugly hacks to fake it being nullable, like reserving a bit pattern like 0, -1 or 0xDEADBEEF and calling it INVALID_VALUE, or carrying around some other separate

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

2017-11-20 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 20 November 2017 at 10:07:08 UTC, Atila Neves wrote: The problem with null as seen in C++/Java/D is that it's a magical value that different types may have. It breaks the type system. Not sure if it breaks the type system, but it would be cleaner to construct types with null

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

2017-11-20 Thread Dukc via Digitalmars-d
On Monday, 20 November 2017 at 10:45:20 UTC, Dukc wrote: A type that wraps a reference type behaving like a value type. Default initialized value and what to do on copy would be passed as template parameters. Perhaps I should try... Just realized Unique!T is already pretty close. A few

[Issue 17996] New: [Reg 2.077] getopt fails to recognize argument

2017-11-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17996 Issue ID: 17996 Summary: [Reg 2.077] getopt fails to recognize argument Product: D Version: D2 Hardware: x86 OS: FreeBSD Status: NEW Severity: regression

Re: TickDuration deprecation

2017-11-20 Thread Timon Gehr via Digitalmars-d
On 19.11.2017 20:29, Jon Degenhardt wrote: ... Some recommendations: a) Put a link to the Duration documentation in StopWatch page. b) Put examples in the StopWatch and Duration sections that explicitly show how to convert to usecs, milliseconds, and perhaps seconds in floating point

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

2017-11-20 Thread Timon Gehr via Digitalmars-d
On 20.11.2017 11:07, Atila Neves wrote: As you can guess, I happen to like null, because there are no hidden bugs from pretending it is a valid value - you get an immediate program halt - rather than subtly corrupted results. The problem with null as seen in C++/Java/D is that it's a

[Issue 17585] Wrong error message for deprecated overrides

2017-11-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17585 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/9e932a7b5e17901f4a6fe246d6e5c3fb373f881e Fix Issue 17585 - Wrong error message for deprecated

[Issue 17996] [Reg 2.077] getopt fails to recognize argument

2017-11-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17996 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/1f1efea282d5d9409bedcfcb8e8b9082b492d194 fix Issue 17996 - don't build libphobos2.a with PIC for

Project Highlight: Diamond MVC Framework

2017-11-20 Thread Mike Parker via Digitalmars-d-announce
You may have seen announcements regarding Diamond here in the forums. The project maintainer, Jason Jensen, a.k.a bauss, provided me with some info about it for a Project Highlight on the D Blog. Blog: https://dlang.org/blog/2017/11/20/project-highlight-diamond-mvc-framework/ reddit:

[Issue 17925] [Contract Programming]

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

[Issue 17925] [Contract Programming]

2017-11-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17925 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dlang.org https://github.com/dlang/dlang.org/commit/e6cc783acf392e6a666b4006d7a652a1aea50e8a fix issue 17925 - Mention the old body keyword

Re: Template Question

2017-11-20 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/19/17 2:41 PM, Adam D. Ruppe wrote: On Sunday, 19 November 2017 at 19:31:53 UTC, Jiyan wrote: Text X; You still need to instantiate it, even with default args. Text!() X; will work If that's the case, then he needs to use Text(T = char) (default type) vs. Text(T : char)

[Issue 17996] [Reg 2.077] getopt fails to recognize argument

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

Re: Project Highlight: Diamond MVC Framework

2017-11-20 Thread drug via Digitalmars-d-announce
20.11.2017 17:39, Mike Parker пишет: You may have seen announcements regarding Diamond here in the forums. The project maintainer, Jason Jensen, a.k.a bauss, provided me with some info about it for a Project Highlight on the D Blog. Blog: