digitalmars.D.learn - ported a sortable list from my old C code
- Codifies (6/6) Oct 13 2018 https://run.dlang.io/gist/b8b03ce3246951b5356db064ab68b22e
- Alex (2/9) Oct 13 2018 Something is wrong with the link :(
- Codifies (2/14) Oct 13 2018 gutted .... anywhere else I can post it?
- Codifies (2/3) Oct 13 2018 https://dpaste.dzfl.pl/af9e6f6ce53e
- Stanislav Blinov (6/7) Oct 13 2018 Yes. Use an array. No, really, use an array. Now, really, use an
- Steven Schveighoffer (4/13) Oct 13 2018 Yes, use mergesort instead of bubble sort. As I said, I will attempt to
https://run.dlang.io/gist/b8b03ce3246951b5356db064ab68b22e its a bit fugly at the moment and I want to use something other than a void pointer (any?) (the whole thing was very pointer centric as everything was malloc'd...) I'm not entirely sure it would benefit from turning into a class ? Does anyone has any ideas on improving this sortable list
Oct 13 2018
On Saturday, 13 October 2018 at 11:11:41 UTC, Codifies wrote:https://run.dlang.io/gist/b8b03ce3246951b5356db064ab68b22e its a bit fugly at the moment and I want to use something other than a void pointer (any?) (the whole thing was very pointer centric as everything was malloc'd...) I'm not entirely sure it would benefit from turning into a class ? Does anyone has any ideas on improving this sortable listSomething is wrong with the link :(
Oct 13 2018
On Saturday, 13 October 2018 at 11:28:08 UTC, Alex wrote:On Saturday, 13 October 2018 at 11:11:41 UTC, Codifies wrote:gutted .... anywhere else I can post it?https://run.dlang.io/gist/b8b03ce3246951b5356db064ab68b22e its a bit fugly at the moment and I want to use something other than a void pointer (any?) (the whole thing was very pointer centric as everything was malloc'd...) I'm not entirely sure it would benefit from turning into a class ? Does anyone has any ideas on improving this sortable listSomething is wrong with the link :(
Oct 13 2018
On Saturday, 13 October 2018 at 11:28:08 UTC, Alex wrote:Something is wrong with the link :(https://dpaste.dzfl.pl/af9e6f6ce53e
Oct 13 2018
On Saturday, 13 October 2018 at 11:11:41 UTC, Codifies wrote:Does anyone has any ideas on improving this sortable listYes. Use an array. No, really, use an array. Now, really, use an array. If reallocations while building your paths become a problem, you can write a deque (bucket array) or a dlist. But still, afterwards just convert it to array and use that.
Oct 13 2018
On 10/13/18 7:11 AM, Codifies wrote:https://run.dlang.io/gist/b8b03ce3246951b5356db064ab68b22e its a bit fugly at the moment and I want to use something other than a void pointer (any?) (the whole thing was very pointer centric as everything was malloc'd...) I'm not entirely sure it would benefit from turning into a class ? Does anyone has any ideas on improving this sortable listYes, use mergesort instead of bubble sort. As I said, I will attempt to add sorting to Phobos for slist and dlist. -Steve
Oct 13 2018