Re: A collection of DIPs

2015-09-12 Thread NX via Digitalmars-d
On Saturday, 12 September 2015 at 15:54:53 UTC, Adam D. Ruppe wrote: D programs *never* have a GC thread. Remember, the D GC isn't magic and isn't actually even that complicated, it is just an ordinary function call. That's what I was afraid of :'(

Re: A collection of DIPs

2015-09-12 Thread NX via Digitalmars-d
On Friday, 11 September 2015 at 19:30:56 UTC, ponce wrote: Some of us use and need @nogc all the time. The other parts of an application can use the GC: best of both worlds. Is there even a compiler switch to disable GC altogether so the program doesn't have a GC thread? No, I can't see it...

Re: A collection of DIPs

2015-09-12 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 12 September 2015 at 06:25:45 UTC, NX wrote: Is there even a compiler switch to disable GC altogether so the program doesn't have a GC thread? No, I can't see it... D programs *never* have a GC thread. The way the D garbage collector works is something like this: void*

Re: A collection of DIPs

2015-09-12 Thread ZombineDev via Digitalmars-d
On Wednesday, 9 September 2015 at 10:00:10 UTC, Ola Fosheim Grøstad wrote: On Wednesday, 9 September 2015 at 06:13:59 UTC, Dominikus Dittes Scherkl wrote: IMHO "friend" is a misconception, that is only there to compensate for the lack of modules in C++. It can be useful. Say you have a

Re: A collection of DIPs

2015-09-12 Thread via Digitalmars-d
On Saturday, 12 September 2015 at 13:48:14 UTC, ZombineDev wrote: That's what the `package` access modifier is for. Then you would have to be in the same package, and that is rather broad? The advantage of "friend" is that you can pinpoint what might be a source for trouble when debugging,

Re: A collection of DIPs

2015-09-12 Thread Edmund Smith via Digitalmars-d
On Saturday, 12 September 2015 at 06:25:45 UTC, NX wrote: On Friday, 11 September 2015 at 19:30:56 UTC, ponce wrote: Some of us use and need @nogc all the time. The other parts of an application can use the GC: best of both worlds. Is there even a compiler switch to disable GC altogether so

Re: A collection of DIPs

2015-09-11 Thread via Digitalmars-d
On Wednesday, 9 September 2015 at 20:42:35 UTC, Laeeth Isharc wrote: On Wednesday, 9 September 2015 at 14:00:52 UTC, Brandon Ragland wrote: D has zero use in anything time sensitive. You mean, for example, like dealing with data for a billion customers and responding in a few hundred

Re: A collection of DIPs

2015-09-11 Thread NX via Digitalmars-d
On Wednesday, 9 September 2015 at 21:27:02 UTC, deadalnix wrote: You can make a difference. Yes you probably don't have as much experience, but that's a great opportunity to learn. Many here would be willing to mentor you if you want. I can do it if you want to contribute to SDC. I'm sure

Re: A collection of DIPs

2015-09-11 Thread ponce via Digitalmars-d
On Friday, 11 September 2015 at 01:04:56 UTC, Brandon Ragland wrote: And @nogc is just a band-aid fix. Might as well go back to C or C++ and leave the silly @nogc behind with all it's weird integration rules when working around managed memory. Some of us use and need @nogc all the time.

Re: A collection of DIPs

2015-09-11 Thread via Digitalmars-d
On Friday, 11 September 2015 at 01:04:56 UTC, Brandon Ragland wrote: There was a lovely article by a fellow for his PhD on how D garbage collector was literally killing his JavaScript engine, It was a she :-). Some people have focused on the GC, but you actually need to change the strategy

Re: A collection of DIPs

2015-09-10 Thread Brandon Ragland via Digitalmars-d
On Wednesday, 9 September 2015 at 18:21:32 UTC, NX wrote: On Wednesday, 9 September 2015 at 14:00:52 UTC, Brandon Ragland wrote: It's slow, really slow, and stopping the entire world is painful, even in trivial user applications. A pause for even half a second or less on the UI makes the

Re: A collection of DIPs

2015-09-10 Thread Brandon Ragland via Digitalmars-d
On Wednesday, 9 September 2015 at 20:42:35 UTC, Laeeth Isharc wrote: On Wednesday, 9 September 2015 at 14:00:52 UTC, Brandon Ragland wrote: D has zero use in anything time sensitive. You mean, for example, like dealing with data for a billion customers and responding in a few hundred

Re: A collection of DIPs

2015-09-10 Thread Brandon Ragland via Digitalmars-d
On Wednesday, 9 September 2015 at 18:21:32 UTC, NX wrote: On Wednesday, 9 September 2015 at 14:00:52 UTC, Brandon Ragland wrote: It's slow, really slow, and stopping the entire world is painful, even in trivial user applications. A pause for even half a second or less on the UI makes the

Re: A collection of DIPs

