On 02/10/2012 08:38 PM, Ellery Newcomer wrote:
when I run
dmd -gc -oftopo topo.d multi_index.d replace.d
on the contents of
http://personal.utulsa.edu/~ellery-newcomer/bad.zip
in fedora 16 x86_64 with dmd 2.057 64 bit
dmd starts thrashing like there is no tomorrow and generally locks up my
On 02/12/2012 08:34 AM, Timon Gehr wrote:
It is a bug in your code:
- ForEachIndex!(N+1, L).result;
+ ForEachIndex!(N+1, L[1..$]).result;
The diagnostic DMD spits out is quite bad.
Wow.
In my defense, the original code is right; apparently dustmite did this
to the reduced case.
I know I
Loosing my time on skittles...
input abcd
desired output arcd
i want to use stride
snippet, where x and y are integer in real code:
string s1 = abcd;
s1 = s1[stride(s1,x)..y] ~ 'r' ~ s1[2..$];
if x = 0 and y = 0 - run time error. ok
if x = 0 and y = 1 - rcd (??)
if x = 1 and y = 0 -
On 02/12/2012 09:37 AM, RenatoL wrote:
Loosing my time on skittles...
input abcd
desired output arcd
i want to use stride
snippet, where x and y are integer in real code:
string s1 = abcd;
s1 = s1[stride(s1,x)..y] ~ 'r' ~ s1[2..$];
if x = 0 and y = 0 - run time error. ok
This is the code i compiled v. 2057 and parameters 0 1
import std.stdio;
import std.utf;
void main()
{
string s1 = abcd;
s1 = s1[stride(s1,0)..1] ~ 'r' ~ s1[2..$];
writeln(s1);
}
Mmmm this doesn't compile
import std.stdio;
import std.algorithm;
void main()
{
string s1 = abcd;
s1 = s1[stride(s1,0)..1] ~ 'r' ~ s1[2..$];
writeln(s1);
}
Error: undefined identifier stride, did you mean alias string?
Take a look at the following input:
naushika:~/tmp cat foo.d
import std.stdio;
File[string] files;
void main() {
files[test] = File(test, w);
files[test].writefln(meh: %s, heh);
}
naushika:~/tmp dmd foo.d
Internal error: ../ztc/cgcs.c 162
naushika:~/tmp dmd foo.d -O
On Sunday, February 12, 2012 13:00:16 Trass3r wrote:
dmd simply doesn't keep those information about aliases.
Exactly.
- Jonathan M Davis
On 02/12/2012 11:05 AM, RenatoL wrote:
Mmmm this doesn't compile
import std.stdio;
import std.algorithm;
void main()
{
string s1 = abcd;
s1 = s1[stride(s1,0)..1] ~ 'r' ~ s1[2..$];
writeln(s1);
}
Error: undefined identifier stride, did you mean alias string?
Because I
In this bug report they have fixed a problem with copy():
http://d.puremagic.com/issues/show_bug.cgi?id=7484#c2
There I have suggested to use memmove() when the array slices overlap (and the
items don't have a postblit). Do you know why memmove() is not good here?
David Simcha has already given
On 02/12/12 21:21, Vidar Wahlberg wrote:
Take a look at the following input:
naushika:~/tmp cat foo.d
import std.stdio;
File[string] files;
void main() {
files[test] = File(test, w);
files[test].writefln(meh: %s, heh);
}
naushika:~/tmp dmd foo.d
Internal error: ../ztc/cgcs.c
On 02/13/2012 12:15 AM, Eyyub wrote:
Hi all,
I'd like to know, why Object.factory(classname) failed with nested class ?
Source code : http://paste.pocoo.org/show/N6BJPMbGn2vVtJo649BJ/ .
Thanks in advance,
In theory it could work for only static local classes, but that does not
work too. It
On Sunday, 12 February 2012 at 23:33:26 UTC, Timon Gehr wrote:
In theory it could work for only static local classes, but that
does not work too. It is an arbitrary restriction. Classes
instantiated by Object.factory must reside at module scope.
Mmh, ok I understood !
Thanks a lot for your
In the online docs I've seen that std.string.maketrans() is (going to be)
deprecated.
How do you adapt this code to the new regime?
import std.stdio, std.string;
void main() {
char[] text = dssdadsdasdas.dup; // lots of MBs of pure 7 bit ASCII text
auto tab =
14 matches
Mail list logo