GithubHelp home page GithubHelp logo

dlang-tour / english Goto Github PK

View Code? Open in Web Editor NEW
28.0 17.0 73.0 376 KB

Base language version of the Tour

Home Page: https://tour.dlang.org

Shell 100.00%
documentation dlang tour language markdown

english's Introduction

English base language version of the DLang Tour

sanitycheck build status

Found a typo or want to improve the content? Just click on "edit" and send us a pull request. If you want to discuss an idea for a change first, don't hesitate to open an issue.

You might also be looking for the base repository that hosts the content.

Run locally

You will need to fetch the base repository via DUB once:

dub fetch dlang-tour

Now you can execute dlang-tour in the root directory of this repository:

dub run dlang-tour -- --lang-dir .

english's People

Contributors

9il avatar aliak00 avatar arbmind avatar astoliar avatar bbasile avatar brendan-donegan avatar dlang-bot avatar eresid avatar fr3nchk1ss avatar icy avatar insideoutclub avatar jackstouffer avatar johncoconut avatar joshuaobritsch avatar kotet avatar mark-summerfield avatar monostabil avatar murilomir avatar murzistor avatar nexweb avatar ntrel avatar orip avatar petarkirov avatar rinfz avatar smietzner avatar timoses avatar uvtc avatar walterbright avatar webfreak001 avatar wilzbach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

english's Issues

More newbie-oriented tour

From @wilzbach on June 13, 2016 10:49

While having a look at #193, I realized that the tour isn't well suited for someone with no or little programming background as we don't explain any basics like variables or pointers.

As our main target are experienced programmers, that's ok - however imho we could try to target beginners too. I am not sure yet what is the best way to do this, but an idea would be to have a "freshup section" to which we point in the beginning - like e.g. "New to pointers? Read this".

Copied from original issue: dlang-tour/core#258

use wordcount example with lowerCase words

From @wilzbach on May 25, 2016 17:57

As said it was a bit frustrating to see only 1 matches - an alternative would be rewrite the dummy text so that at least one word occurs twice.

Word counts: ["which":1, "systems":1, "of":1, "machine":1, "and":1, "":2, "code":1, "*native*":1, "you":1, "expressive":1, "powerful":1, "language":1, "tour":1, "compiles":1, "directly":1, "give":1, "will":1, "this":2, "an":1, "overview":1, "programming":1, "to":1, "efficient":1]

Copied from original issue: dlang-tour/core/pull/192

confusing end of welcome chapter

From @wilzbach on May 25, 2016 13:37

Could you point out why it is confusing to you.

I had the same experience. The page number is 5/5 and the arrows are grayed out. That looks like "the end" to me.

Currently the text says:

"Either use the navigation panel at the bottom or press the right arrow
key."

But before that, it says "Congratulations for finishing the first chapter. You're now ready to dive into the world of D." which may (and did to me) mean "this is the end, go out there and try out D now." It's easy to miss "first chapter" in there.

What could we add to avoid the confusion?

  1. Arrows should not be gray (how about green?)

  2. 5/5 doesn't carry much meaning for me and potentially confusing as it did

Copied from original issue: dlang-tour/core#187

Introduce "subchapters" or "tours"

From @wilzbach on June 14, 2016 15:19

As said in #265, I am concerned since the GA Analytics results that those our categories are:

  • too wide (common rule is to have at most 7 items)
  • put the "best parts" at the end

image

