Re: Please vote on std.datetime

2010-12-10 Thread klickverbot
On 12/10/10 1:26 AM, Andrei Alexandrescu wrote: It's time to vote. Please vote for or against inclusion of datetime into Phobos, along with your reasons. Yes, it'd totally like to see this library in Phobos, but I think that we need to be aware of a few issues, mainly caused by the sheer amoun

DMD2 .deb fails to install on Ubuntu 10.10 – just remove »shell«?

2010-12-08 Thread klickverbot
Currently, this is what happens when you try to install the DMD 2 deb from digitalmars.com on a vanilla Ubuntu 10.10 box: sudo dpkg -i ~/Downloads/dmd_2.050-0_i386.deb Selecting previously deselected package dmd. (Reading database ... 127418 files and directories currently installed.) Unpacking

Re: why a part of D community do not want go to D2 ?

2010-11-11 Thread klickverbot
On 11/11/10 8:52 PM, Russel Winder wrote: Using Git is certainly better than using Subversion, but Bazaar and Mercurial are the tools of choice for the discerning developer. Oh, so you really want to start that discussion/flamewar again? -.- As you noted yourself in the thread over at d.D.anno

Re: why a part of D community do not want go to D2 ?

2010-11-11 Thread klickverbot
On 11/11/10 2:53 AM, Andrew Wiley wrote: Well, my assumption was that Phobos 2 was pretty much complete. […] Hell, no – there currently isn't even a reliable way to load shared libraries in Phobos 2. std.loader doesn't count, it's almost unusable in practice (ExeModule being a scope class – w

Re: Kill implicit joining of adjacent strings