2015-09-09 Thread NX via Digitalmars-d
On Wednesday, 9 September 2015 at 06:13:59 UTC, Dominikus Dittes Scherkl wrote: On Tuesday, 8 September 2015 at 17:07:50 UTC, NX wrote: And, can somebody show me a working example code of how to solve that friend class problem without some horrible hacktic way and agressive template/mixin

Re: A collection of DIPs

2015-09-09 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Tuesday, 8 September 2015 at 17:07:50 UTC, NX wrote: And, can somebody show me a working example code of how to solve that friend class problem without some horrible hacktic way and agressive template/mixin stuff ? (I doubt it can solved via templates but anyway...) Why would you ever need

Re: A collection of DIPs

2015-09-09 Thread ponce via Digitalmars-d
On Wednesday, 9 September 2015 at 06:48:45 UTC, NX wrote: Woah! I didn't know about private members are visible in it's module, but to me it feels much cleaner if it was achieved by something similar to what I suggested... Isn't it? never mind... Everything in the same module is friend to

Re: A collection of DIPs

2015-09-09 Thread via Digitalmars-d
On Wednesday, 9 September 2015 at 06:13:59 UTC, Dominikus Dittes Scherkl wrote: IMHO "friend" is a misconception, that is only there to compensate for the lack of modules in C++. It can be useful. Say you have a database engine module and an ORM module, you might want to give the ORM special

Re: A collection of DIPs

2015-09-09 Thread Brandon Ragland via Digitalmars-d
On Monday, 7 September 2015 at 14:44:05 UTC, nx wrote: https://github.com/NightmareX1337/DX Don't kill me, I'm just trying to help... You can report issues and create pull requests :) Destroy! Most of these things I agree with. CamelCase this_case or that-case doesn't matter to me. It's a

Re: A collection of DIPs

2015-09-09 Thread via Digitalmars-d
On Wednesday, 9 September 2015 at 14:00:52 UTC, Brandon Ragland wrote: Seriously, the fact that the GC has gone un-noticied for so long is a HUGE turn off for just about ANY would be C like It has not gone un-noticed, that's how @nogc came about. So people are aware that it is not suitable

Re: A collection of DIPs

2015-09-09 Thread via Digitalmars-d
On Wednesday, 9 September 2015 at 18:21:32 UTC, NX wrote: The more you don't collect, the more time it takes time to collect; thus, you may want to configure GC to do it's job more often so it doesn't stop significantly, and also manually trigger collection where appropriate... Maybe that is

Re: A collection of DIPs

2015-09-09 Thread Laeeth Isharc via Digitalmars-d
On Wednesday, 9 September 2015 at 14:00:52 UTC, Brandon Ragland wrote: D has zero use in anything time sensitive. You mean, for example, like dealing with data for a billion customers and responding in a few hundred microseconds? ;) https://www.sociomantic.com/technology/ Case closed.

Re: A collection of DIPs

2015-09-09 Thread NX via Digitalmars-d
On Wednesday, 9 September 2015 at 14:00:52 UTC, Brandon Ragland wrote: It's slow, really slow, and stopping the entire world is painful, even in trivial user applications. A pause for even half a second or less on the UI makes the application looks "chunky" and broken. If you're having that

Re: A collection of DIPs

2015-09-09 Thread ponce via Digitalmars-d
On Wednesday, 9 September 2015 at 18:21:32 UTC, NX wrote: If I had the time and knowledge I would spend them to make D better, but you can't expect a teenager (tip: me) to help making DMD front-end better or to implement a precise GC... I guess? You wouldn't know what people have done with D

Re: A collection of DIPs

2015-09-09 Thread deadalnix via Digitalmars-d
On Wednesday, 9 September 2015 at 18:21:32 UTC, NX wrote: If I had the time and knowledge I would spend them to make D better, but you can't expect a teenager (tip: me) to help making DMD front-end better or to implement a precise GC... I guess? You can make a difference. Yes you probably

Re: A collection of DIPs

2015-09-08 Thread Brian Rogoff via Digitalmars-d
On Tuesday, 8 September 2015 at 03:09:20 UTC, Rikki Cattermole wrote: On 08/09/15 5:27 AM, Shammah Chancellor wrote: void main() { import std.stdio : writeln; writeln("Hello world!"); } -Shammah It's not just an idiomatic way to code with local imports, it's a compilation

Re: A collection of DIPs

2015-09-08 Thread Dmitry Olshansky via Digitalmars-d
On 08-Sep-2015 19:09, Brian Rogoff wrote: On Tuesday, 8 September 2015 at 03:09:20 UTC, Rikki Cattermole wrote: On 08/09/15 5:27 AM, Shammah Chancellor wrote: void main() { import std.stdio : writeln; writeln("Hello world!"); } -Shammah It's not just an idiomatic way to code with

Re: A collection of DIPs

