Re: [OT] Re: Input handling? (newbie alert!)

2010-09-14 Thread Jonathan M Davis
On Tuesday, September 14, 2010 10:41:53 Ali Çehreli wrote: > bearophile wrote: > > I think the term "Informatics" is better than "Computer Science" for > > this field we are talking about > > On a related note, "programmers" are called "software engineers" in the > US, at least in Silicon Valley

[OT] Re: Input handling? (newbie alert!)

2010-09-14 Thread Ali Çehreli
bearophile wrote: > I think the term "Informatics" is better than "Computer Science" for this > field we are talking about On a related note, "programmers" are called "software engineers" in the US, at least in Silicon Valley. > "Computer Science" is mostly misleading, both words don't fit ve

Re: Input handling? (newbie alert!)

2010-09-14 Thread Ali Çehreli
Cavalary wrote: > Yeah, one of the reasons why it made sense to me I guess, as the > term's "informatica" in Romanian Getting back to the tutorial question, with the remote chance that you know Turkish as well, there is http://ddili.org/ders/d/index.html That tutorial still uses std.cstrea

Re: Input handling? (newbie alert!)

2010-09-12 Thread Jonathan M Davis
On Sunday 12 September 2010 04:18:01 Cavalary wrote: > Yeah, one of the reasons why it made sense to me I guess, as the > term's "informatica" in Romanian, so the mental link was instant > even if I probably never heard it used in English before. > > A programming language that doesn't put effort

Re: Input handling? (newbie alert!)

2010-09-12 Thread bearophile
Jonathan M Davis: > Informatics is essentially the term used in at least some European languages > other than English. Personally, I think that the name is no better - if not > worse - than computer science, since it implies that it has to do with the > study > of information, which doesn't ne

Re: Input handling? (newbie alert!)

2010-09-12 Thread Cavalary
Yeah, one of the reasons why it made sense to me I guess, as the term's "informatica" in Romanian, so the mental link was instant even if I probably never heard it used in English before. A programming language that doesn't put effort into teaching people how to use it isn't exactly likely to end

Re: Input handling? (newbie alert!)

2010-09-11 Thread Jonathan M Davis
On Saturday 11 September 2010 13:54:19 Cavalary wrote: > Hm, to me "informatics" made sense :) Not sure if I ever heard it > used in English, but it sounds more suitable than "computer > science", which (no matter how it's officially used) sounds like > it would include everything that deals with c

Re: Input handling? (newbie alert!)

2010-09-11 Thread Cavalary
Hm, to me "informatics" made sense :) Not sure if I ever heard it used in English, but it sounds more suitable than "computer science", which (no matter how it's officially used) sounds like it would include everything that deals with computers, so hardware as well. As for what Jesse said, yeah, k

Re: Input handling? (newbie alert!)

2010-09-11 Thread Jonathan M Davis
On Saturday 11 September 2010 08:51:11 bearophile wrote: > Jonathan M Davis: > > You mean computer science? That's the English term - in the US at least. > > http://en.wikipedia.org/wiki/Informatics_%28academic_field%29 > Most of "Computer Science" is not about computers, and most of it is not a >

Re: Input handling? (newbie alert!)

2010-09-11 Thread bearophile
Jonathan M Davis: > You mean computer science? That's the English term - in the US at least. http://en.wikipedia.org/wiki/Informatics_%28academic_field%29 Most of "Computer Science" is not about computers, and most of it is not a science. It's more a cross between mathematics and engineering. By

Re: Input handling? (newbie alert!)

2010-09-10 Thread Jonathan M Davis
On Friday 10 September 2010 09:47:47 bearophile wrote: > Cavalary: > > No idea what got into me to try to teach myself some programming > > (and particularly something as advanced as D) these days. > > With D you may learn some ideas of informatics. > > Bye, > bearophile You mean computer scienc

Re: Input handling? (newbie alert!)

2010-09-10 Thread Jesse Phillips
Cavalary Wrote: > Ruby code (can't break it, if you enter floats it just rounds > down, if you enter non-numbers it just assumes zero, so no errors): Since you got your answer I would just like to point out that this is not the philosophy driving D. If you are storing to an int what you give it

Re: Input handling? (newbie alert!)

2010-09-10 Thread bearophile
Cavalary: > No idea what got into me to try to teach myself some programming > (and particularly something as advanced as D) these days. With D you may learn some ideas of informatics. Bye, bearophile

Re: Input handling? (newbie alert!)

2010-09-10 Thread Cavalary
Well, I was just looking through examples, and if those used scanf I assumed that was the way to go... Thanks, actually learned a few more things out of this (auto and try). No idea what the parameter after catch is supposed to do, what cast is or how to use parse since it was just mentioned, but a

Re: Input handling? (newbie alert!)

2010-09-09 Thread Bernard Helyer
On Thu, 09 Sep 2010 18:07:43 -0700, Jonathan M Davis wrote: > Yes std.stdio.readln() would be a much better way to go. However, I'd > suggest using std.conv.parse() rather than std.conv.to(). It's less > picky about whitespace, and it allows you to deal with the case where > you have multiple value

Re: Input handling? (newbie alert!)

2010-09-09 Thread Jonathan M Davis
On Thursday 09 September 2010 17:48:47 Bernard Helyer wrote: > I've not time for a more full answer now (I'll try later), but please, > for the love of God, don't use scanf! As a general hint, use > std.stdio.readln to get input as a string, then use the `to` function > found in std.conv to convert

Re: Input handling? (newbie alert!)

2010-09-09 Thread Bernard Helyer
I've not time for a more full answer now (I'll try later), but please, for the love of God, don't use scanf! As a general hint, use std.stdio.readln to get input as a string, then use the `to` function found in std.conv to convert it into what you want: auto input = readln(); auto asInteg

Input handling? (newbie alert!)

2010-09-09 Thread Cavalary
Now I guess this has been asked and answered 1000 times before around here, but looking through discussions that don't even seem to thread properly (unless you're in the archive) would just confuse me more, and the few attempts at D tutorials for people who are not already skilled C++ programmers d