Re: What D related (or interesting development based) twitter accounts do you guys follow?

2015-01-23 Thread eles via Digitalmars-d-learn
On Sunday, 28 July 2013 at 16:57:54 UTC, Gary Willoughby wrote: What D related (or interesting development based) twitter accounts do you guys follow? I'm pretty new to twitter and trying to follow accounts that i find interesting. Just remembered when reading this:

For those ready to take the challenge

2015-01-09 Thread eles via Digitalmars-d-learn
https://codegolf.stackexchange.com/questions/44278/debunking-stroustrups-debunking-of-the-myth-c-is-for-large-complicated-pro

Re: Destructor/Finalizer Guarantees

2014-11-12 Thread eles via Digitalmars-d-learn
On Wednesday, 12 November 2014 at 14:36:19 UTC, Kagamin wrote: With GC you usually have two destructors: Which is why this approach is so cumbersome. At least, in non-GC you only have just one kind of destructor.

Re: Cast to left hand side

2014-11-10 Thread eles via Digitalmars-d-learn
On Monday, 10 November 2014 at 05:00:25 UTC, tcak wrote: On Sunday, 9 November 2014 at 21:47:03 UTC, eles wrote: On Sunday, 9 November 2014 at 19:00:01 UTC, tcak wrote: Because I am auto casting with a keyword, compiler shouldn't complain about it as well. This can also solve uncast thing.

Re: Cast to left hand side

2014-11-09 Thread eles via Digitalmars-d-learn
On Sunday, 9 November 2014 at 19:00:01 UTC, tcak wrote: In some cases, I need to cast right hand side expression to left hand side. While it looks/feels simple for basic data types, it requires long lines with duplication when flexible code is desired to be written. Example: int a = 7; byte

Re: status of D optimizers benefiting from contracts ?

2014-11-09 Thread eles via Digitalmars-d-learn
On Sunday, 9 November 2014 at 16:31:46 UTC, bearophile wrote: H. S. Teoh: It's only a bad idea because people abuse assert() where it's not appropriate. It's a bad idea because Walter seems unable to understand the difference between verifying and proving. I fail to see the difference

Destructor order

