Re: A betterC base

2018-02-14 Thread JN via Digitalmars-d
On Friday, 9 February 2018 at 16:54:35 UTC, Seb wrote: FYI: and for the lazy ones, there will hopefully be std.experimental.scripting soon: https://github.com/dlang/phobos/pull/5916 Shouldn't something like this be handled by better tooling (i.e. IDEs)? In Java you have to import every sin

Re: A betterC base

2018-02-11 Thread Andrei Alexandrescu via Digitalmars-d
On 2/10/18 4:41 PM, Walter Bright wrote: On 2/10/2018 7:14 AM, Dmitry Olshansky wrote: RC is a form of GC. Pedantically, yes. But common usage regards the two as disjoint, and it's inconvenient to treat RC as a subset of GC when discussing tradeoffs between the two. Nobody bothers with s/GC/

Re: A betterC base

2018-02-10 Thread Dmitry Olshansky via Digitalmars-d
On Saturday, 10 February 2018 at 18:40:43 UTC, Andrei Alexandrescu wrote: On 2/10/18 10:14 AM, Dmitry Olshansky wrote: On Friday, 9 February 2018 at 21:24:14 UTC, Walter Bright wrote: Of course, the issue can get more complex. GC uses 3x the memory of RC,  I’ve seen figures of about x2 but t

Re: A betterC base

2018-02-10 Thread Walter Bright via Digitalmars-d
On 2/10/2018 7:14 AM, Dmitry Olshansky wrote: RC is a form of GC. Pedantically, yes. But common usage regards the two as disjoint, and it's inconvenient to treat RC as a subset of GC when discussing tradeoffs between the two. Nobody bothers with s/GC/GC excluding RC/.

Re: A betterC base

2018-02-10 Thread Paulo Pinto via Digitalmars-d
On Saturday, 10 February 2018 at 19:22:51 UTC, Jonathan M Davis wrote: On Saturday, February 10, 2018 14:06:09 Timon Gehr via Digitalmars-d wrote: On 08.02.2018 16:55, JN wrote: > On Thursday, 8 February 2018 at 14:54:19 UTC, Adam D. Ruppe > wrote: >> Garbage collection has proved to be a smash

Re: A betterC base

2018-02-10 Thread Jonathan M Davis via Digitalmars-d
On Saturday, February 10, 2018 14:06:09 Timon Gehr via Digitalmars-d wrote: > On 08.02.2018 16:55, JN wrote: > > On Thursday, 8 February 2018 at 14:54:19 UTC, Adam D. Ruppe wrote: > >> Garbage collection has proved to be a smashing success in the > >> industry, providing productivity and memory-saf

Re: A betterC base

2018-02-10 Thread Andrei Alexandrescu via Digitalmars-d
On 2/10/18 10:14 AM, Dmitry Olshansky wrote: On Friday, 9 February 2018 at 21:24:14 UTC, Walter Bright wrote: Of course, the issue can get more complex. GC uses 3x the memory of RC,  I’ve seen figures of about x2 but that was in an old paper on Boehm GC. This is the classic reference: http

Re: A betterC base

2018-02-10 Thread Dmitry Olshansky via Digitalmars-d
On Friday, 9 February 2018 at 21:24:14 UTC, Walter Bright wrote: On 2/9/2018 1:14 AM, meppl wrote: let's say python is supposed to offer slow execution. So, python doesn't prove reference counting is fast (even if it is possible in theory). D on the other hand provides binaries who are expecte

Re: A betterC base

2018-02-10 Thread Dukc via Digitalmars-d
On Friday, 9 February 2018 at 21:24:14 UTC, Walter Bright wrote: Of course, the issue can get more complex. GC uses 3x the memory of RC, and so you can get extra slowdowns from swapping and cache misses. Is the total memory consumption tripled, or only the extra memory used for tracking alloc

Re: A betterC base

2018-02-10 Thread Timon Gehr via Digitalmars-d
On 08.02.2018 16:55, JN wrote: On Thursday, 8 February 2018 at 14:54:19 UTC, Adam D. Ruppe wrote: Garbage collection has proved to be a smashing success in the industry, providing productivity and memory-safety to programmers of all skill levels. Citation needed on how garbage collection has

Re: A betterC base

