Re: Near-simplest route to learn D

2021-05-12 Thread Ali Çehreli via Digitalmars-d-learn

On 5/12/21 12:37 PM, Berni44 wrote:

> Even if it is a few years old, I would still use the book from Ali. Most
> is still valid and maybe, the online version is even updated

Yes, the online version is more up-to-date than the print version. (By 
the way, the more-up-to-date online PDF is what would go to the printer 
anyway. I am to blame for not followin up on that.)


The book is behind a little bit but there is nothing that's horribly 
wrong. I can think of post-blit as being out-of-date because I should 
have replaced it with copy constructors, which D gained more recently.


Ali



Re: Near-simplest route to learn D

2021-05-12 Thread Berni44 via Digitalmars-d-learn

On Wednesday, 12 May 2021 at 18:37:55 UTC, NonNull wrote:
Some documents/books seem to be out of date. If an intuitive 
person competent in several other programming languages and in 
abstract reasoning wanted to take the fastest route to learn 
pretty much the whole of D as it stands now, having already 
learned and used a core of the language, what is the best way 
to proceed? And how long would this likely take?


Even if it is a few years old, I would still use the book from 
Ali. Most is still valid and maybe, the online version is even 
updated, but I'm not sure on this.


A completely other approach is to try to help fixing bugs. I 
learned a lot about D, when I started doing so.


I don't know, if that is, what you wanted to hear, but I thought, 
it wont hurt telling you. :-)


Near-simplest route to learn D

2021-05-12 Thread NonNull via Digitalmars-d-learn



Hello,

Some documents/books seem to be out of date. If an intuitive 
person competent in several other programming languages and in 
abstract reasoning wanted to take the fastest route to learn 
pretty much the whole of D as it stands now, having already 
learned and used a core of the language, what is the best way to 
proceed? And how long would this likely take?


Re: Good repos to learn D

2020-09-21 Thread WebFreak001 via Digitalmars-d-learn

On Saturday, 19 September 2020 at 08:26:36 UTC, Imperatorn wrote:
What are some good examples of pretty large/medium size, good 
structured repos in D? I'm looking for examples to learn from


Thanks!


I would include vibe.d in there of course! 
https://github.com/vibe-d/vibe.d


Some legacy cruft regarding the module separation, but otherwise 
really solid and tons of stuff just working.


Re: Good repos to learn D

2020-09-21 Thread Виталий Фадеев via Digitalmars-d-learn

On Saturday, 19 September 2020 at 08:26:36 UTC, Imperatorn wrote:
What are some good examples of pretty large/medium size, good 
structured repos in D? I'm looking for examples to learn from


Thanks!


I often looked into the D std source code: 
C:\D\dmd2\src\phobos\std




Re: Good repos to learn D

2020-09-20 Thread Imperatorn via Digitalmars-d-learn

On Sunday, 20 September 2020 at 04:27:59 UTC, H. S. Teoh wrote:
On Sat, Sep 19, 2020 at 08:26:36AM +, Imperatorn via 
Digitalmars-d-learn wrote:
What are some good examples of pretty large/medium size, good 
structured repos in D? I'm looking for examples to learn from

[...]

Phobos itself.  I have to say, it's the most readable 
programming language standard library that I've come across. 
I've tried to read glibc code before, and I will never ever do 
that again(!). Phobos, by contrast, is a pleasure to read 
(except for a small number of dark corners).



T


Thanks! I'll take a look 🌈


Re: Good repos to learn D

2020-09-19 Thread H. S. Teoh via Digitalmars-d-learn
On Sat, Sep 19, 2020 at 08:26:36AM +, Imperatorn via Digitalmars-d-learn 
wrote:
> What are some good examples of pretty large/medium size, good
> structured repos in D? I'm looking for examples to learn from
[...]

Phobos itself.  I have to say, it's the most readable programming
language standard library that I've come across. I've tried to read
glibc code before, and I will never ever do that again(!). Phobos, by
contrast, is a pleasure to read (except for a small number of dark
corners).


T

-- 
Unix was not designed to stop people from doing stupid things, because that 
would also stop them from doing clever things. -- Doug Gwyn


Re: Good repos to learn D

2020-09-19 Thread Imperatorn via Digitalmars-d-learn
On Saturday, 19 September 2020 at 13:13:58 UTC, Jacob Carlborg 
wrote:
On Saturday, 19 September 2020 at 08:26:36 UTC, Imperatorn 
wrote:

[...]


Here are some examples of large projects:

[...]


Thanks, I'll check them out!

/Forsberg


Re: Good repos to learn D

2020-09-19 Thread Jacob Carlborg via Digitalmars-d-learn

On Saturday, 19 September 2020 at 08:26:36 UTC, Imperatorn wrote:
What are some good examples of pretty large/medium size, good 
structured repos in D? I'm looking for examples to learn from


Thanks!


Here are some examples of large projects:

* DWT [1]. This is one of the largest D projects I'm aware of. 
It's a port from Java so it's structured like a Java project. I 
think it works pretty well for D projects as well. But it's not 
common to have the reverse domain name package structure like in 
Java. It's more common to have the top level package be named 
after the project.


* Mecca [2]. This one is not as large as DWT, but I think it 
nicely shows how to separate the platform specific code from the 
platform independent code. Instead of having `version` statements 
sprinkled all over the code most platform specific code is 
located in the `platform` packages. Then it provides a common 
interface that is used by the rest of the project.


* Ocean [3]. This one is quite large as well.

[1] https://github.com/d-widget-toolkit/dwt
[2] https://github.com/weka-io/mecca
[3] https://github.com/sociomantic-tsunami/ocean

--
/Jacob Carlborg


Good repos to learn D

2020-09-19 Thread Imperatorn via Digitalmars-d-learn
What are some good examples of pretty large/medium size, good 
structured repos in D? I'm looking for examples to learn from


Thanks!


Re: To learn D

2019-07-05 Thread Samir via Digitalmars-d-learn

On Friday, 5 July 2019 at 13:56:18 UTC, Craig Dillabaugh wrote:
Ali's book is targeted at beginners (see link below).  I don't 
see why D wouldn't make a good first language.  If your 
objective is to learn D, then I don't think learning C or 
Python is going to be help that much.  Obviously if you know 
C/Python you can learn D more quickly, but I doubt the effort 
is worth it if D is the ultimate goal.


http://ddili.org/ders/d.en/index.html


I will second Craig's recommendation to spend some time going 
through Ali's book.  It strikes a good balance between being an 
introduction to programming in general, and to D in particular.  
While I have dabbled in half a dozen languages or so over the 
years, I find D to be a lot more accessible than many of the 
other languages I've tried.  Part of that comes do the language 
design (similarities to C and Python) but mostly to the helpful 
community you will find here.  Good luck!





Re: To learn D

2019-07-05 Thread Craig Dillabaugh via Digitalmars-d-learn

On Friday, 5 July 2019 at 12:00:15 UTC, Binarydepth wrote:
I've considering learning full D. I remembered that D is not 
recommended as a first language, So I read time ago.


So my question, is learning C and Python a good intro before 
learning D?


TY


Ali's book is targeted at beginners (see link below).  I don't 
see why D wouldn't make a good first language.  If your objective 
is to learn D, then I don't think learning C or Python is going 
to be help that much.  Obviously if you know C/Python you can 
learn D more quickly, but I doubt the effort is worth it if D is 
the ultimate goal.


