Re: On the performance of building D programs

2013-04-06 Thread Andrej Mitrovic
On 4/6/13, Vladimir Panteleev wrote: > Certainly; but at the same time, I think this is an opportunity > to make the tool do the right thing with the least keystrokes. Hmm yeah. Well we should definitely give implementing it a try and see what the build times are like.

Re: My thoughts & tries with rvalue references

2013-04-06 Thread Zach the Mystic
On Friday, 5 April 2013 at 07:45:33 UTC, Dicebot wrote: On Friday, 5 April 2013 at 00:12:33 UTC, Zach the Mystic wrote: struct Large { ... } ref Large process1(@temp ref Large a) { return a; } ref Large process2(@temp ref Large a) { return a; } Large* lar = &process2(process1(Large("Pass"," a "

Re: Disable GC entirely

2013-04-06 Thread Adrian Mercieca
Thanks for your very quick answer Vladimir. > On Saturday, 6 April 2013 at 04:16:13 UTC, Adrian Mercieca wrote: >> Hi, >> >> Is it possible to switch off the GC entirely in D? Can the GC be >> switched off completely - including within phobos? > > import core.memory; > GC.disable(); > > However,

Re: My thoughts & tries with rvalue references

2013-04-06 Thread Dicebot
On Saturday, 6 April 2013 at 07:50:10 UTC, Zach the Mystic wrote: ... Ye, I know it and I hate DIP25. It tries to limit references to allow them in @safe and I hate @safe as much. Type system will lack plain "non-null pointer" type then. Sad I can do nothing about it.

Re: Disable GC entirely

2013-04-06 Thread Dicebot
On Saturday, 6 April 2013 at 08:01:09 UTC, Adrian Mercieca wrote: So I'll either have to not use the runtime+standard libraries and implement all I'd need myself without GC or else stick to C++. The latter would be a pity because I really like D, but then in C++ I have full control and the per

Re: DIP32: Uniform tuple syntax

2013-04-06 Thread bearophile
Zach the Mystic: Not disagreeing, but you had mentioned nullable types before, and I was wondering what they might look like also. Have you made an enhancement for these I could examine? I opened this: http://d.puremagic.com/issues/show_bug.cgi?id=4571 Part of the syntax is: T? means T null

Re: Formal Review of std.process

2013-04-06 Thread Lars T. Kyllingstad
On Friday, 5 April 2013 at 06:33:24 UTC, Tobias Pankrath wrote: There was a recent thread [1] about deepening Phobos' module hierarchy, and it seems that most people agree this is something that should eventually happen. In light of this, here's a suggestion: How about we, rather than updati

Re: Formal Review of std.process

2013-04-06 Thread Lars T. Kyllingstad
I wonder if we should change the name of Config.gui to Config.noConsole. It corresponds to the CREATE_NO_WINDOW flag in the Windows API, for which the documentation says: "The process is a console application that is being run without a console window. Therefore, the console handle for the ap

Re: Disable GC entirely

2013-04-06 Thread Peter Alexander
On Saturday, 6 April 2013 at 04:16:13 UTC, Adrian Mercieca wrote: Hi, Is it possible to switch off the GC entirely in D? Can the GC be switched off completely - including within phobos? What I am looking for is absolute control over memory management. I've done some tests with GC on and GC off

Re: Disable GC entirely

2013-04-06 Thread Paulo Pinto
Am 06.04.2013 10:01, schrieb Adrian Mercieca: Thanks for your very quick answer Vladimir. On Saturday, 6 April 2013 at 04:16:13 UTC, Adrian Mercieca wrote: Hi, Is it possible to switch off the GC entirely in D? Can the GC be switched off completely - including within phobos? import core.mem

Re: status of shared libs

2013-04-06 Thread Jacob Carlborg
On 2013-04-06 04:22, Walter Bright wrote: awaiting: https://github.com/D-Programming-Language/phobos/pull/1240 Everything in druntime is done? -- /Jacob Carlborg

Re: On the performance of building D programs

2013-04-06 Thread Jacob Carlborg
On 2013-04-06 04:05, Vladimir Panteleev wrote: 1) It will break tools like rdmd, for cases when the tool knows the exact set of modules that needs to be compiled 2) When would that be useful? When building libraries of course. -- /Jacob Carlborg

Re: Disable GC entirely

2013-04-06 Thread Jacob Carlborg
On 2013-04-06 06:16, Adrian Mercieca wrote: Hi, Is it possible to switch off the GC entirely in D? Can the GC be switched off completely - including within phobos? What I am looking for is absolute control over memory management. I've done some tests with GC on and GC off and the performance wi

Re: Disable GC entirely

2013-04-06 Thread bearophile
Peter Alexander: I also use a modified druntime that prints callstacks when a GC allocation occurs, so I know if it happens by accident. Is it possible to write a patch to activate those prints with a compiler switch? Bye, bearophile

Re: On the performance of building D programs

2013-04-06 Thread Vladimir Panteleev
On Saturday, 6 April 2013 at 10:56:19 UTC, Jacob Carlborg wrote: On 2013-04-06 04:05, Vladimir Panteleev wrote: 1) It will break tools like rdmd, for cases when the tool knows the exact set of modules that needs to be compiled 2) When would that be useful? When building libraries of course.

