Re: @ctfeonly

2017-12-06 Thread Jonathan M Davis via Digitalmars-d
On Thursday, December 07, 2017 03:59:09 Mike Franklin via Digitalmars-d wrote: > Also, I want the > compiler to let me know if my intended-for-compile-time-only > function cannot be used at compile-time because I mistakenly made > it dependent on something that is only available at runtime. The s

Re: @ctfeonly

2017-12-06 Thread Jonathan M Davis via Digitalmars-d
On Thursday, December 07, 2017 03:43:42 Nicholas Wilson via Digitalmars-d wrote: > On Thursday, 7 December 2017 at 03:18:57 UTC, Jonathan M Davis > > wrote: > > On Thursday, December 07, 2017 02:09:56 lobo via Digitalmars-d > > > > wrote: > >> On Thursday, 7 December 2017 at 01:21:11 UTC, Nicholas

Re: function for inverse relative path?

2017-12-06 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, December 06, 2017 17:36:04 Timothee Cour via Digitalmars-d wrote: > what would be a robust way to do this `inverseRelativePath`, and > should that be in std.path? > > ``` > auto a="/a/b/c.d"; > auto b="b/c.d"; > assert(inverseRelativePath(a, b) == "/a"); > assertThrown(inverseRelativ

Re: @ctfeonly

2017-12-07 Thread Jonathan M Davis via Digitalmars-d
On Thursday, December 07, 2017 07:41:18 Mike Franklin via Digitalmars-d wrote: > On Thursday, 7 December 2017 at 04:45:15 UTC, Jonathan M Davis > > wrote: > > The simplest way to do that is to write a unit test that uses a > > static assertion. As I understand it, with the way CTFE works, > > it p

Re: move an argument tuple

2017-12-07 Thread Jonathan M Davis via Digitalmars-d
On Thursday, December 07, 2017 10:19:25 Shachar Shemesh via Digitalmars-d wrote: > Hi everybody, > > I'm trying to have a templated function like so: > > void func(alias F)(Parameters!F args) { > > At some point in func, I want to call F with args: > F(args); > > This does not work if one

Re: Post about comparing C, C++ and D performance with a real world project

2017-12-07 Thread Jonathan M Davis via Digitalmars-d
On Thursday, December 07, 2017 09:55:56 Antonio Corbi via Digitalmars-d wrote: > Hello all, > > Jussi Pakkanen (one of the meson build system creators) has > written a post comparing C, C++ and D. Worth a read. > > http://nibblestew.blogspot.com.es/2017/12/comparing-c-c-and-d-performance-> > with

Re: -unittest doesn't work when linking against shared libraries

2017-12-07 Thread Jonathan M Davis via Digitalmars-d
On Thursday, December 07, 2017 14:34:01 Timothee Cour via Digitalmars-d wrote: > I have a simple test case to reproduce in > https://issues.dlang.org/show_bug.cgi?id=18046 > this seems like a serious bug; what would be a workaround when dealing > with shared libraries? If you're trying to unit te

Re: @ctfeonly

2017-12-07 Thread Jonathan M Davis via Digitalmars-d
On Thursday, December 07, 2017 17:30:13 Manu via Digitalmars-d wrote: > On 7 December 2017 at 17:20, Manu wrote: > > On 7 December 2017 at 13:35, Walter Bright via Digitalmars-d < > > > > digitalmars-d@puremagic.com> wrote: > >> On 12/7/2017 11:41 AM, Manu wrote: > >>> Misuse of the API; ie, a run

Re: -unittest doesn't work when linking against shared libraries

2017-12-08 Thread Jonathan M Davis via Digitalmars-d
On Friday, December 08, 2017 10:45:29 Steven Schveighoffer via Digitalmars-d wrote: > On 12/7/17 9:15 PM, Jonathan M Davis wrote: > > On Thursday, December 07, 2017 14:34:01 Timothee Cour via Digitalmars-d > > > > wrote: > >> I have a simple test case to reproduce in > >> https://issues.dlang.org/

Re: foreach bug, or shoddy docs, or something, or both.

2017-12-09 Thread Jonathan M Davis via Digitalmars-d
On Sunday, December 10, 2017 02:02:31 Dave Jones via Digitalmars-d wrote: > Foreach ignores modification to the loop variable... > > import std.stdio; > > void main() { > int[10] foo = 10; > > foreach (i; 0..10) // writes '10' ten times > { > writeln(foo[i]); > if (

Re: Error: @nogc function 'test.func2' cannot call non-@nogc delegate 'msg'

2017-12-10 Thread Jonathan M Davis via Digitalmars-d
On Sunday, December 10, 2017 12:54:00 Shachar Shemesh via Digitalmars-d wrote: > void func1(scope lazy string msg) @nogc { > } > > void func2(scope lazy string msg) @nogc { > func1(msg); > } > > What? Why is msg GC allocating, especially since I scoped the lazy? Why > is msg even evaluated? >

Re: Adding Markdown to Ddoc

2017-12-11 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, December 05, 2017 20:11:33 Walter Bright via Digitalmars-d wrote: > https://help.github.com/articles/basic-writing-and-formatting-syntax/ > > Anyone interested in picking up the flag? > > (I know this has come up before, and I've been opposed to it, but I've > changed my mind.) I conf

Re: Suggestion: needleless findSplit* methods

2017-12-12 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, December 12, 2017 09:25:57 Seb via Digitalmars-d wrote: > On Tuesday, 12 December 2017 at 08:19:39 UTC, Piotr Mitana wrote: > > Hello, > > > > I'd like to make a little suggestion for phobos: enrich > > findSplit* method family with the "needleless" predicate option. > > > > [...] > > .

Re: Adding Markdown to Ddoc

2017-12-12 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, December 12, 2017 10:22:24 meppl via Digitalmars-d wrote: > On Tuesday, 12 December 2017 at 06:55:45 UTC, Jonathan M Davis > > wrote: > > On Tuesday, December 05, 2017 20:11:33 Walter Bright via > > > > Digitalmars-d wrote: > >> https://help.github.com/articles/basic-writing-and-formatt

Re: Adding Markdown to Ddoc

2017-12-12 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, December 12, 2017 16:12:50 Adam D. Ruppe via Digitalmars-d wrote: > On Tuesday, 12 December 2017 at 11:33:45 UTC, Jonathan M Davis > > wrote: > > Personally, I would _very_ much like to see the magic > > formatting in ddoc kept to a minimum. > > You know what drives me nuts? This* is w

Re: Is it possible to request a code review?

2017-12-12 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, December 13, 2017 06:14:04 bauss via Digitalmars-d wrote: > Documentation can be done like this for multiline: > > /** > * ... > * ... > * etc. > */ > > Instead of: > > /// ... > /// ... > /// etc. You can also do /** ... ... etc. */ or /++ ... ... etc. +/ Personally,

Re: state of ranges

2017-12-13 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, December 13, 2017 11:33:35 Steven Schveighoffer via Digitalmars-d wrote: > I don't think there's a requirement for empty not to do any work, it > just has to return the same value each time. IIRC, when this was discussed previously, it was decided that you really couldn't do work in

Re: static immutable AAs documentation

2017-12-14 Thread Jonathan M Davis via Digitalmars-d
On Friday, December 15, 2017 03:49:53 Luís Marques via Digitalmars-d wrote: > The documentation for AAs gives out this example > (): > > immutable long[string] aa = [ >"foo": 5, >"bar": 10, >"baz": 2000 >

Re: classes by value

2017-12-15 Thread Jonathan M Davis via Digitalmars-d
On Friday, December 15, 2017 11:10:42 Dgame via Digitalmars-d wrote: > On Friday, 15 December 2017 at 09:18:23 UTC, Seb wrote: > > On Thursday, 14 December 2017 at 16:40:33 UTC, Petar Kirov > > > > [ZombineDev] wrote: > >> ``` > >> scope foo = new Foo(); > >> ``` > > > > That's about to be deprecat

Re: Lazily parse a JSON text file using stdx.data.json?

2017-12-17 Thread Jonathan M Davis via Digitalmars-d
On Saturday, December 16, 2017 21:34:22 David Gileadi via Digitalmars-d wrote: > I'm a longtime fan of dlang, but haven't had a chance to do much > in-depth dlang programming, and especially not range programming. Today > I thought I'd use stdx.data.json to read from a text file. Since it's a > so

Re: Cyclic dependencies vs static constructors

2017-12-19 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, December 19, 2017 17:43:46 Jean-Louis Leroy via Digitalmars-d wrote: > This has come up in a private discussion with Luís Marques. > Consider: > > import std.stdio; > > import openmethods; > mixin(registerMethods); > > class Company > { >Employee[] employees; > > } > > class Startu

Re: Cyclic dependencies vs static constructors

2017-12-19 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, December 19, 2017 16:09:41 Steven Schveighoffer via Digitalmars- d wrote: > On 12/19/17 2:04 PM, Jonathan M Davis wrote: > > The fact that static constructors can't properly handle circular > > dependencies does mean that there's a tendancy to throw them under the > > bus at some point,

Re: Maybe D is right about GC after all !

2017-12-19 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, December 19, 2017 23:53:04 bachmeier via Digitalmars-d wrote: > On Tuesday, 19 December 2017 at 13:14:50 UTC, Mark wrote: > > On Tuesday, 19 December 2017 at 09:54:05 UTC, Walter Bright > > > > wrote: > >> "C, Python, Go, and the Generalized Greenspun Law" > >> > >> http://esr.ibiblio.o

Re: Maybe D is right about GC after all !

2017-12-20 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, December 20, 2017 19:04:20 Paulo Pinto via Digitalmars-d wrote: > On Wednesday, 20 December 2017 at 18:28:20 UTC, Ali Çehreli wrote: > > On 12/20/2017 01:14 AM, Paulo Pinto wrote: > > > from developers that learned it before C++98 and > > > can't care less what is being discussed on

Re: D as a betterC a game changer ?

2017-12-25 Thread Jonathan M Davis via Digitalmars-d
On Monday, December 25, 2017 11:18:58 Joakim via Digitalmars-d wrote: > To clarify Mike's point, the dmd backend was taken from the > existing dmc C/C++ compiler, which started in the '80s. It > wasn't written in D because D didn't exist back then! The > backend could be turned into normal GC'ed

Re: D needs to publicize its speed of compilation

2017-12-29 Thread Jonathan M Davis via Digitalmars-d
On Friday, December 29, 2017 22:37:56 I Love Stuffing via Digitalmars-d wrote: > To be fair, you are basing this off C++. C++ has an obnoxiously > slow build system at times and everyone knows this, have known > this, and have even addressed some parts of it. Yet they still > use it. I don't think

Re: D needs to publicize its speed of compilation

2017-12-29 Thread Jonathan M Davis via Digitalmars-d
On Friday, December 29, 2017 15:51:53 H. S. Teoh via Digitalmars-d wrote: > On Fri, Dec 29, 2017 at 03:49:07PM -0700, Jonathan M Davis via > Digitalmars-d wrote: [...] > > > It also depends on your personality. Personally, while I like builds > > being near instantaneous w

Re: What don't you switch to GitHub issues

2017-12-31 Thread Jonathan M Davis via Digitalmars-d
On Sunday, December 31, 2017 11:18:26 Seb via Digitalmars-d wrote: > On Saturday, 30 December 2017 at 02:50:48 UTC, Adam D. Ruppe > > wrote: > > On Saturday, 30 December 2017 at 02:37:24 UTC, IM wrote: > >> Just curious, why Bugzilla and not something else? > > > > Bugzilla was the most well-known

Re: Maybe D is right about GC after all !

2018-01-01 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, January 02, 2018 00:34:57 Nerve via Digitalmars-d wrote: > On Tuesday, 19 December 2017 at 09:54:05 UTC, Walter Bright wrote: > > "C, Python, Go, and the Generalized Greenspun Law" > > > > http://esr.ibiblio.org/?p=7804 > > I would simply add that the strongest vocalizations come from >

Re: Compile-time vs. compile-time

2018-01-02 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, January 02, 2018 17:51:01 H. S. Teoh via Digitalmars-d wrote: > object.destroy! :-P But that doesn't work during compile-time, does it? ;) - Jonathan M Davis

Re: Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-03 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, January 03, 2018 22:06:22 Mark via Digitalmars-d wrote: > On Wednesday, 3 January 2018 at 21:43:00 UTC, Ola Fosheim Grøstad > > wrote: > > There are many ways to fix this, which has been discussed to > > death before (like thread local garbage collection), but there > > is no real dec

Re: Maybe D is right about GC after all !

2018-01-03 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, January 03, 2018 19:03:20 Dan Partelly via Digitalmars-d wrote: > On Tuesday, 2 January 2018 at 01:07:21 UTC, Jonathan M Davis > > wrote: > > On Tuesday, January 02, 2018 00:34:57 Nerve via Digitalmars-d > > > > wrote: > >> On Tuesday, 19 December 2017 at 09:54:05 UTC, Walter Bright

Re: What don't you switch to GitHub issues

2018-01-04 Thread Jonathan M Davis via Digitalmars-d
On Thursday, January 04, 2018 10:27:37 H. S. Teoh via Digitalmars-d wrote: > On Thu, Jan 04, 2018 at 10:23:57AM +, Paolo Invernizzi via Digitalmars-d wrote: > > On Thursday, 4 January 2018 at 07:47:41 UTC, H. S. Teoh wrote: > > > [...] > > > > I'm missing Kenji... > > Me too. :-( Does anybody

Re: Compile-time vs. compile-time

2018-01-04 Thread Jonathan M Davis via Digitalmars-d
On Thursday, January 04, 2018 14:59:44 H. S. Teoh via Digitalmars-d wrote: > On Wed, Jan 03, 2018 at 02:44:21PM +0100, ag0aep6g via Digitalmars-d wrote: > > On 01/03/2018 02:51 AM, H. S. Teoh wrote: > > > https://wiki.dlang.org/User:Quickfur/Compile-time_vs._compile-time#Bu > > > t_what_of_run

AliasSeq seems to compile slightly faster with static foreach

2018-01-05 Thread Jonathan M Davis via Digitalmars-d
There was a recent PR for Phobos where Seb added static to a bunch of foreach's that used AliasSeq. It hadn't actually occurred to me that that was legal (I've basically just been using static foreach where foreach with AliasSeq doesn't work), but it is legal (which I suppose isn't surprising when

Re: AliasSeq seems to compile slightly faster with static foreach

2018-01-05 Thread Jonathan M Davis via Digitalmars-d
On Friday, January 05, 2018 06:10:25 Jonathan M Davis via Digitalmars-d wrote: > There was a recent PR for Phobos where Seb added static to a bunch of > foreach's that used AliasSeq. It hadn't actually occurred to me that that > was legal (I've basically just been us

Re: AliasSeq seems to compile slightly faster with static foreach

2018-01-05 Thread Jonathan M Davis via Digitalmars-d
On Friday, January 05, 2018 13:16:52 Meta via Digitalmars-d wrote: > On Friday, 5 January 2018 at 13:10:25 UTC, Jonathan M Davis wrote: > > There was a recent PR for Phobos where Seb added static to a > > bunch of foreach's that used AliasSeq. It hadn't actually > > occurred to me that that was leg

Re: Odd behavior found in GC when terminating application

2018-01-05 Thread Jonathan M Davis via Digitalmars-d
On Friday, January 05, 2018 14:29:41 Adam D. Ruppe via Digitalmars-d wrote: > On Friday, 5 January 2018 at 14:23:30 UTC, solidstate1991 wrote: > > I usually write my applications' main logic into one or more > > classes unless it can be avoided, and thus I often use ctors > > and dtors for initiali

Re: Odd behavior found in GC when terminating application

2018-01-05 Thread Jonathan M Davis via Digitalmars-d
On Friday, January 05, 2018 15:26:03 12345swordy via Digitalmars-d wrote: > On Friday, 5 January 2018 at 14:35:44 UTC, Jonathan M Davis wrote: > > On Friday, January 05, 2018 14:29:41 Adam D. Ruppe via > > > > Digitalmars-d wrote: > >> [...] > > > > Either that or use structs on the stack instead o

Re: static foreach and new identifier names

2018-01-05 Thread Jonathan M Davis via Digitalmars-d
On Friday, January 05, 2018 18:33:52 Adam D. Ruppe via Digitalmars-d wrote: > On Friday, 5 January 2018 at 18:07:54 UTC, H. S. Teoh wrote: > > Simple solution: add another pair of {} to create a nested > > > scope: > That's illegal outside of functions, though, which is the place > static foreach i

Re: AliasSeq seems to compile slightly faster with static foreach

2018-01-07 Thread Jonathan M Davis via Digitalmars-d
On Sunday, January 07, 2018 09:59:30 Timon Gehr via Digitalmars-d wrote: > On 05.01.2018 14:10, Jonathan M Davis wrote: > > Taking it a step further, I tried switching some of the static foreach's > > over to using array literals, since they held values rather than types, > > and that seemed to hav

Re: AliasSeq seems to compile slightly faster with static foreach

2018-01-07 Thread Jonathan M Davis via Digitalmars-d
On Friday, January 05, 2018 06:10:25 Jonathan M Davis via Digitalmars-d wrote: > There was a recent PR for Phobos where Seb added static to a bunch of > foreach's that used AliasSeq. It hadn't actually occurred to me that that > was legal (I've basically just been us

Re: AliasSeq seems to compile slightly faster with static foreach

2018-01-08 Thread Jonathan M Davis via Digitalmars-d
On Monday, January 08, 2018 07:37:01 H. S. Teoh via Digitalmars-d wrote: > On Sun, Jan 07, 2018 at 07:20:44PM -0700, Jonathan M Davis via > Digitalmars-d wrote: [...] > > > LOL. Okay, I feel like an idiot now. Switching to static foreach > > resulted in a slight speed-up,

Re: AliasSeq seems to compile slightly faster with static foreach

2018-01-08 Thread Jonathan M Davis via Digitalmars-d
On Monday, January 08, 2018 10:40:41 Ali Çehreli via Digitalmars-d wrote: > On 01/07/2018 06:20 PM, Jonathan M Davis wrote: > > I misremembered how iota worked with a single > > argument; I thought that iota(0) created an infinite range, whereas it > > creates a zero-length range. > > I told you

Re: Proposed Phobos equivalent of wcswidth()

2018-01-15 Thread Jonathan M Davis via Digitalmars-d
On Monday, January 15, 2018 10:37:14 H. S. Teoh via Digitalmars-d wrote: > On Mon, Jan 15, 2018 at 06:20:16PM +, Jack Stouffer via Digitalmars-d wrote: > > On Monday, 15 January 2018 at 17:32:40 UTC, H. S. Teoh wrote: > > > On Mon, Jan 15, 2018 at 02:14:56PM +, Simen Kjærås via > > > Digit

Re: Bump the minimal version required to compile DMD to 2.076.1

2018-01-16 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, January 17, 2018 05:39:31 Joakim via Digitalmars-d wrote: > On Tuesday, 16 January 2018 at 22:11:46 UTC, H. S. Teoh wrote: > > On Tue, Jan 16, 2018 at 10:13:31PM +, Johan Engelen via > > Digitalmars-d wrote: [...] > > > >> We shouldn't bump the required dlang version while knowing

Re: I closed a very old bug!

2018-01-17 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, January 17, 2018 09:32:30 Simen Kjærås via Digitalmars-d wrote: > On Tuesday, 16 January 2018 at 22:01:43 UTC, Mark wrote: > > On Tuesday, 16 January 2018 at 19:45:06 UTC, Andrei > > > > Alexandrescu wrote: > >> https://issues.dlang.org/show_bug.cgi?id=255 > >> > >> I think it would

Re: __traits(documentation, X)

2018-01-17 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, January 17, 2018 11:52:40 Steven Schveighoffer via Digitalmars-d wrote: > On 1/16/18 10:59 PM, ketmar wrote: > > Steven Schveighoffer wrote: > >> I shudder at the thought of compiled code being affected by > >> documentation. > >> > >> I don't like it, sorry. > > > > it's not really

Re: So what is the state of cross-compilation in D?

2018-01-19 Thread Jonathan M Davis via Digitalmars-d
On Friday, January 19, 2018 06:53:16 Rel via Digitalmars-d wrote: > On Wednesday, 17 January 2018 at 12:31:35 UTC, Kagamin wrote: > > https://wiki.dlang.org/Build_D_for_Android > > https://wiki.dlang.org/Building_LDC_runtime_libraries > > https://github.com/ldc-developers/ldc/pull/2142#issuecomment

Re: wut: std.datetime.systime.Clock.currStdTime is offset from Jan 1st, 1 AD

2018-01-23 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, January 23, 2018 23:27:27 Nathan S. via Digitalmars-d wrote: > https://dlang.org/phobos/std_datetime_systime.html#.Clock.currStdTime > """ > @property @trusted long currStdTime(ClockType clockType = > ClockType.normal)(); > Returns the number of hnsecs since midnight, January 1st, 1 A.D

Re: Shouldn't invalid references like this fail at compile time?

2018-01-23 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, January 24, 2018 02:28:12 Mike Franklin via Digitalmars-d wrote: > On Wednesday, 24 January 2018 at 01:44:51 UTC, Walter Bright > > wrote: > > Microcontroller code tends to be small and so it's unlikely > > that you'll need to worry about it. > > I think you need to get involved in p

Re: wut: std.datetime.systime.Clock.currStdTime is offset from Jan 1st, 1 AD

2018-01-23 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, January 24, 2018 10:05:12 drug via Digitalmars-d wrote: > 24.01.2018 03:15, Jonathan M Davis пишет: > > On Tuesday, January 23, 2018 23:27:27 Nathan S. via Digitalmars-d wrote: > >> https://dlang.org/phobos/std_datetime_systime.html#.Clock.currStdTime > >> """ > >> @property @trusted

Re: The most confusing error message

2018-01-24 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, January 24, 2018 09:21:09 Shachar Shemesh via Digitalmars-d wrote: > test.d(6): Error: struct test.A(int var = 3) is used as a type > > Of course it is. That's how structs are used. > > Program causing this: > struct A(int var = 3) { > int a; > } > > void main() { > A a; >

Re: wut: std.datetime.systime.Clock.currStdTime is offset from Jan 1st, 1 AD

2018-01-24 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, January 24, 2018 10:50:55 drug via Digitalmars-d wrote: > 24.01.2018 10:25, Jonathan M Davis пишет: > > If you need to interact with time_t, there's SysTime.toUnixTime, > > SysTime.fromUnixTime, stdTimeToUnixTime, and unixTimeToStdTime - > > assuming of course that time_t is unix time

Re: The most confusing error message

2018-01-24 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, January 24, 2018 15:15:30 Shachar Shemesh via Digitalmars-d wrote: > On 24/01/18 10:01, Jonathan M Davis wrote: > > On Wednesday, January 24, 2018 09:21:09 Shachar Shemesh via > > Digitalmars-d > > > > wrote: > >> test.d(6): Error: struct test.A(int var = 3) is used as a type > >> >

Re: Shouldn't invalid references like this fail at compile time?

2018-01-24 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, January 24, 2018 21:24:16 Seb via Digitalmars-d wrote: > On Wednesday, 24 January 2018 at 19:12:50 UTC, Steven > > Schveighoffer wrote: > > While I understand your argument, the truth is that avoiding > > null dereferencing *statically* has to be built into the > > language from the b

Re: The most confusing error message

2018-01-24 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, January 24, 2018 16:21:39 Nick Treleaven via Digitalmars-d wrote: > On Wednesday, 24 January 2018 at 14:22:59 UTC, Meta wrote: > > One way we could probably improve the error message is to > > change it to "template struct test.A(int var = 3) is used as a > > type. It must be instant

Re: Shouldn't invalid references like this fail at compile time?

2018-01-24 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, January 24, 2018 18:46:38 Walter Bright via Digitalmars-d wrote: > On 1/23/2018 7:22 PM, Jonathan M Davis wrote: > > We need to do that anyway for the overly large > > objects (and unfortunately don't last I heard). > > I put a limit in at one time for struct/class sizes to prevent t

Re: The most confusing error message

2018-01-24 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, January 24, 2018 14:22:59 Meta via Digitalmars-d wrote: > IMO the error message is not too bad once you understand what's > going on (which probably means it's really not a good error > message). It's not that uncommon for me to see a question in D.Learn where someone is asking a que

Re: __TIMESTAMP_UNIXEPOCH__ instead of useless __TIMESTAMP__?

2018-01-24 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, January 24, 2018 18:25:21 Timothee Cour via Digitalmars-d wrote: > On Wed, Jan 24, 2018 at 5:50 PM, rikki cattermole via Digitalmars-d > > wrote: > > On 24/01/2018 7:18 PM, Timothee Cour wrote: > >> __TIMESTAMP__ is pretty useless: > >> `string literal of the date and time of compil