http://ddili.org/ders/d.en/index.html


Re: To learn D

2019-07-05 Thread Cym13 via Digitalmars-d-learn

On Friday, 5 July 2019 at 12:00:15 UTC, Binarydepth wrote:
I've considering learning full D. I remembered that D is not 
recommended as a first language, So I read time ago.


So my question, is learning C and Python a good intro before 
learning D?


TY


Both C and Python provide valuable and complementary experience 
no matter what you want to do. If your goal is specifically to 
learn D then I'd learn C up to structures. That way you'll have 
basic tools and vocabulary that you can reuse in D and you can 
learn the rest as you go.


The things that will be hard if you want to learn D directly:

- not as many examples and tutorials on the internet (although 
there are some very good ones)


- lots of concepts and vocabulary (always remember that you 
*don't* have to know every detail of the language, learn what you 
need to solve the problem at hand, one thing at a time)


- not as many libraries, which means that it can be harder to 
solve a problem that not many people have had yet (popular things 
like web applications will be alright)


I think D isn't that bad of a first language. Once you've passed 
the vocabulary barrier you'll get the benefit of having a 
language that'll fit most of your tasks from little scripting or 
web applications to low-level programming and big projects. You 
will be confronted to many concepts and ideas without having to 
learn a new language each time and this knowledge is useful even 
if you decide to use another language later on.


To learn D

2019-07-05 Thread Binarydepth via Digitalmars-d-learn
I've considering learning full D. I remembered that D is not 
recommended as a first language, So I read time ago.


So my question, is learning C and Python a good intro before 
learning D?


TY


Re: Keen to learn D

2016-09-04 Thread Nicholas Wilson via Digitalmars-d-learn
On Sunday, 4 September 2016 at 20:12:09 UTC, Abhishek Mishra 
wrote:
Hi! I am a newbie and I would like to know more about D 
language. I have prior knowledge of C++(12th Grade/ 
Pre-University College Level). How should I start? What more do 
I need to learn. Thanks in advance. :)


in addition to the link already provided by others

https://p0nce.github.io/d-idioms/

is a useful list of the way things are done in d, and other 
insights.


Re: Keen to learn D

2016-09-04 Thread bachmeier via Digitalmars-d-learn
On Sunday, 4 September 2016 at 20:12:09 UTC, Abhishek Mishra 
wrote:
Hi! I am a newbie and I would like to know more about D 
language. I have prior knowledge of C++(12th Grade/ 
Pre-University College Level). How should I start? What more do 
I need to learn. Thanks in advance. :)


Ali's book can be viewed online (or purchased) and it makes for a 
good introduction to the language.

http://ddili.org/ders/d.en/index.html

There are three other D books that you'd need to purchase, and 
they walk you through practical examples, allowing you to see the 
language in action. They are


D Cookbook
https://www.packtpub.com/application-development/d-cookbook

Learning D
https://www.packtpub.com/application-development/learning-d

D Web Development
https://www.packtpub.com/web-development/d-web-development

And of course there is always looking at a project that does 
something you find interesting, which you can find at

http://code.dlang.org/


Re: Keen to learn D

2016-09-04 Thread szymski via Digitalmars-d-learn

You should take a look at this: http://tour.dlang.io/


Keen to learn D

2016-09-04 Thread Abhishek Mishra via Digitalmars-d-learn
Hi! I am a newbie and I would like to know more about D language. 
I have prior knowledge of C++(12th Grade/ Pre-University College 
Level). How should I start? What more do I need to learn. Thanks 
in advance. :)


Re: I'll like to learn D

2015-09-19 Thread DlangLearner via Digitalmars-d-learn

On Saturday, 19 September 2015 at 17:42:50 UTC, uNknow123 wrote:
On Saturday, 19 September 2015 at 15:09:38 UTC, WhatMeWorry 
wrote:
On Saturday, 19 September 2015 at 13:41:03 UTC, uNknow123 
wrote:
Hi! I'll like to learn D Lang. I knew some Pawn, it is pretty 
similar, but not so similar, if you understan me. In Pawn we 
have to write just some words, and the Plugin is done, why 
Plugin, 'cuse Pawn = Scripting for Cs 1.6 and Sa:Mp. So, I am 
a rookie, can you help me please?


That is a very open ended question.  I'd start with 
http://ddili.org/ders/d.en/index.html
It will get your feet wet and you can wade in as deep as you 
want.



Thanks man, and there is'nt any interactive website?! Like 
CodeAcademy just for be a better proggramer, thanks anyway man! 
I'll read that book!


http://www.tutorialspoint.com/d_programming/index.htm


Re: I'll like to learn D

2015-09-19 Thread uNknow123 via Digitalmars-d-learn

On Saturday, 19 September 2015 at 15:09:38 UTC, WhatMeWorry wrote:

On Saturday, 19 September 2015 at 13:41:03 UTC, uNknow123 wrote:
Hi! I'll like to learn D Lang. I knew some Pawn, it is pretty 
similar, but not so similar, if you understan me. In Pawn we 
have to write just some words, and the Plugin is done, why 
Plugin, 'cuse Pawn = Scripting for Cs 1.6 and Sa:Mp. So, I am 
a rookie, can you help me please?


That is a very open ended question.  I'd start with 
http://ddili.org/ders/d.en/index.html
It will get your feet wet and you can wade in as deep as you 
want.



Thanks man, and there is'nt any interactive website?! Like 
CodeAcademy just for be a better proggramer, thanks anyway man! 
I'll read that book!


Re: I'll like to learn D

2015-09-19 Thread WhatMeWorry via Digitalmars-d-learn

On Saturday, 19 September 2015 at 13:41:03 UTC, uNknow123 wrote:
Hi! I'll like to learn D Lang. I knew some Pawn, it is pretty 
similar, but not so similar, if you understan me. In Pawn we 
have to write just some words, and the Plugin is done, why 
Plugin, 'cuse Pawn = Scripting for Cs 1.6 and Sa:Mp. So, I am a 
rookie, can you help me please?


That is a very open ended question.  I'd start with 
http://ddili.org/ders/d.en/index.html

It will get your feet wet and you can wade in as deep as you want.






I'll like to learn D

2015-09-19 Thread uNknow123 via Digitalmars-d-learn
Hi! I'll like to learn D Lang. I knew some Pawn, it is pretty 
similar, but not so similar, if you understan me. In Pawn we have 
to write just some words, and the Plugin is done, why Plugin, 
'cuse Pawn = Scripting for Cs 1.6 and Sa:Mp. So, I am a rookie, 
can you help me please?


Re: Novice web developer trying to learn D

2014-09-08 Thread Kagamin via Digitalmars-d-learn
On Monday, 8 September 2014 at 21:17:40 UTC, ketmar via 
Digitalmars-d-learn wrote:

On Mon, 08 Sep 2014 21:05:53 +
Gary Willoughby via Digitalmars-d-learn
 wrote:

I would agree but that little C book is an amazing read and 
full of valuable lessons.
and pointer arithmetic, and memory leaks, and zero-terminated 
strings,
and writing generic algoritms with ugly casting, and... bad 
habits die

hard.


Maybe only to know, what to avoid. 
https://github.com/D-Programming-Language/phobos/pull/2459
But books on D can already propose a good programming style. That 
should be enough. Also it can be better for a php programmer to 
start with high level D and go lower if and as needed.


