summary refs log tree commit diff stats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Make `newStringUninit` available on the js backend [backport] (#22743)Amjad Ben Hedhili2023-09-231-0/+3
|
* fixes #22519; DocGen does not work for std/times on JS backend (#22738)ringabout2023-09-221-3/+3
| | | fixes #22519
* moves `addUnique` to `std/sequtils` (#22734)Juan M Gómez2023-09-211-0/+28
| | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes #22687; js backend - std/bitops/bitsliced throws compile error … ↵ringabout2023-09-211-1/+1
| | | | | | | (#22722) …in typeMasked fixes #22687
* items, pairs and friends now use `unCheckedInc` (#22729)ringabout2023-09-201-26/+31
| | | | | | | | | | | | `{.push overflowChecks: off.}` works in backends. Though it could be implemented as a magic function. By inspecting the generated C code, the overflow check is eliminated in the debug or release mode. ![image](https://github.com/nim-lang/Nim/assets/43030857/49c3dbf4-675e-414a-b972-b91cf218c9f8) Likewise, the index checking is probably not needed.
* make parseEnum skip type aliases for enum type sym (#22727)metagn2023-09-191-1/+2
| | | fixes #22726
* Fix `capacity` for const and shallow [backport] (#22705)Amjad Ben Hedhili2023-09-184-8/+8
|
* Add descriptions and examples for `rawProc` and `rawEnv` (#22710)sls10052023-09-181-1/+31
| | | | | | | | | | Add descriptions for `rawProc` and `rawEnv`. See <https://forum.nim-lang.org/t/10485> for more informations. --------- Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com> Co-authored-by: Juan Carlos <juancarlospaco@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Update osfiles.nim, make `moveFile` consider permission on *nix (#22719)litlighilit2023-09-181-1/+1
| | | see https://github.com/nim-lang/Nim/issues/22674
* fixes incorrect cint overflow in system (#22718)ringabout2023-09-182-2/+2
| | | fixes #22700
* followup of #22568 (#22690)Amjad Ben Hedhili2023-09-141-24/+17
|
* Make capacity work with refc [backport] (#22697)Amjad Ben Hedhili2023-09-133-11/+26
| | | followup of #19771.
* Remove some unnecessary initialization in `seq` operations (#22677)Amjad Ben Hedhili2023-09-101-7/+35
| | | | | | | | | | | | * `PrepareSeqAdd` * `add` * `setLen` * `grow` Merge after #21842. --------- Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* Make `newSeqOfCap` not initialize memory. (#21842)Amjad Ben Hedhili2023-09-093-3/+12
| | | | | | | It's used in `newSeqUninitialized`. --------- Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* fixes #22664; guard against potential seqs self assignments (#22671)ringabout2023-09-081-0/+6
| | | fixes #22664
* Remove some unnecessary initialization in string operations (#22579)Amjad Ben Hedhili2023-09-071-37/+61
| | | | | | | | * `prepareAdd` * `toNimStr` * `setLengthStrV2` * `NimAsgnStrV2` * `prepareMutation` * Some cleanups
* Add `hasDefaultValue` type trait (#22636)Amjad Ben Hedhili2023-09-041-0/+17
| | | Needed for #21842.
* docgen: add Pandoc footnotes (fixes #21080) (#22591)Andrey Makarov2023-09-031-85/+136
| | | | | | | | | | This implements Pandoc Markdown-style footnotes, that are compatible with Pandoc referencing syntax: Ref. [^ftn]. [^ftn]: Block. See https://pandoc.org/MANUAL.html#footnotes for more examples.
* deprecate `std/threadpool`; use `malebolgia`, `weave`, `nim-taskpool` ↵ringabout2023-08-291-0/+2
| | | | | | | | | | | instead (#22576) * deprecate `std/threadpool`; use `malebolgia` instead * Apply suggestions from code review * Apply suggestions from code review * change the URL of inim
* fixes #22555; implements `newStringUninit` (#22572)ringabout2023-08-291-22/+36
| | | | | | | | | | | | | * fixes newStringUninitialized; implement `newStringUninitialized` * add a simple test case * adds a changelog * Update lib/system.nim * Apply suggestions from code review rename to newStringUninit
* fixes broken nightlies; follow up #22544 (#22585)ringabout2023-08-291-1/+1
| | | | | ref https://github.com/nim-lang/nightlies/actions/runs/5970369118/job/16197865657 > /home/runner/work/nightlies/nightlies/nim/lib/pure/os.nim(678, 30) Error: getApplOpenBsd() can raise an unlisted exception: ref OSError
* define toList procs after add for lists [backport] (#22573)metagn2023-08-281-22/+22
| | | fixes #22543
* newStringOfCap now won't initialize all elements anymore (#22568)ringabout2023-08-281-2/+3
| | | newStringOfCap nows won't initialize all elements anymore
* Add `cursor` to lists iterator variables (#22531)Amjad Ben Hedhili2023-08-241-3/+3
| | | * followup #21507
* Fix `getAppFilename` exception handling (#22544)Jacek Sieka2023-08-241-5/+10
| | | | | | | | | * Fix `getAppFilename` exception handling avoid platform-dependendent error handling strategies * more fixes * space
* fixes #22541; peg matchLen can raise an unlisted exception: Exception (#22545)ringabout2023-08-241-1/+1
| | | The `mopProc` is a recursive function.
* make jsffi properly gensym (#22539)metagn2023-08-231-22/+29
| | | fixes #21208
* allow tuples and procs in 'toTask' + minor things (#22530)Andreas Rumpf2023-08-222-3/+3
|
* Markdown code blocks migration part 9 (#22506)Amjad Ben Hedhili2023-08-194-89/+89
| | | | | * Markdown code blocks migration part 9 * fix [skip ci]
* Add staticFileExists and staticDirExists (#22278)Tomohiro2023-08-181-0/+13
|
* fixes syncio document (#22498)Nan Xiao2023-08-171-2/+2
|
* Fix `seq.capacity` (#22488)Amjad Ben Hedhili2023-08-171-2/+2
|
* fixes #22481; fixes `card` undefined misalignment behavior (#22484)ringabout2023-08-151-1/+3
| | | | | | | | | * fixes `card` undefined misalignment behavior * Update lib/system/sets.nim --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Markdown code blocks migration part 8 (#22478)Andrey Makarov2023-08-1542-611/+708
|
* Add Linux constant SO_BINDTODEVICE (#22468)Emery Hemingway2023-08-142-0/+2
|
* fixes CI (#22471)ringabout2023-08-143-4/+4
| | | | | Revert "fixes bareExcept warnings; catch specific exceptions (#21119)" This reverts commit 9207d77848d6f5db3635ae64f3cd4972cdbe3296.
* fixes syncio document (#22467)Nan Xiao2023-08-141-2/+2
|
* fixes bareExcept warnings; catch specific exceptions (#21119)ringabout2023-08-133-4/+4
| | | | | * fixes bareExcept warnings; catch specific exceptions * Update lib/pure/coro.nim
* replace `doAssert false` with `raiseAssert` in lib, which works better with ↵ringabout2023-08-1121-33/+33
| | | | strictdefs (#22458)
* clean up `gc:arc` or `gc:orc` in docs and in error messages (#22408)ringabout2023-08-085-13/+13
| | | | | * clean up gc:arc/orc in docs * in error messages
* fixes #22387; Undefined behavior when with hash(...) (#22404)ringabout2023-08-081-6/+14
| | | | | | | * fixes #22387; Undefined behavior when with hash(...) * fixes vm * fixes nimscript
* nimIoselector option (#22395)Bung2023-08-071-1/+12
| | | | | | | | | * selectors.nim: Add define to select event loop implementation * rename to nimIoselector --------- Co-authored-by: Jan Pobrislo <ccx@webprojekty.cz>
* use strictdefs for compiler (#22365)ringabout2023-08-067-10/+14
| | | | | | | | | | | | | | | * wip; use strictdefs for compiler * checkpoint * complete the chores * more fixes * first phase cleanup * Update compiler/bitsets.nim * cleanup
* Prevent early destruction of gFuns, fixes AddressSanitizer: ↵norrath-hero-cn2023-08-051-1/+1
| | | | | heap-use-after-free (#22386) Prevent destruction of gFuns before callClosures
* Revert adding generic `V: Ordinal` parameter to `succ`, `pred`, `inc`, `dec` ↵konsumlamm2023-08-064-16/+16
| | | | | | | (#22328) * Use `int` in `digitsutils`, `dragonbox`, `schubfach` * Fix error message
* Fix searchExtPos so that it returns -1 when the path is not a file ext (#22245)Tomohiro2023-08-041-4/+17
| | | | | | | * Fix searchExtPos so that it returns -1 when the path is not a file ext * fix comparision expression * Remove splitDrive from searchExtPos
* fixes AddressSanitizer: global-buffer-overflow in getAppFilename on windows ↵norrath-hero-cn2023-08-041-2/+2
| | | | | 10 (#22380) fixes AddressSanitizer: global-buffer-overflow
* Make `repr(HSlice)` always available (#22332)konsumlamm2023-08-042-10/+10
| | | Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* fixes #22360; compare with the half of randMax (#22361)ringabout2023-08-021-4/+1
| | | | | * fixes #22360; compare with the half of randMax * add a test
* Fix the position of "Grey" in colors.nim (#22358)Michal Maršálek2023-08-011-2/+2
| | | Update the position of "Grey"