digitalmars.D.learn - some questions about D
- Luis P. Mendes (24/24) Oct 22 2009 Hi,
- bearophile (13/30) Oct 22 2009 Very good, D sounds fit for such kind of code.
- div0 (28/75) Oct 22 2009 -----BEGIN PGP SIGNED MESSAGE-----
- Luis P. Mendes (5/74) Oct 24 2009 Thank you all for your replies.
- Nick B (18/45) Oct 22 2009 The LDC compiler, is being used currently by members of the Tango
- Phil Deets (8/12) Oct 23 2009 I remember when I started trying to learn D, I had trouble here. My main...
Hi, I'm about to begin a project on artificial intelligence, decision trees and some other algorithmic stuff that needs runtime and development speed. I've been looking to D before, but ended up reading and learning some C+ +. But C++ seems more complex than I need and outdated (my opinion). As Python (the language I used to program) is not suitable for the task, I kindly ask you some questions. I only need short answers! 1) Can I access a PostgreSQL and/or MySQL database from D? Are there (fast/reliable) database adapters? 2) Is it easy to use C++ libraries? Is it close to use them from inside C ++ programs? 3) D compilers don't yet compile natively in 64 bits processors? Mine is a x86_64 Linux system. 4) I have to use huge (for me) amounts of data, maybe I'll make use of most of my 8GB RAM memory. Will I find problems due to any compiler/ language limit? 5) Besides Alexei forthcoming book, is there documentation for the whole language and not only to part of it as in http://compsci.ca/v3/ viewtopic.php?t=9518 and http://en.wikibooks.org/wiki/A_Beginner% 27s_Guide_to_D ? 6) Is D version 2 suitable for a beginner like me starting a new project? 7) What advantages can I have in using Tango? Speed? Ease of development? will it be integrated as standard? Luis
Oct 22 2009
Luis P. Mendes:I'm about to begin a project on artificial intelligence, decision trees and some other algorithmic stuff that needs runtime and development speed.Very good, D sounds fit for such kind of code. If you need development speed (with good performance) you may also take a look some C++ interoperability, and its performance and development speed are usually good. I can give you some of the answers, and I leave the other questions to other people:1) Can I access a PostgreSQL and/or MySQL database from D? Are there (fast/reliable) database adapters?There can be, but there's little that's really reliable in D :-) D is a newish language, and it has very few developers (Walter, Andrei for the std lib Phobos, and recently Don mostly for the as debugger), so things can't be2) Is it easy to use C++ libraries?D is able to use C libraries, and a little of C++ (with D2, mostly).3) D compilers don't yet compile natively in 64 bits processors? Mine is a x86_64 Linux system.LDC has acceptable 64 bit support on Linux. But then you can't port code to Windows yet.4) I have to use huge (for me) amounts of data, maybe I'll make use of most of my 8GB RAM memory. Will I find problems due to any compiler/ language limit?I don't know. Not many people use D for large purposes yet. You can try, and tell us. Tango developers may find ways to solve some of the problems you find along the way.5) Besides Alexei forthcoming book, is there documentation for the whole language and not only to part of it as in http://compsci.ca/v3/ viewtopic.php?t=9518 and http://en.wikibooks.org/wiki/A_Beginner% 27s_Guide_to_D ?There's the "Learning to Tango with D" that's mostly about D1 Tango.6) Is D version 2 suitable for a beginner like me starting a new project?D2 is Alpha status, it's unfinished. It can be used but be ready for a rough ride. It will change in future, so if you want your code to keep working 2 years from now, you will need to update your code every few months.7) What advantages can I have in using Tango? Speed? Ease of development? will it be integrated as standard?Tango is often less buggy, faster, uses memory better (often no memory allocations unless you want them), and gives you a lot more features. Bye, bearophile
Oct 22 2009
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 bearophile wrote:Luis P. Mendes:No basically. the interface to C++ is extremely limited, you would need to be a very experience c++ programmer to effectively interface with any c++ library.I'm about to begin a project on artificial intelligence, decision trees and some other algorithmic stuff that needs runtime and development speed.Very good, D sounds fit for such kind of code. If you need development speed (with good performance) you may also take a look some C++ interoperability, and its performance and development speed are usually good. I can give you some of the answers, and I leave the other questions to other people:1) Can I access a PostgreSQL and/or MySQL database from D? Are there (fast/reliable) database adapters?There can be, but there's little that's really reliable in D :-) D is a newish language, and it has very few developers (Walter, Andrei for the std lib Phobos, and recently Don mostly for the as debugger), so things can't be2) Is it easy to use C++ libraries?D is able to use C libraries, and a little of C++ (with D2, mostly).LDC is D1 only.3) D compilers don't yet compile natively in 64 bits processors? Mine is a x86_64 Linux system.LDC has acceptable 64 bit support on Linux. But then you can't port code to Windows yet.You'd have to use LDC I believe. Only dmd is D2 and that's 32bit, so you get ~3gb on 'doze. (what's the Linux version get you?)4) I have to use huge (for me) amounts of data, maybe I'll make use of most of my 8GB RAM memory. Will I find problems due to any compiler/ language limit?I don't know. Not many people use D for large purposes yet. You can try, and tell us. Tango developers may find ways to solve some of the problems you find along the way.No it's not subtle for a beginner. You'll almost certainly hit compiler bugs along with a rapidly changing standard library. You need to be an experienced developer or just a very stubborn person to cope with that.5) Besides Alexei forthcoming book, is there documentation for the whole language and not only to part of it as in http://compsci.ca/v3/ viewtopic.php?t=9518 and http://en.wikibooks.org/wiki/A_Beginner% 27s_Guide_to_D ?There's the "Learning to Tango with D" that's mostly about D1 Tango.6) Is D version 2 suitable for a beginner like me starting a new project?D2 is Alpha status, it's unfinished. It can be used but be ready for a rough ride. It will change in future, so if you want your code to keep working 2 years from now, you will need to update your code every few months.Yeah, but you'll get educated in a crappy old style, object based library paradigm. Tango's design blows compared to template style libraries, though it's worth doing if you expect to become a Java programmer. - -- My enormous talent is exceeded only by my outrageous laziness. http://www.ssTk.co.uk -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFK4KfrT9LetA9XoXwRAoQnAJsESM2q86Qov90DfS1tOWWa9Xqe5wCfUX6O lCrfsiOPGpJvL4l3/WVp6bA= =dTlh -----END PGP SIGNATURE-----7) What advantages can I have in using Tango? Speed? Ease of development? will it be integrated as standard?Tango is often less buggy, faster, uses memory better (often no memory allocations unless you want them), and gives you a lot more features.
Oct 22 2009
Thu, 22 Oct 2009 13:04:55 -0400, bearophile escreveu:Luis P. Mendes:Thank you all for your replies. I'd really like to do my project in D, let's see if I can find a way to do it. LuisI'm about to begin a project on artificial intelligence, decision trees and some other algorithmic stuff that needs runtime and development speed.Very good, D sounds fit for such kind of code. If you need development speed (with good performance) you may also take a look at Java :-) If interoperability, and its performance and development speed are usually good. I can give you some of the answers, and I leave the other questions to other people:1) Can I access a PostgreSQL and/or MySQL database from D? Are there (fast/reliable) database adapters?There can be, but there's little that's really reliable in D :-) D is a newish language, and it has very few developers (Walter, Andrei for the std lib Phobos, and recently Don mostly for the as debugger), so things etc).2) Is it easy to use C++ libraries?D is able to use C libraries, and a little of C++ (with D2, mostly).3) D compilers don't yet compile natively in 64 bits processors? Mine is a x86_64 Linux system.LDC has acceptable 64 bit support on Linux. But then you can't port code to Windows yet.4) I have to use huge (for me) amounts of data, maybe I'll make use of most of my 8GB RAM memory. Will I find problems due to any compiler/ language limit?I don't know. Not many people use D for large purposes yet. You can try, and tell us. Tango developers may find ways to solve some of the problems you find along the way.5) Besides Alexei forthcoming book, is there documentation for the whole language and not only to part of it as in http://compsci.ca/v3/ viewtopic.php?t=9518 and http://en.wikibooks.org/wiki/A_Beginner% 27s_Guide_to_D ?There's the "Learning to Tango with D" that's mostly about D1 Tango.6) Is D version 2 suitable for a beginner like me starting a new project?D2 is Alpha status, it's unfinished. It can be used but be ready for a rough ride. It will change in future, so if you want your code to keep working 2 years from now, you will need to update your code every few months.7) What advantages can I have in using Tango? Speed? Ease of development? will it be integrated as standard?Tango is often less buggy, faster, uses memory better (often no memory allocations unless you want them), and gives you a lot more features. Bye, bearophile
Oct 24 2009
Luis P. Mendes wrote:Hi, I'm about to begin a project on artificial intelligence, decision trees and some other algorithmic stuff that needs runtime and development speed. I've been looking to D before, but ended up reading and learning some C+ +. But C++ seems more complex than I need and outdated (my opinion). As Python (the language I used to program) is not suitable for the task, I kindly ask you some questions. I only need short answers! 1) Can I access a PostgreSQL and/or MySQL database from D? Are there (fast/reliable) database adapters?This I don't know. I suggest you ask the tango team.2) Is it easy to use C++ libraries? Is it close to use them from inside C ++ programs? 3) D compilers don't yet compile natively in 64 bits processors? Mine is a x86_64 Linux system.The LDC compiler, is being used currently by members of the Tango framework, especially for large maths problems. Tango does support 64 bit code. I might be worthwhile talking to them directly. You can find them by going to : http://webchat.freenode.net/ and enter "#D.tango" as the channel. Enter your name as a user id. If you can, try to talk to "fawzi" you should also check out: http://www.dsource.org/projects/tango4) I have to use huge (for me) amounts of data, maybe I'll make use of most of my 8GB RAM memory. Will I find problems due to any compiler/ language limit? 5) Besides Alexei forthcoming book, is there documentation for the whole language and not only to part of it as in http://compsci.ca/v3/ viewtopic.php?t=9518 and http://en.wikibooks.org/wiki/A_Beginner% 27s_Guide_to_D ?Details of the book can be found here: http://www.dsource.org/projects/tango/wiki/LearnToTangoWithD and yes, I found the book easy to understand.6) Is D version 2 suitable for a beginner like me starting a new project?D2 is still a moving target. Tango runs on top of D1.7) What advantages can I have in using Tango? Speed? Ease of development? will it be integrated as standard?Tango is an alternative framework library, which is being activity supported. If you want to compare based on speed, you should write a small benchmark for your problem. Nick B
Oct 22 2009
On Thu, 22 Oct 2009 11:50:51 -0500, Luis P. Mendes <luislupeXXX gmailxxx.com> wrote:5) Besides Alexei forthcoming book, is there documentation for the whole language and not only to part of it as in http://compsci.ca/v3/ viewtopic.php?t=9518 and http://en.wikibooks.org/wiki/A_Beginner% 27s_Guide_to_D ?I remember when I started trying to learn D, I had trouble here. My main problem was I did not think to click the "Language" link near the top of the D2 website to get the language documentation; so in case you overlooked it like I did, there is a full language documentation when you click Language on the top-left of http://www.digitalmars.com/d/2.0/index.html.
Oct 23 2009