Re: Novice web developer trying to learn D

2014-09-08 Thread bachmeier via Digitalmars-d-learn
On Monday, 8 September 2014 at 20:58:20 UTC, ketmar via 
Digitalmars-d-learn wrote:

On Mon, 08 Sep 2014 20:47:19 +
AsmMan via Digitalmars-d-learn 


wrote:

Before go to D I recomend you to take a look at the C 
programming language (as Gary Willoughby already mentioned). I 
think it's really fundamental.
do you really want him to drop programming? there is no need to 
start
with "Ford Model T" to drive "Lamborghini Estoque". 
*conceptions* are
fundamental, not languages. and D is much better starting point 
than C.

i know it, i have almost two decades of C expirience.


+1

If you really want background before moving on to D, go with 
assembly instead. C is no more a prerequisite for D than is 
lambda calculus.


Re: Novice web developer trying to learn D

2014-09-08 Thread ketmar via Digitalmars-d-learn
On Mon, 08 Sep 2014 21:05:53 +
Gary Willoughby via Digitalmars-d-learn
 wrote:

> I would agree but that little C book is an amazing read and full 
> of valuable lessons.
and pointer arithmetic, and memory leaks, and zero-terminated strings,
and writing generic algoritms with ugly casting, and... bad habits die
hard.


signature.asc
Description: PGP signature


Re: Novice web developer trying to learn D

2014-09-08 Thread Gary Willoughby via Digitalmars-d-learn
On Monday, 8 September 2014 at 20:58:20 UTC, ketmar via 
Digitalmars-d-learn wrote:

On Mon, 08 Sep 2014 20:47:19 +
AsmMan via Digitalmars-d-learn 


wrote:

Before go to D I recomend you to take a look at the C 
programming language (as Gary Willoughby already mentioned). I 
think it's really fundamental.
do you really want him to drop programming? there is no need to 
start
with "Ford Model T" to drive "Lamborghini Estoque". 
*conceptions* are
fundamental, not languages. and D is much better starting point 
than C.

i know it, i have almost two decades of C expirience.


I would agree but that little C book is an amazing read and full 
of valuable lessons.


Re: Novice web developer trying to learn D

2014-09-08 Thread ketmar via Digitalmars-d-learn
On Mon, 08 Sep 2014 20:47:19 +
AsmMan via Digitalmars-d-learn 
wrote:

> Before go to D I recomend you to take a look at the C programming 
> language (as Gary Willoughby already mentioned). I think it's 
> really fundamental.
do you really want him to drop programming? there is no need to start
with "Ford Model T" to drive "Lamborghini Estoque". *conceptions* are
fundamental, not languages. and D is much better starting point than C.
i know it, i have almost two decades of C expirience.


signature.asc
Description: PGP signature


Re: Novice web developer trying to learn D

2014-09-08 Thread AsmMan via Digitalmars-d-learn

On Sunday, 7 September 2014 at 21:06:48 UTC, zuzuleinen wrote:

Hello,

First, here is my Linkedin profile 
http://www.linkedin.com/in/andreiboar in order to make an image 
of my professional background. I do realise here are really 
good programmers for which this background might sound like a 
joke, but this is what I did so far.


After watching some presentantions from DConf, and trying the 
language I decided to give it a try in the future.


Currrently I'm reading the Programming in D book by Ali 
Çehreli, and then The D Programming Language by Andrei 
Alexandrescu in order to learn more.


The reason I post this is to ask you what other books do you 
think I should try in order to become hireable in the next 2 
years?


As a web developer I know I lack a lot of information, but I'm 
willing to do the hard work. So if anyone has any other 
books/things I need to know and is willing to make me like a 
small roadmap to become a good D developer I would really 
appreciate.


Thanks a lot,
Andrei


Before go to D I recomend you to take a look at the C programming 
language (as Gary Willoughby already mentioned). I think it's 
really fundamental.


Re: Novice web developer trying to learn D

2014-09-08 Thread zuzuleinen via Digitalmars-d-learn
Thank you all for all your suggestions, I really appreciate them 
:)


Now it's time to dive in, you gave me good resources :)


Re: Novice web developer trying to learn D

2014-09-08 Thread Gary Willoughby via Digitalmars-d-learn

On Sunday, 7 September 2014 at 21:06:48 UTC, zuzuleinen wrote:

Hello,

First, here is my Linkedin profile 
http://www.linkedin.com/in/andreiboar in order to make an image 
of my professional background. I do realise here are really 
good programmers for which this background might sound like a 
joke, but this is what I did so far.


After watching some presentantions from DConf, and trying the 
language I decided to give it a try in the future.


Currrently I'm reading the Programming in D book by Ali 
Çehreli, and then The D Programming Language by Andrei 
Alexandrescu in order to learn more.


The reason I post this is to ask you what other books do you 
think I should try in order to become hireable in the next 2 
years?


As a web developer I know I lack a lot of information, but I'm 
willing to do the hard work. So if anyone has any other 
books/things I need to know and is willing to make me like a 
small roadmap to become a good D developer I would really 
appreciate.


Thanks a lot,
Andrei


Hi and welcome.

I find it great that you want to learn and grow as a developer, 
many web devs don't and yet still think they're awesome. Using a 
language like D is a complete departure from what you've been 
doing so far because it compiles to native code and with that 
brings quite a few things to learn.


So where to start. First, i would take time to learn about 
pointers. These are pretty fundamental when dealing with native 
code and there's no real way of getting around that. Here's a 
five minute guide:


http://denniskubes.com/2012/08/16/the-5-minute-guide-to-c-pointers/

After that i would probably familiarise myself with the compiler 
and linker:


http://dlang.org/dmd-windows.html
http://dlang.org/dmd-linux.html
http://www.lurklurk.org/linkers/linkers.html

You're already reading Ali's and Andrei's books so that's good.

Try reading the phobos documentation to familiarise yourself with 
the library:


http://dlang.org/phobos/index.html

Maybe controversial but i would also consider reading the C book 
for a good grounding in pointers and memory allocation, etc. A 
lot of this is relevant in D.


http://en.wikipedia.org/wiki/The_C_Programming_Language

It's nice to know these basics and you'll appreciate D a whole 
lot more coming from C. ;)


Remember to ask questions here as you go.


Re: Novice web developer trying to learn D

2014-09-08 Thread Kagamin via Digitalmars-d-learn

On Sunday, 7 September 2014 at 21:06:48 UTC, zuzuleinen wrote:
The reason I post this is to ask you what other books do you 
think I should try in order to become hireable in the next 2 
years?


See 
http://forum.dlang.org/thread/sgtnnyvmhxzexupgw...@forum.dlang.org


Re: Novice web developer trying to learn D

2014-09-07 Thread Rikki Cattermole via Digitalmars-d-learn

On Sunday, 7 September 2014 at 21:06:48 UTC, zuzuleinen wrote:

Hello,

First, here is my Linkedin profile 
http://www.linkedin.com/in/andreiboar in order to make an image 
of my professional background. I do realise here are really 
good programmers for which this background might sound like a 
joke, but this is what I did so far.


After watching some presentantions from DConf, and trying the 
language I decided to give it a try in the future.


Currrently I'm reading the Programming in D book by Ali 
Çehreli, and then The D Programming Language by Andrei 
Alexandrescu in order to learn more.


