I want a workabout for this bug:
http://d.puremagic.com/issues/show_bug.cgi?id=3717
Basically, a C function that returns a structure and is compiled with a non-DMC
compiler thrashes the stack when called from D. Here's the assembly code for a
function that does it (sorry for the AT&T assembler
I want a workabout for this bug:
http://d.puremagic.com/issues/show_bug.cgi?id=3717
Basically, a C function that returns a structure and is compiled with a non-DMC
compiler thrashes the stack when called from D. Here's the assembly code for a
function that does it (sorry for the AT&T assembler
On 2011-03-17 08:33, dsimcha wrote:
> 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 d
On 2011-03-25 20:10, spir wrote:
> On 03/25/2011 11:20 PM, Jonathan M Davis wrote:
> > In the case of something like dividing by 0 or other math functions that
> > could be given bad values, the typical solution is to either use an
> > assertion (or check nothing) and then let the caller worry abou
On 03/25/2011 09:49 PM, Steven Schveighoffer wrote:
On Fri, 25 Mar 2011 16:23:08 -0400, spir wrote:
This logic certainly looks sensible, but I cannot understand how it should
work in practice. Say I'm implementing a little set of operations on
decimals. Among those, some (division, square root
On 03/25/2011 11:20 PM, Jonathan M Davis wrote:
In the case of something like dividing by 0 or other math functions that could
be given bad values, the typical solution is to either use an assertion (or
check nothing) and then let the caller worry about it. It would be extremely
wasteful to have
On 3/22/2011 6:04 PM, Jacob Carlborg wrote:
I've now finished the port of Dominic Sayers' PHP is_email function
(http://www.dominicsayers.com/isemail) and sending it for review.
A few comments:
* Due to limitations in std.regex some unit tests fail and are out
commented
* Due to some bugs (467
On 3/25/2011 5:59 PM, Denis Koroskin wrote:
On Sat, 26 Mar 2011 00:26:40 +0300, dsimcha wrote:
On 3/25/2011 3:50 PM, Sean Kelly wrote:
On Mar 24, 2011, at 1:00 PM, dsimcha wrote:
BTW, the TempAlloc module also includes a hash table, hash set and
AVL tree that
are specifically optimized for
On 2011-03-25 16:58, Trass3r wrote:
> > Not to mention, didn't someone find a linker that can link both COFF and
> > OMF
> > files on Windows and mostly works with dmd (IIRC, the debugging symbols
> > don't
> > currently work)? That sounds a lot more desirable than dealing with the
> > GNU
> > tool
Another question about Digital Mars' GSOC involvement: when it's
application time do I submit a proposal to someone directly, to this
list, or to the GSOC site at http://www.google-melange.com ?
You always have to apply via the google site.
I'm sure I read that somewhere in the FAQs.
Not to mention, didn't someone find a linker that can link both COFF and
OMF
files on Windows and mostly works with dmd (IIRC, the debugging symbols
don't
currently work)? That sounds a lot more desirable than dealing with the
GNU
tools on Windows (which already have the whole COFF vs OMF pr
On 25/03/2011 20:23, spir wrote:
This logic certainly looks sensible, but I cannot understand how it
should work in practice. Say I'm implementing a little set of operations
on decimals. Among those, some (division, square root...) will
necessarily have to check their input.
According to the rat
On Fri, 25 Mar 2011 02:48:14 +0900, Christian Manning
wrote:
Hi,
I'm a second year student at De Montfort University studying Computer
Science. I am very much interested in working on the database API idea
that is proposed at
http://prowiki.org/wiki4d/wiki.cgi?GSOC_2011_Ideas#DatabaseAP
Walter:
> Thanks for the kind words. Not everyone thinks that way
>
> http://www.reddit.com/r/programming/comments/gacna/bye_bye_nullpointerexceptions/c1m3r7n
>
> :-)
I didn't see that thread, thank you for the link. Some of your answers shown in
that Reddit page were really wrong (like that "
Do you require that ThreadsafeLogger is a Logger, or is it ok if
ThreadsafeLogger has a Logger? The latter is trivial to implement.
Benjamin Thaut Wrote:
> First thought:
> Consider the following code:
>
> import std.concurrency;
>
> class Logger {
> void log(string msg){
>
On 2011-03-25 05:41, spir wrote:
> About D collections: aside std.container in Phobos, Steven Schweighoffer
> has a fairly advanced project called dcollections:
> http://www.dsource.org/projects/dcollections. As I understand it, it is a
> bit of a concurrent for std.container, but there seems to be
> On 03/25/2011 08:21 PM, Jonathan M Davis wrote:
> >>> So, there really is no good answer.
> >>> - Jonathan M Davis
> >>
> >> So why do you need to differentiate between assert and enforce if you
> >> can't choose, which of them should be used?
> >>
> >> We can't really turn off both of them, an
On 3/25/2011 2:40 PM, piotrek wrote:
I really appreciate Walter's work and didn't want
to make any pressure on him (like I could ;). I'm grateful for him for all
amazing staff he did. D is the most beautiful language I have seen. It
has its pitfalls, but we know there can't be any perfect one. Fo
On 3/25/2011 2:09 AM, Don wrote:
Walter makes all the language decisions. The rest of us have just been able to
convince him on multiple occasions (but I think that even Andrei has not
achieved 50% convince rate). Hint #1: if you want to convince Walter, produce
some real world use cases. Hint #2
On Sat, 26 Mar 2011 00:26:40 +0300, dsimcha wrote:
On 3/25/2011 3:50 PM, Sean Kelly wrote:
On Mar 24, 2011, at 1:00 PM, dsimcha wrote:
BTW, the TempAlloc module also includes a hash table, hash set and AVL
tree that
are specifically optimized for TempAlloc. Should these be included in
t
On Fri, 25 Mar 2011 10:09:25 +0100, Don wrote:
> piotrek wrote:
>> On Thu, 24 Mar 2011 16:04:25 +0100, Don wrote:
>>
>>> piotrek wrote:
On Thu, 24 Mar 2011 21:37:12 +0800, KennyTM~ wrote:
> On Mar 24, 11 19:00, sclytrack wrote:
>> == Quote from piotrek (star...@tlen.pl)'s articl
On 3/25/2011 3:50 PM, Sean Kelly wrote:
On Mar 24, 2011, at 1:00 PM, dsimcha wrote:
BTW, the TempAlloc module also includes a hash table, hash set and AVL tree that
are specifically optimized for TempAlloc. Should these be included in the
submission? The disadvantages I see here is that they
On 25/03/2011 18:45, Jonathan M Davis wrote:
On 24/03/2011 17:58, Trass3r wrote:
Has this idea/project been assigned a mentor? I'd like to ask them and
the list, what's the best thing for me to do right now to prepare for
this?
You could also have a look at http://dsource.org/projects/ddbi
Thi
On Fri, 25 Mar 2011 16:23:08 -0400, spir wrote:
This logic certainly looks sensible, but I cannot understand how it
should work in practice. Say I'm implementing a little set of operations
on decimals. Among those, some (division, square root...) will
necessarily have to check their input.
Kagamin:
> They say, phobos is compiled with -release flag, so all contracts are removed.
I presume this problem will be fixed "soon", probably with two versions of
Phobos in the standard distribution. Otherwise D contract programming loses a
significant part of its meaning and usefulness.
Bye
On 03/25/2011 08:21 PM, Jonathan M Davis wrote:
So, there really is no good answer.
- Jonathan M Davis
So why do you need to differentiate between assert and enforce if you can't
choose, which of them should be used?
We can't really turn off both of them, and if we really want performance
and
On Mar 24, 2011, at 1:00 PM, dsimcha wrote:
>
> BTW, the TempAlloc module also includes a hash table, hash set and AVL tree
> that
> are specifically optimized for TempAlloc. Should these be included in the
> submission? The disadvantages I see here is that they are less generally
> useful
> (
On 3/25/11 10:28 AM, Walter Bright wrote:
On 3/25/2011 8:14 AM, Trass3r wrote:
Units, I think.
auto dist = 1km;
sin(90deg);
One difficulty with the C++0x approach is that the operator"" needed to
implement it is a global function. Global functions work fine until you
wind up with two km functi
First thought:
Consider the following code:
import std.concurrency;
class Logger {
void log(string msg){
//do logging
}
}
class ThreadsafeLogger : Logger {
private:
Tid m_Tid;
public:
this(){
m_Tid = thisTid();
}
>I can't think of an occasion when I would want to have my uses of
>enforce() stripped for a release build.
Ideally enforce shouldn't have side effects, so its removal shouldn't affect
your business logic.
>Removing asserts once I am sure
>that my code has no logic errors make sense
Did you e
> >So, there really is no good answer.
> >- Jonathan M Davis
>
> So why do you need to differentiate between assert and enforce if you can't
> choose, which of them should be used?
>
> We can't really turn off both of them, and if we really want performance
> and no checks, we would want to turn
> Am 25.03.2011 07:08, schrieb Kagamin:
> > Jonathan M Davis Wrote:
> >> I wouldn't think that the GPL would be a problem for build tools. It
> >> (and LGPL) _is_ a problem for libraries, but you're not linking with
> >> tools or generally doing anything with their code. You're just using
> >> them
> On 24/03/2011 17:58, Trass3r wrote:
> >> Has this idea/project been assigned a mentor? I'd like to ask them and
> >> the list, what's the best thing for me to do right now to prepare for
> >> this?
> >
> > You could also have a look at http://dsource.org/projects/ddbi
> > This shows some past ef
It is indeed capable of doing that :) But it only does it if you force
it to (e.g. via enum z). With auto it will perform 2 opBinaryRight calls
at runtime.
Even when you compile with -O?
Yep.
It doesn't even seem to optimize away an unused variable:
void main()
{
auto z = 5.0 + 3*I;
}
Or
Hello,
since my previous thread title "GSOC 2011" was not so specific I created a
new one. Please refer to the previous posts.
I would like to know if this ANTLR idea could be useful or not for the
D community and if eventually somebody is interested to be my mentor.
Please feel free to discuss
On 3/25/2011 4:10 AM, Vladimir Panteleev wrote:
On Fri, 25 Mar 2011 13:05:39 +0200, Russel Winder wrote:
It appears that DMD barfs on files with - in the file name. Why?
Do you mean, why doesn't DMD try to work around the problem automatically (e.g.
by substituting/removing invalid character
On 25/03/2011 14:56, Piotr Szturmaj wrote:
To sum up, Phobos need some additional changes for database support,
mainly addition of Nullable.
For now, couldn't this just be included with the database module?
On 3/25/2011 8:14 AM, Trass3r wrote:
Units, I think.
auto dist = 1km;
sin(90deg);
One difficulty with the C++0x approach is that the operator"" needed to
implement it is a global function. Global functions work fine until you wind up
with two km functions with different purposes, and then thi
On Fri, 25 Mar 2011 12:54:46 -0400, Trass3r wrote:
Steven Schveighoffer Wrote:
Not only that, but it's compile-time, meaning there is no actual call to
some operator processor to generate the timestamp.
You forget CTFE ;)
CTFE is only used when you are defining a compile-time constant, o
On Fri, 25 Mar 2011 12:36:11 -0400, Trass3r wrote:
> Lars T. Kyllingstad Wrote:
>> enum I = Complex!float(0, 1);
>> auto z = 5.0 + 3*I;
>>
>> The compiler should be able to fold the sum into a single constant at
>> compile time.
>
> It is indeed capable of doing that :) But it only does it i
Steven Schveighoffer Wrote:
> Aside from the parsing issues, which I think would be minor, it's more of
> a problem with anyone and his mother is allowed to define literal types.
Yeah that's true.
> That is, someone could have 1fud and I'm not sure what the hell that
> means, so I have to go
Lars T. Kyllingstad Wrote:
> enum I = Complex!float(0, 1);
> auto z = 5.0 + 3*I;
>
> The compiler should be able to fold the sum into a single constant at
> compile time.
It is indeed capable of doing that :)
But it only does it if you force it to (e.g. via enum z).
With auto it will perform
On 2011-03-25 15:28, David Nadlinger wrote:
On 3/25/11 3:04 PM, Jacob Carlborg wrote:
Don't know if this will be any problem with the Thrift protocol,
specially since C++ is supported, but D has very limited runtime
reflection support making it unnecessary hard to implement serialization.
Thri
On Fri, 25 Mar 2011 11:46:08 -0400, Steven Schveighoffer wrote:
> On Fri, 25 Mar 2011 11:14:26 -0400, Trass3r wrote:
>> Steven Schveighoffer Wrote:
>>> Also, complex is the clear and obvious beneficiary
>> Yep, though I think complex literals would still better be handled by
>> the compiler specif
On Fri, 25 Mar 2011 11:14:26 -0400, Trass3r wrote:
Steven Schveighoffer Wrote:
What is the need for this? Just to replace complex(0, 5) with 5i? I
don't see the huge benefit.
I didn't claim it was of "huge" benefit. It's just some slight syntactic
sugar.
Furthermore I didn't mean to praise
On 3/25/11, Jonathan M Davis wrote:
> snip
Well, I was really referring to C client-code, not templated D library
code, maybe I should have made myself more clear on that :)
Generic code uses generic names, it makes the most sense there. So I
agree with everything you've said.
Am 25.03.2011 07:08, schrieb Kagamin:
Jonathan M Davis Wrote:
I wouldn't think that the GPL would be a problem for build tools. It (and
LGPL) _is_ a problem for libraries, but you're not linking with tools or
generally doing anything with their code. You're just using them.
Well, if Digital M
Steven Schveighoffer Wrote:
> What is the need for this? Just to replace complex(0, 5) with 5i? I
> don't see the huge benefit.
I didn't claim it was of "huge" benefit. It's just some slight syntactic sugar.
Furthermore I didn't mean to praise its usefulness. I was actually asking about
practi
> Complex!T opSuffix(U data) // whatever the name should be
Of course the suffix itself is missing:
Complex!T opSuffix!(string suffix="i")(U data)
Christian Manning wrote:
Hi,
I'm a second year student at De Montfort University studying Computer
Science. I am very much interested in working on the database API idea
that is proposed at
http://prowiki.org/wiki4d/wiki.cgi?GSOC_2011_Ideas#DatabaseAPI (I was
also quite interested in the containe
@ steve & Johannes: Yeah, it works for me now :). I informed the site owners
about
this and he has rectified it :)
@Denis:
>You are right, indeed. To say it shortly, ranges are D's version of iterators
>or
generators, especially powerful and general. With its own set of issues
(somewhat
>compl
On 3/25/2011 5:42 AM, Sönke Ludwig wrote:
Am 25.03.2011 10:33, schrieb Sönke Ludwig:
yadda-yadda
>
Apart from all this - I just want to make this a known problem, what you
(or maybe Andrei for std.concurrency) decide is up to you and I'm fine
with any outcome for my personal stuff because I d
On 3/25/11 3:04 PM, Jacob Carlborg wrote:
Don't know if this will be any problem with the Thrift protocol,
specially since C++ is supported, but D has very limited runtime
reflection support making it unnecessary hard to implement serialization.
Thrift and other, similar projects (like Google's
Hello Robert,
thank you for taking the time to read my proposal.
On 3/25/11 5:48 AM, Robert Jacques wrote:
First and foremost, I would strongly recommend against looking at
Thrifts internals; if you do, the project _should not_ be submitted to
Phobos. (Thrift is Apache License 2.0 which isn't c
On 2011-03-25 00:46, David Nadlinger wrote:
Hi all,
I am putting together a Google Summer of Code project proposal regarding
the Apache Thrift idea (see the ideas page[1]), which I intend to
officially submit as soon as the application period opens. You can find
my first draft at http://klickver
On 24/03/2011 17:58, Trass3r wrote:
Has this idea/project been assigned a mentor? I'd like to ask them and
the list, what's the best thing for me to do right now to prepare for
this?
You could also have a look at http://dsource.org/projects/ddbi
This shows some past efforts to create database i
On Fri, 25 Mar 2011 09:32:12 -0400, Trass3r wrote:
Just came across C++0x user defined literals (via user defined
suffixes): http://en.wikipedia.org/wiki/C%2B%2B0x#User-defined_literals
They are implemented via something like:
std::complex operator "" i(double d) // cooked form, e.g. 15i
{
Just came across C++0x user defined literals (via user defined suffixes):
http://en.wikipedia.org/wiki/C%2B%2B0x#User-defined_literals
They are implemented via something like:
std::complex operator "" i(double d) // cooked form, e.g. 15i
{
return std::complex(0, d);
}
Another C++0x typical
On 03/25/2011 12:30 PM, Ishan Thilina wrote:
>> But I found another set of
>> implementations of data structures such as List from here (
>> http://www.dprogramming.com/list.php ). And the latter List doesn't
have the
same methods that are in std.container. Why is this?
dprogra
Don wrote:
Vladimir Panteleev wrote:
On Thu, 24 Mar 2011 20:54:56 +0200, Trass3r wrote:
I don't want to edit the ideas wiki page without getting another
opinion, so what about:
Me too - how about an image library? Being able to load/save popular
image formats from/to RGB pixel arrays would
Ishan Thilina wrote:
>>Understanding ranges first is probably a good idea.
>>This article from Andrei could be helpful:
>>http://www.informit.com/articles/article.aspx?p=1407357
>>
>>--
>>Johannes Pfau
>
>The link is not working :(
Strange, it works for me.
You could also go to Andreis homepage ht
On Fri, 25 Mar 2011 08:07:21 -0400, Ishan Thilina
wrote:
Understanding ranges first is probably a good idea.
This article from Andrei could be helpful:
http://www.informit.com/articles/article.aspx?p=1407357
--
Johannes Pfau
The link is not working :(
The link works for me.
Googling "On
On Thu, 24 Mar 2011 20:38:30 -0400, Graham St Jack
wrote:
On 25/03/11 06:09, Steven Schveighoffer wrote:
On Thu, 24 Mar 2011 00:17:03 -0400, Graham St Jack
wrote:
Regarding unit tests - I have never been a fan of putting unit test
code into the modules being tested because:
* Doing so
>Understanding ranges first is probably a good idea.
>This article from Andrei could be helpful:
>http://www.informit.com/articles/article.aspx?p=1407357
>
>--
>Johannes Pfau
The link is not working :(
On Thu, 24 Mar 2011 23:39:30 -0400, Andrew Wiley
wrote:
I would make the argument that once you started working with a D IDE
with enough features, you'd probably find yourself addicted to it as
you are with PHP and Netbeans. At least, that's been my experience
across just about every language
On Fri, 25 Mar 2011 07:27:10 -0400, Russel Winder
wrote:
On Fri, 2011-03-25 at 13:10 +0200, Vladimir Panteleev wrote:
On Fri, 25 Mar 2011 13:05:39 +0200, Russel Winder
wrote:
> It appears that DMD barfs on files with - in the file name. Why?
Do you mean, why doesn't DMD try to work aroun
On Fri, 25 Mar 2011 13:27:10 +0200, Russel Winder
wrote:
- is a perfectly valid character in a file name, well on Posix compliant
systems anyway. The question is why D, aping Java, imposes restrictions
when there is no need.
Lacking a module declaration as is your case, what would the
au
Ishan Thilina wrote:
>
>
>Ohh, Seems like that I have confused the things :s. Sorry for the
>mistake.
>
>I began to look at ranges, the concept is still new to me. I think
>I'll understand more about the implementation of std.container after
>getting used to ranges. Somebody please correct me if I'
On Fri, 25 Mar 2011 02:02:43 -0400, Kagamin wrote:
Steven Schveighoffer Wrote:
OEM copies are not transferrable, but those will only work on the
vendor's
BIOS key anyways. So they are "technically" transferrable to another
system with the same vendor, but I don't think the license official
>> But I found another set of
>> implementations of data structures such as List from here (
>> http://www.dprogramming.com/list.php ). And the latter List doesn't have
the
same methods that are in std.container. Why is this?
>dprogramming.com is the personal website of Christopher Mill
On Fri, 2011-03-25 at 13:10 +0200, Vladimir Panteleev wrote:
> On Fri, 25 Mar 2011 13:05:39 +0200, Russel Winder
> wrote:
>
> > It appears that DMD barfs on files with - in the file name. Why?
>
> Do you mean, why doesn't DMD try to work around the problem automatically
> (e.g. by substitut
On Fri, 25 Mar 2011 13:05:39 +0200, Russel Winder
wrote:
It appears that DMD barfs on files with - in the file name. Why?
Do you mean, why doesn't DMD try to work around the problem automatically
(e.g. by substituting/removing invalid characters in the module
identifier)? The error mes
Johannes Pfau wrote:
>Jonas Drewsen wrote:
>>Hi,
>>
>> So I've been working a bit on the etc.curl module. Currently most
>> of
>>the HTTP functionality is done and some very simple Ftp.
>>
>>I would very much like to know if this has a chance of getting in
>>phobos if I finish it with the curren
It appears that DMD barfs on files with - in the file name. Why?
--
Russel.
=
Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.win...@ekiga.net
41 Buckmaster Roadm: +44 7770 465 077 xmpp: rus...@russel.
On 25/03/2011 08:04, Kagamin wrote:
So, there really is no good answer.
- Jonathan M Davis
So why do you need to differentiate between assert and enforce if you can't
choose, which of them should be used?
We can't really turn off both of them, and if we really want performance and no
checks,
On Fri, 25 Mar 2011 12:12:08 +0200, Ishan Thilina
wrote:
But I found another set of
implementations of data structures such as List from here (
http://www.dprogramming.com/list.php ). And the latter List doesn't have
the same methods that are in std.container. Why is this?
dprogramming.co
Hi,
I'm the one who posted "Interested in a GSoC project idea-
http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=132495
" earlier. Before progressing any further I thought it's better to give a
brief introduction about me first( as most of the other f
Jonas Drewsen wrote:
>Hi,
>
> So I've been working a bit on the etc.curl module. Currently most
> of
>the HTTP functionality is done and some very simple Ftp.
>
>I would very much like to know if this has a chance of getting in
>phobos if I finish it with the current design. If not then it will
Am 25.03.2011 10:33, schrieb Sönke Ludwig:
yadda-yadda
>
Apart from all this - I just want to make this a known problem, what you
(or maybe Andrei for std.concurrency) decide is up to you and I'm fine
with any outcome for my personal stuff because I do not have such a
complex system apart fr
Am 25.03.2011 05:14, schrieb dsimcha:
On 3/24/2011 10:21 PM, Sönke Ludwig wrote:
Can you elaborate and/or provide an example of the "general" problem?
I'm not quite sure what you're getting at.
I have one very specific constellation that I can only sketch.. Suppose
you have some kind of compl
Am 25.03.2011 04:32, schrieb dsimcha:
On 3/24/2011 10:31 PM, Sönke Ludwig wrote:
Well what can I say.. things can become more complex and you cannot
always say this is parallelism and this is concurrency ore something.
It's just nice when the libary does not get in the way when you are in a
situ
piotrek wrote:
On Thu, 24 Mar 2011 16:04:25 +0100, Don wrote:
piotrek wrote:
On Thu, 24 Mar 2011 21:37:12 +0800, KennyTM~ wrote:
On Mar 24, 11 19:00, sclytrack wrote:
== Quote from piotrek (star...@tlen.pl)'s article
On Wed, 23 Mar 2011 23:17:32 +0100, Alvaro wrote:
D already has a long l
Vladimir Panteleev wrote:
On Thu, 24 Mar 2011 20:54:56 +0200, Trass3r wrote:
I don't want to edit the ideas wiki page without getting another
opinion, so what about:
Me too - how about an image library? Being able to load/save popular
image formats from/to RGB pixel arrays would be a great
>So, there really is no good answer.
>- Jonathan M Davis
So why do you need to differentiate between assert and enforce if you can't
choose, which of them should be used?
We can't really turn off both of them, and if we really want performance and no
checks, we would want to turn off both of th
:) When is "Modern D Design" going to be released ?
85 matches
Mail list logo