Thread overview | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
October 06, 2012 The sorry state of the D stack? | ||||
---|---|---|---|---|
| ||||
Hi, the subject refers to my current state of sadness after trying to dig into D programming for a few days. I've been very exited after reading "The D programming language", but I've doubts now. - There's no "standard" library to read a single character from the console. Instead people write their own personal helper libraries. - I looked into GtkD, which refers to the build tool DSSS. However DSSS seems to be unmaintained for a couple of years. (Why does every new language needs its own build tool?) - I looked for a PostgreSQL client library. I found small personal hacks and dead projects. - I looked at http://www.dsource.org/forums - most forums are dead. Is it possible that D is a dead language? For a newbie like me it would be very helpful to have a list of good, healthy projects for my first steps in D instead of finding cadavers all around. Typesafe, the company behind Scala, maintains a "Typesafe Stack" of active, recommendable projects. Please don't be offended by this message. I just wanted to provide feedback and will keep trying to get into D. Thank you very much for this wonderful language! Best regards, Thomas Koch |
October 06, 2012 Re: The sorry state of the D stack? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thomas Koch | On Saturday, 6 October 2012 at 12:06:07 UTC, Thomas Koch wrote: > Hi, > > the subject refers to my current state of sadness after trying to dig into D > programming for a few days. I've been very exited after reading "The D > programming language", but I've doubts now. > > - There's no "standard" library to read a single character from the console. > Instead people write their own personal helper libraries. > getch() There is always possibility to add something more high level to std.stdio if there will be such need. > - I looked into GtkD, which refers to the build tool DSSS. However DSSS > seems to be unmaintained for a couple of years. (Why does every new language > needs its own build tool?) > There are normal Make files. DSSS is mostly for D1 (GtkD also supports D1). For building on Windows you also got possibility to use bud tool (you don't need to play with Make files) > - I looked for a PostgreSQL client library. I found small personal hacks and > dead projects. > You want pure C-like headers or Wrapper? There is for example SQLd : https://github.com/robik/SQLd or https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff/blob/master/postgres.d And lots of other projects. To be honest there are TONS of such things on Github. > - I looked at http://www.dsource.org/forums - most forums are dead. > DSource is mostly DEAD space. It should be mentioned somewhere that DSource is graveyard for old, mostly D1 abandoned projects. > Is it possible that D is a dead language? Nope, it isn't > For a newbie like me it would be > very helpful to have a list of good, healthy projects for my first steps in > D instead of finding cadavers all around. Yea, I get your point, I was thinking the same at the begging I tried D. But IRC channel, #d @ freenode can help a lot if resolving your thoughts > Typesafe, the company behind > Scala, maintains a "Typesafe Stack" of active, recommendable projects. > > Please don't be offended by this message. I just wanted to provide feedback > and will keep trying to get into D. Thank you very much for this wonderful > language! > > Best regards, Thomas Koch |
October 06, 2012 Re: The sorry state of the D stack? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thomas Koch | On 10/6/2012 4:54 AM, Thomas Koch wrote:
> - I looked at http://www.dsource.org/forums - most forums are dead.
Most of the D forum action is here.
|
October 06, 2012 Re: The sorry state of the D stack? | ||||
---|---|---|---|---|
| ||||
Posted in reply to nazriel | nazriel:
> getch()
> There is always possibility to add something more high level to std.stdio if there will be such need.
I think the need for a Phobos portable way to read a char in is present.
Bye,
bearophile
|
October 06, 2012 Re: The sorry state of the D stack? | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile | On Saturday, 6 October 2012 at 12:52:36 UTC, bearophile wrote: > I think the need for a Phobos portable way to read a char in is present. I just slapped together a very quick Linux struct: ===== version(Posix): import core.sys.posix.termios; import core.sys.posix.unistd; import core.sys.posix.sys.types; import core.sys.posix.sys.time; import core.stdc.stdio; enum ConsoleInputFlags { raw = 0, echo = 1 } struct RealTimeConsoleInput { @disable this(); @disable this(this); private int fd; private termios old; this(ConsoleInputFlags flags) { this.fd = 0; // stdin tcgetattr(fd, &old); auto n = old; auto f = ICANON; if(!(flags & ConsoleInputFlags.echo)) f |= ECHO; n.c_lflag &= ~f; tcsetattr(fd, TCSANOW, &n); } ~this() { tcsetattr(fd, TCSANOW, &old); } bool kbhit() { timeval tv; tv.tv_sec = 0; tv.tv_usec = 0; fd_set fs; FD_ZERO(&fs); FD_SET(fd, &fs); select(fd + 1, &fs, null, null, &tv); return FD_ISSET(fd, &fs); } char getch() { return cast(char) .fgetc(.stdin); } } === Usage: void main() { auto input = new RealTimeConsoleInput(ConsoleInputFlags.raw); while(true) { if(input.kbhit()) { // is a key available? auto c = input.getch(); // get it if(c == 'q' || c == 'Q') break; printf("%c", c); fflush(stdout); } usleep(10000); } } IIRC it is very easy to do this on Windows as there's no need to change the console mode. |
October 06, 2012 Re: The sorry state of the D stack? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Adam D. Ruppe | On Saturday, 6 October 2012 at 14:50:08 UTC, Adam D. Ruppe wrote:
> IIRC it is very easy to do this on Windows as there's no need to change the console mode.
Windows already has getch() in one of its system libraries or C runtime, and I'm fairly sure it has kbhit() somewhere too. The easiest thing to do would just be to link with those.
|
October 06, 2012 Re: The sorry state of the D stack? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thomas Koch | On 2012-10-06 13:54, Thomas Koch wrote: > - I looked into GtkD, which refers to the build tool DSSS. However DSSS > seems to be unmaintained for a couple of years. (Why does every new language > needs its own build tool?) I would say because it's possible to tune the tool specially for the language making it easier to use. Most available tools are either not cross-platform or have some kind of dependency that might not be so easy to install on all platforms. -- /Jacob Carlborg |
October 06, 2012 Re: The sorry state of the D stack? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thomas Koch Attachments:
| On Sat, Oct 6, 2012 at 7:54 AM, Thomas Koch <thomas@koch.ro> wrote: > (Why does every new language > needs its own build tool?) > They often don't. I seem to recall http://www.dsource.org/projects/cmaked working just fine for one of my D2 projects. Not having to globally install it was pretty nice, too, and since I needed to build C source along side my D2 source (i.e., bindings) it was a perfect fit. HTH, Jeremy Sandell |
October 06, 2012 Re: The sorry state of the D stack? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thomas Koch | On Sat, 06 Oct 2012 13:54:11 +0200 Thomas Koch <thomas@koch.ro> wrote: > > - I looked into GtkD, which refers to the build tool DSSS. However DSSS seems to be unmaintained for a couple of years. > DSSS has been dead for a long time, I don't know why an active project like GtkD is apparently mentioning it. The proper tool (equivalent to DSSS's "rebuild") is RDMD, which is bundled with DMD. > (Why does every > new language needs its own build tool?) Because there aren't any good ones (IMO). They all seem to fall into one of two categories: - Something that either *is* make, is a variant of make, or uses make. - Introduces a requirement of some *other* language. (I don't want to force people to install or deal with Ruby or Python, and make sure they're on the right version of it, just to compile my D code.) > - I looked for a PostgreSQL client library. I found small personal hacks and dead projects. > SQL lib support is unfortunately one of our weak points ATM. I could point you to a decent MySQL lib :/ > - I looked at http://www.dsource.org/forums - most forums are dead. > Like Walter said, the main, active, D forums are right here. Also, most D project hosting has moved from DSource to places like BitBucket and GitHub. > Is it possible that D is a dead language? Definitely not. *DSource* is dying, unfortunately, which has lead some people to assume the same of the rest of D. But no, D is going very strong, and has only been getting bigger. > For a newbie like me it > would be very helpful to have a list of good, healthy projects for my > first steps in D instead of finding cadavers all around. Typesafe, > the company behind Scala, maintains a "Typesafe Stack" of active, > recommendable projects. > We have a list on the Wiki: http://www.prowiki.org/wiki4d/wiki.cgi I don't know how well-maintained that list is. If it isn't well-maintained, then it certainly needs to be. |
October 06, 2012 Re: The sorry state of the D stack? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick Sabalausky | On 10/06/2012 10:59 PM, Nick Sabalausky wrote:
> Definitely not. *DSource* is dying, unfortunately, which has lead some
> people to assume the same of the rest of D. But no, D is going very
> strong, and has only been getting bigger.
Might be worth placing some prominent message on DSource stating that it's being maintained to document all the D1 work and projects, but that the active work is now over at dlang.org?
|
Copyright © 1999-2021 by the D Language Foundation