Re: Reading file contents when file has changed

2012-07-13 Thread Kevin Cox
On Jul 13, 2012 4:40 PM, OlaOst ola...@gmail.com wrote: I'm working on a program (using dmd 2.059 under windows) that automatically reloads the contents of a file if it has changed, by checking the last modified timestamp on the file every 0.2 seconds, then using the readText function in

Re: What was the reason for not including std.net.curl in the Windows phobos library?

2012-07-07 Thread Kevin Cox
On Jul 7, 2012 8:45 AM, Gary Willoughby d...@kalekold.net wrote: What was the reason for not including 'std.net.curl' in the Windows phobos library? IIRC it is licencing issues, they can't include curl in the distribution without certain requirements that were deemed to awkward to implement.

Re: floats default to NaN... why?

2012-06-07 Thread Kevin Cox
On Jun 7, 2012 9:53 PM, Minas minas_mina1...@hotmail.co.uk wrote: I agree that the default value for floats/doubles should be zero. It feels much more natural. I think the problem here is that people are thinking about some stuff too much. D is a rather new language that wants to be practical.

Re: Static function conflicts with Non-Static?!

2012-06-02 Thread Kevin Cox
On Jun 2, 2012 6:38 AM, bearophile bearophileh...@lycos.com wrote: Jonathan M Davis: Personally, I wish that it weren't legal to call a static function with an object and that you had to explicitly use the class, I agree. Bye, bearophile Same here, D 3.0?

Re: D under Linux Mint

2012-05-23 Thread Kevin Cox
On May 23, 2012 5:48 PM, snow marcel.patzw...@googlemail.com wrote: Hello, Ive tried to install D under Linux and followed the steps described on . this page http://dlang.org/dmd-linux.html . I checked all folders after every step and everything is where it should be. In the secound step I

Re: How to make a directory?

2012-05-01 Thread Kevin Cox
On May 1, 2012 7:49 PM, Alex Rønne Petersen xtzgzo...@gmail.com wrote: Also, is there a way to require the root password of the user when going create the directory in a restricted folder (like /usr) AFTER the application has started? No idea, sorry. Thank you. -- - Alex You could

Re: Aquivalent References as in C++?

2012-04-16 Thread Kevin Cox
On Apr 16, 2012 5:29 PM, Namespace rswhi...@googlemail.com wrote: That case I would like to prevent, but at the same time allow Ivalues. How does that work in D classes? As far as I know this operates with structs, but shouldn't it be possible with classes and objects too? I would recommend

Re: D 50% slower than C++. What I'm doing wrong?

2012-04-15 Thread Kevin Cox
On Apr 15, 2012 4:30 AM, Joseph Rushton Wakeling joseph.wakel...@webdrake.net wrote: ... the compiler accepts it. Whether that's because it's acceptably pure, or because the compiler just doesn't detect this case of impurity, is another matter. The int k is certainly mutable from outside the

Re: Creating a file in ~/.config (ubuntu)

2012-04-13 Thread Kevin Cox
Try using the $HOME environment variable.

Re: How to set up QTD?.

2012-04-09 Thread Kevin Cox
On Apr 8, 2012 10:59 PM, vmars316 vmars...@live.com wrote: Greetings, I would also like to try out QTD. So far, I have set things up this: C:\D\dmd2\QT I made a .batch file for both drcc.exe and duic.exe . duic.exe gave no feedback. drcc.exe gave the following feedback:

Re: How to set up QTD?.

2012-04-09 Thread Kevin Cox
On Apr 9, 2012 12:09 PM, vmars316 vmars...@live.com wrote: On Monday, 9 April 2012 at 12:52:47 UTC, Kevin Cox wrote: I think rcc is the Qt resource compiler. I'm not at my computer at the moment to check, but if so it will translate xml resource files into D source. I think rcc is the Qt

Re: Latest versions of Entice Designer and DFL?

2012-04-08 Thread Kevin Cox
On Apr 8, 2012 4:49 PM, vmars316 vmars...@live.com wrote: Win7: Greetings, Ok, I got the command line for dmd2 running (Hello World). :) Now I would like to install a Visual GUI Builder. Not knowing any better, think I'll try Entice Designer and DFL. The most current versions I can find

Re: GUI library

