rontarrant / gtkDcoding

Sample code from gtkDcoding.com, a tutorial blog for new GtkD programmers.
http://gtkdcoding.com
36 stars 5 forks source link

Added dub support to cairo examples, part 1 #1

Closed cschlote closed 2 years ago

cschlote commented 4 years ago

dub run --single cairo_018_01_fill_surface.d dub run --single cairo_018_02_draw_line.d dub run --single cairo_018_03_draw_rounded_lines.d

rontarrant commented 4 years ago

Hi Carsten,

I appreciate your enthusiasm (you can see a but coming, right?) and it's obvious you know your stuff.

The idea behind the blog (and therefore, the code examples) is to illustrate just one thing per demo. I'm doing it this way so that beginners coming here don't get confused and think (for instance) that they need to use dub to do drawing in Cairo. You and I, with our experience as coders, know that's not the case, but someone with little experience might not. And it's the kind of confusion I myself might have fallen victim to when I was just starting out, so I'd like to avoid even the possibility of that happening. Learning to code can be tough and my aim is to lower the bar as much as possible for people just getting started.

There will be coverage of dub at some point, and if you don't mind, I'll borrow your approach to adding dub support for some of my examples.

On Sat, Oct 19, 2019 at 10:36 AM Carsten Schlote notifications@github.com wrote:

dub run --single cairo_018_01_fill_surface.d dub run --single cairo_018_02_draw_line.d dub run --single cairo_018_03_draw_rounded_lines.d

You can view, comment on, or merge this pull request online at:

https://github.com/rontarrant/gtkDcoding/pull/1 Commit Summary

  • Added dub support to cairo examples, part 1

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rontarrant/gtkDcoding/pull/1?email_source=notifications&email_token=ALCET542NCRWKJRWXCZY2FDQPMLQRA5CNFSM4JCQCCR2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HS5YSOQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALCET53QJLXIOKUKPH4QAF3QPMLQRANCNFSM4JCQCCRQ .

cschlote commented 4 years ago

Hi Ron,

the use of dub is more or less essential, when trying to do serious D development. It abstracts away some nasty aspects when using D on multiple platforms or dependencies on other packages. Dub uses also gdc or ldc2, if dmd should be unavailable. So it should really be an issue very early in any course teaching on D as language.

So, before using Gtk, people should learn the language basics IMHO. This includes the use of dub - the same is true for Nuget/C#, or Maven/Java. Yes, you can live without it, but not using it is also a big drawback for a lots of other issues.

Regards Carsten

rontarrant commented 4 years ago

Hi Carsten, I agree with you about the use of dub, but not when it needs to be brought into the mix. I will be covering dub for single- and multi-file projects at some point in the future.

Thanks for your input.

On Wed, Oct 30, 2019 at 8:06 AM Carsten Schlote notifications@github.com wrote:

Hi Ron,

the use of dub is more or less essential, when trying to do serious D development. It abstracts away some nasty aspects when using D on multiple platforms, depending on other packages. Dub uses also gdc or ldc2, if dmd should be unavailable. So it really be an issue very early in any course teaching on D as language.

So, before using Gtk people should learn the language basics IMHO. This includes the use of dub - the same is true for Nuget/C#, or Maven/Java. Yes, you can live without it, but not using it is also a big drawback for a lots of other issues.

Regards Carsten

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rontarrant/gtkDcoding/pull/1?email_source=notifications&email_token=ALCET55PTCPKBUZ4KSIA2NTQRF2DFA5CNFSM4JCQCCR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECT5IVY#issuecomment-547869783, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALCET554GHPUB33T3CG4FH3QRF2DFANCNFSM4JCQCCRQ .