On Tue, Dec 22, 2009 at 23:25, dsimcha dsim...@yahoo.com wrote:
The work you've done looks excellent and will probably get noticed a lot
more in a
few months when development of Phobos gets put back on the front burner. I
apologize for the relative silence on what looks to be lots of very
On Mon, Dec 21, 2009 at 23:44, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
This is a great example that I don't have the time to look into now. In
essence the task is to generate all numbers of the form 2^^a*3^^b*5^^c where
a, b, and c are natural numbers.
Currently Phobos
== Quote from Philippe Sigaud (philippe.sig...@gmail.com)'s article
--0016e6db29968796e0047b5716c2
Content-Type: text/plain; charset=ISO-8859-1
On Mon, Dec 21, 2009 at 23:44, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
This is a great example that I don't have the time to look
Philippe Sigaud:
merge2 is greedy and works only for two ranges (hence it's name), but I have
a templated, predicate-aliased, lazy, n-ranges version called merge in the
module.
This is how merge is implemented in the heapq module of the Python standard lib:
def merge(*iterables):
h = []
This is a great example that I don't have the time to look into now. In
essence the task is to generate all numbers of the form 2^^a*3^^b*5^^c
where a, b, and c are natural numbers.
Currently Phobos doesn't have the means to compute the cross-product of
ranges. I encourage people to think
Andrei Alexandrescu:
This is a great example that I don't have the time to look into now.
It's a nice example, and I know you don't have a lot of time to implement it
now.
Currently Phobos doesn't have the means to compute the cross-product of
ranges.
The idea is to have standard means in
Or are there any bugs/optimization opportunities I'm missing?
void qsort(T)(T[] array) {
if (array.length 2) return;
static int i;
auto pivot = array[i++%$];
// from is base-0, to is base-1.
int from = 0, to = array.length;
while (from != to) {
if (array[from] = pivot
downs wrote:
Or are there any bugs/optimization opportunities I'm missing?
void qsort(T)(T[] array) {
if (array.length 2) return;
static int i;
auto pivot = array[i++%$];
// from is base-0, to is base-1.
int from = 0, to = array.length;
while (from != to) {
if
Lutger wrote:
downs wrote:
Or are there any bugs/optimization opportunities I'm missing?
void qsort(T)(T[] array) {
if (array.length 2) return;
static int i;
auto pivot = array[i++%$];
// from is base-0, to is base-1.
int from = 0, to = array.length;
while (from != to) {
downs wrote:
Lutger wrote:
downs wrote:
Or are there any bugs/optimization opportunities I'm missing?
void qsort(T)(T[] array) {
if (array.length 2) return;
static int i;
auto pivot = array[i++%$];
// from is base-0, to is base-1.
int from = 0, to = array.length;
while
You can try translating this in efficient, readable and short D2 code using
Phobos2 (the purpose is to find spots where Phobos2 may need improvements):
http://rosettacode.org/wiki/Hamming_numbers#Haskell
Haskell version:
hamming = 1 : map (2*) hamming `merge` map (3*) hamming `merge` map (5*)
downs Wrote:
Or are there any bugs/optimization opportunities I'm missing?
void qsort(T)(T[] array) {
if (array.length 2) return;
static int i;
auto pivot = array[i++%$];
// from is base-0, to is base-1.
int from = 0, to = array.length;
while (from != to) {
if
Hello downs,
Or are there any bugs/optimization opportunities I'm missing?
void qsort(T)(T[] array) {
if (array.length 2) return;
static int i;
auto pivot = array[i++%$];
// from is base-0, to is base-1.
int from = 0, to = array.length;
while (from != to) {
if (array[from] = pivot
13 matches
Mail list logo