Difference between revisions of "Cookbook"

From D Wiki
Jump to: navigation, search
(Recipes and Examples)
(Building)
(46 intermediate revisions by 9 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<div style="width: 45em; margin-bottom: 1em;">
+
<!--------><table cellspacing="20" width="100%"><tr><td style="vertical-align: top; width: 50%;">
The Cookbook is a community-created collection of practical examples, guides and advice for accomplishing common tasks in D. Here you can find knowledge and insight based on experience and "what works".
+
<span style="font-size: 1.1em; color: #555;">The Cookbook is a community-created collection of practical examples, guides and advice for accomplishing common tasks in D.</span>
 +
 
 +
<!--------></td><td style="vertical-align: top; width: 50%;">
 +
 
 +
'''Can't find the guide or recipe you're looking for?'''<br/>
 +
Add a [[Cookbook_Requests|Cookbook Request &raquo;]]
 +
 
 +
<!--------></td></tr></table>
 +
 
  
One should keep in mind that, while the goal of the Cookbook is certainly to establish best-practices and inspire developers to write proper D code, it also strives to help get things done, and as such may take a more pragmatic approach than normal documentation. The Cookbook is not a short-cut to learning D. The reader is adviced to read the official D documentation as well.
+
<div style="background: #eee; padding: 0.5ex 0.5em;">
 +
== Guides ==
 +
<!--=======================-->
 
</div>
 
</div>
 +
<!--------><table cellspacing="10" width="100%"><tr><td style="vertical-align: top; width: 50%;">
  
= Guides and Advice =
+
==== Compiler ====
<!--------><table cellspacing="20" width="100%"><tr><td style="vertical-align: top; width: 50%;">
 
 
 
== Compiler ==
 
 
* [[Checklist for optimal portability and performance]]
 
* [[Checklist for optimal portability and performance]]
  
 
<!--------></td><td style="vertical-align: top; width: 50%;">
 
<!--------></td><td style="vertical-align: top; width: 50%;">
  
== Data Handling ==
+
==== Data Handling ====
 
* [[When to use const and immutable]]
 
* [[When to use const and immutable]]
  
Line 20: Line 28:
  
  
= Recipes and Examples =
+
<div style="background: #eee; padding: 0.5ex 0.5em;">
  
<!--------><table cellspacing="20" width="100%"><tr><td style="vertical-align: top; width: 50%;">
+
== Recipes ==
 +
<!--=======================-->
 +
</div>
 +
<!--------><table cellspacing="10" width="100%"><tr><td style="vertical-align: top; width: 50%;">
  
== Building ==
+
=== Building ===
* [[A minimalistic cross-platform Makefile]]
+
* [[Using C libraries for a D program]]
 +
* [[Minimalistic cross-platform Makefile]]
 +
* [[Minimalistic cross-platform Rakefile]]
  
== Math ==
+
==== Math ====
* [[Constructing a custom data type with overloaded operators]]
+
* [[Custom data type with overloaded operators]]
  
== Meta Programming ==
+
==== Meta Programming ====
* [Constructing a simple compile-time DSL]
+
{{#ask: [[Cookbook/Type::Recipe]]  [[Category:Meta Programming]]
 +
| ?Cookbook/Status=
 +
| ?Level=
 +
| format=ul
 +
| sep=;
 +
}}
  
 
<!--------></td><td style="vertical-align: top; width: 50%;">
 
<!--------></td><td style="vertical-align: top; width: 50%;">
== Parsing ==
+
 
 +
==== Parsing ====
 
* [[Parse a JSON file, make some changes, and save it again]]
 
* [[Parse a JSON file, make some changes, and save it again]]
  
== Strings and Text ==
+
==== Strings and Text ====
* [[Converting_strings_between_ASCII_and_Unicode_and_others|Converting strings between ASCII and Unicode and others]]
+
{{#ask: [[Cookbook/Type::Recipe]] [[Category:Strings and Text]]
* [[Iterating through every character or byte in a Unicode string]]
+
| ?Level=
 +
| ?D Version=
 +
| format=ul
 +
| sep=,
 +
}}
 +
==== ARM Cortex-M Programming ====
 +
* [[Minimal semihosted ARM Cortex-M %22Hello_World%22]]
 +
* [[Microcontroller_startup_files]]
 +
<!--------></td></tr></table>
  
<!--------></td></tr></table>
+
[[Category:Cookbook]]

Revision as of 14:54, 15 December 2015

The Cookbook is a community-created collection of practical examples, guides and advice for accomplishing common tasks in D.

Can't find the guide or recipe you're looking for?
Add a Cookbook Request »


Guides

Compiler

Data Handling


Recipes

Building

Math

Meta Programming


Parsing

Strings and Text

ARM Cortex-M Programming