Re: trusted purity?

2013-04-29 Thread monarch_dodra
On Monday, 29 April 2013 at 20:51:50 UTC, Walter Bright wrote: On 4/29/2013 1:03 PM, monarch_dodra wrote: On Monday, 29 April 2013 at 18:34:46 UTC, Walter Bright wrote: On 4/29/2013 10:19 AM, monarch_dodra wrote: I'm getting strange behavior trying to cast to pure. This is my test program:

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread Manu
I'm a jetlagged zombie to be sure, but I can't go to bed yet, or I won't defeat it! I'm basically sitting here waiting for a plan to happen and ideally drink beer. See you in half an hour then! :) On 29 April 2013 19:10, Ali Çehreli wrote: > On 04/29/2013 06:36 PM, David Nadlinger wrote: > > >

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread David Nadlinger
On Tuesday, 30 April 2013 at 02:10:47 UTC, Ali Çehreli wrote: David, give me a call or an email; I don't know your place. Done!

Re: trusted purity?

2013-04-29 Thread Kenji Hara
Hmm. Interesting approach. I tried to utilize the "trusted pure" concept . template TrustedPure(alias func) { import std.traits, std.algorithm; alias F1 = FunctionTypeOf!(func); static if (functionAttributes!F1 & FunctionAttribute.pure_) { alias TrustedPure = func; }

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread Ali Çehreli
On 04/29/2013 06:36 PM, David Nadlinger wrote: > My hotel is a few blocks from the Palo Alto Caltrain station, > and everything reachable by bike/public transport (in a > reasonable amount of time) would be fine for me. So hard to make a plan! :) I am driving towards Palo Alto in half an hour.

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread Ali Çehreli
On 04/29/2013 06:13 PM, David Nadlinger wrote: On Monday, 29 April 2013 at 23:31:06 UTC, Ali Çehreli wrote: We can start the coolness by going to Manu's ACCU talk tomorrow in Mountain View: :) http://www.meetup.com/SFBay-Association-of-C-C-Users/events/115855342/ Sound like a plan – probably

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread Iain Buclaw
double post On 29 April 2013 18:57, Manu wrote: > Haha, how do you intend to have a cooler-than-the-aloft club meetup there, > when it's being presented by a cool aloft-er? ;) > On 29 Apr 2013 16:35, "Ali Çehreli" wrote: > >> On 04/29/2013 04:10 PM, Adam Wilson wrote: >> >> > *sigh* I'm not st

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread Iain Buclaw
double post On 29 April 2013 18:57, Manu wrote: > Haha, how do you intend to have a cooler-than-the-aloft club meetup there, > when it's being presented by a cool aloft-er? ;) > On 29 Apr 2013 16:35, "Ali Çehreli" wrote: > >> On 04/29/2013 04:10 PM, Adam Wilson wrote: >> >> > *sigh* I'm not st

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread Manu
Haha, how do you intend to have a cooler-than-the-aloft club meetup there, when it's being presented by a cool aloft-er? ;) On 29 Apr 2013 16:35, "Ali Çehreli" wrote: > On 04/29/2013 04:10 PM, Adam Wilson wrote: > > > *sigh* I'm not staying there either, but it does seem like all the cool > > kid

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread Manu
Haha, how do you intend to have a cooler-than-the-aloft club meetup there, when it's being presented by a cool aloft-er? ;) On 29 Apr 2013 16:35, "Ali Çehreli" wrote: > On 04/29/2013 04:10 PM, Adam Wilson wrote: > > > *sigh* I'm not staying there either, but it does seem like all the cool > > kid

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread David Nadlinger
On Tuesday, 30 April 2013 at 01:29:55 UTC, Iain Buclaw wrote: Where do you want to meet up? I'm probably the wrong person to make a suggestion. My hotel is a few blocks from the Palo Alto Caltrain station, and everything reachable by bike/public transport (in a reasonable amount of time) wou

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread Iain Buclaw
On 30 April 2013 00:13, David Nadlinger wrote: > On Monday, 29 April 2013 at 23:00:48 UTC, Walter Bright wrote: > >> On 4/29/2013 3:47 PM, David Nadlinger wrote: >> >>> On Monday, 29 April 2013 at 22:20:26 UTC, Walter Bright wrote: >>> On 4/29/2013 2:31 PM, Manu wrote: > Who else is

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread Tyro[17]
On 4/29/13 8:37 PM, Zach the Mystic wrote: On Monday, 29 April 2013 at 22:42:09 UTC, Tyro[17] wrote: Hi all, I'll be arriving tomorrow night. Will be in commuting from Redwood City if anyone needs a ride. Andrew Hi! I'm also staying in Redwood City. Mike Parker is too, and I'm in touch with h

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread David Nadlinger
On Monday, 29 April 2013 at 23:31:06 UTC, Ali Çehreli wrote: We can start the coolness by going to Manu's ACCU talk tomorrow in Mountain View: :) http://www.meetup.com/SFBay-Association-of-C-C-Users/events/115855342/ Sound like a plan – probably will be there, too. How many people usually

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread Adam Wilson
On Mon, 29 Apr 2013 16:31:03 -0700, Ali Çehreli wrote: On 04/29/2013 04:10 PM, Adam Wilson wrote: > *sigh* I'm not staying there either, but it does seem like all the cool > kids are. Well, we'll just have to start our own "Not Staying at Aloft > Club" for the cooler kids. :-D We can st

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread deadalnix
On Tuesday, 30 April 2013 at 00:50:43 UTC, Aldo Nunez wrote: On Monday, 29 April 2013 at 12:28:33 UTC, deadalnix wrote: Due to last minute issue, I find myself in an hotel in mountain view. 3km/2miles away from the caltrain, so I'll need someone to grab me if that is possible. I promise to be

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread Aldo Nunez
On Monday, 29 April 2013 at 12:28:33 UTC, deadalnix wrote: Due to last minute issue, I find myself in an hotel in mountain view. 3km/2miles away from the caltrain, so I'll need someone to grab me if that is possible. I promise to be good company on the road :D deadalnix, I can pick you up,

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread Zach the Mystic
On Monday, 29 April 2013 at 22:42:09 UTC, Tyro[17] wrote: Hi all, I'll be arriving tomorrow night. Will be in commuting from Redwood City if anyone needs a ride. Andrew Hi! I'm also staying in Redwood City. Mike Parker is too, and I'm in touch with him already. But my phone is five-one-oh t