The reason I post this is to ask you what other books do you 
think I should try in order to become hireable in the next 2 
years?


As a web developer I know I lack a lot of information, but I'm 
willing to do the hard work. So if anyone has any other 
books/things I need to know and is willing to make me like a 
small roadmap to become a good D developer I would really 
appreciate.


Thanks a lot,
Andrei


I would also recommend for you to investigate my work on:
Cmsed[0]
Dakka[1]
Dvorm[2]
livereload[3]
skeleton[4]

Please note next version of Cmsed which will support 
livereload/skeleton/Dakka is currently not ready to go on github.


[0] https://github.com/rikkimax/Cmsed
[1] https://github.com/rikkimax/dakka
[2] https://github.com/rikkimax/Dvorm
[3] https://github.com/rikkimax/livereload
[4] https://github.com/rikkimax/skeleton


Re: Novice web developer trying to learn D

2014-09-07 Thread Chris Nicholson-Sauls via Digitalmars-d-learn

There's Adam Ruppe's excellent "D Cookbook" available here:
https://www.packtpub.com/application-development/d-cookbook

And since you specifically said "web developer" I hope you're 
looking at vibe.d:

http://vibed.org/


Novice web developer trying to learn D

2014-09-07 Thread zuzuleinen via Digitalmars-d-learn

Hello,

First, here is my Linkedin profile 
http://www.linkedin.com/in/andreiboar in order to make an image 
of my professional background. I do realise here are really good 
programmers for which this background might sound like a joke, 
but this is what I did so far.


After watching some presentantions from DConf, and trying the 
language I decided to give it a try in the future.


Currrently I'm reading the Programming in D book by Ali Çehreli, 
and then The D Programming Language by Andrei Alexandrescu in 
order to learn more.


The reason I post this is to ask you what other books do you 
think I should try in order to become hireable in the next 2 
years?


As a web developer I know I lack a lot of information, but I'm 
willing to do the hard work. So if anyone has any other 
books/things I need to know and is willing to make me like a 
small roadmap to become a good D developer I would really 
appreciate.


Thanks a lot,
Andrei


Re: A lot of people want to use D,but they only know MS SQL Server,what will help them to Learn D?

2014-05-01 Thread Regan Heath via Digitalmars-d-learn

On Thu, 01 May 2014 09:56:49 +0100, FrankLike <1150015...@qq.com> wrote:


On Monday, 14 April 2014 at 17:13:56 UTC, FrankLike wrote:


My advice - use ODBC, it is the fastest way you may connect to the SQL  
server, and you already have everything you need for that. :)


Regards


I have test the d\dmd2\windows\lib\odbc32.lib,the size is 4.5kb,
I test it by test.d(build :dmd test.d)
but find the error:
Error 42:Symbol Undefined _SQLFreeHandle@8
Error 42:Symbol Undefined _SQLSetEnvAttr@16
Error 42:Symbol Undefined _SQLAllocHandle@12
Error 42:Symbol Undefined _SQLGetDiagRec@32
-- errorlevel 4


  I have fixed the errors.
The exe file only 210kb,it works very good.

Where the errors is ?
In the odbc32.def file.
must set the all used function names.
such as:
  _SQLFreeHandle@8  = SQLFreeHandle


That's interesting.

Those functions are _stdcall, so should be exported from the lib as  
_@.


How did you declare them in arsd.mssql?

You should use extern(Windows) e.g.

extern(Windows) SQLRETURN SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE  
Handle);


The extern(Windows) tells DMD to look for _stdcall.
extern(C) tells it to look for _cdecl.

The difference boils down to who is responsible for cleaning up the stack  
after a function call.  _stdcall assumes the callee will cleanup the  
stack, _cdecl assumes the caller will.


R

--
Using Opera's revolutionary email client: http://www.opera.com/mail/


Re: A lot of people want to use D,but they only know MS SQL Server,what will help them to Learn D?

2014-05-01 Thread FrankLike via Digitalmars-d-learn

On Monday, 14 April 2014 at 17:13:56 UTC, FrankLike wrote:


My advice - use ODBC, it is the fastest way you may connect to 
the SQL server, and you already have everything you need for 
that. :)


Regards


I have test the d\dmd2\windows\lib\odbc32.lib,the size is 4.5kb,
I test it by test.d(build :dmd test.d)
but find the error:
Error 42:Symbol Undefined _SQLFreeHandle@8
Error 42:Symbol Undefined _SQLSetEnvAttr@16
Error 42:Symbol Undefined _SQLAllocHandle@12
Error 42:Symbol Undefined _SQLGetDiagRec@32
-- errorlevel 4


 I have fixed the errors.
The exe file only 210kb,it works very good.

Where the errors is ?
In the odbc32.def file.
must set the all used function names.
such as:
 _SQLFreeHandle@8   = SQLFreeHandle

Ok.
Frank.



Re: A lot of people want to use D,but they only know MS SQL Server,what will help them to Learn D?

2014-04-15 Thread FrankLike



There is another option. Using OpenDBX[0]. My binding here[1].
Its not exactly tested but since OpenDBX is a c library there
shouldn't be any issues as long as you can grab the appropriate
shared library version.

[0] http://www.linuxnetworks.de/doc/index.php/OpenDBX/Support
[1] https://github.com/rikkimax/Derelict_Extras---OpenDBX


Hi,Rikki Cattermole,
Thank you,very much.
It's a very good work.

Frank.


Re: A lot of people want to use D,but they only know MS SQL Server,what will help them to Learn D?

2014-04-14 Thread Rikki Cattermole

On Monday, 14 April 2014 at 15:21:33 UTC, FrankLike wrote:

Hello,everyone:

A lot of people want to use D,but they only know MS SQL 
Server,what will help them to Learn D?


So lots of people want to use D,who can help them?
They want to connect MS SQL Server in D,then they will connect 
other DataBase,
because it's a good idea that nice thing come from the small 
and familiar things always.

Sql driver or ODBC driver, for win7 in D,
who can help them?

Thank you,everyone.


There is another option. Using OpenDBX[0]. My binding here[1].
Its not exactly tested but since OpenDBX is a c library there
shouldn't be any issues as long as you can grab the appropriate
shared library version.

[0] http://www.linuxnetworks.de/doc/index.php/OpenDBX/Support
[1] https://github.com/rikkimax/Derelict_Extras---OpenDBX


Re: A lot of people want to use D,but they only know MS SQL Server,what will help them to Learn D?

2014-04-14 Thread FrankLike



First thing a D programmer MUST do is

1) To port FreeTDS to D, or write a binding/wrapper for it 
(should not be too difficult).


or

2) Use ODBC directly, or maybe also write some wrapper around 
it.


or

3) Implement D connector to MS SQL server directly (I would 
advise against that, such project would probably be 10x bigger 
than the DMD project itself)


My advice - use ODBC, it is the fastest way you may connect to 
the SQL server, and you already have everything you need for 
that. :)


Regards


Thank you.

1)  I have used the  binding/wrapper for FreeTDS,I have tested , 
but can't get the OMF lib,and can't get the ctlib's dll,so  no 
end.
2) I test the ODBC32 ON WIN7,but not have the right OMF lib, I 
test the implib ,

but do not get the right OMF lib ,then I not get any thing.

Maybe my implib tool is error? The implib tool's created time is 
2000-05-05,I know it's old,but I can't get any lastest.