Re: String Switch Lowering

2018-01-25 Thread Jonathan M Davis via Digitalmars-d
On Thursday, January 25, 2018 19:21:29 Benjamin Thaut via Digitalmars-d wrote: > If we think this is a good idea, should we rewrite this particular > string switch to use a associative array instead to avoid the overly > long symbol name? That particular switch statement is in a function that's d

Re: Shouldn't invalid references like this fail at compile time?

2018-01-26 Thread Jonathan M Davis via Digitalmars-d
On Thursday, January 25, 2018 17:20:21 H. S. Teoh via Digitalmars-d wrote: > On Fri, Jan 26, 2018 at 01:08:10AM +, Mike Franklin via Digitalmars-d wrote: > > On Wednesday, 24 January 2018 at 09:35:44 UTC, lobo wrote: > > > And I'm broken after using D, going back to C++ is awful and Rust > > >

Re: Class member function calls inside ctor and dtor

2018-01-27 Thread Jonathan M Davis via Digitalmars-d
On Saturday, January 27, 2018 16:18:26 Thomas Mader via Digitalmars-d wrote: > On Saturday, 27 January 2018 at 14:48:08 UTC, Johan Engelen wrote: > > I'm working on devirtualization and for that it's crucial to > > know some spec details (or define them in the spec if they > > aren't yet). > > > >

Re: Class member function calls inside ctor and dtor

2018-01-27 Thread Jonathan M Davis via Digitalmars-d
On Saturday, January 27, 2018 19:42:26 Steven Schveighoffer via Digitalmars- d wrote: > Well, a virtual function may expect that the ctor has been run, and > expect that members are different from their init values. Yes, but you can have that problem even without getting inheritance involve. For i

Re: The daily D riddle

2018-01-27 Thread Jonathan M Davis via Digitalmars-d
On Sunday, January 28, 2018 08:25:51 Shachar Shemesh via Digitalmars-d wrote: > What will the following code print? Do not use the compiler: > > import std.stdio; > > struct A { > int a = 1; > > void initialize() { > a = a.init; > } > } > > void main() { > A a; > a.initialize(); >

Re: The daily D riddle

2018-01-27 Thread Jonathan M Davis via Digitalmars-d
On Saturday, January 27, 2018 23:44:40 Jonathan M Davis via Digitalmars-d wrote: > On Sunday, January 28, 2018 08:25:51 Shachar Shemesh via Digitalmars-d > > wrote: > > What will the following code print? Do not use the compiler: > > > > import std.stdio; > > &

Re: The daily D riddle

2018-01-28 Thread Jonathan M Davis via Digitalmars-d
On Saturday, January 27, 2018 23:40:16 H. S. Teoh via Digitalmars-d wrote: > On Sun, Jan 28, 2018 at 12:04:42AM -0700, Jonathan M Davis via Digitalmars-d wrote: > > On Saturday, January 27, 2018 23:44:40 Jonathan M Davis via > > Digitalmars-d > > > wrote: > [...] >

Re: The daily D riddle

2018-01-28 Thread Jonathan M Davis via Digitalmars-d
On Sunday, January 28, 2018 01:52:58 Walter Bright via Digitalmars-d wrote: > On 1/28/2018 12:36 AM, H. S. Teoh wrote: > > Is there a practical use case for which this is actually useful? > > Generic code, where a member function doesn't need the instance to perform > its task. Maybe there's a sit

Re: Dscanner - DCD - Dfix ... Editor support or the lack of it.

2018-01-28 Thread Jonathan M Davis via Digitalmars-d
On Sunday, January 28, 2018 00:27:51 H. S. Teoh via Digitalmars-d wrote: > On Sun, Jan 28, 2018 at 12:03:38AM +, Benny via Digitalmars-d wrote: > [...] > > > The problem is Teoh that learning a language in Vim or a IDE are two > > totally different things. > > > > I used to program in Notepad b

Re: Dscanner - DCD - Dfix ... Editor support or the lack of it.

2018-01-28 Thread Jonathan M Davis via Digitalmars-d
On Sunday, January 28, 2018 17:32:30 arturg via Digitalmars-d wrote: > On Sunday, 28 January 2018 at 16:02:36 UTC, Jonathan M Davis > > wrote: > >> Erm, you do realize that Vim has built-in commands for > >> navigating nested brackets and parentheses, right? And > >> automatic bracket closing is ju

Re: Dscanner - DCD - Dfix ... Editor support or the lack of it.

2018-01-28 Thread Jonathan M Davis via Digitalmars-d
On Sunday, January 28, 2018 18:11:09 arturg via Digitalmars-d wrote: > On Sunday, 28 January 2018 at 17:51:19 UTC, Jonathan M Davis > > wrote: > > Hmm. Thanks. I'll have to check that out. I haven't done > > anything with folds in ages. > > > > Fortunately, I don't have to do anything with python r

Re: Dscanner - DCD - Dfix ... Editor support or the lack of it.

2018-01-28 Thread Jonathan M Davis via Digitalmars-d
On Sunday, January 28, 2018 15:06:49 H. S. Teoh via Digitalmars-d wrote: > On Sun, Jan 28, 2018 at 09:02:36AM -0700, Jonathan M Davis via > > It is true though that most of the core developers around here favor > > editors like vim or emacs and would prefer to focus their efforts on > > the languag

Re: Dscanner - DCD - Dfix ... Editor support or the lack of it.

2018-01-28 Thread Jonathan M Davis via Digitalmars-d
On Sunday, January 28, 2018 16:18:40 H. S. Teoh via Digitalmars-d wrote: > On Sun, Jan 28, 2018 at 05:13:15PM -0700, Jonathan M Davis via Digitalmars-d wrote: > > Either way, more folks need to put some time and/or money towards IDE > > development for D, or the folks who want

Re: How programmers transition between languages

2018-01-28 Thread Jonathan M Davis via Digitalmars-d
On Monday, January 29, 2018 04:18:12 jmh530 via Digitalmars-d wrote: > On Monday, 29 January 2018 at 03:22:54 UTC, Ola Fosheim Grøstad > > wrote: > > On Sunday, 28 January 2018 at 23:09:00 UTC, Michael wrote: > >> by the whole target audience. Rust, on the other hand, seems > >> to be picking up th

Re: Should negating an unsigned integral be an error?

2018-01-29 Thread Jonathan M Davis via Digitalmars-d
On Monday, January 29, 2018 09:58:00 Dave Jones via Digitalmars-d wrote: > Given > > uint i = 12345; > > should > > writeln(-i) > > be an error? or maybe i should be automatically cast to a larger > signed type? It arguably should be, but it's pretty common in C/C++ to get uint.max with -1, and I

Re: Inline code in the docs - the correct way

2018-01-31 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, January 31, 2018 16:19:53 H. S. Teoh via Digitalmars-d wrote: > In general, almost all text macro / formatting systems, from LaTeX to > HTML to ddoc, are universally ugly and verbose when it comes to tables, > and makes my eyes bleed. The only exception I've found so far is > > markdo

Re: Quora: Why hasn't D started to replace C++?

2018-01-31 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, January 31, 2018 17:16:21 Walter Bright via Digitalmars-d wrote: > On 1/31/2018 1:19 PM, H. S. Teoh wrote: > > I'd rather stick with just B&W. > >dmd -color=off file.d I have to wonder if my settings are right. I've never noticed any color in error messages. Messing around with

Re: Quora: Why hasn't D started to replace C++?

2018-01-31 Thread Jonathan M Davis via Digitalmars-d
On Thursday, February 01, 2018 02:42:52 Adam D. Ruppe via Digitalmars-d wrote: > On Thursday, 1 February 2018 at 02:24:44 UTC, H. S. Teoh wrote: > > I thought that *is* the color support that was added? If > > you're expecting IDE-style syntax highlighting, I think you're > > setting your expecta

Re: Inline code in the docs - the correct way

2018-01-31 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, January 31, 2018 18:58:29 Walter Bright via Digitalmars-d wrote: > On 1/31/2018 5:37 PM, Steven Schveighoffer wrote: > > Where it breaks down is when you have many nested tags, and you end with > > ) > Long ago, I adjusted my text editor so that when the cursor is placed on > ),