Re: Formal Review of std.uni

2013-04-29 Thread Jonathan M Davis
On Tuesday, April 30, 2013 03:02:17 Dmitry Olshansky wrote: > 29-Apr-2013 22:50, Jonathan M Davis пишет: > > On Monday, April 29, 2013 22:13:09 Dmitry Olshansky wrote: > >> Technically these should be in std.string and are there but incorrect. > > > > Then fix them there. > > I think it will take

Re: std.variant holding bigger structs and std.concurrency message limitation

2013-04-29 Thread David Eagen
On Saturday, 27 April 2013 at 17:42:54 UTC, Idan Arye wrote: The way it works now, is that if the size is too big they use a reference instead: https://github.com/D-Programming-Language/phobos/blob/master/std/variant.d#L544#L555 So is the bug in std.concurrency and they way it uses Variant or

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread Ali Çehreli
On 04/29/2013 04:10 PM, Adam Wilson wrote: > *sigh* I'm not staying there either, but it does seem like all the cool > kids are. Well, we'll just have to start our own "Not Staying at Aloft > Club" for the cooler kids. :-D We can start the coolness by going to Manu's ACCU talk tomorrow in Mount

Re: Formal Review of std.uni

2013-04-29 Thread Dmitry Olshansky
30-Apr-2013 02:40, Walter Bright пишет: Looks nice. Cool, this means we are getting there ;) The glossary should be alphabetized. "combining class" is defined under combiningClass - should it be in the glossary instead? Good ideas. Linked combining class as everything else. -- Dmitry Ol

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread David Nadlinger
Sigh, careless typing on a mobile phone… Make that »I'm in touch with Ali, but nobody else responded so far – I guess you all just arrived today?« David

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread David Nadlinger
On Monday, 29 April 2013 at 23:00:48 UTC, Walter Bright wrote: On 4/29/2013 3:47 PM, David Nadlinger wrote: On Monday, 29 April 2013 at 22:20:26 UTC, Walter Bright wrote: On 4/29/2013 2:31 PM, Manu wrote: Who else is staying at the aloft? I'll be there late tonight. I'm starting to feel li

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread Adam Wilson
On Mon, 29 Apr 2013 15:47:46 -0700, David Nadlinger wrote: On Monday, 29 April 2013 at 22:20:26 UTC, Walter Bright wrote: On 4/29/2013 2:31 PM, Manu wrote: Who else is staying at the aloft? I'll be there late tonight. I'm starting to feel like am the only one _not_ staying there… ;) Da

