Gour wrote:
On Sat, 13 Nov 2010 12:24:58 +0100
Jérôme == jeber...@free.fr wrote:
Jérôme 3. Git is not a VCS so much as a PMS (Patch Management
Jérôme System).The difference is in the way each views history: for a
Jérôme VCS, history is important in and of itself, whereas for a PMS
Jérôme
jfd wrote:
== Quote from Adam D. Ruppe (destructiona...@gmail.com)'s article
The problem with BSD/GPL code in the main Phobos is any D program will link
with
it, and thus the license goes viral to all D programs.
But since this is just interface files, separate from the stdlib aside from
On 11/14/2010 00:09, Walter Bright wrote:
I suspect that trying to guess what modules should be added to the
linker list may cause far more confusion than enlightenment when it goes
awry. Currently, a lot of people seem to regard what a linker does as
magic. Making it more magical won't help.
Stewart Gordon wrote:
On 12/11/2010 09:53, Andrei Alexandrescu wrote:
snip
Well put me on board then. Walter, please don't forget to tweak the
associativity rules: var ~ literal ~ literal concatenates
literals first.
You mean make ~ right-associative? I think this'll break more code
Dmitry, you are a hero, thanks muchly :-))
On Sun, 2010-11-14 at 02:37 +0300, Dmitry Olshansky wrote:
[ . . . ]
shared Object sumMutex ;
Ah, another guess - you didn't initialize that sumMutex ?
Then put this somewhere before using it:
sumMutex = new shared(Object);
I managed to
Rainer Deyke wrote:
On 11/14/2010 00:09, Walter Bright wrote:
I suspect that trying to guess what modules should be added to the
linker list may cause far more confusion than enlightenment when it goes
awry. Currently, a lot of people seem to regard what a linker does as
magic. Making it more
There is one question on SO which seems like a serious problem for atomic
ops.
http://stackoverflow.com/questions/4165149/compiler-optimization-breaks-
multi-threaded-code
in short:
shared uint cnt;
void atomicInc ( ) { uint o; while ( !cas( cnt, o, o + 1 ) ) o = cnt; }
is compiled with dmd
That is, there are plenty of cases where template code may or may not be able
to
pure or nothrow and that whether it can or not depends on what it's templatized
on. For instance, if you had a range which iterated over a range of characters
in some manner (other than simply iterating over it as
On 14-nov-10, at 02:44, Fawzi Mohamed wrote:
[...]
Sometime the problem you have is not so costly that you need to
commit all resources to it, you just want to solve it efficiently
and if possible taking advantage of the parallelization.
In this case a good model is the actor model where
On 14.11.2010 7:47, Jonathan M Davis wrote:
On Thursday 11 November 2010 13:42:37 Dmitry Olshansky wrote:
I'm afraid that I don't really get what you're trying to do here. A range
needs to be created from an interval. It really wouldn't make sense to
do it otherwise. And when you create a
On Sunday 14 November 2010 02:31:00 Dmitry Olshansky wrote:
On 14.11.2010 7:47, Jonathan M Davis wrote:
So bi-directionality is one of places where generator-on-previous-date
approach is failing.
I see that with current API the user need to be aware which delegate use
when:
auto func =
I wonder if the following is just a misunderstanding on my part or an
indicator of an actual problem in D.
The code:
foreach ( i ; 0 .. numberOfThreads ) { threads[i] = new Thread ( ( ) {
partialSum ( 1 + i * sliceSize , ( i + 1 ) * sliceSize , delta ) ; } ) ; }
fails to the intended thing,
Jonathan M Davis:
The one problem I see is that if the compiler has to determine whether a given
function can be pure and/or nothrow, it's going to potentially have to go
arbitrarily deep into the call hierarchy to figure it out
This is already done for pure functions, const, immutable,
@optional_tag(isPure!F, pure) int[] map(F)(F f, int[] data) {
int[] res;
foreach (x; data)
res ~= f(x);
return res;
}
This may not suffice to correctly tell apart strong pure functions from weak
pure ones...
Bye,
bearophile
Leandro Lucarella l...@llucax.com.ar писал(а) в своём письме Sat, 13 Nov
2010 21:13:42 +0600:
retard, el 13 de noviembre a las 08:24 me escribiste:
void main(string[] args){
import std.stdio; // 1. will not compile void main(string[]
args){
writeln(hello);
}
...
bearophile wrote:
@optional_tag(isPure!F, pure) int[] map(F)(F f, int[] data) {
int[] res;
foreach (x; data)
res ~= f(x);
return res;
}
This may not suffice to correctly tell apart strong pure functions from weak
pure ones...
Untested:
J. M. Berger:
Untested:
Test it! I think it can't work.
Bye,
bearophile
On Sunday 14 November 2010 04:26:56 bearophile wrote:
Jonathan M Davis:
The one problem I see is that if the compiler has to determine whether a
given function can be pure and/or nothrow, it's going to potentially have
to go arbitrarily deep into the call hierarchy to figure it out
This is
On 2010-11-13 17:43, Adam D. Ruppe wrote:
I'm wondering, would be be a good idea to add some .di files to the standard
distribution, or easily accessible next to it, for some common third party C
libraries?
For example, I used import sdl.SDL in another thread yesterday to quickly port
a C toy,
On 2010-11-14 13:40, Alexander Malakhov wrote:
Even if there are technical issues, special case for unit tests sounds
like a good improvement of usability
Another thing that comes to mind about things not allowed in unittest
scope that could facilitate unit testing: defining templates.
--
On Sun, Nov 14, 2010 at 10:56, Jonathan M Davis jmdavisp...@gmx.com wrote:
Does anyone have some good suggestions on how to solve this issue?
IIRC, I posted something related to this 2-3 months ago, though I
don't know if that was a real solution. That was for pure only, but
that could be
== Quote from Jonathan M Davis (jmdavisp...@gmx.com)'s article
[snip]
We really need to add a way to have a function marked as nothrow and/or pure
based on whether the functions that it calls are nothrow and/or pure. Whether
that should require listing the functions that need to be pure and/or
Michal Minich Wrote:
There is one question on SO which seems like a serious problem for atomic
ops.
http://stackoverflow.com/questions/4165149/compiler-optimization-breaks-
multi-threaded-code
in short:
shared uint cnt;
void atomicInc ( ) { uint o; while ( !cas( cnt, o, o + 1 ) ) o
Would it be theoretically possible to use string mixins, CTFE, and
import expressions (using the -J switch) to write a function
cHeaderInclude such that it may be used like:
mixin( cHeaderInclude( import( someheader.h ) ) );
I'm imagining that the cHeaderInclude function would parse the C
Hello Peter,
Would it be theoretically possible to use string mixins, CTFE, and
import expressions (using the -J switch) to write a function
cHeaderInclude such that it may be used like:
mixin( cHeaderInclude( import( someheader.h ) ) );
I'm imagining that the cHeaderInclude function would
spir denis.s...@gmail.com писал(а) в своём письме Sat, 13 Nov 2010
16:15:39 +0600:
On Fri, 12 Nov 2010 14:42:38 -0500
sybrandy sybra...@gmail.com wrote:
2. Make Windows to open .d files with rdmd by default, so I could run
them with simple double-click
Yes. Maybe Alexander meant this
Hello,
I think the compiler should complain when sub-classes hold fields with the same
name as super-classes. After all, names (in addition to types) are used to
identify. Intentionally reusing the same name would not only be bad design, but
open the door to hidden bugs.
Remain unintentional
spir wrote:
Hello,
I think the compiler should complain when sub-classes hold fields with the same
name as super-classes. After all, names (in addition to types) are used to
identify. Intentionally reusing the same name would not only be bad design, but
open the door to hidden bugs.
Remain
spir:
I think the compiler should complain when sub-classes hold fields with the
same name as super-classes.
I have a bug report on it:
http://d.puremagic.com/issues/show_bug.cgi?id=5187
C# faces this problem with the new keyword that's denotes a field that the
programmer wants to hide:
On Sun, 14 Nov 2010 22:09:59 +0300
Stanislav Blinov stanislav.bli...@gmail.com wrote:
spir wrote:
Hello,
I think the compiler should complain when sub-classes hold fields with the
same name as super-classes. After all, names (in addition to types) are
used to identify.
Stanislav Blinov schrieb:
spir wrote:
Hello,
I think the compiler should complain when sub-classes hold fields with
the same name as super-classes. After all, names (in addition to
types) are used to identify. Intentionally reusing the same name would
not only be bad design, but open the
On Sun, 14 Nov 2010 14:22:56 -0500
bearophile bearophileh...@lycos.com wrote:
spir:
I think the compiler should complain when sub-classes hold fields with the
same name as super-classes.
I have a bug report on it:
http://d.puremagic.com/issues/show_bug.cgi?id=5187
You have bug
spir:
What are use cases for this? (And wouldn't it be better practice to change
name even in supposed sensible cases?)
I don't know. C# shows a warning if an attribute is masked by another one. Then
I think they have added that new syntax as a clean way to silence that
warning. (I am not
On Sunday 14 November 2010 07:07:11 Philippe Sigaud wrote:
On Sun, Nov 14, 2010 at 10:56, Jonathan M Davis jmdavisp...@gmx.com wrote:
Does anyone have some good suggestions on how to solve this issue?
IIRC, I posted something related to this 2-3 months ago, though I
don't know if that was a
On Sunday 14 November 2010 07:18:24 Tomasz Sowi#324;ski wrote:
== Quote from Jonathan M Davis (jmdavisp...@gmx.com)'s article
[snip]
We really need to add a way to have a function marked as nothrow and/or
pure based on whether the functions that it calls are nothrow and/or
pure. Whether
On Sunday 14 November 2010 04:26:56 bearophile wrote:
Jonathan M Davis:
The one problem I see is that if the compiler has to determine whether a
given function can be pure and/or nothrow, it's going to potentially have
to go arbitrarily deep into the call hierarchy to figure it out
This is
On Sunday 14 November 2010 11:29:55 spir wrote:
On Sun, 14 Nov 2010 22:09:59 +0300
Stanislav Blinov stanislav.bli...@gmail.com wrote:
This issue has been brought up several times before. I myself see no
harm in this shadowing, though making a compiler issue a warning
when shadowing
Jonathan M Davis:
So, checking the purity of a single function isn't going to do it (which
appears to
be what your @optional_tag is doing).
The first argument of @optional_tag is a compile-time boolean, so you may test
all the functions you want (this reminds me Java checked exceptions a
Stanislav Blinov wrote:
The other option that comes to mind is
... support protocols for variables in non-release mode.
-manfred
Russel Winder rus...@russel.org.uk wrote in message
news:mailman.349.1289736653.21107.digitalmar...@puremagic.com...
Some time ago in phobos2, the following:
RegExp wsr = RegExp((\\s+));
int p = wsr.find(thingie att1=\whatever\);
writefln(%s|%s|%s %d,wsr.pre(), wsr.match(1), wsr.post(), p);
would print:
thingie| |att1=whatever 7
Now it prints
thingie| |att1=whatever 1
The new return value is
On Sun, 14 Nov 2010 10:35:42 +0100
spir denis.s...@gmail.com wrote:
I finally found the bit where it describes associative array literals
and they look identical to initialising a flat array, so god only knows
which one gets picked when. It would be better if they where made
different.
Is there a way to get use constructors with traits functions that take a
function? For instance, functionAttributes!(func) takes a func and tells you
whether it's pure, nothrow, etc. However, giving it the type doesn't work (i.e.
functionAttributes!T), and giving it this doesn't work (i.e.
On 2010-11-11 17:21, Steven Schveighoffer wrote:
First, you can't forward-declare classes in one file that are defined in
another file, instead of importing. The reason is because in D, the
module is the namespace that the class is declared in.
So for instance, when you define IStudent in
Hello,
There seems to be 2 main differences between structs classes:
1. structs instances are direct values, implement value semantics; while class
instances are referenced (actually pointed)
2. classes can be subtyped/subclassed in a simple way; structs cannot be really
subtyped -- but there
On 12/11/2010 16:19, Michal Minich wrote:
V Fri, 12 Nov 2010 16:14:30 +0100, Carlo wrote:
Sorry if I bother you again with this probably silly problem. Here is
the point. I want to call the D function fun from a .c file:
\\file libforc.d
extern (C) int fun(int x,int y){
return x;
}
On Sunday 14 November 2010 03:08:49 spir wrote:
Hello,
There seems to be 2 main differences between structs classes:
1. structs instances are direct values, implement value semantics; while
class instances are referenced (actually pointed) 2. classes can be
subtyped/subclassed in a
Hello,
Is there a way to check the runtime type of an element? Meaning, for instance,
process differently according to the actual type in a hierarchy?
class C {}
class C1 : C {int i;}
bool checkTypeC1 (C c) {
return is(typeof(c) == C1);
}
void main () {
C1 c1 = new C1();
spir:
a value makes no sense by itself, it is bound to what it describes an aspect
of; referencing a value is meaningless, only copy makes no sense. For
instance, the position color of a visual form should be values.
Structs may have a meaning by themselves, all kind of member functions,
On 14/11/2010 11:08, spir wrote:
Hello,
There seems to be 2 main differences between structs classes:
1. structs instances are direct values, implement value semantics;
while class instances are referenced (actually pointed)
2. classes can be subtyped/subclassed in a simple way; structs
On Sunday 14 November 2010 03:45:12 spir wrote:
Hello,
Is there a way to check the runtime type of an element? Meaning, for
instance, process differently according to the actual type in a hierarchy?
class C {}
class C1 : C {int i;}
bool checkTypeC1 (C c) {
return is(typeof(c) ==
On Sun, 14 Nov 2010 03:32:18 -0800
Jonathan M Davis jmdavisp...@gmx.com wrote:
On Sunday 14 November 2010 03:08:49 spir wrote:
Hello,
There seems to be 2 main differences between structs classes:
1. structs instances are direct values, implement value semantics; while
class
spir:
Only partial answers, other answers left to other people.
Is there a way to check the runtime type of an element? Meaning, for
instance, process differently according to the actual type in a hierarchy?
You may use a cast(). If it return null then it's not castable.
Also, I would
On Sun, 14 Nov 2010 12:02:35 +
div0 d...@sourceforge.net wrote:
Both of these points may conflict with semantic considerations above:
we may want to use structs for fast creation, but if ever they mean
things, we must think at referencing them manually and/or using
ref parameters.
On Sun, 14 Nov 2010 04:09:22 -0800
Jonathan M Davis jmdavisp...@gmx.com wrote:
If you are dealing with a class hierarchy and you want to know whether a base
class reference referes to a particular derived class object, I believe that
the
correct way to do it is cast it to the derived type
On Sunday 14 November 2010 04:14:29 spir wrote:
On Sun, 14 Nov 2010 03:32:18 -0800
Jonathan M Davis jmdavisp...@gmx.com wrote:
On Sunday 14 November 2010 03:08:49 spir wrote:
Hello,
There seems to be 2 main differences between structs classes:
1. structs instances are
On 2010-11-13 18:27, div0 wrote:
On 13/11/2010 15:49, Jacob Carlborg wrote:
On 2010-11-13 14:56, div0 wrote:
On 13/11/2010 11:02, Jacob Carlborg wrote:
On 2010-11-12 17:44, Ellery Newcomer wrote:
Should be. Are you having problems?
(I don't use them much, but fwiw, it seems like tango had
spir wrote:
On Sun, 14 Nov 2010 12:02:35 +
div0 d...@sourceforge.net wrote:
Both of these points may conflict with semantic considerations above:
we may want to use structs for fast creation, but if ever they mean
things, we must think at referencing them manually and/or using
On Sun, Nov 14, 2010 at 11:16, Jonathan M Davis jmdavisp...@gmx.com wrote:
Is there a way to get use constructors with traits functions that take a
function? For instance, functionAttributes!(func) takes a func and tells you
whether it's pure, nothrow, etc. However, giving it the type doesn't
Hello Jonathan,
On Sunday 14 November 2010 03:45:12 spir wrote:
Hello,
Is there a way to check the runtime type of an element? Meaning, for
instance, process differently according to the actual type in a
hierarchy?
class C {}
class C1 : C {int i;}
bool checkTypeC1 (C c) {
return
Hello bearophile,
In a not-ranged cases body, like in the program below (that doesn't
compile), the switch variable is a compile-time constant, so why
doesn't the compile see x as constant there?
template Foo(uint x) {
static if (x = 1)
enum Foo = 1;
else
enum Foo = x * Foo!(x - 1);
}
int
Hi
I copied a module because I am changing its form. The original is still
in the build but is a different package and class name. The closest
thing I can think it might be talking about is this line:
x_points[] =
I experience the exact same problem on Windows 7 64-bit.
import std.stdio;
int main() {
char[] buf;
while (stdin.readln(buf))
write(buf);
return 0;
}
If compiled as test.exe, running the following command:
echo test line 1 | test
Produces the following result:
On 11/12/2010 02:03 PM, Steven Schveighoffer wrote:
Pelle, I spent all this time helping him, and you swoop in with the
answer :)
I was in a rush when answering, causing the swoopiness of my post. :-)
I only knew the answer because I had almost exactly the same bug a week
ago, or so.
On Sunday 14 November 2010 07:13:43 Philippe Sigaud wrote:
On Sun, Nov 14, 2010 at 11:16, Jonathan M Davis jmdavisp...@gmx.com wrote:
Is there a way to get use constructors with traits functions that take a
function? For instance, functionAttributes!(func) takes a func and tells
you whether
http://d.puremagic.com/issues/show_bug.cgi?id=3827
--- Comment #16 from Don clugd...@yahoo.com.au 2010-11-13 23:58:35 PST ---
Sorry, missed out a line:
if (e1-op == TOKcat (e2-op == TOKstring || e2-op == TOKnull)
(((CatExp *)e1)-e2-op == TOKstring || ((CatExp *)e1)-e2-op
==
http://d.puremagic.com/issues/show_bug.cgi?id=5164
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
Status|NEW |RESOLVED
There is one question on SO which seems like a serious problem for atomic
ops.
http://stackoverflow.com/questions/4165149/compiler-optimization-breaks-
multi-threaded-code
in short:
shared uint cnt;
void atomicInc ( ) { uint o; while ( !cas( cnt, o, o + 1 ) ) o = cnt; }
is compile with dmd
On Sunday 14 November 2010 01:04:46 Michal Minich wrote:
There is one question on SO which seems like a serious problem for atomic
ops.
http://stackoverflow.com/questions/4165149/compiler-optimization-breaks-
multi-threaded-code
in short:
shared uint cnt;
void atomicInc ( ) { uint o;
http://d.puremagic.com/issues/show_bug.cgi?id=3516
Max Samukha samu...@voliacable.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=5216
Summary: /+ parsed incorrectly in comments
Product: D
Version: unspecified
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
http://d.puremagic.com/issues/show_bug.cgi?id=4712
SHOO zan77...@nifty.com changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|
http://d.puremagic.com/issues/show_bug.cgi?id=5195
Walter Bright bugzi...@digitalmars.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=5125
--- Comment #2 from bearophile_h...@eml.cc 2010-11-14 11:27:06 PST ---
Another idea:
http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.Darticle_id=122087
--
Configure issuemail:
http://d.puremagic.com/issues/show_bug.cgi?id=5217
Jonathan M Davis jmdavisp...@gmx.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=3463
--- Comment #81 from nfx...@gmail.com 2010-11-14 18:06:05 PST ---
I obsoleted all the patches because they were outdated (too old dmd/Tango
versions). I don't think it's very efficient to make new patches and post them
here (I mean, there are
http://d.puremagic.com/issues/show_bug.cgi?id=3463
--- Comment #82 from Leandro Lucarella llu...@gmail.com 2010-11-14 19:17:59
PST ---
Maybe you should try with LDC's or GDC's issues trackers, as this is an
implementation detail maybe it gets better reception there (but it would be
hard to get
http://d.puremagic.com/issues/show_bug.cgi?id=4445
Shin Fujishiro rsi...@gmail.com changed:
What|Removed |Added
Status|NEW |ASSIGNED
http://d.puremagic.com/issues/show_bug.cgi?id=5154
Shin Fujishiro rsi...@gmail.com changed:
What|Removed |Added
Status|NEW |ASSIGNED
http://d.puremagic.com/issues/show_bug.cgi?id=5133
Shin Fujishiro rsi...@gmail.com changed:
What|Removed |Added
Status|NEW |ASSIGNED
80 matches
Mail list logo