summary refs log tree commit diff stats
path: root/changelog.md
Commit message (Collapse)AuthorAgeFilesLines
* deprecate `owner` from `std/macros` (#23828)ringabout2024-07-121-0/+2
|
* Replacement PR for https://github.com/nim-lang/Nim/pull/23779 that (#23793)c-blake2024-07-071-4/+7
| | | | | | | makes new hash the default, with an opt-out (& js-no-big-int) define. Also update changelog (& fix one typo). Only really expect the chronos hash-order sensitive test to fail until they merge that PR and tag a new release.
* Add Farm Hash conditioned upon `nimPreviewHashFarm` as 64-bit `Hash` (#23735)c-blake2024-06-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Unlike present Nim this actually fills `Hash` for `string` & related. For the curious, note that `hashData` remains the aboriginal Nim string hasher & `import hashes {.all.}` allows simultaneous test/time of {orig, murmur, farm} on your favorite CPU & back end compiler. Update tests also conditioned upon `nimPreviewHashFarm` so they should pass either with or without that `define` on. In `--jsbigint=on` mode, only the lower 32-bits of `Hash` match nimvm & run-time values because `type Hash = int` and on JS int=int32, not int64 as for 64-bit Nim platforms. Due to the matching, `const` Table should match run-time `Table` on all platforms. To operate in `--jsbigint=off` mode is feasible but needs much "double precision mul/xor/ror/shr-arithmetic"-style work. That is distracting & also of questionable value since JS added BigInt in 2018, ringabout added Nim support for it in 2021 & `nimPreviewHashFarm` is unlikely to swap from an opt-in to an opt-out default before 2025..2026 which will have given a backward looking time window of 7..8 years for deployment platforms - reasonably generous. Add a changelog entry for 2.2.
* implement `legacy:jsNoLambdaLifting` for compatibility (#23727)ringabout2024-06-171-0/+2
|
* provides a `$` function for `Path` (#23617)ringabout2024-05-171-0/+1
| | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes #4299 #12492 #10849; lambda lifting for JS backend (#23484)ringabout2024-04-111-0/+2
| | | | | | | | fixes #4299 fixes #12492 fixes #10849 It binds `function` with `env`: `function.bind(:env)` to ease codegen for now
* remove `internalNew` from system (#23475)ringabout2024-04-041-0/+1
|
* ORC: added -d:nimOrcStats switch and related API (#23272)Andreas Rumpf2024-02-211-2/+5
|
* Add `toSinglyLinkedRing` and `toDoublyLinkedRing` to `std/lists` (#22952)Eric N. Vander Weele2023-12-241-0/+1
| | | | Allow for conversion from `openArray`s, similar to `toSinglyLinkedList` and `toDoublyLinkedList`.
* add switch, warning, and `bind` support for new generic injection behavior ↵metagn2023-12-221-0/+35
| | | | | | | | | | | | | | | | | | | | | (#23102) refs #23091, especially post merge comments Unsure if `experimental` and `bind` are the perfect constructs to use but they seem to get the job done here. Symbol nodes do not get marked `nfOpenSym` if the `bind` statement is used for their symbol, and `nfOpenSym` nodes do not get replaced by new local symbols if the experimental switch is not enabled in the local context (meaning it also works with `push experimental`). However this incurs a warning as the fact that the node is marked `nfOpenSym` means we did not `bind` it, so we might want to do that or turn on the experimental switch if we didn't intend to bind it. The experimental switch name is arbitrary and could be changed. --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* add tuple unpacking changes to changelog (#23093)metagn2023-12-181-0/+19
| | | | | | closes #23042 Adds changes from #22537 and #22611 to changelog (I believe both are set for 2.2).
* enable vtable implementation for C++ and make it an experimental feature ↵ringabout2023-11-301-1/+1
| | | | | | | | | | | (#23004) follow up https://github.com/nim-lang/Nim/pull/22991 - [x] turning it into an experimental feature --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* rework the vtable implementation embedding the vtable array directly with ↵ringabout2023-11-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | new strictions on methods (#22991) **TODO** - [x] fixes changelog With the new option `nimPreviewVtables`, `methods` are confined in the same module where the type of the first parameter is defined - [x] make it opt in after CI checks its feasibility ## In the following-up PRs - [ ] in the following PRs, refactor code into a more efficient one - [ ] cpp needs special treatments since it cannot embed array in light of the preceding limits: ref https://github.com/nim-lang/Nim/pull/20977#discussion_r1035528927; we can support cpp backends with vtable implementations later on the comprise that uses indirect vtable access --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes #22286; enforce Non-var T destructors by `nimPreviewNonVarDestructor` ↵ringabout2023-11-251-0/+1
| | | | | | | | | | | | | | | | | | (#22975) fixes #22286 ref https://forum.nim-lang.org/t/10642 For backwards compatibilities, we might need to keep the changes under a preview compiler flag. Let's see how many packags it break. **TODO** in the following PRs - [ ] Turn the `var T` destructors warning into an error with `nimPreviewNonVarDestructor` --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* adds C++ features to change log (#22906)Juan M Gómez2023-11-031-0/+3
| | | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
* Fix #22862 - change the httpclient user-agent to be valid spec-wise (#22882)Yardanico2023-10-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per https://datatracker.ietf.org/doc/html/rfc9110#name-user-agent a User-Agent is defined as follows: ``` User-Agent = product *( RWS ( product / comment ) ) ``` Where ``` product = token ["/" product-version] product-version = token ``` In this case, `token` is defined in RFC 7230 - https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.6: ``` token = 1*tchar tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA ; any VCHAR, except delimiters ``` or, in the original RFC 2616 - https://datatracker.ietf.org/doc/html/rfc2616#section-2.2 (next page): ``` token = 1*<any CHAR except CTLs or separators> separators = "(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "\" | <"> | "/" | "[" | "]" | "?" | "=" | "{" | "}" | SP | HT ``` which means that a `token` cannot have whitespace. Not sure if this should be in the breaking changelog section - theoretically, some clients might've relied on the old Nim user-agent? For some extra info, some other languages seem to have adopted the same hyphen user agent to specify the language + module, e.g.: - https://github.com/python/cpython/blob/main/Lib/urllib/request.py#L1679 (`Python-urllib/<version>`) Fixes #22862.
* deprecate htmlparser (#22870)ringabout2023-10-261-0/+1
| | | | | | | | | ref https://github.com/nim-lang/Nim/pull/22848 see also https://github.com/nim-lang/htmlparser will build the documentation later when everything else is settled --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes #22856; enables `-d:nimStrictDelete` (#22858)ringabout2023-10-241-0/+1
| | | | | | | | fixes #22856 `-d:nimStrictDelete` is introduced in 1.6.0, which promised to be enabled in the coming versions. To keep backwards incompatibilities, it also extends the feature of `-d:nimAuditDelete`, which now mimics the old behaviors.
* marking a field with noInit allows to skip constructor initialiser (#22802)Juan M Gómez2023-10-081-1/+1
| | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* copyFile with POSIX_FADV_SEQUENTIAL (#22776)Juan Carlos2023-10-011-0/+1
| | | | | | | | | | | - Continuation of https://github.com/nim-lang/Nim/pull/22769 - See https://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_fadvise.html - The code was already there in `std/posix` since years ago. 3 line diff. --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* copyFile with bufferSize instead of hardcoded value (#22769)Juan Carlos2023-09-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - `copyFile` allows to specify `bufferSize` instead of hardcoded wrong value. Tiny diff. # Performance - 1200% Performance improvement. # Check it yourself Execute: ```bash for i in $(seq 0 10); do bs=$((1024*2**$i)) printf "%7s Kb\t" $bs timeout --foreground -sINT 2 dd bs=$bs if=/dev/zero of=/dev/null 2>&1 | sed -n 's/.* \([0-9.,]* [GM]B\/s\)/\1/p' done ``` (This script can be ported to PowerShell for Windows I guess, it works in Windows MinGW Bash anyways). # Stats - Hardcoded `8192` or `8000` Kb bufferSize gives `5` GB/s. - Setting `262144` Kb bufferSize gives `65` GB/s (script suggestion). --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* deprecates `newSeqUninitialized` replaced by `newSeqUninit` (#22739)ringabout2023-09-291-0/+1
| | | | | | | ref #19727 closes #22586 https://github.com/nim-lang/Nim/issues/22554 needs it to move on. `newSeqUnsafe` can be introduced later.
* fixes #22763; nimcache in nim.cfg uses the relative path to the config file ↵ringabout2023-09-281-0/+1
| | | | | (#22764) fixes #22763
* ref #19727; implement `setLenUninit` for seqsv2 (#22767)ringabout2023-09-281-0/+2
| | | ref #19727
* Fix #21407 (#22759)Juan Carlos2023-09-281-0/+1
| | | | | | | - Fix #21407 --------- Co-authored-by: Amjad Ben Hedhili <amjadhedhili@outlook.com>
* Add `hasDefaultValue` type trait (#22636)Amjad Ben Hedhili2023-09-041-1/+2
| | | Needed for #21842.
* fixes #22555; implements `newStringUninit` (#22572)ringabout2023-08-291-0/+2
| | | | | | | | | | | | | * fixes newStringUninitialized; implement `newStringUninitialized` * add a simple test case * adds a changelog * Update lib/system.nim * Apply suggestions from code review rename to newStringUninit
* follow up #22322; fixes changelog (#22381)ringabout2023-08-041-2/+2
|
* fixes changelog (#21590)ringabout2023-03-311-1/+0
|
* This adds `parseutils.parseSize`, an inverse to `strutils.formatSize` (#21349)c-blake2023-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * This adds `parseutils.parseSize`, an inverse to `strutils.formatSize` which has existed since 2017. It is useful for parsing the compiler's own output logs (like SuccessX) or many other scenarios where "human readable" units have been chosen. The doc comment and tests explain accepted syntax in detail. Big units lead to small numbers, often with a fractional part, but we parse into an `int64` since that is what `formatSize` stringifies and this is an inverse over partial function slots. Although metric prefixes z & y for zettabyte & yottabyte are accepted, these will saturate the result at `int64.high` unless the qualified number is a small fraction. This should not be much of a problem until such sizes are common (at which point another overload with the parse result either `float64` or `int128` could be added). Tests avoids `test()` because of a weakly related static: test() failure as mentioned in https://github.com/nim-lang/Nim/pull/21325. This is a more elemental VM failure. As such, it needs its own failure exhibition issue that is a smaller test case. (I am working on that, but unless there is a burning need to `parseSize` at compile-time before run-time it need not hold up this PR.) * This worked with `int` but fails with `int64`. Try for green tests. * Lift 2-result matching into a `checkParseSize` template and format as a table of input & 2 expected outputs which seems nicer and to address https://github.com/nim-lang/Nim/pull/21349#pullrequestreview-1294407679 * Fix (probably) the i386 trouble by using `int64` consistently. * Improve documentation by mentioning saturation. * Improve documentation with `runnableExamples` and a little more detail in the main doc comment based on excellent code review by @juancarlospaco: https://github.com/nim-lang/Nim/pull/21349#pullrequestreview-1294564155 * Address some more @juancarlospaco code review concerns. * Remove a stray space. * Mention milli-bytes in docs to maybe help clarify why wild conventions are so prone to going case-insensitive-metric. * Add some parens.
* add 2.0 changelog (#21107)ringabout2022-12-171-293/+3
| | | [backport: 2.0] add v2.0 changelog
* fix #19580; add warning for bare except: clause (#21099)ringabout2022-12-151-0/+2
| | | | | | | | | | | | | | | | | | | | | * fix #19580; add warning for bare except: clause * fixes some easy ones * Update doc/manual.md * fixes docs * Update changelog.md * addition * Apply suggestions from code review Co-authored-by: Jacek Sieka <arnetheduck@gmail.com> * Update doc/tut2.md Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>
* generic `define` pragma + string alias (#20979)metagn2022-12-131-3/+27
| | | | | | | | | * generic `define` pragma + string alias * clean * add tests and document * remove char/float, minimize changelog
* add a changelog for nimble (#21078)ringabout2022-12-121-3/+1
|
* Remove deprecated rightSize (#21011)Juan Carlos2022-12-081-0/+2
| | | | | * Remove deprecated rightSize nop * Remove deprecated rightSize nop
* add a changelog for `std/cmdline` (#21039)ringabout2022-12-081-0/+1
| | | for a changelog for `std/cmdline`
* build the documentation of official packages (#20986)ringabout2022-12-061-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Named arguments in commands + many grammar fixes (#20994)metagn2022-12-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Breaking parser changes, implement https://github.com/nim-lang/RFCs/issues/442 Types are separated from expressions and better reflected in the grammar. * add test * more accurate grammar * fix keyword typedescs * accept expressions in proc argument lists * CI "fixes" * fixes * allow full ref expressions again, adapt old tests * cleanup, fix some tests * improve grammar, try and revert semtypes change * restrict sigil binding to identOrLiteral * fix, should have caught this immediately * add changelog entry, fix double not nil bug * correct grammar * change section * fix * real fix hopefully * fix test * support LL(1) for tuples * make grammar.txt too
* deprecate `do:` meaning `do ():` + misc cleanup (#20927)metagn2022-12-061-6/+9
| | | | | | | | | | | | | | | | | * test disable do: block lambda lifting * fix last test [skip ci] * deprecate `do:` meaning `do ():` + misc cleanup closes https://github.com/nim-lang/RFCs/issues/486 * oops * fix * no idea what could be causing nimsuggest failure other than this * ensure ci works
* Remove deprecated posix.CLONE_STOPPED (#21012)Juan Carlos2022-12-051-0/+3
| | | | | * Remove deprecated CLONE_STOPPED * Remove deprecated CLONE_STOPPED
* move `smtp` to nimble packages (#20953)ringabout2022-11-301-1/+0
| | | | | | | | | * move `smtp` to nimble packages * fixes * install smtp * yes
* Improve jsformdata (#20929)Juan Carlos2022-11-281-0/+2
| | | | | * jsformdata now accepts Blob data type similar to JS * jsformdata now accepts Blob data type similar to JS
* fix #13790; ptr char (+friends) should not implicitly convert to cstring ↵ringabout2022-11-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#20761) * 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 Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
* An unnamed break in a block now gives an `UnnamedBreak` warning (#20901)ringabout2022-11-241-0/+2
| | | | | | | | | | | | | | | | | | | | | * unnamed break in the block now gives an error * bootstrap * fixes * more fixes * break with label * label again * one moee * Delete test5.txt * it now gives a UnnamedBreak warning * change the URL of bump back to the original one
* move `system/atomics` out of system; `std/atomics` should be preferred (#20875)ringabout2022-11-221-0/+1
| | | | | | | | | | | | | * move `system/atomics` out of system; `std/atomics` should be preferred * add deprecation message * fixes * fixes * fixes * fixes more tests
* rename `std/threads` to `std/typedthreads` (#20850)ringabout2022-11-161-1/+1
| | | | | | | | | * rename `std/threads` to `std/oldthreads` * fixes tests * rename to `typedthreads` * changelog
* add documentation and changelog for default object fields (#20845)ringabout2022-11-151-0/+2
|
* Allow users to set log flushing rules (#20817)Matt Haggard2022-11-141-0/+3
| | | | | | | | | | | * Add flushThreshold to std/logging loggers * Remove duplicate field * Add -d:nimFlushAllLogs for changing default flush behavior globally * Add changelog entry for log flushing change * Flush all log levels by default in Nim v2
* issue a warning for ptr to cstring conversion[backport] (#20814)ringabout2022-11-111-0/+4
| | | | | * issue a warning for ptr to cstring conversion[backport] * add a changelog
* Use same defaults as JS for fetch options (#20783)Jake Leahy2022-11-091-1/+1
| | | | | * Use same defaults as JS for fetch options * Add changelog entry