Jarrett Billingsley wrote:
On Fri, Aug 7, 2009 at 12:54 AM, Andrei
Alexandrescu wrote:
Jarrett Billingsley wrote:
On Thu, Aug 6, 2009 at 9:53 PM, Andrei
Alexandrescu wrote:
Jarrett Billingsley wrote:
On Thu, Aug 6, 2009 at 9:19 PM, Andrei
Alexandrescu wrote:
Kevin wrote:
Hi,
simple Question
On Thu, 06 Aug 2009 15:10:27 -0700, Jarrett Billingsley
wrote:
On Thu, Aug 6, 2009 at 6:02 PM, Robert Jacques wrote:
int a = 5 / 2; // compiler knows to use integer division
No, it doesn't. (i.e. Welcome to the limitations of a context-free
grammar)
The right hand of the expression has
On Fri, Aug 7, 2009 at 12:54 AM, Andrei
Alexandrescu wrote:
> Jarrett Billingsley wrote:
>>
>> On Thu, Aug 6, 2009 at 9:53 PM, Andrei
>> Alexandrescu wrote:
>>>
>>> Jarrett Billingsley wrote:
On Thu, Aug 6, 2009 at 9:19 PM, Andrei
Alexandrescu wrote:
>
> Kevin wrote:
>>
>
Jarrett Billingsley wrote:
On Thu, Aug 6, 2009 at 9:53 PM, Andrei
Alexandrescu wrote:
Jarrett Billingsley wrote:
On Thu, Aug 6, 2009 at 9:19 PM, Andrei
Alexandrescu wrote:
Kevin wrote:
Hi,
simple Question:
Is it possible to allow just numeric types in templates?
For example to create a Vector
I've written a new property article on Wiki4D. I've tried to gather
information about properties that has been scattered about in many news
group discussions and bring it all together in that one place.
http://prowiki.org/wiki4d/wiki.cgi?DocComments/Property
I hope this will help people become m
On Thu, Aug 6, 2009 at 9:53 PM, Andrei
Alexandrescu wrote:
> Jarrett Billingsley wrote:
>>
>> On Thu, Aug 6, 2009 at 9:19 PM, Andrei
>> Alexandrescu wrote:
>>>
>>> Kevin wrote:
Hi,
simple Question:
Is it possible to allow just numeric types in templates?
For example to crea
Andrei Alexandrescu Wrote:
> Jeremie Pelletier wrote:
> > Are there any plans to have global operator overloading in D?
> >
> > It would be terribly useful with ranges, since std.array already define
> > range primitives for arrays, I tried to implement array primitives to
> > ranges the same w
Jarrett Billingsley wrote:
On Thu, Aug 6, 2009 at 9:19 PM, Andrei
Alexandrescu wrote:
Kevin wrote:
Hi,
simple Question:
Is it possible to allow just numeric types in templates?
For example to create a Vector Class like this:
class Vector(T:"numeric" = float, int size = 4)
Thanks,
Kevin
impor
Jeremie Pelletier wrote:
Are there any plans to have global operator overloading in D?
It would be terribly useful with ranges, since std.array already define range
primitives for arrays, I tried to implement array primitives to ranges the same
way, ie:
---
bool opEquals(T, U)(T t, U, u) if(i
Are there any plans to have global operator overloading in D?
It would be terribly useful with ranges, since std.array already define range
primitives for arrays, I tried to implement array primitives to ranges the same
way, ie:
---
bool opEquals(T, U)(T t, U, u) if(isInputRange!T && isInputRan
On Thu, Aug 6, 2009 at 9:19 PM, Andrei
Alexandrescu wrote:
> Kevin wrote:
>>
>> Hi,
>> simple Question:
>> Is it possible to allow just numeric types in templates?
>> For example to create a Vector Class like this:
>>
>> class Vector(T:"numeric" = float, int size = 4)
>>
>> Thanks,
>> Kevin
>
> imp
Kevin wrote:
Hi,
simple Question:
Is it possible to allow just numeric types in templates?
For example to create a Vector Class like this:
class Vector(T:"numeric" = float, int size = 4)
Thanks,
Kevin
import std.traits;
class Vector(T, int size = 4) if (isNumeric!T)
{
...
}
Andrei
Hi,
simple Question:
Is it possible to allow just numeric types in templates?
For example to create a Vector Class like this:
class Vector(T:"numeric" = float, int size = 4)
Thanks,
Kevin
Paul D. Anderson Wrote:
> I was browsing the Python spec yesterday and came across this interesting and
> useful syntax:
>
> "/" (one slash) means floating point division, e.g. 5/2 = 2.5 even though 5
> and 2 are integers
>
> "//" (two slashes) means integer (floor) division, e.g. 5.0//2.0 = 2
Thu, 06 Aug 2009 18:08:00 -0400, Chad J wrote:
> [snip]
>
> The jist is that you have some value type like a Matrix or BigInt that
> might actually have memory allocated to it. It is a value type though,
> so whenever it is copied, any memory allocated to it needs to also be
> copied and new mem
On Thu, Aug 6, 2009 at 6:02 PM, Robert Jacques wrote:
>> int a = 5 / 2; // compiler knows to use integer division
>
> No, it doesn't. (i.e. Welcome to the limitations of a context-free grammar)
> The right hand of the expression has to be evaluated before the left, or
> otherwise function overload
On Thu, 06 Aug 2009 15:06:49 -0400, Paul D. Anderson wrote:
> I was browsing the Python spec yesterday and came across this
> interesting and useful syntax:
>
> "/" (one slash) means floating point division, e.g. 5/2 = 2.5 even
> though 5 and 2 are integers
>
> "//" (two slashes) means integer (
So I dug up Andrei's thread that mentioned something about properties
that hasn't been discussed as of recent: expensive copy semantics.
The thread is here:
http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=82621
The jist is that you have some value type like a
On Thu, 06 Aug 2009 13:34:21 -0700, Yigal Chripun
wrote:
Ary Borenszweig wrote:
Adam D. Ruppe wrote:
On Thu, Aug 06, 2009 at 03:06:49PM -0400, Paul D. Anderson wrote:
Oh wait...I think "//" is used elsewhere.
Is this a joke?
No. When porting C, C++, Java or C# code just search "//" and
In fact final switch can be an improved computed GOTO :)
Same for me, it breaks compatibility with C.
Also, i found the ocaml floating point operators (./ .+ .- .*) painful when
i had to use them.
Tim M Wrote:
> I think Andrei has mostly worked out the fundamentals of ranges and it
> is probably done by treating exisiting views as immutable.
>
> To conclude it works if you can guarantee that you can have all views
> remain valid after any changes to the data block they point too as they
>
Adam D. Ruppe Wrote:
> On Thu, Aug 06, 2009 at 04:48:40PM -0400, Paul D. Anderson wrote:
> > Two words: "whoosh!"
> >
> I have a hard enough time telling if someone is serious or not in real life;
> it is even harder in plain text :S
>
> --
> Adam D. Ruppe
> http://arsdnet.net
Sorry -- I'd
Thu, 06 Aug 2009 17:06:40 -0300, Ary Borenszweig thusly wrote:
> Of course I think using "//" for something else is a disaster.
The -- token may look too functional to many of us. I am pretty sure that
a great deal of D users would choose a buggy, badly optimizing compiler
and an incomplete spe
Robert Fraser Wrote:
> Paul D. Anderson wrote:
> > I was browsing the Python spec yesterday and came across this interesting
> > and useful syntax:
> >
> > "/" (one slash) means floating point division, e.g. 5/2 = 2.5 even though 5
> > and 2 are integers
> >
> > "//" (two slashes) means intege
Fri, 07 Aug 2009 04:46:37 +1000, Daniel Keep thusly wrote:
> Search: (o) the whole site (o) D1 (o) D1 (spec) (o) D1 (phobos) (o) D2
> (o) D2 (spec) (o) D2 (phobos) (o) Newsgroups (o) Newsgroups (D-only) (o)
> Newsgroups (D-only, but not including D.bugs) (o) Pages that include
> changes between D1
On Thu, Aug 06, 2009 at 04:48:40PM -0400, Paul D. Anderson wrote:
> Two words: "whoosh!"
>
I have a hard enough time telling if someone is serious or not in real life;
it is even harder in plain text :S
--
Adam D. Ruppe
http://arsdnet.net
Adam D. Ruppe Wrote:
> On Thu, Aug 06, 2009 at 04:35:41PM -0300, Ary Borenszweig wrote:
> > No. When porting C, C++, Java or C# code just search "//" and replace it
> > with "--".
>
> Problem with this is old habit. I find myself annoyed with languages that
> don't accept // comments just becaus
Ary Borenszweig wrote:
Adam D. Ruppe wrote:
On Thu, Aug 06, 2009 at 03:06:49PM -0400, Paul D. Anderson wrote:
Oh wait...I think "//" is used elsewhere.
Is this a joke?
No. When porting C, C++, Java or C# code just search "//" and replace it
with "--".
Oh wait... I think "--" is used else
Paul D. Anderson wrote:
I was browsing the Python spec yesterday and came across this interesting and
useful syntax:
"/" (one slash) means floating point division, e.g. 5/2 = 2.5 even though 5 and
2 are integers
"//" (two slashes) means integer (floor) division, e.g. 5.0//2.0 = 2.0 even
thou
Adam D. Ruppe wrote:
On Thu, Aug 06, 2009 at 04:35:41PM -0300, Ary Borenszweig wrote:
No. When porting C, C++, Java or C# code just search "//" and replace it
with "--".
Problem with this is old habit. I find myself annoyed with languages that
don't accept // comments just because I'm so used
On Thu, Aug 6, 2009 at 3:06 PM, Paul D.
Anderson wrote:
> I was browsing the Python spec yesterday and came across this interesting and
> useful syntax:
>
> "/" (one slash) means floating point division, e.g. 5/2 = 2.5 even though 5
> and 2 are integers
>
> "//" (two slashes) means integer (floor
On Thu, Aug 06, 2009 at 04:35:41PM -0300, Ary Borenszweig wrote:
> No. When porting C, C++, Java or C# code just search "//" and replace it
> with "--".
Problem with this is old habit. I find myself annoyed with languages that
don't accept // comments just because I'm so used to typing them that
Adam D. Ruppe wrote:
On Thu, Aug 06, 2009 at 03:06:49PM -0400, Paul D. Anderson wrote:
Oh wait...I think "//" is used elsewhere.
Is this a joke?
No. When porting C, C++, Java or C# code just search "//" and replace it
with "--".
Oh wait... I think "--" is used elsewhere.
Paul D. Anderson wrote:
> I was browsing the Python spec yesterday and came across this interesting
> and useful syntax:
>
> "/" (one slash) means floating point division, e.g. 5/2 = 2.5 even though
> 5 and 2 are integers
>
> "//" (two slashes) means integer (floor) division, e.g. 5.0//2.0 = 2.0
Paul D. Anderson:
> Oh wait...I think "//" is used elsewhere. Well, we could still use it but
> mark it as a breaking change. Then users could simply remove all previous
> uses of "//" from their code. If they REALLY need to retain the old "//"
> functionality we could replace it with a new symb
On Thu, Aug 06, 2009 at 03:06:49PM -0400, Paul D. Anderson wrote:
> Oh wait...I think "//" is used elsewhere.
Is this a joke?
--
Adam D. Ruppe
http://arsdnet.net
I was browsing the Python spec yesterday and came across this interesting and
useful syntax:
"/" (one slash) means floating point division, e.g. 5/2 = 2.5 even though 5 and
2 are integers
"//" (two slashes) means integer (floor) division, e.g. 5.0//2.0 = 2.0 even
though 5.0 and 2.0 are floats.
Andrei Alexandrescu wrote:
> Ary Borenszweig wrote:
>> ...
>>
>> That's great. :)
>>
>> Now it would be greater to put a radio button below the search box:
>>
>> Search: (o) the whole site (o) the spec
>>
>> or something like that, because it's really, really useful.
>
> Search: (o) the whole s
Walter Bright wrote:
I just tried it. I only get results from urls that start with
http://www.digitalmars.com/d/2.0
Here is the google search url it generated:
http://www.google.com/search?q=pure+functions&domains=www.digitalmars.com&sitesearch=www.digitalmars.com%2Fd%2F2.0&sourceid=google-sea
Ary Borenszweig wrote:
Sorry for brining this topic again, but there's something that really
worries me (not that I cannot sleep at night, but...)
Take this page:
http://www.digitalmars.com/d/2.0/function.html
There are some big headers there: "pure functions", "nothrow functions",
"ref fun
Walter Bright Wrote:
> All releases are sent to Lars before going out so the Tango team can let
> me know if I broke something. I haven't heard any word that it has.
I did however send word that I didn't have time to test it this time around :)
Ary Borenszweig wrote:
Daniel Keep escribió:
Chad J wrote:
Walter Bright wrote:
Ary Borenszweig wrote:
Strange: now my previous searches work (well, most of them). What
could have happened?
Sometimes google gives erratic behavior if part of their farm goes
down.
Any chance we can get a sear
For the low-level programmer, sometimes you must use switch because virtual
functions are more expensive (cache usage...) and pointers to functions too.
The problem is that even if the optimizer turn the switch into a jump-table, it
has generally no clue about whether the value will be in the ri
On Thu, 06 Aug 2009 04:13:07 -0400
HOSOKAWA Kenchi wrote:
> Hello,
>
>
> D's array slicing is basically "an array means to specify a subarray
> of it.
Static arrays are the same as in C but I prefer to think of dynamic
arrays as a handy GC'd block of memory that comes with a free view and
any
On Thu, Aug 6, 2009 at 6:07 AM, Jarrett
Billingsley wrote:
> On Thu, Aug 6, 2009 at 9:04 AM, Bill Baxter wrote:
>> On Wed, Aug 5, 2009 at 9:52 PM, Nick Sabalausky wrote:
>>> "Bill Baxter" wrote in message
>>> news:mailman.291.1249531861.14071.digitalmar...@puremagic.com...
I just tried to upgr
On Thu, Aug 6, 2009 at 9:04 AM, Bill Baxter wrote:
> On Wed, Aug 5, 2009 at 9:52 PM, Nick Sabalausky wrote:
>> "Bill Baxter" wrote in message
>> news:mailman.291.1249531861.14071.digitalmar...@puremagic.com...
>>>I just tried to upgrade my DMD from 1.041 to 1.046 and things aren't
>>> working so w
On Thu, Aug 6, 2009 at 1:46 AM, Walter Bright wrote:
> All releases are sent to Lars before going out so the Tango team can let me
> know if I broke something. I haven't heard any word that it has.
>
I'm kind of surprised that
http://d.puremagic.com/issues/show_bug.cgi?id=3167 wasn't caught then.
On Wed, Aug 5, 2009 at 9:52 PM, Nick Sabalausky wrote:
> "Bill Baxter" wrote in message
> news:mailman.291.1249531861.14071.digitalmar...@puremagic.com...
>>I just tried to upgrade my DMD from 1.041 to 1.046 and things aren't
>> working so well.
>> I see Tango is still based off 1.041 too. So hav
Daniel Keep escribió:
Chad J wrote:
Walter Bright wrote:
Ary Borenszweig wrote:
Strange: now my previous searches work (well, most of them). What
could have happened?
Sometimes google gives erratic behavior if part of their farm goes down.
Any chance we can get a search that /only/ searches
Jeremie Pelletier Wrote:
> Sjoerd van Leent Wrote:
>
> > OK, to make matters worse.
> >
> > As I was reading so many things about properties, keywords and a bunch of
> > other interesting things, perhaps triggers.
> >
> > Triggers are, in my opinion, functions that act as delegates, and are
>
Hello,
D's array slicing is basically "an array means to specify a subarray of it. An
array slice does not copy the data, it is only another reference to it."
This definition, however, is easily violated by instance reallocation such as
changing its length:
int[] a = [0, 1, 2];
int[] b = a[0..
52 matches
Mail list logo