Re: Quora: Why hasn't D started to replace C++?

2018-01-31 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, January 31, 2018 19:01:46 Walter Bright via Digitalmars-d wrote: > On 1/31/2018 6:14 PM, Jonathan M Davis wrote: > > I have to wonder if my settings are right. I've never noticed any color > > in error messages. Messing around with some errors right now, the only > > color I see is t

Re: Inline code in the docs - the correct way

2018-02-02 Thread Jonathan M Davis via Digitalmars-d
On Friday, February 02, 2018 15:12:45 Adam D. Ruppe via Digitalmars-d wrote: > On Thursday, 1 February 2018 at 02:10:22 UTC, Jonathan M Davis > > IMHO, the main problem with ddoc for documentation is that it > > doesn't automatically handle stuff like cross-links, and it > > fundamentally can't, be

Re: My choice to pick Go over D ( and Rust ), mostly non-technical

2018-02-05 Thread Jonathan M Davis via Digitalmars-d
On Monday, February 05, 2018 18:54:32 John Gabriele via Digitalmars-d wrote: > What is the specific purpose of -betterC? I see from > that it's (A) useful when > targeting constrained environments, and (B) for easier embedding > of D libraries into larger proje

Re: Annoyance with new integer promotion deprecations

2018-02-05 Thread Jonathan M Davis via Digitalmars-d
On Monday, February 05, 2018 15:27:45 H. S. Teoh via Digitalmars-d wrote: > On Mon, Feb 05, 2018 at 01:56:33PM -0800, Walter Bright via Digitalmars-d wrote: > > The idea is a byte can be implicitly converted to a dchar, [...] > > This is the root of the problem. Character types should never have

