Re: Help me decide D or C

2019-08-04 Thread Aurélien Plazzotta via Digitalmars-d-learn

On Saturday, 3 August 2019 at 12:29:18 UTC, Russel Winder wrote:



Knowing many paradigms well is proven experimentally (see the 
work by Petre, Green, Gilmore, and others) to improve 
capability in any given language. So knowing Java, Prolog, 
Lisp, Python, SQL, C, Go, Rust, D, Kotlin, Groovy, Ruby to a 
goodly level of competence makes you a better programmer in any 
one of them.



Thank you Russel Winder. Thanks to your comment, I was able to 
find the book you spoke of and ordered it immediately.

For those who may be interested, here it is:
Psychology of Programming (Computers and People Series), written 
by J-M Hoc, T.R.G. Green, R. samurcay, & D. Gilmore, published in 
1991 by Academic Press.


As for me, it is interesting to notice that the authors of this 
book work for Inria, the same French Institute who created F* 
language in partnership with Microsoft Research, along with Low*, 
a subset of F* language and its librairies, focused on C features 
(e.g. the C memory model, stack and heap-allocated arrays, 
machine integers, C string literals, etc.).
See https://fstarlang.github.io/lowstar/html/Introduction.html 
for more details.


It is really refreshing for the community to have someone like 
you who keep connections with other languages, technologies and 
paradigms.


I wish you the best!


Re: Help me decide D or C

2019-08-01 Thread Aurélien Plazzotta via Digitalmars-d-learn

On Thursday, 1 August 2019 at 16:23:51 UTC, Alexandre wrote:

On Thursday, 1 August 2019 at 15:42:08 UTC, a11e99z wrote:

On Thursday, 1 August 2019 at 15:17:11 UTC, a11e99z wrote:



Right now, job is not a good criteria for me. I work in a not 
related field and I doubt I would get any job working with CS. 
That would be great, but I doubt it anyway, so it is more a 
hobby thing.


If penetrating a job segment-market is not a requirement, perhaps 
you would take pleasure in learning F*. It is a pure functional 
programming language based on logical-mathematical thought. It 
meant to be a replacement for Coq, a proof-assistant turned into 
general-purpose language.


In my opinion, this kind of paradigm would fit quite well in the 
near-future RISCV technological and commercial market since their 
technical specifications have been feature-ready.


Here is the official tutorial for F* language:
https://www.fstar-lang.org/tutorial/

I hope this kind of project is the last step before entering the 
realm of quantum programming because it is time to embrace the 
change.
Quantum mechanics are known since the 1930's, quantum physics 
since 50's, quantum information since 70's, quantum computation 
since 2000's. What are we waiting for quantum programming? Again 
the same and always pathological syndromes remain: "not invented 
here" and "it's if not broken, don't fix it."


But don't fool yourself, D is not for beginners. Ali Çehreli is a 
very skilled programmer, ergo, he can't reason like a 
new/starting programmer anymore, regardless of his patience and 
kindness.




Re: Component based programming in D

2019-06-18 Thread Aurélien Plazzotta via Digitalmars-d-learn

On Tuesday, 18 June 2019 at 09:17:09 UTC, Bart wrote:

Can someone help me understand this a little better and how I'd 
go about using it in D? Specifically I'm looking at the pros 
and cons, what are the real similarities and differences to 
oop, and how one implements them in D(taking in to account D's 
capabilities).


Thanks.



Perhaps, you should be interested by this article written by our 
famous Walter:

http://www.drdobbs.com/architecture-and-design/component-programming-in-d/240008321

You'll get a whole new idea about reusability :)


Re: Handling big FP numbers

2019-02-12 Thread Aurélien Plazzotta via Digitalmars-d-learn

On Saturday, 9 February 2019 at 03:03:41 UTC, H. S. Teoh wrote:

If you want to hold more than 15 digits, you'll either have to 
use `real`, which depending on your CPU will be 80-bit (x86) or 
128-bit (a few newer, less common CPUs), or an 
arbitrary-precision library that simulates larger precisions in 
software, like the MPFR module of libgmp. Note, however, that 
even even 80-bit real realistically only holds up to about 18 
digits, which isn't very much more than a double, and still far 
too small for your number above.  You need at least a 128-bit 
quadruple precision type (which can represent up to about 34 
digits) in order to represent your above number accurately.



T


Thank you both for your lesson Adam D. Ruppe and H.S. Teoh.
Is there a wish or someone showing one's intention to implement 
into the language the hypothetical built-in 128 bit types via the 
"cent" and "ucent" reserved keywords?


Re: How to implement D to HTML pages ?

2018-10-02 Thread Aurélien Plazzotta via Digitalmars-d-learn

On Tuesday, 2 October 2018 at 06:56:33 UTC, bauss wrote:

On Monday, 1 October 2018 at 23:17:59 UTC, rjframe wrote:


vibe.d has more of a node.js feel. There's also DiamondMVC[1], 
which reminds me of ASP.NET (I'm not 100% sure whether that's 
intentional, and I haven't tried Diamond) and includes an ORM.


As the creator of Diamond, then I can say it's 100% intentional 
that it reminds of ASP.NET. It was originally just an 
alternative template engine to vibe.d to create views similar 
to razor, but now it's a full-stack web-framework specifically 
targeting enterprise development, hence why the similarities to 
ASP.NET.


As described on the website (https://diamondmvvc.org/):

"Diamond is build on modern principles using vibe.d, inspired 
by ASP.NET and razor templates."


It can also be used in combination with vibe.d projects, in 
which you can just utilize the extra tools Diamond gives you 
such as some additional security, authentication, api creation, 
database management (ORM) etc.


Thank you both for all the links! I guess DiamondMVC is very 
powerful but I would rather avoid using such heavy artillery. I'm 
expecting the learning curve to be very long.


Do you know of template engines in D ? like Jinja2 in Python for 
example. It would be way more lightweight and free-dependancies 
compared to a fully featured framework like DiamondMVC, besides 
the gain in time thanks to the simplicity of use.


How to implement D to HTML pages ?

2018-10-01 Thread Aurélien Plazzotta via Digitalmars-d-learn

Hello guys,

I would like to implement a forum and a blog within my website 
(currently including only HTML, CSS and JS, written without CMS), 
using D and SQL but I really don't know how to proceed. How can I 
integrate D into HTML pages? Are there any kind of include's 
commands like PHP ?


Also, do I have to use vibe.d ? Or is it optional? I admit I 
didn't read the book yet (D Web Development), but only 
"Programming in D", which doesn't deal much with website workflow.


Finally, what database system do you recommand to interact with 
for data-oriented website purpose? Perhaps, there are some 
standard or tierce-party librairies or ORM for PostgreSQL or 
SQLite ?


Thanks for all the light anyone will be willing to spread :)