Re: simpledisplay.d now works on as 64 bit on X

2013-06-02 Thread bearophile
Andrej Mitrovic: This is why we have core.std.config: import core.stdc.config : c_long, c_ulong; Why isn't that linked in this page? http://dlang.org/phobos/std_stdint.html I'd like to open a little documentation enhancement request for that. Bye, bearophile

Re: simpledisplay.d now works on as 64 bit on X

2013-06-02 Thread bearophile
Why isn't that linked in this page? http://dlang.org/phobos/std_stdint.html It seems it lacks some of them, this gives an import error: import core.stdc.config: c_ulonglong, c_longlong; Bye, bearophile

Re: simpledisplay.d now works on as 64 bit on X

2013-06-02 Thread bearophile
Andrei Alexandrescu: And while you are at it, please also contribute the corresponding pull request. Time to inaugurate bearophile's additions! As my friend, please understand, I can't afford to get addicted to that :-) Hugs, bearophile

Re: simpledisplay.d now works on as 64 bit on X

2013-06-02 Thread bearophile
Andrej Mitrovic: Because it's on this page: http://dlang.org/interfaceToC.html It seems it lacks some of them, this gives an import error: import core.stdc.config: c_ulonglong, c_longlong; Again see http://dlang.org/interfaceToC.html Good, thank you. I missed that. Bye, bearophile

Re: DConf 2013 Day 2 Talk 4: Web Development in D by Vladimir Panteleev

2013-06-03 Thread bearophile
Andrei Alexandrescu: http://www.reddit.com/r/programming/comments/1fkr5s/dconf_2013_day_2_talk_4_web_development_in_d_by/ On Reddit they seem to suggest the idea of good stack traces for fibers... Bye, bearophile

Re: DConf 2013 Day 2 Talk 5: A Precise Garbage Collector for D by Rainer Schütze

2013-06-05 Thread bearophile
Andrei Alexandrescu: http://www.reddit.com/r/programming/comments/1fpw2r/dconf_2013_day_2_talk_5_a_precise_garbage/ Is this useful to make the GC precise regarding the stack too? http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.19.5570 Bye, bearophile

Re: DConf 2013 Day 2 Talk 5: A Precise Garbage Collector for D by Rainer Schütze

2013-06-05 Thread bearophile
SomeDude: Is this useful to make the GC precise regarding the stack too? http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.19.5570 Bye, bearophile Here is the blog post deadalnix is referring about at the very end of the video: http://www.deadalnix.me/2012/03/05/impact-of-64bits-vs

Re: DConf 2013 Day 2 Talk 6: Higgs, an experimental JIT compiler written in D by Maxime Chevalier-Boisvert

2013-06-08 Thread bearophile
x27;s hard to guess the size and signedness of types as byte, ubyte, wchar, dchar. I prefer names that are more clear. Bye, bearophile

Re: DConf 2013 Day 2 Talk 6: Higgs, an experimental JIT compiler written in D by Maxime Chevalier-Boisvert

2013-06-08 Thread bearophile
Walter Bright: It would only be a trivial problem for 5 minutes, only for ex-C/C++ programmers who are used to suffering under variable sized ints, and will never be a problem again. Is it really a problem to guess the size of 'byte'? Or that 'ubyte' is unsigned? Come o

Re: simpledisplay.d now works on as 64 bit on X

2013-06-09 Thread bearophile
hdcMem = CreateCompatibleDC(hdc); HBITMAP hbmOld = SelectObject(hdcMem, s.handle); GetObject(i.handle, bm.sizeof, &bm); << Bye, bearophile

Re: simpledisplay.d now works on as 64 bit on X

2013-06-09 Thread bearophile
-) oops fixed. After this you will probably be more careful in future, to avoid similar bugs :-) Bye and thank you, bearophile

Re: simpledisplay.d now works on as 64 bit on X

2013-06-09 Thread bearophile
m the window menu on the top left. Bye, bearophile

