www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - short guide on getting started with D

reply cgenie <cgenie pm.me> writes:
Hello,

I created a short guide on getting started with D: 
https://blog.mmksoft.uk/#A%20short%20guide%20on%20getting%20started%20with%20D%20programming

This is because I recently I started to explore the language and, 
having read the forum, I see DUB being discouraged quite often.

I would appreciate any remarks.

Best,
Przemek
Apr 03 2023
next sibling parent Salih Dincer <salihdb hotmail.com> writes:
On Monday, 3 April 2023 at 07:29:01 UTC, cgenie wrote:

Thanks, you got my attention...

It has come to my attention that you talked about this:

https://mesonbuild.com/Dlang-module.html

SDB 79
Apr 03 2023
prev sibling next sibling parent reply thinkunix <thinkunix zoho.com> writes:
cgenie via Digitalmars-d-learn wrote:
 Hello,
 
 I created a short guide on getting started with D: 
 https://blog.mmksoft.uk/#A%20short%20guide%20on%20getting%20started%20wi
h%20D%20programming 
 
 
 This is because I recently I started to explore the language and, having 
 read the forum, I see DUB being discouraged quite often.
 
 I would appreciate any remarks.
My observations: "meso.build" should be "meson.build" meson.build file? I added it after the "test(..." in the first block and it seemed to work, but... I could only get you demo to work by removing the line dependencies: deps from meson.build. Then it created dub.json and dub ran it OK. No need for a reply, just my obvservations from someone who knows a little D and less meson. scot
Apr 04 2023
parent cgenie <cgenie pm.me> writes:
On Wednesday, 5 April 2023 at 05:52:33 UTC, thinkunix wrote:

Thank you for these remarks!

 My observations:


 "meso.build" should be "meson.build"
Fixed.

 meson.build file?  I added it after the "test(..." in the first
 block and it seemed to work, but...



 I could only get you demo to work by removing the line

   dependencies: deps

 from meson.build.  Then it created dub.json and dub ran it OK.

 No need for a reply, just my obvservations from someone who 
 knows
 a little D and less meson.

 scot
Well, I added sample `deps`. Basically this is something like: ``` phobos = dependency('phobos', version: '2.100.2', method: 'dub', static: true) boilerplate = dependency('boilerplate', version: '1.9.1', method: 'dub', static: true) serialized = dependency('serialized', version: '1.9.1', method: 'dub', static: true) deps = [ phobos, boilerplate, serialized ] ``` I'm new to D and meson as well, this is what I found somewhere on the inernet and it seemed to work for me.
Apr 06 2023
prev sibling parent Dukc <ajieskola gmail.com> writes:
On Monday, 3 April 2023 at 07:29:01 UTC, cgenie wrote:
 Hello,

 I created a short guide on getting started with D: 
 https://blog.mmksoft.uk/#A%20short%20guide%20on%20getting%20started%20with%20D%20programming

 This is because I recently I started to explore the language 
 and, having read the forum, I see DUB being discouraged quite 
 often.

 I would appreciate any remarks.

 Best,
 Przemek
Sorry for the very late reply. I've been thinking on commenting on this but I'm lazy. You're saying you don't want to use DUB? In that case, I think you should not add it to your dependencies at all. DUB is both a package manager and a build tool, but here Nix is answering for the package management and Meson is your build system. Have Meson to use LDC directly instead. Since you're using Nix, in case you change your mind about DUB (maybe to build a third-party package), it needs to be said that using it isn't straightforward since Nix won't let DUB download the dependencies from the Internet on it's own. There's a solution, though: [dub2nix](https://github.com/lionello/dub2nix). If you're interested, watch it's authors [DConf talk](https://dconf.org/2019/talks/lunesu.html) for more info. Anyway, there are not many examples about using D with Nix. Your post is addressing that, so thanks for writing it up.
Apr 18 2023