D Newbie Trying to Use D with Major C Libraries

2014-05-15 Thread Tom Browder via Digitalmars-d-learn
I am a volunteer developer with the well-known 3D CAD FOSS project BRL-CAD: http://brlcad.org I have wanted to use D for a long time but I hadn't taken the plunge. Yesterday I advertised to the BRL-CAD community my new project to attempt to create D bindings for BRL-CAD's C libraries, and I cre

Re: D Newbie Trying to Use D with Major C Libraries

2014-05-15 Thread Tom Browder via Digitalmars-d-learn
On Thu, May 15, 2014 at 8:24 PM, Craig Dillabaugh via Digitalmars-d-learn wrote: > On Friday, 16 May 2014 at 01:16:46 UTC, Craig Dillabaugh wrote: >> On Thursday, 15 May 2014 at 22:25:47 UTC, Tom Browder via >> Digitalmars-d-learn wrote: ... >>> What I have not seen yet i

Re: D Newbie Trying to Use D with Major C Libraries

2014-05-16 Thread Tom Browder via Digitalmars-d-learn
On Thu, May 15, 2014 at 9:56 PM, FrankLike via Digitalmars-d-learn wrote: ... > And use VisualD. Thanks for the suggestion, Frank, but I don't do windows. Best, -Tom

Re: D Newbie Trying to Use D with Major C Libraries

2014-05-16 Thread Tom Browder via Digitalmars-d-learn
On Fri, May 16, 2014 at 1:17 AM, Jacob Carlborg via Digitalmars-d-learn wrote: ... > On 15/05/14 23:27, Tom Browder via Digitalmars-d-learn wrote: ... >> I have been looking for specific information on creating D bindings >> from C headers for which there seems to be suffici

Re: D Newbie Trying to Use D with Major C Libraries

2014-05-16 Thread Tom Browder via Digitalmars-d-learn
On Fri, May 16, 2014 at 1:19 PM, Alex Herrmann via Digitalmars-d-learn wrote: > On Friday, 16 May 2014 at 10:10:17 UTC, Tom Browder via ... >> Thanks for the suggestion, Frank, but I don't do windows. ... > Monodevelop (open source C# dev platform) has a plugin for D by ... Thanks for the suggest

Re: D Newbie Trying to Use D with Major C Libraries

2014-05-16 Thread Tom Browder via Digitalmars-d-learn
On Fri, May 16, 2014 at 1:05 PM, Gary Willoughby via Digitalmars-d-learn wrote: > On Thursday, 15 May 2014 at 22:25:47 UTC, Tom Browder via .. >> What I have not seen yet is the exact way to build a D program which >> uses D bindings and its matching C library. I have just created a ... > For a s

Re: D Newbie Trying to Use D with Major C Libraries

2014-05-16 Thread Tom Browder via Digitalmars-d-learn
On Fri, May 16, 2014 at 1:05 PM, Gary Willoughby via Digitalmars-d-learn wrote: ... > Then take a look at one of my projects in which i've ported C headers to D. > > https://github.com/nomad-software/tcltk I notice your binding source files have a ".d" suffix. Is that the preferred convention?

Re: D Newbie Trying to Use D with Major C Libraries

2014-05-16 Thread Tom Browder via Digitalmars-d-learn
On Fri, May 16, 2014 at 2:31 PM, Gary Willoughby via Digitalmars-d-learn wrote: > On Friday, 16 May 2014 at 19:17:05 UTC, Dicebot wrote: >> Using .di is more idiomatic as those are supposed to denote >> declaration-only interface files (with no implementation). In practice it >> makes almost no di

Problems with dmd Switches in Makefiles

2014-05-17 Thread Tom Browder via Digitalmars-d-learn
I know I'm supposed to use dub, but I'm not ready. I just found out I can't use dmd switches for file names variable in a GNU makefile, e.g., see this fragment %.o : %.d dmd -c $< -of $@ which doesn't work because the "-of" must be followed immediately by a file name with no intervening sp

Re: Problems with dmd Switches in Makefiles

2014-05-17 Thread Tom Browder via Digitalmars-d-learn
On Sat, May 17, 2014 at 8:05 AM, via Digitalmars-d-learn wrote: > On Saturday, 17 May 2014 at 13:01:07 UTC, Tom Browder via > Digitalmars-d-learn wrote: ... >> I just found out I can't use dmd switches for file names variable in a >> GNU makefile, e.g., see this fragm

Re: D Newbie Trying to Use D with Major C Libraries

2014-05-17 Thread Tom Browder via Digitalmars-d-learn
On Sat, May 17, 2014 at 2:28 PM, Mengu via Digitalmars-d-learn wrote: > On Friday, 16 May 2014 at 18:19:45 UTC, Alex Herrmann wrote: ... >> integrates okay with dub too. There is also an emacs major mode >> for d (d-mode) which gives basic highlighting and indentation >> too. I use both all of the

Seeking Advice on D Bindings for Large C Library Collection