2010-11-11 Thread klickverbot
+1 on this. While implicit joining can certainly be useful in C in some cases, D has the ~ operator for such cases. Since compile-time primitives are guaranteed to be folded anyway (IIRC), I can imagine no situation where the benefits of banning implicit joining (reducing the chance for bugs

Re: why a part of D community do not want go to D2 ?

2010-11-10 Thread klickverbot
On 11/10/10 1:38 PM, klickverbot wrote: I probably wouldn't get the problem anyway, and[…] Whoops, s/and/as/ there…

Re: why a part of D community do not want go to D2 ?

2010-11-10 Thread klickverbot
On 11/10/10 12:00 AM, Walter Bright wrote: […] Producing another incompatible split with D2 will not be of an > advantage to anyone, and will just give people reasons not to use D > at all. I probably wouldn't get the problem anyway, and I have been using both D1/Tango and, recently, D2/Phobos

Re: Improving version(...)

2010-10-18 Thread klickverbot
On 10/18/10 9:56 PM, Simen kjaeraas wrote: * require declarations for all version identifiers. Versions which are set from the command line should be explicitly declared, eg: version Lite = extern; version Demo = extern; That would make creating a bird's nest impossible. And currently, you can m

Re: htod feature request: save commands in translated file

2010-10-18 Thread klickverbot
On 10/18/10 5:39 PM, Andrej Mitrovic wrote: […] I didn't know there was an active on github. […] That's probably because I haven't officially announced it yet – I am currently trying to get it into SWIG trunk. After this is done (which could take quite some time, since I have not received a r

Re: std.algorithm.remove and principle of least astonishment

2010-10-16 Thread klickverbot
On 10/16/10 9:47 PM, Andrei Alexandrescu wrote: Thanks for the input. This is not a bug, it's what I believe to be a very intentional feature: strings are not ordinary arrays because characters have variable length. As such, assigning to "the first character in a string" is not allowed because th

Re: std.algorithm.remove and principle of least astonishment

2010-10-16 Thread klickverbot
In case it was not clear, this is what I want to achive: »tmp = tmp[ 0 .. i ] ~ tmp[ ( i + 1 ) .. $ ];«

std.algorithm.remove and principle of least astonishment

2010-10-16 Thread klickverbot
Hello all, I decided to have a go at solving some easy programming puzzles with D2/Phobos to see how Phobos, especially ranges and std.algorithm, work out in simple real-world use cases (the puzzle in question is from hacker.org, by the way). The following code is a direct translation of a s

Re: rationale for function and delegate

2010-10-16 Thread klickverbot
On 10/16/10 10:40 AM, Paulo Pinto wrote: while reading TDPL I start wondering what is the background between function and delegate. delegate() is a function pointer amended with a second context pointer, which allows you to have pointers to member functions, closures and so on. function() is

Re: Visual D Build + DMD Bugginess = Bad

2010-10-14 Thread klickverbot
On 10/14/10 8:28 AM, Benjamin Thaut wrote: I'm also having problems with VisualD + DMD, I made a posting in the bugs forums about it, but unfortunately no one did answer yet: Uh, afaik the digitalmars.D.bugs forum just mirrors the changes from the puremagic D bugzilla, and thus is not quite th

Re: Is D right for me?

2010-10-13 Thread klickverbot
On 10/13/10 6:56 PM, Jonathan M Davis wrote: I wouldn't think that it would be a problem, but I'm no expert, and we've had problems in the past because Tango devs thought that proposed Phobos code was too similar to Tango. So, as I understand it, unless we get specific permission from the Tango d

Re: CMake for D2 ready for testers

2010-10-09 Thread klickverbot
On 10/9/10 11:40 AM, Russel Winder wrote: Well KDE was about to choose bksys (the immediate ancestor of Waf) until some nasty politiking went on and all of a sudden they chose CMake. I don't know all the details, but I know enough to say that that decision was not made based on a proper study.

Re: is D too modern for Emacs?

2010-10-09 Thread klickverbot
On 10/9/10 12:33 PM, Russel Winder wrote: So putting a Mercurial repository with this source code on dsource.org is the thing that is agreed? I guess this means making a new project? Well, not really agreed – recently, a few large projects (LDC, QtD) have migrated their sources away from DSou

Re: Fedora 14 will integrate D into the distribution

2010-09-29 Thread klickverbot
On 9/29/10 1:29 PM, Daniel Gibson wrote: On Wed, Sep 29, 2010 at 1:20 PM, bioinfornatics wrote: And gdc is not a gcc project So? It's licensed under GPL, isn't that sufficient? (Besides the doesn't-support-gcc-4.5/4.6 issue) No, because in order to include your code with mainline GCC, yo

Re: Fedora 14 will integrate D into the distribution

2010-09-28 Thread klickverbot
On 9/28/10 5:37 PM, Paulo Pinto wrote: Hi, it seems that Fedora will provide D out of the box in their distribution. But they seem to be providing an old version of it. https://fedoraproject.org/wiki/Features/D_Programming Cheers, Paulo Well, as far as I can tell, it's not exactly an old

Re: Proposal: Relax rules for 'pure'

2010-09-22 Thread klickverbot
On 9/22/10 9:14 PM, Steven Schveighoffer wrote: Hypothetical counter-case struct S { version(stronglypure) string s; else char[] s; } pure foo(S s); // changes strength depending on S' contents -Steve This is a change to the signature of foo – S with the stronglypure version defined and S w

Re: Proposal: Relax rules for 'pure'

2010-09-22 Thread klickverbot
On 9/22/10 7:10 PM, Steven Schveighoffer wrote: But the compiler will be able to tell. I think adding a __traits(isStronglyPure, symbol) will be good for those rare occasions where you really want to ensure purity. static assert(__traits(isStronglyPure, foo)); -Steve Shouldn't it be possible

Template parameter shadowing

2010-09-22 Thread klickverbot
In short, should the following be allowed? --- class Class(T) { string foo(T)(T arg) { return T.stringof; } string bar() { return T.stringof; } } unittest { auto c = new Class!int; assert(c.foo("asdf") == "string"); assert(c.bar() == "int"); } --- Note that the T type par

Re: Proposal: Relax rules for 'pure'

2010-09-22 Thread klickverbot
On 9/22/10 4:21 AM, Don wrote: PROPOSAL: Drop the first requirement. Only one requirement is necessary: A pure function does not read or write any global mutable state. If a pure function has parameters that are all immutable or are implicitly convertible to immutable, then the compiler is perm

Re: [OT] Google search restricted to a directory?

2010-09-22 Thread klickverbot
On 9/22/10 6:48 AM, Nick Sabalausky wrote: "Simen kjaeraas" wrote in message news:op.vjernw2lvxi...@biotronic-pc.lan... On Wed, 22 Sep 2010 02:28:25 +0200, Nick Sabalausky wrote: Anyone know if there's a way to do a google search restricted to not just a domain (as with "site:whateversitebla

Re: Andrei's Google Talk

2010-09-21 Thread klickverbot
On 9/21/10 10:58 PM, Walter Bright wrote: klickverbot wrote: On 9/20/10 5:10 PM, Bruno Medeiros wrote: I find myself wishing some more OSS projects had commercial-friendly licenses. :-/ In particular LLVM, as I do agree it might have been great if Walter were able to work with it without these

Re: Andrei's Google Talk

2010-09-21 Thread klickverbot
On 9/21/10 5:01 PM, Steven Schveighoffer wrote: People aren't convicted on "possibilities" they are convicted on proof. Okay, I suppose I was not as clear about my point as I hoped I would be: This is exactly what I wanted to say – if you want to sue somebody for copying your code, it has to

Re: Andrei's Google Talk

2010-09-21 Thread klickverbot
On 9/21/10 4:31 PM, Steven Schveighoffer wrote: Huh? Look, this isn't an issue of being deceitful, it's an issue of the defensible strength of "yes, I read it, but I didn't copy anything" vs. "no I didn't read it, so I couldn't have copied anything." If you don't believe the person, then it's up

Re: Andrei's Google Talk

2010-09-21 Thread klickverbot
And how exactly are you going to prove that you didn't read it? I should add that the whole situation seems like a paranoid's man version of »a burnt child dreads the fire« to me, but I guess Walter has his reasons…

Re: Andrei's Google Talk

2010-09-21 Thread klickverbot
On 9/21/10 3:55 PM, Steven Schveighoffer wrote: People seem to think that an accusation is proof. If someone says you stole their code, because you read it, it's not always true. It's just much easier to prove you didn't steal it if you didn't read it. And how exactly are you going to prove tha

Re: Language features and reinterpret casts

2010-09-20 Thread klickverbot
On 9/20/10 11:52 PM, bearophile wrote: Recently Bradley Mitchell in D.learn newsgroup has tried to implement the Quake fast inverse square root algorithm in D, and has found D lack the C++ reinterpret cast: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_

Re: Andrei's Google Talk

2010-09-20 Thread klickverbot
On 9/20/10 5:10 PM, Bruno Medeiros wrote: I find myself wishing some more OSS projects had commercial-friendly licenses. :-/ In particular LLVM, as I do agree it might have been great if Walter were able to work with it without these IP worries. You want something even more liberal than BSD?

Re: GC- and thread-related deadlock

2010-09-20 Thread klickverbot
Might possibly be related: http://d.puremagic.com/issues/show_bug.cgi?id=4890,

GC- and thread-related deadlock

2010-09-20 Thread klickverbot
Hi all, any idea why the following sample deadlocks on Linux x86_64? (GDB stacktraces: http://gist.github.com/587964) --- module test; import core.thread; import std.conv; import std.range; import std.string; enum THREADS = iota(0, 9); enum WORK_RANGE = iota(0, 3); void main() { Thread[

Re: D1/D2: How to check if a method has been overridden

2010-09-13 Thread klickverbot
Thanks a lot, Max, for some reason this works, while my own, very similar solution doesn't. Unfortunately, however, this exposes yet another DMD bug: http://d.puremagic.com/issues/show_bug.cgi?id=4860.

Re: D1/D2: How to check if a method has been overridden

2010-09-08 Thread klickverbot
Hm, strange, this is more or less the same solution I was using up to DMD 1.047, but it seems to work on DMD 2.048 too – I'll investigate why… Thanks a lot, anyway.

Re: D2: immutable/const and delegates

2010-09-08 Thread klickverbot
On 9/8/10 11:46 AM, klickverbot wrote: Am I severely misunderstanding something here, or is this a rather big hole in the type system? Ah, never mind, there is even a (more than two years old!) bug report about it: http://d.puremagic.com/issues/show_bug.cgi?id=1983

D2: immutable/const and delegates

2010-09-08 Thread klickverbot
I always thought I had understood the new const/immutable system of D2. But now this: --- import std.stdio; class A { void setI( int newI ) { i = newI; } int i; } void main() { immutable a = new immutable(A); writefln( "Before: %s", a.i ); ( &a.setI )( 42 ); writefl

Re: D1/D2: How to check if a method has been overridden

2010-09-08 Thread klickverbot
On 9/8/10 8:25 AM, Kagamin wrote: Isn't this info available through classinfo? How exactly would you look this up using classinfo? Maybe it's the lack of documentation, but I didn't see a way to achieve that with Classinfo and friends…

Re: D1/D2: How to check if a method has been overridden

2010-09-07 Thread klickverbot
Putting the overloading issue aside for a moment, how would you implement it inside a member function of a (which is required for various reasons? The following does *not* work, because &A.foo also performs a vtbl lookup when put inside A… --- class A { void foo() {} void bar() {

Re: D1/D2: How to check if a method has been overridden

2010-09-07 Thread klickverbot
s/have wrote/have written/

Re: D1/D2: How to check if a method has been overridden

2010-09-07 Thread klickverbot
On 9/7/10 11:31 PM, bearophile wrote: Have you tried to compile that code with -w? See also: http://d.puremagic.com/issues/show_bug.cgi?id=4216 Bye, bearophile Well, I guess I should have wrote the following instead: --- class A { void foo( float a ) {} void foo( int a ) {} final vo

Re: D1/D2: How to check if a method has been overridden

2010-09-07 Thread klickverbot
On 9/7/10 11:07 PM, Mafi wrote: I'm not sure if the right isn't an shortcut for the left […] Unfortunately, the right indeed is a shortcut for the left – the lookup is performed using the vtbl. Furthermore, this would not solve my problem with overloaded functions.

Re: D1/D2: How to check if a method has been overridden

2010-09-07 Thread klickverbot
On 9/7/10 11:12 PM, dsimcha wrote: One way to test for overriding at runtime is to compare the function pointer of a delegate obtained at runtime to the function pointer obtained from the compile time type. That's basically the same idea I were already using, but have you tried implementing i

D1/D2: How to check if a method has been overridden

2010-09-07 Thread klickverbot
Hello all, as some of you might know, I have started working on a D module for SWIG quite some time ago. In the meantime, the project is almost ready for inclusion in SWIG trunk as a full-fledged language module supporting D1/Tango and D2/Phobos. However, there is one major blocker left: I n

Re: Bikeshedding fun: suggest a name for 64 bit Phobos library

2010-09-06 Thread klickverbot
Please, please just call it libphobos2.a on Linux and move it to the 64bit library directory. On OS X, one might want to build it as universal binary, so no special casing needed there either. On Windows it is installed to the DMD directory anyway, so this is probably no issue either (3d-bit-dm

Re: CMake for D2 ready for testers

2010-09-06 Thread klickverbot
Thanks a lot – I was just thinking about writing something like that myself when I stumbled over this post! I have just switched to OS X, so I probably will be able to help you out in that regard. I'll report back when I have found time to have a look on it.

Re: Please comment on http://d-programming-language.org/

2010-09-02 Thread klickverbot
On http://d-programming-language.org/memory-safe-d.html, the menu sidebar (which is a bit on the long side for the language reference in my mind) extends below the footer, which looks awkward. Also, I personally think that the logo header in its current state is plain ugly – maybe making the f

Type inference in array literals

2010-08-28 Thread klickverbot
I was really surprised by the fact that the following code does not work (DMD 2.048 infers the type of the array literal to B[], not Object[]): --- class A {} class B {} void main() { Object[] foo = [ new A, new B ]; } --- Is this by design? If so, what are the reasons for not using the fir

D1: accepts-invalid?

2010-08-23 Thread klickverbot
x27;t this be a compile-time error? Thanks, klickverbot

Re: yank unary '+'?

2009-12-08 Thread klickverbot
Mike Parker wrote: > […] I think C programmers are smart enough to figure things out without > the language keeping around old syntax. If they want C, they can stick > with C. I think so too – the »new«, D function pointer syntax is much more readable and intuitive than the C one which is widely

Re: lazy redux

2009-12-07 Thread klickverbot
Denis Koroskin wrote: > Although I believe it is implementable and worth the trouble, there is a > little gain in this feature and that's probably why it is low in the list. > I think that Walter will give a green light if someone implements the > feature and provides a complete patch. > > Any vol

Re: Tagging

2009-12-02 Thread klickverbot
Sean Kelly wrote: > It's easier because it could be built into the Druntime/Phobos makefiles > and not rely on a release script or manual effort to actually happen. Are you saying that a SVN one-liner once per release requires too much effort on Walter's side? Apart from that, I don't quite see

D1: Member function delegate issues

2009-11-25 Thread klickverbot
(This would probably fit better on bugzilla, but for whatever reason I cannot access it at the moment. Please feel free to move this to the tracker and CC me if it is really a bug.) As you might remember from #d and d.D.learn, I want to check if a given member function has been overridden (at r

Re: removal of cruft from D

2009-11-21 Thread klickverbot
Nick Sabalausky wrote: > Yes! Capitalization consistency in the predefined versions! /agree Altough this is only a minor itch, I would really like to scratch it – following consistent capitalization rules would probably make it more intuitive to a much larger user group than coinciding with the