Hope you can help to me,
Thank again.





Re: A lot of people want to use D,but they only know MS SQL Server,what will help them to Learn D?

2014-04-14 Thread FrankLike


My advice - use ODBC, it is the fastest way you may connect to 
the SQL server, and you already have everything you need for 
that. :)


Regards


I have test the d\dmd2\windows\lib\odbc32.lib,the size is 4.5kb,
I test it by test.d(build :dmd test.d)
but find the error:
Error 42:Symbol Undefined _SQLFreeHandle@8
Error 42:Symbol Undefined _SQLSetEnvAttr@16
Error 42:Symbol Undefined _SQLAllocHandle@12
Error 42:Symbol Undefined _SQLGetDiagRec@32
-- errorlevel 4

build mssql.lib :dmd -lib mssql.d database.d -Itrunk/win32/sql.d 
-Itrunk/win32/sqlext.d -IODBC32.lib -Iwin32.lib

build test.exe  :dmd test.d
-module test.d
module test;
import std.stdio;
import arsd.mssql;
pragma(lib,"mssql");
void main() {
try{
	//auto db = new MsSql("Driver={SQL 
Server};Server=[\\]>;Database=dbtest;Trusted_Connection=Yes");
	auto db = new MsSql("Driver={SQL Server Native Client 
10.0};Server=127.0.0.1;Database=test;Trusted_Connection=Yes");


	//db.query("INSERT INTO users (id, name) values (30, 'hello 
mang')");

   db.query("SELECT top 10 * FROM testa");

}
catch(Exception e){
auto f = new File("err.text","w");
scope(exit)f.close();
f.writeln(e.info);

}
}
module 
mssql.d---


// NOTE: I haven't even tried to use this for a test yet!
// It's probably godawful, if it works at all.

module arsd.mssql;
pragma(lib, "odbc32");

public import arsd.database;

import std.string;
import std.exception;

import win32.sql;
import win32.sqlext;

class MsSql : Database {
// dbname = name  is probably the most common connection string
this(string connectionString) {
		SQLAllocHandle(SQL_HANDLE_ENV, cast(void*)SQL_NULL_HANDLE, 
&env);

enforce(env !is null);
scope(failure)
SQLFreeHandle(SQL_HANDLE_ENV, env);
		SQLSetEnvAttr(env, SQL_ATTR_ODBC_VERSION, cast(void *) 
SQL_OV_ODBC3, 0);

SQLAllocHandle(SQL_HANDLE_DBC, env, &conn);
scope(failure)
SQLFreeHandle(SQL_HANDLE_DBC, conn);
enforce(conn !is null);

auto ret = SQLDriverConnect(
conn, null, cast(ubyte*)connectionString.ptr, SQL_NTS,
null, 0, null,
SQL_DRIVER_NOPROMPT );

if ((ret != SQL_SUCCESS_WITH_INFO) && (ret != SQL_SUCCESS))
			throw new DatabaseException("Unable to connect to ODBC object: 
" ~ getSQLError(SQL_HANDLE_DBC, conn)); // FIXME: print error


//query("SET NAMES 'utf8'"); // D does everything with utf8
}

~this() {
SQLDisconnect(conn);
SQLFreeHandle(SQL_HANDLE_DBC, conn);
SQLFreeHandle(SQL_HANDLE_ENV, env);
}

override void startTransaction() {
query("START TRANSACTION");
}

ResultSet queryImpl(string sql, Variant[] args...) {
sql = escapedVariants(this, sql, args);

// this is passed to MsSqlResult to control
SQLHSTMT statement;
		auto returned = SQLAllocHandle(SQL_HANDLE_STMT, conn, 
&statement);


enforce(returned == SQL_SUCCESS);

		returned = SQLExecDirect(statement, cast(ubyte*)sql.ptr, 
SQL_NTS);

if(returned != SQL_SUCCESS)
throw new DatabaseException(error());

return new MsSqlResult(statement);
}

string escape(string sqlData) { // FIXME
return ""; //FIX ME
//return ret.replace("'", "''");
}


string error() {
return null; // FIXME
}

private:
SQLHENV env;
SQLHDBC conn;
}

class MsSqlResult : ResultSet {
// name for associative array to result index
int getFieldIndex(string field) {
if(mapping is null)
makeFieldMapping();
if (field !in mapping)
return -1;
return mapping[field];
}


string[] fieldNames() {
if(mapping is null)
makeFieldMapping();
return columnNames;
}

// this is a range that can offer other ranges to access it
bool empty() {
return isEmpty;
}

Row front() {
return row;
}

void popFront() {
if(!isEmpty)
fetchNext;
}

int length()
{
return 1; //FIX ME
}

this(SQLHSTMT statement) {
this.statement = statement;

SQLSMALLINT info;
SQLNumResultCols(statement, &info);
numFields = info;

fetchNe

Re: A lot of people want to use D,but they only know MS SQL Server,what will help them to Learn D?

2014-04-14 Thread Dejan Lekic

On Monday, 14 April 2014 at 15:21:33 UTC, FrankLike wrote:

Hello,everyone:

A lot of people want to use D,but they only know MS SQL 
Server,what will help them to Learn D?


So lots of people want to use D,who can help them?
They want to connect MS SQL Server in D,then they will connect 
other DataBase,
because it's a good idea that nice thing come from the small 
and familiar things always.

Sql driver or ODBC driver, for win7 in D,
who can help them?

Thank you,everyone.


First thing a D programmer MUST do is

1) To port FreeTDS to D, or write a binding/wrapper for it 
(should not be too difficult).


or

2) Use ODBC directly, or maybe also write some wrapper around it.

or

3) Implement D connector to MS SQL server directly (I would 
advise against that, such project would probably be 10x bigger 
than the DMD project itself)


My advice - use ODBC, it is the fastest way you may connect to 
the SQL server, and you already have everything you need for 
that. :)


Regards


A lot of people want to use D,but they only know MS SQL Server,what will help them to Learn D?

2014-04-14 Thread FrankLike

Hello,everyone:

A lot of people want to use D,but they only know MS SQL 
Server,what will help them to Learn D?


So lots of people want to use D,who can help them?
They want to connect MS SQL Server in D,then they will connect 
other DataBase,
because it's a good idea that nice thing come from the small and 
familiar things always.

Sql driver or ODBC driver, for win7 in D,
who can help them?

Thank you,everyone.


Re: Is it reasonable to learn D

2011-06-16 Thread Jacob Carlborg

On 2011-06-07 23:33, Jonathan M Davis wrote:

On 2011-06-07 14:02, Fabian wrote:

The community does not grow if people stay away because it is small.


Thank you for your answer. - You've got a big point!


I don't know about this but I think QtD and DWT are still being
maintained?


I can't see any changes on this web page:
http://www.dsource.org/projects/dwt/wiki

That's too bad :-(


http://hg.dsource.org/projects/dwt2

DWT was recently ported to D2. Also, QtD is definitely under active
development. But I'm sure that there's still plenty of work to be done.

- Jonathan M Davis


There is a lot of work to be done (for DWT) :

* Fixing bugs
* Finish porting the Mac version
* Update to later versions of SWT
* Port 64bit versions

--
/Jacob Carlborg


Re: Is it reasonable to learn D

2011-06-16 Thread Jacob Carlborg