2015-09-08 Thread NX via Digitalmars-d
Thanks all your thoughts and criticisms... - I'm fine if DMD ever starts to support multiple `alias this`, just to see if it would be easier for compiler to use opCast for implicit casts. - Those who think ^ would cause problems as it's already used for xor must be forgetting * is widely

Re: A collection of DIPs

2015-09-07 Thread rsw0x via Digitalmars-d
On Monday, 7 September 2015 at 14:52:21 UTC, Ola Fosheim Grøstad wrote: On Monday, 7 September 2015 at 14:44:05 UTC, nx wrote: https://github.com/NightmareX1337/DX Don't kill me, I'm just trying to help... Thanks for taking the time to write up your ideas. There has been much discussion on

Re: A collection of DIPs

2015-09-07 Thread via Digitalmars-d
On Monday, 7 September 2015 at 14:52:21 UTC, Ola Fosheim Grøstad wrote: 1. You need to make sure that pointers to the interior of a GC object are not live when the last pointer to the start of the GC objects disappears. 2. You need to annotate C functions that take pointers with a guarantee

Re: A collection of DIPs

2015-09-07 Thread BBasile via Digitalmars-d
On Monday, 7 September 2015 at 14:44:05 UTC, nx wrote: https://github.com/NightmareX1337/DX Don't kill me, I'm just trying to help... You can report issues and create pull requests :) Destroy! OK, here are a few comments on what i agree with or not. The other point simply don't interest

Re: A collection of DIPs

2015-09-07 Thread Israel via Digitalmars-d
On Monday, 7 September 2015 at 14:44:05 UTC, nx wrote: https://github.com/NightmareX1337/DX Destroy! Yea ill admit, i came from C# and i hate underscores. I prefer PascalCase above anything.

Re: A collection of DIPs

2015-09-07 Thread via Digitalmars-d
On Monday, 7 September 2015 at 15:34:21 UTC, BBasile wrote: You can already create, allocate new class, struct and union instances that are not known by the GC. This is not well known because I've explained this several time on several boards to several people. So this proposal is simply

Re: A collection of DIPs

2015-09-07 Thread via Digitalmars-d
On Monday, 7 September 2015 at 14:44:05 UTC, nx wrote: https://github.com/NightmareX1337/DX Don't kill me, I'm just trying to help... Thanks for taking the time to write up your ideas. There has been much discussion on the GC in the past and I agree that a GC-tracking mechanism that can

A collection of DIPs

2015-09-07 Thread nx via Digitalmars-d
https://github.com/NightmareX1337/DX Don't kill me, I'm just trying to help... You can report issues and create pull requests :) Destroy!

Re: A collection of DIPs

2015-09-07 Thread Shammah Chancellor via Digitalmars-d
On Monday, 7 September 2015 at 14:44:05 UTC, nx wrote: https://github.com/NightmareX1337/DX Don't kill me, I'm just trying to help... You can report issues and create pull requests :) Destroy! Hi NX, Thanks for the document. A lot of what you say about UDA and compile time reflection is

Re: A collection of DIPs

2015-09-07 Thread Rikki Cattermole via Digitalmars-d
On 08/09/15 5:27 AM, Shammah Chancellor wrote: On Monday, 7 September 2015 at 14:44:05 UTC, nx wrote: https://github.com/NightmareX1337/DX Don't kill me, I'm just trying to help... You can report issues and create pull requests :) Destroy! Hi NX, Thanks for the document. A lot of what

Re: A collection of DIPs

2015-09-07 Thread Timon Gehr via Digitalmars-d
On 09/07/2015 08:55 PM, Enamex wrote: - Templates are obvious enough as they are IMHO. It's also obvious that declaration syntax mimicking use syntax would be superior.

Re: A collection of DIPs

2015-09-07 Thread Artur Skawina via Digitalmars-d
> void main() > { > std.stdio.writeln("Hello world!"); // Error: undefined identifier 'std' > } struct Mod(string B="") { template opDispatch(string M) { static if (__traits(compiles, { mixin(`import `~B~"."~M~`;`); })) mixin(`import opDispatch =

Re: A collection of DIPs

2015-09-07 Thread Idan Arye via Digitalmars-d
On Monday, 7 September 2015 at 16:10:31 UTC, Israel wrote: On Monday, 7 September 2015 at 14:44:05 UTC, nx wrote: https://github.com/NightmareX1337/DX Destroy! Yea ill admit, i came from C# and i hate underscores. I prefer PascalCase above anything. 3 of the keys in my keychain are of

Re: A collection of DIPs

2015-09-07 Thread Enamex via Digitalmars-d
On Monday, 7 September 2015 at 14:44:05 UTC, nx wrote: https://github.com/NightmareX1337/DX Don't kill me, I'm just trying to help... You can report issues and create pull requests :) Destroy! - Your point against undisciplined UFCS: Completely agree. I'm writing a 'DIP' that I'm probably