2014-05-20 Thread Tom Browder via Digitalmars-d-learn
I am working on a project to provide D binding files for the C/C++ FOSS BRL-CAD project: http://brlcad.org My work is on the "d-binding" branch and specifically here: http://sourceforge.net/p/brlcad/code/HEAD/tree/brlcad/branches/d-binding/misc/d-bindings/ My plan is to automatically gene

Re: Seeking Advice on D Bindings for Large C Library Collection

2014-05-20 Thread Tom Browder via Digitalmars-d-learn
On Tue, May 20, 2014 at 6:10 AM, Rikki Cattermole via Digitalmars-d-learn wrote: > On 20/05/2014 10:36 p.m., Tom Browder via Digitalmars-d-learn wrote: >> I am working on a project to provide D binding files for the C/C++ >> FOSS BRL-CAD project: ... >> (also with sub-dirs

Building any stand-alone ddoc

2014-06-07 Thread Tom Browder via Digitalmars-d-learn
Given a single ddoc source file (with no D source), how can one generate the default html output? I have tried: dmd -D -main ddoc.ddoc and get nothing except __main.* files with no documentation. Do I have to use CanDyDoc or bootDoc? They seem like overkill for a first effort. Thanks. -Tom

Re: Building any stand-alone ddoc [SOLVED]

2014-06-08 Thread Tom Browder via Digitalmars-d-learn
On Sat, Jun 7, 2014 at 10:59 AM, Tom Browder wrote: > Given a single ddoc source file (with no D source), how can one > generate the default html output? I solved the problem by starting with the build system for the D lang web site here: https://github.com/D-Programming-Language/dlang.org So

D aliases vs. C typedefs

2014-06-10 Thread Tom Browder via Digitalmars-d-learn
I haven't found a detailed description of simple aliases. TPDL shows aliases of this form: alias TYPE NAME; with some complex examples of D types aliased to a simpler name. The D lang web site language reference says nothing about aliases (except as it's described in the grammar), and the D l

Cannot alias null

2014-06-12 Thread Tom Browder via Digitalmars-d-learn
This will not compile: alias blah = null; The dmd message are: di/test_hdr.d(10): Error: basic type expected, not null di/test_hdr.d(10): Error: semicolon expected to close alias declaration di/test_hdr.d(10): Error: Declaration expected, not 'null' Are there any other objects that cannot be

Re: Cannot alias null

2014-06-12 Thread Tom Browder via Digitalmars-d-learn
On Thu, Jun 12, 2014 at 3:42 PM, H. S. Teoh via Digitalmars-d-learn wrote: > On Thu, Jun 12, 2014 at 03:26:13PM -0500, Tom Browder via Digitalmars-d-learn > wrote: >> This will not compile: >> >> alias blah = null; > [...] > > 'null' is a value, not a

Re: Cannot alias null

2014-06-12 Thread Tom Browder via Digitalmars-d-learn
On Thu, Jun 12, 2014 at 4:17 PM, Ali Çehreli wrote: > On 06/12/2014 02:06 PM, Tom Browder via Digitalmars-d-learn wrote: ... >> What I was really trying to do was D'ify C expressions like this: >> >>typedef ((struct t*)0) blah; ... >> So, taking your advice, I

Core dump with dstep on 64-bit Linux (Debian 7): testers needed

2014-06-12 Thread Tom Browder via Digitalmars-d-learn
I built dstep from this repo on a Debian Linux 64-bit system (after building and installing the dmd suite from its repos). But I'm having problems using it. Given a file t.h with sole contents: extern const char *const sys_errlist[]; I run dstep on it and get a core dump: $ dstep -x c -o t.d

Re: Cannot alias null

2014-06-12 Thread Tom Browder via Digitalmars-d-learn
On Thu, Jun 12, 2014 at 4:58 PM, Adam D. Ruppe via Digitalmars-d-learn wrote: > since null is a value maybe you want > > enum blah = null; That works. > you may also give it a type after the enum word But I can't get any other variant to work so far. -Tom

Re: Core dump with dstep on 64-bit Linux (Debian 7): testers needed

2014-06-12 Thread Tom Browder via Digitalmars-d-learn
On Thu, Jun 12, 2014 at 5:17 PM, Dicebot via Digitalmars-d-learn wrote: > confirmed and commmented in that issue Thank you! That makes me feel better, but I guess Jacob has a valid bug on his hands. It will be interesting to see the fix. Best regards, -Tom

Re: Cannot alias null

2014-06-13 Thread Tom Browder via Digitalmars-d-learn
On Fri, Jun 13, 2014 at 7:59 AM, via Digitalmars-d-learn wrote: > On Thursday, 12 June 2014 at 21:07:47 UTC, Tom Browder via > Digitalmars-d-learn wrote: >> >> What I was really trying to do was D'ify C expressions like this: >> >> typedef ((struct t*)0) blah

Re: Cannot alias null

2014-06-13 Thread Tom Browder via Digitalmars-d-learn
On Fri, Jun 13, 2014 at 10:15 AM, monarch_dodra via Digitalmars-d-learn wrote: > On Friday, 13 June 2014 at 15:05:49 UTC, Tom Browder via Digitalmars-d-learn > wrote: >> >> So I'm not sure how to translate that into D. I do know my first >> attempt here doe