Re: Formal Review of std.uni

2013-04-29 Thread Dmitry Olshansky
29-Apr-2013 22:50, Jonathan M Davis пишет: On Monday, April 29, 2013 22:13:09 Dmitry Olshansky wrote: Technically these should be in std.string and are there but incorrect. Then fix them there. I think it will take a certain amount of leaked implementation details to get it done at least h

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread Walter Bright
On 4/29/2013 3:47 PM, David Nadlinger wrote: On Monday, 29 April 2013 at 22:20:26 UTC, Walter Bright wrote: On 4/29/2013 2:31 PM, Manu wrote: Who else is staying at the aloft? I'll be there late tonight. I'm starting to feel like am the only one _not_ staying there… ;) You can still hang

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread David Nadlinger
On Monday, 29 April 2013 at 22:20:26 UTC, Walter Bright wrote: On 4/29/2013 2:31 PM, Manu wrote: Who else is staying at the aloft? I'll be there late tonight. I'm starting to feel like am the only one _not_ staying there… ;) David

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread Tyro[17]
On 3/24/13 5:32 PM, Andrei Alexandrescu wrote: Hello to all prospective DConf 2013 attendees! A few of you are interested in sharing options for rental cars, or to share hotel rooms and split the cost in half. Let this thread be the official tracker for such requests and offers. I'll also post

Re: Formal Review of std.uni

2013-04-29 Thread Walter Bright
Looks nice. The glossary should be alphabetized. "combining class" is defined under combiningClass - should it be in the glossary instead?

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread Walter Bright
On 4/29/2013 2:31 PM, Manu wrote: All good, I took the shuttle on Ali's advice. Cost $55. Much better than a taxi. By 'there' I was thinking anywhere in the area I guess (I presumed it would all be walking distance). Turns out the aloft is on the other side of the bay, and google maps was lying t

Re: Formal Review of std.uni

2013-04-29 Thread Brian Schott
I was working on a list of suggestions, but turned it into a pull request instead, as the list had gotten big enough to be inconvenient to go through manually. The pull focuses on improving some of the phrasing in the DDoc comments. https://github.com/blackwhale/gsoc-bench-2012/pull/2

Re: clear() causes crash?