To help LDC/GDC

2013-04-06 Thread bearophile
I remember Walter saying two or more times that the semantics of D offers some optimization opportunities that probably are not yet used to try to reduce the run-time of D programs. Is Walter willing to write down a list of such opportunities? (Ideas from other persons are welcome). Maybe some

Re: DIP33: A standard exception hierarchy

2013-04-06 Thread deadalnix
On Friday, 5 April 2013 at 18:38:46 UTC, Jonathan M Davis wrote: Part of the point is that if you had an Error, there _is_ no graceful shutdown. It's in an invalid state. Doing _anything_ at that point is risky. Depending on why the Error occurred, you could just as easily completely corrupt pl

Re: DIP33: A standard exception hierarchy

2013-04-06 Thread deadalnix
On Friday, 5 April 2013 at 19:39:14 UTC, John Colvin wrote: On Friday, 5 April 2013 at 13:42:02 UTC, deadalnix wrote: Right now, it isn't even possible to try a graceful shutdown when really, the program is unlikely to be in a completely unpredictable state, especially in @safe code. It is p

Re: File compare/merge

2013-04-06 Thread SomeDude
On Monday, 1 April 2013 at 19:53:23 UTC, Walter Bright wrote: Life has gotten a lot easier for me trying to manage multiple branches of D since I've been using file compare/merge tools. I use winmerge for Windows, and meld for Linux. They are both free, and work great. What do you use? I a

Re: DIP32: Uniform tuple syntax

2013-04-06 Thread Andrei Alexandrescu
On 4/6/13 4:10 AM, bearophile wrote: Zach the Mystic: Not disagreeing, but you had mentioned nullable types before, and I was wondering what they might look like also. Have you made an enhancement for these I could examine? I opened this: http://d.puremagic.com/issues/show_bug.cgi?id=4571 Pa

Re: File compare/merge

2013-04-06 Thread dennis luehring
Am 01.04.2013 21:53, schrieb Walter Bright: Life has gotten a lot easier for me trying to manage multiple branches of D since I've been using file compare/merge tools. I use winmerge for Windows, and meld for Linux. They are both free, and work great. What do you use? i've used several open

Re: DIP32: Uniform tuple syntax

2013-04-06 Thread bearophile
Andrei Alexandrescu: I think it's safe to close it. Nullable types have not enjoyed a lot of appreciation in C#. On the other hand they have gained appreciation in almost every one of the other recent languages, as F#, Scala, Rust, and few Java-Like languages running on the JavaVM, so this i

Re: DIP32: Uniform tuple syntax

2013-04-06 Thread deadalnix
On Saturday, 6 April 2013 at 12:41:46 UTC, Andrei Alexandrescu wrote: On 4/6/13 4:10 AM, bearophile wrote: Zach the Mystic: Not disagreeing, but you had mentioned nullable types before, and I was wondering what they might look like also. Have you made an enhancement for these I could examine?

Re: DIP32: Uniform tuple syntax

2013-04-06 Thread deadalnix
On Friday, 29 March 2013 at 08:58:06 UTC, kenji hara wrote: http://wiki.dlang.org/DIP32 Kenji Hara The {} syntax is already crowded, I don't think this is wise to use it here. Timon already presented plenty of cases where it isn't as simple as presented in the DIP, and I can come up with a

Re: DIP32: Uniform tuple syntax

2013-04-06 Thread deadalnix
On Saturday, 6 April 2013 at 12:59:53 UTC, bearophile wrote: Andrei Alexandrescu: I think it's safe to close it. Nullable types have not enjoyed a lot of appreciation in C#. On the other hand they have gained appreciation in almost every one of the other recent languages, as F#, Scala, Rust,

Re: On the performance of building D programs

