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
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
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
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
+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
On 11/10/10 1:38 PM, klickverbot wrote:
I probably wouldn't get the problem anyway, and[…]
Whoops, s/and/as/ there…
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
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
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
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
In case it was not clear, this is what I want to achive:
»tmp = tmp[ 0 .. i ] ~ tmp[ ( i + 1 ) .. $ ];«
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
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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…
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
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_
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?
Might possibly be related:
http://d.puremagic.com/issues/show_bug.cgi?id=4890,
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[
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.
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.
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
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
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…
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() {
s/have wrote/have written/
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
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.
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
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
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
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.
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
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
x27;t this be a compile-time error?
Thanks,
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
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
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
(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
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
54 matches
Mail list logo