diff --git a/.htaccess b/.htaccess index 1eab97db59..7a0eafc6d7 100644 --- a/.htaccess +++ b/.htaccess @@ -52,3 +52,6 @@ version|traits|errors|unittest|garbage|float|iasm|ddoc|interfaceToC|\ cpp_interface|objc_interface|portability|entity|memory-safe-d|abi|simd)\ (\.html)?$ \ spec/$1.html [R=301,L] + +# Error pages +ErrorDocument 404 /404.html diff --git a/404.dd b/404.dd new file mode 100644 index 0000000000..38a415eb34 --- /dev/null +++ b/404.dd @@ -0,0 +1,12 @@ +Ddoc + +$(D_S 404 Not Found, + +$(P +Page not found! + +If you think there should be something here, please use the "Report a bug" link above to let us know. +)) + +Macros: + TITLE=404 Not Found diff --git a/cpptod.dd b/cpptod.dd index 526016b0be..83efe76167 100644 --- a/cpptod.dd +++ b/cpptod.dd @@ -2,7 +2,7 @@ Ddoc $(COMMUNITY Programming in D for C++ Programmers, - +$(COMMENT img src="images/cpp1.gif" border="0" align="right" alt="C++") $(P Every experienced C++ programmer accumulates a series of idioms and techniques which become second nature. Sometimes, when learning a new language, those @@ -28,7 +28,7 @@ $(UL ) -
+
$(COMMENT -------------------------------------------- ) $(H3 Defining constructors) @@ -56,7 +56,7 @@ class Foo which reflects how they are used in D. -
+
$(COMMENT -------------------------------------------- ) $(H3 Base class initialization) $(H4 The C++ Way) @@ -125,7 +125,7 @@ class A } ------ -
+
$(COMMENT -------------------------------------------- ) $(H3 Comparing structs) $(H4 The C++ Way) @@ -188,7 +188,7 @@ if (x == y) ... ------ -
+
$(COMMENT -------------------------------------------- ) $(H3 Creating a new typedef'd type) $(H4 The C++ Way) @@ -255,7 +255,7 @@ if (h != Handle.init) default initializer can be supplied to $(REF Typedef, std,typecons) as a value of the underlying type. -
+
$(COMMENT -------------------------------------------- ) $(H3 Friends) $(H4 The C++ Way) @@ -326,7 +326,7 @@ int abc(A p) { return p.a; } The $(D private) attribute prevents other modules from accessing the members. -
+
$(COMMENT -------------------------------------------- ) $(H3 Operator overloading) $(H4 The C++ Way) @@ -375,7 +375,7 @@ struct A error prone. Far less code needs to be written to accomplish the same effect.) -
+
$(COMMENT -------------------------------------------- ) $(H3 Namespace using declarations) $(H4 The C++ Way) @@ -410,7 +410,7 @@ alias x = foo.x; declaration. Alias can be used to rename symbols, refer to template members, refer to nested class types, etc. -
+
$(COMMENT -------------------------------------------- ) $(H3 RAII (Resource Acquisition Is Initialization)) $(H4 The C++ Way) @@ -475,7 +475,7 @@ mechanism that lets you run arbitrary statements whenever leaving the current scope.) -
+
$(COMMENT -------------------------------------------- ) $(H3 Properties) $(H4 The C++ Way) @@ -542,7 +542,7 @@ int x = a.property; It's also a way to have interface classes, which do not have data fields, behave syntactically as if they did. -
+
$(COMMENT -------------------------------------------- ) $(H3 Recursive Templates) $(H4 The C++ Way) @@ -593,7 +593,7 @@ void test() } ------ -
+
$(COMMENT -------------------------------------------- ) $(H3 Meta Templates) @@ -745,7 +745,7 @@ int main() } ------ -
+
$(COMMENT -------------------------------------------- ) $(H3 Type Traits) diff --git a/css/style.css b/css/style.css index a9c4c0b8d8..183b28c034 100644 --- a/css/style.css +++ b/css/style.css @@ -1217,6 +1217,16 @@ These classes come from prettify.js: .cm-s-eclipse span.cm-link {color: #219;} +.ddoc_keyword +{ + font-weight: bold; +} + +.ddoc_param +{ + font-style: italic; +} + /* Focal symbol that is being documented */ .d_psymbol, .ddoc_psymbol { @@ -2103,3 +2113,8 @@ dt.d_decl:hover .decl_anchor { text-decoration: none; color: #333; } + +/* Style for the example run buttons on the Phobos library documentation */ +.d_example_buttons { + text-align: right; +} diff --git a/ctod.dd b/ctod.dd index b9969cb06c..d40703191b 100644 --- a/ctod.dd +++ b/ctod.dd @@ -6,7 +6,7 @@ $(COMMENT $(BLOCKQUOTE_BY William Nerdspeare, Et tu, D? Then fall, C! )) - +$(COMMENT img src="images/c1.gif" border="0" align="right" alt="ouch!") $(P Every experienced C programmer accumulates a series of idioms and techniques which become second nature. Sometimes, when learning a new language, those @@ -64,7 +64,7 @@ $(UL $(LI $(RELATIVE_LINK2 variadic, Variadic Function Parameters)) ) -
+
$(COMMENT -------------------------------------------- ) $(H3 Getting the Size of a Type) $(H4 The C Way) @@ -87,7 +87,7 @@ double.sizeof Foo.sizeof ---------------------------- -
+
$(COMMENT ============================================ ) $(H3 Get the max and min values of a type) $(H4 The C Way) @@ -111,7 +111,7 @@ ulong.max double.min ---------------------------- -
+
$(COMMENT ============================================ ) $(H3 Primitive Types) $(H4 C to D types) @@ -143,7 +143,7 @@ $(P ) $(P Ints and unsigneds in C are of varying size; not so in D.) -
+
$(COMMENT ============================================ ) $(H3 Special Floating Point Values) $(H4 The C Way) @@ -179,7 +179,7 @@ double.min_10_exp double.min_exp ---------------------------- -
+
$(COMMENT ============================================ ) $(H3 Remainder after division of floating point numbers) $(H4 The C Way) @@ -202,7 +202,7 @@ double d = x % y; real r = x % y; ---------------------------- -
+
$(COMMENT ============================================ ) $(H3 Dealing with NANs in floating point compares) $(H4 The C Way) @@ -229,7 +229,7 @@ $(H4 The D Way) result = (x < y); // false if x or y is nan ---------------------------- -
+
$(COMMENT ============================================ ) $(H3 Asserts are a necessary part of any good defensive coding strategy) $(H4 The C Way) @@ -251,7 +251,7 @@ D simply builds assert into the language: assert(e == 0); ---------------------------- -
+
$(COMMENT ============================================ ) $(H3 Initializing all elements of an array) $(H4 The C Way) @@ -270,7 +270,7 @@ int[17] array; array[] = value; ---------------------------- -
+
$(COMMENT ============================================ ) $(H3 Looping through an array) $(H4 The C Way) @@ -327,7 +327,7 @@ foreach (ref value; array) value += 42; ---------------------------- -
+
$(COMMENT ============================================ ) $(H3 Creating an array of variable size) $(H4 The C Way) @@ -363,7 +363,7 @@ array.length = array.length + 1; array[array.length - 1] = x; ---------------------------- -
+
$(COMMENT ============================================ ) $(H3 String Concatenation) $(H4 The C Way) @@ -418,7 +418,7 @@ s = s1 ~ s2; s ~= "hello"; ---------------------------- -
+
$(COMMENT ============================================ ) $(H3 Formatted printing) $(H4 The C Way) @@ -447,7 +447,7 @@ import std.stdio; writefln("Calling all cars %s times!", ntimes); ----------------------- -
+
$(COMMENT ============================================ ) $(H3 Forward referencing functions) $(H4 The C Way) @@ -490,7 +490,7 @@ void forwardfunc() } ---------------------------- -
+
$(COMMENT ============================================ ) $(H3 Functions that have no arguments) $(H4 The C Way) @@ -502,7 +502,7 @@ void foo(void); $(H4 The D Way) D is a strongly typed language, so there is no need to explicitly - say a function takes no arguments, just don't declare it has having + say a function takes no arguments, just don't declare it as having arguments. ---------------------------- @@ -512,7 +512,7 @@ void foo() } ---------------------------- -
+
$(COMMENT ============================================ ) $(H3 Labeled break and continue statements) $(H4 The C Way) @@ -559,7 +559,7 @@ Louter: // break Louter goes here ---------------------------- -
+
$(COMMENT ============================================ ) $(H3 Goto Statements) $(H4 The C Way) @@ -577,7 +577,7 @@ $(H4 The D Way) programmers who know when the rules need to be broken. So of course D supports goto statements. -
+
$(COMMENT ============================================ ) $(H3 Struct tag name space) $(H4 The C Way) @@ -598,7 +598,7 @@ $(H4 The D Way) struct ABC { ... } ---------------------------- -
+
$(COMMENT ============================================ ) $(H3 Looking up strings) $(H4 The C Way) @@ -665,7 +665,7 @@ void dostring(char[] s) to generate a fast lookup scheme for it, eliminating the bugs and time required in hand-coding one. -
+
$(COMMENT ============================================ ) $(H3 Setting struct member alignment) $(H4 The C Way) @@ -711,7 +711,7 @@ struct ABC } ---------------------------- -
+
$(COMMENT ============================================ ) $(H3 Anonymous Structs and Unions) Sometimes, it's nice to control the layout of a struct with nested structs and unions. @@ -771,7 +771,7 @@ f.y; f.p; ---------------------------- -
+
$(COMMENT ============================================ ) $(H3 Declaring struct types and variables) $(H4 The C Way) @@ -805,7 +805,7 @@ Foo foo; block {} in how semicolons are used. ) -
+
$(COMMENT ============================================ ) $(H3 Getting the offset of a struct member) $(H4 The C Way) @@ -829,7 +829,7 @@ struct Foo { int x; int y; } off = Foo.y.offsetof; ---------------------------- -
+
$(COMMENT ============================================ ) $(H3 Union Initializations) $(H4 The C Way) @@ -855,7 +855,7 @@ U x = { a:5 }; avoiding the confusion and maintenance problems. -
+
$(COMMENT ============================================ ) $(H3 Struct Initializations) $(H4 The C Way) @@ -884,7 +884,7 @@ S x = { b:3, a:5 }; The meaning is clear, and there no longer is a positional dependence. -
+
$(COMMENT ============================================ ) $(H3 Array Initializations) $(H4 The C Way) @@ -927,7 +927,7 @@ int[2][3] b = [ [2,3], [6,5], [3,4] ]; int[2][3] b = [[2,6,3],[3,5,4]]; // error ---------------------------- -
+
$(COMMENT ============================================ ) $(H3 Escaped String Literals) $(H4 The C Way) @@ -962,7 +962,7 @@ string quotedString = `"[^\\]*(\\.[^\\]*)*"`; // "[^\\]*(\\.[^\\]*)*" string hello = "hello world\n"; ---------------------------- -
+
$(COMMENT ============================================ ) $(H3 ASCII versus Wide Characters) $(P Modern programming requires that wchar strings be supported in an easy way, for internationalization of the programs.) @@ -995,7 +995,7 @@ auto _utf16 = "hello"w; // UTF-16 string auto _utf32 = "hello"d; // UTF-32 string ----------------------------- -
+
$(COMMENT ============================================ ) $(H3 Arrays that parallel an enum) $(H4 The C Way) @@ -1021,7 +1021,7 @@ string[COLORS.max + 1] cstring = Not perfect, but better. -
+
$(COMMENT ============================================ ) $(H3 Creating a new type with typedef) $(H4 The C Way) @@ -1117,7 +1117,7 @@ if (h != Handle.init) There's only one name to remember: $(D Handle). -
+
$(COMMENT ============================================ ) $(H3 Comparing structs) $(H4 The C Way) @@ -1163,7 +1163,7 @@ if (x == y) ----------------------------- -
+
$(COMMENT ============================================ ) $(H3 Comparing strings) $(H4 The C Way) @@ -1206,7 +1206,7 @@ if (str < "betty") which is useful for sorting/searching. -
+
$(COMMENT ============================================ ) $(H3 Sorting arrays) $(H4 The C Way) @@ -1246,7 +1246,7 @@ type[] array; sort(array); // sort array in-place ----------------------------- -
+
$(COMMENT ============================================ ) $(H3 String literals) $(H4 The C Way) @@ -1276,7 +1276,7 @@ lines So blocks of text can just be cut and pasted into the D source. -
+
$(COMMENT ============================================ ) $(H3 Data Structure Traversal) $(H4 The C Way) @@ -1389,7 +1389,7 @@ Symbol symbol_membersearch(Symbol[] table, char[] id) } ----------------------------- -
+
$(COMMENT ============================================ ) $(H3 Unsigned Right Shift) $(H4 The C Way) @@ -1437,7 +1437,7 @@ j = i >>> 3; avoids the unsafe cast and will work as expected with any integral type. -
+
$(COMMENT ============================================ ) $(H3 Dynamic Closures) $(H4 The C Way) @@ -1531,7 +1531,7 @@ void func(Collection c) eliminating the need to create irrelevant function names. -
+
$(COMMENT ============================================ ) $(H3 Variadic Function Parameters) The task is to write a function that takes a varying diff --git a/dcompiler.dd b/dcompiler.dd index 97d6bfc365..2d97fb22e7 100644 --- a/dcompiler.dd +++ b/dcompiler.dd @@ -649,6 +649,33 @@ dmd -cov -unittest myprog.d generate a $(TT .map) file ) + $(SWITCH $(SWNAME -mcpu)=[$(B ?)|$(B baseline)|$(B avx)|$(B native)], + Set the target architecture for code generation, + where: + $(DL + $(DT ?)$(DD list alternatives) + $(DT baseline)$(DD the minimum architecture for the target platform (default)) + $(DT avx)$(DD + generate $(LINK2 https://en.wikipedia.org/wiki/Advanced_Vector_Extensions, AVX) + instructions instead of $(LINK2 https://en.wikipedia.org/wiki/Streaming_SIMD_Extensions, SSE) + instructions for vector and floating point operations. + Not available for 32 bit memory models other than OSX32. + ) + $(DT native)$(DD use the architecture the compiler is running on) + ) + ) + + $(WINDOWS + $(SWITCH $(SWNAME -mscrt)=$(I libname), + if building MS-COFF object files with -m64 or -m32mscoff, embed a reference to + the given C runtime library $(I libname) into the object file containing `main`, + `DllMain` or `WinMain` for automatic linking. The default is $(TT libcmt) + (release version with static linkage), the other usual alternatives are + $(TT libcmtd), $(TT msvcrt) and $(TT msvcrtd). + If $(I libname) is empty, no C runtime library is automatically linked in. + ) + ) + $(SWITCH $(SWNAME -noboundscheck), turns off all array bounds checking, even for safe functions. $(RED Deprecated (use $(TT $(SWLINK -boundscheck)=off) instead).) @@ -1176,4 +1203,4 @@ Macros: DMC=$(LINK2 http://www.digitalmars.com/ctg/sc.html, dmc) LIB=$(LINK2 http://www.digitalmars.com/ctg/lib.html, lib) OPTLINK=$(LINK2 http://www.digitalmars.com/ctg/optlink.html, link.exe) - SUBNAV=$(SUBNAV_CLI_REFERENCE) + SUBNAV=$(SUBNAV_CLI_REFERENCE) diff --git a/deprecate.dd b/deprecate.dd index 26efc0d574..784871a84d 100644 --- a/deprecate.dd +++ b/deprecate.dd @@ -10,7 +10,8 @@ $(SPEC_S Deprecated Features, $(TABLE2 Deprecated Features, $(THEAD Feature, Spec, Dep, Error, Gone) - $(TROW $(DEPLINK Using the result of a comma expression), future,  ,  ,  ) + $(TROW $(DEPLINK Implicit string concatenation), 2.072, 2.072,  ,  ) + $(TROW $(DEPLINK Using the result of a comma expression), 2.072, 2.072,  ,  ) $(TROW $(DEPLINK delete), future,  ,  ,  ) $(TROW $(DEPLINK scope for allocating classes on the stack), future,  ,  ,  ) $(TROW $(DEPLINK Imaginary and complex types), future,  ,  ,  ) @@ -57,6 +58,42 @@ $(SPEC_S Deprecated Features, ) +$(H3 $(DEPNAME Implicit string concatenation)) + $(P Currently, two adjacent strings are implicitly concatenated: + + --- + string foo = "Hello" "World"; + --- + + This feature is handy for a long string that spans multiple lines, + however it is possible to get the same behaviour explicitly by + using the concatenation operator ('~'): + + --- + string foo = "Hello" ~ "World"; // No allocation is performed + --- + ) +$(H4 Corrective Action) + $(P Replace implicit string concatenation by explicit one, using '~'.) +$(H4 Rationale) + $(P This is a very early feature of the language, which is nowadays totally + covered by the concatenation operator: it is performed at compile time + for constants and doesn't result in memory allocation.) + + $(P However, having implicit concatenation can and did result in hard + to spot bugs, for example:) + + --- + string[] names = + [ + "Anna", + "Michael" + "Emma", + "David" + ]; + // The content of arr is [ "Anna", "MichaelEmma", "David" ] + --- + $(H3 $(DEPNAME Using the result of a comma expression)) $(P The comma operator (`,`) allows executing multiple expressions and discards the result of them except for the last which is returned. diff --git a/dlang.org.ddoc b/dlang.org.ddoc index 6be8fee5f3..ee19198ab6 100644 --- a/dlang.org.ddoc +++ b/dlang.org.ddoc @@ -93,6 +93,7 @@ $(DIVC container, ) ) $(COMMON_SCRIPTS) +$(EXTRA_FOOTERS) $(LAYOUT_SUFFIX) @@ -108,7 +109,7 @@ DDOC_BUGS = $(DDOCKEYVAL Bugs, $0) DDOC_COPYRIGHT = $(DDOCKEYVAL Copyright, $0) DDOC_DATE = $(DDOCKEYVAL Date, $0) DDOC_DEPRECATED = $(DDOCKEYVAL Deprecated, $0) -DDOC_EXAMPLES = $(DDOCKEYVAL Examples, $0) +DDOC_EXAMPLES = $(DDOCKEYVAL Examples, $0) DDOC_HISTORY = $(DDOCKEYVAL History, $0) DDOC_LICENSE = $(DDOCKEYVAL License, $0) DDOC_RETURNS = $(DDOCKEYVAL Returns, $0) @@ -123,7 +124,9 @@ DDOC_PARAM_ID = $0 DDOC_PARAM_DESC = $0 DDOC_PARAMS = $(DDOCKEYVAL Parameters, $0
) DDOC_BLANKLINE = -DDOC_PSYMBOL = $(ADEF $0)$(SPANC ddoc_psymbol, $0) +DDOC_KEYWORD = $(TC code, ddoc_keyword, $0) +DDOC_PARAM = $(TC code, ddoc_param, $0) +DDOC_PSYMBOL = $(ADEF $0)$(TC code, ddoc_psymbol, $0) DDOC_ANCHOR = $(ADEF .$1)$(DIVCID quickindex, quickindex.$1, ) DDOC_DECL = $(TC dt, d_decl, $(DIV, $0)) DDOC_UNDEFINED_MACRO = $(DDOC_COMMENT UNDEFINED MACRO: "$1") @@ -145,6 +148,7 @@ $(TR 32 bit64 bit) _= EXTRA_HEADERS= EXTRA_JS= +EXTRA_FOOTERS= _= FAVICON=$(STATIC favicon.ico) @@ -152,7 +156,6 @@ FOOTER = $(DIVCID smallprint, copyright, $(COPYRIGHT) | Page generated by $(LINK2 $(ROOT_DIR)spec/ddoc.html, Ddoc) on $(GEN_DATETIME)) FOOTNOTE=$(SPANC footnote, $0) FULL_TITLE=$(TITLE) - D Programming Language -FULL_XREF=$(XREF $1, $2) _= GEN_DATETIME=$(DATETIME) @@ -231,6 +234,8 @@ $(SUBMENU_MANUAL $(SUBMENU_LINK https://wiki.dlang.org, Wiki) $(SUBMENU_LINK_DIVIDER https://github.com/dlang, GitHub) $(SUBMENU_LINK $(ROOT_DIR)bugstats.php, Issues) + $(SUBMENU_LINK_DIVIDER $(ROOT_DIR)foundation.html, Foundation) + $(SUBMENU_LINK $(ROOT_DIR)donate.html, Donate) ) NAVIGATION_DOCUMENTATION= $(SUBMENU_MANUAL @@ -479,12 +484,6 @@ _= WHITE=$(SPANC white, $0) _= -XREF=$(XREF2 $1, $2, $(D std.$1.$2)) -XREF2=$(SPANC libref, $(AHTTPS dlang.org/phobos/std_$1.html#$2, $(TAIL $+))) -XREF_PACK=$(XREF_PACK_NAMED $1, $2, $3, $(D std.$1.$2.$3)) -XREF_PACK_NAMED=$(SPANC libref, $(AHTTPS dlang.org/phobos/std_$1_$2.html#$3, $4)) -_= - YELLOW=$(SPANC yellow, $0) YES=$(CHECKMARK) _= diff --git a/dlangupb-scholarship.dd b/dlangupb-scholarship.dd new file mode 100644 index 0000000000..220603f1dd --- /dev/null +++ b/dlangupb-scholarship.dd @@ -0,0 +1,77 @@ +Ddoc + +$(D_S The DLang UPB Languages and Systems Research Scholarship, + +$(P The D Language Foundation is pleased to extend the Languages and Systems +Research Scholarships to EE and CS students at University "Politehnica" +Bucharest (UPB).) + +$(P This scholarship was established to recognize outstanding full-time +students enrolled in postgraduate research in the Departments of +Electrical Engineering ("Electronica si Telecomunicatii") and Computer +Science ("Automatica si Calculatoare") at UPB. The award fosters +graduate-level (MSc and PhD) research in the fields of Programming +Languages and Systems, with an emphasis on subdomains and topics most +relevant to the mission of the Foundation. These include but are not limited to:) + +$(UL + $(LI Systems programming languages semantics and implementation) + $(LI Engines for code transformation and refactoring) + $(LI Optimizers) + $(LI Plugins for code editors) + $(LI Memory safety) + $(LI Static and dynamic program analysis) + $(LI Networking and security) + $(LI Core runtime, memory allocation, garbage collection) + $(LI Libraries and frameworks) + $(LI Static/dynamic linking and loading) + $(LI Generic and Generative Programming) +) + +$(P The scholarship award may be for an amount up to 900 RON per week decided on a semester basis. +Semester dates are defined by the UPB academic calendar. We may approve +partial scholarships that start during a semester; however, a +scholarship period always ends with the semester. The funds are intended +to cover room, board, books and other educational supplies, equipment, +and other research costs of students. Approved applicants agree to not +pursue paid employment for the duration of the scholarship.) + +$(H3 Eligibility Requirements) + +$(OL + $(LI Completed, signed, and dated + $(HTTPS docs.google.com/forms/d/e/1FAIpQLSdy5fg611KBySjZVckYdRUbIxPTS4tucglP_WGINvfy7o-zVQ/viewform, application form) + (online and scan/hardcopy).) + + $(LI Proof of enrollment in the MSc or PhD program at UPB EE ("Electronica + si Telecomunicatii") or CS ("Automatica si Calculatoare").) + + $(LI Transcript with classes attended and their respective grades.) + + $(LI Submission of an original essay (800-1200 words) describing how this + award will assist you in reaching your educational and research objectives.) + + $(LI Letter of recommendation from your program director evaluating your + research potential.) + + $(LI Public link to the completed BSc dissertation.) + + $(LI Pass one or more interviews (in person, by phone, or via Skype) with + Foundation representatives. The interviews assess technical competence, + research vision, and command of the English language of applicants.) +) + +$(P The D Language Foundation may offer to renew a scholarship for +existing/former recipients without the need to complete a new +application. The Foundation also reserves the rights to terminate a +scholarship before the end of semester if it assesses that the funds are +misused, progress in research is inadequate, or recipient behaves in a +manner unbecoming of an outstanding student and young researcher.) + +$(P We wish our applicants good luck and are looking forward to hearing from +you. Feel free to direct any related questions to foundation@dlang.org.) + +) + +Macros: + TITLE=The DLang UPB Languages and Systems Research Scholarship diff --git a/donate.dd b/donate.dd new file mode 100644 index 0000000000..c15a18afb1 --- /dev/null +++ b/donate.dd @@ -0,0 +1,92 @@ +Ddoc + +$(D_S $(TITLE), + +$(H4 The D Language Foundation is a + $(HTTPS en.wikipedia.org/wiki/501(c)_organization, 501(c) non-profit public charity) + devoted to advancing open source technology related to the D programming language. +) + +The D Language Foundation: + +$(COMMENT keep this list in sync with foundation.dd) +$(UL + $(LI holds and defends the copyright and other intellectual property rights for the D programming language.) + $(LI provides resources for furthering the development and adoption of the D programming language.) + $(LI awards $(LINK2 http://dlang.org/blog/2016/12/05/the-d-language-foundations-scholarship-program, scholarships) + to highly skilled students.) + $(LI organizes the yearly $(HTTP dconf.org, DConf), the international annual conference of D Language developers and users.) + $(LI pays for hardware costs + (e.g. this website, $(LINK2 http://dlang.org/download.html, dmd downloads), + the $(LINK2 https://tour.dlang.org, D tour) and more)) + $(LI is an accepted + $(HTTPS summerofcode.withgoogle.com/organizations/5078256051027968/, + Google Summer of Code organization) and hosted four projects during + the summer of 2016. + ) +) + +$(H3 How can I donate?) + +We welcome contributions from both organizations and individuals. Your help is highly appreciated. + +$(DONATE_ITEM Donate through PayPal, paypal, + + Click the PayPal button to make a donation to the D Language Foundation via PayPal: + $(BR) $(BR) + +
+ + + + +
+) + +$(DONATE_ITEM Donate by credit card, credit-card, + Please use the PayPal button above to donate by credit card. You don't need a PayPal account to use the donation button. +) + +$(DONATE_ITEM Electronic wire transfers or bank check, money, + Wire transfer information will be announced soon. In the meantime please use PayPal or $(LINK2 mailto:foundation@dlang.org, contact the D Language Foundation). +) + +$(H3 If I donate financially, where do my donations go?) + +$(P The D Languages Foundation awards $(LINK2 http://dlang.org/blog/2016/12/05/the-d-language-foundations-scholarship-program, scholarships) to highly skilled students. +Each $(DOLLAR)5 you donate contributes to approximately one hour of work by a talented graduate student, and +these hours add quickly toward important projects that further the state of the art in the D +programming language.) + +$(P If you have a specific target or project that you wish to directly support, please $(LINK2 mailto:foundation@dlang.org, contact the D Language Foundation).) + +$(P By the Foundation bylaws, its officers (Walter Bright, Andrei Alexandrescu and Ali Çehreli) + cannot get income from the Foundation, which preempts a variety of conflicts of interest.) + +$(H3 The D Language Foundation is a non-profit organization) + +$(P For US taxpayers, contributions to the D Language Foundation are tax-deductible. +The D Language Foundation is a $(HTTPS en.wikipedia.org/wiki/501(c)_organization, 501(c) non-profit public charity) registered in the state of Washington, USA. +You should consult your tax adviser for rules as they apply to your situation.) + +$(P Donations to the D Language Foundation are currently not tax-deductible in most other countries as they require an organisation to be incorporated in that country and the D Language Foundation does currently not have the resources to do so.) + +$(P If you have a question about donations, please write to the D Language Foundation at $(LINK2 mailto:foundation@dlang.org, foundation@dlang.org).) + +) + +Macros: + TITLE=Contribute to the D Language Foundation + NOSPAM_FOUNDATION=$1 + FA_ICON= + REMOVE_FIRST=$+ + DONATE_ITEM= + EXTRA_HEADERS=$(T style, + .donate-item { + padding-left: 30px; + } + .donate-item div { + padding-left: 30px; + } + ) + _= diff --git a/foundation.dd b/foundation.dd index 4a57b91d23..d7a39abcd7 100644 --- a/foundation.dd +++ b/foundation.dd @@ -2,9 +2,11 @@ Ddoc $(D_S $(TITLE), -$(H4 The D Language Foundation is an organization devoted to advancing - open source technology related to the D programming language. +$(H4 The D Language Foundation is a + $(HTTPS en.wikipedia.org/wiki/501(c)_organization, 501(c) non-profit public charity) + devoted to advancing open source technology related to the D programming language. ) + $(H3 History) $(P The D programming language was started by Walter Bright, as a 'better C++' @@ -15,18 +17,23 @@ future development of the D programming language.) $(H3 Current projects) -The D foundation +The D Language Foundation: +$(COMMENT keep this list in sync with donate.dd) $(UL - - $(LI is providing the various resources for the D community - (e.g. this website, dmd downloads, the D tour and more)) + $(LI holds and defends the copyright and other intellectual property rights for the D programming language.) + $(LI provides resources for furthering the development and adoption of the D programming language.) + $(LI awards $(LINK2 http://dlang.org/blog/2016/12/05/the-d-language-foundations-scholarship-program, scholarships) + to highly skilled students.) + $(LI organizes the yearly $(HTTP dconf.org, DConf), the international annual conference of D Language developers and users.) + $(LI pays for hardware costs + (e.g. this website, $(LINK2 http://dlang.org/download.html, dmd downloads), + the $(LINK2 https://tour.dlang.org, D tour) and more)) $(LI is an accepted $(HTTPS summerofcode.withgoogle.com/organizations/5078256051027968/, - Google Summer of Code organization) and hosts four projects during + Google Summer of Code organization) and hosted four projects during the summer of 2016. ) - $(LI is organizing the yearly $(HTTP dconf.org, D conference)) ) $(H3 Committee) @@ -39,26 +46,32 @@ $(UL $(LI $(HTTP acehreli.org, Ali Çehreli), Secretary) ) -$(H3 Becoming a member) +$(H3 How can I contribute?) -Individual and corporate membership packages will be announced in the future. +$(P There are many ways to help the D programming language to grow further and + $(LINK2 https://wiki.dlang.org/Get_involved, get involved).) -$(H3 Sponsoring D) +$(P If you don't have the time to work on the source code, +you can also $(LINK2 $(ROOT_DIR)donate.html, donate) to the D Language Foundation.) -$(P If you want to help the D Language to advance further and have resources - that you can spend, don't hesitate to contact - $(HTTPS erdani.com/index.php/contact, Andrei) and - $(HTTP www.walterbright.com, Walter). - $(BR) - Your help is highly appreciated! -) +$(H3 The D Language Foundation is a non-profit organization) + +The D Language Foundation has been recognized as a public charity under section 501(c)(3) of the Internal Revenue Code. $(H3 Official contacts) $(P The D Language Foundation has been incorporated with the state of Washington, USA. The employer ID is 47-5352856.) +$(P If you want to get in touch with the D Language Foundation, please feel free to write to $(LINK2 mailto:foundation@dlang.org, foundation@dlang.org).) + ) Macros: TITLE=The D Language Foundation + EXTRA_HEADERS=$(T style, + .dlang-address { + padding-left: 30px; + } + ) + _= diff --git a/html.ddoc b/html.ddoc index f0cc052672..519833e2d1 100644 --- a/html.ddoc +++ b/html.ddoc @@ -110,6 +110,9 @@ _= _=DDoc-related stuff DDOC_COMMENT = +DDOC_MEMBER = $0 +DDOC_MEMBER_HEADER = +DDOC_HEADER_ANCHOR = DDOC_DECL = $(DT $(BIG $0)) DDOC_DECL_DD = $(DD $0) DDOC_DITTO = $(BR)$0 diff --git a/images/orgs-using-d/cereris.png b/images/orgs-using-d/cereris.png new file mode 100644 index 0000000000..58f074b430 Binary files /dev/null and b/images/orgs-using-d/cereris.png differ diff --git a/images/orgs-using-d/cereris_hq.png b/images/orgs-using-d/cereris_hq.png new file mode 100644 index 0000000000..f0fe9dcb9f Binary files /dev/null and b/images/orgs-using-d/cereris_hq.png differ diff --git a/index.dd b/index.dd index 85ca8b3fe2..a75a365fd6 100644 --- a/index.dd +++ b/index.dd @@ -84,9 +84,12 @@ $(DIVID news, $(DIVC boxes, $(DIVC row, $(TOUR newspaper-o, News, - $(P $(LINK2 http://dconf.org/2016/index.html, DConf 2016) was a - $(LINK2 https://vimeo.com/167235872, big and bright week) - - we are looking forward to seeing you next year. + $(P $(LINK2 http://dconf.org/2017/index.html, DConf 2017): + Call for Submissions is open. $(BR) + The $(LINK2 $(ROOT_DIR)foundation.html, D Language Foundation) + has been accepted as a 501(c) non-profit public charity + and thus can handle + $(LINK2 $(ROOT_DIR)donate.html, donations). ) $(P Stay updated with $(LINK2 http://arsdnet.net/this-week-in-d, @@ -123,7 +126,7 @@ $(DIVC boxes, Browse the $(LINK2 https://wiki.dlang.org/, wiki) where among other things you can find the $(LINK2 https://wiki.dlang.org/Vision/2016H2, high-level vision) - of the D foundation. + of the $(LINK2 $(ROOT_DIR)foundation.html, D foundation). ) ) $(TOUR book, Documentation, diff --git a/js/run.js b/js/run.js index d7bb3f9a47..cd0ecc6278 100644 --- a/js/run.js +++ b/js/run.js @@ -45,7 +45,7 @@ mainPage["yourMd5Sum"] = ["standard input is has 0 position", "standard args has Save, reload website and see if standard input and/or standard arguments are displayed in your example form. TL;DR -All examples are replaced with custom form by default. You need to do additional work only if you wan't +All examples are replaced with custom form by default. You need to do additional work only if you wan't your example to have deafault standard input or default standard arguments. */ @@ -54,11 +54,11 @@ your example to have deafault standard input or default standard arguments. Taken from http://www.webtoolkit.info/javascript-md5.html */ var MD5 = function (string) { - + function RotateLeft(lValue, iShiftBits) { return (lValue<>>(32-iShiftBits)); } - + function AddUnsigned(lX,lY) { var lX4,lY4,lX8,lY8,lResult; lX8 = (lX & 0x80000000); @@ -79,32 +79,32 @@ var MD5 = function (string) { return (lResult ^ lX8 ^ lY8); } } - + function F(x,y,z) { return (x & y) | ((~x) & z); } function G(x,y,z) { return (x & z) | (y & (~z)); } function H(x,y,z) { return (x ^ y ^ z); } function I(x,y,z) { return (y ^ (x | (~z))); } - + function FF(a,b,c,d,x,s,ac) { a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac)); return AddUnsigned(RotateLeft(a, s), b); }; - + function GG(a,b,c,d,x,s,ac) { a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac)); return AddUnsigned(RotateLeft(a, s), b); }; - + function HH(a,b,c,d,x,s,ac) { a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac)); return AddUnsigned(RotateLeft(a, s), b); }; - + function II(a,b,c,d,x,s,ac) { a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac)); return AddUnsigned(RotateLeft(a, s), b); }; - + function ConvertToWordArray(string) { var lWordCount; var lMessageLength = string.length; @@ -127,7 +127,7 @@ var MD5 = function (string) { lWordArray[lNumberOfWords-1] = lMessageLength>>>29; return lWordArray; }; - + function WordToHex(lValue) { var WordToHexValue="",WordToHexValue_temp="",lByte,lCount; for (lCount = 0;lCount<=3;lCount++) { @@ -137,15 +137,15 @@ var MD5 = function (string) { } return WordToHexValue; }; - + function Utf8Encode(string) { string = string.replace(/\r\n/g,"\n"); var utftext = ""; - + for (var n = 0; n < string.length; n++) { - + var c = string.charCodeAt(n); - + if (c < 128) { utftext += String.fromCharCode(c); } @@ -158,25 +158,25 @@ var MD5 = function (string) { utftext += String.fromCharCode(((c >> 6) & 63) | 128); utftext += String.fromCharCode((c & 63) | 128); } - + } - + return utftext; }; - + var x=Array(); var k,AA,BB,CC,DD,a,b,c,d; var S11=7, S12=12, S13=17, S14=22; var S21=5, S22=9 , S23=14, S24=20; var S31=4, S32=11, S33=16, S34=23; var S41=6, S42=10, S43=15, S44=21; - + string = Utf8Encode(string); - + x = ConvertToWordArray(string); - + a = 0x67452301; b = 0xEFCDAB89; c = 0x98BADCFE; d = 0x10325476; - + for (k=0;k"); } @@ -282,7 +282,7 @@ function parseOutput(data, o, oTitle) { if (typeof data.compilation == "undefined") { - o.text("Temporarily unavaible"); + o.text("Temporarily unavailable"); return; } @@ -296,15 +296,16 @@ function parseOutput(data, o, oTitle) var rstatus = parseInt(safeVar(data, "runtime.status")); var cerr = safeVar(data, "compilation.err"); var rerr = safeVar(data, "runtime.err"); + var defaultOutput = data.defaultOutput || '-- No output --'; if (cstatus != 0) { oTitle.text("Compilation output ("+cstatus+": "+cerr+")"); if ($.browser.msie) - o.html(cout.nl2br()); + o.html(nl2br(cout)); else o.text(cout); - + return; } else @@ -312,10 +313,10 @@ function parseOutput(data, o, oTitle) oTitle.text("Application output");// (compile "+ctime+"ms, run "+rtime+"ms)"); if ( cout != "") output = 'Compilation output: \n' + cout + "\n"; - - output += (stdout == "" && stderr == "" ? '-- No output --' : stdout); - if (stderr != "") + output += (stdout == "" && stderr == "" ? defaultOutput : stdout); + + if (stderr != "") output += stderr; if (rstatus != 0) @@ -323,17 +324,17 @@ function parseOutput(data, o, oTitle) } if ($.browser.msie) - o.html(output.nl2br()); + o.html(nl2br(cout)); else o.text(output); } -$(document).ready(function() +$(document).ready(function() { setUpExamples(); var currentPage = $(location).attr('pathname'); - + if ($('body')[0].id != "Home") return; @@ -358,7 +359,7 @@ $(document).ready(function() stdin = elements[0]; if (elements[1] != null) - args = elements[1]; + args = elements[1]; } currentExample.replaceWith( @@ -377,78 +378,114 @@ $(document).ready(function() + '' ); }); - + $('textarea[class=d_code]').each(function(index) { - var thisObj = $(this); + var parent = $(this).parent(); + var outputDiv = parent.children("div.d_code_output"); + setupTextarea(this, {parent: parent, outputDiv: outputDiv, + stdin: true, args: true}); + }); +}); - var parent = thisObj.parent(); - parent.css("display", "block"); - var orgSrc = parent.parent().children("div.d_code").children("pre.d_code"); +function setupTextarea(el, opts) +{ + opts = opts || {}; + // set default opts + opts = jQuery.extend({}, { + stdin: false, + args: false, + transformOutput: function(out) { return out } + }, opts); + + if (!!opts.parent) + var parent = opts.parent; + else + console.error("parent node node not found"); + + if (!!opts.outputDiv) + var outputDiv = opts.outputDiv; + else + console.error("outputDiv node not found"); + + var thisObj = $(el); + parent.css("display", "block"); + var orgSrc = parent.parent().children("div.d_code").children("pre.d_code"); - var prepareForMain = function() + var prepareForMain = function() + { + var src = $.browser.msie && $.browser.version < 9.0 ? orgSrc[0].innerText : orgSrc.text(); + var arr = src.split("\n"); + var str = ""; + for ( i = 0; i < arr.length; i++) { - var src = $.browser.msie && $.browser.version < 9.0 ? orgSrc[0].innerText : orgSrc.text(); - var arr = src.split("\n"); - var str = ""; - for ( i = 0; i < arr.length; i++) - { - str += arr[i]+"\n"; - } - if ($.browser.msie && $.browser.version < 9.0) - str = str.substr(0, str.length - 1); - else - str = str.substr(0, str.length - 2); - - return str; - }; - - var editor = CodeMirror.fromTextArea(thisObj[0], { - lineNumbers: true, - tabSize: 4, - indentUnit: 4, - indentWithTabs: true, - mode: "text/x-d", - lineWrapping: true, - theme: "eclipse", - readOnly: false, - matchBrackets: true - }); + str += arr[i]+"\n"; + } + if ($.browser.msie && $.browser.version < 9.0) + str = str.substr(0, str.length - 1); + else + str = str.substr(0, str.length - 2); - editor.setValue(prepareForMain()); + return str; + }; - var height = function(diff) { - var par = code != null ? code : parent.parent().children("div.d_code"); - return (parseInt(par.css('height')) - diff) + 'px'; - }; + var editor = CodeMirror.fromTextArea(thisObj[0], { + lineNumbers: true, + tabSize: 4, + indentUnit: 4, + indentWithTabs: true, + mode: "text/x-d", + lineWrapping: true, + theme: "eclipse", + readOnly: false, + matchBrackets: true + }); - var runBtn = parent.children("input.runButton"); - var editBtn = parent.children("input.editButton"); - var inputBtn = parent.children("input.inputButton"); - var resetBtn = parent.children("input.resetButton"); - var argsBtn = parent.children("input.argsButton"); - var stdinDiv = parent.children("div.d_code_stdin"); - var argsDiv = parent.children("div.d_code_args"); - var outputDiv = parent.children("div.d_code_output"); + editor.setValue(prepareForMain()); - var code = $(editor.getWrapperElement()); - code.css('display', 'none'); + var height = function(diff) { + var par = code != null ? code : parent.parent().children("div.d_code"); + return (parseInt(par.css('height')) - diff) + 'px'; + }; - var output = outputDiv.children("textarea.d_code_output"); - var outputTitle = outputDiv.children("span.d_code_title"); - var stdin = stdinDiv.children("textarea.d_code_stdin"); + var runBtn = parent.children("input.runButton"); + var editBtn = parent.children("input.editButton"); + var resetBtn = parent.children("input.resetButton"); + + var code = $(editor.getWrapperElement()); + code.css('display', 'none'); + + var output = outputDiv.children("textarea.d_code_output"); + var outputTitle = outputDiv.children("span.d_code_title"); + if (opts.args) { + var argsBtn = parent.children("input.argsButton"); + var argsDiv = parent.children("div.d_code_args"); var args = argsDiv.children("textarea.d_code_args"); var orgArgs = args.val(); + } + if (opts.stdin) { + var inputBtn = parent.children("input.inputButton"); + var stdinDiv = parent.children("div.d_code_stdin"); + var stdin = stdinDiv.children("textarea.d_code_stdin"); var orgStdin = stdin.val(); + } - var hideAllWindows = function() - { + var hideAllWindows = function() + { + if (opts.stdin) { stdinDiv.css('display', 'none'); + } + if (opts.args) { argsDiv.css('display', 'none'); - outputDiv.css('display', 'none'); - parent.parent().children("div.d_code").css('display', 'none'); - code.css('display', 'none'); - }; + } + outputDiv.css('display', 'none'); + if (!opts.keepCode) + { + parent.parent().children("div.d_code").css('display', 'none'); + } + code.css('display', 'none'); + }; + if (opts.args) { argsBtn.click(function(){ resetBtn.css('display', 'inline-block'); args.css('height', height(31)); @@ -456,7 +493,9 @@ $(document).ready(function() argsDiv.css('display', 'block'); args.focus(); }); + } + if (opts.stdin) { inputBtn.click(function(){ resetBtn.css('display', 'inline-block'); stdin.css('height', height(31)); @@ -464,60 +503,71 @@ $(document).ready(function() stdinDiv.css('display', 'block'); stdin.focus(); }); - editBtn.click(function(){ - resetBtn.css('display', 'inline-block'); - hideAllWindows(); - code.css('display', 'block'); - editor.refresh(); - editor.focus(); - }); - resetBtn.click(function(){ - resetBtn.css('display', 'none'); - editor.setValue(prepareForMain()); + } + + editBtn.click(function(){ + resetBtn.css('display', 'inline-block'); + hideAllWindows(); + code.css('display', 'block'); + editor.refresh(); + editor.focus(); + }); + resetBtn.click(function(){ + resetBtn.css('display', 'none'); + editor.setValue(prepareForMain()); + if (opts.args) { args.val(orgArgs); + } + if (opts.stdin) { stdin.val(orgStdin); - hideAllWindows(); - parent.parent().children("div.d_code").css('display', 'block'); - }); - runBtn.click(function(){ - resetBtn.css('display', 'inline-block'); - $(this).attr("disabled", true); - hideAllWindows(); - output.css('height', height(31)); - outputDiv.css('display', 'block'); - outputTitle.text("Application output"); - output.html("Running..."); - output.focus(); - - $.ajax({ - type: 'POST', - url: "//dpaste.dzfl.pl/request/", - dataType: "json", - data: - { - 'code' : editor.getValue(), - 'stdin' : stdin.val(), - 'args': args.val() - }, - success: function(data) - { - parseOutput(data, output, outputTitle); - runBtn.attr("disabled", false); - }, - error: function(jqXHR, textStatus, errorThrown ) + } + hideAllWindows(); + parent.parent().children("div.d_code").css('display', 'block'); + }); + runBtn.click(function(){ + resetBtn.css('display', 'inline-block'); + $(this).attr("disabled", true); + hideAllWindows(); + output.css('height', opts.outputHeight || height(31)); + outputDiv.css('display', 'block'); + outputTitle.text("Application output"); + output.html("Running..."); + output.focus(); + + var data = { + 'code' : opts.transformOutput(editor.getValue()), + } + if (opts.stdin) { + data.stdin = stdin.val(); + } + if (opts.args) { + data.args = args.val(); + } + $.ajax({ + type: 'POST', + url: "https://dpaste.dzfl.pl/request/", + dataType: "json", + data: data, + success: function(data) + { + data.defaultOutput = opts.defaultOutput; + parseOutput(data, output, outputTitle); + runBtn.attr("disabled", false); + }, + error: function(jqXHR, textStatus, errorThrown ) + { + output.html("Temporarily unavailable"); + if (typeof console != "undefined") { - output.html("Temporarily unavailable"); - if (typeof console != "undefined") - { - console.log(textStatus + ": " + errorThrown); - } - - runBtn.attr("disabled", false); + console.log(textStatus + ": " + errorThrown); } - }); + + runBtn.attr("disabled", false); + } }); }); -}); +}; + function setUpExamples() { diff --git a/js/run_examples.js b/js/run_examples.js new file mode 100644 index 0000000000..28804beb93 --- /dev/null +++ b/js/run_examples.js @@ -0,0 +1,104 @@ +/** + * Run all unittest examples + * + * Copyright 2016 by D Language Foundation + * + * License: http://boost.org/LICENSE_1_0.txt, Boost License 1.0 + */ + +// turns asserts into writeln +function reformatExample(code) { + return code.replace(/(assert<\/span>\((.*)==(.*)\);)+/g, function(match, text, left, right) { + return "writeln(" + left.trim() + "); " + + "// " + right.trim() + ""; + }); +} + +// wraps a unittest into a runnable script +function wrapIntoMain(code) { + var currentPackage = $('body')[0].id; + var codeOut = ""; + + // dynamically wrap into main if needed + if (code.indexOf("void main") >= 0) { + codeOut = "import " + currentPackage + "; "; + codeOut += code; + } + else { + var codeOut = "void main(){ "; + codeOut += "import " + currentPackage + "; "; + // writing to the stdout is probably often used + codeOut += "import std.stdio: write, writeln, writef, writefln; "; + codeOut += code; + codeOut += "\n}"; + } + return codeOut; +} + +$(document).ready(function() +{ + if ($('body')[0].id == "Home") + return; + + // only for std at the moment + if (!$('body').hasClass("std")) + return; + + // only enable for pre-release version + if (location.pathname.indexOf("prerelease") < 0) + return; + + // ignore not yet compatible modules + // copied from Phobos posix.mak + var ignoredModulesList = "allocator/allocator_list.d,allocator/building_blocks/allocator_list.d,allocator/building_blocks/free_list.d,allocator/building_blocks/quantizer,allocator/building_blocks/quantizer,allocator/building_blocks/stats_collector.d,base64.d,bitmanip.d,concurrency.d,conv.d,csv.d,datetime.d,digest/hmac.d,digest/sha.d,file.d,index.d,isemail.d,logger/core.d,logger/nulllogger.d,math.d,ndslice/selection.d,ndslice/slice.d,numeric.d,stdio.d,traits.d,typecons.d,uni.d,utf.d,uuid.d".split(",") + var currentModulePath = $('body')[0].id.replace('.', '/') + '.d'; + if (ignoredModulesList.filter(function(x) { currentModulePath.indexOf(x) >= 0 }).length > 0) { + return; + } + + $('pre[class~=d_code]').each(function(index) + { + var currentExample = $(this); + var orig = currentExample.html(); + + orig = reformatExample(orig); + + // check whether it is from a ddoced unittest + // manual created tests most likely can't be run without modifications + if (!$(this).parent().parent().prev().hasClass("dlang_runnable")) + return; + + currentExample.replaceWith( + '
' + + '
' + + '' + + '' + + '' + + '
' + + '
' + + '
'+orig+'
' + + '
' + + '
' + + '' + + '
' + + '
Application output
' + + '
' + ); + }); + + $('textarea[class=d_code]').each(function(index) { + var parent = $(this).parent(); + var btnParent = parent.parent().children(".d_example_buttons"); + var outputDiv = parent.parent().children(".d_code_output"); + setupTextarea(this, { + parent: btnParent, + outputDiv: outputDiv, + stdin: false, + args: false, + transformOutput: wrapIntoMain, + defaultOutput: "All tests passed", + keepCode: true, + outputHeight: "auto" + }); + }); +}); diff --git a/latex.ddoc b/latex.ddoc index 3b4a90c234..52d1dfffae 100644 --- a/latex.ddoc +++ b/latex.ddoc @@ -356,10 +356,6 @@ _= WHITE={\color{white}$0} _= -XREF=\href{phobos/std_$1.html#$2}{$(D std.$1.$2)} -XREF_PACK_NAMED=\href{phobos/std_$1_$2.html#$3}{$4} -_= - YELLOW={\color{yellow}$0} YES=$(CHECKMARK) _= diff --git a/orgs-using-d.dd b/orgs-using-d.dd index 0e1110e066..fb71da6e94 100644 --- a/orgs-using-d.dd +++ b/orgs-using-d.dd @@ -41,6 +41,15 @@ $(DIVC orgs-using-d center, $(FA_TESTIMONIAL) $(LINK2 http://www.auburnsounds.com/blog/2016-02-08_Making-a-Windows-VST-plugin-with-D.html, Testimonial) ) ) + $(DORG CERERIS, http://www.myriad-corp.com, cereris.png, + Hardware and Software development, + $(FA_QUOTE + We use D to develop MVC web framework for embedded systems. + ) + $(LINK_ROW + $(FA_GITHUB LLC-CERERIS) + ) + ) $(DORG eBay, https://ebay.com, ebay.jpg, One of the world’s largest marketplaces, Large scale data mining tools. diff --git a/plaintext.ddoc b/plaintext.ddoc index 2d4389b330..7b3911d2bf 100644 --- a/plaintext.ddoc +++ b/plaintext.ddoc @@ -57,10 +57,13 @@ DDOC_DESCRIPTION = $0 DDOC_DITTO = $0 DDOC_ENUM_MEMBERS = $0 DDOC_EXAMPLES = $0 +DDOC_HEADER_ANCHOR = DDOC_HISTORY = $0 DDOC_KEYWORD = $0 DDOC_LICENSE = $0 +DDOC_MEMBER = $0 DDOC_MEMBERS = $0 +DDOC_MEMBER_HEADER = DDOC_MODULE_MEMBERS = $0 DDOC_PARAM_DESC = $0 DDOC_PARAM = $0 diff --git a/posix.mak b/posix.mak index 83a0ea31b5..5bc1207ea3 100644 --- a/posix.mak +++ b/posix.mak @@ -135,7 +135,7 @@ IMAGES=favicon.ico $(ORGS_USING_D) $(addprefix images/, \ JAVASCRIPT=$(addsuffix .js, $(addprefix js/, \ codemirror-compressed dlang ddox listanchors platform-downloads run \ - run-main-website show_contributors jquery-1.7.2.min)) + run_examples run-main-website show_contributors jquery-1.7.2.min)) STYLES=$(addsuffix .css, $(addprefix css/, \ style print codemirror ddox)) @@ -161,11 +161,11 @@ CHANGELOG_FILES=$(basename $(subst _pre.dd,.dd,$(wildcard changelog/*.dd))) # Website root filenames. They have extension .dd in the source # and .html in the generated HTML. Save for the expansion of # $(SPEC_ROOT), the list is sorted alphabetically. -PAGES_ROOT=$(SPEC_ROOT) acknowledgements areas-of-d-usage \ +PAGES_ROOT=$(SPEC_ROOT) 404 acknowledgements areas-of-d-usage \ articles ascii-table bugstats.php builtin \ $(CHANGELOG_FILES) code_coverage community comparison concepts \ - const-faq cpptod ctarguments ctod \ - D1toD2 d-array-article d-floating-point deprecate dll-linux dmd \ + const-faq cpptod ctarguments ctod donate \ + D1toD2 d-array-article d-floating-point deprecate dlangupb-scholarship dll-linux dmd \ dmd-freebsd dmd-linux dmd-osx dmd-windows documentation download dstyle \ exception-safe faq forum-template foundation gpg_keys glossary \ gsoc2011 gsoc2012 gsoc2012-template hijack howto-promote htod index \ @@ -360,7 +360,7 @@ $(DMD_REL) : ${DMD_DIR}-${LATEST} ${MAKE} --directory=${DMD_DIR}-${LATEST}/src -f posix.mak AUTO_BOOTSTRAP=1 -j 4 dmd-prerelease : $(STD_DDOC_PRE) $(DMD_DIR) $(DMD) - $(MAKE) --directory=$(DMD_DIR) -f posix.mak html \ + $(MAKE) AUTO_BOOTSTRAP=1 --directory=$(DMD_DIR) -f posix.mak html \ DOCDIR=${DOC_OUTPUT_DIR}/dmd-prerelease \ DOCFMT="$(addprefix `pwd`/, $(STD_DDOC_PRE))" diff --git a/spec/abi.dd b/spec/abi.dd index 66d6bfc687..8ff19120d2 100644 --- a/spec/abi.dd +++ b/spec/abi.dd @@ -206,6 +206,7 @@ $(H3 $(LNAME2 name_mangling, Name Mangling)) $(GNAME MangledName): $(B _D) $(GLINK QualifiedName) $(GLINK Type) $(B _D) $(GLINK QualifiedName) $(B M) $(GLINK Type) + $(B _D) $(GLINK QualifiedName) $(B Z) $(GREEN // Internal) $(GNAME QualifiedName): $(GLINK SymbolName) @@ -214,6 +215,7 @@ $(H3 $(LNAME2 name_mangling, Name Mangling)) $(GNAME SymbolName): $(GLINK LName) $(GLINK TemplateInstanceName) + $(B 0) $(GREEN // anonymous symbols) ) $(P The $(B M) means that the symbol is a function that requires @@ -225,7 +227,11 @@ $(H3 $(LNAME2 name_mangling, Name Mangling)) $(GRAMMAR $(GNAME TemplateInstanceName): - $(GLINK Number) $(B __T) $(GLINK LName) $(GLINK TemplateArgs) $(B Z) + $(GLINK Number) $(GLINK TemplateID) $(GLINK LName) $(GLINK TemplateArgs) $(B Z) + + $(GNAME TemplateID): + $(B __T) + $(B __U) $(GREEN // for symbols declared inside template constraint) $(GNAME TemplateArgs): $(GLINK TemplateArg) @@ -238,11 +244,11 @@ $(H3 $(LNAME2 name_mangling, Name Mangling)) $(GNAME TemplateArgX): $(B T) $(GLINK Type) $(B V) $(GLINK Type) $(GLINK Value) - $(B S) $(GLINK LName) + $(B S) $(GLINK SymbolName) + $(B S) $(GLINK MangledName) $(GNAME Value): $(B n) - $(GLINK Number) $(B i) $(GLINK Number) $(B N) $(GLINK Number) $(B e) $(GLINK HexFloat) @@ -391,6 +397,8 @@ $(H3 $(LNAME2 type_mangling, Type Mangling)) $(GLINK TypeUint) $(GLINK TypeLong) $(GLINK TypeUlong) + $(GLINK TypeCent) + $(GLINK TypeUcent) $(GLINK TypeFloat) $(GLINK TypeDouble) $(GLINK TypeReal) @@ -407,9 +415,8 @@ $(H3 $(LNAME2 type_mangling, Type Mangling)) $(GLINK TypeNull) $(GLINK TypeTuple) $(GLINK TypeVector) - $(GLINK Internal) - $(GNAME TypeModifiers) + $(GNAME TypeModifiers): $(GLINK Const) $(GLINK Wild) $(GLINK Wild) $(GLINK Const) @@ -447,7 +454,7 @@ $(H3 $(LNAME2 type_mangling, Type Mangling)) $(B Nh) $(GLINK Type) $(GNAME TypeFunction): - $(GLINK CallConvention) $(GLINK FuncAttrs) $(GLINK Parameters) $(GLINK ParamClose) $(GLINK Type) + $(GLINK CallConvention) $(GLINK FuncAttrs)$(OPT) $(GLINK Parameters) $(GLINK ParamClose) $(GLINK Type) $(GNAME CallConvention): $(B F) $(GREEN // D) @@ -455,6 +462,7 @@ $(H3 $(LNAME2 type_mangling, Type Mangling)) $(B W) $(GREEN // Windows) $(B V) $(GREEN // Pascal) $(B R) $(GREEN // C++) + $(B Y) $(GREEN // Objective-C) $(GNAME FuncAttrs): $(GLINK FuncAttr) @@ -563,6 +571,12 @@ $(H3 $(LNAME2 type_mangling, Type Mangling)) $(GNAME TypeUlong): $(B m) + $(GNAME TypeCent): + $(B zi) + + $(GNAME TypeUcent): + $(B zk) + $(GNAME TypeFloat): $(B f) @@ -607,9 +621,6 @@ $(H3 $(LNAME2 type_mangling, Type Mangling)) $(GNAME TypeTuple): $(B B) $(GLINK Number) $(GLINK Parameters) - - $(GNAME Internal): - $(B Z) ) $(H3 $(LNAME2 function_calling_conventions, Function Calling Conventions)) diff --git a/spec/class.dd b/spec/class.dd index 020bd7c016..19a10b4306 100644 --- a/spec/class.dd +++ b/spec/class.dd @@ -575,7 +575,7 @@ $(H3 $(LNAME2 field-init, Field initialization inside constructor)) ------ $(P If the assignment expression for the field initialization may be invoked - multiple times, it would als be rejected. + multiple times, it would also be rejected. ) ------ diff --git a/spec/lex.dd b/spec/lex.dd index 1247727d28..9cfd1dc0aa 100644 --- a/spec/lex.dd +++ b/spec/lex.dd @@ -436,8 +436,7 @@ x"00 FBCD 32FD 0A" // same as The number of hex characters must be a multiple of 2. $(P ) - Adjacent strings are concatenated with the ~ operator, or by simple - juxtaposition: + Adjacent strings are concatenated with the ~ operator: -------------- "hello " ~ "world" ~ "\n" // forms the string @@ -448,9 +447,9 @@ x"00 FBCD 32FD 0A" // same as The following are all equivalent: ----------------- -"ab" "c" -r"ab" r"c" -r"a" "bc" +"ab" ~ "c" +r"ab" ~ r"c" +r"a" ~ "bc" "a" ~ "b" ~ "c" ----------------- @@ -1083,7 +1082,7 @@ $(H3 $(LNAME2 global_symbols, Globally Defined Symbols)) $(GRAMMAR $(GNAME Symbols): $(MULTICOLS 4, - $(D $(LINK2 arrays.html#strings, string)) (alias to immutable(char)[]) + $(D $(LINK2 arrays.html#strings, string)) (alias to immutable(char)[]) $(COMMENT This is important; people want to know these things up front.) $(D $(LINK2 arrays.html#strings, wstring)) (alias to immutable(wchar)[]) $(D $(LINK2 arrays.html#strings, dstring)) (alias to immutable(dchar)[]) @@ -1152,4 +1151,3 @@ x; // this is now line 6 of file foo\bar Macros: TITLE=Lexical - diff --git a/spec/module.dd b/spec/module.dd index e0a0444dba..5e1a628ccb 100644 --- a/spec/module.dd +++ b/spec/module.dd @@ -549,7 +549,12 @@ $(H3 $(LNAME2 override_cycle_abort, Overriding Cycle Detection Abort)) ) $(OL - $(LI `abort` The default behavior.) + $(LI `deprecate` The default behavior. This functions just like abort, + but will use the pre-2.072 algorithm to determine if the cycle was + undetected. If so, the old algorithm is used, but a deprecation + message is printed. After 2.073, the abort option will be the default.) + $(LI `abort` The normal behavior as described in the previous section. + After 2.073, this will be the default behavior.) $(LI `print` Print all cycles detected, but do not abort execution. Order of static construction is implementation defined, and not guaranteed to be valid.) diff --git a/std-ddox.ddoc b/std-ddox.ddoc index 3732f65d26..a2e3230bb1 100644 --- a/std-ddox.ddoc +++ b/std-ddox.ddoc @@ -1,8 +1,4 @@ D = $0 -XREF = $(D std.$1.$2) -XREF_PACK = $(D std.$1.$2.$3) -CXREF = $(D core.$1.$2) -ECXREF = $(D etc.$1.$2) LREF = $(D $1) ROOT_DIR=/ _= diff --git a/std.ddoc b/std.ddoc index 405590a7d2..362a2729ed 100644 --- a/std.ddoc +++ b/std.ddoc @@ -11,8 +11,6 @@ $(SCRIPT jQuery(document).ready(listanchors);) LAYOUT_TITLE=$(H1 $(D $(TITLE))) _= -CXREF = $(D core.$1.$2) -ECXREF = $(D etc.c.$1.$2) LREF = $(D $1) _= diff --git a/std_consolidated.ddoc b/std_consolidated.ddoc index ec3292ac33..317dc774ce 100644 --- a/std_consolidated.ddoc +++ b/std_consolidated.ddoc @@ -55,8 +55,6 @@ _= DDOC_PSYMBOL = $0 DDOC_DECL =
$0
-XREF = $(D std.$1.$2) -CXREF = $(D core.$1.$2) LREF = $(D $1) BUGZILLA = $(LINK2 https://issues.dlang.org/show_bug.cgi?id=$0, Bugzilla $0) PRE =
$0
diff --git a/std_navbar-prerelease.ddoc b/std_navbar-prerelease.ddoc index 9fcc2a8c32..897ea9f956 100644 --- a/std_navbar-prerelease.ddoc +++ b/std_navbar-prerelease.ddoc @@ -12,3 +12,4 @@ $(SUBNAV_TEMPLATE $(UL $(MODULE_MENU)) ) _= +EXTRA_FOOTERS=$(SCRIPTLOAD $(STATIC js/run_examples.js)) diff --git a/verbatim.ddoc b/verbatim.ddoc index acf5ec9beb..eaa133bed0 100644 --- a/verbatim.ddoc +++ b/verbatim.ddoc @@ -59,10 +59,13 @@ DDOC_DESCRIPTION = $(DOLLAR)(DDOC_DESCRIPTION $0) DDOC_DITTO = $(DOLLAR)(DDOC_DITTO $0) DDOC_ENUM_MEMBERS = $(DOLLAR)(DDOC_ENUM_MEMBERS $0) DDOC_EXAMPLES = $(DOLLAR)(DDOC_EXAMPLES $0) +DDOC_HEADER_ANCHOR = $(DOLLAR)(DDOC_HEADER_ANCHOR $0) DDOC_HISTORY = $(DOLLAR)(DDOC_HISTORY $0) DDOC_KEYWORD = $(DOLLAR)(DDOC_KEYWORD $0) DDOC_LICENSE = $(DOLLAR)(DDOC_LICENSE $0) DDOC_MEMBERS = $(DOLLAR)(DDOC_MEMBERS $0) +DDOC_MEMBER = $(DOLLAR)(DDOC_MEMBER $0) +DDOC_MEMBER_HEADER = $(DOLLAR)(DDOC_MEMBER_HEADER $0) DDOC_MODULE_MEMBERS = $(DOLLAR)(DDOC_MODULE_MEMBERS $0) DDOC_PARAM_DESC = $(DOLLAR)(DDOC_PARAM_DESC $0) DDOC_PARAM = $(DOLLAR)(DDOC_PARAM $0) diff --git a/win32.mak b/win32.mak index 964ba9eea9..b8ddafb15b 100644 --- a/win32.mak +++ b/win32.mak @@ -6,7 +6,7 @@ DMD=dmd DPL_DOCS_PATH=dpl-docs DPL_DOCS=dub run --root $(DPL_DOCS_PATH) -- -SRC= $(SPECSRC) cpptod.dd ctod.dd pretod.dd cppcontracts.dd index.dd overview.dd \ +SRC= $(SPECSRC) 404.dd cpptod.dd ctod.dd pretod.dd cppcontracts.dd index.dd overview.dd \ mixin.dd faq.dd \ dstyle.dd wc.dd \ changelog\2.000.dd changelog\2.001.dd changelog\2.002.dd \ @@ -49,7 +49,7 @@ SRC= $(SPECSRC) cpptod.dd ctod.dd pretod.dd cppcontracts.dd index.dd overview.dd D1toD2.dd intro-to-datetime.dd simd.dd deprecate.dd download.dd \ dll-linux.dd bugstats.php.dd \ ctarguments.dd articles.dd community.dd documentation.dd menu.dd \ - resources.dd search.dd + resources.dd search.dd dlangupb-scholarship.dd donate SPECSRC=spec\spec.dd spec\intro.dd spec\lex.dd \ spec\grammar.dd spec\module.dd spec\declaration.dd \ @@ -94,7 +94,7 @@ SPECTARGETS=spec\spec.html spec\intro.html spec\lex.html \ spec\objc_interface.html spec\portability.html spec\entity.html \ spec\memory-safe-d.html spec\abi.html spec\simd.html -TARGETS= $(SPECTARGETS) cpptod.html ctod.html pretod.html cppcontracts.html index.html overview.html \ +TARGETS= $(SPECTARGETS) cpptod.html ctod.html pretod.html cppcontracts.html 404.html index.html overview.html \ mixin.html \ faq.html dstyle.html wc.html \ changelog\2.000.html changelog\2.001.html changelog\2.002.html \ @@ -138,10 +138,11 @@ TARGETS= $(SPECTARGETS) cpptod.html ctod.html pretod.html cppcontracts.html inde dmd-linux.html dmd-osx.html dmd-freebsd.html concepts.html \ d-floating-point.html migrate-to-shared.html \ D1toD2.html intro-to-datetime.html \ - deprecate.html download.html \ + deprecate.html download.html dlangupb-scholarship.dd.html \ d-array-article.html dll-linux.html bugstats.php.html \ gpg_keys.html forum-template.html ctarguments.html articles.html \ community.html documentation.html menu.html resources.html search.html \ + donate.html \ # exclude list MOD_EXCLUDES_RELEASE=--ex=gc. --ex=rt. --ex=core.internal. --ex=core.stdc.config --ex=core.sys. \ @@ -174,6 +175,8 @@ dmd-osx.html : $(DDOC) osx.ddoc dcompiler.dd dmd-windows.html : $(DDOC) windows.ddoc dcompiler.dd $(DMD) -o- -c -D $(DDOC) windows.ddoc dcompiler.dd -Dfdmd-windows.html +404.html : $(DDOC) 404.dd + acknowledgements.html : $(DDOC) acknowledgements.dd articles.html : $(DDOC) articles.dd @@ -371,12 +374,16 @@ ctarguments.html : $(DDOC) ctarguments.dd ctod.html : $(DDOC) ctod.dd +donate: $(DDOC) donate.dd + D1toD2.html : $(DDOC) D1toD2.dd d-floating-point.html : $(DDOC) d-floating-point.dd deprecate.html : $(DDOC) deprecate.dd +dlangupb-scholarship.dd.html : $(DDOC) dlangupb-scholarship.dd + dll-linux.html : $(DDOC) dll-linux.dd documentation.html : $(DDOC) documentation.dd