2013-04-06 Thread Jacob Carlborg
On 2013-04-06 13:02, Vladimir Panteleev wrote: Why would you want recursive compilation plus specifying multiple modules? If you're building a library which as a dependency on another library, which you build from source. Perhaps not that common. For a library, you generally know the exact

Re: On the performance of building D programs

2013-04-06 Thread Andrej Mitrovic
On 4/6/13, Jacob Carlborg wrote: >> For a library, you generally know the exact set of modules to be built. >> If not in a makefile / build script, you could write one dummy module >> that imports all of the library's components, and use that as the root >> of incremental compilation. > > Using a

Re: Official D Grammar

2013-04-06 Thread Bruno Medeiros
On 02/04/2013 00:18, Brian Schott wrote: I've pretty much finished up my work on the std.d.lexer module. I am waiting for the review queue to make some progress on the other (three?) modules being reviewed before starting a thread on it. In the meantime I've started some work on an AST module fo

Re: DIP32: Uniform tuple syntax

2013-04-06 Thread Maxim Fomin
On Saturday, 6 April 2013 at 08:10:30 UTC, bearophile wrote: Zach the Mystic: Not disagreeing, but you had mentioned nullable types before, and I was wondering what they might look like also. Have you made an enhancement for these I could examine? I opened this: http://d.puremagic.com/issues

Re: Official D Grammar

2013-04-06 Thread Bruno Medeiros
On 02/04/2013 00:18, Brian Schott wrote: I've pretty much finished up my work on the std.d.lexer module. I am waiting for the review queue to make some progress on the other (three?) modules being reviewed before starting a thread on it. BTW, even in the lexer spec I've found an issue. How doe

Re: Formal Review of std.process

2013-04-06 Thread Steven Schveighoffer
On Sat, 06 Apr 2013 05:13:10 -0400, Lars T. Kyllingstad wrote: I wonder if we should change the name of Config.gui to Config.noConsole. It corresponds to the CREATE_NO_WINDOW flag in the Windows API, for which the documentation says: "The process is a console application that is being r

Re: Formal Review of std.process

2013-04-06 Thread Vladimir Panteleev
On Saturday, 6 April 2013 at 15:26:01 UTC, Steven Schveighoffer wrote: The origin of the name 'gui' is from when one wanted to start a windows GUI application from another windows GUI application, and you did it without this flag, it would pop up an annoying console window. So you can read it

Re: Collections

2013-04-06 Thread Stewart Gordon
On 12/03/2013 11:57, ZILtoid1991 wrote: Is there any equaliaments of java collections in D? Different collections that are part of the Java API have different D equivalents. For lists, vectors and stacks, arrays (with their increased power over C, Java, etc. arrays) are more or less the D eq

Re: Formal Review of std.process

2013-04-06 Thread Steven Schveighoffer
On Sat, 06 Apr 2013 11:38:14 -0400, Vladimir Panteleev wrote: Um, that's exactly how it works. There is a value in the PE header which determines this. The corresponding linker flag is /SUBSYSTEM:WINDOWS for a GUI program or /SUBSYSTEM:CONSOLE for a console program. The flag specifies th

Re: Disable GC entirely

2013-04-06 Thread Rob T
On Saturday, 6 April 2013 at 08:01:09 UTC, Adrian Mercieca wrote: In my very simple test, the GC version of my program ran more than twice slower than the non GC version. I just cannot accept that kind of performance penalty. Thanks. I have ran into similar problems with D and understand w

Re: File compare/merge

2013-04-06 Thread captaindet
On 2013-04-01 14:53, Walter Bright wrote: Life has gotten a lot easier for me trying to manage multiple branches of D since I've been using file compare/merge tools. I use winmerge for Windows, and meld for Linux. They are both free, and work great. What do you use? windows only: i use the

Re: On the performance of building D programs

2013-04-06 Thread Andrej Mitrovic
On 4/5/13, Vladimir Panteleev wrote: > I noticed that compiling D programs in the usual manner (rdmd) is > as much as 40% slower than it can be. I've implemented the -rb and -rx switchex (the -r switch itself is taken, it's an undocumented switch). These switches are used to enable recursive buil

Re: On the performance of building D programs

2013-04-06 Thread bearophile
Andrej Mitrovic: But I've only tested this on smaller projects, I wonder what the impact is on larger projects. I think the recursive scan is mostly meant for small projects. I think large projects will usually use some kind of build scripts. Bye, bearophile

Re: On the performance of building D programs