Re: Annoyance with new integer promotion deprecations

2018-02-05 Thread Jonathan M Davis via Digitalmars-d
On Monday, February 05, 2018 18:30:03 Walter Bright via Digitalmars-d wrote: > On 2/5/2018 3:18 PM, Timon Gehr wrote: > > Neither byte nor dchar are C types. > > "byte" is a C "signed char". On Posix systems, a dchar maps to wchar_t, > although wchar_t is a typedef not a distinct type. It's a bit c

Re: zortech - symantec - digital mars

2018-02-05 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, February 06, 2018 03:07:02 rikki cattermole via Digitalmars-d wrote: > The comment is correct, dmd was indeed closed source for a good number > of years. > > I believe it was Brad (from my hazy memory) who when joined got it > opened up (and had the bug tracker installed too). Regardl

Re: My choice to pick Go over D ( and Rust ), mostly non-technical

2018-02-06 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, February 06, 2018 21:44:16 Ralph Doncaster via Digitalmars-d wrote: > One reason I considered porting was to > see if dmd outputs better code than gcc. It almost certainly won't. dmd compiles code lightning fast and has a decent optimizer, but it's really not on par with gcc or llvm's

Re: Bye bye, fast compilation times

2018-02-06 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, February 06, 2018 17:20:04 H. S. Teoh via Digitalmars-d wrote: > So I'd like to propose that we do something similar to what we did with > template instantiations a couple of years ago: make it so that unittests > are only instantiated if the module they occur in is being compiled, > ot

