Commit Graph

1831 Commits

Author SHA1 Message Date
quantimnot
9fc2918314 Document how to compile a reproducible build (#18953)
* Make compiler build more reproducible

Removed the compile time from the version output.
Added Git commit's author's datetime in UTC timezone.

Fixes #18508

See https://reproducible-builds.org/docs/timestamps/
See https://reproducible-builds.org/docs/source-date-epoch/

* Revert "Make compiler build more reproducible"

This reverts commit 2f9359ae89.

Documented how to use compile reproducible builds with the
`SOURCE_DATE_EPOCH` environment variable.

* Corrected `readme.md` formatting

Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
2021-10-06 09:41:42 +02:00
Andreas Rumpf
500d5f0f38 typo [backport] (#18948) 2021-10-04 12:34:29 +02:00
Andreas Rumpf
c3dd53bb2c typos [backport] (#18929) 2021-09-30 11:35:42 +02:00
flywind
8bdb985395 fix wrong name (rnimsyn => renderer; pnimsyn => parser; scanner => lexer) (#18895)
* fix wrong module name

* rephrase more word
2021-09-25 13:22:00 +02:00
Miran
561b01004c [backport] change some examples in tut1.rst (#18884)
* [backport] change some examples in tut1.rst

* Update doc/tut1.rst

* Update doc/tut1.rst

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-09-24 11:24:55 +02:00
Andreas Rumpf
ca51bb8fd9 documented overload disambiguation [backport] (#18865)
* documented overload disambiguation [backport]

* Update doc/manual.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* documented overload disambiguation [backport]

* documented overload disambiguation [backport]

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2021-09-19 18:31:55 +02:00
Andreas Rumpf
179fad934d doc improvements (#18843)
* cleaned up destructors documentation [backport]

* Spec updates [backport:1.0]
2021-09-13 11:05:09 +02:00
Andreas Rumpf
2e2d928846 formal grammar updates [backport:1.2] (#18803) 2021-09-04 19:52:57 +02:00
flywind
b3ad68edea remove channels (#18801)
* remove channels

* test
2021-09-04 15:57:02 +02:00
Andreas Rumpf
686096a912 documented overloadable enums and changelog improvements (#18797) 2021-09-04 12:52:24 +02:00
Andreas Rumpf
cddf8ec6f6 implements https://github.com/nim-lang/RFCs/issues/407 (#18793) 2021-09-03 21:52:24 +02:00
Andreas Rumpf
c2b20516d3 implemented Unicode operators (#18789)
* implemented Unicode operators; refs https://github.com/nim-lang/RFCs/issues/388

* bugfix

* better test

* arguably more elegant implementation

* Update changelog.md

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2021-09-03 17:31:16 +02:00
Andreas Rumpf
e0ef859130 strict effects (#18777)
* fixes #17369
* megatest is green for --cpu:arm64
* docgen output includes more tags/raises
* implemented 'effectsOf' 
* algorithm.nim: uses new effectsOf annotation
* closes #18376
* closes #17475
* closes #13905
* allow effectsOf: [a, b]
* added a test case
* parameters that are not ours cannot be declared as .effectsOf
* documentation
* manual: added the 'sort' example
* bootstrap with the new better options
2021-09-02 12:10:14 +02:00
konsumlamm
0ddd9519c0 Remove Covariance section from the experimental manual (#18688)
* Remove `Covariance` section

* Add blank lines after `.. code-block::`

* Fix CI?
2021-08-29 10:42:52 +02:00
Timothee Cour
3aa16c1de0 fix RFC #341: dot-like operators are now parsed with same precedence as . (#18711)
* fix RFC #341: dot-like operators are now parsed with same precedence as `.`

* fixup

* [skip ci] address comment in changelog

* address comment

* update grammmar

* add manual entry

* fixup

* -d:nimPreviewDotLikeOps

* address comment to unblock PR: move nimPreviewDotLikeOps out of config/config.nims
2021-08-25 06:50:40 +02:00
flywind
5b26f2bd81 fix deprecated example (#18721) 2021-08-21 08:22:00 +02:00
flywind
e52221e296 [docs]fix an item missing (#18717) 2021-08-20 20:00:04 +02:00
Timothee Cour
1acba63cb7 cross compilation targetting windows now supports nim r: nim r -d:mingw main (#18682)
* cross compilation targetting windows now supports `nim r`: `nim r -d:mingw main`

* quoteShell

* address comment: remove `conf.getConfigVar("nimrun.exe")`
2021-08-16 09:32:12 +02:00
Andreas Rumpf
4463a3c3d7 manual: minor improvements (#18687) 2021-08-13 12:34:28 +02:00
RSDuck
d0dd923acf Switch maintanance (#18668)
* Fix and improve Nintendo Switch support

* Document the necessity for nimAllocPagesViaMalloc

* update changelog

* Use --gc:orc in examples
2021-08-11 08:54:49 +02:00
Juan Carlos
2cddf7fc96 Documentation only, add 1 example (#18621)
* ReSync with Devel

* ReSync

* Documentation only, add 1 example to For loop macro

* Flip it

* Update doc/manual.rst

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-08-08 19:26:34 +02:00
Juan Carlos
6563a685c1 Documentation only, add 1 example (#18633) 2021-08-03 09:16:33 -07:00
Andrey Makarov
bbe05c1532 docgen: draw frame around active anchors (#18607) 2021-07-29 13:30:19 +02:00
konsumlamm
1bba641fed Update lib.rst (#18605)
* Update lib.rst

* Remove "Unstable" category

Add `strbasics`

* Update doc/lib.rst

* Update doc/lib.rst

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-07-29 10:50:17 +02:00
GordonBGood
37f5f0d7d0 Clarify use of import via pseudo dir... (#18569) 2021-07-27 09:38:30 +02:00
Andreas Rumpf
0c4582c665 mitigates #12815 (#18557)
* mitigates #12815

* Update doc/nimc.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2021-07-22 11:59:21 +02:00
Andreas Rumpf
58e27ebd4a fixes #12815 (#18554) 2021-07-22 09:37:41 +02:00
Andreas Rumpf
01fc9e58ca fixes #18550 (#18553)
* fixes #18550

* update the manual to reflect reality
2021-07-21 16:55:50 +02:00
Andreas Rumpf
f86a530214 breaking changes policies (#18541)
* document some std library evolution policies

In wanting to improve the standard library, it's helpful to have a set
of principles and guidelines to lean back on, that show how to introduce
such improvements while at the same time considering existing users of
the language.

A key idea behind documentation of this sort is that it should highlight
a path forwards in making changes rather than trying to prevent them,
and although the current snippet does include some language for what one
shouldn't do, it also shows a few options for what one can do.

This is a riff on https://github.com/nim-lang/Nim/pull/18468 mainly
based on what helps enable to the use of Nim productively in
environments and teams where the priority and focus is not always on the
tool (Nim in this case) but rather on the codebase itself, and its use
by end users.

We use similar guidance documentation to help coordinate the code of the
teams using Nim in https://status-im.github.io/nim-style-guide/ where it
is applied not as law, but rather as recommendations for the default
approach that should be considered first.

* document the new policies

* typo

* Update doc/contributing.rst

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* Update doc/contributing.rst

* Update doc/contributing.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* Update doc/contributing.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* Update doc/contributing.rst

* Update doc/contributing.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* clarify some things

* Update doc/contributing.rst

Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>

Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
2021-07-21 10:22:30 +02:00
flywind
dbf8d0b894 use more .} (#18542) 2021-07-20 20:12:15 +08:00
ynfle
1e7a10001a Docs(manual): add clarification for default params (#18522)
* Docs(manual): add clarification for default params

* Docs(manual): fix wording to refer to call time

* Docs(manual): Clarify default parameter wording

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2021-07-19 12:44:06 +02:00
Andreas Rumpf
af3d2d8ad9 added nimAllocPagesViaMalloc switch (#18490)
* added  switch

* alloc.nim needs page aligned memory blocks
2021-07-15 17:58:47 +02:00
GordonBGood
8c6dd2b9a9 Improve description of how =trace is used (#18491)
* [skip ci] thamming_orc test created/destroyed counts match

The thamming_orc.nim code now counts all created objects being tested, not just the ones following the "first 20" test, and the position of the `destroyed += 1` counter has been adjusted so it counts all the calls that are as a result of `=trace` tracing and not just the original destruction calls.

* Improve description of how `=trace` is used

The following nuances weren't previously fully explained:

1. That `=trace` is only used by `--gc:orc`.
2. That `=trace` is almost certainly used along with `=destroy` when manual resource allocation has been used, but it is only required if there is a possibility of cyclic references in the wrapped types (ie. generic types).
3. That, currently, a forward definition is required for the second of the pair to avoid an auto compiler generation conflict.

The pattern of the use of `=trace` has also been made more extensive, showing how both a custom `=destroy` and `=trace` are used for manual allocation of resources when there is any possibility of a cyclic reference in the resource-wrapped values.

* Update doc/destructors.rst

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-07-15 14:35:53 +02:00
Andreas Rumpf
4ec2f74246 ORC: support for custom =trace procs (#18459)
* ORC: support custom =trace procs (WIP)
* Update tests/arc/tcustomtrace.nim

Co-authored-by: Clyybber <darkmine956@gmail.com>

* =trace is now documented and seems to work
* make test green

Co-authored-by: Clyybber <darkmine956@gmail.com>
2021-07-09 15:15:49 +02:00
Andreas Rumpf
3eb3e6b9a3 ORC: use =destroy instead of =dispose (#18440)
* ORC refactoring in preparation for further changes (=dispose must die)
* ORC: embrace =destroy, avoid =dispose
* ORC: no need for =dispose
* closes #18421
2021-07-07 09:39:01 +02:00
Elliot Waite
afe5eb569b Add commas to docs for clarity (#18398) 2021-06-29 19:21:30 -07:00
gemath
e720bbdd76 Peg captures get stack-like behavior (#18369)
* Implements reverse capture indexing.
* Now works for modified backrefs too.
* Changed reverse indexing syntax prefix for back-references to '$^'.
2021-06-28 12:33:20 +02:00
Federico Ceratto
0804b4b37d Switch packaging.rst to use makefile
Minor cleanup
2021-06-27 19:51:28 +01:00
xioren
16461a8810 add multi type exception catching to manual (#18258) (#18323) 2021-06-21 18:53:35 -07:00
Timothee Cour
abd21ef213 close #17403; improve docs for tuple (#18312) 2021-06-21 09:45:26 +02:00
Timothee Cour
40ec8184ad followup #17852, disallow all:on for now (#18311) 2021-06-20 22:49:14 +02:00
Timothee Cour
7d5e6b0169 support --hint:all:off --hint:x (ditto with --warnings + friends) (#17852)
* select all hints via `--hint:all:on|off`, etc
* simplify code with setutils
* address comment
2021-06-20 19:52:22 +02:00
Timothee Cour
6030e139b5 move {.injectStmt.} to experimental; add a test (#18300)
* move {.injectStmt.} to experimental; add a test

* undocument and deprecat `.injectStmt` but keep its implementation until we have a replacement
2021-06-20 09:51:07 +02:00
j-james
a250481dcd Make the existence of high(type) clearer, especially near subranges (#18286)
* Make the existence of high(type) clearer, especially around subranges

* Use a better example and dry up the wording
2021-06-18 12:10:45 +02:00
Timothee Cour
e1e8af535e merge BuildMode into SuccessX, remove code duplication w drnim, add useful info to successx, add gc to compilesettings (#18252)
* merge BuildMode into SuccessX, add more info

* refactor duplicated with drnim

* fixup

* address comment
2021-06-14 08:51:40 +02:00
Andreas Rumpf
2ea7287217 view types: spec changes (#18226)
* view types: spec changes

* Update doc/manual_experimental.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* Update doc/manual_experimental.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2021-06-10 16:49:17 +02:00
Kaushal Modi
3481ff6172 Update nims.rst to reflect that -d:release is now allowed in config.nims (#18221)
`-d:release` and `-d:danger` started working in `config.nims` after df429fa287 .
2021-06-10 14:29:03 +02:00
Andrey Makarov
e7816a3e77 update docgen documentation (#18192)
* update docgen documentation

* --fullhelp

* Update doc/docgen.rst

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* [skip ci] fix typos

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-06-06 09:55:20 +02:00
Andrey Makarov
7e21218a07 follow-up #18013 - inline syntax highlighting (#18166) 2021-06-04 16:16:51 +02:00
Andreas Rumpf
06232b7f2e fixes #18058 (#18162) 2021-06-03 17:12:45 +02:00