2013-04-06 Thread Andrej Mitrovic
On 4/6/13, bearophile wrote: > I think the recursive scan is mostly meant for small projects. I > think large projects will usually use some kind of build scripts. A gtkD benchmark: $ C:\dev\projects\GtkD\demos\gtk>timeit rdmd --build-only --force -IC:\dev\projects\GtkD\src HelloWorld.d > Done i

Re: My thoughts & tries with rvalue references

2013-04-06 Thread Namespace
I am currently in the process to collect the necessary information and would gladly give you the previous data. Then you could already take a look on it, if you still need something or if something is missing and if, what. Then I have a clearer idea. That would certainly be very nice of you. Fo

Re: Formal Review of std.process

2013-04-06 Thread Jesse Phillips
On Sunday, 31 March 2013 at 13:14:52 UTC, Johannes Pfau wrote: Reposted from github: I think it would be nice if the high level functions would also allow using custom environment variables. I think that is probably a good idea. The exec functions allowed for this. I've never made use of it

Re: Formal Review of std.process

2013-04-06 Thread Lars T. Kyllingstad
On Saturday, 6 April 2013 at 15:26:01 UTC, Steven Schveighoffer wrote: On Sat, 06 Apr 2013 05:13:10 -0400, Lars T. Kyllingstad wrote: I know some people don't like negative flags, but in this case it seems more precise. It doesn't create a GUI, it prevents the creation of a console. [...]

Re: Formal Review of std.process

2013-04-06 Thread Jesse Phillips
On Saturday, 6 April 2013 at 09:13:11 UTC, Lars T. Kyllingstad wrote: I wonder if we should change the name of Config.gui to Config.noConsole. It corresponds to the CREATE_NO_WINDOW flag in the Windows API, for which the documentation says: "The process is a console application that is being

Re: My thoughts & tries with rvalue references

2013-04-06 Thread Dicebot
On Saturday, 6 April 2013 at 17:50:31 UTC, Namespace wrote: I am currently in the process to collect the necessary information and would gladly give you the previous data. Then you could already take a look on it, if you still need something or if something is missing and if, what. Then I have

Re: Official D Grammar

2013-04-06 Thread Jonathan M Davis
On Saturday, April 06, 2013 16:21:12 Bruno Medeiros wrote: > On 02/04/2013 00:18, Brian Schott wrote: > > I've pretty much finished up my work on the std.d.lexer module. I am > > waiting for the review queue to make some progress on the other (three?) > > modules being reviewed before starting a th

Re: Official D Grammar

2013-04-06 Thread Artur Skawina
On 04/06/13 17:21, Bruno Medeiros wrote: > On 02/04/2013 00:18, Brian Schott wrote: >> I've pretty much finished up my work on the std.d.lexer module. I am >> waiting for the review queue to make some progress on the other (three?) >> modules being reviewed before starting a thread on it. >> > > B

Re: Disable GC entirely

2013-04-06 Thread Peter Alexander
On Saturday, 6 April 2013 at 11:01:09 UTC, bearophile wrote: Peter Alexander: I also use a modified druntime that prints callstacks when a GC allocation occurs, so I know if it happens by accident. Is it possible to write a patch to activate those prints with a compiler switch? Yes, but I

Re: Disable GC entirely

2013-04-06 Thread Rob T
On Saturday, 6 April 2013 at 21:29:20 UTC, Peter Alexander wrote: On Saturday, 6 April 2013 at 11:01:09 UTC, bearophile wrote: Peter Alexander: I also use a modified druntime that prints callstacks when a GC allocation occurs, so I know if it happens by accident. Is it possible to write a pa

Re: Official D Grammar

2013-04-06 Thread Bruno Medeiros
On 06/04/2013 20:52, Artur Skawina wrote: On 04/06/13 17:21, Bruno Medeiros wrote: On 02/04/2013 00:18, Brian Schott wrote: I've pretty much finished up my work on the std.d.lexer module. I am waiting for the review queue to make some progress on the other (three?) modules being reviewed before

Re: On the performance of building D programs

2013-04-06 Thread Andrei Alexandrescu
On 4/6/13 1:14 PM, Andrej Mitrovic wrote: On 4/5/13, Vladimir Panteleev wrote: I noticed that compiling D programs in the usual manner (rdmd) is as much as 40% slower than it can be. I've implemented the -rb and -rx switchex (the -r switch itself is taken, it's an undocumented switch). These

Re: On the performance of building D programs