On 2011-06-07 23:02, Fabian wrote:

 > The community does not grow if people stay away because it is small.

Thank you for your answer. - You've got a big point!

 > I don't know about this but I think QtD and DWT are still being
 > maintained?

I can't see any changes on this web page:
http://www.dsource.org/projects/dwt/wiki


There's currently no reason to update the wiki, please see 
http://hg.dsource.org/projects/dwt2 for changelog.


--
/Jacob Carlborg


Re: Is it reasonable to learn D

2011-06-16 Thread Jacob Carlborg

On 2011-06-07 22:45, Timon Gehr wrote:

Fabian wrote:

  - There are no maintained GUI libraries


I don't know about this but I think QtD and DWT are still being maintained?


DWT is still maintained, although very slowly.

--
/Jacob Carlborg


Re: Is it reasonable to learn D

2011-06-14 Thread Lloyd Dupont

Too late! :P
I have been inspired by the simplicity of D and DGui.
Never happened before with earlier C++ experiments... my loss!

"Jose Armando Garcia"  wrote in message 
news:mailman.906.1308016642.14074.digitalmars-d-le...@puremagic.com...


On Mon, Jun 13, 2011 at 6:33 AM, Lloyd Dupont  wrote:

Let's learn together then! :P
http://galador.net/codeblog/?tag=/D

While my blog post are only about setting up the environment so far.. I 
have

delved in the code for 2 weeks now! (Although I had some day off (work and
programing) in Darwin) I'm right into it now, should have a new blog post
soon! About programing this time!

My verdict: it's frustrating yes. But D has a couple of advantages and 2
that you might like:
- D has event / delegate, just like C# (and unlike C++, or maybe C++ has
them, (it has method pointer, right!?) but it's not taken advantage of!)
- the above point is probably what makes the C++ GUI so... difficult.
Whereas I found a GUI API for D just like WinForm! (DGui!)



Boost, GTK+ and QT have signals. E.g.
http://www.boost.org/doc/libs/1_46_1/doc/html/signals.html 



Re: Is it reasonable to learn D

2011-06-13 Thread Jose Armando Garcia
On Mon, Jun 13, 2011 at 6:33 AM, Lloyd Dupont  wrote:
> Let's learn together then! :P
> http://galador.net/codeblog/?tag=/D
>
> While my blog post are only about setting up the environment so far.. I have
> delved in the code for 2 weeks now! (Although I had some day off (work and
> programing) in Darwin) I'm right into it now, should have a new blog post
> soon! About programing this time!
>
> My verdict: it's frustrating yes. But D has a couple of advantages and 2
> that you might like:
> - D has event / delegate, just like C# (and unlike C++, or maybe C++ has
> them, (it has method pointer, right!?) but it's not taken advantage of!)
> - the above point is probably what makes the C++ GUI so... difficult.
> Whereas I found a GUI API for D just like WinForm! (DGui!)
>

Boost, GTK+ and QT have signals. E.g.
http://www.boost.org/doc/libs/1_46_1/doc/html/signals.html


Re: Is it reasonable to learn D

2011-06-13 Thread Lloyd Dupont

Let's learn together then! :P
http://galador.net/codeblog/?tag=/D

While my blog post are only about setting up the environment so far.. I have 
delved in the code for 2 weeks now! (Although I had some day off (work and 
programing) in Darwin) I'm right into it now, should have a new blog post 
soon! About programing this time!


My verdict: it's frustrating yes. But D has a couple of advantages and 2 
that you might like:
- D has event / delegate, just like C# (and unlike C++, or maybe C++ has 
them, (it has method pointer, right!?) but it's not taken advantage of!)
- the above point is probably what makes the C++ GUI so... difficult. 
Whereas I found a GUI API for D just like WinForm! (DGui!)


In short summary I found these cool things:

VisualD 0.3.24 (plugin for programing from Visual Studio)
http://www.dsource.org/projects/visuald

VisualD NOTE: (system tweaks)(required) : edit sc.ini
http://www.dsource.org/projects/visuald/wiki/KnownIssues#Librarysearchpathnotpassedtolinker

DGui 02052011 (WinForm like API)
http://code.google.com/p/dgui/

Doost (r88) (serialization)
http://www.dsource.org/projects/doost

Windows API r371
http://dsource.org/projects/bindings/wiki/WindowsApi

"Fabian"  wrote in message news:islvgf$1b61$1...@digitalmars.com...

Dear D Community,
is it reasonable to learn D?
I've found a lot of good points for D but I've found a lot of negative
points too. I believe that I needn't to list all the point for D but I
want to give a few examples against learning D I've read in some German
and English boards:

- The D compiler has only bad code optimization
- There are no maintained GUI libraries
- The development of the compiler is very slow
- Only a small community
=> no real German community

So I ask you - Is it reasonable to learn D?
I'm looking forward to your answers.

Greetings Fabian

PS: If you want to contact me you are allowed to write an Email to me.
contact-...@freemail.de 



Re: Is it reasonable to learn D

2011-06-09 Thread Kagamin
Trass3r Wrote:

> >> http://h3.gd/code/nucleus/
> >
> > I lol'd at the suggestion to upgrade my FF4 to a modern HTML5-compliant  
> > browser.
> 
> ^^ No problems with Opera.

I mean, it's ok that it doesn't work, it's just diagnostic message is wrong.


Re: Is it reasonable to learn D

2011-06-08 Thread Kagamin
Andrej Mitrovic Wrote:

> No problem with FF3. You should upgrade FF4 to FF3 I guess. :P

Your FF3 seems to use Adobe Flash instead of HTML5 video.


Re: Is it reasonable to learn D

2011-06-08 Thread Fabian

Das ist ja klasse.
Deutschland, Österreich, Schweiz - alle da



Re: Is it reasonable to learn D

2011-06-08 Thread David Nadlinger

On 6/8/11 9:16 PM, Don wrote:

Trass3r wrote:

- The D compiler has only bad code optimization

Yep, but there is LDC and GDC which use LLVM and GCC as backends
respectively.


- There are no maintained GUI libraries

I wouldn't agree with that. Some people are still working on GtkD, QtD
and DWT.


- The development of the compiler is very slow

More and more people are contributing patches so development has
definitely become faster.
Also Don has more or less taken over development of the CTFE
functionality. Nice trend.


- Only a small community
=> no real German community

There is no separate German community but there are plenty of Germans
here.
Manchmal sieht man sie nur nicht sofort ^^


z.B. Don wohnt in Deutschland.


Ein paar Österreicher sind auch mit von der Partie. :)

David


Re: Is it reasonable to learn D

2011-06-08 Thread Fabian
I'm very surprised that there are so many Germans who use D. Maybe the 
German D book is a reason for that. I don't know but it's pretty cool.




Re: Is it reasonable to learn D

2011-06-08 Thread Don

Trass3r wrote:

- The D compiler has only bad code optimization
Yep, but there is LDC and GDC which use LLVM and GCC as backends 
respectively.



- There are no maintained GUI libraries
I wouldn't agree with that. Some people are still working on GtkD, QtD 
and DWT.



- The development of the compiler is very slow
More and more people are contributing patches so development has 
definitely become faster.
Also Don has more or less taken over development of the CTFE 
functionality. Nice trend.



- Only a small community
  => no real German community

There is no separate German community but there are plenty of Germans here.
Manchmal sieht man sie nur nicht sofort ^^