2014-10-22 Thread eles via Digitalmars-d-learn
C++ versions: { //displays ~C~B~A A foo; B bar; C *caz = new C(); delete caz; } std::cout std::endl; { //displays ~C~B~A std::unique_ptrA foo = std::make_uniqueA(); std::unique_ptrB bar =

Re: Destructor order

2014-10-22 Thread eles via Digitalmars-d-learn
On Wednesday, 22 October 2014 at 15:45:02 UTC, eles wrote: D version with structs: { //display ~C~B~A A foo; B bar; C *caz = new C(); delete caz; } as expected.

Re: Destructor order

2014-10-22 Thread eles via Digitalmars-d-learn
On Wednesday, 22 October 2014 at 17:13:35 UTC, Ola Fosheim Grøstad wrote: On Wednesday, 22 October 2014 at 16:55:41 UTC, Regan Heath So why wasn't the eles' destructor order in reverse if Scoped is a struct and calls explicit destroy(B) then destroy(A)? Maybe it's the writeln() inside the

Re: Destructor order

2014-10-22 Thread eles via Digitalmars-d-learn
On Wednesday, 22 October 2014 at 18:03:44 UTC, anonymous wrote: On Wednesday, 22 October 2014 at 15:45:02 UTC, eles wrote: `foo` should be a `Scoped!A`. When it's typed as `A`, the `Scoped!A` that is returned by `scoped`, is destructed immediately (and the reference leaks, I guess). Just

Re: Destructor order

2014-10-22 Thread eles via Digitalmars-d-learn
On Wednesday, 22 October 2014 at 18:03:44 UTC, anonymous wrote: On Wednesday, 22 October 2014 at 15:45:02 UTC, eles wrote: D version: `foo` should be a `Scoped!A`. When it's typed as `A`, the `Scoped!A` that is returned by `scoped`, is destructed immediately (and the reference leaks, I

Re: Beginner ?. Why does D suggest to learn java

2014-10-17 Thread eles via Digitalmars-d-learn
On Friday, 17 October 2014 at 13:59:03 UTC, ketmar via Digitalmars-d-learn wrote: On Fri, 17 Oct 2014 10:10:09 +0200 spir via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: computer programming is the literacy of the new age. Let's say, computer knowledge. There are also

Re: How to match string by word

2014-10-17 Thread eles via Digitalmars-d-learn
On Friday, 17 October 2014 at 16:39:38 UTC, Uranuz wrote: I haven't touched any key on a keyboard and haven't pressed *Send* but message was posted somehow. Scan for rootkits...

When betterC triggers errors in compilation?

2014-10-14 Thread eles via Digitalmars-d-learn
Hello, According to this: http://forum.dlang.org/post/lddug4$jgv$1...@digitalmars.com -betterC should disable support for exception handling. So I expected dmd to reject the following code: === import std.stdio; int readDieFromFile() { auto

Re: When betterC triggers errors in compilation?

2014-10-14 Thread eles via Digitalmars-d-learn
On Tuesday, 14 October 2014 at 13:31:47 UTC, Adam D. Ruppe wrote: On Tuesday, 14 October 2014 at 13:20:50 UTC, eles wrote: http://forum.dlang.org/post/lddug4$jgv$1...@digitalmars.com -betterC right now is still an undocumented hack that doesn't do much. Thank you.

Re: Code fails with linker error. Why?

2014-10-06 Thread eles via Digitalmars-d-learn
On Saturday, 4 October 2014 at 15:29:57 UTC, John Colvin wrote: On Saturday, 4 October 2014 at 11:19:52 UTC, ketmar via Digitalmars-d-learn wrote: On Sat, 04 Oct 2014 11:01:28 + John Colvin via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On Saturday, 4 October 2014 at

Re: Code fails with linker error. Why?

2014-10-06 Thread eles via Digitalmars-d-learn
On Monday, 6 October 2014 at 11:54:56 UTC, John Colvin wrote: On Monday, 6 October 2014 at 10:10:04 UTC, eles wrote: On Saturday, 4 October 2014 at 15:29:57 UTC, John Colvin wrote: On Saturday, 4 October 2014 at 11:19:52 UTC, ketmar via Digitalmars-d-learn wrote: On Sat, 04 Oct 2014 11:01:28

Re: Code fails with linker error. Why?

2014-10-06 Thread eles via Digitalmars-d-learn
On Monday, 6 October 2014 at 15:44:36 UTC, John Colvin wrote: On Monday, 6 October 2014 at 12:36:41 UTC, ketmar via Digitalmars-d-learn wrote: On Mon, 06 Oct 2014 11:54:55 + John Colvin via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: I disagree. It's simple and easy to

Re: Code fails with linker error. Why?

2014-10-06 Thread eles via Digitalmars-d-learn
On Monday, 6 October 2014 at 13:23:55 UTC, John Colvin wrote: On Monday, 6 October 2014 at 12:16:14 UTC, eles wrote: On Monday, 6 October 2014 at 11:54:56 UTC, John Colvin wrote: On Monday, 6 October 2014 at 10:10:04 UTC, eles wrote: On Saturday, 4 October 2014 at 15:29:57 UTC, John Colvin

Re: Code fails with linker error. Why?

2014-10-06 Thread eles via Digitalmars-d-learn
On Monday, 6 October 2014 at 19:03:13 UTC, John Colvin wrote: On Monday, 6 October 2014 at 16:04:02 UTC, eles wrote: On Monday, 6 October 2014 at 15:44:36 UTC, John Colvin wrote: On Monday, 6 October 2014 at 12:36:41 UTC, ketmar via Digitalmars-d-learn wrote: On Mon, 06 Oct 2014 11:54:55

Re: Code fails with linker error. Why?

2014-10-04 Thread eles via Digitalmars-d-learn
On Saturday, 4 October 2014 at 09:39:12 UTC, Chris Nicholson-Sauls wrote: In the original you are casting an int to a pointer type, which is legitimate (although rarely a good idea). The other side of the matter is simply precedence. cast(T)a.b; Is really the same as: cast(T)(a.b); Yes,

Re: Code fails with linker error. Why?

2014-10-04 Thread eles via Digitalmars-d-learn
On Saturday, 4 October 2014 at 09:39:12 UTC, Chris Nicholson-Sauls wrote: In the original you are casting an int to a pointer type, which is legitimate (although rarely a good idea). The other side of the matter is simply precedence. cast(T)a.b; Is really the same as: cast(T)(a.b); But

Re: Code fails with linker error. Why?

2014-10-04 Thread eles via Digitalmars-d-learn
On Saturday, 4 October 2014 at 10:27:18 UTC, John Colvin wrote: On Saturday, 4 October 2014 at 04:02:46 UTC, eles wrote: On Friday, 3 October 2014 at 15:47:33 UTC, John Colvin wrote: On Friday, 3 October 2014 at 15:44:16 UTC, eles wrote: So the compiler has no way of knowing whether you've

Re: Code fails with linker error. Why?

2014-10-04 Thread eles via Digitalmars-d-learn
On Saturday, 4 October 2014 at 10:27:18 UTC, John Colvin wrote: On Saturday, 4 October 2014 at 04:02:46 UTC, eles wrote: On Friday, 3 October 2014 at 15:47:33 UTC, John Colvin wrote: On Friday, 3 October 2014 at 15:44:16 UTC, eles wrote: class ShapeSurface(T) { public: int formula();

Re: Code fails with linker error. Why?

2014-10-04 Thread eles via Digitalmars-d-learn
On Saturday, 4 October 2014 at 10:38:32 UTC, ketmar via Digitalmars-d-learn wrote: On Sat, 04 Oct 2014 10:27:16 + John Colvin via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: is there any possibility to declare *class* *method* in one Yes, that too. Is even worse.

Code fails with linker error. Why?

2014-10-03 Thread eles via Digitalmars-d-learn
This is under Linux 64 with both dmd 2.066 (and latest gdc-4.9): = class ShapeSurface(T) { public: int formula(); int getSurfaceBy100() { int surface; surface = cast(T

Re: Code fails with linker error. Why?

2014-10-03 Thread eles via Digitalmars-d-learn
On Friday, 3 October 2014 at 15:47:33 UTC, John Colvin wrote: On Friday, 3 October 2014 at 15:44:16 UTC, eles wrote: class ShapeSurface(T) { public: int formula(); that means you have a definition of formula elsewhere (which the linker tries to find, but obviously fails. What you

Re: Allowing Expressions such as (low value high)

2014-09-05 Thread eles via Digitalmars-d-learn
On Friday, 5 September 2014 at 07:26:45 UTC, klpo wrote: On Thursday, 4 September 2014 at 20:29:09 UTC, Nordlöw wrote: On Thursday, 4 September 2014 at 20:03:57 UTC, Nordlöw wrote: The problem is in D [0..9] has a completely different signification. All the sins of the past...

Re: Learning D

2014-08-26 Thread eles via Digitalmars-d-learn
On Monday, 25 August 2014 at 16:46:11 UTC, Ryan wrote: Me: Software developer for 30 years. What IDE should I use? I'm not big fan of Eclipse, although if If you are an Eclipse (CDT) user for C/C++, then you will find a very similar plugin for D, called DDT, here:

Re: 'idiomatic' porting of c and or c++ code that does NULL checking

2014-08-26 Thread eles via Digitalmars-d-learn
On Wednesday, 27 August 2014 at 05:45:34 UTC, eles wrote: On Wednesday, 27 August 2014 at 05:39:59 UTC, Vladimir Panteleev wrote: On Monday, 25 August 2014 at 03:19:09 UTC, Mike Parker wrote: failure and the SIGKILL. (and SIGKILL just because you cannot catch it, otherwise you could

Re: 'idiomatic' porting of c and or c++ code that does NULL checking

2014-08-26 Thread eles via Digitalmars-d-learn
On Wednesday, 27 August 2014 at 05:39:59 UTC, Vladimir Panteleev wrote: On Monday, 25 August 2014 at 03:19:09 UTC, Mike Parker wrote: Sorry, you're right, that description of Exception/Error is correct. But I don't think that SDL initialization is a non-recoverable error. The program might

Re: How to get nogc to work with manual memory allocation

2014-08-24 Thread eles via Digitalmars-d-learn
On Sunday, 24 August 2014 at 08:48:03 UTC, bearophile wrote: Bienlein: things in such Limbo for several years). decades

Re: Programming a Game in D? :D

2014-08-03 Thread eles via Digitalmars-d-learn
On Saturday, 2 August 2014 at 20:58:34 UTC, Foo wrote: On Saturday, 2 August 2014 at 20:38:59 UTC, David wrote: Hi, not too sure if there's still someone reading this post, but i do have another question. So, I heared so much good stuff about D, it's powerfull, fast the syntax is nice, but

Re: Programming a Game in D? :D

2014-08-03 Thread eles via Digitalmars-d-learn
On Sunday, 3 August 2014 at 05:17:08 UTC, Mike Parker wrote: On 8/3/2014 5:38 AM, David wrote: about platform support, I know the story. But throwing all the weight behind a more-standard back-end would improve things. Yes, it would require some transition effort. But, then, ldc and gdc

Re: Programming a Game in D? :D

2014-08-03 Thread eles via Digitalmars-d-learn
On Sunday, 3 August 2014 at 12:37:51 UTC, eles wrote: On Saturday, 2 August 2014 at 20:58:34 UTC, Foo wrote: On Saturday, 2 August 2014 at 20:38:59 UTC, David wrote: on this road. It matters less for us to be able to use slices And this while D really nailed down two things very well:

Re: GC.calloc(), then what?

2014-06-27 Thread eles via Digitalmars-d-learn
On Friday, 27 June 2014 at 08:17:07 UTC, Ali Çehreli wrote: Thank you for your responses. I am partly enlightened. :p On 06/27/2014 12:34 AM, safety0ff wrote: On Friday, 27 June 2014 at 07:03:28 UTC, Ali Çehreli wrote: But addRange doesn't seem to make sense for stdlib.malloc'ed memory,