Re: How To Dynamic Web Rendering?

2011-05-17 Thread Jacob Carlborg
On 2011-05-16 15:43, Adam D. Ruppe wrote: Instead you move the view layer into the model or controller layer. How's that any different? Is that really what's happening? Any template has variables made available to it from the model. I'm just making them available at a higher level (pre-wrapped

Re: Can we make auto return type inference a little more lax?

2011-05-17 Thread bearophile
Andrej Mitrovic: I don't think the compiler can figure that one out unless tuples become a standard language feature, not a library one. But maybe I'm wrong. Turning tuples into a a _partial_ language feature will be a good thing [TM] for D. Tuples are useful in many situations, and they are

Re: How To Dynamic Web Rendering?

2011-05-17 Thread Nick Sabalausky
Jacob Carlborg d...@me.com wrote in message news:iqt6kb$1nd1$1...@digitalmars.com... On 2011-05-16 15:43, Adam D. Ruppe wrote: Instead you move the view layer into the model or controller layer. How's that any different? Is that really what's happening? Any template has variables made

Re: How To Dynamic Web Rendering?

2011-05-17 Thread Nick Sabalausky
Nick Sabalausky a@a.a wrote in message news:iqtarl$229l$1...@digitalmars.com... Jacob Carlborg d...@me.com wrote in message news:iqt6kb$1nd1$1...@digitalmars.com... On 2011-05-16 15:43, Adam D. Ruppe wrote: Instead you move the view layer into the model or controller layer. How's that any

Re: How To Dynamic Web Rendering?

2011-05-17 Thread Jacob Carlborg
On 2011-05-17 10:11, Nick Sabalausky wrote: Jacob Carlborgd...@me.com wrote in message news:iqt6kb$1nd1$1...@digitalmars.com... On 2011-05-16 15:43, Adam D. Ruppe wrote: Instead you move the view layer into the model or controller layer. How's that any different? Is that really what's

Re: How To Dynamic Web Rendering?

2011-05-17 Thread Adam D. Ruppe
Jacob Carlborg wrote: That would require a lot of otherwise (possibly) unnecessary id/class attributes (if they aren't removed). Not that much in the sites I've done. Here's another real example, that new d web site discussed on the newsgroup a while ago: Dynamic page:

Re: How To Dynamic Web Rendering?

2011-05-17 Thread Nick Sabalausky
Adam D. Ruppe destructiona...@gmail.com wrote in message news:iqua65$rm2$1...@digitalmars.com... auto f = cast(Form) document.getElementById(code-runner); f.setValue(code, `void main() { assert(0, Hello, world!); }`); Minor suggestion: There should be an overload of getElementById that's

Re: How To Dynamic Web Rendering?

2011-05-17 Thread Adam D. Ruppe
Nick Sabalausky wrote: There should be an overload of getElementById that's defined like this: Aye, I've been thinking about that for a while, but could never think of a name I like (yeah, petty reason). I've just trained myself to use assert to avoid the null pointers. Or maybe call it

Re: Can we make auto return type inference a little more lax?

2011-05-17 Thread Robert Clipsham
On 17/05/2011 04:40, Andrej Mitrovic wrote: auto foo() { if (1) { return [0, 0]; } else { size_t one; size_t two; return [one, two]; } } void main(){ } Error: mismatched function return type inference of uint[] and int[]

Re: Can we make auto return type inference a little more lax?

2011-05-17 Thread Andrej Mitrovic
Bug is in bugzilla: http://d.puremagic.com/issues/show_bug.cgi?id=6022 I'm not a compiler writer though, sorry. :)

Memory corruption rant.

2011-05-17 Thread Jesse Phillips
I would love to post a bug with a minimum test case, so that I'd be able to identify if its my fault, the compiler, or libraries I'm using. But at this time I can't seem to reduce it to a reasonable (non-proprietary) portion of code. So for now I'll just rant. I combining much here. I have two

Re: Memory corruption rant.

2011-05-17 Thread Trass3r
Could it be a stack corruption?

Re: Memory corruption rant.

2011-05-17 Thread Vladimir Panteleev
On Wed, 18 May 2011 02:18:22 +0300, Jesse Phillips jessekphillip...@gmail.com wrote: [snip memory corruption rant] I've nothing to contribute but by own anecdotal experience. So: are you doing *any* allocations or throwing exceptions in finalizers (destructors of objects on the heap)?

Re: Non-GC threads

2011-05-17 Thread Vladimir Panteleev
On Sun, 15 May 2011 21:30:32 +0300, Piotr Szturmaj bncr...@jadamspam.pl wrote: What are the consequences of using non garbage collected threads in D? If you move pointers around while the GC is looking for them, the GC might miss them and free referenced memory. This will lead to memory

Re: Memory corruption rant.

2011-05-17 Thread Jesse Phillips
Trass3r Wrote: Could it be a stack corruption? That would make the most sense for the behavior I'm seeing, but I don't really know how to corrupt the stack without using ASM, and even then I'd probably fail.

Re: Memory corruption rant.

2011-05-17 Thread Jesse Phillips
Vladimir Panteleev Wrote: On Wed, 18 May 2011 02:18:22 +0300, Jesse Phillips jessekphillip...@gmail.com wrote: [snip memory corruption rant] I've nothing to contribute but by own anecdotal experience. So: are you doing *any* allocations or throwing exceptions in finalizers