Re: simpledisplay.d now works on as 64 bit on X

2013-06-09 Thread bearophile
tting library that allows me to plot data with few lines of code. This allows me to visualize intermediate data during debugging, like arrays, so it improves my understanding of data and such data. Bye, bearophile

Re: simpledisplay.d now works on as 64 bit on X

2013-06-09 Thread bearophile
good idea to put the resulting large library in Phobos, because everyone has different needs and tastes regarding GUI toolkits. Bye, bearophile

Re: DConf 2013 Day 3 Talk 1: Metaprogramming in the Real World by Don Clugston

2013-06-11 Thread bearophile
Steven Schveighoffer: I have no doubt that solar technology will continue to innovate, but the worst thing we can do right now is subsidize it. When it's ready (and it will be), it will succeed on its own merits. The situation is far more complex than that. Bye, bearophile

Re: DConf 2013 Day 3 Talk 2: Code Analysis for D with AnalyzeD by Stefan Rohe

2013-06-12 Thread bearophile
ct)< I think the built-in unit test system should be improved, so in _most_ cases there's no need to use a second unittest system. Bye, bearophile

Re: DConf 2013 Day 3 Talk 2: Code Analysis for D with AnalyzeD by Stefan Rohe

2013-06-12 Thread bearophile
o be thoroughly field-tested before it becomes clear how good or bad it is. Maybe checked exceptions are bad only for the type system of Java. Maybe for a language that has global type inferencing on the exceptions such feature becomes better. Bye, bearophile

Re: DConf 2013 Day 3 Talk 2: Code Analysis for D with AnalyzeD by Stefan Rohe

2013-06-12 Thread bearophile
encer for exceptions. Bye, bearophile

Re: DConf 2013 Day 3 Talk 2: Code Analysis for D with AnalyzeD by Stefan Rohe

2013-06-12 Thread bearophile
tions, but forces you to catch exceptions somewhere, assuring no holes remain if you don't want holes. Bye, bearophile

Re: DConf 2013 Day 3 Talk 2: Code Analysis for D with AnalyzeD by Stefan Rohe

2013-06-12 Thread bearophile
IDE) what are the current exceptions that can happen there. - If you don't handle exceptions in the main, your program will throw them. If you annotate a function with nothrow then the type system forces you to handle all the possible exceptions of that function inside the function. Bye, bearophile

Re: DConf 2013 Day 3 Talk 2: Code Analysis for D with AnalyzeD by Stefan Rohe

2013-06-12 Thread bearophile
Walter Bright: See the link to Bruce Eckel's article I posted in this thread. Mine was a rhetorical question :-) Bye, bearophile

Re: xUnit Testing Framework for D

2013-06-12 Thread bearophile
code like this: final switch (color) { case Color.red: With code like: final switch (color) with (Color) { case red: Bye, bearophile

Re: DConf 2013 Day 3 Talk 2: Code Analysis for D with AnalyzeD by Stefan Rohe

2013-06-13 Thread bearophile
toChars()); with a little cleanup and a wrapper macro and I think that would be good. Maybe with a compiler switch syntax like: -D:+-switch1,...,+-switchn Using a command like? -D:+contracts Bye, bearophile

Re: DConf 2013 Day 2 Talk 6: Higgs, an experimental JIT compiler written in D by Maxime Chevalier-Boisvert

2013-06-13 Thread bearophile
er: http://lambda-the-ultimate.org/node/4762 The question: C's type system can be seen as a constraint checker; Haskell's as a constraint solver. If you had a general purpose constraint solver at compile-time what could you use it for other than type checking?< Bye, bearophile

Re: DConf 2013 Day 3 Talk 2: Code Analysis for D with AnalyzeD by Stefan Rohe

2013-06-14 Thread bearophile
Bye, bearophile

Re: DConf 2013 Day 3 Talk 2: Code Analysis for D with AnalyzeD by Stefan Rohe

2013-06-14 Thread bearophile
ere's one D design problem here. Bye, bearophile

Re: DConf 2013 Day 3 Talk 2: Code Analysis for D with AnalyzeD by Stefan Rohe

2013-06-15 Thread bearophile
-and-guess, and different static analysers will digest different amounts of D syntax and semantics, causing those contracts to be not portable across static analysers. Both Ada and Liquid Haskell avoids all this. Bye, bearophile

Re: DConf 2013 Day 3 Talk 2: Code Analysis for D with AnalyzeD by Stefan Rohe

2013-06-15 Thread bearophile
I don't understand this topic well enough, so I am not saying useful things. Thank you for your comments Timon... Bye, bearophile

Re: DConf 2013 Day 3 Talk 4: LDC by David Nadlinger

2013-06-17 Thread bearophile
submitted by me). If you have a link to the PFFT code them maybe I can do that myself. Slide 25: Implicit invariants often hard to track down Then maybe it's a good idea to add such invariants to the dmd front-end code, even before its port to D. Bye, bearophile

