| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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
`-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.
|
|
|
| |
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
|
|
|
|
| |
- 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` 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>
|
|
|
|
|
|
|
| |
ref #19727
closes #22586
https://github.com/nim-lang/Nim/issues/22554 needs it to move on.
`newSeqUnsafe` can be introduced later.
|
|
|
|
|
| |
(#22764)
fixes #22763
|
|
|
| |
ref #19727
|
|
|
|
|
|
|
| |
- Fix #21407
---------
Co-authored-by: Amjad Ben Hedhili <amjadhedhili@outlook.com>
|
|
|
| |
Needed for #21842.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fixes newStringUninitialized; implement `newStringUninitialized`
* add a simple test case
* adds a changelog
* Update lib/system.nim
* Apply suggestions from code review
rename to newStringUninit
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
| |
[backport: 2.0] add v2.0 changelog
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
* clean
* add tests and document
* remove char/float, minimize changelog
|
| |
|
|
|
|
|
| |
* Remove deprecated rightSize nop
* Remove deprecated rightSize nop
|
|
|
| |
for a changelog for `std/cmdline`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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 CLONE_STOPPED
* Remove deprecated CLONE_STOPPED
|
|
|
|
|
|
|
|
|
| |
* move `smtp` to nimble packages
* fixes
* install smtp
* yes
|
|
|
|
|
| |
* jsformdata now accepts Blob data type similar to JS
* jsformdata now accepts Blob data type similar to JS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
* add deprecation message
* fixes
* fixes
* fixes
* fixes more tests
|
|
|
|
|
|
|
|
|
| |
* rename `std/threads` to `std/oldthreads`
* fixes tests
* rename to `typedthreads`
* changelog
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* 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]
* add a changelog
|
|
|
|
|
| |
* Use same defaults as JS for fetch options
* Add changelog entry
|
|
|
|
|
| |
* Export Uri.isIpv6
* Export Uri.isIpv6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Improve dollar
* Improve dollar
* Simplify, remove 1 if in for loop
* ci
* Update lib/pure/net.nim
* Update lib/pure/net.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Improve dollar for uri
* Refactor
* .
* .
* verde
* optimize
* https://github.com/nim-lang/Nim/pull/20672#issuecomment-1295440246 [skip ci]
* https://github.com/nim-lang/Nim/pull/20670#issuecomment-1295937393
* ci
* Update lib/pure/uri.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* put `std/threads` under the umbrella of `nimPreviewSlimSystem`
* add changelog
* fixes tests
* fixes tests again
* fixes tests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Revert "Add OpenSSL 3 support (#19814)"
This reverts commit 2dcfd732609a2cfa805e5a94cc105399a2f18632.
* openssl 3 support no longer opt in + some 1.0 support
* hopefully fix
* maybe fix
* final attempt
* actual fix hopefully
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added openarray[char] overloads to std/unicode
Call substr instead of index slice inside unicode
Added substr overload for openarray for parity with string functionality
Made style checker happies and fixed overloads for substr
* Added update to changelog [skip ci]
* Inline unicode string operations
* Moved substr overload to unicode
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added 'openarray[char]' overloads to 'std/parseutils'
* Removed redundant `start` and `last` params from slice using procs
* Fixed type for parseIdent overload
* fixed one by off with 'substr'
* removed missed start parameters for procedures
* Added 'openarray[char]' overloads to 'std/parseutils'
* Removed redundant `start` and `last` params from slice using procs
* Fixed type for parseIdent overload
* fixed one by off with 'substr'
* removed missed start parameters for procedures
* Fixed VM op to work with new 'opcSlice'
* Corrected captureBetween's logic to work with openarray
* js sys's parsefloat logic now uses openarray
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Improve `encodeMime` signature
* `string` to `openArray[char or byte]`
* `safe` parameter
* Fix
* Revert "Fix"
This reverts commit a394c505c2ab751621c24fd29b17e97c01251c1f.
* Remove encodeMime's openArray overload
* Document the `safe` parameter
* Add changelog entry
|
|
|
|
|
| |
* implemented strictCaseObjects
* changelog update
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* enable stricteffects
* add gcsafe
* fix tests
* use func
* fixes pegs tests
* explicitly mark repr related procs with noSideEffect
* add nimLegacyEffects
* change URL
* fixes docopt
* add `raises: []` to repr
* fixes weave
* fixes nimyaml
* fixes glob
* fixes parsetoml
* Apply suggestions from code review
* Update testament/important_packages.nim
* add legacy:laxEffects
|
| |
|
|
|
|
|
| |
* Return error message in output of gorge/staticExec.
* Document nimLegacyGorgeErrors in changelog.
|