Page 1 of 1

attn ADR: are you still into the D

Posted: Mon Jul 07, 2014 6:27 pm
by Bounty
I'm looking to pick up a new technology but I'd like tomething a bit more robust than Javascript framework #17 NOW WITH NESTED MONADS. Why should I want D? (bg: Java professionally (lol), lots of Python, some C and assorted nonsense)

Re: attn ADR: are you still into the D

Posted: Mon Jul 07, 2014 6:50 pm
by joviwan
I'm pretty sure he has an entire book out about D, but I could be mistaken

Re: attn ADR: are you still into the D

Posted: Mon Jul 07, 2014 7:07 pm
by adr
I love the D and think about it every day. I wish I could hold it in my hands and gently caress it all day every day but i can't do that anymore :(

article on D today http://www.wired.com/2014/07/d-programming-language/

my book is out http://www.packtpub.com/discover-advant ... kbook/book and might be useful to you with the Java background though it is aimed more at D coders who want to level up than n00bs.


Really though, D is just pretty easy to learn coming from any of that language family and it rox so hard it'll knock the sox off your cox. You can do pretty much everything with it from the low level OS stuff to the high level modeling (in various styles), all without the painful speed penalities in other languages.

the big advantage is like a lot of small things that are hard to explain tho. There's some bumps but so much less friction that once you get started, maintaining productivity isn't that hard.

Re: attn ADR: are you still into the D

Posted: Mon Jul 07, 2014 7:17 pm
by Bounty
is your book any good

Re: attn ADR: are you still into the D

Posted: Mon Jul 07, 2014 7:25 pm
by adr
idk only a couple of the readers have had the decency to leave amazon reviews and i don't trust them when they say it is cool to my face

it is like asking people "do i stink?" because i honestly don't know. when i sweat i just assume that i stink but nobody has said anything

is this because it is impolite to say "hey man you smell bad" or is it that i'm one of those genetic freaks who actually doesn't stink that badly?

i've asked people straight up but never gotten an answer

Re: attn ADR: are you still into the D

Posted: Mon Jul 07, 2014 7:30 pm
by Bounty
If you can smell yourself a little, people around you can smell you a lot. Sorry dude, you skunked up.

Re: attn ADR: are you still into the D

Posted: Mon Jul 07, 2014 7:46 pm
by Bounty
Congratulations, you've sold a book. I'll let you know how horrible it is.

Re: attn ADR: are you still into the D

Posted: Mon Jul 07, 2014 7:49 pm
by Bounty

Re: attn ADR: are you still into the D

Posted: Mon Jul 07, 2014 7:58 pm
by adr
yikes

Re: attn ADR: are you still into the D

Posted: Thu Jul 10, 2014 5:16 pm
by Bounty
Is there an ncurses library for D? Or bindings to C?

Re: attn ADR: are you still into the D

Posted: Thu Jul 10, 2014 5:24 pm
by adr
yea you can do the C one with this https://github.com/D-Programming-Deimos/ncurses

(or diy is easy enough by just copy/pasting the prototype into extern(C) but sometimes it is a bit more involved than that)

also i wrote a terminal lib https://github.com/adamdruppe/arsd/ grab terminal.d from there and you can do some of the ncurses like stuff, though compatibility isn't as broad as teh real ncurses

of course id on't believe in documentation so the best you have is the demo in the source

https://github.com/adamdruppe/arsd/blob ... al.d#L2063

well i guess i did a little bit

http://arsdnet.net/terminal.html


or the examples from the end of my book

Code: Select all

import terminal;

void main() {
  auto terminal = Terminal(ConsoleOutputType.linear);
  terminal.color(Color.green, Color.red);
  terminal.writeln("Hello, world!");
}
plain colored output. terminal.color changes the foreground and backgroudn together


and basic input:

Code: Select all

import terminal;

void main() {
  auto terminal = Terminal(ConsoleOutputType.linear);
  auto input = RealTimeConsoleInput(&terminal, ConsoleInputFlags.raw);
  terminal.writeln("Press any key to exit");
  auto ch = input.getch(); // waits for a key, you can also check input.kbhit() to see if any is available
  terminal.writeln("Bye!");
}
the demo in the source shows more advanced stuff


compile

dmd yourfile.d terminal.d



ncurses should work basically the same way as in C.