Re: Call for D articles

2013-06-18 Thread bearophile
more D-iomatic, both in formatting and in idioms/style. Like using contracts, not using core C functions, using pascalCase, etc. (Such changes are many, but they are quick and easy to do.) Bye, bearophile

Re: Call for D articles

2013-06-18 Thread bearophile
Paulo Pinto: Thanks for the input, I will take it for an updated version of the article, if it just stays on my web site. I suggest to also offer a plain text (un-colorized) version of the code. I have spent minutes to convert it. Bye, bearophile

Re: DConf 2013 Day 3 Talk 5: Effective SIMD for modern architectures by Manu Evans

2013-06-20 Thread bearophile
v * invSamples; - - - - - - I'll take a better look at ispc. Bye, bearophile

Re: DConf 2013 Day 3 Talk 5: Effective SIMD for modern architectures by Manu Evans

2013-06-20 Thread bearophile
will expect something functionally like __builtin_prefetch to be available in D too: http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-g_t_005f_005fbuiltin_005fprefetch-3396 Thank you, bye, bearophile

Re: [Phoronix] D Language Still Showing Promise, Advancements

2013-06-20 Thread bearophile
iche at a level lower than D). In threads where both Rust and D are discussed, I suggest everybody to not express bad opinions in general about Rust. If you want to criticize Rust then I suggest to write only on very specific features at a time. Bye, bearophile

Re: DConf 2013 Day 3 Talk 5: Effective SIMD for modern architectures by Manu Evans

2013-06-23 Thread bearophile
Manu: This is interesting. I didn't know about this. An important thing here is: what's the semantics present in that language that is missing in D (and that is useful for the optimizer)? Is it possible/worth to add it? Bye, bearophile

Re: D/Objective-C, extern (Objective-C)

2013-06-23 Thread bearophile
possible and good to replace it with some UDA? I'm planning to create a DIP for this and would really like this to be folded into main line. It seems contain some different things/syntax. I don't know how much Walter&Co will appreciate it. Bye, bearophile

Re: D/Objective-C, extern (Objective-C)

2013-06-24 Thread bearophile
obably each one new thing introduced needs a separate discussion. Bye, bearophile

Re: D/Objective-C, extern (Objective-C)

2013-06-24 Thread bearophile
nted syntax, or because the compiler recovering of errors must consider more possibilities), the compiler gets a little larger. Thinking that some new syntax has no costs is very wrong. Bye, bearophile

Re: DConf 2013 Day 2 Talk 5: A Precise Garbage Collector for D by Rainer Schütze

2013-06-27 Thread bearophile
standardized kind of tagged union): http://d.puremagic.com/issues/show_bug.cgi?id=5057 In an Algebraic there is run-time information for the GC to decide if inside it there are pointers to follow or not. It's mostly a matter of letting the GC recognize and use such information. Bye, bearophile

