www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Hola a todos, esta no es una pregunta, sino que estoy publicando los

reply Danico <arcanet192 gmail.com> writes:
Hola gente les comparto aqui los descubrimientos en Dlang que 
estoy teniendo, he tenido un buen recorrido y pues para los que 
son nuevos y que no tienen mucho conocimiento de esto, pues aqui 
les dejo una ayuda para todos ustedes :3

Espero les sirva y difundan mi repositorio :3 estare publicando 
mas contenido.

https://github.com/Alinarov/D-descubrimientos
Oct 16
next sibling parent Salih Dincer <salihdb hotmail.com> writes:
On Wednesday, 16 October 2024 at 23:54:45 UTC, Danico wrote:
 https://github.com/Alinarov/D-descubrimientos
¡Bienvenido (Bienvenida ?) a nuestro D Forum! Nos alegra mucho tenerte con nosotros. Es obvio que no estás empezando, y estamos seguros de que tu experiencia será de gran valor para todos. Pero es necesario escribir en inglés: Welcome to the world of D. It's obvious you're not just starting out. You will definitely get better with time. When I look at your code snippets, the first lines usually start like this: ```d import std; alias print = writeln; //... ``` I'm sure you chose the print alias for convenience. But you can do something similar much more easily. Here it is: ```d import std.stdio : print = writeln; ``` This way selective importing makes it easier to learn the standard library and optimizes the compiled code in the best way possible. For example, the following function is very enjoyable to read: ```d auto maxPow(ulong a, ulong b) { import std.math : pow; import std.algorithm : min, max; auto power = a.min(b); return a.max(b).pow(power); } unittest { assert(maxPow(2, 5) == 25); assert(maxPow(5, 2) == 25); assert(maxPow(5, 0) == 1); assert(maxPow(0, 5) == 1); } ``` It may seem strange to you to use import lines inside functions, here, there, everywhere. But rest assured, this experience will provide you with advantages that are not available in almost any other programming language. Of course, the choice is yours, it is possible to make everything much easier with `import std`. 😁 SDB 89
Oct 16
prev sibling parent reply Serg Gini <kornburn yandex.ru> writes:
On Wednesday, 16 October 2024 at 23:54:45 UTC, Danico wrote:
 Hola gente les comparto aqui los descubrimientos en Dlang que
Hola amigo Porfavor And this is all I know in Spanish :) But I’ve translated in your GitHub profile that you are curious in AI + D.. My suggestion is to not go this direction and save your resources. D doesn’t have ability to do that in the current state (mostly because of manpower and overall interest). So maybe concentrate on Python and if you want some underlying details - C++/Rust
Oct 17
parent Lance Bachmeier <no spam.net> writes:
On Thursday, 17 October 2024 at 07:38:30 UTC, Serg Gini wrote:
 On Wednesday, 16 October 2024 at 23:54:45 UTC, Danico wrote:
 Hola gente les comparto aqui los descubrimientos en Dlang que
Hola amigo Porfavor And this is all I know in Spanish :) But I’ve translated in your GitHub profile that you are curious in AI + D.. My suggestion is to not go this direction and save your resources. D doesn’t have ability to do that in the current state (mostly because of manpower and overall interest). So maybe concentrate on Python and if you want some underlying details - C++/Rust
D is a very good glue language. It feels like a scripting language, interoperates well with C interfaces, and can scale as far as you need in terms of speed or project size. There is strong NIH Syndrome in the D community. If Python took that approach, nobody would be using it for anything.
Oct 17