Andrei Alexandrescu Wrote:
> Sean Kelly wrote:
> > == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article
> >> Jarrett Billingsley wrote:
> >>> On Mon, Mar 23, 2009 at 2:04 PM, Andrei Alexandrescu
> >>> wrote:
> Nothing.
>
> auto a = T(args);
>
> shou
Yes, well, the question was about new not about arrays...
-[Unknown]
Steven Schveighoffer wrote:
On Sun, 22 Mar 2009 18:43:58 -0400, Unknown W. Brackets
wrote:
The new construct allocates memory. You can "new" anything that
requires a set amount of memory.
This is equivalent to what you
Steve,
It's not exactly prose, but the error message is correct. It says:
"Error: new can only create structs, dynamic arrays or class objects,
not char[]'s."
So:
1. You didn't try to allocate space for a struct (e.g. new struct_t.)
2. You didn't try to allocate space for a dynamic array (n
davidl wrote:
在 Tue, 24 Mar 2009 06:59:56 +0800,Christopher Wright
写道:
bearophile wrote:
Jarrett Billingsley:
What you're doing here is a blatant abuse of the exception system.
I am sorry.
bearophile
Don't apologize to Jarrett, apologize to the exception system.
He's comparing two d
在 Tue, 24 Mar 2009 19:25:55 +0800,Christopher Wright
写道:
davidl wrote:
在 Tue, 24 Mar 2009 06:59:56 +0800,Christopher Wright
写道:
bearophile wrote:
Jarrett Billingsley:
What you're doing here is a blatant abuse of the exception system.
I am sorry.
bearophile
Don't apologize to Jarr
Tue, 24 Mar 2009 14:13:34 +0800, davidl wrote:
> 在 Mon, 23 Mar 2009 18:18:55 +0800,Frits van Bommel
> 写道:
>
>> Yigal Chripun wrote:
>>> it's not a platform issue but more of a linker issue. after all, mingw
>>> uses elf on windows, right?
>>
>> Actually, I'm pretty sure it uses a COFF varian
Steve Teale wrote:
Andrei Alexandrescu Wrote:
Sean Kelly wrote:
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article
Jarrett Billingsley wrote:
On Mon, Mar 23, 2009 at 2:04 PM, Andrei Alexandrescu
wrote:
Nothing.
auto a = T(args);
should create a T, whether T is a
MiniLight: a minimal global illumination renderer (re)written in Scala, OCaml,
Python, Ruby, Lua, Flex and C++ : http://www.hxa.name/minilight/
I think it would be interesting to have a D version and compare for the float
performance and maybe even lines of code.
There is another similar "benc
On Mon, 23 Mar 2009 22:24:30 -0400, Cristian Vlasceanu
wrote:
I thought one of the benefits of having immutable strings is that
substrings were just pointers to slices of the original data in Java and
.NET. So every time I do a substring in Java and .NET, it creates a
copy
of the data? T
Unknown W. Brackets Wrote:
> Steve,
>
> It's not exactly prose, but the error message is correct. It says:
>
> "Error: new can only create structs, dynamic arrays or class objects,
> not char[]'s."
>
> So:
>
> 1. You didn't try to allocate space for a struct (e.g. new struct_t.)
> 2. You did
(1)
interface A {void a();}
interface B : A {}
(2)
interface B {void a();}
If both interfaces of B are the *same* when paying attention to interface B,
I think that the next code is invalid-accept about class C2.
Because class C2 do not have a method "void a(){}".
http://www.digitalmars.com/d/2.
Haruki Shigemori escribió:
(1)
interface A {void a();}
interface B : A {}
(2)
interface B {void a();}
If both interfaces of B are the *same* when paying attention to interface B,
I think that the next code is invalid-accept about class C2.
Because class C2 do not have a method "void a(){}".
ht
Cristian Vlasceanu:
> That's exactly right, but for D / .NET I do not expect existing code to
> compile as-is. For example, I do not intent to port any of the phobos /
> tango code. I envision all I / O and system stuff to go through
> [mscorlib]System.
Can you explain me what are the purposes
redditor:
> There is another similar "benchmark" here:
> http://lucille.atso-net.jp/aobench/
The D#2 version is translated from C, the D#3 comes mostly from C#.
(D#1 was a translation from Python).
I may send this D2 version to the original author...
WIDTH = 256
HEIGHT = 256
NSUBSAMPLES = 2
NAO_S
Replacing "double" with "float" in all the C/D program the output image is the
same, but the timings change:
Timings, seconds:
Python: 193.6
Psyco: 49.80
D2: 6.30
D3: 4.22
C2 gcc: 4.06 (float)
C gcc:3.98
C llvm-gcc: 3.84
C2 llvm-gcc
Since I'm working on the concurrency model for D, I have to re-read several
articles. I decided to combine this task with blogging--it always helps the
understanding if you have to relate the topic to others. We are interested in
designing a type system that would prevent, or at least minimize,
On Tue, 24 Mar 2009 11:51:31 -0400, redditor wrote:
> MiniLight: a minimal global illumination renderer (re)written in Scala,
> OCaml, Python, Ruby, Lua, Flex and C++ : http://www.hxa.name/minilight/
>
> I think it would be interesting to have a D version and compare for the
> float performance a
Steve Teale wrote:
Unknown W. Brackets Wrote:
Steve,
It's not exactly prose, but the error message is correct. It says:
"Error: new can only create structs, dynamic arrays or class objects,
not char[]'s."
So:
1. You didn't try to allocate space for a struct (e.g. new struct_t.)
2. You di
"Leandro Lucarella" wrote in message
news:20090323192000.ga23...@burns.springfield.home...
> Leandro Lucarella, el 23 de marzo a las 13:31 me escribiste:
>> And guess what? It even support D =)
>> http://waf.googlecode.com/svn/trunk/demos/d/
>
> It looks like AAP support D too =)
> http://www.a-a
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Georg Wrede wrote:
> Jérôme M. Berger wrote:
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> Nick Sabalausky wrote:
>>> Yea, I was going to mention that, too. As far as I'm concerned
>>> "*make" is the same sort of undead unholy relic as C++.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Georg Wrede wrote:
> Young people tend to always choose the absolutely best, while older
> people value stability and longevity of tools.
>
> So, yesterday the best was SCons, today it's AAP, what's it gonna be
> tomorrow? Old people prefer somethin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Walter Bright wrote:
> Georg Wrede wrote:
>>
>> Young people tend to always choose the absolutely best, while older
>> people value stability and longevity of tools.
>>
>> So, yesterday the best was SCons, today it's AAP, what's it gonna be
>> tomorro
"Christopher Wright" wrote in message
news:gq6lms$181...@digitalmars.com...
>> And finally, I would also change the format of libraries. A library would
>> be one file only. No more header/.di -files; one compact file containing
>> all the needed information (in a binary formated database that
Nick Sabalausky:
> I often wonder how much faster and more
> memory-efficient things like linux and the web could have been if they
> weren't so big on sticking damn near everything into "convenient" text
> formats.
Maybe not much, because today textual files can be compressed and decomperssed
"bearophile" wrote in message
news:gqbe2k$13a...@digitalmars.com...
> Nick Sabalausky:
>> I often wonder how much faster and more
>> memory-efficient things like linux and the web could have been if they
>> weren't so big on sticking damn near everything into "convenient" text
>> formats.
>
> May
Nick Sabalausky:
> That never once happened to me on my "slow" Apple 2.<
See here too :-)
http://hubpages.com/hub/_86_Mac_Plus_Vs_07_AMD_DualCore_You_Wont_Believe_Who_Wins
Yet, what I have written is often true :-)
Binary data can't be compressed as well as textual data, and lzop is I/O bound
in
No, I agree. I think for the sake of templating, improving the error
message is the best option - probably #3 (special case error message) imho.
-[Unknown]
Andrei Alexandrescu wrote:
Steve Teale wrote:
Unknown W. Brackets Wrote:
Steve,
It's not exactly prose, but the error message is cor
"bearophile" wrote in message
news:gqbgma$189...@digitalmars.com...
> Nick Sabalausky:
>> That never once happened to me on my "slow" Apple 2.<
>
> See here too :-)
> http://hubpages.com/hub/_86_Mac_Plus_Vs_07_AMD_DualCore_You_Wont_Believe_Who_Wins
>
Excellent article :)
> Yet, what I have writ
Nick Sabalausky wrote:
But it can add up. And I often wonder how much faster and more
memory-efficient things like linux and the web could have been if they
weren't so big on sticking damn near everything into "convenient" text
formats.
Most programs only need to load up text on startup. So t
Ary Borenszweig wrote:
You wouldn't have to break your head if implementing an interface meant
"having the methods declared in that interface". No error should appear
in C2.
What's the rationale behind this behaviour?
Naming collisions and different library versions. In practice, I suspect
th
Nick Sabalausky:
> Doesn't really matter, since binary data (assuming a format that isn't
> over-engineered) is already smaller than the same data in text form.
If you take into account compression too, sometimes text compressed is smaller
than the same binary file and the same binary file compr
Andrei Alexandrescu Wrote:
> Steve Teale wrote:
> > Andrei Alexandrescu Wrote:
> >
> >> Sean Kelly wrote:
> >>> == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s
> >>> article
> Jarrett Billingsley wrote:
> > On Mon, Mar 23, 2009 at 2:04 PM, Andrei Alexandrescu
> >
Steven Schveighoffer Wrote:
> Oh, and BTW, if I couldn't use Tango, I'd most certainly not use D.NET ;)
> I sort of loathe the .NET runtime libs, except for certain parts.
>
What I meant is that porting the libraries is not in the scope of my project.
Anyway, that is a side discussion.
Back
bearophile Wrote:
>
> Can you explain me what are the purposes of D.net?
>
> Bye,
> bearophile
You mean other than the tremendous fun that I am having writing a compiler
back-end? ;)
I guess the idea is to help the language catch on, by spreading it (or a
dialect of it) to as many platforms
On Tue, 24 Mar 2009 18:26:16 -0400, Cristian Vlasceanu
wrote:
Back to the slices topic: I agree that my proposed "ref" solution would
require code changes, but isn't that true for T[new] as well?
Cristian
There is not already a meaning for T[new], it is a syntax error. There is
alrea
Steven Schveighoffer Wrote:
> On Tue, 24 Mar 2009 18:26:16 -0400, Cristian Vlasceanu
> wrote:
>
> > Back to the slices topic: I agree that my proposed "ref" solution would
> > require code changes, but isn't that true for T[new] as well?
> >
> > Cristian
> >
>
> There is not already a meani
> I only had a short look, is it the NaN known from floating point types
> generalized to all types?
Not quite; NaNs don't abort your program (ignoring signalling NaNs, of
course.)
> Yay, The Power of None! That's what I was referring to when proposed
> nullable types:
>
> int? value1 = atoi("0
Bartosz Milewski Wrote:
> Since I'm working on the concurrency model for D, I have to re-read several
> articles. I decided to combine this task with blogging--it always helps the
> understanding if you have to relate the topic to others. We are interested in
> designing a type system that woul
Daniel Keep wrote:
>> int? value1 = atoi("0"); // 0
>> int? value2 = atoi("#!$"); // null
>
> Not quite; that assumes null isn't a valid value. What if the function
> was "getInstance"?
T?? value = getInstance();
> Here's how I understand it to work. Functions may return a Maybe!(T),
> which
Sergey Gromov Wrote:
> "Want to create an import library? Ask me how!"
Well since you offered... ;)
I tried out coffimplib, but it's not yeilding the results I need. I compared
the linkdef generated .def files with coffimplib's and the missing part is
pretty clear:
linkdef:
EXPORTS
_tcod
On Tue, 24 Mar 2009 21:46:32 -0400, Jason House
wrote:
Bartosz Milewski Wrote:
Since I'm working on the concurrency model for D, I have to re-read
several articles. I decided to combine this task with blogging--it
always helps the understanding if you have to relate the topic to
others
Cristian Vlasceanu wrote:
Andrei Alexandrescu Wrote:
Steve Teale wrote:
Andrei Alexandrescu Wrote:
Sean Kelly wrote:
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article
Jarrett Billingsley wrote:
On Mon, Mar 23, 2009 at 2:04 PM, Andrei Alexandrescu
wrote:
Nothing
42 matches
Mail list logo