2013-04-06 Thread Vladimir Panteleev
On Saturday, 6 April 2013 at 17:52:40 UTC, Andrej Mitrovic wrote: It definitely helps when you're building something from scratch. Great stuff! But RDMD can track changes to dependencies, which DMD still can't do. I want to try implementing this feature in DMD and see the speed difference fo

Re: On the performance of building D programs

2013-04-06 Thread Andrei Alexandrescu
On 4/6/13 9:38 PM, Vladimir Panteleev wrote: On Saturday, 6 April 2013 at 17:52:40 UTC, Andrej Mitrovic wrote: It definitely helps when you're building something from scratch. Great stuff! But RDMD can track changes to dependencies, which DMD still can't do. I want to try implementing this f

Re: On the performance of building D programs

2013-04-06 Thread Vladimir Panteleev
On Sunday, 7 April 2013 at 02:04:54 UTC, Andrei Alexandrescu wrote: Yah, I think it would be great to dedicate rdmd to the dependency/caching part and leave the build to the compiler. One possibility would be to run the build and the dependency saving in parallel (!). Why in parallel and not

Re: On the performance of building D programs

2013-04-06 Thread Andrei Alexandrescu
On 4/6/13 10:12 PM, Vladimir Panteleev wrote: On Sunday, 7 April 2013 at 02:04:54 UTC, Andrei Alexandrescu wrote: Yah, I think it would be great to dedicate rdmd to the dependency/caching part and leave the build to the compiler. One possibility would be to run the build and the dependency savin

Re: Disable GC entirely

2013-04-06 Thread Vladimir Panteleev
On Saturday, 6 April 2013 at 22:29:42 UTC, Rob T wrote: We lack decent tools to even understand what the GC is doing, https://github.com/CyberShadow/Diamond D1-only due to lack of interest.

Re: status of shared libs

2013-04-06 Thread Ellery Newcomer
On 04/05/2013 07:22 PM, Walter Bright wrote: On 4/5/2013 7:18 PM, Ellery Newcomer wrote: is there a roadmap for druntime/phobos support of shared libraries? just built dmd from master, and I still can't coax out a 64 bit .so awaiting: https://github.com/D-Programming-Language/phobos/pull/124

Re: On the performance of building D programs

2013-04-06 Thread Vladimir Panteleev
On Sunday, 7 April 2013 at 02:16:10 UTC, Andrei Alexandrescu wrote: Why in parallel and not in one go? (-v with -rb and without -o-) I'm not sure how rdmd would distingish dmd's output from the output of the running program. Oh wait, the run will be a distinct step - awesome. I'll have a go

Re: On the performance of building D programs

2013-04-06 Thread Andrei Alexandrescu
On 4/7/13 12:07 AM, Vladimir Panteleev wrote: On Sunday, 7 April 2013 at 02:16:10 UTC, Andrei Alexandrescu wrote: Why in parallel and not in one go? (-v with -rb and without -o-) I'm not sure how rdmd would distingish dmd's output from the output of the running program. Oh wait, the run will b

Re: On the performance of building D programs

2013-04-06 Thread Vladimir Panteleev
On Sunday, 7 April 2013 at 04:25:19 UTC, Andrei Alexandrescu wrote: On 4/7/13 12:07 AM, Vladimir Panteleev wrote: On Sunday, 7 April 2013 at 02:16:10 UTC, Andrei Alexandrescu wrote: Why in parallel and not in one go? (-v with -rb and without -o-) I'm not sure how rdmd would distingish dmd's o

DIP35: supplement to DIP25: Sealed References

2013-04-06 Thread Zach the Mystic
http://wiki.dlang.org/DIP35 I've talked about this before, but it seems like the right time to formalize it, especially to illustrate the slight conflict it would impose on using 'scope ref' to allow rvalue temporary references. If 'ref' itself were made completely safe using 'scope' and/or '

Re: status of shared libs

2013-04-06 Thread Walter Bright
On 4/6/2013 7:15 PM, Ellery Newcomer wrote: dmd -unittest -fPIC -defaultlib=phobos2so -shared test1.d -oflibtest1.so gcc test1.c `pwd`/libtest1.so -L/usr/lib64/dmd/ -L/usr/lib/dmd/ -o test1.x /lib64/libphobos2so.so: undefined reference to `_Dmain' collect2: error: ld returned 1 exit status _D

Re: On the performance of building D programs

2013-04-06 Thread Vladimir Panteleev
On Sunday, 7 April 2013 at 04:07:55 UTC, Vladimir Panteleev wrote: I'll have a go at the rdmd side of this. https://github.com/CyberShadow/tools/compare/BuildRecurse