www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Learning programming with D - optimizing the entry point / the

reply Martin Tschierschke <mt smartdolphin.de> writes:
Hi,
after a year of learning D and using it for some small projects.

I think "we" should offer a Starter Kit like bundle designed to 
learn D.

My inspiration is from the Basic256 http://www.basic256.org/,
to have something similar for D, you would not need an complete 
IDE,
but it would be nice.

My last idea was, what about enhancing DUB to support the 
installation process of the different D compilers, (with DMD as 
default)?

So if we get DUB as free software in Debian -> Ubuntu & CO.

You have just one starting point (installing DUB).

Then a special option might be to install(download) the existing 
set of tutorial examples to explore the language.

Very important I think would be to add some graphics, especially 
to get the interests of kids, For example arsd.simpledisplay.d 
with its nice learning example Pong.

What do you think about this?

Regards mt.
Mar 23
next sibling parent rikki cattermole <rikki cattermole.co.nz> writes:
On 24/03/2017 1:36 AM, Martin Tschierschke wrote:

 Very important I think would be to add some graphics, especially to get
 the interests of kids, For example arsd.simpledisplay.d with its nice
 learning example Pong.
There is a reason why I want windowing in Phobos and you have figured out part of it. Here is my plan: 1. Get Manu Evan's color work into Phobos https://github.com/dlang/phobos/pull/2845 2. Get an image library into Phobos with focus upon abstraction with an optional extension of correct base manipulation functions as well as representations (including file formats) e.g. (mine) https://github.com/rikkimax/alphaPhobos/tree/master/source/std/experimental/graphic/image 3. Bindings, bindings bindings! DerelictUtil based loader + X11, Vulkan, OpenGL and DirectX bindings at the very least 4. Event loop abstraction, optionally as an extension an implementation e.g. (mine) https://github.com/Devisualization/spew/tree/master/src/base/cf/spew/event_loop 5. A windowing library e.g. (mine) https://github.com/Devisualization/spew/tree/master/src/base/cf/spew/ui Among the regulars there is some push back away from going into Phobos, but reality is, we need solid definitions for these so we can move away from I have this implementation cool right? To here is the cool thing we can do with it! The exact code I use as examples for my plan does change year to year, but over all this is what it is. Please note that a windowing library is not a GUI toolkit and we should not be looking towards implementing that for Phobos in the near future.
Mar 23
prev sibling parent reply Adam D. Ruppe <destructionator gmail.com> writes:
On Thursday, 23 March 2017 at 12:36:30 UTC, Martin Tschierschke 
wrote:
 Very important I think would be to add some graphics, 
 especially to get the interests of kids, For example 
 arsd.simpledisplay.d with its nice learning example Pong.
Fun fact, I added Minesweeper to the example thing, and next I want to do Tetris and maybe Asteroids and Space Invaders. I can do a lot of simple games like that in ~200 lines of code (pong is like 100, minesweeper is 170), so they make fun examples that are playable without being too big for newbies to copy/paste and start toying around with. It is cool to be able to play with those little programs and customize them to your desire without having to mess with installing a hundred libraries. I miss the good old days in DOS when making games like that was actually really easy.
Mar 23
parent reply Kagamin <spam here.lot> writes:
On Thursday, 23 March 2017 at 16:11:30 UTC, Adam D. Ruppe wrote:
 It is cool to be able to play with those little programs and 
 customize them to your desire without having to mess with 
 installing a hundred libraries. I miss the good old days in DOS 
 when making games like that was actually really easy.
How about a four-dimensional crawler? :)
Mar 23
next sibling parent reply Adam D. Ruppe <destructionator gmail.com> writes:
On Thursday, 23 March 2017 at 17:39:04 UTC, Kagamin wrote:
 How about a four-dimensional crawler? :)
What is that?
Mar 23
next sibling parent "H. S. Teoh via Digitalmars-d" <digitalmars-d puremagic.com> writes:
On Thu, Mar 23, 2017 at 05:51:42PM +0000, Adam D. Ruppe via Digitalmars-d wrote:
 On Thursday, 23 March 2017 at 17:39:04 UTC, Kagamin wrote:
 How about a four-dimensional crawler? :)