2013-04-29 Thread Jonathan M Davis
On Monday, April 29, 2013 23:04:29 =?UTF-8?B?Ikx1w61z?=.Marques @puremagic.com wrote: > This crashes in the last line of main: > > class A > { > void foo() {} > } > > void main() > { > A a = new A(); > a.foo(); > clear(a); > assert(a !is null); > a.foo(); // crashes > } > > As far as I understa

Re: How to deal with systems where real == double

2013-04-29 Thread Walter Bright
real is defined to be the largest floating point type supported on the target machine, so if that's the same as double, then it's double (though still a distinct type to the D typing system).

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread Manu
All good, I took the shuttle on Ali's advice. Cost $55. Much better than a taxi. By 'there' I was thinking anywhere in the area I guess (I presumed it would all be walking distance). Turns out the aloft is on the other side of the bay, and google maps was lying to me ;) Who else is staying at the

clear() causes crash?

2013-04-29 Thread Luís.Marques
This crashes in the last line of main: class A { void foo() {} } void main() { A a = new A(); a.foo(); clear(a); assert(a !is null); a.foo(); // crashes } As far as I understand from TDPL book, this should not crash, but

Re: trusted purity?

2013-04-29 Thread Walter Bright
On 4/29/2013 1:03 PM, monarch_dodra wrote: On Monday, 29 April 2013 at 18:34:46 UTC, Walter Bright wrote: On 4/29/2013 10:19 AM, monarch_dodra wrote: I'm getting strange behavior trying to cast to pure. This is my test program: You're casting a C function to a D function. This will cause cras

Re: trusted purity?

2013-04-29 Thread monarch_dodra
On Monday, 29 April 2013 at 18:34:46 UTC, Walter Bright wrote: On 4/29/2013 10:19 AM, monarch_dodra wrote: I'm getting strange behavior trying to cast to pure. This is my test program: You're casting a C function to a D function. This will cause crashes. OK, so say I have a documented pure

Re: Is the other-kind-of-null really necessary in Nullable and Variant?

2013-04-29 Thread Idan Arye
On Monday, 29 April 2013 at 20:00:32 UTC, Idan Arye wrote: The init value of `Nullable!(Node!string)` is an object with two member fields - `value` of type `string` and `next` of type `Nullable!(Node!string)`. The default constructor modifies neither, so they will both remain with their initi

Re: Is the other-kind-of-null really necessary in Nullable and Variant?

2013-04-29 Thread Idan Arye
On Monday, 29 April 2013 at 18:20:35 UTC, Simen Kjaeraas wrote: On 2013-04-29, 19:57, Idan Arye wrote: Now, consider the fact we have Nullable in Phobos. Yes, we have `Nullable` in Phobos. It works by having two member fields - `_value`, which stores the value, and `_isNull`, which specifies

Re: 1 matches bool, 2 matches long

2013-04-29 Thread eles
On Monday, 29 April 2013 at 18:53:22 UTC, Sean Cavanaugh wrote: On 4/29/2013 7:30 AM, deadalnix wrote: Its not official but this already works in the C like langauges, as a way to 'promote to bool' I know, but I still think that ifz() and ifnz() convey better (more, they are easier to debug,

Re: 1 matches bool, 2 matches long

2013-04-29 Thread Sean Cavanaugh
On 4/29/2013 7:30 AM, deadalnix wrote: (that is: ifzero(), infnonzero(), whilezero(), whilenonzero()). int x = 3; if (!!x) { // do something } Its not official but this already works in the C like langauges, as a way to 'promote to bool'

Re: 1 matches bool, 2 matches long

2013-04-29 Thread Rob T
On Sunday, 28 April 2013 at 13:38:53 UTC, Andrei Alexandrescu wrote: [...] If enough differences accumulate to make bool quite a different type from a regular integral, then the matter of overloading with long, conversion from literals 1 and 0 etc. may be reopened. Even then, it would be a dif

Re: Formal Review of std.uni

2013-04-29 Thread Jonathan M Davis
On Monday, April 29, 2013 22:13:09 Dmitry Olshansky wrote: > Technically these should be in std.string and are there but incorrect. Then fix them there. - Jonathan M Davis

Re: trusted purity?

2013-04-29 Thread Jonathan M Davis
On Monday, April 29, 2013 12:58:44 monarch_dodra wrote: > Is there *any* way to make a call to a non-pure function in a > pure context, if you know you won't violate your own purity? > > This is something you can do with @safe (@trusted), but what > about pure? > > For example, "free" is not pure

Re: 1 matches bool, 2 matches long

2013-04-29 Thread Walter Bright
On 4/29/2013 10:10 AM, Steven Schveighoffer wrote: On Sat, 27 Apr 2013 13:27:39 -0700, Walter Bright wrote: On 4/26/2013 11:04 PM, Steven Schveighoffer wrote: I think the issue (and I am firmly in the foo(1) => long camp) is that bools are considered better integers than actual integer types

Re: trusted purity?

2013-04-29 Thread Walter Bright
On 4/29/2013 10:19 AM, monarch_dodra wrote: I'm getting strange behavior trying to cast to pure. This is my test program: You're casting a C function to a D function. This will cause crashes.

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread David Nadlinger
On Monday, 29 April 2013 at 16:04:00 UTC, Manu wrote: I'll be in SFO at midday if anyone is heading down from up that way? Otherwise, can anyone suggest the best way to get there from the airport? Where is "there"? I just used BART/Caltrain – not very fancy and takes a while to get there, bu

Re: trusted purity?

2013-04-29 Thread Walter Bright
On 4/29/2013 5:08 AM, monarch_dodra wrote: I've hit this issue before: In D, if the *managed* memory runs out, then it is an error (since then *everything* crumbles: arrays, GC. etc). The reason it is an error is that since the memory is managed by the language, there is nothing the user can do a

Re: trusted purity?

2013-04-29 Thread Walter Bright
On 4/29/2013 3:58 AM, monarch_dodra wrote: Is there *any* way to make a call to a non-pure function in a pure context, if you know you won't violate your own purity? Vee haf veys: 1. put "debug" before the impure code (but you'll have to compile with -debug) 2. put the impure code in a separa

Re: Is the other-kind-of-null really necessary in Nullable and Variant?

2013-04-29 Thread Simen Kjaeraas
On 2013-04-29, 19:57, Idan Arye wrote: On Monday, 29 April 2013 at 16:14:02 UTC, deadalnix wrote: On Monday, 29 April 2013 at 16:02:11 UTC, Idan Arye wrote: On Monday, 29 April 2013 at 15:39:47 UTC, Simen Kjaeraas wrote: On 2013-04-29, 17:34, Idan Arye wrote: On Monday, 29 April 2013 at 12:

Re: 1 matches bool, 2 matches long

2013-04-29 Thread Paulo Pinto
Am 29.04.2013 19:10, schrieb Steven Schveighoffer: On Sat, 27 Apr 2013 13:27:39 -0700, Walter Bright wrote: On 4/26/2013 11:04 PM, Steven Schveighoffer wrote: I think the issue (and I am firmly in the foo(1) => long camp) is that bools are considered better integers than actual integer types

Re: Formal Review of std.uni

2013-04-29 Thread Dmitry Olshansky
29-Apr-2013 10:45, Jacob Carlborg пишет: On 2013-04-28 18:56, Jesse Phillips wrote: First off, Dconf is this next weekend and effects the schedule of this review. Review will be held for 3 weeks, instead of holding off a week I'm extending the period and starting the review now. (Dmitry may be u

Re: 1 matches bool, 2 matches long

2013-04-29 Thread Jonathan M Davis
On Monday, April 29, 2013 09:54:40 Steven Schveighoffer wrote: > On Sat, 27 Apr 2013 12:51:48 -0700, Walter Bright > > wrote: > > On 4/26/2013 7:36 PM, Mehrdad wrote: > >> Walter, you're completely missing the point. > > > > I completely understand it is a perception problem. Some people see boo

Re: Is the other-kind-of-null really necessary in Nullable and Variant?

2013-04-29 Thread Idan Arye
On Monday, 29 April 2013 at 16:14:02 UTC, deadalnix wrote: On Monday, 29 April 2013 at 16:02:11 UTC, Idan Arye wrote: On Monday, 29 April 2013 at 15:39:47 UTC, Simen Kjaeraas wrote: On 2013-04-29, 17:34, Idan Arye wrote: On Monday, 29 April 2013 at 12:23:04 UTC, deadalnix wrote: On Sunday, 2

Re: trusted purity?

2013-04-29 Thread deadalnix
On Monday, 29 April 2013 at 10:58:45 UTC, monarch_dodra wrote: Is there *any* way to make a call to a non-pure function in a pure context, if you know you won't violate your own purity? This is something you can do with @safe (@trusted), but what about pure? This raise the case once again

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread Ali Çehreli
On 04/29/2013 09:03 AM, Manu wrote: > can anyone suggest the best way to get there from the airport? We have used door-to-door airport shuttles many times in the past. The cost should be around $35-45 to most places around Menlo Park. When you arrive, just walk out of the international termin

Re: trusted purity?

2013-04-29 Thread monarch_dodra
I'm getting strange behavior trying to cast to pure. This is my test program: // import std.stdio; import core.stdc.stdlib; void main() { auto p1 = &core.stdc.stdlib.free; auto p2 = cast(void function(void*))&core.stdc.stdlib.free; auto p3 = cast(void function(void*) pure)

Re: 1 matches bool, 2 matches long

2013-04-29 Thread Steven Schveighoffer
On Sat, 27 Apr 2013 13:27:39 -0700, Walter Bright wrote: On 4/26/2013 11:04 PM, Steven Schveighoffer wrote: I think the issue (and I am firmly in the foo(1) => long camp) is that bools are considered better integers than actual integer types (or even floating point types for that matter).

Re: Is the other-kind-of-null really necessary in Nullable and Variant?

2013-04-29 Thread Simen Kjaeraas
On 2013-04-29, 18:02, Idan Arye wrote: On Monday, 29 April 2013 at 15:39:47 UTC, Simen Kjaeraas wrote: On 2013-04-29, 17:34, Idan Arye wrote: On Monday, 29 April 2013 at 12:23:04 UTC, deadalnix wrote: On Sunday, 28 April 2013 at 16:33:19 UTC, Idan Arye wrote: When you use `std.typecons.Nulla

Re: 1 matches bool, 2 matches long

2013-04-29 Thread Rob T
On Monday, 29 April 2013 at 14:08:20 UTC, Mike James wrote: gdc: bool x = false; x++; main.d:50: Error: operation not allowed on bool 'x' why not? is just an integer after all. another special case? If you are going to create a boolean then use it as a boolean - it's not an integer any more

Re: 1 matches bool, 2 matches long

2013-04-29 Thread Steven Schveighoffer
On Sat, 27 Apr 2013 12:51:48 -0700, Walter Bright wrote: On 4/26/2013 7:36 PM, Mehrdad wrote: Walter, you're completely missing the point. I completely understand it is a perception problem. Some people see bool as a 1 bit integer (including me). Some see bool as something very distinc

Re: Is the other-kind-of-null really necessary in Nullable and Variant?

2013-04-29 Thread deadalnix
On Monday, 29 April 2013 at 16:02:11 UTC, Idan Arye wrote: On Monday, 29 April 2013 at 15:39:47 UTC, Simen Kjaeraas wrote: On 2013-04-29, 17:34, Idan Arye wrote: On Monday, 29 April 2013 at 12:23:04 UTC, deadalnix wrote: On Sunday, 28 April 2013 at 16:33:19 UTC, Idan Arye wrote: When you use

Re: Is the other-kind-of-null really necessary in Nullable and Variant?

2013-04-29 Thread deadalnix
On Monday, 29 April 2013 at 15:34:30 UTC, Idan Arye wrote: On Monday, 29 April 2013 at 12:23:04 UTC, deadalnix wrote: On Sunday, 28 April 2013 at 16:33:19 UTC, Idan Arye wrote: When you use `std.typecons.Nullable` with a type that already accept `null` values, you get two types of nulls - the

Re: Is the other-kind-of-null really necessary in Nullable and Variant?

2013-04-29 Thread Idan Arye
On Monday, 29 April 2013 at 15:39:47 UTC, Simen Kjaeraas wrote: On 2013-04-29, 17:34, Idan Arye wrote: On Monday, 29 April 2013 at 12:23:04 UTC, deadalnix wrote: On Sunday, 28 April 2013 at 16:33:19 UTC, Idan Arye wrote: When you use `std.typecons.Nullable` with a type that already accept `nu

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread Manu
I'll be in SFO at midday if anyone is heading down from up that way? Otherwise, can anyone suggest the best way to get there from the airport? On 29 Apr 2013 05:30, "deadalnix" wrote: > On Sunday, 24 March 2013 at 21:32:12 UTC, Andrei Alexandrescu wrote: > >> Hello to all prospective DConf 2013 a

Re: Is the other-kind-of-null really necessary in Nullable and Variant?

2013-04-29 Thread Simen Kjaeraas
On 2013-04-29, 17:34, Idan Arye wrote: On Monday, 29 April 2013 at 12:23:04 UTC, deadalnix wrote: On Sunday, 28 April 2013 at 16:33:19 UTC, Idan Arye wrote: When you use `std.typecons.Nullable` with a type that already accept `null` values, you get two types of nulls - the `Nullable`'s null

Re: Is the other-kind-of-null really necessary in Nullable and Variant?

2013-04-29 Thread Idan Arye
On Monday, 29 April 2013 at 12:23:04 UTC, deadalnix wrote: On Sunday, 28 April 2013 at 16:33:19 UTC, Idan Arye wrote: When you use `std.typecons.Nullable` with a type that already accept `null` values, you get two types of nulls - the `Nullable`'s null state the the regular type's `null`:

Re: 1 matches bool, 2 matches long

2013-04-29 Thread eles
On Monday, 29 April 2013 at 14:08:20 UTC, Mike James wrote: gdc: bool x = false; x++; main.d:50: Error: operation not allowed on bool 'x' why not? is just an integer after all. another special case? If you are going to create a boolean then use it as a boolean - it's not an integer any more

Re: 1 matches bool, 2 matches long

2013-04-29 Thread Mike James
gdc: bool x = false; x++; main.d:50: Error: operation not allowed on bool 'x' why not? is just an integer after all. another special case? If you are going to create a boolean then use it as a boolean - it's not an integer any more. Don't mix and match - there's nothing worse than trying to

GDB support for multithreaded D application debugging

2013-04-29 Thread d coder
Greetings I just wanted to find out how good is the GDB support for debugging multithreaded code written in D language. I remember trying it sometimes back, but could not get it to work. Any suggestions? Regards - Puneet

Re: Stable D version?

2013-04-29 Thread Paulo Pinto
On Monday, 29 April 2013 at 11:24:02 UTC, Dicebot wrote: On Monday, 29 April 2013 at 11:15:20 UTC, Paulo Pinto wrote: Quoting myself "Or course this is a very limited subset of what embedded is all about, but I think D could also be usable in such types of boards." Okay, pardon me, may be I

Re: 1 matches bool, 2 matches long

2013-04-29 Thread deadalnix
On Monday, 29 April 2013 at 00:45:47 UTC, Mehrdad wrote: On Monday, 29 April 2013 at 00:40:08 UTC, Andrei Alexandrescu wrote: 2. Stop allowing implicit bool->int conversions (explicit conversions like in if/while/etc. are of course not included here) Unlikely to ever happen. What's the use

Re: 1 matches bool, 2 matches long

2013-04-29 Thread eles
On Monday, 29 April 2013 at 12:30:06 UTC, deadalnix wrote: On Sunday, 28 April 2013 at 19:38:26 UTC, eles wrote: On Sunday, 28 April 2013 at 19:19:53 UTC, Walter Bright wrote: On 4/27/2013 2:58 PM, jerro wrote: On Saturday, 27 April 2013 at 21:52:30 UTC, Walter Bright This is plain useless as

Re: 1 matches bool, 2 matches long

2013-04-29 Thread deadalnix
On Sunday, 28 April 2013 at 22:40:33 UTC, Andrei Alexandrescu wrote: On 4/28/13 5:41 PM, kenji hara wrote: Yes, as Andrei mentioned, it is sometimes useful. But, at least during overload resolution, it must not occur. Kenji Hara Well the problem has other ramifications beyond bool. Consider:

Re: 1 matches bool, 2 matches long

2013-04-29 Thread deadalnix
On Sunday, 28 April 2013 at 19:38:26 UTC, eles wrote: On Sunday, 28 April 2013 at 19:19:53 UTC, Walter Bright wrote: On 4/27/2013 2:58 PM, jerro wrote: On Saturday, 27 April 2013 at 21:52:30 UTC, Walter Bright To reiterate, history amply shows that if 'true' and 'false' are not there, then peo

Re: DConf 2013 official car/room sharing thread

2013-04-29 Thread deadalnix
On Sunday, 24 March 2013 at 21:32:12 UTC, Andrei Alexandrescu wrote: Hello to all prospective DConf 2013 attendees! A few of you are interested in sharing options for rental cars, or to share hotel rooms and split the cost in half. Let this thread be the official tracker for such requests and

Re: Is the other-kind-of-null really necessary in Nullable and Variant?

2013-04-29 Thread deadalnix
On Sunday, 28 April 2013 at 16:33:19 UTC, Idan Arye wrote: When you use `std.typecons.Nullable` with a type that already accept `null` values, you get two types of nulls - the `Nullable`'s null state the the regular type's `null`: Nullable!string a; writeln(a.isNull()); //prints "true"

Re: trusted purity?

2013-04-29 Thread Henning Pohl
On Monday, 29 April 2013 at 12:08:58 UTC, monarch_dodra wrote: I've hit this issue before: In D, if the *managed* memory runs out, then it is an error (since then *everything* crumbles: arrays, GC. etc). The reason it is an error is that since the memory is managed by the language, there is not

Re: trusted purity?

2013-04-29 Thread monarch_dodra
On Monday, 29 April 2013 at 11:50:11 UTC, Henning Pohl wrote: On Monday, 29 April 2013 at 11:32:33 UTC, monarch_dodra wrote: I'm still worried about what it means for a pure function to throw... (I'm thinking about the "enforce(malloc)" scheme) If malloc returns null, we are out of memory. In

Re: trusted purity?

2013-04-29 Thread Henning Pohl
On Monday, 29 April 2013 at 11:32:33 UTC, monarch_dodra wrote: I'm still worried about what it means for a pure function to throw... (I'm thinking about the "enforce(malloc)" scheme) If malloc returns null, we are out of memory. In D this is not an exception, it is an error. So I guess we jus

Re: trusted purity?

2013-04-29 Thread monarch_dodra
On Monday, 29 April 2013 at 11:15:20 UTC, Henning Pohl wrote: I've been working on a pull request and came up with something like this: private void initialize(A...)(auto ref A args) { auto m = cast(void* function(size_t size) pure)&malloc; _store = cast(Impl*) enforce(m(Impl.sizeof));

Re: Stable D version?

2013-04-29 Thread Dicebot
On Monday, 29 April 2013 at 11:15:20 UTC, Paulo Pinto wrote: Quoting myself "Or course this is a very limited subset of what embedded is all about, but I think D could also be usable in such types of boards." Okay, pardon me, may be I have not highlighted my point clear enough: there is no r

Re: trusted purity?

2013-04-29 Thread Henning Pohl
By the way, my post is related to the impurity of RefCounted: http://d.puremagic.com/issues/show_bug.cgi?id=9998

Re: trusted purity?

2013-04-29 Thread Henning Pohl
I've been working on a pull request and came up with something like this: private void initialize(A...)(auto ref A args) { auto m = cast(void* function(size_t size) pure)&malloc; _store = cast(Impl*) enforce(m(Impl.sizeof)); auto r = cast(void function(in void* p, size_t sz) nothrow

Re: Stable D version?

2013-04-29 Thread Paulo Pinto
On Monday, 29 April 2013 at 10:38:32 UTC, Dicebot wrote: On Monday, 29 April 2013 at 09:54:29 UTC, Paulo Pinto wrote: This guys don't have any issues selling Oberon compilers for embedded use. ... That is simple, "embedded" is a buzzword often understood as "something like PC but small". Suc

trusted purity?

2013-04-29 Thread monarch_dodra
Is there *any* way to make a call to a non-pure function in a pure context, if you know you won't violate your own purity? This is something you can do with @safe (@trusted), but what about pure? For example, "free" is not pure, because you can't call it twice on the same pointer. But if you

Re: Stable D version?

2013-04-29 Thread Dicebot
On Monday, 29 April 2013 at 09:54:29 UTC, Paulo Pinto wrote: This guys don't have any issues selling Oberon compilers for embedded use. ... That is simple, "embedded" is a buzzword often understood as "something like PC but small". Such definition is quite useless because it implies no speci

Re: 1 matches bool, 2 matches long

2013-04-29 Thread eles
On Monday, 29 April 2013 at 09:49:59 UTC, Diggory wrote: On Monday, 29 April 2013 at 06:26:44 UTC, Walter Bright wrote: On 4/28/2013 2:05 AM, deadalnix wrote: On Saturday, 27 April 2013 at 21:52:30 UTC, Walter Bright wrote: On 4/27/2013 2:29 PM, Rob T wrote: this thread, special cases (boolean

Re: Stable D version?

2013-04-29 Thread Paulo Pinto
On Monday, 29 April 2013 at 07:44:15 UTC, Dicebot wrote: On Monday, 29 April 2013 at 06:45:32 UTC, eles wrote: ... D is simply in no shape to compete for kernels for same reasons it is rather painful to use in embedded (fat runtime, language features relying on hidden gc allocations etc.) It

Re: 1 matches bool, 2 matches long

2013-04-29 Thread Diggory
On Monday, 29 April 2013 at 06:26:44 UTC, Walter Bright wrote: On 4/28/2013 2:05 AM, deadalnix wrote: On Saturday, 27 April 2013 at 21:52:30 UTC, Walter Bright wrote: On 4/27/2013 2:29 PM, Rob T wrote: If bools are 1 bit ints, then why do we have 'true' and 'false' as keywords? Because writi

Re: Stable D version?

2013-04-29 Thread eles
On Sunday, 28 April 2013 at 23:11:30 UTC, Mehrdad wrote: On Sunday, 28 April 2013 at 12:01:58 UTC, Paulo Pinto wrote: Linux uses C for the kernel too, mainly because Walter hates C++ (and C++ programmers). err, Linus

Re: Stable D version?

2013-04-29 Thread Paulo Pinto
On Sunday, 28 April 2013 at 23:11:30 UTC, Mehrdad wrote: On Sunday, 28 April 2013 at 12:01:58 UTC, Paulo Pinto wrote: True, but only now the major OS vendors are switching from C to C++ as their main systems programming language. Curious, which ones are you referring to? Windows uses C for th

Re: Stable D version?

2013-04-29 Thread Mr. Anonymous
On Monday, 29 April 2013 at 08:07:05 UTC, eles wrote: I even start thinking that is better to release a new feature after a relative short, preliminary discussion, and be prepared to change it during a time frame, if it is not as practical as desired, instead of prolonging a discussion for cent

Re: Stable D version?

2013-04-29 Thread eles
On Monday, 29 April 2013 at 07:44:15 UTC, Dicebot wrote: On Monday, 29 April 2013 at 06:45:32 UTC, eles wrote: D is simply in no shape to compete for kernels for same reasons it is rather painful to use in embedded (fat runtime, language features relying on hidden gc allocations etc.) It is har

Re: Stable D version?

2013-04-29 Thread Dicebot
On Monday, 29 April 2013 at 06:45:32 UTC, eles wrote: ... D is simply in no shape to compete for kernels for same reasons it is rather painful to use in embedded (fat runtime, language features relying on hidden gc allocations etc.) It is hardly practical to discuss the moment to compete whe