Re: Help the old man learn D

2015-06-27 Thread Charles Hawkins via Digitalmars-d-learn
On Friday, 26 June 2015 at 17:11:54 UTC, Marc Schütz wrote: On Friday, 26 June 2015 at 16:57:14 UTC, Charles Hawkins wrote: [...] I don't fully understand what you're doing, but functions can easily be turned into delegates using std.functional.toDelegate [1]: import std.functional :

Re: Help the old man learn D

2015-06-26 Thread Charles Hawkins via Digitalmars-d-learn
On Friday, 26 June 2015 at 15:33:25 UTC, Charles Hawkins wrote: On Friday, 26 June 2015 at 14:52:51 UTC, Marc Schütz wrote: On Friday, 26 June 2015 at 14:39:05 UTC, Charles Hawkins wrote: [...] I think I've answered my own question regarding the callbacks as well. I realized that the only

Help the old man learn D

2015-06-26 Thread Charles Hawkins via Digitalmars-d-learn
On Wednesday, 24 June 2015 at 16:21:47 UTC, weaselcat wrote: On Wednesday, 24 June 2015 at 07:52:10 UTC, Charles Hawkins wrote: On Wednesday, 24 June 2015 at 06:54:57 UTC, weaselcat wrote: On Tuesday, 23 June 2015 at 06:50:28 UTC, Charles Hawkins wrote: [...] you can instruct dub to use

Re: Help the old man learn D

2015-06-26 Thread Charles Hawkins via Digitalmars-d-learn
On Friday, 26 June 2015 at 14:52:51 UTC, Marc Schütz wrote: On Friday, 26 June 2015 at 14:39:05 UTC, Charles Hawkins wrote: Thanks. I've changed to thread topic to Help the old man learn D. :) logger package allows those statements to compile with gdc although I'm now getting lots of errors

Re: Program exited with code -11

2015-06-24 Thread Charles Hawkins via Digitalmars-d-learn
On Wednesday, 24 June 2015 at 06:54:57 UTC, weaselcat wrote: On Tuesday, 23 June 2015 at 06:50:28 UTC, Charles Hawkins wrote: On Tuesday, 23 June 2015 at 03:31:37 UTC, weaselcat wrote: On Tuesday, 23 June 2015 at 03:29:14 UTC, Charles Hawkins wrote: [...] Try to compile with either ldc or

Re: Program exited with code -11

2015-06-23 Thread Charles Hawkins via Digitalmars-d-learn
On Tuesday, 23 June 2015 at 11:18:07 UTC, anonymous wrote: On Tuesday, 23 June 2015 at 07:57:26 UTC, Charles Hawkins wrote: Sigh. I'm probably doing something stupid. I tried full paths: dmd -I+/home/charles/projects/d/mylib/source/mylib/ myprog.d What's that plus sign doing there? Looks

Re: Program exited with code -11

2015-06-23 Thread Charles Hawkins via Digitalmars-d-learn
On Tuesday, 23 June 2015 at 03:31:37 UTC, weaselcat wrote: On Tuesday, 23 June 2015 at 03:29:14 UTC, Charles Hawkins wrote: Thanks, Adam. I'm coming from OCaml and haven't seen a seg fault in years. Didn't recognize it. :D Hopefully I can figure it out from here. Try to compile with

Re: Program exited with code -11

2015-06-23 Thread Charles Hawkins via Digitalmars-d-learn
Try to compile with either ldc or gdc and the -g flag, it should give you a backtrace. dmd seems to not like linux wrt backtraces. ...I haven't had any success in compiling with anything but dub. gdc, dmd, rdmd always give me module mylib is in file 'mylib.d' which cannot be read on my

Re: Program exited with code -11

2015-06-23 Thread Charles Hawkins via Digitalmars-d-learn
On Tuesday, 23 June 2015 at 07:25:05 UTC, Baz wrote: On Tuesday, 23 June 2015 at 06:50:28 UTC, Charles Hawkins wrote: On Tuesday, 23 June 2015 at 03:31:37 UTC, weaselcat wrote: On Tuesday, 23 June 2015 at 03:29:14 UTC, Charles Hawkins wrote: Thanks, Adam. I'm coming from OCaml and haven't

Re: Program exited with code -11

2015-06-23 Thread Charles Hawkins via Digitalmars-d-learn
Ok, I think I've answered my own question. dub -v tells me what I need to know. Looks like I need to do a separate compile link, make file like, just like the old days, or have a very complicated command line. However, if there is a simple way to do the above, which it seems there should

Re: Program exited with code -11

2015-06-22 Thread Charles Hawkins via Digitalmars-d-learn
Thanks, Adam. I'm coming from OCaml and haven't seen a seg fault in years. Didn't recognize it. :D Hopefully I can figure it out from here.

Program exited with code -11

2015-06-22 Thread Charles Hawkins via Digitalmars-d-learn
My first attempt at a significant D program and I'm getting: Error executing command run: Program exited with code -11 How do I find out what that means?

Sample dub.json file

2015-06-22 Thread Charles Hawkins via Digitalmars-d-learn
This is my first project in D and I'm stumped. I have a library and I want to link some test programs to it using dub. I've tried a number of different things with no success. Can someone point me to a dub project with examples in a similar situation where maybe I can figure out what

Re: Sample dub.json file

2015-06-22 Thread Charles Hawkins via Digitalmars-d-learn
On Monday, 22 June 2015 at 14:01:19 UTC, Charles Hawkins wrote: This is my first project in D and I'm stumped. I have a library and I want to link some test programs to it using dub. I've tried a number of different things with no success. Can someone point me to a dub project with examples