z.B. Don wohnt in Deutschland.


Re: Is it reasonable to learn D

2011-06-08 Thread Andrej Mitrovic
No problem with FF3. You should upgrade FF4 to FF3 I guess. :P


Re: Is it reasonable to learn D

2011-06-08 Thread Trass3r

http://h3.gd/code/nucleus/


I lol'd at the suggestion to upgrade my FF4 to a modern HTML5-compliant  
browser.


^^ No problems with Opera.


Re: Is it reasonable to learn D

2011-06-08 Thread Kagamin
Trass3r Wrote:

> http://h3.gd/code/nucleus/

I lol'd at the suggestion to upgrade my FF4 to a modern HTML5-compliant browser.


Re: Is it reasonable to learn D

2011-06-08 Thread Adam D. Ruppe
> Is D1.x still supported and under development?

Yes, though it almost never gets new features anymore, just bug
fixes about once a month.

See the changelog here:
http://www.digitalmars.com/d/1.0/changelog.html


Re: Is it reasonable to learn D

2011-06-08 Thread Fabian

Is D1.x still supported and under development?



Re: Is it reasonable to learn D

2011-06-08 Thread Fabian

Okay - Thank you.

Greetings Fab


Re: Is it reasonable to learn D

2011-06-08 Thread Adam D. Ruppe
Fabian wrote:
> By the way: I've read that Digital Mars C++ compiler has got a bad
> code optimization. Is that true?

In general, no. There's some benchmarks where it loses, but there's
also some that win.

Overall, it isn't as good at optimizing as gcc and visual studio,
but it still isn't bad.

(The two places where it does the worst from what I've seen is
floating point, which is bad, and inlining, which is ok but not
great. Everything else it does pretty well.)


Re: Is it reasonable to learn D

2011-06-08 Thread Fabian

Hi
I'm using D on Windows so I'm not able to use LDC. But I believe DMD 
should be a good alternative too.

If the garbage collection makes trouble I can disable it - or?
http://stackoverflow.com/questions/472133/turning-off-the-d-garbage-collector

By the way: I've read that Digital Mars C++ compiler has got a bad code 
optimization. Is that true? In comparison with the Microsoft Visual 
Studio compiler.


Greetings Fabian


Re: Is it reasonable to learn D

2011-06-08 Thread Steven Schveighoffer

On Wed, 08 Jun 2011 07:11:03 -0400, Fabian  wrote:


Calling all: Thank you.

I want to use Tango because a friend has lent me a book about learning D  
and using the Tango Software Library. So I'm forced to use D 1.x, aren't  
I?


At the moment, yes.  I believe there are ports to D2 in the works.

At the moment I just want to learn D - I'm not going to code any big  
project with D next time so I think DMD is OK at the beginning. But I'm  
no coding newbie - I've already experiences with Delphi and I'm able to  
find a solution (also object orientated) for more or less complicated  
problems. (Network, Graphics, Threading, ...).


This is a good way to start.  But if you are planning on using Tango, why  
not use LDC (assuming you are on Linux)?  LDC is built *expecting* Tango  
to be the runtime library, whereas DMD expects phobos to be the runtime  
(Tango is designed to work with both).


Just remember if you need help, you can ask any questions here!  D's  
community is usually very eager to help out newbies.


But if I want to start a bigger project like a small game (Jump 'n' Run,  
...) I would be very glad to know that my compiler has got a good code  
optimization.


Code optimization is likely not going to be an issue, DMD and LDC both are  
based on C++ compilers, so they have a lot of the same optimizations. I'd  
worry more about the GC for performance.


-Steve


Re: Is it reasonable to learn D

2011-06-08 Thread Fabian

Calling all: Thank you.

I want to use Tango because a friend has lent me a book about learning D 
and using the Tango Software Library. So I'm forced to use D 1.x, aren't I?


At the moment I just want to learn D - I'm not going to code any big 
project with D next time so I think DMD is OK at the beginning. But I'm 
no coding newbie - I've already experiences with Delphi and I'm able to 
find a solution (also object orientated) for more or less complicated 
problems. (Network, Graphics, Threading, ...).


But if I want to start a bigger project like a small game (Jump 'n' Run, 
...) I would be very glad to know that my compiler has got a good code 
optimization.


Greetings Fabian

PS: I believe that's no big problem that there's no German community 
because my English is understandable - I think. But it's more 
comfortable to communicate in German.


Re: Is it reasonable to learn D

2011-06-08 Thread Fabian

Oh - yeah.
Thank you - English can be so easy :D


Re: Is it reasonable to learn D

2011-06-07 Thread Trass3r

- The D compiler has only bad code optimization
Yep, but there is LDC and GDC which use LLVM and GCC as backends  
respectively.



- There are no maintained GUI libraries
I wouldn't agree with that. Some people are still working on GtkD, QtD and  
DWT.



- The development of the compiler is very slow
More and more people are contributing patches so development has  
definitely become faster.
Also Don has more or less taken over development of the CTFE  
functionality. Nice trend.



- Only a small community
  => no real German community

There is no separate German community but there are plenty of Germans here.
Manchmal sieht man sie nur nicht sofort ^^


So I ask you - Is it reasonable to learn D?
Yeah, learning D is definitely worth it, if only to know why C++ and  
especially C++0x sucks ass ;)

The language and its potential is just great.

In my experience you shouldn't use D for a particular project though if you
- have pressing deadlines, cause compiler bugs might become very painful.
- depend on C++ libraries or have to code a module for a big C++  
framework. I tried using SFML but wasted a lot of time writing the wrapper  
code instead of actual application code.


Apart from that it's perfectly possible to accomplish non-trivial projects  
with D, be it against all odds like

http://h3.gd/code/nucleus/


Re: Is it reasonable to learn D

2011-06-07 Thread Timon Gehr
Fabian wrote:
> > The community does not grow if people stay away because it is small.
>
> Thank you for your answer. - You've got a big point!
>
> > I don't know about this but I think QtD and DWT are still being
> > maintained?
>
> I can't see any changes on this web page:
> http://www.dsource.org/projects/dwt/wiki
>
> That's too bad :-(
>
> How do you use D? What are your fields of application?

I am quite new to D myself. I have been using D mostly for solving small
algorithmic problems.
I'd like to improve that situation though, I will definitely use D for some
small/medium project soon.
What are you looking for? Do you have any specific use in mind?

>
> Greetings Fabian
>
> PS: Are you a native German speaker?

Yes.


Timon


Re: Is it reasonable to learn D

2011-06-07 Thread Trass3r

Am 07.06.2011, 23:02 Uhr, schrieb Fabian :
I can't see any changes on this web page:  
http://www.dsource.org/projects/dwt/wiki


That doesn't mean anything.
Development sometimes takes place behind the scenes or in forks at github  
or bitbucket.


Re: Is it reasonable to learn D

2011-06-07 Thread Robert Clipsham

On 07/06/2011 20:47, Fabian wrote:

Dear D Community,
is it reasonable to learn D?
I've found a lot of good points for D but I've found a lot of negative
points too. I believe that I needn't to list all the point for D but I
want to give a few examples against learning D I've read in some German
and English boards:

- The D compiler has only bad code optimization


You must be thinking of dmd! There's also ldc and gdc using the llvm and 
gcc backends respectively, they're capable of producing code roughly as 
fast as the equivalent C/C++ applications.