Re: Bye bye, fast compilation times

2018-02-06 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, February 07, 2018 01:47:19 jmh530 via Digitalmars-d wrote: > On Wednesday, 7 February 2018 at 01:20:04 UTC, H. S. Teoh wrote: > > So I'd like to propose that we do something similar to what we > > did with template instantiations a couple of years ago: make it > > so that unittests ar

Re: A betterC base

2018-02-08 Thread Jonathan M Davis via Digitalmars-d
On Thursday, February 08, 2018 14:54:19 Adam D. Ruppe via Digitalmars-d wrote: > On Thursday, 8 February 2018 at 11:06:15 UTC, ixid wrote: > > It feels like D has not overcome at least two major issues in > > the public mind, the built-in GC > > D is a pragmatic language aimed toward writing fast

Re: A betterC base

2018-02-08 Thread Jonathan M Davis via Digitalmars-d
On Thursday, February 08, 2018 11:28:52 H. S. Teoh via Digitalmars-d wrote: > On Thu, Feb 08, 2018 at 12:17:06PM -0700, Jonathan M Davis via Digitalmars-d wrote: > > On Thursday, February 08, 2018 14:54:19 Adam D. Ruppe via Digitalmars-d > > > wrote: > [...] > > > &

Re: A betterC base

2018-02-08 Thread Jonathan M Davis via Digitalmars-d
On Thursday, February 08, 2018 23:57:45 Rubn via Digitalmars-d wrote: > On Thursday, 8 February 2018 at 18:06:38 UTC, Walter Bright wrote: > > I.e. it isn't an issue of us D guys being dumb about the GC. > > So you could say it's a design flaw of D, attempting to use a GC > where it isn't suited?

