Don wrote:
Georg Wrede wrote:
Don wrote:
Georg Wrede wrote:
Walter Bright wrote:
Lutger wrote:
what the hell...this code can't be human.
I was replaced by Colossus years ago.
Michael A. Jackson wouldn't approve 1175 gotos in 113 files.
It'd be really funny to pass it through one of
Masahiro Nakagawa wrote:
I submitted this problem to bugzilla.
http://d.puremagic.com/issues/show_bug.cgi?id=2882
Thanks! I fixed it and checked in std.random.
Andrei
This post is mostly for Andrei.
I have played with D2 a bit; probably I'll need months to digest it and its new
Phobos2. While I explore Phobos I'll probably post some comments/bugs around
here.
After reading this:
bearophile wrote:
This post is mostly for Andrei.
I have played with D2 a bit; probably I'll need months to digest it and its new
Phobos2. While I explore Phobos I'll probably post some comments/bugs around
here.
After reading this:
bearophile wrote:
Don:
I really don't understand the backend. It's quite cryptic. Key acronyms
are AE, CP and VBE. Then there's Bin, Bgen, Bkill, etc.
AE *might* be Available Expression (but what does that mean?)
CP might be Copy Propagation info
I've found that VBE = Very Busy Expression!
No!
rant
toString() is one of the most dreadful features in D. Trying to slightly
improve it is a waste of time -- the whole concept needs to be redone.
It's horribly inflexible, tedious, and hugely inefficient. What more
could there be to hate?
Hey, it's only meant for debugging! (At least I
Don wrote:
I'd like to see version(debug) {} put around Object.toString(). It's a
deathtrap feature that's got no business being used other than for
debugging.
That actually sounds like a good idea. Like you say, is has no use
outside of debugging, but while debugging, it's quite useful.
On Thu, 23 Apr 2009 18:09:06 +0900, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Masahiro Nakagawa wrote:
I submitted this problem to bugzilla.
http://d.puremagic.com/issues/show_bug.cgi?id=2882
Thanks! I fixed it and checked in std.random.
Wow!
std.random in svn works fine.
On Thu, 23 Apr 2009 16:20:03 +0400, Don nos...@nospam.com wrote:
bearophile wrote:
This post is mostly for Andrei.
I have played with D2 a bit; probably I'll need months to digest it and
its new Phobos2. While I explore Phobos I'll probably post some
comments/bugs around here.
After
Don wrote:
No!
rant
toString() is one of the most dreadful features in D. Trying to slightly
improve it is a waste of time -- the whole concept needs to be redone.
It's horribly inflexible, tedious, and hugely inefficient. What more
could there be to hate?
I agree.
- the object being called
On Thu, 23 Apr 2009 09:06:38 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
It ought to be at least as simple as:
struct Foo(A, B, C){
A[10] a;
B b;
C c;
void toString(Sink sink){
foreach(x; a) sink(x);
sink(b);
sink(c);
}
}
... but it's not, you have to create a
Steven Schveighoffer wrote:
On Thu, 23 Apr 2009 09:06:38 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
It ought to be at least as simple as:
struct Foo(A, B, C){
A[10] a;
B b;
C c;
void toString(Sink sink){
foreach(x; a) sink(x);
sink(b);
sink(c);
}
}
... but it's
On Thu, 23 Apr 2009 09:24:59 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Steven Schveighoffer wrote:
This has to go into object.d and be part of the runtime, where
std.range doesn't exist. There is nothing stopping you from calling:
streamOut(outputrange.put);
So I'd
Denis Koroskin wrote:
On Thu, 23 Apr 2009 16:20:03 +0400, Don nos...@nospam.com wrote:
struct Foo(A, B, C){
A[10] a;
B b;
C c;
void toString(Sink sink){
foreach(x; a) sink(x);
sink(b);
sink(c);
}
}
... but it's not, you have to create a silly buffer to put all your
strings in,
Don wrote:
bearophile wrote:
This post is mostly for Andrei.
I have played with D2 a bit; probably I'll need months to digest it
and its new Phobos2. While I explore Phobos I'll probably post some
comments/bugs around here.
After reading this:
Steven Schveighoffer wrote:
On Thu, 23 Apr 2009 09:24:59 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Steven Schveighoffer wrote:
This has to go into object.d and be part of the runtime, where
std.range doesn't exist. There is nothing stopping you from calling:
Georg Wrede wrote:
Second, since we have cool stuff in D, like templates, boxing, and other
advanced things, then compared to them, it should not be a big deal to
have automatic creation of toString for structs and objects. (This could
even be on-demand, i.e. unless called, the toString is not
Andrei Alexandrescu wrote:
Frits van Bommel wrote:
IMHO It'd be pretty nice for the standard formatting systems (both the
Tango and Phobos ones) to just call a standard Object method taking
(Sink sink, char[] format = null) on objects.
Probably we'll need that. You forgot the in though :o).
Andrei Alexandrescu wrote:
Georg Wrede wrote:
Second, since we have cool stuff in D, like templates, boxing, and
other advanced things, then compared to them, it should not be a big
deal to have automatic creation of toString for structs and objects.
(This could even be on-demand, i.e. unless
Frits van Bommel wrote:
Andrei Alexandrescu wrote:
Steven Schveighoffer wrote:
So I'd rather have a sink function.
It must be a sink _object_ so it can hold its own state. And it must
support put() so it integrates with statically-bound output ranges.
interface OutRange
{
void put(...
Georg Wrede wrote:
Wow!
What if writeln would automatically call to!string for any object or
struct?
That's the plan, I didn't get around to it. I want to do it the right
way, i.e. with general streams, not strings.
Andrei
On Thu, 23 Apr 2009 17:35:59 +0400, Frits van Bommel
fvbom...@remwovexcapss.nl wrote:
Denis Koroskin wrote:
On Thu, 23 Apr 2009 16:20:03 +0400, Don nos...@nospam.com wrote:
struct Foo(A, B, C){
A[10] a;
B b;
C c;
void toString(Sink sink){
foreach(x; a) sink(x);
sink(b);
Andrei Alexandrescu wrote:
grauzone wrote:
Yes. The way it should be is not with sink, but with the standard
output iterator method put().
void streamOut(T, R)(T object, R range)
{
foreach(x; a) range.put(x);
range.put(b);
range.put(c);
}
Eh. Is a sink callback too simple and
On Thu, Apr 23, 2009 at 2:37 PM, Don nos...@nospam.com wrote:
bearophile wrote:
Don:
I really don't understand the backend. It's quite cryptic. Key acronyms
are AE, CP and VBE. Then there's Bin, Bgen, Bkill, etc.
AE *might* be Available Expression (but what does that mean?)
CP might be
grauzone wrote:
Andrei Alexandrescu wrote:
grauzone wrote:
Yes. The way it should be is not with sink, but with the standard
output iterator method put().
void streamOut(T, R)(T object, R range)
{
foreach(x; a) range.put(x);
range.put(b);
range.put(c);
}
Eh. Is a sink callback
Andrei Alexandrescu wrote:
Steven Schveighoffer wrote:
On Thu, 23 Apr 2009 09:24:59 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Steven Schveighoffer wrote:
This has to go into object.d and be part of the runtime, where
std.range doesn't exist. There is nothing
Don wrote:
Georg Wrede wrote:
Don wrote:
bearophile wrote:
This post is mostly for Andrei.
I have played with D2 a bit; probably I'll need months to digest it
and its new Phobos2. While I explore Phobos I'll probably post some
comments/bugs around here.
After reading this:
Daniel Keep wrote:
Andrei Alexandrescu wrote:
Steven Schveighoffer wrote:
On Thu, 23 Apr 2009 09:24:59 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Steven Schveighoffer wrote:
This has to go into object.d and be part of the runtime, where
std.range doesn't exist. There
Andrei Alexandrescu wrote:
grauzone wrote:
Andrei Alexandrescu wrote:
grauzone wrote:
Yes. The way it should be is not with sink, but with the standard
output iterator method put().
void streamOut(T, R)(T object, R range)
{
foreach(x; a) range.put(x);
range.put(b);
range.put(c);
Don wrote:
Georg Wrede wrote:
Don wrote:
Georg Wrede wrote:
Don wrote:
bearophile wrote:
This post is mostly for Andrei.
I have played with D2 a bit; probably I'll need months to digest
it and its new Phobos2. While I explore Phobos I'll probably post
some comments/bugs around here.
Simen Kjaeraas:
That actually sounds like a good idea. Like you say, is has no use
outside of debugging, but while debugging, it's quite useful.
It's also important for small script-like programs.
I am using D to write a lot of them :-)
Bye,
bearophile
Georg Wrede wrote:
Don wrote:
Georg Wrede wrote:
Don wrote:
Georg Wrede wrote:
Don wrote:
bearophile wrote:
This post is mostly for Andrei.
I have played with D2 a bit; probably I'll need months to digest
it and its new Phobos2. While I explore Phobos I'll probably post
some
Don:
toString() is one of the most dreadful features in D.
It's also one of the most useful, and it's quite easy to understand and use.
You need very little brain to use it. Features that require little/no brain are
very important to me (but surely it's a quality that is at the bottom of the
On Thu, 23 Apr 2009 10:30:15 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Daniel Keep wrote:
Andrei Alexandrescu wrote:
Steven Schveighoffer wrote:
On Thu, 23 Apr 2009 09:24:59 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Steven Schveighoffer wrote:
Don wrote:
Georg Wrede wrote:
One thing we sholuld be wary of is overdesign. BigInt is ok, but by
the time we try to include a class called
CompleteSimulationOfAnF1RaceCar, we're screwed. :-) I see no way to
incorporate them into writefln or even plain writeln. Or at least, no
*use*.
I
Georg Wrede wrote:
Don wrote:
Georg Wrede wrote:
Don wrote:
Georg Wrede wrote:
Walter Bright wrote:
Lutger wrote:
what the hell...this code can't be human.
I was replaced by Colossus years ago.
Michael A. Jackson wouldn't approve 1175 gotos in 113 files.
It'd be really funny to pass
Georg Wrede wrote:
Don wrote:
Georg Wrede wrote:
One thing we sholuld be wary of is overdesign. BigInt is ok, but by
the time we try to include a class called
CompleteSimulationOfAnF1RaceCar, we're screwed. :-) I see no way to
incorporate them into writefln or even plain writeln. Or at
On Thu, 23 Apr 2009 18:28:53 +0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Denis Koroskin wrote:
Sink is okay, but most my usages belong to one of the two scenarios: 1)
I need a string representation of an Object - how is Sink useful
here? I just want to call
On Thu, 23 Apr 2009 19:34:38 +0400, Don nos...@nospam.com wrote:
Georg Wrede wrote:
Don wrote:
Georg Wrede wrote:
Don wrote:
Georg Wrede wrote:
Don wrote:
bearophile wrote:
This post is mostly for Andrei.
I have played with D2 a bit; probably I'll need months to digest
it and its new
On Thu, 23 Apr 2009 12:09:20 -0400, Georg Wrede georg.wr...@iki.fi wrote:
(OT: an excellent example of this It's Done Because We Noticed We Could
stuff is in Firefox. When a picture is a link to another page, and you
want to drag that to the tab area, the entire picture is dragged with
the
Steven Schveighoffer wrote:
As most ranges are structs (and rightfully
so, who wants to call 3 virtual functions every loop!), they would have
to be wrapped under the current compiler. Or am I missing something else?
Yes, some wrapping would have to be done. Hopefully it will simple
enough
On Thu, Apr 23, 2009 at 2:32 PM, Georg Wrede georg.wr...@iki.fi wrote:
(OT: an excellent example of this It's Done Because We Noticed We Could
stuff is in Firefox. When a picture is a link to another page, and you want
to drag that to the tab area, the entire picture is dragged with the mouse.
On Thu, 23 Apr 2009 14:32:13 -0400, Georg Wrede georg.wr...@iki.fi wrote:
Steven Schveighoffer wrote:
On Thu, 23 Apr 2009 12:09:20 -0400, Georg Wrede georg.wr...@iki.fi
wrote:
(OT: an excellent example of this It's Done Because We Noticed We
Could stuff is in Firefox. When a picture is a
Andrei Alexandrescu wrote:
Yes. The way it should be is not with sink, but with the standard output
iterator method put().
void streamOut(T, R)(T object, R range)
{
foreach(x; a) range.put(x);
range.put(b);
range.put(c);
}
// object.d
class Object
{
void streamOut(R)(R
On Thu, Apr 23, 2009 at 6:01 PM, Christopher Wright dhase...@gmail.com wrote:
Andrei Alexandrescu wrote:
Yes. The way it should be is not with sink, but with the standard output
iterator method put().
void streamOut(T, R)(T object, R range)
{
foreach(x; a) range.put(x);
Steven Schveighoffer schvei...@yahoo.com wrote in message
news:op.usux6bskeav...@steves.networkengines.com...
I was never a huge fan of application themes. I don't mind a theme for
the whole system (as long as it's simple), but I don't want iTunes to look
different just because it can.
On Thu, 23 Apr 2009 21:40:36 -0400, Christopher Wright wrote:
Nick Sabalausky wrote:
Steven Schveighoffer schvei...@yahoo.com wrote in message
news:op.usux6bskeav...@steves.networkengines.com...
I was never a huge fan of application themes. I don't mind a theme
for the whole system (as long
Hello Christopher,
Nick Sabalausky wrote:
The absolute worst of all though is when an app (*cough* skype
*cough*) decides that close and the 'close' button should mean
don't close anything at all, but minimize to tray instead. That
should be a firing squad offense ;)
I'd be killing my IM
BCS wrote:
Hello Christopher,
Nick Sabalausky wrote:
The absolute worst of all though is when an app (*cough* skype
*cough*) decides that close and the 'close' button should mean
don't close anything at all, but minimize to tray instead. That
should be a firing squad offense ;)
I'd
My statistics library for D, dstats, has been updated to take advantage of the
concepts introduced in the new Phobos: http://dsource.org/projects/dstats .
It has also received several smaller miscellaneous updates:
1. Instead of being specific to arrays, all functions now accept the most
50 matches
Mail list logo