July 28, 2015
So I now combined a few of the options here and got this, which finally works:

import std.stdio;
import std.string;
import std.random;

void main()
{
	while (true) {
	string yesno;
	int weiter;
	char[] uschi;
	
	write("Press ENTER to roll the dice!");
	readln(uschi);
	if (uschi == "\n") {
	auto rng = uniform(1, 6);
	writeln(rng);
	
	if (rng < 4) {
		writeln("You won!");
	}
	else if ((rng >= 4) && (rng <= 6)) {
		writeln("I won!");
	}
	else if (rng > 6){
		writeln("ERROR: Invalid Value");
	}
	
	writeln("Do you want to play again? Y/N?");
	yesno = readln();
	if (yesno.toLower() != "y\n") {
		writeln("Damn it");
				break;
	}
    }
	}
}




Thank you ! :)
July 28, 2015
On Monday, 27 July 2015 at 18:23:57 UTC, Alex wrote:
> On Monday, 27 July 2015 at 17:31:08 UTC, Ali Çehreli wrote:
>> On 07/27/2015 08:50 AM, Alex wrote:
>>
>> > a book that I bought
>>
>> The program looks a lot like one of the exercises in this chapter:
>>
>>   http://ddili.org/ders/d.en/if.html
>>
>> You didn't actually pay for it, right? Because it is free. :)
>>
>> Ali
>
>
>
> Yes! I am really sorry. I did not buy it. Thanks for this book, it is really cool to learn and understandable even for people like me that have never had any contact with programming!

Good on you to pick it up and learn. It's a very interesting field once you get past the initial learning curve!

Be sure to continue to ask questions here, I find most people here are very willing to help newbies :)
July 29, 2015
On Monday, 27 July 2015 at 15:50:11 UTC, Alex wrote:
> Hey guys!
>
> I am super new to programming and still trying to learn the very basics via a book that I bought.
>

Out of interest: what made you start with D? It's not the most obvious choice for a programming novice.


July 30, 2015
My father owns a small software company, specialized in market data products.

www.bccgi.com (in case anyone is interested)

So programming was basically around all my life.

I do a small job in his company and my next task was to learn D. There are two trainees and the three of us have to learn D. Ofc the two trainees have to learn other languages as well.

My dad said the reason why we learn this language is that he personally finds it to be a very intuitive language that produces machine code. If he just wanted us to teach programming he said he'd just told us to learn C#.
In addition to that he wants to keep up and always have new languages and features in the company (only 8 people). And since we have experts for almost any language here but not a single one for D, it was time for someone to start!

Once I started I found it to be really interesting and challenging plus I like solving problems.


Thank you for being so nice! I have seen very few communities where beginners are welcomed so well!
July 30, 2015
On Thursday, 30 July 2015 at 14:20:41 UTC, Alex wrote:
> My father owns a small software company, specialized in market data products.
>
> www.bccgi.com (in case anyone is interested)
>
> So programming was basically around all my life.
>
> I do a small job in his company and my next task was to learn D. There are two trainees and the three of us have to learn D. Ofc the two trainees have to learn other languages as well.
>
> My dad said the reason why we learn this language is that he personally finds it to be a very intuitive language that produces machine code. If he just wanted us to teach programming he said he'd just told us to learn C#.
> In addition to that he wants to keep up and always have new languages and features in the company (only 8 people). And since we have experts for almost any language here but not a single one for D, it was time for someone to start!
>
> Once I started I found it to be really interesting and challenging plus I like solving problems.
>
>
> Thank you for being so nice! I have seen very few communities where beginners are welcomed so well!

Very interesting indeed! Care to write an article about it one day? "Learning D as an absolute beginner" or something like that. I wonder, is your father's company listed among those using D? I think there's a list somewhere on Wiki, if not we should have one :-)
July 30, 2015
On 07/30/2015 08:14 AM, Chris wrote:

> I wonder,
> is your father's company listed among those using D? I think there's a
> list somewhere on Wiki, if not we should have one :-)

I don't think they use D yet but the page is here:

  http://wiki.dlang.org/Current_D_Use

Ali

July 31, 2015
On Thursday, 30 July 2015 at 17:48:51 UTC, Ali Çehreli wrote:
> On 07/30/2015 08:14 AM, Chris wrote:
>
>> I wonder,
>> is your father's company listed among those using D? I think there's a
>> list somewhere on Wiki, if not we should have one :-)
>
> I don't think they use D yet but the page is here:
>
>   http://wiki.dlang.org/Current_D_Use
>
> Ali

That's the link. Thanks! I find the reasons Alex gave for using D very interesting. It's beyond all hype and reddit and stuff like that. It shows that D attracts users for what it is, without any hype or sh*t like that.
July 31, 2015
On Thursday, 30 July 2015 at 15:14:28 UTC, Chris wrote:
> On Thursday, 30 July 2015 at 14:20:41 UTC, Alex wrote:
>> My father owns a small software company, specialized in market data products.
>>
>> www.bccgi.com (in case anyone is interested)
>>
>> So programming was basically around all my life.
>>
>> I do a small job in his company and my next task was to learn D. There are two trainees and the three of us have to learn D. Ofc the two trainees have to learn other languages as well.
>>
>> My dad said the reason why we learn this language is that he personally finds it to be a very intuitive language that produces machine code. If he just wanted us to teach programming he said he'd just told us to learn C#.
>> In addition to that he wants to keep up and always have new languages and features in the company (only 8 people). And since we have experts for almost any language here but not a single one for D, it was time for someone to start!
>>
>> Once I started I found it to be really interesting and challenging plus I like solving problems.
>>
>>
>> Thank you for being so nice! I have seen very few communities where beginners are welcomed so well!
>
> Very interesting indeed! Care to write an article about it one day? "Learning D as an absolute beginner" or something like that. I wonder, is your father's company listed among those using D? I think there's a list somewhere on Wiki, if not we should have one :-)



Sure I'd do something like that! Maybe refering to the Ali Çehreli's book!
Question is if my English skills are sufficient..

They aren't in the list because right now nothing is written in D in our company. But the future will look different I according to what my dad told me.

Is there a reddit community? How is D generally seen in the internet?
1 2
Next ›   Last »