Re: Rust piece on integer safety

2016-04-30 Thread Ed via Digitalmars-d-learn
On Saturday, 30 April 2016 at 23:11:20 UTC, Laeeth Isharc wrote: All the design/discussion/implementation of this scheme for handling integer overflow would be wasted if it didn’t actually find any bugs in practice. I personally have had quite a few bugs found nearly as I write them, with expre

Re: Are structs saved in multi-thread delegate call?

2016-04-22 Thread ed via Digitalmars-d-learn
On Saturday, 23 April 2016 at 01:11:49 UTC, Ramon wrote: mmm, I figured the problem, but don't know how to solve it. my struct has a destructor which clears itself: struct json_value { ~this() { .ValueClear(&data); } } so how I can I put a struct in the heap? (not in the stack, as is the def

Re: Auto attributes for functions

2014-08-20 Thread ed via Digitalmars-d-learn
On Wednesday, 20 August 2014 at 09:13:15 UTC, Jonathan M Davis via Digitalmars-d-learn wrote: On Wed, 20 Aug 2014 01:38:52 + uri via Digitalmars-d-learn wrote: Hi all, Bit new to D so this might be a very naive question... Can the compiler auto infer function attributes? I am often ad

Re: Are there desktop appications being developed in D currently?

2014-08-08 Thread ed via Digitalmars-d-learn
On Saturday, 9 August 2014 at 00:34:43 UTC, Puming wrote: Hi, I bumped into a blog talking about building a (toy) browser engine in Rust: (http://limpet.net/mbrubeck/2014/08/08/toy-layout-engine-1.html) In the blog I found that the OP is in the mozilla servo team building a parallel browser

Re: Kernel in D

2014-06-05 Thread ed via Digitalmars-d-learn
On Thursday, 5 June 2014 at 11:07:54 UTC, 1100110 wrote: On 6/5/14, 6:05, 1100110 wrote: On 5/31/14, 7:57, ed wrote: On Saturday, 31 May 2014 at 07:28:32 UTC, Mineko wrote: So, I've gotten interested in kernel programming in D.. And as much as I like C/C++, I wanna try innovating, I'm aware th

Re: Segfault in shared object when writeln

2014-06-03 Thread ed via Digitalmars-d-learn
On Wednesday, 4 June 2014 at 04:46:59 UTC, ed wrote: On Wednesday, 4 June 2014 at 03:49:25 UTC, Harpo wrote: Hello I am having the following problem. I am trying to turn a program I have written into a shared object. I have ran into some problems however. When I use writeln instead of printf my

Re: Segfault in shared object when writeln

2014-06-03 Thread ed via Digitalmars-d-learn
On Wednesday, 4 June 2014 at 03:49:25 UTC, Harpo wrote: Hello I am having the following problem. I am trying to turn a program I have written into a shared object. I have ran into some problems however. When I use writeln instead of printf my program segfaults. I have edited the code to just th

Re: Kernel in D

2014-05-31 Thread ed via Digitalmars-d-learn
On Saturday, 31 May 2014 at 07:28:32 UTC, Mineko wrote: So, I've gotten interested in kernel programming in D.. And as much as I like C/C++, I wanna try innovating, I'm aware that phobos/gc and any OS-specific issues are going to be a problem, but I'm willing to implement them into the kernel i

Re: DFL is the best UIcontrols for D,compare it to dwt, tkd,dtk,dlangui,anchovy......

2014-05-14 Thread ed via Digitalmars-d-learn
On Wednesday, 14 May 2014 at 06:14:16 UTC, FrankLike wrote: On Tuesday, 13 May 2014 at 23:26:20 UTC, ed wrote: On Tuesday, 13 May 2014 at 15:20:36 UTC, FrankLike wrote: DFL is just a thin wrapper around Win32, no surprise. I've found my apps written using DFL work quite fine in Linux via Wine,

Re: DFL is the best UIcontrols for D,compare it to dwt, tkd,dtk,dlangui,anchovy......

2014-05-13 Thread ed via Digitalmars-d-learn
On Tuesday, 13 May 2014 at 15:20:36 UTC, FrankLike wrote: DFL is just a thin wrapper around Win32, no surprise. I've found my apps written using DFL work quite fine in Linux via Wine, so I use them from both OSes. In Linux?The exe was compiled in win32? Don't play jokes on it. He's not jo

Template delegate/function ptr struct member

2014-05-13 Thread ed via Digitalmars-d-learn
I'm porting some C++ code to D and a struct has the following member: struct S { // ... //void* (*createMethod)(); void* function() createMethod; } I'd like to extend this as little to accept delegates for future use without breakage to existing code... Is it possible to template this so

Re: question about passing associative array to a function

2014-05-11 Thread ed via Digitalmars-d-learn
On Sunday, 11 May 2014 at 14:46:35 UTC, rbutler wrote: I have searched and can not understand something about passing AAs to a function. I have reduced the gist of the question to a tiny program below. If I put "ref" in the function stmt it works, i.e.: ref int[int] aa My confusion is t