2018-02-09 Thread Seb via Digitalmars-d
On Friday, 9 February 2018 at 19:50:50 UTC, jmh530 wrote: On Friday, 9 February 2018 at 19:28:40 UTC, Seb wrote: Yes, that's the intended goal. However, to convince everyone involved and to be able to experiment with this in the wild for a bit, we went with std.experimental first. If drawba

Re: A betterC base

2018-02-09 Thread Walter Bright via Digitalmars-d
On 2/9/2018 6:11 AM, Atila Neves wrote: It's easy enough to create std package like this: module std; public import std.algorithm; //... Yes, but I suspect that'll be a large negative for compile speed for smallish programs.

Re: A betterC base

2018-02-09 Thread Walter Bright via Digitalmars-d
On 2/9/2018 1:14 AM, meppl wrote: let's say python is supposed to offer slow execution. So, python doesn't prove reference counting is fast (even if it is possible in theory). D on the other hand provides binaries who are expected to execute fast. I believe it has been shown (sorry, no referen

Re: A betterC base

2018-02-09 Thread Rubn via Digitalmars-d
On Friday, 9 February 2018 at 02:09:57 UTC, Jonathan M Davis wrote: 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 de

Re: A betterC base

2018-02-09 Thread jmh530 via Digitalmars-d
On Friday, 9 February 2018 at 19:28:40 UTC, Seb wrote: Yes, that's the intended goal. However, to convince everyone involved and to be able to experiment with this in the wild for a bit, we went with std.experimental first. If drawbacks get discovered, it's a lot easier to retreat. Cool.

Re: A betterC base

2018-02-09 Thread Seb via Digitalmars-d
On Friday, 9 February 2018 at 17:41:45 UTC, jmh530 wrote: On Friday, 9 February 2018 at 16:54:35 UTC, Seb wrote: FYI: and for the lazy ones, there will hopefully be std.experimental.scripting soon: https://github.com/dlang/phobos/pull/5916 Why not make this a package.d file for std? Yes

Re: A betterC base

2018-02-09 Thread jmh530 via Digitalmars-d
On Friday, 9 February 2018 at 16:54:35 UTC, Seb wrote: FYI: and for the lazy ones, there will hopefully be std.experimental.scripting soon: https://github.com/dlang/phobos/pull/5916 Why not make this a package.d file for std?

Re: A betterC base

2018-02-09 Thread Seb via Digitalmars-d
On Friday, 9 February 2018 at 14:11:37 UTC, Atila Neves wrote: On Friday, 9 February 2018 at 01:55:10 UTC, Benny wrote: [...] It's easy enough to create std package like this: module std; public import std.algorithm; //... However, I'm a _huge_ fan of local imports and only importing what's

Re: A betterC base

2018-02-09 Thread Dave Jones via Digitalmars-d
On Thursday, 8 February 2018 at 18:06:38 UTC, Walter Bright wrote: On 2/8/2018 9:03 AM, Dave Jones wrote: If D had a decent garbage collector it might be a more convincing argument. 'Decent' GC systems rely on the compiler emitting "write gates" around every assignment to a pointer. These are

Re: A betterC base

2018-02-09 Thread Atila Neves via Digitalmars-d
On Friday, 9 February 2018 at 01:55:10 UTC, Benny wrote: On Friday, 9 February 2018 at 00:08:56 UTC, Adam D. Ruppe wrote: On Thursday, 8 February 2018 at 23:50:29 UTC, Ali wrote: - import ... really, we are 2018 and people are still wasting our time to have standard libraries as imports. Its ev

Re: A betterC base

2018-02-09 Thread meppl via Digitalmars-d
On Thursday, 8 February 2018 at 15:55:09 UTC, JN wrote: On Thursday, 8 February 2018 at 14:54:19 UTC, Adam D. Ruppe wrote: Garbage collection has proved to be a smashing success in the industry, providing productivity and memory-safety to programmers of all skill levels. Citation needed on ho

Re: A betterC base

2018-02-09 Thread Fra Mecca via Digitalmars-d
On Friday, 9 February 2018 at 01:55:10 UTC, Benny wrote: Plenty of "general purpose" programming languages. The issue being that very few offer classes, no GC, easy syntax, good tooling and editor support, ... [...] D, D never changes ( fallout reference ). Hi Benny, I have read both of yo

Re: A betterC base

2018-02-09 Thread psychoticRabbit via Digitalmars-d
On Thursday, 8 February 2018 at 21:01:55 UTC, Walter Bright wrote: That really is an informative article, thanks. The only issue with it is that it doesn't cover the newer C++ ref counting model, which has proved popular. Here is another very informative article, outling the 'tradeoff' betw

Re: A betterC base

2018-02-09 Thread Seb via Digitalmars-d
On Friday, 9 February 2018 at 01:36:02 UTC, Mike Franklin wrote: On Friday, 9 February 2018 at 01:31:41 UTC, Mike Franklin wrote: On Thursday, 8 February 2018 at 17:10:00 UTC, bachmeier wrote: What are D's limitations on do-it-yourself reference counting? * Types that are built into the lan

Re: A betterC base

2018-02-08 Thread Suliman via Digitalmars-d
- import ... really, we are 2018 and people are still wasting our time to have standard libraries as imports. Its even more fun when you split, only to need import the array library. Please explain what do you mean by it?

Re: A betterC base

2018-02-08 Thread psychoticRabbit via Digitalmars-d
On Thursday, 8 February 2018 at 23:27:25 UTC, Adam D. Ruppe wrote: On Thursday, 8 February 2018 at 15:55:09 UTC, JN wrote: Citation needed on how garbage collection has been a smashing success based on its merits rather than the merits of the languages that use garbage collection. Who cares?

Re: A betterC base

2018-02-08 Thread psychoticRabbit via Digitalmars-d
On Friday, 9 February 2018 at 01:55:10 UTC, Benny wrote: People talk about the need for a clear design focus, leadership and ... things go on as before. That is D in a nutshell. People doing what they want, whenever and things stay the same. New features ( that is always fun ), a few people d

Re: A betterC base

2018-02-08 Thread rjframe via Digitalmars-d
On Thu, 08 Feb 2018 17:08:41 +, bachmeier wrote: > On Thursday, 8 February 2018 at 15:55:09 UTC, JN wrote: > >> Python was also a smashing success, but it doesn't use a garbage >> collector in it's default implementation (CPython). > > I'm pretty sure CPython uses a mark-and-sweep GC togethe

Re: A betterC base

2018-02-08 Thread psychoticRabbit via Digitalmars-d
On Thursday, 8 February 2018 at 15:51:38 UTC, Adam D. Ruppe wrote: On Thursday, 8 February 2018 at 15:43:01 UTC, ixid wrote: That's been said over and over and the message has not gotten through. It is almost never said! We always play by their terms and implicitly concede by saying "but we c

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: A betterC base

2018-02-08 Thread Benny via Digitalmars-d
On Friday, 9 February 2018 at 00:08:56 UTC, Adam D. Ruppe wrote: On Thursday, 8 February 2018 at 23:50:29 UTC, Ali wrote: But D, unlike many other languages, promotes itself as primarily a system programming language I think that's a mistake too. I'd rebrand it as a "general purpose" programm

Re: A betterC base

2018-02-08 Thread Mike Franklin via Digitalmars-d
On Friday, 9 February 2018 at 01:31:41 UTC, Mike Franklin wrote: On Thursday, 8 February 2018 at 17:10:00 UTC, bachmeier wrote: What are D's limitations on do-it-yourself reference counting? * Types that are built into the language like dynamic arrays, associative arrays, and exceptions won

Re: A betterC base

2018-02-08 Thread Mike Franklin via Digitalmars-d
On Thursday, 8 February 2018 at 17:10:00 UTC, bachmeier wrote: What are D's limitations on do-it-yourself reference counting? * Types that are built into the language like dynamic arrays, associative arrays, and exceptions won't benefit from DIY reference counting. * Much of Phobos probabl

Re: A betterC base

2018-02-08 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 8 February 2018 at 23:50:29 UTC, Ali wrote: But D, unlike many other languages, promotes itself as primarily a system programming language I think that's a mistake too. I'd rebrand it as a "general purpose" programming language. One language you can use everywhere. It worked for

Re: A betterC base

2018-02-08 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 8 February 2018 at 17:32:53 UTC, ixid wrote: Do you really think sticking with the current course on GC would gain more users than very slightly changing tack and making it something you add to a simpler base? I think the second of those will gain more users. No, the current cour

Re: A betterC base

2018-02-08 Thread Rubn via Digitalmars-d
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? If going malloc didnt lose you a bunch of features and bring a bunch of oth

Re: A betterC base

2018-02-08 Thread Ali via Digitalmars-d
On Thursday, 8 February 2018 at 23:27:25 UTC, Adam D. Ruppe wrote: On Thursday, 8 February 2018 at 15:55:09 UTC, JN wrote: Citation needed on how garbage collection has been a smashing success based on its merits rather than the merits of the languages that use garbage collection. Who cares?

Re: A betterC base

2018-02-08 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 8 February 2018 at 16:40:46 UTC, John Gabriele wrote: Regarding what you said about the implementation of the GC following in the footsteps of industry giants, what specifically about D's GC impl is patterned after other industry giant's GC's? The simple fact that it is a GC. The

Re: A betterC base

2018-02-08 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 8 February 2018 at 15:55:09 UTC, JN wrote: Citation needed on how garbage collection has been a smashing success based on its merits rather than the merits of the languages that use garbage collection. Who cares? Even if the success isn't because of GC per se, the ubiquity of it

Re: A betterC base

2018-02-08 Thread Walter Bright via Digitalmars-d
On 2/8/2018 11:51 AM, bachmeier wrote: The developers working on .NET had the opportunity to learn from Java, yet they went with GC.[0] Anyone that says one approach is objectively better than the other is clearly not familiar with all the arguments - or more likely, believes their problem is t

Re: A betterC base

2018-02-08 Thread Paulo Pinto via Digitalmars-d
On Thursday, 8 February 2018 at 18:06:38 UTC, Walter Bright wrote: On 2/8/2018 9:03 AM, Dave Jones wrote: If D had a decent garbage collector it might be a more convincing argument. 'Decent' GC systems rely on the compiler emitting "write gates" around every assignment to a pointer. These are

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: > [...] > > > > Garbage collection has proved t

Re: A betterC base

2018-02-08 Thread Ola Fosheim Grøstad via Digitalmars-d
On Thursday, 8 February 2018 at 19:51:05 UTC, bachmeier wrote: The developers working on .NET had the opportunity to learn from Java, yet they went with GC.[0] Anyone that says one approach is objectively better than the other is clearly not familiar with all the arguments - or more likely, bel

Re: A betterC base

2018-02-08 Thread bachmeier via Digitalmars-d
On Thursday, 8 February 2018 at 19:34:20 UTC, Walter Bright wrote: On 2/8/2018 10:11 AM, JN wrote: I agree, however these languages would probably have been successful even without GC, using e.g. some form of automatic reference counting. If reference counting would work with Java, and was be

Re: A betterC base

2018-02-08 Thread H. S. Teoh via Digitalmars-d
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: [...] > > Garbage collection has proved to be a smashing success in the > > industry, providing productivity and memory-safety to

Re: A betterC base

2018-02-08 Thread Walter Bright via Digitalmars-d
On 2/8/2018 10:11 AM, JN wrote: I agree, however these languages would probably have been successful even without GC, using e.g. some form of automatic reference counting. If reference counting would work with Java, and was better, wouldn't the Java developers have done it decades ago?

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 jmh530 via Digitalmars-d
On Thursday, 8 February 2018 at 18:06:38 UTC, Walter Bright wrote: [snip] More precise GC exacts heavy runtime penalties, too, which is why attempts to add them to D have had mixed results. See, there's your problem right there. Now if you replace the current GC with the slowest possible

Re: A betterC base

2018-02-08 Thread JN via Digitalmars-d
On Thursday, 8 February 2018 at 18:08:59 UTC, Walter Bright wrote: On 2/8/2018 7:55 AM, JN wrote: Citation needed on how garbage collection has been a smashing success based on its merits rather than the merits of the languages that use garbage collection. You can't separate the two. The Java

Re: A betterC base

2018-02-08 Thread Walter Bright via Digitalmars-d
On 2/8/2018 7:55 AM, JN wrote: Citation needed on how garbage collection has been a smashing success based on its merits rather than the merits of the languages that use garbage collection. You can't separate the two. The Java and Go language semantics are designed around the GC.

Re: A betterC base

2018-02-08 Thread Walter Bright via Digitalmars-d
On 2/8/2018 9:03 AM, Dave Jones wrote: If D had a decent garbage collector it might be a more convincing argument. 'Decent' GC systems rely on the compiler emitting "write gates" around every assignment to a pointer. These are justified in languages like Java and Go for which everything is GC

Re: A betterC base

2018-02-08 Thread Arun Chandrasekaran via Digitalmars-d
On Thursday, 8 February 2018 at 11:40:44 UTC, Seb wrote: On Thursday, 8 February 2018 at 11:06:15 UTC, ixid wrote: [...] https://github.com/dlang/druntime/pull/2057 [...] One of Andrei's student is working on this. I think she has been focusing on templated ==, <= and AAs so far and is no

Re: A betterC base

2018-02-08 Thread ixid via Digitalmars-d
On Thursday, 8 February 2018 at 15:51:38 UTC, Adam D. Ruppe wrote: On Thursday, 8 February 2018 at 15:43:01 UTC, ixid wrote: That's been said over and over and the message has not gotten through. It is almost never said! We always play by their terms and implicitly concede by saying "but we c

Re: A betterC base

2018-02-08 Thread bachmeier via Digitalmars-d
On Thursday, 8 February 2018 at 15:55:09 UTC, JN wrote: Python was also a smashing success, but it doesn't use a garbage collector in it's default implementation (CPython). I'm pretty sure CPython uses a mark-and-sweep GC together with reference counting.

Re: A betterC base

2018-02-08 Thread bachmeier via Digitalmars-d
On Thursday, 8 February 2018 at 17:03:58 UTC, Dave Jones wrote: On Thursday, 8 February 2018 at 14:56:31 UTC, Adam D. Ruppe wrote: ooh better last sentence D's GC implementation follows in the footsteps of industry giants without compromising experts' ability to realize maximum potential fro

Re: A betterC base

2018-02-08 Thread Dave Jones via Digitalmars-d
On Thursday, 8 February 2018 at 14:56:31 UTC, Adam D. Ruppe wrote: ooh better last sentence D's GC implementation follows in the footsteps of industry giants without compromising experts' ability to realize maximum potential from the machine. If D had a decent garbage collector it might be

Re: A betterC base

2018-02-08 Thread Michael via Digitalmars-d
On Thursday, 8 February 2018 at 14:54:19 UTC, Adam D. Ruppe 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 code, fast. Garbage c

Re: A betterC base

2018-02-08 Thread John Gabriele via Digitalmars-d
On Thursday, 8 February 2018 at 15:51:38 UTC, Adam D. Ruppe wrote: On Thursday, 8 February 2018 at 15:43:01 UTC, ixid wrote: That's been said over and over and the message has not gotten through. It is almost never said! We always play by their terms and implicitly concede by saying "but we c

Re: A betterC base

2018-02-08 Thread JN via Digitalmars-d
On Thursday, 8 February 2018 at 14:54:19 UTC, Adam D. Ruppe wrote: Garbage collection has proved to be a smashing success in the industry, providing productivity and memory-safety to programmers of all skill levels. Citation needed on how garbage collection has been a smashing success based o

Re: A betterC base

2018-02-08 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 8 February 2018 at 15:43:01 UTC, ixid wrote: That's been said over and over and the message has not gotten through. It is almost never said! We always play by their terms and implicitly concede by saying "but we can avoid it" or "look -betterC". Reddit invades our space, and we

Re: A betterC base

2018-02-08 Thread ixid via Digitalmars-d
On Thursday, 8 February 2018 at 14:56:31 UTC, Adam D. Ruppe wrote: ooh better last sentence D's GC implementation follows in the footsteps of industry giants without compromising experts' ability to realize maximum potential from the machine. That's been said over and over and the message h

Re: A betterC base

2018-02-08 Thread Adam D. Ruppe via Digitalmars-d
ooh better last sentence D's GC implementation follows in the footsteps of industry giants without compromising experts' ability to realize maximum potential from the machine.

Re: A betterC base

2018-02-08 Thread Adam D. Ruppe via Digitalmars-d
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 code, fast. Garbage collection has proved to be a smashing success in the industry, prov

Re: A betterC base

2018-02-08 Thread Mike Franklin via Digitalmars-d
On Thursday, 8 February 2018 at 11:06:15 UTC, ixid wrote: How difficult would it be for D at this point to move towards a pay for what you use system that out of the box is betterC and requires the garbage collector to be explicitly imported? I'm not sure if this is what you're looking for, bu

Re: A betterC base

2018-02-08 Thread Seb via Digitalmars-d
On Thursday, 8 February 2018 at 11:06:15 UTC, ixid wrote: How difficult would it be for D at this point to move towards a pay for what you use system that out of the box is betterC and requires the garbage collector to be explicitly imported? https://github.com/dlang/druntime/pull/2057 It fee