Re: DConf 2013 Day 2 Talk 5: A Precise Garbage Collector for D by Rainer Schütze

2013-07-01 Thread bearophile
x27;t change the contents and the type of an algebraic variable once it is assigned. So usually you call gc_emplace only once for one of such variables). Bye, bearophile

Re: DConf 2013 Day 3 Talk 5: Effective SIMD for modern architectures by Manu Evans

2013-07-12 Thread bearophile
ere close to such good/efficient usage of SIMD instructions. And the compiler is also able to spread the work on multiple cores. I think D is meant to be used for similar numerical code too, so perhaps the little amount of ideas contained in this very C-like language is worth stealing and adding to D. Bye, bearophile

Re: Complex networks in D

2013-07-16 Thread bearophile
the performance of such range-based code, writing benchmarks. Unfortunately often DMD doesn't compile it efficiently. Bye, bearophile

Re: Complex networks in D

2013-07-16 Thread bearophile
tail[_indexHead[a]]); auto r2 = iota(_sumTail[v], _sumTail[v + 1]).map!(a => _head[_indexTail[a]]); return chain(r1, r2); Anyway, thanks very much for the useful feedback :-) You are welcome, bye, bearophile

Re: Complex networks in D

2013-07-16 Thread bearophile
t more readable. Bye, bearophile

Re: monarch dodra granted write access to phobos, druntime, and tools

2013-07-24 Thread bearophile
Andrei Alexandrescu: We must find a solution to reviewing pull requests, and fast. I agree. Maybe this could help: http://code.google.com/p/gerrit/ Bye, bearophile

Re: Article: Increasing the D Compiler Speed by Over 75%

2013-07-25 Thread bearophile
emory used by dmd, is it a good idea to add a compilation switch like "-cgc" that switches on a garbage collector for the compiler (disabled on default)? Bye, bearophile

Re: Article: Increasing the D Compiler Speed by Over 75%

2013-07-25 Thread bearophile
ve strategies is more fit for the needs of dmd compilation. (I think that currently the Python dicts are using a hashing strategy different from the built-in dictionaries of D. The Python style of hashing was implemented in D some months ago, but I don't remember what happened to that project later). Bye, bearophile

Re: Article: Increasing the D Compiler Speed by Over 75%

2013-07-26 Thread bearophile
Paul Hsieh has given more precise suggestions, he's kind of expert on such matters. Bye, bearophile

Re: Article about "Applied D"

2013-07-30 Thread bearophile
Chris: http://wendlerchristoph.wordpress.com/2013/07/30/probably-d/ [Python] copyright issues (easily decompilable byte code)< Is that true? For small D examples I suggest the Rosettacode site (when its site isn't down). Bye, bearophile

Re: dmc 8.57 now available for download

2013-08-01 Thread bearophile
Walter Bright: http://www.digitalmars.com/download/freecompiler.html Using it to compile dmd for win32 will result in a faster dmd. Thank you, I'll try it soon. A faster compilation of dmd, or a faster running dmd, or both? :-) Bye, bearophile

Re: dmc 8.57 now available for download

2013-08-01 Thread bearophile
x27;(null)' tdb => 'symc.tdb' dmc -c -Iroot;\dm\include -o -cpp -DDM_TARGET_CPU_X86=1 staticassert Compiling for C++ source <= 'staticassert.c' obj => 'staticassert.obj' dep => '(null)' lst => '(null)' sym => '(null)' tdb => 'symc.tdb' dmc -c -Iroot;\dm\include -o -cpp -DDM_TARGET_CPU_X86=1 identifier Compiling for C++ source <= 'identifier.c' obj => 'identifier.obj' dep => '(null)' lst => '(null)' sym => '(null)' tdb => 'symc.tdb' dmc -c -Iroot;\dm\include -o -cpp -DDM_TARGET_CPU_X86=1 mtype Compiling for C++ source <= 'mtype.c' obj => 'mtype.obj' dep => '(null)' lst => '(null)' sym => '(null)' tdb => 'symc.tdb' nbytes = 80031, ph_maxsize = 65520 Internal error: ph.c 1854 --- errorlevel -1073741510 Bye, bearophile

Re: dmc 8.57 now available for download

2013-08-01 Thread bearophile
Walter Bright: Fixed. Do you mean that if I download the dmc zip again it will work? Bye, bearophile

Re: dmc 8.57 now available for download

2013-08-02 Thread bearophile
Walter Bright: Yes, unless I screwed it up again. It works now, thank you. Bye, bearophile

Re: Component programming with ranges

2013-08-06 Thread bearophile
#post-ibbicmqochwtirxdbmud:40forum.dlang.org Bye, bearophile

Re: SIMD implementation of dot-product. Benchmarks

2013-08-17 Thread bearophile
inedocs/gcc/Function-Specific-Option-Pragmas.html#Function-Specific-Option-Pragmas Bye, bearophile

Re: I'm porting some go code to D

2013-08-24 Thread bearophile
David Nadlinger: It's a cute idea, but not really practical, I'm afraid – Goroutines are managed by a scheduler in the Go runtime library, whereas D threads directly map to OS threads. Can't Rory McGuire add a scheduler to his code? How much code does it take? Bye, bearophile

Re: Implementing and optimizing a simple graph metric

2013-09-18 Thread bearophile
very large graphs, so you have to add even more logic to allocate the arrays on the C heap if they are too much large. This could be useful if you call betweenness() many many times. - Try to optionally accept the buffers from outside. Bye, bearophile

Re: Implementing and optimizing a simple graph metric

2013-09-18 Thread bearophile
ite 0 for integral-types, 0.0 for floating-point. Right. And this could be right even if you want T=Rational. Bye, bearophile

Re: Implementing and optimizing a simple graph metric

2013-09-18 Thread bearophile
d buffers) helps. Bye, bearophile

