Re: Questions about D

2020-11-27 Thread Steven Schveighoffer via Digitalmars-d-learn

On 11/27/20 2:56 PM, Walter wrote:

On Friday, 27 November 2020 at 19:46:52 UTC, Ola Fosheim Grostad wrote:

Why not? What are you looking for?

I'm looking for a general purpose which I can use everywhere


Depends on how you define "everywhere".

If you mean can it be used in all manner of purposes, yes, it can. It is 
used in video games, in web development, in command line tools, high 
performance computing, server software, etc.


If you mean can it be used on all the platforms you want to use, it 
depends on the platform. In general, if gcc or llvm supports your 
platform, you can probably get it to work. Some platforms are not as 
mature in D as others, or may require more effort.


So it's hard to definitively answer your question.

-Steve


Re: Questions about D

2020-11-27 Thread Ola Fosheim Grostad via Digitalmars-d-learn

On Friday, 27 November 2020 at 19:56:38 UTC, Walter wrote:
On Friday, 27 November 2020 at 19:46:52 UTC, Ola Fosheim 
Grostad wrote:

Why not? What are you looking for?

I'm looking for a general purpose which I can use everywhere


It is fairly general, but I don't think it is the best option for 
targeting 16 bit or 8 bit cpus. In that case C would probably be 
better.


Re: Questions about D

2020-11-27 Thread Walter via Digitalmars-d-learn
On Friday, 27 November 2020 at 19:46:52 UTC, Ola Fosheim Grostad 
wrote:

Why not? What are you looking for?

I'm looking for a general purpose which I can use everywhere


Re: Questions about D

2020-11-27 Thread Ola Fosheim Grostad via Digitalmars-d-learn

On Friday, 27 November 2020 at 19:34:41 UTC, Walter wrote:

Hi, I have some questions to ask regarding D:

1) Should I learn D ?


Why not? What are you looking for?


2) Can I cross-compile D programs?


You should be able to with ldc/gdc if you have some experience.


3) Is it a low-level language?


Lower than high, higher than low. It is if you want it to be.


4) Which type of applications is D most used in?


Good question. I would assume command line applications, batch. 
Like C++.



5) Is it fast and not bloated with useless features?


It is fast, but I think you'll find one or two useless features 
if you go looking for it.




Questions about D

2020-11-27 Thread Walter via Digitalmars-d-learn

Hi, I have some questions to ask regarding D:

1) Should I learn D ?

2) Can I cross-compile D programs?

3) Is it a low-level language?

4) Which type of applications is D most used in?

5) Is it fast and not bloated with useless features?


Re: Basic questions about D lang?

2017-11-29 Thread Jesse Phillips via Digitalmars-d-learn

On Tuesday, 28 November 2017 at 13:39:11 UTC, Jayam wrote:

Can we compile our program to multi program ?


Based on your C# reference you must be referring to the "Mixed 
Platform" build option. No, that is a .NET thing and D is not on 
.NET (that project has died).


D requires a more traditional approach to multiple platforms, 
you'll need to write your code with the needs of your supported 
platforms in mind. Luckily in pure D this is like no work, but 
when you interface to C/C++ libraries you'll hit sizes of types 
and structures changing almost randomly (ok it isn't that bad).


Re: Basic questions about D lang?

2017-11-29 Thread user1234 via Digitalmars-d-learn

On Wednesday, 29 November 2017 at 11:32:51 UTC, Jayam wrote:

In D lang,
[...]
3. Can we make library file and use that in any project like 
'Util class' ?


Of course ! Plenty of them can be found here: 
https://code.dlang.org/?sort=updated=library




Re: Basic questions about D lang?

2017-11-29 Thread crimaniak via Digitalmars-d-learn

On Wednesday, 29 November 2017 at 11:32:51 UTC, Jayam wrote:

In D lang,
1. Is there any feature async/ await like "c#" ? I can't find 
feature like async.
As for me, async/await feature is a half-baked solution. With 
vibe-d you can write asynchronous code without thinking about it 
at all. Details: http://vibed.org/features


2. Is Garbage Collector work default without any code to force 
like in c# or do we need to manually trigger it ?
It starts automatically when you try to allocate memory and there 
is no space in heap. In fact, it leads to architecture 
restriction: destructors must be @nogc. Also, you can run it with 
GC.collect()
3. Can we make library file and use that in any project like 
'Util class' ?

Yes.




Re: Basic questions about D lang?

2017-11-29 Thread rikki cattermole via Digitalmars-d-learn

On 29/11/2017 11:32 AM, Jayam wrote:

In D lang,
1. Is there any feature async/ await like "c#" ? I can't find feature 
like async.


No. The idea is floating around however.

2. Is Garbage Collector work default without any code to force like in 
c# or do we need to manually trigger it ?


Automatic but if you want to be in control of it you can.


3. Can we make library file and use that in any project like 'Util class' ?


Yes, but you don't need utility classes. They are a code smell 
(free-functions are the solution here).


Basic questions about D lang?

2017-11-29 Thread Jayam via Digitalmars-d-learn

In D lang,
1. Is there any feature async/ await like "c#" ? I can't find 
feature like async.
2. Is Garbage Collector work default without any code to force 
like in c# or do we need to manually trigger it ?
3. Can we make library file and use that in any project like 
'Util class' ?







Re: Basic questions about D lang?

2017-11-28 Thread Ali Çehreli via Digitalmars-d-learn

On 11/28/2017 05:51 AM, Jayam wrote:

> Can we compile our program to multi platform?

Most definitely! D is great in multi-threaded programming. (I hope that 
was the question. :) )