2012-03-25 Thread Kevin Cox
On Sun, Mar 25, 2012 at 11:13 AM, Jacob Carlborg d...@me.com wrote: On 2012-03-25 15:04, Tyro[17] wrote: Is there one available for use with D2 on MAC OS X? Thanks, Andrew * QtD - Bindings to Qt. Use the native drawing operations of the operating system (I think). Available on all

Re: Capturing caller's file/line number in variadic template functions

2012-03-16 Thread Kevin Cox
On Mar 16, 2012 2:29 PM, Adam D. Ruppe destructiona...@gmail.com wrote: Put the string file = blaha in the template argument list, before the variadic. voic checkConsistency(string file = __FILE__, int line = __LINE__, T...)(T t) { But then you have to write it each time.

Re: Dumb question about git

2012-03-01 Thread Kevin Cox
When people say git encourages rewriting history. Don't listen. Once you have pushed your changes to the world they are immutable. This is because git uses cryptography internally and changing the history messes everything up. If you haven't pushed you can change all of your history and it

Re: Dumb question about git

2012-03-01 Thread Kevin Cox
On Mar 1, 2012 12:15 PM, H. S. Teoh hst...@quickfur.ath.cx wrote: On Thu, Mar 01, 2012 at 10:22:33AM -0500, Kevin Cox wrote: When people say git encourages rewriting history. Don't listen. Once you have pushed your changes to the world they are immutable. This is because git uses

Re: Trouble with -lib in linux undefined reference to `_Dmain'

2012-02-29 Thread Kevin Cox
I think you need the -lib in the linker command (too?). On Feb 29, 2012 12:25 PM, André an...@s-e-a-p.de wrote: Hi, I use Mono-D and have a hello world example which compiles fine. I set the compiler option -lib and receives an error undefined reference to `_Dmain'. Following commands are

Re: UnitTest and visual D

2012-02-23 Thread Kevin Cox
I am having the same problem with visual d plugin for monodevelop. When I compile from the command line the tests run. A possibly related problem is that some files do not get recompiled when changed unless I do a rebuild. On Feb 23, 2012 8:38 PM, Jonathan M Davis jmdavisp...@gmx.com wrote: On

Re: UnitTest and visual D

2012-02-23 Thread Kevin Cox
On Feb 23, 2012 9:41 PM, Jonathan M Davis jmdavisp...@gmx.com wrote There may very well be further problems due to what the IDE is doing (such as not doing a full recompile when you enable -unittest), but the unit tests won't print anything out on success regardless unless you use print

Re: D runtime Garbage Collector details

2012-02-23 Thread Kevin Cox
On Feb 23, 2012 6:50 PM, Vadim vadim.goryu...@gmail.com wrote: I am looking for the details on D Garbage Collection implementation. I will much appreciate if someone suggests the answers or give some links to existing documentation clarifying the following points: 1. Is it Mark-n-Sweep or copy

Re: Weird opEquals Problem

2012-02-22 Thread Kevin Cox
Oh, ok. First of all the docs appear somewhat misleading. I thought that function was an example on how to overload it. That could be clarified a little. Second of all, isn't that inefficient? And if you wanted to be able to compare to another type you don't control? I think it would make

Re: Let this() figure out T implicitly?

2012-02-17 Thread Kevin Cox
The error message is saying that you are trying to use Foo as a type but Foo is not a type, it is a template for a type. On Feb 17, 2012 7:20 AM, kraybourne st...@kraybourne.com wrote: Hi! This doesn't work: import std.stdio; class Foo(T) { T t;

Re: Let this() figure out T implicitly?

2012-02-17 Thread Kevin Cox
Yes. At least as the compiler would say. It's a little odd but I believe that is how the D Nam mangling works. I personally just think of Foo!(Class) as the type. On Feb 17, 2012 8:05 AM, kraybourne st...@kraybourne.com wrote: On 2/17/12 1:51 PM, Kevin Cox wrote: The error message is saying

Re: Default Implementation For an Interface

2012-02-17 Thread Kevin Cox
I wasn't looking to implement meathods in the interface, I was looking to have a default class that implements the interface that would be created if you called `new Interface();` I don't think this is possible. and now that I think about it I think that it is for a good reason. On Fri, Feb 17,