Walter Bright wrote:
snip
There are some tricky bits to doing contract inheritance, I hope gdc and
ldc don't have trouble with it.
What tricky bits are those?
Stewart.
Stewart Gordon wrote:
Walter Bright wrote:
snip
There are some tricky bits to doing contract inheritance, I hope gdc
and ldc don't have trouble with it.
What tricky bits are those?
It's outlined in the code comments, but it's implemented by making the
contract code a nested function. The
I would love to get my hands on the transcript and video of the event...
Will it be recorded?
Graham St Jack wrote:
I would love to get my hands on the transcript and video of the event...
Will it be recorded?
ACCU has not recorded its conferences in the past.
Andrei
Walter Bright wrote:
Stewart Gordon wrote:
Walter Bright wrote:
snip
There are some tricky bits to doing contract inheritance, I hope gdc
and ldc don't have trouble with it.
What tricky bits are those?
It's outlined in the code comments, but it's implemented by making the
contract code a
Can anybody tell, what i`m doing wrong?
I ported it from c, where it works well.
code:
private {
import tango.sys.win32.Types;
import tango.sys.win32.UserGdi;
import tango.sys.win32.Macros;
import tango.stdc.stringz : fromString16z;
import tango.stdc.stringz : toStringz;
import
Jeremie Pelletier wrote:
Don wrote:
Jeremie Pelletier wrote:
Yigal Chripun wrote:
On 29/09/2009 16:41, Jeremie Pelletier wrote:
What I argued about was your view on today's software being too big
and
complex to bother optimize it.
that is not what I said.
I was saying that hand
Jacob Carlborg wrote:
On 9/30/09 22:42, Benji Smith wrote:
Does anybody know of any D libraries implementing or wrapping video
codecs?
I need to read video files (AVI or MPEG would be fine) using DIVX,
XVID, or any other popular codec. In addition to playing those files in
a media player
Joe wrote:
Can anybody tell, what i`m doing wrong?
http://catb.org/~esr/faqs/smart-questions.html#forum (D.learn in this case)
http://catb.org/~esr/faqs/smart-questions.html#beprecise
http://catb.org/~esr/faqs/smart-questions.html#goal
http://catb.org/~esr/faqs/smart-questions.html#explicit
Time ago Jon Harrop has found a memory leak in a F# program running on Mono, he
has reduced the program to a minimal test case. I have translated that code to
D2 and Python2:
-
struct Node {
int data;
Node* next;
this(int data, Node* next) {
this.data =
bearophile, el 1 de octubre a las 07:23 me escribiste:
Can the D GC be improved to avoid such problem, maybe like the CPython
GC? And is such improvement worth it (= useful in practical programs)?
I've tested it with LDC (using classes instead of structs, because D1
doesn't support struct
Michel Fortin wrote:
On 2009-09-30 22:01:54 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org said:
Today's D has a very strong, principled notion of hijacking: for any
given function call, if the call candidates are found in different
modules, the call is invalid. I think that works
I am becoming increasingly aware that we need to provide some means to
define certain members (data and functions) for each class as if they
were pasted there.
Right now that right is reserved to the compiler, which generates e.g.
one static classinfo object for each class. But users would
bearophile, el 1 de octubre a las 12:39 me escribiste:
Leandro Lucarella:
I've tested it with LDC (using classes instead of structs, because D1
doesn't support struct constructors) and it works with a perfectly stable
memory usage.
That's a different situation, the compiler is
On Thu, Oct 1, 2009 at 12:25 PM, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
I am becoming increasingly aware that we need to provide some means to
define certain members (data and functions) for each class as if they were
pasted there.
Right now that right is reserved to the
Jeremie Pelletier wrote:
Jérôme M. Berger wrote:
Jeremie Pelletier wrote:
Jérôme M. Berger wrote:
Michel Fortin wrote:
I fully support having a way to specify a default implementation
for a function in an interface. It might get handy for a few things
(like implementing the delegate pattern
Jarrett Billingsley wrote:
On Thu, Oct 1, 2009 at 12:25 PM, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
[code injection]
What do you think?
I think it sounds interesting enough, but I can't help but wonder if
this is a feature that you've really thought through (especially wrt.
Andrei Alexandrescu wrote:
Jarrett Billingsley wrote:
I think it sounds interesting enough, but I can't help but wonder if
this is a feature that you've really thought through (especially wrt.
how it interacts with mechanisms such as template mixins and normal
symbol inheritance), or if you
I've been interested in having the D compiler take advantage of the flow
analysis in the optimizer to do some more checking. Coverity and clang
get a lot of positive press about doing this, but any details of exactly
*what* they do have been either carefully hidden (in Coverity's case) or
bearophile wrote:
SoftBound: Highly Compatible and Complete Spatial Memory Safety for
C by Santosh Nagarakatte, Jianzhou Zhao, Milo M K Martin and Steve
Zdancewic: http://llvm.org/pubs/2009-06-PLDI-SoftBound.html
It's a block of about 6000 lines of C++ code that augment the LLVM
compiler,
Andrei Alexandrescu, el 1 de octubre a las 11:25 me escribiste:
What do you think?
I think this is close to Python metaclasses[1], but much more specific.
It's amazing how many cool things one can do with Python metaclasses
(there are several articles discussing them[2]) and decorators. I
On Thu, 01 Oct 2009 20:25:03 +0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
I am becoming increasingly aware that we need to provide some means to
define certain members (data and functions) for each class as if they
were pasted there.
Right now that right is reserved to
Hello Walter,
Frankly, this is not an impressive list. These issues are discoverable
using standard data flow analysis, and in fact are part of Digital
Mars' optimizer. Here is the current state of it for dmd:
1. Optimizer discovers it, but ignores the information. Due to the
recent thread on
Denis Koroskin wrote:
On Thu, 01 Oct 2009 20:25:03 +0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
[...]
What do you think?
Andrei
This is cool. I'd also add Serialization task to the application list
(currently I manually insert mixin Serializable!(); into every class.
Walter Bright:
I don't think there's much point to this in D. You rarely need to deal
with pointers directly. Arrays are already checked.
In D pointers are quite less common than in C, but half of the point of using D
is to be able to use pointers too, when you want to implement your own
For some reason, about an hour ago I was googling stuff about X86 and PowerPC
and right now I'm not even sure if this is a serious question nor do I know if
I know what I'm talking about or if the question is even valid.
If that doesn't make sense, I want to know if you guys are developing D
On Thu, Oct 1, 2009 at 4:16 PM, Snake loasolidsnake...@gmail.com wrote:
For some reason, about an hour ago I was googling stuff about X86 and PowerPC
and right now I'm not even sure if this is a serious question nor do I know
if I know what I'm talking about or if the question is even valid.
Consider:
class A {
abstract void fun() {}
}
The class defines a function that is at the same time abstract (so it
requires overriding in derivees) and has implementation.
Currently the compiler disallows creation of objects of type A, although
technically that is feasible given that A
Walter Bright newshou...@digitalmars.com wrote in message
news:ha2run$275...@digitalmars.com...
1. dereference of NULL pointers (all reaching definitions of a pointer are
NULL)
1. Optimizer discovers it, but ignores the information. Due to the recent
thread on it, I added a report for it
Andrei Alexandrescu wrote:
Consider:
class A {
abstract void fun() {}
}
The class defines a function that is at the same time abstract (so it
requires overriding in derivees) and has implementation.
Currently the compiler disallows creation of objects of type A, although
technically
On Thu, Oct 1, 2009 at 1:38 PM, Nick Sabalausky a...@a.a wrote:
2. possible dereference of NULL pointers (some reaching definitions of a
pointer are NULL)
2. Optimizer collects the info, but ignores this, because people are
annoyed by false positives.
If you mean something like this:
Foo
Jeremie Pelletier wrote:
Andrei Alexandrescu wrote:
Consider:
class A {
abstract void fun() {}
}
The class defines a function that is at the same time abstract (so it
requires overriding in derivees) and has implementation.
Currently the compiler disallows creation of objects of type
Walter Bright wrote:
[snip]
We need to have passable flow control to typecheck creation of immutable
objects.
Andrei
Walter Bright wrote:
There's a lot of hoopla about these static checkers, but I'm not
impressed by them based on what I can find out about them. What do you
know about what these checkers do that is not on this list? Any other
kinds of checking that would be great to implement?
I'm not
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article
Jeremie Pelletier wrote:
Andrei Alexandrescu wrote:
Consider:
class A {
abstract void fun() {}
}
The class defines a function that is at the same time abstract (so it
requires overriding in derivees)
Nick Sabalausky wrote:
3. use of uninitialized variables (no reaching definition)
3. Optimizer detects and reports it. Irrelevant for D, though, because
variables are always initialized. The =void case is rare enough to be
irrelevant.
D variable default-initialization is absolutely no
dsimcha wrote:
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article
Jeremie Pelletier wrote:
Andrei Alexandrescu wrote:
Consider:
class A {
abstract void fun() {}
}
The class defines a function that is at the same time abstract (so it
requires overriding in
Walter Bright wrote:
Anyhow, I think this issue was beaten to death in the previous thread on
null dereference. I don't wish to divert this thread into rediscussing
I don't want to make this discussion even more complicated, but some
people (such as me) like the existing default
Walter Bright wrote:
Nick Sabalausky wrote:
Walter Bright newshou...@digitalmars.com wrote in message
2. possible dereference of NULL pointers (some reaching definitions of a
pointer are NULL)
2. Optimizer collects the info, but ignores this, because people are
annoyed by false positives.
Andrei Alexandrescu wrote:
Jeremie Pelletier wrote:
Andrei Alexandrescu wrote:
Consider:
class A {
abstract void fun() {}
}
The class defines a function that is at the same time abstract (so it
requires overriding in derivees) and has implementation.
Currently the compiler
Snake Wrote:
For some reason, about an hour ago I was googling stuff about X86 and PowerPC
and right now I'm not even sure if this is a serious question nor do I know
if I know what I'm talking about or if the question is even valid.
If that doesn't make sense, I want to know if you guys
Hello Nick,
Walter Bright newshou...@digitalmars.com wrote in message
news:ha2run$275...@digitalmars.com...
2. possible dereference of NULL pointers (some reaching definitions
of a
pointer are NULL)
2. Optimizer collects the info, but ignores this, because people are
annoyed by false
Lutger wrote:
Andrei Alexandrescu wrote:
Jeremie Pelletier wrote:
Andrei Alexandrescu wrote:
Consider:
class A {
abstract void fun() {}
}
The class defines a function that is at the same time abstract (so it
requires overriding in derivees) and has implementation.
Currently the
On Thu, Oct 1, 2009 at 4:30 PM, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Consider:
class A {
abstract void fun() {}
}
The class defines a function that is at the same time abstract (so it
requires overriding in derivees) and has implementation.
Currently the compiler
On Thu, 1 Oct 2009, Walter Bright wrote:
I've been interested in having the D compiler take advantage of the flow
analysis in the optimizer to do some more checking. Coverity and clang get a
lot of positive press about doing this, but any details of exactly *what* they
do have been either
I would love to get my hands on the transcript and video of the event...
Will it be recorded?
On Thu, 01 Oct 2009 12:53:46 -0500, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
interface Comparator(T)
{
int opCmp(Comparator!T rhs);
mixin(Impl) // for each implementation Impl
{
int opCmp(Impl rhs);
override int opCmp(Comparator!T rhs)
On 2-10-2009 4:30, Andrei Alexandrescu wrote:
Consider:
class A {
abstract void fun() {}
}
The class defines a function that is at the same time abstract (so it
requires overriding in derivees) and has implementation.
Currently the compiler disallows creation of objects of type A, although
Jarrett Billingsley wrote:
On Thu, Oct 1, 2009 at 4:30 PM, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Consider:
class A {
abstract void fun() {}
}
The class defines a function that is at the same time abstract (so it
requires overriding in derivees) and has implementation.
Phil Deets wrote:
On Thu, 01 Oct 2009 12:53:46 -0500, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
interface Comparator(T)
{
int opCmp(Comparator!T rhs);
mixin(Impl) // for each implementation Impl
{
int opCmp(Impl rhs);
override int
Graham St Jack wrote:
I would love to get my hands on the transcript and video of the event...
Will it be recorded?
ACCU has not recorded its conferences in the past.
Andrei
Andrei Alexandrescu wrote:
I am becoming increasingly aware that we need to provide some means to
define certain members (data and functions) for each class as if they
were pasted there.
Most of the examples given would be well served by decent builtin
reflection. Walter thinks reflection is
Christopher Wright wrote:
Andrei Alexandrescu wrote:
I am becoming increasingly aware that we need to provide some means to
define certain members (data and functions) for each class as if they
were pasted there.
Most of the examples given would be well served by decent builtin
reflection.
On Thu, Oct 1, 2009 at 8:49 PM, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Jarrett Billingsley wrote:
On Thu, Oct 1, 2009 at 4:30 PM, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Consider:
class A {
abstract void fun() {}
}
The class defines a function that
On 2009-10-01 12:29:39 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org said:
I think it's a good idea, but there should be a way to *override*
static functions.
That has the same risks. The problem right now is that in order to use
a class, you must absorb the definition of that
On 2009-10-01 14:05:10 -0400, Max Samukha spam...@d-coding.com said:
For example, the upcoming reflection mechanism in QtD (which uses its
own metaobjects instead of the limited classinfo) requires manual
insertion of a mixin into derived classes unless the mixin is inserted
implicitly when a
Walter Bright newshou...@digitalmars.com wrote in message
news:ha37cf$4l...@digitalmars.com...
Nick Sabalausky wrote:
3. use of uninitialized variables (no reaching definition)
3. Optimizer detects and reports it. Irrelevant for D, though, because
variables are always initialized. The =void
Jarrett Billingsley wrote:
On Thu, Oct 1, 2009 at 8:49 PM, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Jarrett Billingsley wrote:
On Thu, Oct 1, 2009 at 4:30 PM, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Consider:
class A {
abstract void fun() {}
}
The class
Michel Fortin wrote:
On 2009-10-01 12:29:39 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org said:
I think it's a good idea, but there should be a way to *override*
static functions.
That has the same risks. The problem right now is that in order to use
a class, you must absorb the
Walter Bright wrote:
Brad Roberts wrote:
1) Rich flow control. They go well beyond what's typically done by
compiliers during their optimization passes. They tend to be
whole-code in scope and actually DO the parts that are hard, like
cross expression variable value tracking similar to a
Nick Sabalausky wrote:
If you accept the idea of a compiler (like DMD) having rudimentary built-in
optional versions of normally separate tools like profiling, unittesting,
doc generation, etc., and you accept that lint tools are perfectly fine
tools to use (as I think you do, or am I
On Thu, 01 Oct 2009 05:02:10 +0100, Tom S wrote:
Moritz Warning wrote:
Hi,
how can I access the original value for xs?
[..]
You were probably looking for the old meaning of .init, but it's gone
now, so I present these alternative fixes:
1) You need to load the state of the game from
Saaa wrote:
I think is very bug-prone, isn't it obvious iub should be -5?
ubyte ub = 5;
int iub = -ub; // iub now is 251
What is the reasoning to do it this way?
Minus toggles the most significant bit, be it on a signed or unsigned
type. When converting it to an int, the byte being signed
Saaa wrote:
Jeremie Pelletier wrote
Saaa wrote:
I think is very bug-prone, isn't it obvious iub should be -5?
ubyte ub = 5;
int iub = -ub; // iub now is 251
What is the reasoning to do it this way?
Minus toggles the most significant bit, be it on a signed or unsigned
type. When converting
Jeremie Pelletier wrote
Then why use an ubyte instead of a byte or an int?
I wasn't me who wrote that part of the code :)
You could also just do:
for(int i = cast(byte)nloop; i 10; i++)
I forgot the minus sign:
for(int i = -cast(int)nloop;i 10; i++)
Still think it is unnecessary bug-prone.
Moritz Warning wrote
This is a troublesome behavior:
ubyte z = 5;
int x = -z; // x now is 251
int y = -1 * z; // y is now -5
Yes, troublesome is the correct word :)
Does anybody ever use the =-z behaviour?
Saaa:
Does anybody ever use the =-z behaviour?
Sometimes C programmers use something like:
unsigned int x = -1;
The interaction of signed-unsigned integral numbers in D is very error-prone,
so much that I suggest to use unsigned integrals in D only where strictly
necessary (generally when you
On Thu, Oct 1, 2009 at 2:00 PM, bearophile bearophileh...@lycos.com wrote:
I have discussed such topics several times in the main D newsgroup, and in
the end no good solution has being found/accepted so far. But eventually some
better solution must be found...
Fucking A, bearophile.
On Thu, 1 Oct 2009, Saaa wrote:
I think is very bug-prone, isn't it obvious iub should be -5?
ubyte ub = 5;
int iub = -ub; // iub now is 251
What is the reasoning to do it this way?
The inclusion of the 'int' part obscures what I think the real problem
is..
Does it make sense to
http://d.puremagic.com/issues/show_bug.cgi?id=2942
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
Severity|normal |minor
---
http://d.puremagic.com/issues/show_bug.cgi?id=2942
Don clugd...@yahoo.com.au changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=3354
Summary: asm fld x, ST(6); accepted.
Product: D
Version: 1.00
Platform: x86
OS/Version: All
Status: NEW
Keywords: accepts-invalid
Severity: minor
http://d.puremagic.com/issues/show_bug.cgi?id=3355
Summary: std.string.cmp works incorrectly for mixed-type and
different-length strings
Product: D
Version: 2.032
Platform: x86
OS/Version: Linux
Status: NEW
http://d.puremagic.com/issues/show_bug.cgi?id=3355
Andrei Alexandrescu and...@metalanguage.com changed:
What|Removed |Added
Status|NEW |ASSIGNED
http://d.puremagic.com/issues/show_bug.cgi?id=3356
Summary: Make pure functions require immutable parameters
Product: D
Version: future
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
http://d.puremagic.com/issues/show_bug.cgi?id=3352
--- Comment #1 from Sobirari Muhomori dfj1es...@sneakemail.com 2009-10-01
07:43:35 PDT ---
Also I think, it's an overkill to fine tune allocation as it's done in
to!string(uint)
--
Configure issuemail:
http://d.puremagic.com/issues/show_bug.cgi?id=3356
Don clugd...@yahoo.com.au changed:
What|Removed |Added
CC||clugd...@yahoo.com.au
---
http://d.puremagic.com/issues/show_bug.cgi?id=3357
Summary: ICE with aa that use static char array as key
Product: D
Version: 1.047
Platform: Other
OS/Version: Mac OS X
Status: NEW
Severity: normal
Priority: P2
http://d.puremagic.com/issues/show_bug.cgi?id=3357
Don clugd...@yahoo.com.au changed:
What|Removed |Added
CC||clugd...@yahoo.com.au
---
http://d.puremagic.com/issues/show_bug.cgi?id=1934
Fawzi Mohamed fa...@gmx.ch changed:
What|Removed |Added
CC||fa...@gmx.ch
--- Comment
http://d.puremagic.com/issues/show_bug.cgi?id=3357
Fawzi Mohamed fa...@gmx.ch changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=3357
--- Comment #4 from Fawzi Mohamed fa...@gmx.ch 2009-10-01 08:35:40 PDT ---
thanks for catching it...
--
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=2998
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=3358
Summary: Several typeof(Class.method).stringof incoherence
Product: D
Version: 2.032
Platform: x86
OS/Version: Linux
Status: NEW
Severity: major
Priority: P2
84 matches
Mail list logo