Re: int C function

2011-09-30 Thread Ellery Newcomer
On 09/30/2011 08:20 PM, Andrej Mitrovic wrote: > I think this is a side-effect of the new function pointer fixes, where > you now can't implicitly convert an extern(C) function to an extern(D) > function by accident (and that's a good thing). But the problem is, > you can't define a function with a

Re: int C function

2011-09-30 Thread Ellery Newcomer
On 09/30/2011 08:20 PM, Andrej Mitrovic wrote: > I think this is a side-effect of the new function pointer fixes, where > you now can't implicitly convert an extern(C) function to an extern(D) > function by accident (and that's a good thing). But the problem is, > you can't define a function with a

Re: int C function

2011-09-30 Thread Christophe
Ellery Newcomer , dans le message (digitalmars.D.learn:29885), a écrit : > weird error. anyone know what's going on? > > [ellery@localhost d]$ cat test.d > extern(C) int puts(const char *s); > class X{ > @property void tt(int function(const char *) xz){ > } > } > void main(){ > X x = n

Re: int C function

2011-09-30 Thread Andrej Mitrovic
I think this is a side-effect of the new function pointer fixes, where you now can't implicitly convert an extern(C) function to an extern(D) function by accident (and that's a good thing). But the problem is, you can't define a function with a different linkage type inline as a type parameter. You

int C function

2011-09-30 Thread Ellery Newcomer
weird error. anyone know what's going on? [ellery@localhost d]$ cat test.d extern(C) int puts(const char *s); class X{ @property void tt(int function(const char *) xz){ } } void main(){ X x = new X(); x.tt = &puts; } [ellery@localhost d]$ dmd test test.d(8): Error: function test.X.

std.socket - problems closing socket

2011-09-30 Thread simendsjo
Not sure if this is a problem with std.socket, nginx or my knowledge of sockets. I'm pretty sure it's the last one. I'm experimenting with fastcgi on nginx, and the socket stays in TIME_WAIT even after I call socket.shutdown(SocketShutdown.BOTH); socket.close(); (Crossposted from SO: htt

Re: how do I use newsgroup server?

2011-09-30 Thread Nick Sabalausky
"yoyo" wrote in message news:j65ap4$oo6$1...@digitalmars.com... > > Hey Nick. > > I found this: > > http://www.digitalmars.com/webnews/newsgroups.php?renew=0&mid=29874&sign=plus#29874 > > This seems to work fine. I think I'll use this for surfing D.learn. > Thanks for your time! > A lot of peop

Re: how do I use newsgroup server?

2011-09-30 Thread Nick Sabalausky
"%u" wrote in message news:j65a5r$nhr$1...@digitalmars.com... > > > Directions look very promising. My outlook complains about > "problem connecting to the server". So, when I tried to ping the > ip address of news.digitalmars.com, all requests time out. > > So is it just that the server is down

Re: how do I use newsgroup server?

2011-09-30 Thread yoyo
Nick Sabalausky Wrote: > "%u" wrote in message news:j655f0$fm8$1...@digitalmars.com... > > Hello. > > > > I go to digitalmars to read digitalmars.D.learn newsgroup, but I > > have to click the http link. The http interface is kind of > > awkward. I'd like to try the newsgroup link. > > > > But,

Re: how do I use newsgroup server?

2011-09-30 Thread %u
== Quote from Nick Sabalausky (a@a.a)'s article > > I guess I don't know how to setup my outlook client to use the news > > link? When I click the news link. Nothing happens. > I don't have access to a Win7 machine ATM, but on both XP and Vista, you can > do: > Tools -> Accounts. There will be a

Re: how do I use newsgroup server?

2011-09-30 Thread Nick Sabalausky
"Nick Sabalausky" wrote in message news:j657vh$kda$1...@digitalmars.com... > "%u" wrote in message news:j656f0$hpm$1...@digitalmars.com... >> == Quote from Nick Sabalausky (a@a.a)'s article >>> "%u" wrote in message >> news:j655f0$fm8$1...@digitalmars.com... >>> > Hello. >>> > >>> > I go to dig

