summary refs log tree commit diff stats
path: root/lib/std
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* add std/tasks (#17447)flywind2021-04-091-0/+272
|
* Update `sysrand` documentation (#17676)konsumlamm2021-04-081-16/+16
| | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fix #17615(runnableExamples silently ignored if placed after some code) (#17619)flywind2021-04-021-2/+2
| | | Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* new `genAst` as replacement for `quote do` (#17426)Timothee Cour2021-04-021-0/+87
| | | | | | | | | | | | | | * new `macros.genAst`: fixes all issues with `quote do` * add changelog entry * add workaround for https://github.com/nim-lang/Nim/issues/2465#issuecomment-511076669 * add test for #9607 * add kNoExposeLocalInjects option * add test case for nested application of genAst * genAst: automatically call newLit when needed * allow skipping `{}`: genAst: foo * add test that shows this fixes #11986 * add examples showing mixin; add examples showing passing types, macros, templates * move to std/genasts * improve docs
* jsonutils: support cstring (including as Table key); improve docs (#16062)Timothee Cour2021-03-311-5/+17
| | | | | * jsonutils: support cstring (including as Table key); improve docs * changelog * un-disable a test now that #16061 was fixed
* remove std/ prefix from doc/lib.rst now that canonical import is shown in ↵Timothee Cour2021-03-291-17/+10
| | | | | | | module docs (#17543) * remove std/ prefix from doc/lib.rst now that canonical import is shown in module docs * cleanup top docs for std/sha1
* Small doc improvements for `std/with` (#17556)konsumlamm2021-03-291-3/+4
|
* nnkArglist => nnkArgList + special case stylecheck:error (#17529)Timothee Cour2021-03-271-1/+1
| | | | | * nnkArglist => nnkArgList * special case stylecheck:error
* close #11330 sets uses optimized countSetBits (#17334)flywind2021-03-221-0/+17
| | | | | | | * Update lib/pure/bitops.nim * Update lib/system/sets.nim * Apply suggestions from code review Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* improve jsutils docs (#17421)Timothee Cour2021-03-211-10/+42
| | | | | * improve jsutils docs * address comments
* Use importjs (#17422)konsumlamm2021-03-191-2/+2
|
* follow up #17276 (#17355)flywind2021-03-191-2/+10
| | | | | | | | | | | | | * improve test coverage for isolation * a bit better * rename channels to channels_builtin * follow up #17276 * fix * Update lib/std/private/jsutils.nim
* fix a typo (#17417)flywind2021-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Revert "make system random work in VM" * fix #17380 * attempt to fix bug * fix * better * fix * a bit * fix the leaks * revert * fix * better * follow up #17391 * fix * Update tchannels.nim * Update tests/stdlib/tchannels.nim * Update tchannels.nim * fix a typo
* [std/channels]fix recv leaks(Part One) (#17394)flywind2021-03-171-23/+6
|
* fix #17383: json.%,to and jsonutils.formJson,toJson now works with ↵Timothee Cour2021-03-161-1/+3
| | | | | | | uint|uint64 (#17389) [backport:1.2] * fix #17383: json.%,to and jsonutils.formJson,toJson now works with uint|uint64 * fixup * fix for js
* fix #17380 (#17391)flywind2021-03-161-1/+2
|
* make std/sysrand better (#17360)flywind2021-03-151-19/+29
|
* clarify the behavior of newChan flywind2021-03-121-0/+4
| | | follow up the advice of `timothee`
* New channels implementation for ORC (#17305)flywind2021-03-121-0/+510
| | | | | | | * Update lib/std/channels.nim * Rename tchannel_pthread.nim to tchannels_pthread.nim * Rename tchannel_simple.nim to tchannels_simple.nim Co-authored-by: Mamy Ratsimbazafy <mamy_github@numforge.co>
* fix wrong examples (#17350)flywind2021-03-121-11/+6
| | | | | | | | | * fix wrong examples * Update lib/std/compilesettings.nim * Update lib/std/compilesettings.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* clarify the docs of isolation (#17335)flywind2021-03-111-1/+7
| | | | | | | * improve test coverage for isolation * a bit better * clarify the docs of isolation
* Use `.. warning::` (#17320)konsumlamm2021-03-103-3/+3
|
* add typetraits.OrdinalEnum, enumutils.symbolName (#17281)Timothee Cour2021-03-101-3/+25
|
* fix #17275 (#17276)flywind2021-03-091-0/+4
|
* add setutils.[]= (#17272)Timothee Cour2021-03-081-3/+17
| | | | | * add setutils.[]= * address comments * proc => func (for other symbols too)
* Add module jsfetch (#12531)Juan Carlos2021-03-063-0/+346
| | | | | | | | | | | | * Add module jsfetch for fetch support for JavaScript target https://developer.mozilla.org/docs/Web/API/Fetch_API * Update lib/std/jsheaders.nim * Update lib/std/jsformdata.nim * Update lib/std/jsfetch.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: flywind <xzsflywind@gmail.com>
* add warnings to std/isolation (#17270)flywind2021-03-051-0/+3
| | | | | | | | | | | * remove unnecessary when statement * remove outdated codes * reuse jsffi * move js json coverage * add warnings to std/isolation
* Add unsafeIsolate and extract to std/isolation [backport:1.4] (#17263)flywind2021-03-051-0/+8
|
* fix #17264 [backport:1.4] (#17266)flywind2021-03-051-1/+2
| | | | | * fix #17264 * fix vm * fix js and add tests
* follow up #17165 (#17262)flywind2021-03-041-0/+1
|
* Improve Bigint (#17252)Juan Carlos2021-03-041-0/+2
| | | | | | | | | | | | | * https://github.com/timotheecour/Nim/issues/566#issue-799927295 * Update lib/std/jsbigints.nim Co-authored-by: flywind <xzsflywind@gmail.com> * Update lib/std/jsbigints.nim Co-authored-by: flywind <xzsflywind@gmail.com> Co-authored-by: flywind <xzsflywind@gmail.com>
* rename prepareStrMutation to prepareMutation (#17235)flywind2021-03-031-1/+1
| | | | | | | * remove unnecessary when statement * remove outdated codes * rename prepareStrMutation to prepareMutation
* fixes #17173 (#17213)Andreas Rumpf2021-03-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | * fixes #17173 * add testcase (#17214) * Apply suggestions from code review * fix for newruntime * Apply suggestions from code review * Update lib/system.nim * Update lib/system.nim * Update lib/system.nim Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com> Co-authored-by: flywind <xzsflywind@gmail.com> Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>
* add overload `add(a: var string, b: openArray[char])` (#15951)Timothee Cour2021-03-011-0/+16
| | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Change stdlib imports to use std prefix in most examples (#17202)Danil Yarantsev2021-02-281-8/+8
|