Chains

2019-09-16 Thread Brett via Digitalmars-d-learn
memory because many nodes will have overlapping chains, there is no reason to store them all separately as it will waste several orders of magnitude of space. The idea is to create arrays of arrays and to reuse parts of the arrays that will be common and to slice parts of the arrays and append

Blog Post Rewrite - Callback Signal Chains

2019-05-29 Thread Ron Tarrant via Digitalmars-d-learn
While doing screenshots for the gtkDcoding blog (See? I'm working on it.) I discovered something cool about signal callback chains in GtkD. So, I ended up rewriting the code and the blog post to include this coolness. You can read it here: http://gtkdcoding.com/2019/02/19/0011-cal

Re: compatible types for chains of different lengths

2015-11-17 Thread Jon D via Digitalmars-d-learn
On Tuesday, 17 November 2015 at 23:22:58 UTC, Brad Anderson wrote: One solution: [snip] Thanks for the quick response. Extending your example, here's another style that works and may be nicer in some cases. import std.stdio; import std.range; import std.algorithm; void main(string[] arg

Re: compatible types for chains of different lengths

2015-11-17 Thread Brad Anderson via Digitalmars-d-learn
On Tuesday, 17 November 2015 at 22:47:17 UTC, Jon D wrote: I'd like to chain several ranges and operate on them. However, if the chains are different lengths, the data type is different. This makes it hard to use in a general way. There is likely an alternate way to do this that I'

compatible types for chains of different lengths

2015-11-17 Thread Jon D via Digitalmars-d-learn
I'd like to chain several ranges and operate on them. However, if the chains are different lengths, the data type is different. This makes it hard to use in a general way. There is likely an alternate way to do this that I'm missing. A short example: $ cat chain.d import std.std