fork download
  1. import alg = std.algorithm;
  2. import std.stdio;
  3. import std.string;
  4. import std.conv;
  5. import std.random;
  6.  
  7. string makeName(uint wordSize) {
  8. auto rnd = Random(unpredictableSeed);
  9. dchar[] newWord = new dchar[wordSize];
  10.  
  11. alg.fill(newWord[], randomCover(lowercase[], rnd));
  12.  
  13. return to!string(newWord);
  14. }
  15.  
  16. void main() {
  17. writeln(makeName(6));
  18. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/usr/lib/dmd2/src/phobos/std/random.d(868): Error: cast(dchar)(this._input[this._current]) is not an lvalue
/usr/lib/dmd2/src/phobos/std/random.d(885): Error: template std.random.uniform(string boundaries = "[)",T1,T2,UniformRandomNumberGenerator) if (is(CommonType!(T1,UniformRandomNumberGenerator) == void) && !is(CommonType!(T1,T2) == void)) does not match any function template declaration
/usr/lib/dmd2/src/phobos/std/random.d(885): Error: template std.random.uniform(string boundaries = "[)",T1,T2,UniformRandomNumberGenerator) if (is(CommonType!(T1,UniformRandomNumberGenerator) == void) && !is(CommonType!(T1,T2) == void)) cannot deduce template function from argument types !()(int,uint,MersenneTwisterEngine!(uint,32,624,397,31,-1727483681u,11,7,-1658038656u,15,-272236544u,18))
stdout
Standard output is empty