My best ideas currently are

  • introduce subchapters and thus have grouping in the section like (Object oriented programming, control flow, ...
  • introduce "tours" and reuse the existing hiearchy (e.g. "Basics" would be an entire tour)
  • instead of "Basics" and "Gems" split into more chapters

Related to this idea is #52 (menu at the left side).

Copied from original issue: dlang-tour/core#269

new gem: alias, tuples & static foreach

From @wilzbach on June 26, 2016 0:6

I feel that neither alias, static foreach and tuples are well represented in the tour. They are already needed in other sections (e.g. #264), so we should probably try to enhance basics/alias-strings and maybe even create a new gem. The meta programming gem also doesn't cover any of these topics.

btw if static foreach is unfamilar:

import std.meta : AliasSeq;
foreach (c, AliasSeq!(int, float))
   ...

Copied from original issue: dlang-tour/core#375

More links to API documention

From @wilzbach on May 13, 2016 7:31

I think it would be nice if a method is mentioned that we provide links for the reader to deeper dive into the docs - they support anchors ;-)

I think just linking inline should be okay.
If possible a "Resources" list at the bottom (or "Dive deeper") would be cool too for a couple of pages.

Copied from original issue: dlang-tour/core#48

Better instructions for Windows

From @wilzbach on June 11, 2016 3:37

Windows users have a huge majority among the visitors. In most cases users don't know what a CLI is, so probably either the page 2 (manual installation) or page 3 (CLI instructions) kills them.

image

So imho: no CLI instructions for Windows users, but maybe VisualD (and others (?)

Copied from original issue: dlang-tour/core#245

gem: Using Fibers with ranges

From @wilzbach on May 18, 2016 13:12

This is one of my favorite features in D, but it took me a while to discover this.
This allows one to write pretty sophisticated lazy algorithms by just saving keeping a reference to the stack.
Ali had a great talk about this year -> http://dconf.org/2016/talks/cehreli.html

import std.concurrency: Generator,yield;
auto r = new Generator!int(
{
    foreach (i; 1 .. 10)
        yield(i);
});

import std.range: iota;
import std.algorithm.comparison: equal;
assert(r.equal(iota(1, 10)));

https://dlang.org/library/std/concurrency/generator.html

Copied from original issue: dlang-tour/core#133

Add images to the Tour

From @wilzbach on June 10, 2016 23:7

I personally love images & I think there are many studies that show that this is a general fact (visual learning is a lot easier for us humans).

Anyway there are a couple of ideas how we could add images to the DLang Tour

  1. Add brand images like the DMan

image

Source: https://github.com/dlang/dlang.org/blob/master/images/d3.png

There are more those lovely D mascot drawing, like this one for Assembler:

image

https://github.com/dlang/dlang.org/blob/master/images/d5.gif

  1. Add more icons (e.g. FontAwesome)

I am not sure yet how we could do that, but it's worthwhile to think about it

  1. Add related images (most important)

E.g. for Caesor encryption we could show an image like this:

image

  1. Your ideas

...

Copied from original issue: dlang-tour/core#244

pragmas in D

From @wilzbach on June 10, 2016 14:15

There are many awesome pragmas out there, my favorite one being:

rdmd --force --eval='pragma(msg, __TIMESTAMP__);'

another important one is

pragma(inline, true) 

(it verifies that the function can be inlined, see more)

but of course there's is and compiles too.
Maybe we can combine this with #129 (traits)

See more: https://dlang.org/spec/pragma.html

Copied from original issue: dlang-tour/core#229

Design by introspection gem

From @wilzbach on August 15, 2016 15:28

We already have the Traits's gem, but it could probably be split feature the term "design by introspection" a bit more.

For me design by introspection are two things

  1. pick the best & fastest implementation (e.g. std.algorithm)
  2. only expose methods/capabilities if they are possible with the current type (e.g. std.range)

Copied from original issue: dlang-tour/core#446

Review usage of "you"

From @ZombineDev on August 14, 2016 9:35

cd public/content/ && grep -Hnr "you" yields:

  • en/basics/further-reading.md:3:Now that you've finished the basics, you can move on to some more advanced sections of this tour. Or, you can check out some of the following resources:
  • en/basics/further-reading.md:20:* Share your ideas in the Forum or scan very active discussions
  • en/basics/imports-and-modules.md:3:To write a simple hello world program in D you need
  • en/basics/memory.md:3:D is a system programming language and thus allows you to manually
  • en/basics/memory.md:4:manage and mess up your memory. Nevertheless, D uses a
  • en/basics/ranges.md:36:Don't fool yourself into deleting the assertions!
  • en/basics/storage-classes.md:6:at compile time. Good type-safety gives you the support you need
  • en/basics/storage-classes.md:32:is const for your current scope, but someone
  • en/basics/storage-classes.md:34:you will be sure that an object's value will never
  • en/basics/structs.md:63:member function can be used you to work to give access to all instances of a
  • en/gems/bit-manipulation.md:61:Hence in D std.bitmanip helps you to write maintainable, easy-to-read bit manipulationsen/gems/bit-manipulation.md:73:OS memory layout (size_t.sizeof) e.g. bool, byte, char, it is recommended
  • en/gems/documentation.md:7:out of your source code.
  • en/gems/range-algorithms.md:9:The great thing with these algorithms is that you just
  • en/gems/range-algorithms.md:10:have to define your own range and you will directly
  • en/gems/range-algorithms.md:56:### The documentation is awaiting your visit!
  • en/gems/range-algorithms.md:77: string text = q{This tour will give you an
  • en/gems/template-meta-programming.md:3:If you ever got in touch with template meta programming
  • en/gems/template-meta-programming.md:4:in C++ you will be relieved what tools D offers to make
  • en/gems/template-meta-programming.md:5:your life easier. Template meta programming is a technique
  • en/gems/template-meta-programming.md:36:Anywhere you see boiler plate, mixin template
  • en/gems/template-meta-programming.md:37:is your friend:
  • en/gems/template-meta-programming.md:48:pre-processor if you're coming from C!
  • en/gems/traits.md:51:A common problem is that in contrast to arrays you might not know the exact length
  • en/gems/unittesting.md:103:// to actually test your modules.
  • en/multithreading/message-passing.md:4:yourself D allows to use message passing as a means
  • en/multithreading/std-parallelism.md:20:working threads. Creating your own instance allows
  • en/vibed/basics-asynchronous-i-o.md:40:asynchronous socket operations so you don't have
  • en/vibed/basics-asynchronous-i-o.md:42:blocks your whole application.
  • en/vibed/database-connectivity.md:4:in your backend services. MongoDB and Redis
  • en/vibed/deploy-on-heroku.md:39:This provides access to the Heroku Command-Line Interface (CLI), which can be used for managing and scaling your applications and add-ons.
  • en/vibed/deploy-on-heroku.md:92:It is possible to use GDC or LDC and to choose a specific compiler versions by adding a .d-compiler file to your project.
  • en/vibed/deploy-on-heroku.md:99:Proceed in your usual git habit and write awesome code.
  • en/vibed/deploy-on-heroku.md:170:Heroku treats logs as streams of time-ordered events aggregated from the output streams of all your app and Heroku components,
  • en/vibed/deploy-on-heroku.md:180:After deploying the app to Heroku you can make it more awesome by using add-ons. For example :
  • en/vibed/vibe-d-web-framework.md:12: for you! See the next section for a thorough
  • en/vibed/vibe-d-web-framework.md:33:available for building your vibe.d based project.
  • en/welcome/install-d-locally.md:21:To quickly install dmd within your user directory, run: curl -fsS https://dlang.org/install.sh | bash -s dmd
  • en/welcome/links-documentation.md:3:After you complete the tour, you can check out some of the following links for help or more information:
  • en/welcome/welcome-to-d.md:7:This tour will give you an overview of this powerful and expressive

Copied from original issue: dlang-tour/core#423

Gem: dub

From @wilzbach on May 23, 2016 17:58

Idea: Give a short intro to dub, examples for different use-cases and ideally how to integrate with one's favorite build system.

Ping @s-ludwig.

Copied from original issue: dlang-tour/core#150

Expand bit manipulation gem

From @wilzbach on August 13, 2016 11:34

A couple of nice ideas from @ZombineDev that shouldn't sink into the forgotten world ;-)

BTW there several other interesting applications of bit manipulation that I didn't see mentioned:

  • using built-in integers for generating all possible subsets of a random access range of fixed size (e.g. 32 or 64)
  • using http://dlang.org/phobos/std_bitmanip#.BitArray to store a general set (of any size)
  • using http://dlang.org/phobos/std_bitmanip#.bitsSet to get a range of the indexes of the bits that were set, which useful when these indexes are used to index another array and you need to find the first element in it that passes a certain condition: allowed.bitsSet.countUntil!(idx => arr[idx].isOK)
  • using std.bitmanip : peak, read to parse any binary format (e.g. network packets, image formats, etc), especially useful when you have described the format with structs (i.e. your not reading it an int at a time).

In my experience bitFields is a more rarely used, but it's still a nice showcase of D's CT power.

(from dlang-tour/core#266 (comment))

Copied from original issue: dlang-tour/core#399

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.