Re: Implementing and optimizing a simple graph metric

2013-09-24 Thread bearophile
and time the two versions of the code, with and without uninitializedArray. If the GC is the cause of speed differences and you disable it, you will see no performance difference any more. Bye, bearophile

Re: Implementing and optimizing a simple graph metric

2013-09-26 Thread bearophile
slowdown, I am saying that in general uninitializedArray is less safe. Bye, bearophile

Re: Implementing and optimizing a simple graph metric

2013-09-26 Thread bearophile
rding future changes in your code. Bye, bearophile

Re: Implementing and optimizing a simple graph metric

2013-09-26 Thread bearophile
) the whole code that depends on that type (like the body of this function of yours) will keep working as safely as before :-) Bye, bearophile

Re: D programming talk at OSDC 2013

2013-10-12 Thread bearophile
Joakim: http://www.reddit.com/r/programming/comments/1o85hy/d_programming_talk_at_osdc_2013/ They contain several details that I'd like to write differently. Bye, bearophile

Re: D programming talk at OSDC 2013

2013-10-12 Thread bearophile
Walter Bright: Why not do a presentation/article? Is that an answer to me? A presentation/article about slide details that I think are not the best? Bye, bearophile

Re: Start of dmd 2.064 beta program

2013-10-16 Thread bearophile
Walter Bright: I'll go have myself flogged, then. But please be gentle and use something soft, like a fake snow leopard tail: http://img.photobucket.com/albums/v310/musta.surma/Hpim4850.jpg Bye, bearophile

Re: Start of dmd 2.064 beta program

2013-10-31 Thread bearophile
name helps avoid mistakes like those ".c" extensions in the C++ sources, that numerous persons keep criticizing. The advantages of a standard suffix for D code are way larger than the disadvantages. Bye, bearophile

Re: [OT?] LLVM Conference 2013 Videos Up

2013-12-18 Thread bearophile
code will become increasingly important. @annotations don't suffice. Bye, bearophile

Re: legacy code retreat's triva game : the D version

