Re: D/Objective-C 64bit

2014-11-05 Thread Christian Schneider via Digitalmars-d-announce

What happens if you declare "doubleClickAction" like this:

void doubleClickAction(NSTableView sender) { ... }

That will probably require a cast when passing the selector to 
"setDoubleAction".


Hi Jacob

This just "delegates" the "problem" to another place. The
target/action paradigm in Cocoa programming gets a lot from the
fact that any object can be the sender of an action. In this
particular case I'd even prefer the conditional if the sender
"is" the local table view member var, which then basically has
the same effect as what you suggested above.

I think the best thing will be to fix the interface-to-class
casts in the compiler, as Michel suggests above.

Thanks again
Christian


porting nanomsg bindings to dlang

2014-11-05 Thread Laeeth Isharc via Digitalmars-d-announce

Hi.

Everyone has heard of ZeroMQ, but the creator (or one of the main 
guys) has been working on a successor framework written in C.  
(He has an interesting paper on why using C++ was a mistake - 
perhaps we should get him to look at D if he has not done so 
already).


In any case, I could not see a set of D bindings so I wrote a 
very rough first draft of them last night.  I only picked up D a 
couple of months back, and it's been about twenty years since I 
wrote much C (I am not a developer by trade), so be kind if the 
results are not yet quite up to scratch.


Link to the repository is here - not even worthy of alpha status:
https://github.com/Laeeth/d-nanomsg/tree/master

So far I have tried the first example from here (which works), 
and am working my way down to test the others:


http://tim.dysinger.net/posts/2013-09-16-getting-started-with-nanomsg.html



porting nanomsg bindings to dlang

2014-11-05 Thread Laeeth Isharc via Digitalmars-d-announce

examples here all work:
https://github.com/dysinger/nanomsg-examples/blob/master/README.org

but I have not tried any larger projects.



Re: porting nanomsg bindings to dlang

2014-11-05 Thread Matt Soucy via Digitalmars-d-announce
On 11/05/2014 01:12 PM, Laeeth Isharc wrote:
> Hi.
> 
> Everyone has heard of ZeroMQ, but the creator (or one of the main guys) has 
> been working on a successor framework written in C.  (He has an interesting 
> paper on why using C++ was a mistake - perhaps we should get him to look at D 
> if he has not done so already).
> 
> In any case, I could not see a set of D bindings so I wrote a very rough 
> first draft of them last night.  I only picked up D a couple of months back, 
> and it's been about twenty years since I wrote much C (I am not a developer 
> by trade), so be kind if the results are not yet quite up to scratch.
> 
> Link to the repository is here - not even worthy of alpha status:
> https://github.com/Laeeth/d-nanomsg/tree/master
> 
> So far I have tried the first example from here (which works), and am working 
> my way down to test the others:
> 
> http://tim.dysinger.net/posts/2013-09-16-getting-started-with-nanomsg.html
> 

A few small suggestions:

Use a .gitignore so you're not tracking the objects and executables
Convert to a dub package to make it easier for other people to incorporate into 
their projects
Split out the "test" code from the "library" code

-- 
Matt Soucy
http://msoucy.me/



signature.asc
Description: OpenPGP digital signature


Re: porting nanomsg bindings to dlang

2014-11-05 Thread Laeeth Isharc via Digitalmars-d-announce

Thanks.

I am slowly getting to grips with all these post-stone age 
innovations...


On Wednesday, 5 November 2014 at 20:24:41 UTC, Matt Soucy wrote:

On 11/05/2014 01:12 PM, Laeeth Isharc wrote:

Hi.

Everyone has heard of ZeroMQ, but the creator (or one of the 
main guys) has been working on a successor framework written 
in C.  (He has an interesting paper on why using C++ was a 
mistake - perhaps we should get him to look at D if he has not 
done so already).


In any case, I could not see a set of D bindings so I wrote a 
very rough first draft of them last night.  I only picked up D 
a couple of months back, and it's been about twenty years 
since I wrote much C (I am not a developer by trade), so be 
kind if the results are not yet quite up to scratch.


Link to the repository is here - not even worthy of alpha 
status:

https://github.com/Laeeth/d-nanomsg/tree/master

So far I have tried the first example from here (which works), 
and am working my way down to test the others:


http://tim.dysinger.net/posts/2013-09-16-getting-started-with-nanomsg.html



A few small suggestions:

Use a .gitignore so you're not tracking the objects and 
executables
Convert to a dub package to make it easier for other people to 
incorporate into their projects

Split out the "test" code from the "library" code