summary refs log tree commit diff stats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Switch maintanance (#18668)RSDuck2021-08-113-155/+1
| | | | | | | | | * Fix and improve Nintendo Switch support * Document the necessity for nimAllocPagesViaMalloc * update changelog * Use --gc:orc in examples
* Add optional recursive arg to distinctBase (v2) (#18659)Timothee Cour2021-08-093-8/+15
| | | | | | * Add optional recursive arg to distinctBase * Add docs and examples Co-authored-by: ALANVF <alan.invents@gmail.com>
* renamed: lib/std/private/vmutils.nim -> lib/std/private/bitops_utils.nim ↵Timothee Cour2021-08-083-4/+2
| | | | to avoid confusion with unrelated std/vmutils (#18660)
* use lent (#18638)flywind2021-08-081-2/+2
|
* Only allow IPv4 literals in strict form (#18656)Christian Ulrich2021-08-081-3/+22
| | | | | | | | | | | | | * Only allow IPv4 literals in strict form The strict form as defined in RFC 6943, section 3.1.1 only allows the dotted form ddd.ddd.ddd.ddd of IPv4 literals, where ddd is a one to three digit decimal number between 0 and 255. Until now octal numbers (with a leading zero) were interpreted as decimal numbers which has security implications, see CVE-2021-29922 and CVE-2021-29923. * Update lib/pure/net.nim Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
* Nim pretty and add void (#18652)Kyle Brown2021-08-081-6/+12
| | | | | | | | | | | | | | | * pretty and add void * distro fixup * Update lib/pure/distros.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * tab to space * requested change to be cleaner Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* [nre]fix #17129 (#18632)flywind2021-08-081-3/+2
| | | | | | | | | | | | | | | * fix #17129 * correct * give reference implementaion links * add comment * typo * I'm conservative * change
* improve runnableExamples and docs for std/nre (#18634)Timothee Cour2021-08-021-68/+49
| | | | | * improve runnableExamples and docs for std/nre * avoid too long lines in example
* Add Artix to distro list (#18629)Kyle Brown2021-08-021-2/+5
|
* fix #18620 (#18624)flywind2021-08-011-4/+1
| | | | | * fix #18620 * add testcase
* fixes #18371 (#18617)Andreas Rumpf2021-07-301-1/+1
|
* [minor] reduce `substr` (#18611)flywind2021-07-302-5/+7
| | | | | | | | | * minor * correct * unify the type of addrLen * Update lib/packages/docutils/rstgen.nim
* Remove tracking of environment from osenv.nim v2 (#18575)Timothee Cour2021-07-292-159/+170
| | | | | | | | | | | | | * Remove unnecessary environment tracking * try to fix windows * fix delEnv * make putEnv work on windows even with empty values; improve tests: add tests, add js, vm testing * [skip ci] fix changelog Co-authored-by: Caden Haustein <code@brightlysalty.33mail.com>
* Allow `nnkAccQuoted` in `genEnumCaseStmt` (#18606)Vindaar2021-07-291-1/+5
| | | | | | | | | | * [enumutils] provide node kind for `Invalid node type` error * [enumutils] add support for nnkAccQuoted in `genEnumCaseStmt` For reasons unknown to me, when running `nim doc` on a file that uses `parseEnum` with an enum that contains accented quotes errors at CT with the `Invalid node for type` error. Further errors are raised, probably because the enum parsing fails?
* various small documentation improvements (#18602)Miran2021-07-2812-92/+118
|
* fix #17072: add times.dateTime with ISO 8601 order (#18590)Timothee Cour2021-07-281-11/+18
| | | | | * fix #17072: add times.dateTime with ISO 8601 order * address comments
* fixes #18543 (#18601)Andreas Rumpf2021-07-271-176/+98
| | | | | * fixes #18543 * make tests green again
* fixes #18579 (#18600)Andreas Rumpf2021-07-271-4/+2
|
* Update documentation for dynlib (#17356)konsumlamm2021-07-261-44/+34
| | | | | | | * Update documentation for dynlib * Apply suggestions * Improve error handling in example
* optimize for the non-throwing case (#18587)Antonis Geralis2021-07-261-4/+7
|
* Documentation only, Sugar arrow and semicolons (#18574)Juan Carlos2021-07-251-0/+4
| | | * Document that sugar arrow do not support semicolon as argument separator
* rename nimFpRoundtrips => nimPreviewFloatRoundtrip (#18566)Timothee Cour2021-07-231-2/+2
|
* std/random: fix overflow bugs; fixes #16360; fixes #16296; fixes #17670 (#18456)Timothee Cour2021-07-231-9/+23
|
* Replace calls to `putenv` with `setenv` (#18530)Caden Haustein2021-07-231-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | * Replace calls to C `putenv` with C `setenv` to remove possible memory leaks * Add test of correct behaviour on invalid input * Fix style in tests/stdlib/tos.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update tests/stdlib/tos.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update tests/stdlib/tos.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Add comment with bug number to tests/stdlib/tos.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Fix possible msvc arch issues Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* fixes #18550 (#18553)Andreas Rumpf2021-07-212-5/+5
| | | | | * fixes #18550 * update the manual to reflect reality
* add [1..2] for JArray (#18525)itsumura-h2021-07-211-0/+18
| | | | | | | | | | | | * add [1..2] for JArray * fix BackwardsIndex to int * fix for BackwardsIndex * fix for assert node kind check * fix variable name * Update lib/pure/json.nim * fix for when x.a is BackwardsIndex Co-authored-by: itsumura-h <dumblepy@mail.com> Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
* complement notes of two doc strings of tables module (#18527)IterableTrucks2021-07-211-0/+4
| | | | | | | | | | | | | | | * complement notes of two doc strings warning the deprecated procedure's side effect * Update lib/pure/collections/tables.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update lib/pure/collections/tables.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: BillyZee <billyzee@localhost.localdomain> Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* clean unused imports on runnableExamples (#18551)flywind2021-07-211-2/+0
|
* unary slices get a deprecation period (#18549)Andreas Rumpf2021-07-211-9/+8
|
* make -d:nimFpRoundtrips work consistently in vm vs rt, fix #18400, etc (#18531)Timothee Cour2021-07-206-121/+126
| | | | | | * compiler/vmhooks: add getVar to allow vmops with var params * addFloat vmops with var param * cgen now renders float32 literals in c backend using roundtrip float to string
* follow up #18517 (#18537)flywind2021-07-201-2/+3
| | | | | | | | | | | * follow up #18517 * Update lib/pure/os.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/pure/os.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* use more `.}` (#18542)flywind2021-07-203-6/+6
|
* termux ssl (#18520)Paul Roberts2021-07-202-1/+2
|
* use .} instead of } for code highlightersAraq2021-07-201-2/+2
|
* rst: add missing line/column info for some warnings (#18383)Andrey Makarov2021-07-203-83/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rst: add missing line/column info for some warnings * add workaround * use TLineInfo/FileIndex for storing file names * fix blank lines in include file (rm harmful strip) * don't use ref TLineInfo * return `hasToc` as output parameter for uniformity * Update compiler/docgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update compiler/docgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/packages/docutils/rst.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * address review - stylistic things * Update compiler/docgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * unify RST warnings/errors names * doAssert + minor name change * fix a bug caught by doAssert * apply strbasics.strip to final HTML/Latex * rm redundant filename * fix test after rebase * delete `order` from rnFootnoteRef, also display errors/warnings properly when footnote references are from different files * Update compiler/lineinfos.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/packages/docutils/rstast.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/packages/docutils/rstast.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/packages/docutils/rstast.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * revert because of error: Error: cannot prove that it's safe to initialize 'info' with the runtime value for the discriminator 'kind' * Update lib/packages/docutils/rstgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * apply suggestion * Update lib/packages/docutils/rst.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * add Table for string->file name mapping * do not import compiler/lineinfos * fix ambiguous calls Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: narimiran <narimiran@disroot.org>
* [std/os]document `checkDir` and use `runnableExamples` (#18517)flywind2021-07-191-22/+16
| | | Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* Revert #17321 (#18521)konsumlamm2021-07-191-135/+135
| | | Use better names in example
* fixed system.delete (#18507)Andreas Rumpf2021-07-181-7/+10
|
* deprecate strutils.delete and add an overload with saner semantics ↵Timothee Cour2021-07-181-7/+33
| | | | consistent with sequtils.delete; follows #18487 (#18510)
* add NIM_STATIC_ASSERT(CHAR_BIT == 8, "") to fail-fast where assumption is ↵Timothee Cour2021-07-181-0/+3
| | | | violated (#18512)
* Revert #17398 and #17402 (#18480)Miran2021-07-181-25/+15
| | | | | | | | | | | * Revert "followup #17398: `getTempDir`, `getConfigDir` now do not have trailing DirSep (#17402)" This reverts commit 2356d0603f70cad90f76fa57999054bf5c0a9157. * Revert "fix #17393 getHomeDir and expandTilde should not include trailing `/` (#17398)" This reverts commit bebf2ce24a43bef4cde5c90c4010631a1e4a7927. * fix test
* fix nativeToUnixPath (#18501)Timothee Cour2021-07-171-3/+8
|
* make dragonbox opt-in via -d:nimFpRoundtrips (#18504)Andreas Rumpf2021-07-162-2/+2
| | | | | | | * make dragonbox opt-in via -d:nimFpRoundtrips * make tests green again * make tests green again
* deprecate cuchar, don't redefine it (#18505)Andreas Rumpf2021-07-169-49/+49
|
* Add changes required by Nimble lock file support (#12104)Ivan Bobev2021-07-151-0/+4
| | | | | | | | | | | | | | | | Implemented support for Nimble local cache with package directories with a checksum of the package at the end of their names. Now the compiler supports package paths in the form: * /path_to_nimble_cache_dir/pkgs/package_name-1.2.3- FEBADEAEA2345E777F0F6F8433F7F0A52EDD5D1B * /path_to_nimble_cache_dir/pkgs/package_name-#head- 042D4BE2B90ED0672E717D71850ABDB0A2D19CD2 * /path_to_nimble_cache_dir/pkgs/package_name-#branch-name- DBC1F902CB79946E990E38AF51F0BAD36ACFABD9 Related to nim-lang/nimble#127
* deprecate `sequtils.delete` and add an overload with saner semantics ↵Timothee Cour2021-07-151-3/+42
| | | | | | | | consistent with `system.delete` (#18487) * deprecate sequtils.delete and add an overload with saner semantics * AssertionDefect => IndexDefect * improve tsequtils * add tests; use splice in js for optimization
* added `nimAllocPagesViaMalloc` switch (#18490)Andreas Rumpf2021-07-152-5/+29
| | | | | * added switch * alloc.nim needs page aligned memory blocks
* workaround #18481 (#18482)flywind2021-07-131-18/+20
|
* fix comment (#18473)sivchari2021-07-111-6/+6
|
* sync with the same template from locks module (#18414)Antonis Geralis2021-07-101-1/+1
|