2013-12-20 Thread bearophile
marcpmichel: Here is the ugly thing : https://github.com/jbrains/trivia/tree/master/d And wrong: if (rand.front() % 9 == 7) { Bye, bearophile

Re: legacy code retreat's triva game : the D version

2013-12-20 Thread bearophile
marcpmichel: Do you mean I should have used : if (uniform(0,10) == 7) { instead ? Right. Using % introduces a bias. Bye, bearophile

Re: legacy code retreat's triva game : the D version

2013-12-21 Thread bearophile
) counts[uniform(0, $)]++; Bye, bearophile

Re: legacy code retreat's triva game : the D version

2013-12-21 Thread bearophile
hing it to always put "immutable" at the foreach variable, unless you want to mutate it or if you can't use const/immutable for some other reason. Probably I can invent you more creative answers if you want. Bear hugs, bearophile

Re: Call D code from C#

2014-01-09 Thread bearophile
anthony: The only problem that concerns me is the lack of a UI library to use with the language. GTK+ is not an option for me. Qt is but I do not see any way to use it from D. Is QtD not good enough? Bye, bearophile

Re: Range-Based Graph Search in D (blog post)

2014-01-09 Thread bearophile
string s2) pure => s1.zip(s2).count!(ab => ab[0] != ab[1]); It's a use case for some tuple unpacking syntax: enum dist = (in string s1, in string s2) pure => s1.zip(s2).count!(@{a, b} => a != b); Bye, bearophile

Re: dmd 2.065 beta 1

2014-01-20 Thread bearophile
Bye, bearophile

Re: So, You Want To Write Your Own Programming Language?

2014-01-22 Thread bearophile
are only few lines long (often 2-3 lines long, with some functions up to 10-13 lines long). Bonus: the cute idea of a language for students: http://www.iro.umontreal.ca/~felipe/IFT2030-Automne2002/Complements/tinyc.c (On Reddit I seem to see some comments, like structs not allowing constructors?) Bye, bearophile

Re: So, You Want To Write Your Own Programming Language?

2014-01-22 Thread bearophile
wer is negative. Bye, bearophile

Re: So, You Want To Write Your Own Programming Language?

2014-01-22 Thread bearophile
d.puremagic.com/issues/show_bug.cgi?id=11971 Bye, bearophile

Re: COMPO -> 2.064

2014-01-29 Thread bearophile
making them available (with DUB or on GitHub). This allows other projects to re-use those modules and reduce their size. Bye, bearophile

Re: Facebook open sources flint, a C++ linter written in D

2014-02-24 Thread bearophile
n't warn if you do kind of the opposite: alias MyArr = int[5000]; void foo(MyArr x) {} void main() {} Bye, bearophile

Re: Facebook open sources flint, a C++ linter written in D

2014-02-25 Thread bearophile
by C lints. Clang shows that you can add lot of lint-like tests to the compiler. I'd like some more tests in the D compiler. Bye, bearophile

Re: Facebook open sources flint, a C++ linter written in D

2014-02-25 Thread bearophile
king, but the time isn't worth it.< Bye, bearophile

Re: Facebook open sources flint, a C++ linter written in D

2014-02-25 Thread bearophile
Dicebot: It should be other way around - remove all such arguable warnings from compiler to dedicated lint tool and never add any single one to compiler. What are the advantages and disadvantages of doing as you say? Bye, bearophile

Re: Facebook open sources flint, a C++ linter written in D

2014-02-25 Thread bearophile
Paulo Pinto: End result being a portable macro assembler, as safe as, writing in pure assembly. I'd even like warnings active on default in D, plus a compiler switch to disable them. Lot of people in D.learn don't even activate warnings. Bye, bearophile

Re: Facebook open sources flint, a C++ linter written in D

