On Thursday 17 March 2011 22:12:17 Don wrote:
> Andrei Alexandrescu wrote:
> > On 3/17/11 11:21 AM, Andrej Mitrovic wrote:
> >> On 3/17/11, Nick Sabalausky wrote:
> >>> I've long been convinced that "alias old new;" should really be
> >>> "alias new =
> >>> old;" The current way confuses me, and I
Andrei Alexandrescu wrote:
On 3/17/11 11:21 AM, Andrej Mitrovic wrote:
On 3/17/11, Nick Sabalausky wrote:
I've long been convinced that "alias old new;" should really be
"alias new =
old;" The current way confuses me, and I *still* have to consciously
stop
and think about it every time I wri
On Thursday 17 March 2011 20:23:08 Jonathan M Davis wrote:
> On Thursday 17 March 2011 18:43:33 Jonathan M Davis wrote:
> > On Thursday, March 17, 2011 17:59:54 Nick Sabalausky wrote:
> > > I was thinking of converting my patches for various rdmd issues into
> > > github pull requests, but being re
On Thursday 17 March 2011 18:43:33 Jonathan M Davis wrote:
> On Thursday, March 17, 2011 17:59:54 Nick Sabalausky wrote:
> > I was thinking of converting my patches for various rdmd issues into
> > github pull requests, but being relatively new to DVCSes (longtime SVN
> > user here) I was wondering
On 3/17/2011 8:33 AM, dsimcha wrote:
8. GZip support in std.file: I'll leave the stream stuff for someone else,
but just simple stuff like read(), write(), append() IMHO belongs in std.file.
Completion state: Not started, but this is the easiest of the bunch to
implement. (Phobos candidate)
On 3/17/2011 5:41 PM, Andrei Alexandrescu wrote:
if (!condition) { writeln("my message %s %s", __FILE__, __LINE__);
assert(0); }
Note that you have (twice in two different posts)
That's because I used cut & paste.
a bug in your code: you should have used writefln, not writeln.
I made a mi
On Thursday, March 17, 2011 17:59:54 Nick Sabalausky wrote:
> I was thinking of converting my patches for various rdmd issues into github
> pull requests, but being relatively new to DVCSes (longtime SVN user here)
> I was wondering what's the "kosher" way to do it?:
>
> - A separate branch for ea
On Thursday, March 17, 2011 18:23:51 Andrei Alexandrescu wrote:
> On 3/17/11 7:31 PM, Walter Bright wrote:
> > On 3/17/2011 5:02 PM, Andrei Alexandrescu wrote:
> > > [...]
> >
> > I don't disagree with anything you wrote. But I am suggesting that one
> > liners should have a high utility to be ju
On 2011-03-17 20:31:43 -0400, Walter Bright said:
On 3/17/2011 5:02 PM, Andrei Alexandrescu wrote:
> [...]
I don't disagree with anything you wrote. But I am suggesting that one
liners should have a high utility to be justifiably included in Phobos.
-
You
On 3/17/11 7:31 PM, Walter Bright wrote:
On 3/17/2011 5:02 PM, Andrei Alexandrescu wrote:
> [...]
I don't disagree with anything you wrote. But I am suggesting that one
liners should have a high utility to be justifiably included in Phobos.
-
You mentioned won
I was thinking of converting my patches for various rdmd issues into github
pull requests, but being relatively new to DVCSes (longtime SVN user here) I
was wondering what's the "kosher" way to do it?:
- A separate branch for each issue, with a pull request for each branch?
- One branch with a
On 3/17/11 7:16 PM, Walter Bright wrote:
On 3/17/2011 4:38 PM, dsimcha wrote:
On 3/17/2011 7:12 PM, Walter Bright wrote:
Sure, but there is plenty wrong with using enforce() for bug detection
even if alwaysAssert does not exist. For one thing, such uses encourage
others to misunderstand and mi
On 3/17/11 7:27 PM, KennyTM~ wrote:
On Mar 18, 11 04:17, Jason E. Aten wrote:
auto x1=1., x2=2., x3=3., x4=4., x5=5, x6=6.;
If the coder wanted them to all be doubles, it's easy to require that by
just saying so, and then even x5 will be a double.
double x1=1., x2=2, ...
So it seems to me th
On 3/17/2011 5:02 PM, Andrei Alexandrescu wrote:
> [...]
I don't disagree with anything you wrote. But I am suggesting that one liners
should have a high utility to be justifiably included in Phobos.
-
You mentioned wondering where we should draw the line in u
On Mar 18, 11 04:17, Jason E. Aten wrote:
auto x1=1., x2=2., x3=3., x4=4., x5=5, x6=6.;
If the coder wanted them to all be doubles, it's easy to require that by
just saying so, and then even x5 will be a double.
double x1=1., x2=2, ...
So it seems to me that auto does exactly what you asked i
On 3/17/2011 4:38 PM, dsimcha wrote:
On 3/17/2011 7:12 PM, Walter Bright wrote:
Sure, but there is plenty wrong with using enforce() for bug detection
even if alwaysAssert does not exist. For one thing, such uses encourage
others to misunderstand and misuse enforce.
Additionally, alwaysAssert
On 03/17/2011 06:38 PM, dsimcha wrote:
On 3/17/2011 7:12 PM, Walter Bright wrote:
Sure, but there is plenty wrong with using enforce() for bug detection
even if alwaysAssert does not exist. For one thing, such uses encourage
others to misunderstand and misuse enforce.
Additionally, alwaysAsser
On 03/17/2011 06:12 PM, Walter Bright wrote:
On 3/17/2011 3:08 PM, Andrei Alexandrescu wrote:
if (!condition) { writeln("my message %s %s", __FILE__, __LINE__);
assert(0); }
I am strongly opposed to using enforce() for bug detection.
There's nothing wrong with encapsulating this idiom (if fre
On 3/17/11, David Nadlinger wrote:
> I'll have a
> look at your posts when I find some time – I don't think anybody really
> monitors the forums at DSource.
Ok you don't have to look in the forums, I've opened up a ticket:
http://www.dsource.org/projects/qtd/ticket/84
On 3/17/2011 7:12 PM, Walter Bright wrote:
Sure, but there is plenty wrong with using enforce() for bug detection
even if alwaysAssert does not exist. For one thing, such uses encourage
others to misunderstand and misuse enforce.
Additionally, alwaysAssert is an obvious one liner. I think such
On 3/17/2011 3:08 PM, Andrei Alexandrescu wrote:
if (!condition) { writeln("my message %s %s", __FILE__, __LINE__);
assert(0); }
I am strongly opposed to using enforce() for bug detection.
There's nothing wrong with encapsulating this idiom (if frequent). That's what
essentially alwaysAssert d
Thanks to those guys as well. I'll post my problems to the issue tracker.
Somewhat tongue in cheek, we could call it dabal.
As in, "get on dabal!" :-)
>> On 3/17/11 4:00 PM, Tomek Sowiński wrote:
>> Yes, we need it badly.
>> I think it's a good moment to start a discussion. First off, what
>> exactly do we want from a package management system?
> On Thu, 17 Mar 2011 16:28:37 -0500, Andrei Alexandrescu wrote:
> Yah, would be great. It would be aw
On 3/17/2011 6:18 PM, spir wrote:
I'd have much use for both below.
On 03/17/2011 04:33 PM, dsimcha wrote:
1. Rational: A library for handling rational numbers exactly.
Templated on
integer type, can use BigInts for guaranteed accuracy, or fixed-width
integers
for more speed where the denominat
On 3/17/11 8:14 PM, Andrej Mitrovic wrote:
David, should I use bitbucket for any new tickets? As a side-note,
I've been having some runtime problems trying to use slots and
signals. I've posted about them in the forums
http://www.dsource.org/forums/viewforum.php?f=237 . When you have some
free ti
I'd have much use for both below.
On 03/17/2011 04:33 PM, dsimcha wrote:
1. Rational: A library for handling rational numbers exactly. Templated on
integer type, can use BigInts for guaranteed accuracy, or fixed-width integers
for more speed where the denominator and numerator will be small.
On 03/17/2011 05:03 PM, Walter Bright wrote:
On 3/17/2011 1:49 PM, dsimcha wrote:
== Quote from Walter Bright (newshou...@digitalmars.com)'s article
On 3/17/2011 12:32 PM, dsimcha wrote:
I've asked for this before and I'll ask again: Can we **please** put an
alwaysAssert() function (or an abbr
On 3/17/2011 1:49 PM, dsimcha wrote:
== Quote from Walter Bright (newshou...@digitalmars.com)'s article
On 3/17/2011 12:32 PM, dsimcha wrote:
I've asked for this before and I'll ask again: Can we **please** put an
alwaysAssert() function (or an abbreviation of this to make it less verbose) in
Jason E. Aten wrote:
> Please correct me if I'm wrong, but I observe that there doesn't appear
> to be a package management system / standard repository for D libraries.
> Or is there?
>
> I'm talking about something as easy to use as R's CRAN,
>> install.packages("rforest")
>
> or cpan for perl
On 3/17/11 11:21 AM, Andrej Mitrovic wrote:
On 3/17/11, Nick Sabalausky wrote:
I've long been convinced that "alias old new;" should really be "alias new =
old;" The current way confuses me, and I *still* have to consciously stop
and think about it every time I write an alias statement (includi
On 3/17/11 4:00 PM, Tomek Sowiński wrote:
Jason E. Aten napisał:
Please correct me if I'm wrong, but I observe that there doesn't appear
to be a package management system / standard repository for D libraries.
Or is there?
No, there isn't.
I'm talking about something as easy to use as R's C
On Thursday, March 17, 2011 13:44:42 Jason E. Aten wrote:
> Please correct me if I'm wrong, but I observe that there doesn't appear
> to be a package management system / standard repository for D libraries.
> Or is there?
>
> I'm talking about something as easy to use as R's CRAN,
>
> > install.p
Jason E. Aten napisał:
> Please correct me if I'm wrong, but I observe that there doesn't appear
> to be a package management system / standard repository for D libraries.
> Or is there?
No, there isn't.
> I'm talking about something as easy to use as R's CRAN,
> > install.packages("rforest")
On Thursday, March 17, 2011 12:22:00 Walter Bright wrote:
> On 3/16/2011 6:53 PM, bearophile wrote:
> > Right. But saying just that is not enough. You have to add that such "if
> > (!condition) throw new Exception(args)" idiom is common in Phobos because
> > Phobos is present only in release mode.
On Thursday, March 17, 2011 13:17:33 Jason E. Aten wrote:
> > auto x1=1., x2=2., x3=3., x4=4., x5=5, x6=6.;
>
> If the coder wanted them to all be doubles, it's easy to require that by
> just saying so, and then even x5 will be a double.
>
> double x1=1., x2=2, ...
>
> So it seems to me that aut
== Quote from Walter Bright (newshou...@digitalmars.com)'s article
> On 3/17/2011 12:32 PM, dsimcha wrote:
> > I've asked for this before and I'll ask again: Can we **please** put an
> > alwaysAssert() function (or an abbreviation of this to make it less
> > verbose) in
> > Phobos? I proposed th
Please correct me if I'm wrong, but I observe that there doesn't appear
to be a package management system / standard repository for D libraries.
Or is there?
I'm talking about something as easy to use as R's CRAN,
> install.packages("rforest")
or cpan for perl, ctan for latex, dpgk/apt for deb
On 3/17/2011 12:32 PM, dsimcha wrote:
I've asked for this before and I'll ask again: Can we **please** put an
alwaysAssert() function (or an abbreviation of this to make it less verbose) in
Phobos? I proposed this once before and it wasn't well liked for some reason
This reminded me to persist
"bearophile" wrote in message
news:iltdqr$1rd7$1...@digitalmars.com...
>
> D disallows bug-prone C syntax like this (C style guides strongly suggest
> to declare only each variable in a distinct statement and line of code):
>
> int a = 1, *b = null;
>
> D accepts code like:
>
>> auto a = 1, b =
On Thu, 17 Mar 2011 15:33:10 +, dsimcha wrote:
> 5. Matrix operations: SciD improvements that allow you to write matrix
> operations that look like normal math/MATLAB and optimizes them via
> expression templates so that a minimal number of temporary matrices are
> created. Uses/will use BLAS
> auto x1=1., x2=2., x3=3., x4=4., x5=5, x6=6.;
If the coder wanted them to all be doubles, it's easy to require that by
just saying so, and then even x5 will be a double.
double x1=1., x2=2, ...
So it seems to me that auto does exactly what you asked it to here, and I
actually prefer this beh
"Andrej Mitrovic" wrote in message
news:mailman.2560.1300377615.4748.digitalmar...@puremagic.com...
> On 3/17/11, Nick Sabalausky wrote:
>> "Andrej Mitrovic" wrote in message
>> news:mailman.2546.1300314544.4748.digitalmar...@puremagic.com...
>>> dsource is riddled with spam in bug reports.
>>
dsimcha napisał:
> I've accumulated a bunch of little libraries via various evening and weekend
> hacking projects over the past year or so, in various states of completion.
> Most are things I'm at least half-considering for Phobos, though some belong
> as third-party libs. I definitely don't ha
On 3/16/2011 6:53 PM, bearophile wrote:
Right. But saying just that is not enough. You have to add that such "if
(!condition) throw new Exception(args)" idiom is common in Phobos because
Phobos is present only in release mode. If the zip distribution of DMD
contains two Phobos and dmd becomes abl
== Quote from Walter Bright (newshou...@digitalmars.com)'s article
> On 3/16/2011 6:07 PM, Andrei Alexandrescu wrote:
> > On 03/16/2011 06:45 PM, bearophile wrote:
> >> So a better solution is for the standard Phobos library to ship in two
> >> versions, one compiled in release and not release mode
On 3/16/2011 6:07 PM, Andrei Alexandrescu wrote:
On 03/16/2011 06:45 PM, bearophile wrote:
So a better solution is for the standard Phobos library to ship in two
versions, one compiled in release and not release mode, and DMD may choose the
right one according to the compilation switches. This r
On 3/17/11, David Nadlinger wrote:
> I've just manually closed the spam tickets for QtD, but this is not a
> very enjoyable way to spend your time…
David, should I use bitbucket for any new tickets? As a side-note,
I've been having some runtime problems trying to use slots and
signals. I've poste
On 3/17/11 4:59 PM, Andrej Mitrovic wrote:
On 3/17/11, Nick Sabalausky wrote:
"Andrej Mitrovic" wrote in message
news:mailman.2546.1300314544.4748.digitalmar...@puremagic.com...
dsource is riddled with spam in bug reports.
I have four projects hosted on dsource, some going back as far as ab
On Thu, 17 Mar 2011 13:30:21 -0400, Simen kjaeraas
wrote:
On Thu, 17 Mar 2011 18:17:08 +0100, Steven Schveighoffer
wrote:
On Thu, 17 Mar 2011 12:09:50 -0400, bearophile
wrote:
Steven Schveighoffer:
The only problem I see with it is the inline-killing.
Please don't ignore the pur
On Thu, 17 Mar 2011 18:17:08 +0100, Steven Schveighoffer
wrote:
On Thu, 17 Mar 2011 12:09:50 -0400, bearophile
wrote:
Steven Schveighoffer:
The only problem I see with it is the inline-killing.
Please don't ignore the purity-killing :-)
I think this is not as much an easy fix. By
== Quote from Nick Sabalausky (a@a.a)'s article
> "Andrej Mitrovic" wrote in message
> news:mailman.2546.1300314544.4748.digitalmar...@puremagic.com...
> > dsource is riddled with spam in bug reports.
> I have four projects hosted on dsource, some going back as far as
> about 3 years, and I've nev
On Thu, 17 Mar 2011 12:09:50 -0400, bearophile
wrote:
Steven Schveighoffer:
The only problem I see with it is the inline-killing.
Please don't ignore the purity-killing :-)
I think this is not as much an easy fix. By changing one line in enforce,
every instance becomes inlinable. By
On 17/03/11 14.23, Lars T. Kyllingstad wrote:
On Thu, 17 Mar 2011 14:10:56 +0100, Jonas Drewsen wrote:
Hi,
I've made pull request for the first part of the curl support - the
C declarations.
Cool!
Is there anything I should do now except wait for comments or it to
be merged to tr
Kagamin:
> will this work?
Maybe msg has to be of string type.
Bye,
bearophile
I have found this article through Reddit (the Reddit page already contains
comments by Andrei), "C++0x feature support in GCC 4.5" by Arpan Sen:
http://www.ibm.com/developerworks/aix/library/au-gcc/index.html
The article probably doesn't contain new things for people that have closely
followed t
Don:
> Ah, OK. I was pretty sure there wasn't a problem with delegates, didn't
> realize that lazy was the issue. Nonetheless, I think we can just
> overload enforce() to fix this problem.
In one of the answers I've written to Andrei I have shown this link, it shows
the problem is caused by la
spir Wrote:
> First, "eat your own food".
>
> There is another reason for a (low-level static compiled) language to be
> written in itself: it's a measure of its efficiency. Nicklaus Wirth said the
> (only) measure of a compiler's efficiency is the speed of compiling itself.
> If
> you think
bearophile Wrote:
> Steven Schveighoffer:
>
> > The only problem I see with it is the inline-killing.
>
> Please don't ignore the purity-killing :-)
void checkArgument(bool condition, const char[] msg = null, string file =
__FILE__, int line = __LINE__) pure
{
if(!condition)throw new Argumen
On 3/17/11, Nick Sabalausky wrote:
> I've long been convinced that "alias old new;" should really be "alias new =
> old;" The current way confuses me, and I *still* have to consciously stop
> and think about it every time I write an alias statement (including just
> now).
>
I thought I was the on
Steven Schveighoffer wrote:
On Wed, 16 Mar 2011 21:07:54 -0400, Andrei Alexandrescu
wrote:
On 03/16/2011 06:45 PM, bearophile wrote:
- It kills inlining (with the current DMD, and I don't think this
problem will be fixed soon);
Not a problem of enforce.
Why can't enforce be this:
T enfo
Lars T. Kyllingstad wrote:
On Thu, 17 Mar 2011 07:51:33 +0100, Don wrote:
Daniel Gibson wrote:
I'd just like to summarize what useful stuff came out of this topic:
* enforce is useful and more than a "always activated assert" ;-) *
enforce prevents inlining and thus has negative impact on per
Steven Schveighoffer:
> The only problem I see with it is the inline-killing.
Please don't ignore the purity-killing :-)
Bye,
bearophile
On 3/17/11, Nick Sabalausky wrote:
> "Andrej Mitrovic" wrote in message
> news:mailman.2546.1300314544.4748.digitalmar...@puremagic.com...
>> dsource is riddled with spam in bug reports.
>
> I have four projects hosted on dsource, some going back as far as about 3
> years, and I've never had one
On Thu, 17 Mar 2011 11:49:25 -0400, bearophile
wrote:
Steven Schveighoffer:
All the other points, I disagree with bearophile, enforce is not assert
and should not be nothrow.
I have never said this. I am aware that enforce can't be nothrow, and I
agree that in some situations you want t
I've suggested to add to Phobos functions like amap(), sum(), better
max()/min(), and maybe afilter() too. amap() means array(map()), sum() is
similar to reduce!q{a+b}(), and the max() I have suggested is similar to
reduce!max().
Notes:
- Functions like sum() are used all the time, Python progr
Steven Schveighoffer:
> All the other points, I disagree with bearophile, enforce is not assert
> and should not be nothrow.
I have never said this. I am aware that enforce can't be nothrow, and I agree
that in some situations you want to raise an exception instead of using
asserts. One of the
spir:
> First, "eat your own food".
Right, but in the case of the SPARK compiler the main purpose of writing it in
SPARK + full proofs is probably to not introduce bugs in user code caused by
compiler bugs.
Bye,
bearophile
Am 17.03.2011 06:59, schrieb Simen kjaeraas:
On Thu, 17 Mar 2011 03:03:23 +0100, Daniel Gibson
wrote:
You're right. I just realized it and wanted to reply that correction
to myself but you were faster :)
I agree, that *is* helpful.
A side note: The documentation says the value is returned if i
I've accumulated a bunch of little libraries via various evening and weekend
hacking projects over the past year or so, in various states of completion.
Most are things I'm at least half-considering for Phobos, though some belong
as third-party libs. I definitely don't have time to finish/flesh ou
On 03/17/2011 02:08 PM, bearophile wrote:
Trass3r:
I guess pushing dmd's source code through that analyzer couldn't hurt as well.
Recently I have understood a simple thing, that is why the creators of the
SPARK (an Ada subset) compiler have written it using itself, also writing down
proof o
On Wed, 16 Mar 2011 21:07:54 -0400, Andrei Alexandrescu
wrote:
On 03/16/2011 06:45 PM, bearophile wrote:
- It kills inlining (with the current DMD, and I don't think this
problem will be fixed soon);
Not a problem of enforce.
Why can't enforce be this:
T enforce(T, string file = __FILE_
On Wed, 16 Mar 2011 22:10:01 -0400, Andrei Alexandrescu
wrote:
On 03/16/2011 08:53 PM, bearophile wrote:
Andrei:
Yum, love the enforce.
You are silly :-)
So perhaps the language could be improved as enforce does not break
purity.
Currently enforce() uses a lazy argument. A lazy arg
About the versions:
This benchmark (test1/Test1) comes from a reduction of some code of mine, it
converts integer numbers to string and builds a single very long string with
them. I have seen the Java code significantly faster than the D one.
The successive benchmarks are experiments to better
On Wed, 16 Mar 2011 17:42:09 +, Nick Treleaven wrote:
> auto f = cast(BitArray)foo;
>
> shared.d(21): Error: function std.bitmanip.BitArray.opCast () is not
> callable using argument types ()
> shared.d(21): Error: cannot implicitly convert expression (foo.opCast())
> of type void[] to BitArr
On Thu, 17 Mar 2011 14:10:56 +0100, Jonas Drewsen wrote:
> Hi,
>
> I've made pull request for the first part of the curl support - the
> C declarations.
Cool!
> Is there anything I should do now except wait for comments or it to
> be merged to trunk?
Nope.
> Is the normal "process
Hi,
I've made pull request for the first part of the curl support - the
C declarations.
Is there anything I should do now except wait for comments or it to
be merged to trunk?
Is the normal "process" to post something on this newsgroup when you
make a pull request?
/Jonas
Trass3r:
> I guess pushing dmd's source code through that analyzer couldn't hurt as well.
Recently I have understood a simple thing, that is why the creators of the
SPARK (an Ada subset) compiler have written it using itself, also writing down
proof of the whole compiler: you can't create a lan
bearophile Wrote:
> This is from a site of people that sell a static analyser for C/C++ code.
> Their periodic articles are usually interesting, this shows some common bugs:
>
> http://www.viva64.com/en/a/0070/
I guess pushing dmd's source code through that analyzer couldn't hurt as well.
This is from a site of people that sell a static analyser for C/C++ code. Their
periodic articles are usually interesting, this shows some common bugs:
http://www.viva64.com/en/a/0070/
>From articles like that I conclude that I'd like compilers/languages to take
>more attention to redundancies
bearophile Wrote:
> When you design a language and its standard library you have to keep a
> balance between making things very easy but not good enough, and very
> hard/fussy but better (see the simplicity of ddoc and D unittests, ddoc is
> mostly OK, but unnittests are probably a bit too much
One issue with this is that an object needs to know about every object
it can convert to.
Perhaps a better solution is to create something like AutoMapper[1]
for D
[1] http://automapper.codeplex.com/
On Thu, 17 Mar 2011 07:51:33 +0100, Don wrote:
> Daniel Gibson wrote:
>> I'd just like to summarize what useful stuff came out of this topic:
>>
>> * enforce is useful and more than a "always activated assert" ;-) *
>> enforce prevents inlining and thus has negative impact on performance -
>> thi
On 17/03/11 01.05, Don wrote:
Jonas Drewsen wrote:
On 16/03/11 06.34, Jesse Phillips wrote:
http://digitalmars.com/d/2.0/changelog.html
Yes.. these are invaluable.
http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel
Is the info about priorities coming directly from the sources
themselves
On Wednesday 16 March 2011 23:51:33 Don wrote:
> Daniel Gibson wrote:
> > I'd just like to summarize what useful stuff came out of this topic:
> >
> > * enforce is useful and more than a "always activated assert" ;-)
> > * enforce prevents inlining and thus has negative impact on performance -
> >
85 matches
Mail list logo