summary refs log tree commit diff stats
path: root/lib/std
Commit message (Collapse)AuthorAgeFilesLines
* remove channels (#18801)flywind2021-09-041-498/+0
| | | | | * remove channels * test
* Fix initrand to avoid random number sequences overlapping (#18744)Tomohiro2021-09-021-5/+2
| | | | | | | | | | | | | | | | | | | | | | | * Fix initrand to avoid random number sequences overlapping * Minor fix * Fix compile error on js backend * Disable new test for js backend * Minor fix * tempfiles module uses random.initRand() * Remove unused module import from lib/std/tempfiles.nim * Initialize baseState in initRand() * Run tests/stdlib/trandom.nim from tests/test_nimscript.nims * baseState is initialized only with sysrand.urandom and quit if failed * Add comments
* strict effects (#18777)Andreas Rumpf2021-09-021-1/+6
| | | | | | | | | | | | | | | | | * 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
* Implement RFC-391 (#18585)Juan Carlos2021-08-221-107/+106
|
* fix #17898(randomPathName called twice in a row can return the same string ↵flywind2021-08-221-3/+17
| | | | | | | on windows) (#18729) * close #17898 * no need to consider js
* improvements to `addInt` and `$` for integer types (#18592)Timothee Cour2021-08-192-20/+57
| | | | | | | | * improvements to $(SomeInteger) and addInt * remove mIntToStr, mInt64ToStr * improvements * fix tests/pragmas/tinjectstmt.nim; the diff is harmless, cgen code is identical with -d:danger or debug mode * rm tests/system/tstrmantle.nim * revert compiler/jsgen.nim for -d:nimVersion140
* fix a sqlite bug (#18669)flywind2021-08-121-0/+15
|
* Add optional recursive arg to distinctBase (v2) (#18659)Timothee Cour2021-08-091-2/+2
| | | | | | * 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-081-0/+0
| | | | to avoid confusion with unrelated std/vmutils (#18660)
* fixes #18371 (#18617)Andreas Rumpf2021-07-301-1/+1
|
* Remove tracking of environment from osenv.nim v2 (#18575)Timothee Cour2021-07-291-0/+92
| | | | | | | | | | | | | * 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-282-10/+29
|
* clean unused imports on runnableExamples (#18551)flywind2021-07-211-2/+0
|
* fix nativeToUnixPath (#18501)Timothee Cour2021-07-171-3/+8
|
* deprecate cuchar, don't redefine it (#18505)Andreas Rumpf2021-07-161-1/+1
|
* 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
* major improvements to `std/wrapnils`: optimal codegen, case objects, lvalue ↵Timothee Cour2021-07-071-51/+134
| | | | | | | semantics (#18435) * wrapnils now generates optimal code; also handles case objects * changelog * unsafeAddr => addr
* typo: enmRange => enumElementsAsSet (#18394)Timothee Cour2021-06-291-2/+2
|
* Simplify addInt, remove digits10 (#18356)Clyybber2021-06-281-35/+23
| | | | | | | | | | | | | * Simplify addInt, remove digits10 Co-authored-by: Charles Blake <charlechaud@gmail.com> * Fix bootstrapping * Add noInit to tmp array * noInit -> noinit Co-authored-by: Charles Blake <charlechaud@gmail.com>
* docs now show nimExperimentalX APIs (#18345)Timothee Cour2021-06-251-1/+1
| | | | | * docs now show nimExperimentalX APIs * fix for windows
* enable VM tracing in user code via `{.define(nimVmTrace).}` (#18244)Timothee Cour2021-06-241-0/+11
| | | | | | | * enable VM tracing in user code via `{.define(nimVmTrace).}` * add vmutils.vmTrace * add vmTrace
* merge similar procs regarding digits (#18318)flywind2021-06-221-0/+88
|
* make privateAccess work with generic types and generic instantiations; fix a ↵Timothee Cour2021-06-191-11/+21
| | | | | SIGSEGV (#18260) Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* merge BuildMode into SuccessX, remove code duplication w drnim, add useful ↵Timothee Cour2021-06-141-0/+1
| | | | | | | | | | | info to successx, add gc to compilesettings (#18252) * merge BuildMode into SuccessX, add more info * refactor duplicated with drnim * fixup * address comment
* avoid re-exporting options from std/wrapnils (#18222)Timothee Cour2021-06-101-1/+1
|
* up to 20x faster jsonutils deserialization (#18183)Timothee Cour2021-06-051-6/+6
| | | | | * up to 20x faster jsonutils deserialization * noinline
* simplify extccomp.nim json logic via jsonutils; fix #18084 (#18100)Timothee Cour2021-06-031-1/+17
| | | | | | * simplify extccomp.nim json logic via jsonutils * fix #18084 * simplify further * workaround for bootstrap that can be removed after updating csources_v1 >= 1.2
* clarify what a 'monotonic' timestamp is (#18163)Andreas Rumpf2021-06-031-3/+2
|
* jsonutils.toJson now serializes JsonNode as is by default (#18097)Timothee Cour2021-05-311-4/+16
| | | | | * jsonutils.toJson now serializes JsonNode as is (without deep copy nor treating it as a regular ref object) * JsonNodeMode
* jsonutils: add customization for toJson via `ToJsonOptions`; generalize ↵Timothee Cour2021-05-182-13/+95
| | | | | | | | | | | | | | | | | | | symbolName; add symbolRank (#18029) * jsonutils: add customization for toJson via `ToJsonOptions` * add enumutils.symbolRank * lookup table implementation for HoleyEnum * cleanup * changelog * fixup * Update lib/std/jsonutils.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fix #18007: std/json now serializes nan,inf,-inf as strings instead of ↵Timothee Cour2021-05-161-0/+3
| | | | | | | | | | | | | | | | | invalid json (#18026) * fix #18007: std/json now serializes nan,inf,-inf as raw strings instead of invalid json * fix roundtrip * fix tests * fix changelog * simplify * add runnableExamples * fix typo [skip ci]
* ORC: progress (#18000)Andreas Rumpf2021-05-121-1/+1
| | | | | | | | | * ORC: progress * ORC: bugfix; don't follow acyclic data even if only at runtime the subtype is marked as acyclic * progress * minor style changes
* jsonutils: handle holey enum as regular enum, via ord (#17995)Timothee Cour2021-05-111-0/+3
|
* jsonutils: support set (#17994)Timothee Cour2021-05-111-1/+5
|
* improve std/tempfiles (#17920)Timothee Cour2021-05-111-21/+49
| | | | | | | | * improve std/tempfiles * fixup * fix windows * improve test * improve runnableExamples and tests * address comment
* misc fixes: remove `forceConst` (obsolete by static), add more ↵Timothee Cour2021-05-011-1/+1
| | | | | | | | | | | | | runnableExamples to system (#17896) * misc fixes * add runnableExamples for compileOption * add runnableExamples for runnableExamples * move tconsteval => tconst * cleanup
* gitutils: add diffStrings, diffFiles, and use it in testament to compare ↵Timothee Cour2021-04-302-24/+64
| | | | | | | | | | | | | expected vs gotten (#17892) * gitutils: add diffStrings, diffFiles, and use it in testament to compare expected vs gotten * refactor with createTempDir * cleanup * refacotr * PRTEMP fake test spec changes to show effect of diffStrings * add runnableExamples for experimental/diff + cross-reference with gitutils * Revert "PRTEMP fake test spec changes to show effect of diffStrings" This reverts commit 57dc8d642dce6c1127c98b7cbc9edbfe747d4047.
* fix #17888: remove undefined behavior for posix.open; fix ↵Timothee Cour2021-04-291-3/+10
| | | | | | | | | | | tempfiles.createTempFile (#17889) * fix #17888: remove undefined behavior for posix.open; fix tempfiles.createTempFile * fix for tests/async/tasyncfile.nim * hide mode for now * add notice regarding stability
* refactor all code that builds csources (#17815)Timothee Cour2021-04-231-1/+1
| | | | | | | | | | | | | | | * refactor all code that builds csources * fixup * nim_csourcesDir_v0 + nim_csourcesDir * remove deprecated, unused scripts from ci/ * reuse nimCsourcesHash in ci * simplify CI pipelines by reusing nimBuildCsourcesIfNeeded * simplify ci_docs.yml by reusing nimBuildCsourcesIfNeeded * cleanup * use csources_v1 as destination dir * fixup * remove pushCsources * address comment: remove build.sh support for now * fixup
* close #9372 add std/tempfiles (#17361)flywind2021-04-211-0/+139
| | | | * close #9372 add std/tempfile
* CIs: attempt to use csources_v1 (#16282)Andreas Rumpf2021-04-218-26/+26
| | | | | | | | * CIs: attempt to use csources_v1 * also updated the BSDs * also updated azure pipelines * std modules should not itself use the 'std/' import dir... * compiler has to be careful with std/ for v1 booting
* [std/tasks]add gcsafe pragmas (#17799)flywind2021-04-211-4/+4
| | | | | * [std/tasks]add gcsafe pragmas * Update tasks.nim
* Small privateAccess improvement (#17786)Clyybber2021-04-191-1/+1
|
* Rename `=` to `=copy` in stdlib (#17781)Clyybber2021-04-192-2/+2
|
* privateAccess now works with ref | ptr (#17760)Timothee Cour2021-04-191-1/+1
|
* `import foo {.all.}` reboot (#17706)Timothee Cour2021-04-161-0/+34
|
* callback cannot be nil (#17718)flywind2021-04-141-0/+1
| | | | | | | `Task.callback` cannot be nil, we need to raise it at debug and release mode Situations: - if users create a Task object without using `toTask` and invoke the Task - if users already move the Task and invoke the Task
* Update channels.nim (#17717)flywind2021-04-141-4/+4
|
* add number literal jsbigints.big (#17707)Timothee Cour2021-04-131-7/+13
|