summary refs log tree commit diff stats
path: root/lib/impure
Commit message (Collapse)AuthorAgeFilesLines
* complete std prefixes for stdlib (#22887)ringabout2023-10-304-8/+8
| | | | follow up https://github.com/nim-lang/Nim/pull/22851 follow up https://github.com/nim-lang/Nim/pull/22873
* fixes #22868; fixes `std/nre` leaks under ARC/ORC (#22872)ringabout2023-10-271-0/+2
| | | fixes #22868
* replace `doAssert false` with `raiseAssert` in lib, which works better with ↵ringabout2023-08-111-1/+1
| | | | strictdefs (#22458)
* allow destructors to accept non var parameters; deprecate `proc =destroy(x: ↵ringabout2023-06-211-4/+10
| | | | | | | | | | var T)` (#22130) * make destructors accept non var parameters * define nimAllowNonVarDestructor * add a test case and a changelog * update documentation and error messages * deprecate destructors taking 'var T'
* re and nre now link to regex and tinyre (#21161)ringabout2022-12-232-3/+9
|
* remove unused imports (#21126)ringabout2022-12-171-2/+0
|
* build the documentation of official packages (#20986)ringabout2022-12-064-2534/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remove db stuffs * remove punycode * remove * fixes script * add cloner * patches * disable * patch * fixes external packages * disable two packages * preview documentation build * try again * fixes URL * fixes a bug * simplify * fixes documentaion * fixes * Apply suggestions from code review
* Fix several memory leaks in the Postgres wrapper. (#20940)jfilby2022-11-271-11/+18
|
* fixes ptr to cstring warnings[backport] (#20848)ringabout2022-11-161-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix =#13790 ptr char (+friends) should not implicitly convert to cstring * Apply suggestions from code review * first round; compiles on windows * nimPreviewSlimSystem * conversion is unsafe, cast needed * fixes more tests * fixes asyncnet * another try another error * last one * true * one more * why bugs didn't show at once * add `nimPreviewCstringConversion` switch * typo * fixes ptr to cstring warnings[backport] * add fixes Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
* fix a few "broken link" warnings (#20837)Andrey Makarov2022-11-141-1/+1
|
* fixes #20526; use `nimPreviewSlimSystem` for documentation build (#20714)ringabout2022-11-011-0/+3
| | | | | | | * fixes #20526; use `nimPreviewSlimSystem` for `koch docs` * fixes documentation errors * fixes remaning issues
* removes channels_builtin when enabling `nimPreviewSlimSystem` (#20713)ringabout2022-10-311-0/+3
|
* Markdown code blocks migration part 7 (#20547)Andrey Makarov2022-10-123-263/+267
|
* refactor dbFormat (#19746)ringabout2022-09-293-34/+8
| | | | | * refactor dbFormat * add simple tests
* make more standard libraries work with `nimPreviewSlimSystem` (#20343)ringabout2022-09-273-0/+8
| | | | | | | | | | | | | | | | | | | | | | | * make more standard libraries work with `nimPreviewSlimSystem` * typo * part two * Delete specutils.nim * fixes more tests * more fixes * fixes tests * fixes three more tests * add formatfloat import * fix * last
* Implement Markdown definition lists (+ migration) (#20333)Andrey Makarov2022-09-111-14/+14
| | | | | | | | | | | | | | | Implements definition lists Markdown extension adopted in a few implementations including: * [Pandoc]( https://pandoc.org/MANUAL.html#definition-lists) * [kramdown]( https://kramdown.gettalong.org/quickref.html#definition-lists) * [PHP extra Markdown]( https://michelf.ca/projects/php-markdown/extra/#def-list) Also affected files have been migrated. RST definition lists are turned off for Markdown: this solves the problem of broken formatting mentioned in https://github.com/nim-lang/Nim/pull/20292.
* Implement Pandoc Markdown concise link extension (#20304)Andrey Makarov2022-09-043-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement Pandoc Markdown concise link extension This implements https://github.com/nim-lang/Nim/issues/20127. Besides reference to headings we also support doing references to Nim symbols inside Nim modules. Markdown: ``` Some heading ------------ Ref. [Some heading]. ``` Nim: ``` proc someFunction*() ... ... ## Ref. [someFunction] ``` This is substitution for RST syntax like `` `target`_ ``. All 3 syntax variants of extension from Pandoc Markdown are supported: `[target]`, `[target][]`, `[description][target]`. This PR also fixes clashes in existing files, particularly conflicts with RST footnote feature, which does not work with this PR (but there is a plan to adopt a popular [Markdown footnote extension](https://pandoc.org/MANUAL.html#footnotes) to make footnotes work). Also the PR fixes a bug that Markdown links did not work when `[...]` section had a line break. The implementation is straightforward since link resolution did not change w.r.t. RST implementation, it's almost only about new syntax addition. The only essential difference is a possibility to add a custom link description: form `[description][target]` which does not have an RST equivalent. * fix nim 1.0 gotcha
* Markdown code blocks part 6 (#20292)Andrey Makarov2022-08-311-37/+39
|
* make implicit cstring conversions explicit (#19488)ee72022-08-194-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Nim manual says that an implicit conversion to cstring will eventually not be allowed [1]: A Nim `string` is implicitly convertible to `cstring` for convenience. [...] Even though the conversion is implicit, it is not *safe*: The garbage collector does not consider a `cstring` to be a root and may collect the underlying memory. For this reason, the implicit conversion will be removed in future releases of the Nim compiler. Certain idioms like conversion of a `const` string to `cstring` are safe and will remain to be allowed. And from Nim 1.6.0, such a conversion triggers a warning [2]: A dangerous implicit conversion to `cstring` now triggers a `[CStringConv]` warning. This warning will become an error in future versions! Use an explicit conversion like `cstring(x)` in order to silence the warning. However, some files in this repo produced such a warning. For example, before this commit, compiling `parsejson.nim` would produce: /foo/Nim/lib/pure/parsejson.nim(221, 37) Warning: implicit conversion to 'cstring' from a non-const location: my.buf; this will become a compile time error in the future [CStringConv] /foo/Nim/lib/pure/parsejson.nim(231, 39) Warning: implicit conversion to 'cstring' from a non-const location: my.buf; this will become a compile time error in the future [CStringConv] This commit resolves the most visible `CStringConv` warnings, making the cstring conversions explicit. [1] https://github.com/nim-lang/Nim/blob/d2318d9ccfe6/doc/manual.md#cstring-type [2] https://github.com/nim-lang/Nim/blob/d2318d9ccfe6/changelogs/changelog_1_6_0.md#type-system
* fixes #20153; do not escape `_` for mysql [backport] (#20164)ringabout2022-08-051-2/+1
| | | | | | | | | | | * fixes #20153; do not escape `_` for mysql * add a test * Update db_mysql.nim * Update tdb_mysql.nim Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
* fix typo in nre.nim (#19915)flintforge2022-06-211-2/+1
| | | | | Update nre.nim typo in proc replace description
* Revert "fix db_sqlite.tryInsertID does raise exceptions in 1.6.0 #19743 ↵Andreas Rumpf2022-04-251-14/+11
| | | | | (#19744)" (#19745) This reverts commit b10f0e7bca43761316f6424786a771af33254e19.
* fix db_sqlite.tryInsertID does raise exceptions in 1.6.0 #19743 (#19744)flywind2022-04-241-11/+14
|
* enable style:usages for stdlib tests [backport: 1.6] (#19715)flywind2022-04-131-10/+10
| | | | | | | | | | | | | | | * enable style:usages for stdlib tests * freeAddrInfo * more tests * importc * bufSize * fix more * => parseSql and renderSql
* db_sqlite: added a spaceAraq2022-03-181-1/+1
|
* fix not flushing stdout in MSYS (#19590)Hamid Bluri2022-03-071-0/+1
| | | I did this pull request according to what xflywind said: https://github.com/nim-lang/Nim/pull/19584#issuecomment-1060085141
* stylecheck usages part two: stdlib cleanup (#19338)flywind2022-01-081-1/+1
| | | | | | | | | | | | | * stylecheck usages part two: stdlib cleanup typeinfo.nim: importCompilerProc => importcompilerproc nre.nim: newLineFlags => newlineFlags system.nim: JSRoot => JsRoot ref #19319 * prefer importCompilerProc
* fix bug #14468 zero-width split (#19248)Carlo Capocasa2021-12-131-4/+7
|
* libs/impore/re: Add note about the requirement of `matches` to be ↵Kaushal Modi2021-11-021-0/+34
| | | | | | | pre-allocated (#19081) Add few runnableExamples for `findBounds` for clarity. Fixes https://github.com/nim-lang/Nim/issues/18775
* fix a sqlite bug (#18669)flywind2021-08-121-11/+4
|
* [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
* fix comment (#18473)sivchari2021-07-111-6/+6
|
* simplify rdstdin (#18382)Timothee Cour2021-06-281-10/+4
|
* PCRE, nimgrep: add limit for buffer size (#18280)Andrey Makarov2021-06-171-3/+10
|
* fix #9437(fix `re.replace` wrong behaviour) (#17546)flywind2021-06-101-2/+18
| | | | | * fix nim js cmp fails at CT * fix
* Improve db_postgres iterators (#18144)Artem Klevtsov2021-06-031-62/+117
| | | | | | | | | | | | | | | * Fix pqSetSingleRowMode case. Add links to the docs * Add missing PGContextVisibility enum * Remove unused PGContextVisibility enum * Improve db_postgres iterators * Fix instantRows with DbColumns. Cosmetics. * Reduce copy&paste in db_postgres * Move pqclear inside loop
* [std/re] fix findBounds and find procs (#18028)flywind2021-05-311-2/+2
| | | | | | | * [std/re] make interface consistent * tiny * revert
* docs: make inline markup more compatible with Markdown (#18053)Andrey Makarov2021-05-211-1/+1
| | | fixes https://github.com/timotheecour/Nim/issues/739
* Revert "[std/re]fix terrible and strange interface" (#18027)flywind2021-05-161-6/+6
| | | This reverts commit c218f2ba0b8e27110087ea754c11cff123806a94.
* [std/re]fix terrible and strange interfaceflywind2021-05-161-6/+6
|
* Escape `%00` / `\0` in `dbQuote` (#18015) [backport:1.4]Thomas T. Jarløv2021-05-151-1/+3
| | | Fix https://github.com/nim-lang/Nim/issues/17925
* Fix `insert` calling wrong function (#17856)Fröhlich A2021-04-291-1/+1
| | | | The `insert` method is calling `tryInsertID`, which ignores the `pkName` parameter. Calling `tryInsert` instead should be correct.
* fix RST parsing when no indent after enum.item (fix #17249) (#17257)Andrey Makarov2021-03-121-1/+1
|
* use `-r:off` for runnableExamples that should compile but not run (#17203)Timothee Cour2021-03-011-9/+8
| | | | | * use -r:off for runnableExamples that should compile but not run * use -r:off in other RT disabled tests
* Change stdlib imports to use std prefix in most examples (#17202)Danil Yarantsev2021-02-286-12/+12
|
* use single backtick (#17133)flywind2021-02-211-6/+6
|
* use single backtick (#17115)flywind2021-02-202-153/+153
|
* use single backtick (#17100)flywind2021-02-184-27/+27
|
* remove all uses of condsyms symbols defined prior to bootstrap nim 0.20.0 ↵Timothee Cour2021-02-171-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#16918) * nimNoArrayToCstringConversion deadcode * nimbabel deadcode * nimHasalignOf deadcode * nimvarargstyped deadcode * nimhygiene deadcode * nimNewTypedesc deadcode * nimlocks deadcode * nimHasCppDefine deadcode * nimHasRunnableExamples deadcode * nimHasNilChecks deadcode * nimSymKind deadcode * minor macros refactoring * nimVmEqIdent deadcode * nimNoNil deadcode * nimNoZeroTerminator deadcode * nimHasSymOwnerInMacro deadcode * nimVmExportFixed deadcode * nimNewRuntime deadcode * nimAshr deadcode * nimUncheckedArrayTyp deadcode * nimHasTypeof deadcode * nimErrorProcCanHaveBody deadcode * nimHasHotCodeReloading deadcode * nimHasSignatureHashInMacro deadcode * nimHasDefault deadcode * nimMacrosSizealignof deadcode