On Monday, 21 May 2012 at 17:54:56 UTC, Adam D. Ruppe wrote:
On Saturday, 19 May 2012 at 20:33:49 UTC, Nathan M. Swan wrote:
It has some pitfalls (e.g. I can't find a good way to stop the
server)
When I use it, I just leave it open in a terminal window.
Control+C can then kill it. (I'm on linu
well, they we're interfaces and it made sense to implement them as a
class. On the other hand, a struct is way more efficient and works
just as good. Thanks for clearing everything up.
On Saturday, 19 May 2012 at 20:33:49 UTC, Nathan M. Swan wrote:
It has some pitfalls (e.g. I can't find a good way to stop the
server)
When I use it, I just leave it open in a terminal window.
Control+C can then kill it. (I'm on linux but I think the
same would apply on Windows.)
That's the on
On Monday, 21 May 2012 at 13:06:45 UTC, Dmitry Olshansky wrote:
On 21.05.2012 17:05, Dmitry Olshansky wrote:
On 21.05.2012 16:42, Thor wrote:
Hi,
I tried something like this...
auto m = match("a=42 b=32 c=22", regex(`^(?: \s* (\w+)=(\d+)
)+$`, `x`));
This works fine...
`^(?: \s* (\w+)=(\d+)
void put(int v){ arr ~= v; }
should be
void put(T v){ *arr ~= v; }
On Monday, 21 May 2012 at 11:26:33 UTC, simendsjo wrote:
Shouldn't the following work?
import std.range;
import std.stdio;
void main() {
int[] a;
a.reserve(10);
//a.put(1); // Attempting to fetch the front of an empty
array of int
a.length = 1;
writeln(a.length); // 1
On 21.05.2012 17:05, Dmitry Olshansky wrote:
On 21.05.2012 16:42, Thor wrote:
Hi,
I tried something like this...
auto m = match("a=42 b=32 c=22", regex(`^(?: \s* (\w+)=(\d+) )+$`, `x`));
This works fine...
`^(?: \s* (\w+)=(\d+) )+$`
... and if I duplicate the string x times, it also works...
On 21.05.2012 16:42, Thor wrote:
Hi,
I tried something like this...
auto m = match("a=42 b=32 c=22", regex(`^(?: \s* (\w+)=(\d+) )+$`, `x`));
This works fine...
`^(?: \s* (\w+)=(\d+) )+$`
... and if I duplicate the string x times, it also works...
But I'm hoping to parse a variable number of t
Hi,
I tried something like this...
auto m = match("a=42 b=32 c=22", regex(`^(?: \s* (\w+)=(\d+)
)+$`, `x`));
This works fine...
`^(?: \s* (\w+)=(\d+) )+$`
... and if I duplicate the string x times, it also works...
But I'm hoping to parse a variable number of these 'pairs'... so
I tried grou
Shouldn't the following work?
import std.range;
import std.stdio;
void main() {
int[] a;
a.reserve(10);
//a.put(1); // Attempting to fetch the front of an empty array of int
a.length = 1;
writeln(a.length); // 1
a.put(2);
writeln(a.length); // 0 - what?
writeln(a)
ref2401 wrote:
> i have an array of ubytes. how can i convert two adjacent ubytes
> from the array to an integer?
>
> pseudocode example:
> ubyte[5] array = createArray();
> int value = array[2..3];
>
> is there any 'memcpy' method or something else to do this?
Try to use littleEndianToNative o
On Saturday, May 19, 2012 17:28:46 maarten van damme wrote:
> and something partially unrelated, how do you copy a class by value?
You don't. If the class has a clone method (which would fairly typically be
called dup in D), then you can clone it, but classes are reference types, not
value types
12 matches
Mail list logo