2014-02-25 Thread bearophile
Dicebot: Those warning that _can_ be activated by default, should be just turned into errors. Same crap as with C. Programming is not a black/white thing (http://en.wiktionary.org/wiki/Manichaean#Adjective ) :-) Bye, bearophile

Re: Facebook open sources flint, a C++ linter written in D

2014-02-25 Thread bearophile
Andrei Alexandrescu: Ironically that's for the obsoleted C++ program. The D program is trivial to build. Oh, I didn't know/understand that. Sorry for the noise. Bye, bearophile

Re: My D book is now officially coming soon

2014-03-03 Thread bearophile
Now among the printed books about D there's Andrei book, the book about Tango, and your one. Plus there's Ali Çehreli online book, and probably more. Compared to other new languages like Scala there are far less books about D, but the situation is improving :-) Bye, bearophile

Re: 1st draft of complete class-based std.random successor

2014-03-19 Thread bearophile
rates uniforms in [0.0, 1.0]? :-) Bye, bearophile

Re: 1st draft of complete class-based std.random successor

2014-03-19 Thread bearophile
e conditional on improvements in the available allocation strategies. We will probably have the nice Andrei's allocators in Phobos, but not in a short time. So I suggest to not rely on them for std.random2. Bye, bearophile

Re: 1st draft of complete class-based std.random successor

2014-03-19 Thread bearophile
ready addressed in the current (or planned) std.random2. Another random one that was just commented by Infiltrator: https://d.puremagic.com/issues/show_bug.cgi?id=5901 Bye, bearophile

Re: 1st draft of complete class-based std.random successor

2014-03-20 Thread bearophile
but very fast function that generates uniforms in [0.0, 1.0]? :-) AFAIK, the allocation issue is only for ranges? Here I was not talking about allocations: https://d.puremagic.com/issues/show_bug.cgi?id=5240 Bye, bearophile

Re: Article: Functional image processing in D

2014-03-21 Thread bearophile
equivalent regular foreach-based processing code in C/D. Bye, bearophile

Re: Article: Functional image processing in D

2014-03-21 Thread bearophile
Andrei Alexandrescu: http://www.reddit.com/r/programming/comments/2101ti/functional_image_processing_in_d/ But I have suggested some improvements of the article :-( Bye, bearophile

Re: 1st draft of complete class-based std.random successor

2014-03-21 Thread bearophile
Joseph Rushton Wakeling: I think the following patch should fix that for you: https://github.com/WebDrake/std.random2/commit/fb5429de77b3c1f7fe3968fd0bd92209c9021f31 I've also made shuffle composable as per your request. Looks good? :-) Seems good. Onward! :-) Bye, bearophile

Re: 1st draft of complete class-based std.random successor

2014-03-22 Thread bearophile
an point to a typical naming practice from other languages? I'd like a permutations() range in std.range or std.combinatorics. permutation() sounds a bit too much close, despite it is inside another module. Bye, bearophile

Re: 1st draft of complete class-based std.random successor

2014-03-22 Thread bearophile
like (the boolean template argument is to specify if it has to copy the buffer or not): [1, 2, 3].permutations!false.writeln; Bye, bearophile

Re: 1st draft of complete class-based std.random successor

2014-03-22 Thread bearophile
51 "Strongly pure random generator": https://d.puremagic.com/issues/show_bug.cgi?id=5249 I hope a gaussian (normal distribution) generator is planned or present. Bye, bearophile

Re: 1st draft of complete class-based std.random successor

2014-03-23 Thread bearophile
Joseph Rushton Wakeling: int r = data[uniform!"[)"(0, data.length)]; D also accepts: immutable r = data[uniform!"[)"(0, $)]; Bye, bearophile

Re: 1st draft of complete class-based std.random successor

2014-03-23 Thread bearophile
roximate) but faster function implementation. Are the ddocs produced by std.random2 online somewhere? Bye, bearophile

Re: 1st draft of complete class-based std.random successor

2014-03-24 Thread bearophile
ned should be closed. Bye, bearophile

  1   2   3   4   5   6   7   >