Re: proposal: heredoc comments to allow `+/` in comments, eg from urls or documented unittests

2018-02-09 Thread Jonathan M Davis via Digitalmars-d
On Friday, February 09, 2018 08:42:08 Kagamin via Digitalmars-d wrote: > On Friday, 9 February 2018 at 07:04:26 UTC, Nick Sabalausky > > (Abscissa) wrote: > > (If I were in change of the world, /** and /* both would be > > compiler errors, banned from all commits, and non-nesting block > > comments

Re: Which language futures make D overcompicated?

2018-02-09 Thread Jonathan M Davis via Digitalmars-d
On Friday, February 09, 2018 13:34:01 tetyys via Digitalmars-d wrote: > On Friday, 9 February 2018 at 13:10:16 UTC, rumbu wrote: > > And not a language feature but I hate dub. Just saying. > > Why do people hate dub? I think it's a great package manager and > build tool I don't know what all of th

Re: Quora: Why hasn't D started to replace C++?

2018-02-09 Thread Jonathan M Davis via Digitalmars-d
On Friday, February 09, 2018 14:01:02 Atila Neves via Digitalmars-d wrote: > Unit tests are a great idea, right? Try convincing a group of 10 > programmers who have never written one and don't know anyone else > who has. I have; I failed. The amazing thing is when a programmer tries to argue that

Re: Which language futures make D overcompicated?

2018-02-09 Thread Jonathan M Davis via Digitalmars-d
On Friday, February 09, 2018 14:48:36 jmh530 via Digitalmars-d wrote: > On Friday, 9 February 2018 at 14:01:23 UTC, Andrea Fontana wrote: > > [snip] > > - Unfinished parts of language (ex: shared?) > > I see this a lot, but I don't really use shared so I always > forget how exactly it is unfinishe

Re: Which language futures make D overcompicated?

2018-02-09 Thread Jonathan M Davis via Digitalmars-d
On Friday, February 09, 2018 15:33:30 Andrea Fontana via Digitalmars-d wrote: > On Friday, 9 February 2018 at 15:05:05 UTC, Jonathan M Davis > > wrote: > > [...] > > The reality of the matter is that shared is _supposed_ to > > result in a bunch of compilation errors when you try to do > > stuff t

Re: Which language futures make D overcompicated?

2018-02-09 Thread Jonathan M Davis via Digitalmars-d
On Friday, February 09, 2018 15:48:42 Andrea Fontana via Digitalmars-d wrote: > On Friday, 9 February 2018 at 15:35:38 UTC, Mike Parker wrote: > > On Friday, 9 February 2018 at 15:27:18 UTC, Andrea Fontana > > > > wrote: > >>> If you need to take the address of a constant, use immutable > >>> or c

Re: Which language futures make D overcompicated?

2018-02-09 Thread Jonathan M Davis via Digitalmars-d
On Friday, February 09, 2018 20:49:24 Meta via Digitalmars-d wrote: > On Friday, 9 February 2018 at 07:54:49 UTC, Suliman wrote: > > I like D, but sometimes it's look like for me too complicated. > > Go have a lot of fans even it not simple, but primitive. But > > some D futures make it very hard t

Re: Quora: Why hasn't D started to replace C++?

2018-02-09 Thread Jonathan M Davis via Digitalmars-d
On Friday, February 09, 2018 13:39:22 Walter Bright via Digitalmars-d wrote: > On 2/9/2018 6:01 AM, Atila Neves wrote: > > Unit tests are a great idea, right? Try convincing a group of 10 > > programmers who have never written one and don't know anyone else who > > has. I have; I failed. > Unit tes

Re: Which language futures make D overcompicated?

2018-02-09 Thread Jonathan M Davis via Digitalmars-d
On Friday, February 09, 2018 14:49:42 H. S. Teoh via Digitalmars-d wrote: > On Fri, Feb 09, 2018 at 05:49:31PM -0500, Nick Sabalausky (Abscissa) via Digitalmars-d wrote: > > On 02/09/2018 05:20 PM, H. S. Teoh wrote: > > > Sadly, these days it seems almost every other day somebody else > > > stumbl

<    6   7   8   9   10   11   12   13   14   15   >