On Sat, Aug 8, 2009 at 8:44 PM, Jos van Udenj...@nospam.nl wrote:
Andrei Alexandrescu wrote:
http://www.reddit.com/r/programming/comments/975ng/diving_into_the_d_programming_language_tdpl/
(Don't tell anyone, but I plan to rewrite it.)
Andrei
Is this supposed to compile? I keep getting
Jarrett Billingsley wrote:
On Sat, Aug 8, 2009 at 8:44 PM, Jos van Udenj...@nospam.nl wrote:
Andrei Alexandrescu wrote:
http://www.reddit.com/r/programming/comments/975ng/diving_into_the_d_programming_language_tdpl/
(Don't tell anyone, but I plan to rewrite it.)
Andrei
Is this supposed to
On Fri, 07 Aug 2009 18:57:12 +0200, Michel Fortin
michel.for...@michelf.com wrote:
On 2009-08-07 12:33:09 -0400, Miles ...@___. said:
Lars T. Kyllingstad wrote:
Neither of the natural candidates, a^b and a**b, are an option, as they
are, respectively, already taken and
Lars T. Kyllingstad Wrote:
Don wrote:
The operator which is REALLY missing is exponentiation.
I've been really missing that one.
Which operators could be used for exponentiation? I've only ever seen
a**b and a^b used, but I think those are out of the question for D.
-Lars
Why
Pablo Ripolles Wrote:
Lars T. Kyllingstad Wrote:
Don wrote:
The operator which is REALLY missing is exponentiation.
I've been really missing that one.
Which operators could be used for exponentiation? I've only ever seen
a**b and a^b used, but I think those are out of the
Hello!
This is just another reminder about ongoing voting about properties:
http://www.igsoft.net/dpolls/index.php
Current results:
* about 68% of responders want to have special syntax for properties
* from people wanting new syntax most people want C# syntax (26 votes)
and then almost
Jeremie Pelletier wrote:
Jarrett Billingsley Wrote:
On Fri, Aug 7, 2009 at 1:20 PM, Aaron Wattersarw1...@yahoo.com wrote:
Hi guys. D looks cool. A couple of things confuse me.
The first is: what happens if I do a
delete cl;
after storing a reference to cl somewhere? Can I use the stored
On Sat, Aug 8, 2009 at 9:17 AM, Andrei
Alexandrescuseewebsiteforem...@erdani.org wrote:
FWIW, I am trying to convince Walter to not reclaim memory in delete, but
instead only call destructors. D continues C++'s mistake of conflating
lifetime termination with memory reclamation.
Why? Instead
Jarrett Billingsley wrote:
On Sat, Aug 8, 2009 at 9:17 AM, Andrei
Alexandrescuseewebsiteforem...@erdani.org wrote:
FWIW, I am trying to convince Walter to not reclaim memory in delete, but
instead only call destructors. D continues C++'s mistake of conflating
lifetime termination with memory
On Sat, Aug 8, 2009 at 9:42 AM, Andrei
Alexandrescuseewebsiteforem...@erdani.org wrote:
Jarrett Billingsley wrote:
On Sat, Aug 8, 2009 at 9:17 AM, Andrei
Alexandrescuseewebsiteforem...@erdani.org wrote:
FWIW, I am trying to convince Walter to not reclaim memory in delete, but
instead only
Andrei Alexandrescu, el 8 de agosto a las 08:42 me escribiste:
Jarrett Billingsley wrote:
On Sat, Aug 8, 2009 at 9:17 AM, Andrei
Alexandrescuseewebsiteforem...@erdani.org wrote:
FWIW, I am trying to convince Walter to not reclaim memory in delete, but
instead only call destructors. D
Andrei Alexandrescu wrote:
...
And what if you used it to try to delete a temporary array? Yes, you
could use malloc/free for the temp array, but.. it just seems silly to
have to dip into C functions to do that.
Why? It's not a frequent need.
I use it quite a bit, mostly because scope
Leandro Lucarella, el 8 de agosto a las 11:22 me escribiste:
Andrei Alexandrescu, el 8 de agosto a las 08:42 me escribiste:
Jarrett Billingsley wrote:
On Sat, Aug 8, 2009 at 9:17 AM, Andrei
Alexandrescuseewebsiteforem...@erdani.org wrote:
FWIW, I am trying to convince Walter to not
Jarrett Billingsley Wrote:
On Sat, Aug 8, 2009 at 9:42 AM, Andrei
Alexandrescuseewebsiteforem...@erdani.org wrote:
Jarrett Billingsley wrote:
On Sat, Aug 8, 2009 at 9:17 AM, Andrei
Alexandrescuseewebsiteforem...@erdani.org wrote:
FWIW, I am trying to convince Walter to not reclaim
On 2009-08-08 09:17:28 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org said:
Great description.
FWIW, I am trying to convince Walter to not reclaim memory in delete,
but instead only call destructors. D continues C++'s mistake of
conflating lifetime termination with memory
Jarrett Billingsley wrote:
On Sat, Aug 8, 2009 at 9:42 AM, Andrei
Alexandrescuseewebsiteforem...@erdani.org wrote:
Jarrett Billingsley wrote:
On Sat, Aug 8, 2009 at 9:17 AM, Andrei
Alexandrescuseewebsiteforem...@erdani.org wrote:
FWIW, I am trying to convince Walter to not reclaim memory in
Michel Fortin wrote:
On 2009-08-08 09:17:28 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org said:
Great description.
FWIW, I am trying to convince Walter to not reclaim memory in delete,
but instead only call destructors. D continues C++'s mistake of
conflating lifetime
Andrei Alexandrescu Wrote:
Michel Fortin wrote:
On 2009-08-08 09:17:28 -0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org said:
Great description.
FWIW, I am trying to convince Walter to not reclaim memory in delete,
but instead only call destructors. D continues C++'s
Jeremie Pelletier:
It's impossible to know if a pointer is unique without scanning the entire
heap and pausing all threads to scan their stacks.
Are you saying this after reading Bartoz blog posts?
Bye,
bearophile
aarti_pl wrote:
Currently my choice would be something like proposal in DIP6
(attributes). Using '@' at the beginning of attributes could be also
used in another place: in imports it could be used to escape keywords,
so that following would be possible:
--
import s...@traits; //then we
bearophile Wrote:
Jeremie Pelletier:
It's impossible to know if a pointer is unique without scanning the entire
heap and pausing all threads to scan their stacks.
Are you saying this after reading Bartoz blog posts?
Bye,
bearophile
No I haven't, do you have a link?
Jeremie Pelletier:
No I haven't, do you have a link?
With the power of Google this is the blog of Bartosz Milewski, you may read
about the last ten posts or so:
http://bartoszmilewski.wordpress.com/
Bye,
bearophile
I just had an idea to help keep track of unittests, right now we're turning on
printf's at the beginning of a test to know which one fails, and adding printfs
everywhere quickly becomes redundant. Also if the test succeeds and execution
fails at some other point, the last printf is then
Since one of D's goals is dropping the bad things from C/C++, I wonder
why the ambiguous syntax for multi-line comments is still allowed:
---
auto p = new int;
*p = 10;
auto j = 100/*p;- error
---
There is already the unambiguous /+...+/ syntax, so why not drop the
On Sun, Aug 09, 2009 at 02:25:04AM +0200, Oliver Hoog wrote:
There is already the unambiguous /+...+/ syntax, so why not drop the
/*...*/ syntax? Compatibility? Convenience?
Both.
I think D should be more pragmatic.
Pragmatism includes sticking to established habits in humans. This is one
Oliver Hoog wrote:
There is already the unambiguous /+...+/ syntax, so why not drop the
/*...*/ syntax? Compatibility? Convenience? I think D should be more
pragmatic.
What do you think?
I don't think D needs two inline comment forms, but /+...+/ is no less
ambiguous than /*...*/. Don't
Interesting thing I found out about C# properties.
The syntax
int Thing {
get { return _thing; }
set { _thing = value; }
}
is rewritten by the C# compiler into
int prop_Thing() { return _thing; }
void prop_Thing(int value) { _thing = value; }
Just thought it was interesting given all our
In a small program on Windows XP I have to allocate a large chunk of RAM, about
1847 MB of RAM. This PC has 2 GB RAM. So I use std.c.stdio.malloc(), with DMD
v1.042 (or v2.031). But it's not able to allocate it, and produces at runtime:
Error: Access Violation
An equal program written in C and
bearophile Wrote:
In a small program on Windows XP I have to allocate a large chunk of RAM,
about 1847 MB of RAM. This PC has 2 GB RAM. So I use std.c.stdio.malloc(),
with DMD v1.042 (or v2.031). But it's not able to allocate it, and produces
at runtime:
Error: Access Violation
An
aarti_pl Wrote:
Hello!
This is just another reminder about ongoing voting about properties:
http://www.igsoft.net/dpolls/index.php
Current results:
* about 68% of responders want to have special syntax for properties
* from people wanting new syntax most people want C# syntax (26
On Sun, Aug 9, 2009 at 10:43 AM, Bill Baxterwbax...@gmail.com wrote:
Interesting thing I found out about C# properties.
The syntax
int Thing {
get { return _thing; }
set { _thing = value; }
}
is rewritten by the C# compiler into
int prop_Thing() { return _thing; }
void
On Sun, Aug 9, 2009 at 12:23 AM, Bill Baxterwbax...@gmail.com wrote:
On Sun, Aug 9, 2009 at 10:43 AM, Bill Baxterwbax...@gmail.com wrote:
Interesting thing I found out about C# properties.
The syntax
int Thing {
get { return _thing; }
set { _thing = value; }
}
is rewritten by the C#
If a function has both an asm and D implementations inside its body, and the D
version can be executed at compile time, but the asm one is much faster at
runtime. Is it possible to have the compiler use the D code path at compile
time (ie to fill in enums and whatnot), and have the asm version
Jeremie Pelletier wrote:
If a function has both an asm and D implementations inside its body, and the
D version can be executed at compile time, but the asm one is much faster at
runtime. Is it possible to have the compiler use the D code path at compile
time (ie to fill in enums and
Oliver Hoog wrote:
Since one of D's goals is dropping the bad things from C/C++, I wonder
why the ambiguous syntax for multi-line comments is still allowed:
---
auto p = new int;
*p = 10;
auto j = 100/*p;- error
---
There is already the unambiguous /+...+/ syntax, so why
Oliver wrote:
The source code for the standard library comes with the compiler.
If you look in std\array.d, you find this around line 279 (reflowed for
readability):
void put(T, E)(ref T[] a, E e) {
assert(a.length);
a[0] = e; a = a[1 .. $];
}
Would anybody care to explain what this
Jos van Uden wrote:
Oliver wrote:
The source code for the standard library comes with the compiler.
If you look in std\array.d, you find this around line 279 (reflowed for
readability):
void put(T, E)(ref T[] a, E e) {
assert(a.length);
a[0] = e; a = a[1 .. $];
}
Would anybody
Daniel Keep wrote:
No; read the code. Before the put, a and b are pointing to the same
span of memory. a.put(5) puts the value 5 into the front (first
element) of the array, then advances the array.
However, put can't see b, so it doesn't get updated along with a. The
end result is that b =
Writing a small opengl text printer (vertex based) I have found that the next
lines are illegal to dmd (2.031):
invariant float[][][] CHARS =[
[//A
[0,0],
[1/2f,2],
[1,0],
[3/4f,1],
[1/4f,1]
]
];
dmd complains (compiling with dmd -c bug.d):
Writing a small opengl text printer (vertex based) I have found that the next
lines are illegal to dmd (2.031):
invariant float[][][] CHARS =[
[//A
[0,0],
[1/2f,2],
[1,0],
[3/4f,1],
[1/4f,1]
]
];
dmd complains (compiling with dmd -c bug.d):
http://d.puremagic.com/issues/show_bug.cgi?id=3235
Summary: Function literals must be deduced as function or
delegate
Product: D
Version: unspecified
Platform: Other
OS/Version: Linux
Status: NEW
http://d.puremagic.com/issues/show_bug.cgi?id=3235
--- Comment #1 from Andrei Alexandrescu and...@metalanguage.com 2009-08-08
07:17:17 PDT ---
(In reply to comment #0)
Consider:
void foo(alias pred)() {
pragma(msg, pred.stringof);
}
unittest {
foo!((i) { return i 0; })();
http://d.puremagic.com/issues/show_bug.cgi?id=1977
--- Comment #22 from Jason House jason.james.ho...@gmail.com 2009-08-08
09:17:31 PDT ---
(In reply to comment #21)
I'm only worrying about D2 where implicit narrowing conversions is part of the
spec. ulong%1000 should implicitly allowed
http://d.puremagic.com/issues/show_bug.cgi?id=1977
Andrei Alexandrescu and...@metalanguage.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=3235
Stewart Gordon s...@iname.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=3235
--- Comment #3 from Andrei Alexandrescu and...@metalanguage.com 2009-08-08
11:55:19 PDT ---
(In reply to comment #2)
This is as designed.
http://www.digitalmars.com/d/1.0/expression.html#FunctionLiteral
If the keywords function or
http://d.puremagic.com/issues/show_bug.cgi?id=3235
Andrei Alexandrescu and...@metalanguage.com changed:
What|Removed |Added
Status|RESOLVED|REOPENED
http://d.puremagic.com/issues/show_bug.cgi?id=3237
Summary: Access Violation during reference counting
Product: D
Version: 2.032
Platform: x86
OS/Version: Windows
Status: NEW
Severity: critical
Priority: P2
http://d.puremagic.com/issues/show_bug.cgi?id=3237
--- Comment #1 from Bartosz Milewski bart...@relisoft.com 2009-08-08
12:31:46 PDT ---
Created an attachment (id=439)
-- (http://d.puremagic.com/issues/attachment.cgi?id=439)
test case for access violatin while reference counting
--
http://d.puremagic.com/issues/show_bug.cgi?id=2476
Brad Roberts bra...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=3237
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=3231
--- Comment #10 from Cristi Vlasceanu crist...@zerobugs.org 2009-08-08
13:25:53 PDT ---
(In reply to comment #9)
(In reply to comment #5)
I think that marking the bug as invalid because of a limitation in the
implementation is
http://d.puremagic.com/issues/show_bug.cgi?id=3237
--- Comment #4 from Bartosz Milewski bart...@relisoft.com 2009-08-08
15:20:08 PDT ---
I simplified the example. It turns out that the destructor of a class object
Counter is called. I have no idea what mechanism may call the destructor
http://d.puremagic.com/issues/show_bug.cgi?id=3231
--- Comment #11 from Stewart Gordon s...@iname.com 2009-08-08 16:07:09 PDT
---
(In reply to comment #10)
(In reply to comment #9)
Better beware of hijacking vulnerabilities.
This is possibly valid, do you have an example that drives
http://d.puremagic.com/issues/show_bug.cgi?id=3231
--- Comment #12 from Tim M tim.matthe...@gmail.com 2009-08-08 16:42:01 PDT
---
Adding the dot is so trivial and takes no time at all. I do believe that this
is indeed a bug anyway explanation of such:
This code will not compile:
class A
{
http://d.puremagic.com/issues/show_bug.cgi?id=2702
--- Comment #3 from Don clugd...@yahoo.com.au 2009-08-08 22:19:09 PDT ---
I have confirmed that after completely removing that section of code, the DMD
test suite still passes all tests. I tried to construct a valid case which
required that
http://d.puremagic.com/issues/show_bug.cgi?id=2469
--- Comment #8 from Don clugd...@yahoo.com.au 2009-08-08 22:21:44 PDT ---
There's a patch for the original bug in bug 2702. It's unrelated to the ICE.
(It's really annoying when new bugs are reported in the comments for existing
bugs, it's
57 matches
Mail list logo