Re: how do I use newsgroup server?

2011-09-30 Thread Nick Sabalausky
"%u" wrote in message news:j656f0$hpm$1...@digitalmars.com... > == Quote from Nick Sabalausky (a@a.a)'s article >> "%u" wrote in message > news:j655f0$fm8$1...@digitalmars.com... >> > Hello. >> > >> > I go to digitalmars to read digitalmars.D.learn newsgroup, but > I >> > have to click the http l

Re: how do I use newsgroup server?

2011-09-30 Thread %u
== Quote from Nick Sabalausky (a@a.a)'s article > "%u" wrote in message news:j655f0$fm8$1...@digitalmars.com... > > Hello. > > > > I go to digitalmars to read digitalmars.D.learn newsgroup, but I > > have to click the http link. The http interface is kind of > > awkward. I'd like to try the news

Re: how do I use newsgroup server?

2011-09-30 Thread Nick Sabalausky
"Nick Sabalausky" wrote in message news:j6562i$gov$1...@digitalmars.com... > "%u" wrote in message news:j655f0$fm8$1...@digitalmars.com... >> Hello. >> >> I go to digitalmars to read digitalmars.D.learn newsgroup, but I >> have to click the http link. The http interface is kind of >> awkward.

Re: how do I use newsgroup server?

2011-09-30 Thread Nick Sabalausky
"%u" wrote in message news:j655f0$fm8$1...@digitalmars.com... > Hello. > > I go to digitalmars to read digitalmars.D.learn newsgroup, but I > have to click the http link. The http interface is kind of > awkward. I'd like to try the newsgroup link. > > But, I don't know how to use it. How do I?

OT: how do I use newsgroup server?

2011-09-30 Thread %u
Hello. I go to digitalmars to read digitalmars.D.learn newsgroup, but I have to click the http link. The http interface is kind of awkward. I'd like to try the newsgroup link. But, I don't know how to use it. How do I? Is there a client I can download and use for free that you recommend? I d

Re: WinRT

2011-09-30 Thread Jacob Carlborg
On 2011-09-30 12:58, Michel Fortin wrote: On 2011-09-29 21:23:48 +, RenatoL said: Hi all. What do you about WinRT? I think this new APIs could be a very interesting point for D... they are open to any language and i think that D is perfect to work with them. What's your opinion? Best regar

Re: "Sourcing" a script's env into D?

2011-09-30 Thread Graham Fawcett
On Thu, 29 Sep 2011 17:20:44 -0400, Steven Schveighoffer wrote: > On Thu, 29 Sep 2011 17:02:28 -0400, Nick Sabalausky wrote: > >> "Graham Fawcett" wrote in message >> news:j62ido$1n0s$1...@digitalmars.com... >>> On Thu, 29 Sep 2011 13:31:13 -0400, Nick Sabalausky wrote: >>> Due to process

Re: WinRT

2011-09-30 Thread Michel Fortin
On 2011-09-29 21:23:48 +, RenatoL said: Hi all. What do you about WinRT? I think this new APIs could be a very interesting point for D... they are open to any language and i think that D is perfect to work with them. What's your opinion? Best regards From what I understand, WinRT is based

Re: Why an abstract pointer cannot be used as value in an associate array?

2011-09-30 Thread Christophe
Cheng Wei , dans le message (digitalmars.D.learn:29865), a écrit : > Thanks a lot. This solves the problem. > > However, it breaks the abstractness. Now in D side, we can call > auto v = ab(). This does not make sense, because then &v cannot be used > in the C library. > > I don't understand why

Re: "Sourcing" a script's env into D?

2011-09-30 Thread Regan Heath
On Fri, 30 Sep 2011 07:18:34 +0100, Jacob Carlborg wrote: On 2011-09-29 19:31, Nick Sabalausky wrote: Due to process separation, the following won't work: script.sh: #!/bin/sh SOME_VAR=foobar test.d: import std.process; void main() { system("./script.sh"); assert(environment["SOME_