On 27/08/10 9:25 PM, Andrei Alexandrescu wrote:
On 8/27/10 13:18 PDT, Johannes Pfau wrote:
On 27.08.2010 20:27, Andrei Alexandrescu wrote:
Is it my thunderbird installation, or does everybody see a chopped
message?
Thanks,
Andrei
I see the complete message in this case, Thunderbird 3.1.2
It's a fun idea! Why not just post with '[challenge]' in the object?
People not interested in such threads can skip them easily.
I also propose '[D tricks]' as another meta-subject. For example, did you
know you can have import statements in structs (maybe also in classes, I
don't know)? That
On 2010-08-27 22:25, Andrei Alexandrescu wrote:
On 8/27/10 13:18 PDT, Johannes Pfau wrote:
On 27.08.2010 20:27, Andrei Alexandrescu wrote:
Is it my thunderbird installation, or does everybody see a chopped
message?
Thanks,
Andrei
I see the complete message in this case, Thunderbird 3.1.2
On 2010-08-28 01:44, Justin Johansson wrote:
As one who has an interest in developing dynamic languages, I'm
finding that implementing a DL which features both static and dynamic
typing in classical OO/imperative languages to be quite a challenge.
Recently I came across Microsoft's Dynamic
On 2010-08-27 03:50:43 +0200, Yao G. said:
Using printf / writeln is perfectly fine, until you start to program in
Windows, where there's no command line to display the text. Here's
where I think a small logging library comes handy. I did a small one
that logs to a file, and a variant that
On Friday 27 August 2010 22:47:54 Nick Sabalausky wrote:
Jonathan M Davis jmdavisp...@gmail.com wrote in message
news:mailman.535.1282972511.13841.digitalmar...@puremagic.com...
On Friday 27 August 2010 21:58:30 Nick Sabalausky wrote:
Steven Schveighoffer schvei...@yahoo.com wrote in
Andrei Alexandrescu wrote:
Thx, but then I am missing the whole point of this thread.
It's simple: the OP wanted this:
- start with a bidir range r
- move from the LEFT in it for a while
(prefix, postfix)= inPlaceSplit( r, predicate, Move.RIGHT)
// == O(prefix.len)
- then reverse
On 28/08/10 17:21, Philippe Sigaud wrote:
It's a fun idea! Why not just post with '[challenge]' in the object?
People not interested in such threads can skip them easily.
I also propose '[D tricks]' as another meta-subject. For example, did
you know you can have import statements in structs
On 28/08/10 18:47, Jacob Carlborg wrote:
On 2010-08-28 01:44, Justin Johansson wrote:
To sum up, I'd really appreciate feedback as to whether or not is
worth considering D as a suitable language for implementing a dynamic
language having a non-trivial type system, or is a higher level
approach
I'm sorry, this just makes no sense to me. People change professions
all the
time under capitalism. Novelists aren't locked in to writing novels.
They can
switch to carpentry any time g.
(In fact, I know a programmer who switched to making ceramic pots.)
Is that why D2 is taking so long to
Thanks. I think we should establish a tradition for reviews on this
forum. The Boost review model has functioned very well, in the sense
that it has consistently produced two outcomes: excellent libraries and
pulp-beaten library authors. So I'd opt if at all possible for a tough
review
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
Sat, 28 Aug 2010 12:13:10 +, Frank Fuente wrote:
I'm sorry, this just makes no sense to me. People change professions
all the
time under capitalism. Novelists aren't locked in to writing novels.
They can
switch to carpentry any time g.
(In fact, I know a programmer who switched to
OT: Anyway, I don't think making tutorials for newbies is a priority
right now. Even if you make a fantastic free D book it still wouldn't
help much, because D2 is missing libraries. It's the same situation as
Python 3 was when it was released (heck, many Python 2 libraries have
not been ported to
D uses the last element in the array literal to select the type. I think there
was a discussion on why a common type wasn't used, but don't remember the
conclusion. It would be nice if it used the item you are assigning to and check
they can convert to it.
klickverbot Wrote:
I was really
On 08/28/2010 07:19 PM, Jesse Phillips wrote:
D uses the last element in the array literal to select the type. I think there
was a discussion on why a common type wasn't used, but don't remember the
conclusion. It would be nice if it used the item you are assigning to and check
they can
Hello Andrei,
Hello,
At my workplace we're using Google's logging library glog
(http://google-glog.googlecode.com/svn/trunk/doc/glog.html), and the
more I use it, the more I like it. It's simple, to the point, and
effective.
I was thinking it would be great to adapt a similar design into
Hello Walter,
Andrei Alexandrescu wrote:
At my workplace we're using Google's logging library glog
(http://google-glog.googlecode.com/svn/trunk/doc/glog.html), and the
more I use it, the more I like it. It's simple, to the point, and
effective.
I was thinking it would be great to adapt a
On Sat, 28 Aug 2010 13:44:34 -0500, BCS n...@anon.com wrote:
If your looking for a Google lib to add/copy, do this one first:
http://google-gflags.googlecode.com/svn/trunk/doc/gflags.html
Isn't essentially what std.getopt does?
--
Yao G.
On 28/08/10 12:03 PM, Manfred_Nowak wrote:
Andrei Alexandrescu wrote:
Thx, but then I am missing the whole point of this thread.
It's simple: the OP wanted this:
- start with a bidir range r
- move from the LEFT in it for a while
(prefix, postfix)= inPlaceSplit( r, predicate,
Hello Yao G.,
On Sat, 28 Aug 2010 13:44:34 -0500, BCS n...@anon.com wrote:
If your looking for a Google lib to add/copy, do this one first:
http://google-gflags.googlecode.com/svn/trunk/doc/gflags.html
Isn't essentially what std.getopt does?
Far from it. getops requiters that all the
klickverbot:
class A {}
class B {}
void main() {
Object[] foo = [ new A, new B ];
}
See also:
http://d.puremagic.com/issues/show_bug.cgi?id=4030
Bye,
bearophile
Jesse Phillips:
D uses the last element in the array literal to select the type.
That's not true, this doesn't assert:
import std.stdio: writeln;
void main() {
auto a = [1, 1.5, 2];
assert(is(typeof(a) == double[]));
}
I think it uses ?: on all elements, to infer the type.
Bye,
On Sat, Aug 28, 2010 at 18:19, Jesse Phillips
jessekphillip...@gmail.comjessekphillips%...@gmail.com
wrote:
D uses the last element in the array literal to select the type. I think
there was a discussion on why a common type wasn't used, but don't remember
the conclusion. It would be nice if
On 08/28/2010 03:11 PM, BCS wrote:
Hello Yao G.,
On Sat, 28 Aug 2010 13:44:34 -0500, BCS n...@anon.com wrote:
If your looking for a Google lib to add/copy, do this one first:
http://google-gflags.googlecode.com/svn/trunk/doc/gflags.html
Isn't essentially what std.getopt does?
Far from
On Sat, 28 Aug 2010 15:45:17 -0400, Peter Alexander
peter.alexander...@gmail.com wrote:
On 28/08/10 12:03 PM, Manfred_Nowak wrote:
Andrei Alexandrescu wrote:
Thx, but then I am missing the whole point of this thread.
It's simple: the OP wanted this:
- start with a bidir range r
- move
Peter Alexander wrote:
That would be all well and good if inPlaceSplit actually existed :)
In your OP you wrote:
but Until is (correctly) not bidirectional
I recognize at least a misunderstanding in this sentence, because every
bidirectionalRange _is_ an inputRange. Therefore `Until!'
On 27/08/2010 9:38 a.m., bearophile wrote:
Arrays are one of the most useful and most efficient data structures for
nonfunctional languages. They look simple, but in a low-level language you
sometimes need various kinds of them. So they are not so simple.
In D there are two kinds of built-in
On 08/28/2010 07:06 PM, Manfred_Nowak wrote:
Peter Alexander wrote:
That would be all well and good if inPlaceSplit actually existed :)
In your OP you wrote:
but Until is (correctly) not bidirectional
I recognize at least a misunderstanding in this sentence, because every
Nick B:
Have you got any numbers to back your claim for increased performance
for nD rectangular dynamic arrays ?
They often don't give a significant performance increase. They increase a bit
cache coherence if you scan them by rows, and they waste a bit less memory, but
usually this is not
An issue that comes up very frequently when trying to use const, pure or
nothrow in generic code is lack of knowledge of whether the functions you're
calling are const/pure/nothrow. For example:
T abs(T num) pure nothrow {
return (num 0) ? -1 * num : num;
}
Looks pretty good. Won't work
Among the Bugzilla entries added by me, I suggest Don to focus his efforts on
(and try to create patches for):
3971 3849 3948 3856 3825 3878 3981 3990 3999 4053 4085 4216 4349
4375 4407 4475 4625 4511 4530 4580 4664 4668 4678 4703 4733
Entries in that list often don't contain normal bugs or
On Sat, 28 Aug 2010 20:59:02 -0500, bearophile bearophileh...@lycos.com
wrote:
Among the Bugzilla entries added by me, I suggest Don to focus his
efforts on (and try to create patches for):
3971 3849 3948 3856 3825 3878 3981 3990 3999 4053 4085 4216 4349
4375 4407 4475 4625 4511 4530 4580
On Saturday 28 August 2010 18:29:02 dsimcha wrote:
An issue that comes up very frequently when trying to use const, pure or
nothrow in generic code is lack of knowledge of whether the functions
you're calling are const/pure/nothrow. For example:
T abs(T num) pure nothrow {
return (num
On Saturday 28 August 2010 19:06:42 Yao G. wrote:
On Sat, 28 Aug 2010 20:59:02 -0500, bearophile bearophileh...@lycos.com
wrote:
Among the Bugzilla entries added by me, I suggest Don to focus his
efforts on (and try to create patches for):
3971 3849 3948 3856 3825 3878 3981 3990 3999
On Sat, 28 Aug 2010 21:27:27 -0500, Jonathan M Davis
jmdavisp...@gmail.com wrote:
He's too busy finding other bugs. ;)
Though seriously, given the large scope of bugs that he reports, I doubt
that he
knows enough to fix very many of them. Particularly if they're compiler
bugs, it
can
On Saturday 28 August 2010 19:44:36 Yao G. wrote:
On Sat, 28 Aug 2010 21:27:27 -0500, Jonathan M Davis
jmdavisp...@gmail.com wrote:
He's too busy finding other bugs. ;)
Though seriously, given the large scope of bugs that he reports, I doubt
that he
knows enough to fix very many of
On 08/28/2010 08:29 PM, dsimcha wrote:
An issue that comes up very frequently when trying to use const, pure or
nothrow in generic code is lack of knowledge of whether the functions you're
calling are const/pure/nothrow. For example:
T abs(T num) pure nothrow {
return (num 0) ? -1 * num
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article
Yah, with the growing interest in applying qualifiers at a larger scale
(and making Phobos a good example of such) this is quite timely. I've
been mulling myself over a similar proposal.
What I had in mind is a bit
On 8/28/2010 19:29, dsimcha wrote:
Looks pretty good. Won't work with BigInt because opBinary!* isn't pure and
can't practically be made pure. A solution I propose is to allow the
annotations @autoconst, @autopure and @autonothrow for template functions.
These would mean everything I do is
== Quote from Rainer Deyke (rain...@eldwood.com)'s article
On 8/28/2010 19:29, dsimcha wrote:
Looks pretty good. Won't work with BigInt because opBinary!* isn't pure
and
can't practically be made pure. A solution I propose is to allow the
annotations @autoconst, @autopure and
== Quote from Rainer Deyke (rain...@eldwood.com)'s article
On one hand, this addresses a real need. On the other hand, D is
already has a serious case featuritis.
With regard to featuritis, I see your point, but IMHO without something like
this
pure and nothrow are the worst kind of extra
On 8/28/2010 22:33, dsimcha wrote:
Is there any real reason why we can't apply these modifiers
automatically to all functions? (And by real I don't mean it would
be hard to do or it is incompatible with the archaic compilation model
chosen by one D implementation.)
Two reasons:
1.
On 8/28/2010 6:29 PM, dsimcha wrote:
An issue that comes up very frequently when trying to use const, pure or
nothrow in generic code is lack of knowledge of whether the functions you're
calling are const/pure/nothrow. For example:
T abs(T num) pure nothrow {
return (num 0) ? -1 * num
Fab fab.cod...@ymail.com wrote in message
news:i59i02$9...@digitalmars.com...
Thank you. I am using
my mobile phone to
answer so it's pretty
hard. I will try your
tips later.
ps: i wanted to say
that delphi is slow
and it seems to be
old. in addition the
bindings for sdl,
allegro and
So I have a class containing two strings:
class Foo
{
string s1, s2;
...
and I'd like to add a toHash() member, but I can't find
the built-in string hash function. These don't work:
s1.toHash()
s1.toHash
s1.hash
s1.hash()
hash(s1)
yet strings can clearly be the key in a map.
Done:
http://d.puremagic.com/issues/show_bug.cgi?id=4745
I'm here with another n00b question:
When dealing with big buffers (or files), which is better to use as
storage? void[] or byte[]?
What are the advantages and disadvantages of each one? I've seen that
void[] is used in some Phobos modules, like std.zlib, and in other modules
the choice
Hello Yao G.,
I'm here with another n00b question:
When dealing with big buffers (or files), which is better to use as
storage? void[] or byte[]?
If the data may contain pointers into the heap, use void[] if it will not
use byte[]. byte[] is raw data, void[] is anything at all.
What
On 08/28/2010 10:25 PM, bearophile wrote:
torhu:
string a = abc;
auto hash = typeid(a).getHash(a);
If higher performance is necessary, you may pre-compute part of that:
void main() {
string a = abc;
auto hash1 = typeid(a).getHash(a);
auto stringHash =(typeid(a).getHash);
In theory, garbage collectors make memory leaks a thing of the past. In
practice, garbage collectors don't always work according to theory. This
makes me curious: how does one test for memory leaks in a D program?
I also don't know how smart or dumb garbage collectors are. How much help
JMRyan:
In theory, garbage collectors make memory leaks a thing of the past.
Even with a perfect GC you may leave around references that keep alive some
data that you will never need to use. This is a kind of memory leak.
And the current D GC is not fully precise, this means that sometimes it
Pelle:
I doubt that gives any performance gains. typeid(a).getHash should be a
constant expression anyway, and I don't see any gains in my tiny
benchmark test.
My code shows a limited time difference:
import std.stdio: writeln;
import std.date: getUTCtime, ticksPerSecond;
void main() {
Nick Sabalausky a...@a.a wrote in message
news:i5cnrn$30h...@digitalmars.com...
I'm having trouble understanding the docs on this. From what I could tell,
it seemed like both of these should work:
writef(%.2X, myByte);
writef(%02X, myByte);
But both of them just simply print the format
On 29.08.2010 07:06, Nick Sabalausky wrote:
ubyte myByte = 0x09;
writef(%%%.2X, myByte);
writef(%%%02X, myByte);
On codepad.org (DMD 1.026 last time I checked), this prints this:
%09%09
So it's probably a bug in the new formatting code. I assume it's
supposed to follow the C behavior in
http://d.puremagic.com/issues/show_bug.cgi?id=4744
Summary: std.conv: string-enum doesn't look for longer match
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: rejects-valid
Severity:
http://d.puremagic.com/issues/show_bug.cgi?id=4744
Shin Fujishiro rsi...@gmail.com changed:
What|Removed |Added
Status|NEW |ASSIGNED
--
http://d.puremagic.com/issues/show_bug.cgi?id=2716
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
Status|REOPENED|RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=2511
--- Comment #7 from Rainer Schuetze r.sagita...@gmx.de 2010-08-28 00:23:08
PDT ---
Oh, it's only been tested on interfaces. ClassDeclaration::isBaseInfoComplete()
is broken, class Object doesn't need a base class:
int
http://d.puremagic.com/issues/show_bug.cgi?id=2716
Haruki Shigemori rayerd@gmail.com changed:
What|Removed |Added
Keywords||accepts-invalid
http://d.puremagic.com/issues/show_bug.cgi?id=2716
Haruki Shigemori rayerd@gmail.com changed:
What|Removed |Added
Status|REOPENED|RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=4745
Summary: Non-uniform handling of commas in static
initialization of structs
Product: D
Version: D2
Platform: x86_64
OS/Version: Linux
Status: NEW
http://d.puremagic.com/issues/show_bug.cgi?id=4278
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=4695
David Simcha dsim...@yahoo.com changed:
What|Removed |Added
CC||dsim...@yahoo.com
---
http://d.puremagic.com/issues/show_bug.cgi?id=2477
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=2477
--- Comment #10 from Walter Bright bugzi...@digitalmars.com 2010-08-28
13:20:58 PDT ---
A more comprehensive test case:
void foo(T,)(T t) { T x; }
void main() {
int[] data = [1,2,3,];
data = [ 1,2,3, ];
auto i = data[1,];
http://d.puremagic.com/issues/show_bug.cgi?id=2477
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=2477
--- Comment #12 from Walter Bright bugzi...@digitalmars.com 2010-08-28
13:51:24 PDT ---
Phobos changeset 1939
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
http://d.puremagic.com/issues/show_bug.cgi?id=4746
Summary: CTFE regression + CTFE/normal execution differences
(splitlines).
Product: D
Version: D2
Platform: x86_64
OS/Version: Windows
Status: NEW
http://d.puremagic.com/issues/show_bug.cgi?id=4291
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=4177
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=4030
klickverbot c...@klickverbot.at changed:
What|Removed |Added
CC||c...@klickverbot.at
http://d.puremagic.com/issues/show_bug.cgi?id=3543
nfx...@gmail.com changed:
What|Removed |Added
CC||bearophile_h...@eml.cc
--- Comment
http://d.puremagic.com/issues/show_bug.cgi?id=4747
Summary: Make each unittest block a separate function that runs
independently of the others
Product: D
Version: D2
Platform: Other
OS/Version: Linux
Status: NEW
http://d.puremagic.com/issues/show_bug.cgi?id=4653
Jonathan M Davis jmdavisp...@gmail.com changed:
What|Removed |Added
Attachment #723 is|0 |1
http://d.puremagic.com/issues/show_bug.cgi?id=4748
Summary: Shadowing declaration error in std.string.tolower
Product: D
Version: D2
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
http://d.puremagic.com/issues/show_bug.cgi?id=3976
--- Comment #5 from Ellery Newcomer ellery-newco...@utulsa.edu 2010-08-28
21:12:59 PDT ---
(In reply to comment #4)
(In reply to comment #3)
There is no kmd file. Also this code seems to use Tango (dunno which
version!).
So it's
http://d.puremagic.com/issues/show_bug.cgi?id=4749
Summary: Templated non-templated constructors conflicting
Product: D
Version: D2
Platform: x86_64
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
http://d.puremagic.com/issues/show_bug.cgi?id=4749
--- Comment #1 from Mitch Hayenga mitch.haye...@gmail.com 2010-08-28 21:59:26
PDT ---
Btw, oops bugs in that code. Swapped s str in the assignment.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You
http://d.puremagic.com/issues/show_bug.cgi?id=4749
--- Comment #2 from Mitch Hayenga mitch.haye...@gmail.com 2010-08-28 22:08:43
PDT ---
Also likely the same bug as 2972.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail
80 matches
Mail list logo