attn ADR: are you still into the D

Harder, Better, Faster, Stronger.
Post Reply
Message
Author
User avatar
Bounty
Posts: 535
Joined: Mon Oct 03, 2011 5:45 pm

attn ADR: are you still into the D

#1 Post 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)
People in glass trousers shouldn't shit bricks.

User avatar
joviwan
Posts: 718
Joined: Mon Sep 26, 2011 3:11 am

Re: attn ADR: are you still into the D

#2 Post by joviwan »

I'm pretty sure he has an entire book out about D, but I could be mistaken

User avatar
adr
Moon Prism Power, Make Up!
Posts: 1462
Joined: Fri Sep 07, 2012 10:59 pm

Re: attn ADR: are you still into the D

#3 Post 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.
In the name of the moon, I will punish you!

User avatar
Bounty
Posts: 535
Joined: Mon Oct 03, 2011 5:45 pm

Re: attn ADR: are you still into the D

#4 Post by Bounty »

is your book any good
People in glass trousers shouldn't shit bricks.

User avatar
adr
Moon Prism Power, Make Up!
Posts: 1462
Joined: Fri Sep 07, 2012 10:59 pm

Re: attn ADR: are you still into the D

#5 Post 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
In the name of the moon, I will punish you!

User avatar
Bounty
Posts: 535
Joined: Mon Oct 03, 2011 5:45 pm

Re: attn ADR: are you still into the D

#6 Post by Bounty »

If you can smell yourself a little, people around you can smell you a lot. Sorry dude, you skunked up.
People in glass trousers shouldn't shit bricks.

User avatar
Bounty
Posts: 535
Joined: Mon Oct 03, 2011 5:45 pm

Re: attn ADR: are you still into the D

#7 Post by Bounty »

Congratulations, you've sold a book. I'll let you know how horrible it is.
People in glass trousers shouldn't shit bricks.

User avatar
Bounty
Posts: 535
Joined: Mon Oct 03, 2011 5:45 pm

Re: attn ADR: are you still into the D

#8 Post by Bounty »

People in glass trousers shouldn't shit bricks.

User avatar
adr
Moon Prism Power, Make Up!
Posts: 1462
Joined: Fri Sep 07, 2012 10:59 pm

Re: attn ADR: are you still into the D

#9 Post by adr »

yikes
In the name of the moon, I will punish you!

User avatar
Bounty
Posts: 535
Joined: Mon Oct 03, 2011 5:45 pm

Re: attn ADR: are you still into the D

#10 Post by Bounty »

Is there an ncurses library for D? Or bindings to C?
People in glass trousers shouldn't shit bricks.

User avatar
adr
Moon Prism Power, Make Up!
Posts: 1462
Joined: Fri Sep 07, 2012 10:59 pm

Re: attn ADR: are you still into the D

#11 Post 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.
In the name of the moon, I will punish you!

Post Reply