Three^WFour Cool Things about D by Andrei Alexandrescu at NDC 2014
Enjoy, vote, and discuss! https://news.ycombinator.com/newest https://twitter.com/D_Programming/status/476010235493371904 http://www.reddit.com/r/programming/comments/27p6c8/threewfour_cool_things_about_d_by_andrei/ https://www.facebook.com/dlang.org/posts/862873807059635 Andrei
hap.random: a new random number library for D
Hello all, Some of you may remember my earlier draft of a class-based std.random successor: http://forum.dlang.org/thread/cyytvhixkqlbwkmiu...@forum.dlang.org Following revisions made in response to feedback, and some further development, I decided that it would be best to release the results as a dub package with a new library name: http://code.dlang.org/packages/hap Source code and documentation is available here: https://github.com/WebDrake/hap http://code.braingam.es/hap/random/ I've also written a blog post describing new features and the motivations behind this library: http://braingam.es/2014/06/hap-random-a-new-random-number-library-for-d/ I think that hap.random fixes certain fundamental design issues with std.random. However, this needs to be put to the test in the wild, so I'd really appreciate it if as many people as possible could try it out with their code, and report on the experience: * Does it run faster, slower, etc? * Do any undesirable memory allocation issues arise? * Is the API (broadly similar but not identical to std.random) pleasant to use? If it proves to be effective for everyone, then I will begin the process of submission as a new Phobos module. Thanks in advance for all testing and feedback. Best wishes, -- Joe
Re: hap.random: a new random number library for D
On Monday, 9 June 2014 at 18:09:21 UTC, Joseph Rushton Wakeling wrote: I've also written a blog post describing new features and the motivations behind this library: http://braingam.es/2014/06/hap-random-a-new-random-number-library-for-d/ I think that hap.random fixes certain fundamental design issues with std.random. However, this needs to be put to the test in the wild, so I'd really appreciate it if as many people as possible could try it out with their code, and report on the experience: * Does it run faster, slower, etc? * Do any undesirable memory allocation issues arise? * Is the API (broadly similar but not identical to std.random) pleasant to use? It definitely looks interesting. The 64bit MT is definitely something I'm after. I have a particularly strange need with PRNGs though. I need to easily make a bunch of child RNGs based off a master RNG. Nothing cryptographic about it but solely to make reasoning about generating random maps and worlds easier. That way changing one part of the algorithm (say city placement) doesn't affect how the map itself is generated, or vice-versa. It sounds like the reference types here would actually make my life much easier since I'd need to pass in RNGs into each section of the generation and would let me be a bit looser with how carefully i have to control access to them which is a good thing.
Re: Adam D. Ruppe's D Cookbook now available!
On 2014-05-28 20:14, Walter Bright wrote: http://www.packtpub.com/discover-advantages-of-programming-in-d-cookbook/book http://www.amazon.com/D-Cookbook-Adam-D-Ruppe/dp/1783287217 http://www.reddit.com/r/programming/comments/26pn00/d_cookbook_officially_published_consists_of_d/ After watching Adam's most excellent presentation at Dconf, I'm sure the book will be great! My copy gets here on Friday. Adam, I noticed that you mentioned DStep in the book. By reading the part about integrating with C++ I got the impression that DStep can handle C++. Currently, that's not the case. -- /Jacob Carlborg
Re: hap.random: a new random number library for D
On Monday, 9 June 2014 at 18:51:53 UTC, Ryan Voots wrote: It definitely looks interesting. The 64bit MT is definitely something I'm after. I have a particularly strange need with PRNGs though. I need to easily make a bunch of child RNGs based off a master RNG. Nothing cryptographic about it but solely to make reasoning about generating random maps and worlds easier. That way changing one part of the algorithm (say city placement) doesn't affect how the map itself is generated, or vice-versa. It sounds like the reference types here would actually make my life much easier since I'd need to pass in RNGs into each section of the generation and would let me be a bit looser with how carefully i have to control access to them which is a good thing. Sounds interesting -- I seem to recall we had some discussion about this a while back ... ? Anyway, glad to hear that the library may be useful for you. Let me know how you get on! :-)
K-Nearest Neighbor
Just found this: http://www.reddit.com/r/programming/comments/27qjxd/knearest_neighbor_in_d_language/ Andrei
Re: K-Nearest Neighbor
On 06/09/2014 06:34 PM, Andrei Alexandrescu wrote: Just found this: http://www.reddit.com/r/programming/comments/27qjxd/knearest_neighbor_in_d_language/ Andrei I wonder what bearophile's response will be. ;) Ali