writeln wipes contents of variables ?

2016-01-21 Thread W.J. via Digitalmars-d-learn
Hi everybody! I'm new to D and trying to wrap my head around ranges. For a start I'm trying to take a input string and transform it, group it, etc. After each step I inspect the result. It works fine until step 3 where all of a sudden, after write(ln)ing the result, "step3" holds an array of

Re: Distribution of D apps

2016-01-21 Thread W.J. via Digitalmars-d-learn
On Wednesday, 20 January 2016 at 16:01:11 UTC, Dibyendu Majumdar wrote: Hi, I am trying to understand the options for distributing a D app to users. My assumption is that only the shared libraries and binaries need to be distributed, and I need to include the D libraries. Is this correct? T

Re: writeln wipes contents of variables ?

2016-01-21 Thread W.J. via Digitalmars-d-learn
On Thursday, 21 January 2016 at 13:15:46 UTC, Rikki Cattermole wrote: Ok so input ranges. An input range is a little bit like an iterator (if you know what that is). When an input range has been read fully, it is empty aka no longer has any values associated with it. writeln, reads an inpu

Re: Distribution of D apps

2016-01-21 Thread W.J. via Digitalmars-d-learn
On Thursday, 21 January 2016 at 14:03:03 UTC, FreeSlave wrote: On Thursday, 21 January 2016 at 13:26:15 UTC, W.J. wrote: On Wednesday, 20 January 2016 at 16:01:11 UTC, Dibyendu Majumdar wrote: [...] Hi, On Linux you can use 'ldd' to print shared library dependencies. On Windows you can use

Re: writeln wipes contents of variables ?

2016-01-21 Thread W.J. via Digitalmars-d-learn
On Thursday, 21 January 2016 at 14:36:36 UTC, Rikki Cattermole wrote: On 22/01/16 3:07 AM, W.J. wrote: On Thursday, 21 January 2016 at 13:15:46 UTC, Rikki Cattermole wrote: [...] Thanks for your reply. So writeln consumes the values in an InputRange. That leads me to believe that if I feed

Re: Linking C libraries with DMD

2016-01-21 Thread W.J. via Digitalmars-d-learn
On Thursday, 21 January 2016 at 16:14:40 UTC, jmh530 wrote: I'm trying to understand calling C libraries from D on Windows with DMD. I made a simple example and compiled it with a static library fine (so I've converted the .h file correctly). Then, I compiled with gcc to a shared library (becau

Re: Linking C libraries with DMD

2016-01-21 Thread W.J. via Digitalmars-d-learn
On Thursday, 21 January 2016 at 17:00:14 UTC, Andrea Fontana wrote: On Thursday, 21 January 2016 at 16:57:26 UTC, W.J. wrote: You need to port the header file to d. i believe there's the htod utility, however I haven't used that yet. You should try with dstep too. More info here: http://wiki.

Re: Linking C libraries with DMD

2016-01-21 Thread W.J. via Digitalmars-d-learn
On Thursday, 21 January 2016 at 23:07:06 UTC, jmh530 wrote: On Thursday, 21 January 2016 at 22:54:26 UTC, Dibyendu Majumdar wrote: On Thursday, 21 January 2016 at 22:49:06 UTC, jmh530 wrote: I'm not trying to created a shared library in D. My goal is to use a shared library from C in D. Right

Re: writeln wipes contents of variables ?

2016-01-21 Thread W.J. via Digitalmars-d-learn
On Thursday, 21 January 2016 at 21:59:10 UTC, Chris Wright wrote: On Thu, 21 Jan 2016 14:07:16 +, W.J. wrote: So writeln consumes the values in an InputRange. That leads me to believe that if I feed an InputRange to foreach, it will consume the values, too. Did I get that right ? In gene

Re: htod question

2016-01-21 Thread W.J. via Digitalmars-d-learn
On Friday, 22 January 2016 at 00:31:01 UTC, Dibyendu Majumdar wrote: I tried using htod but got errors as it could not handle the std C header files (Visual C++). And probably never will. D doesn't have a preprocessor so it's kind of hard to automate the process. How do people work around t

Re: htod question

2016-01-21 Thread W.J. via Digitalmars-d-learn
On Friday, 22 January 2016 at 01:04:50 UTC, Dibyendu Majumdar wrote: On Friday, 22 January 2016 at 01:03:09 UTC, Dibyendu Majumdar wrote: On Friday, 22 January 2016 at 00:52:59 UTC, W.J. wrote: Counter question: What's so bad about the D std library ? I am trying to create bindings for existi

Re: writeln wipes contents of variables ?

2016-01-22 Thread W.J. via Digitalmars-d-learn
On Friday, 22 January 2016 at 01:47:19 UTC, Rikki Cattermole wrote: Contrary to what it is called in the links, this is a NewsGroup/Mailing list and not a forum. So no editing ability :) I'll keep that in mind. Thanks :)

Re: writeln wipes contents of variables ?

2016-01-22 Thread W.J. via Digitalmars-d-learn
On Friday, 22 January 2016 at 01:49:58 UTC, anonymous wrote: On 22.01.2016 01:49, W.J. wrote: How can I identify those ranges, or, how can I tell if any particular range has value semantics ? I didn't read any of this in the manual - not that I could remember anyways. Generally you shouldn't