- There are no maintained GUI libraries


I don't know what the state of GUI libraries is in D, but I have used 
both GtkD and QtD without problem before now. There are also a couple of 
others which have recently had updates.



- The development of the compiler is very slow


Very slow? dmd gets a new release about once a month with a huge of bug 
fixes - http://www.digitalmars.com/d/2.0/changelog.html - scroll down 
the page, there's a lot in each release. And, since the move the github, 
there's even more going on - 
https://github.com/D-Programming-Language/dmd/commits/master at least a 
few commits a day, by an increasing number of developers. The speed of 
development has increased a lot in the past months.



- Only a small community


Well that's a catch-22 - if people chose not to learn it because it has 
a small community, the community will stay small! There's an increasing 
amount of awareness and adoption of D, particularly since Andrei 
released his book "The D Programming Language".



=> no real German community


You'd be surprised - while I don't think there's a dedicated German 
forum for D (perhaps you'd like to start one?) there are a lot of people 
from Germany using D - about 10% of the people in D's IRC channel on 
freenode are German, and there's probably more using the newsgroups. I 
think a lot of people chose to use English anyway as it's the language 
most of the people on the forums speak.



So I ask you - Is it reasonable to learn D?


Definitely yes! Even if you don't end up using it as a primary language, 
it's a fantastic language with lots of great ideas - I find myself 
missing features from D when I use other languages.



I'm looking forward to your answers.

Greetings Fabian

PS: If you want to contact me you are allowed to write an Email to me.
contact-...@freemail.de


--
Robert
http://octarineparrot.com/


Re: Is it reasonable to learn D

2011-06-07 Thread Jonathan M Davis
On 2011-06-07 14:02, Fabian wrote:
> > The community does not grow if people stay away because it is small.
> 
> Thank you for your answer. - You've got a big point!
> 
> > I don't know about this but I think QtD and DWT are still being
> > maintained?
> 
> I can't see any changes on this web page:
> http://www.dsource.org/projects/dwt/wiki
> 
> That's too bad :-(

http://hg.dsource.org/projects/dwt2

DWT was recently ported to D2. Also, QtD is definitely under active 
development. But I'm sure that there's still plenty of work to be done.

- Jonathan M Davis


Re: Is it reasonable to learn D

2011-06-07 Thread Ali Çehreli

On 06/07/2011 01:55 PM, Fabian wrote:
>> D is still a young language,
>> which I think accounts for all of the negative feedback you've listed.

> What does "think accounts" mean?

I rephrase with apology:

D is still a young language. I think that fact accounts for 
all of the negative feedback that you've listed.


Ali



Re: Is it reasonable to learn D

2011-06-07 Thread Fabian

> The community does not grow if people stay away because it is small.

Thank you for your answer. - You've got a big point!

> I don't know about this but I think QtD and DWT are still being
> maintained?

I can't see any changes on this web page: 
http://www.dsource.org/projects/dwt/wiki


That's too bad :-(

How do you use D? What are your fields of application?

Greetings Fabian

PS: Are you a native German speaker?





Re: Is it reasonable to learn D

2011-06-07 Thread Fabian

I think your question is highly subjective. D is still a young language,
which I think accounts for all of the negative feedback you've listed.


I believe D isn't so young anymore. Version 1.0 was released 2007 and I 
believe 4 years are long enough to bring out some maintained GUI libraries.
If someone says D doesn't aim at GUI development I must say that's not 
true because D is designed as a new object orientated language basing on 
C. And as a consequence of that D should support all the areas of 
application which C already supports.


I hope you can understand my bad English. Connecting to that (my bad 
English) I have another stupid question: What does "think accounts" mean?


Greetings Fabian


Re: Is it reasonable to learn D

2011-06-07 Thread Timon Gehr
Fabian wrote:
> Dear D Community,
> is it reasonable to learn D?
> I've found a lot of good points for D but I've found a lot of negative
> points too. I believe that I needn't to list all the point for D but I
> want to give a few examples against learning D I've read in some German
> and English boards:
>
>  - The D compiler has only bad code optimization

It is not very bad, but does not match the sophisticatedness of modern C++
compilers. I think the optimizations on integer arithmetics are quite okay, but
unfortunately the compiler cannot create floating point register variables.

You can always resort to inline assembly/link in C or C++ if some part of your
code is very performance-critical.

D code can already outperform C++ code on similar tasks if you make smart use 
of D
features. (without making your code ugly or unmaintainable).
But it is true that this could be improved. (To the point where a D compiler 
could
make MORE optimizations than C++, because it has immutable and pure).

>  - There are no maintained GUI libraries

I don't know about this but I think QtD and DWT are still being maintained?
Also, D is fully binary compatible with C/(C++) You can also do your GUI
programming in C or C++ and use D for some program logic until the situation 
improves.

>  - The development of the compiler is very slow

Have a look at the last changelog. The development is not lightning fast but 
quite
steady.
Also keep in mind that there is no big company behind D, all the compiler
development is basically volunteering work.

>  - Only a small community
>   => no real German community

The community does not grow if people stay away because it is small. ;)
*I* speak German btw.

>
> So I ask you - Is it reasonable to learn D?
> I'm looking forward to your answers.
>
> Greetings Fabian
>
> PS: If you want to contact me you are allowed to write an Email to me.
> contact-...@freemail.de

I think it is very reasonable. But it depends on what you want to use it for.
There are already companies out there that use D.
If you have some time to spend, it is certainly valuable. D has some very nice
design decisions.
The _language_ itself is imho superior to the alternatives. Where D is arguably
somewhat lacking (as you have already figured out.) is support/native libraries.
It does make up some of that by being easily linkable with C libraries, but you
often will have to write the bindings yourself.
But again that does not get better if people don't learn D because of lack of
support or native libraries.

There are also some upsides to a language being less mature: You can still 
submit
patches and get some of your very own code into the reference compiler
implementation! ;)


Timon


Re: Is it reasonable to learn D

2011-06-07 Thread Kai Meyer

On 06/07/2011 01:47 PM, Fabian wrote:

Dear D Community,
is it reasonable to learn D?
I've found a lot of good points for D but I've found a lot of negative
points too. I believe that I needn't to list all the point for D but I
want to give a few examples against learning D I've read in some German
and English boards:

- The D compiler has only bad code optimization
- There are no maintained GUI libraries
- The development of the compiler is very slow
- Only a small community
=> no real German community

So I ask you - Is it reasonable to learn D?
I'm looking forward to your answers.

Greetings Fabian

PS: If you want to contact me you are allowed to write an Email to me.
contact-...@freemail.de


I think your question is highly subjective. D is still a young language, 
which I think accounts for all of the negative feedback you've listed.


Is it reasonable to learn D

2011-06-07 Thread Fabian

Dear D Community,
is it reasonable to learn D?
I've found a lot of good points for D but I've found a lot of negative 
points too. I believe that I needn't to list all the point for D but I 
want to give a few examples against learning D I've read in some German 
and English boards:


- The D compiler has only bad code optimization
- There are no maintained GUI libraries
- The development of the compiler is very slow
- Only a small community
=> no real German community

So I ask you - Is it reasonable to learn D?
I'm looking forward to your answers.

Greetings Fabian

PS: If you want to contact me you are allowed to write an Email to me.
contact-...@freemail.de