What is that?
A game in which you navigate a (hypothetical, but mathematically straightforward) universe that consists of 4 spatial dimensions. I've actually written such a thing before... it's not that hard since the math is pretty obvious. And it can be represented on the screen simply as an n*n grid in which each cell is an m*m grid, thus accounting for all 4 dimensions. Such a display may or may not be readily understood by the player, though. Presentation of 4D constructs on a 2D screen is a tricky problem, to say the least. :-P T -- Век живи - век учись. А дураком помрёшь.
Mar 23
prev sibling next sibling parent reply "H. S. Teoh via Digitalmars-d" <digitalmars-d puremagic.com> writes:
On Thu, Mar 23, 2017 at 11:02:19AM -0700, H. S. Teoh via Digitalmars-d wrote:
 On Thu, Mar 23, 2017 at 05:51:42PM +0000, Adam D. Ruppe via Digitalmars-d
wrote:
 On Thursday, 23 March 2017 at 17:39:04 UTC, Kagamin wrote:
 How about a four-dimensional crawler? :)
What is that?
A game in which you navigate a (hypothetical, but mathematically straightforward) universe that consists of 4 spatial dimensions. I've actually written such a thing before... it's not that hard since the math is pretty obvious. And it can be represented on the screen simply as an n*n grid in which each cell is an m*m grid, thus accounting for all 4 dimensions. Such a display may or may not be readily understood by the player, though. Presentation of 4D constructs on a 2D screen is a tricky problem, to say the least. :-P
[...] And BTW, that was written for a text console, so the only library needed was a terminal control library (which in theory could be dispensed with, as you could just output the escape sequences yourself / call the OS console functions yourself). Unfortunately it was written in C (it dates from before my D days). T -- Heads I win, tails you lose.
Mar 23
parent reply Adam D. Ruppe <destructionator gmail.com> writes:
On Thursday, 23 March 2017 at 18:25:55 UTC, H. S. Teoh wrote:
 And BTW, that was written for a text console, so the only 
 library needed was a terminal control library (which in theory 
 could be dispensed with, as you could just output the escape 
 sequences yourself / call the OS console functions yourself).
Oh, my terminal.d makes that simple anyway! I want to close some of the gap between terminal and simpledisplay though. I wrote a little file text viewer for someone on irc today with simpledisplay and it was a bit of a hassle. On the other hand, a high-level widget is outside sdpy's charter, but being able to write text is really useful... and surprisingly complicated with low-level apis, so I think I'll do something. But regardless, for a 2d game, sdpy and terminal both give what you need to make it pretty simple.
Mar 23
parent "H. S. Teoh via Digitalmars-d" <digitalmars-d puremagic.com> writes:
On Thu, Mar 23, 2017 at 06:48:32PM +0000, Adam D. Ruppe via Digitalmars-d wrote:
 On Thursday, 23 March 2017 at 18:25:55 UTC, H. S. Teoh wrote:
 And BTW, that was written for a text console, so the only library
 needed was a terminal control library (which in theory could be
 dispensed with, as you could just output the escape sequences
 yourself / call the OS console functions yourself).
Oh, my terminal.d makes that simple anyway!
Oh yeah, I've found terminal.d to be extremely useful in the little console apps I've been writing. Thanks for that! Before I came across terminal.d, I had to resort to binding with lib[n]curses, whose API is a sorry mess, esp. when Unicode is involved. (Plus, many API functions are implemented as C macros, which makes it a royal pain to interface with D code -- I basically had to wrap them in an additional C wrapper library on top of linking in libncurses in the first place.)
 I want to close some of the gap between terminal and simpledisplay
 though. I wrote a little file text viewer for someone on irc today
 with simpledisplay and it was a bit of a hassle. On the other hand, a
 high-level widget is outside sdpy's charter, but being able to write
 text is really useful... and surprisingly complicated with low-level
 apis, so I think I'll do something.
 
 But regardless, for a 2d game, sdpy and terminal both give what you
 need to make it pretty simple.
Technically, it would work for a "3D" game too, if you're willing to sacrifice the realism of 3D perspective projection and settle with 2D slices of 3D. :-P (Hey, if that works for 4D, why not for 3D?) T -- It said to install Windows 2000 or better, so I installed Linux instead.
Mar 24
prev sibling parent Kagamin <spam here.lot> writes:
On Thursday, 23 March 2017 at 17:51:42 UTC, Adam D. Ruppe wrote:
 On Thursday, 23 March 2017 at 17:39:04 UTC, Kagamin wrote:
 How about a four-dimensional crawler? :)
What is that?
Say, a labyrinth, "go from point A to point B evading walls". You can have 2D and 3D versions for comparison too.
Mar 25
prev sibling parent Lewis <musicaljelly gmail.com> writes:
OFF TOPIC: Regarding 4D games, check out Miegakure 
(http://www.miegakure.com) if you haven't already. It's not out 
yet, but looks pretty nuts.
Mar 25