Ali



Re: Basic questions about D lang?

2017-11-28 Thread Steven Schveighoffer via Digitalmars-d-learn

On 11/28/17 8:52 AM, Jayam wrote:

On Tuesday, 28 November 2017 at 13:42:05 UTC, Stefan Koch wrote:

On Tuesday, 28 November 2017 at 13:39:11 UTC, Jayam wrote:

Is D language open source?
Do this have GUI Desktop application support ?
Do this have web api support ?
Can we compile our program to multi program ?


yes
yes some (dlang-ui for example)
yes some (vibe.d or arsd)
I don't know what you mean with that


Thanks.
Can we compile our program to multi platform?


D supports several platforms:

https://wiki.dlang.org/Compilers

-Steve


Re: Basic questions about D lang?

2017-11-28 Thread Jayam via Digitalmars-d-learn

On Tuesday, 28 November 2017 at 13:42:05 UTC, Stefan Koch wrote:

On Tuesday, 28 November 2017 at 13:39:11 UTC, Jayam wrote:

Is D language open source?
Do this have GUI Desktop application support ?
Do this have web api support ?
Can we compile our program to multi program ?


yes
yes some (dlang-ui for example)
yes some (vibe.d or arsd)
I don't know what you mean with that


Thanks.
Can we compile our program to multi platform?


Re: Basic questions about D lang?

2017-11-28 Thread Jayam via Digitalmars-d-learn
On Tuesday, 28 November 2017 at 13:42:08 UTC, rikki cattermole 
wrote:

On 28/11/2017 1:39 PM, Jayam wrote:

Is D language open source?


Yes 100%


Do this have GUI Desktop application support ?


Sure but probably not to the level you expect.


Do this have web api support ?


Ugh what? Be more specific.


Can we compile our program to multi program ?


Okay that definitely makes no sense.

Do you mean can we cross compile to other architectures other 
than the host?


Thanks.
Can we compile our program to multi platform?


Re: Basic questions about D lang?

2017-11-28 Thread rikki cattermole via Digitalmars-d-learn

On 28/11/2017 1:39 PM, Jayam wrote:

Is D language open source?


Yes 100%


Do this have GUI Desktop application support ?


Sure but probably not to the level you expect.


Do this have web api support ?


Ugh what? Be more specific.


Can we compile our program to multi program ?


Okay that definitely makes no sense.

Do you mean can we cross compile to other architectures other than the host?


Re: Basic questions about D lang?

2017-11-28 Thread Stefan Koch via Digitalmars-d-learn

On Tuesday, 28 November 2017 at 13:39:11 UTC, Jayam wrote:

Is D language open source?
Do this have GUI Desktop application support ?
Do this have web api support ?
Can we compile our program to multi program ?


yes
yes some (dlang-ui for example)
yes some (vibe.d or arsd)
I don't know what you mean with that


Basic questions about D lang?

2017-11-28 Thread Jayam via Digitalmars-d-learn

Is D language open source?
Do this have GUI Desktop application support ?
Do this have web api support ?
Can we compile our program to multi program ?



Re: some questions about D

2009-10-24 Thread Luis P. Mendes
Thu, 22 Oct 2009 13:04:55 -0400, bearophile escreveu:

 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 at Java :-) If
 you work on Windows (but you have said you use Linux) C# gives 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 be compared to languages that are backed by large firms (C#, Java,
 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

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.

Luis



Re: some questions about D

2009-10-22 Thread bearophile
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 
at Java :-) If you work on Windows (but you have said you use Linux) C# gives 
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 be 
compared to languages that are backed by large firms (C#, Java, 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


Re: some questions about D

2009-10-22 Thread div0
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

bearophile wrote:
 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 at Java :-) If you work on Windows (but you have said you use Linux) C# 
 gives 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 be 
 compared to languages that are backed by large firms (C#, Java, etc).
 
 
 2) Is it easy to use C++ libraries?
 
 D is able to use C libraries, and a little of C++ (with D2, mostly).

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.

 
 
 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.

LDC is D1 only.

 
 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.

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?)

 
 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.

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.

 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.
 

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-


Re: some questions about D

2009-10-22 Thread Nick B

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/tango


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 ?



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