Re: Data structures and algorithms in D?

2018-10-08 Thread eastanon via Digitalmars-d-learn
On Monday, 8 October 2018 at 13:47:44 UTC, Russel Winder wrote: The purpose of these books is for students to learn the academic material, not the creation of production libraries. Most programming language libraries have all the algorithms coded up in the libraries. And for those algorithms th

Re: Data structures and algorithms in D?

2018-10-07 Thread eastanon via Digitalmars-d-learn
On Monday, 8 October 2018 at 05:18:35 UTC, bauss wrote: On Sunday, 7 October 2018 at 20:27:47 UTC, eastanon wrote: Are there reading resources on Data structures and Algorithms in D? There are several such books in the C/C++ and Java world and many senior/experienced D users might have come acr

Data structures and algorithms in D?

2018-10-07 Thread eastanon via Digitalmars-d-learn
Are there reading resources on Data structures and Algorithms in D? There are several such books in the C/C++ and Java world and many senior/experienced D users might have come across them in C. But for people who join D after reading Ali's book, a data structures and algorithms book in D would

Is there a suffix tree or suffix array implementations in D

2018-06-12 Thread eastanon via Digitalmars-d-learn
Maybe I have not searched well, but I am wondering whether there are suffix tree or suffix array implementations in D. I have seen a couple from other programming languages and before I translate one to D, there could be a something existing already.

determining if array element is null

2018-06-02 Thread eastanon via Digitalmars-d-learn
Does D array implementation support an array of null values? int a[4] = null; But I ran into a type error while checking if a[i] is null foreach(i; 0..3){ if(i == null){ writeln("it is null"); } } } How do you set fixed size array of null values and check if they are null?

Re: What's the purpose of the 'in' keyword ?

2018-05-28 Thread eastanon via Digitalmars-d-learn
On Sunday, 27 May 2018 at 16:00:15 UTC, Jonathan M Davis wrote: On Sunday, May 27, 2018 16:28:56 Russel Winder via Digitalmars-d-learn wrote: [...] Honestly, I'd suggest that folks never use in at this point. There's zero benefit to it. In principle, in was supposed to be const scope, but sc

Looking for a mentor in D

2017-10-02 Thread eastanon via Digitalmars-d-learn
I have been reading the D forums for a while and following on its amazing progress for a long time. Over time I have even written some basic D programs for myself, nothing major or earth shuttering. I have downloaded and read Ali's excellent book. I would like to dive deeper into D, however s

Re: parsing fastq files with D

2016-03-29 Thread eastanon via Digitalmars-d-learn
On Thursday, 24 March 2016 at 06:34:51 UTC, rikki cattermole wrote: void popFront() { import std.string : indexOf; if (source is null) {

Re: parsing fastq files with D

2016-03-24 Thread eastanon via Digitalmars-d-learn
On Thursday, 24 March 2016 at 13:38:32 UTC, Marc Schütz wrote: Yes, it's read into your processes memory. You can use std.mmfile [1] to make things a bit more efficient. It will, too, read the data into memory, but it will do so in a way (memory mapping) that only loads what is actually accesse

Re: parsing fastq files with D

2016-03-24 Thread eastanon via Digitalmars-d-learn
On Thursday, 24 March 2016 at 06:34:51 UTC, rikki cattermole wrote: As a little fun thing to do I implemented it for you. It won't allocate. Making this perfect for you. With a bit of work you could make Result have buffers for result instead of using the input array allow for the source to be

parsing fastq files with D

2016-03-23 Thread eastanon via Digitalmars-d-learn
Fastq is a format for storing DNA sequences together with the associated quality information often encoded in ascii characters. It is typically made of 4 lines for example 2 fastq entries would look like this. @seq1 TTAAAT + ?+BBB/DHH@ @seq2 GACCCTTTGCA + ?+BHB/DIH@ I do not have a lot o