Re: Why no setuid in linux.d?

2010-11-19 Thread Steven Schveighoffer
On Fri, 19 Nov 2010 06:33:02 -0500, 0ffh fr...@youknow.what.todo.internetz wrote: Hi, I've written a programme that serves port 80, which usually requires root access. Therefore, after acquiring the socket I want to relinquish root by setting the uid to nonzero. I needed to add int

remove element(s) from dyn array

2010-11-19 Thread spir
Hello, * What is the D-idiomatic way to remove an element from a dynamic array? * Ditto, for a slice, but with the 2 variants expression vs statement: a.removeSlice(i1, i2); a2 = a1.removeSlice(i1, i2); * Can I rely on a.length = a.length - 1 to just remove the last

Re: CTFE history

2010-11-19 Thread bearophile
Michal Minich: see thread Compile time function execution... at http://www.digitalmars.com/d/archives/ digitalmars/D/index2007.html. In the previous discussion you can see this idea forming (I searched for the word compile). Thank you, I have found and read some of those threads. It seems the

Re: remove element(s) from dyn array

2010-11-19 Thread Dmitry Olshansky
On 19.11.2010 16:11, spir wrote: Hello, * What is the D-idiomatic way to remove an element from a dynamic array? * Ditto, for a slice, but with the 2 variants expression vs statement: a.removeSlice(i1, i2); That would most likely be: std.array; int[] a = ...; replace(a,i1,i2,null);