summary refs log tree commit diff stats
path: root/lib/std
Commit message (Collapse)AuthorAgeFilesLines
* `addQuitProc` now works with closures, and c, js(node/browser) backend; fix ↵Timothee Cour2020-06-161-0/+65
| | | | | | | | | | | | | | | some bugs in testament (#14342) * make addQuitProc great again * fix bugs in testament * fix test * change 2016 => 2020 * addQuitProc => addExitProc + locks * move to std/exitprocs
* make `fromJson/toJson` work with `array[range, typ]`, + 1 bugfix (#14669)Timothee Cour2020-06-151-8/+24
| | | | | * make toJson more robust * properly handle array
* Make the example better describe the desired outcome (#14611)Max Grender-Jones2020-06-081-5/+5
|
* optimized wrapWords; fixes #14579 (#14606) [backport:1.2]Andreas Rumpf2020-06-081-25/+48
|
* `toJson`, `jsonTo`, json (de)serialization for custom types; remove ↵Timothee Cour2020-06-081-0/+126
| | | | | | | | | | | | | | | | | | | | | dependency on strtabs thanks to a hooking mechanism (#14563) * json custom serialization; application for strtabs * serialize using nesting * make toJson more feature complete * add since * Revert "Improve JSON serialisation of strtabs (#14549)" This reverts commit 7cb4ef26addb3bb5ce2405d8396df6fd41664dae. * better approach via mixin * toJson, jsonTo * fix test * address comments * move to jsonutils * doc * cleanups * also test for js * also test for vm
* fix https://github.com/timotheecour/Nim/issues/266 retry on failure to avoid ↵Timothee Cour2020-06-021-0/+32
| | | | common 503 github errors (#14547)
* walkDirRecFilter, update doc CI filter, compiler/index.nim for docs + ↵Timothee Cour2020-06-011-0/+54
| | | | | | | | | | | various other fixes (#14501) * update doc CI filter to include the files mostly likely to require doc rebuild * remove code duplication in ./config/nimdoc.cfg; show link to compiler docs, various fixes * walkDirRecFilter, factor nativeToUnixPath workaround * glob for getRst2html * docslocal: 40s to build all docs * revert code dedup in github actions which did not work alas... * fixups
* fix CI doc windows: style error in lib/std/time_t.nim (#14523)Timothee Cour2020-05-311-2/+2
|
* `nim doc --backend:js`, `nim doc --doccmd:-d:foo`, `nim r --backend:js`, ↵Timothee Cour2020-05-111-0/+2
| | | | | | | | | | `--doccmd:skip` + other improvements (#14278) * `nim doc --backend:js|cpp...` `nim doc --doccmd:'-d:foo --threads:on'` `nim r --backend:cpp...` (implies --run --usenimcache) * --usenimcache works with all targets * --docCmd:skip now skips compiling snippets; 50X speedup for doc/manual.rst
* fix js stacktraces, unify all file,line,col formatting into a single ↵Timothee Cour2020-05-051-0/+15
| | | | | function (#14230) * fix https://github.com/timotheecour/Nim/issues/135 ; unify all file,line,col formatting into a single function
* move since from inclrtl to std/private/since (#14188)hlaaftana2020-05-021-0/+19
| | | | * move since from inclrtl to std/private/since * move since import in system below for HCR
* Error -> Defect for defects (#13908)Jacek Sieka2020-04-281-1/+1
| | | | | | | | | | | | | | * Error -> Defect for defects The distinction between Error and Defect is subjective, context-dependent and somewhat arbitrary, so when looking at an exception, it's hard to guess what it is - this happens often when looking at a `raises` list _without_ opening the corresponding definition and digging through layers of inheritance. With the help of a little consistency in naming, it's at least possible to start disentangling the two error types and the standard lib can set a good example here.
* Make unused code into actual test, replace echo with doassert (#13952)Juan Carlos2020-04-111-33/+0
|
* std/byaddr => std/decls (#13847)Timothee Cour2020-04-031-0/+0
|
* renamed new std/pragmas.nim to std/byaddr.nim (#13844)Andreas Rumpf2020-04-021-5/+5
| | | | | * renamed new std/pragmas.nim to std/byaddr.nim * minor code cleanup
* DrNim (Nim compiler with Z3 integration) (#13743)Andreas Rumpf2020-03-311-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | * code cleanups and feature additions * added basic test and koch/CI integration * make it build on Unix * DrNim: now buildable on Unix, only takes 10 minutes, enjoy * added basic documentation for DrNim which can also be seen as the RFC we're following * drnim: change the build setup so that drnim.exe ends up in bin/ * makes simple floating point ranges work * added basic float range check * drnim: teach Z3 about Nim's range types plus code refactoring * drnim: make unsigned numbers work * added and fixed index checking under setLen * first implementation of .ensures, .invariant and .assume (.requires still missing and so is proc type compatibility checking * drnim: .requires checking implemented * drnim: implemented .ensures properly * more impressive test involving min() * drnim: check for proc type compatibility and base method compatibility wrt .requires and .ensures * testament: support for 'pattern <directory> * koch: uses new <directory> feature of testament * drnim: added tiny musings about 'old' * Make testament work with old SSL versions * koch: add support for 'koch drnim -d:release' * drnim: preparations for the param.old notation
* Add Documentation (#13811)Juan Carlos2020-03-312-1/+11
| | | | * Add more Docs and runnableExamples
* stacktraces can now show custom runtime msgs per frame (#13351)Timothee Cour2020-03-301-0/+30
| | | | | | | | * stacktraces can now show custom runtime msgs * improve tests/stdlib/tstackframes.nim * fix test for --gc:arc * test --stacktraceMsgs:on and --stacktraceMsgs:off * --stacktracemsgs:off by default
* new syntax for lvalue references: `var b {.byaddr.} = expr` (#13508)Timothee Cour2020-03-231-0/+19
| | | | | | | | * new syntax for lvalue references: `var b {.byaddr.} = expr` * on type mismatch, `???(0, 0)` not shown anymore * * compiler now lowers `var a: {.foo.}: MyType = expr` to foo(a, MyType, expr) * new pragmas.byaddr defined in pure library code exploiting this lowering * skip `template foo() {.pragma.}`
* fixes a bug for 'dup' and 'with'; they can now handle nested statement lists ↵Araq2020-03-172-17/+21
| | | | that can result from macros
* std/compilesettings implementation (#13584)Andreas Rumpf2020-03-041-0/+54
| | | | | | | | * Implement compileSetting() and compileSettingSeq() * Change from magic to vmop * better design for querySetting Co-authored-by: genotrance <dev@genotrance.com>
* added operateOn to sugar.nim to give Nim the chaining mechanism it de… ↵Andreas Rumpf2020-02-262-0/+96
| | | | | | | | (#13092) * implemented the with stdlib module as specified in https://github.com/nim-lang/RFCs/issues/193 * change sugar.outplace to sugar.dup according to https://github.com/nim-lang/RFCs/issues/193 * changelog update
* make monotimes have zero overhead if you don't use it (#13338) [backport]Andreas Rumpf2020-02-061-10/+6
|
* maybe: allows optional chaining of field access and indexing when LHS i snil ↵Timothee Cour2020-01-181-0/+109
| | | | | | | | | (#13023) * maybe: allows optional chaining * fix tools/kochdocs.nim * improve semantics to distinguish valid from invalid values * for now, wrapnil, isValid, unwrap are not exported
* style fix: change 'JS' to 'js' to make it consistent (#13168)Miran2020-01-161-2/+2
|
* remove deprecated procs (#12535)Andreas Rumpf2019-11-051-0/+10
|
* fix conversions to uint in varints.nim (#12564)Arne Döring2019-11-041-22/+22
|
* Fix many broken links and prefer relative links within docs (#12463)Miran2019-10-241-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix many broken links Note that contrary to what docgen.rst currently says, the ids have to match exactly or else most web browsers will not jump to the intended symbol. * Prefer relative links for Nim documentation This is more friendly to those browsing the documentation without a network connection. The nim-doc package in Debian allows this, for example. Also, the domain name being used was not consistent. It could have been either nim-lang.org or nim-lang.github.io, and those reading the stable docs could have found themselves suddenly reading the devel docs instead. * koch.rst: remove link to nonexistent section * manual.rst: remove unintended link cast[T](0) is interpreted as a link to id 0 with text T, so escape the opening parentheses to display the intended output. * asyncstreams: replace unintended link with emphasis * Fix word wrapping
| * Fix many broken linksJjp1372019-10-221-3/+3
| | | | | | | | | | | | Note that contrary to what docgen.rst currently says, the ids have to match exactly or else most web browsers will not jump to the intended symbol.
* | Fix JS bug in std/monotimes (#12499) [backport]Oscar Nihlgård2019-10-241-1/+2
|/
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-1/+1
|
* last stdlib cleanupsAraq2019-09-211-1/+3
|
* [feature] Added std/monotimesOscar Nihlgård2019-07-121-0/+173
|
* there is only one style -- my styleAraq2019-07-101-58/+58
|
* make editdistance work with --styleCheck:errorAraq2019-07-101-108/+108
|
* Make public additional types from sha1 module [feature] (#11694)Ivan Bobev2019-07-101-2/+2
| | | | | | | | | | * Make public additional types from sha1 module After making public newSha1State, update and finalize methods from the sha1 module was forgotten to be made public Sha1Digest and Sha1State types used by the new public methods. * Update changelog.md with sha1 module changes
* Make public some sha1 module procedures (#11655) [feature]Ivan Bobev2019-07-041-3/+3
| | | | | Make "newSha1State", "update" and "finalize" procedures from the sha1 module public in order to be possible to compute single sha1 hash of multiple separate blocks of data.
* Make `secureHash` accept any `openArray[char]`, not only `string`. (#10988)c-blake2019-04-101-1/+1
| | | | | | * Make `secureHash` accept any `openArray[char]`, not only `string`. * Put in a changelog entry as per Araq request.
* Add summation algorithms (#9284)b3liever2019-02-131-0/+78
|
* better docs: sha1 (#10374)Thomas T. Jarløv2019-01-191-1/+64
|
* Revert export of times.CTime; add std/time_t instead. (#10319)Oscar Nihlgård2019-01-161-0/+23
| | | | | * Revert export of times.CTime * Add std/time_t
* Add Example code to Documentation comment of wordWrap proc. (#10146)jiro2019-01-011-0/+5
|
* move diff.nim to experimentalAraq2018-12-121-387/+0
|
* diff.nim: massive code cleanupsAraq2018-12-121-166/+90
|
* added lib/std/diff.nimArne Döring2018-12-071-0/+463
|
* add new stdlib modules to the changelogAraq2018-11-082-0/+297
|
* better implementation for wrapWordsAraq2018-11-081-61/+82
|
* fill regionArne Döring2018-11-081-2/+4
|
* add doc stringArne Döring2018-11-081-0/+4
|
* wordwrap stuffArne Döring2018-11-081-86/+23
|