| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Without this, the httpclient examples are essentially setting you up for failure. I was bitten by this when my app became unable to open any more sockets.
I'm not entirely sure how long this will relevant, as I hope destructors will be added to an upcoming version of the stdlib. But figured it was worth submitting anyways!
|
|
|
|
|
|
|
|
|
|
|
|
| |
* prevent cache thrash
Co-authored-by: Charles Blake <cb@cblake.net>
* Update lib/pure/random.nim
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
Co-authored-by: Charles Blake <cb@cblake.net>
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add more Ascii Chars sets
- add UpperCaseLetters set
- add LowerCaseLetters set
- add Punctuations set
- add PrintablesNoWhiteSpace set
- add Printables set
- add isPunctuationAscii func
- add isPrintableAscii func
* Omit isPunctuationAscii and isPrintableAscii procs
* Apply suggestions for adding Wider Ascii Chars sets
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
* Update strutils.nim
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
|
|
|
| |
replace threadpool with createThreads in the runnableExamples
|
| |
|
|
|
| |
Highlight Nim by default in Markdown code in .nim
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* remove shallowCopy for ARC/ORC
* use move
* fix
* more fixes
* typo
* Update lib/system.nim
* follow
* add nodestroy
* move
* copy string
* add a changelog entry
Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
| |
(#20090)
fixes #20089; remove setPointer since strings/seqs are not pointers anymore
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* .forbids pragma: defining illegal effects for proc types
This patch intends to define the opposite of the .tags pragma: a way to define effects which are not allowed in a proc.
* updated documentation and changelogs for the forbids pragma
* renamed notTagEffects to forbiddenEffects
* corrected issues of forbids pragma
the forbids pragma didn't handle simple restrictions properly and it also had issues with subtyping
* removed incorrect character from changelog
* added test to cover the interaction of methods and the forbids pragma
* covering the interaction of the tags and forbids pragmas
* updated manual about the forbids pragma
* removed useless statement
* corrected the subtyping of proc types using the forbids pragma
* updated manual for the forbids pragma
* updated documentations for forbids pragma
* updated nim docs
* updated docs with rsttester.nim
* regenerated documentation
* updated rst docs
* Update changelog.md
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* updated changelog
* corrected typo
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
|
|
|
|
|
| |
* Change headings underscored by `~~~` to `###`
* Markdown code blocks part 2; migrate Nim Manual
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Improve rand(bool)
* Use sign test instead of mod 2
* Use mod 2 again, as it works for js
* Use right shift as suggested by the authors of xoroshiro
* Update random.nim
* General case doesn't need any right shift it was correct to begin with
* Update random.nim
* add comment
Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
|
|
|
|
|
|
|
| |
* epoll: correct mapping
`epoll_data` is a union and `epoll_event` is packed on `amd64`
* names
|
|
|
| |
Fixed typo
|
| |
|
| |
|
|
|
|
|
|
|
| |
* Make `random.rand` work with `Ordinal`
* Add changelog entry
* It's fine to cast to char
|
|
|
| |
Signed-off-by: David Krause <enthus1ast@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- add additional parameters parsing (other implementations will just
ignore them). E.g. if in RST we have:
.. code:: nim
:test: "nim c $1"
...
then in Markdown that will be:
```nim test="nim c $1"
...
```
- implement Markdown interpretation of additional indentation which is
less than 4 spaces (>=4 spaces is a code block but it's not
implemented yet). RST interpretes it as quoted block, for Markdown it's
just normal paragraphs.
- add separate `md2html` and `md2tex` commands. This is to separate
Markdown behavior in cases when it diverges w.r.t. RST significantly —
most conspicously like in the case of additional indentation above, and
also currently the contradicting inline rule of Markdown is also turned
on only in `md2html` and `md2tex`. **Rationale:** mixing Markdown and
RST arbitrarily is a way to nowhere, we need to provide a way to fix the
particular behavior. Note that still all commands have **both** Markdown
and RST features **enabled**. In this PR `*.nim` files can be processed
only in Markdown mode, while `md2html` is for `*.md` files and
`rst2html` for `*.rst` files.
- rename `*.rst` files to `.*md` as our current default behavior is
already Markdown-ish
- convert code blocks in `docgen.rst` to Markdown style as an example.
Other code blocks will be converted in the follow-up PRs
- fix indentation inside Markdown code blocks — additional indentation
is preserved there
- allow more than 3 backticks open/close blocks (tildas \~ are still not
allowed to avoid conflict with RST adornment headings) see also
https://github.com/nim-lang/RFCs/issues/355
- better error messages
- (other) fix a bug that admonitions cannot be used in sandbox mode; fix
annoying warning on line 2711
|
|
|
|
|
| |
literal (#20019) [backport]
fixes streams.readDataStr accept a string literal
|
| |
|
|
|
|
|
|
|
|
|
| |
* Add sink and lent to critbits
* Remove lent for pairs
I guess lent doesn't work well inside tuples
* Remove lent from template in critbits
Apparently this also doesn't work, because some checks failed
|
|
|
|
| |
Fixes Compilation error with --app:lib when a module tries to pull os.paramStr on posix by throwing a runtime exception instead.
More details here: #19964
|
|
|
|
|
| |
sysrand: fix syscall signature
`syscall` is a `C` varags function
|
|
|
|
|
|
|
| |
* Fixes return values of execCmd on macos
* update tests to use existing structure
Co-authored-by: daniel <danielclarke@wearepopgun.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fix vcc rawsetjmp
* changing `_longjmp()` to `longjmp()` and
`_setjmp()` to `setjmp()`
* fix
* fix setjmp to clangcl on Windows
* fix genTrySetjmp() to clangcl on Windows
|
|
|
| |
js codegen add missing whitespaces and braces
|
|
|
|
|
| |
* Fixes for jsre to make it more safe at runtime on some edge cases
* https://github.com/nim-lang/Nim/pull/19917#issuecomment-1162692893
|
|
|
|
|
| |
Update nre.nim
typo in proc replace description
|
| |
|
|
|
|
|
|
|
| |
* Better range error messages
* Revert to old behavior for arrays
* Small corrections
|
|
|
|
|
|
|
|
|
| |
* Windows: enable nimRawSetjmp by default
See #19197. The default setjmp can randomly segfault on windows
* Attempt to disable the flag for bootstraping
* Disable styleCheck for c_setjmp
|
| |
|
|
|
|
|
|
|
|
|
| |
* Pass headers to FetchOptions
Don't pass body if method is HttpGet or HttpHead
* Syntax fixes
* Restart CI
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add helpful suggestion, should always apply
* mention var param limitation in async docs
* Update compiler/lambdalifting.nim
whoops thanks
Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
| |
* remove unused opcSubstr
* [js] add testcase for array indexDefect
* Revert "remove unused opcSubstr"
This reverts commit cb461f2545234d62c1e0b83318f3e5495c97de52.
|
|
|
|
|
| |
* remove noop option gc:v2
* changelog
|
|
|
| |
fix #19862; make widestrs consistent in refc and orc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Deprecate sums
* Update changelog.md
* Update lib/std/sums.nim
* log
* format
* remove
* Update changelog.md
Co-authored-by: sandytypical <43030857+xflywind@users.noreply.github.com>
|
|
|
|
|
|
|
| |
* Add Microtasks
* Add Microtasks
* Workaround to build js docs in older NodeJS versions
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes the default for the `last` parameter of various `find`
routines from `0` to `-1`. Previous default prevents limiting the search
to the first character. This is a logic error, as full text search was
performed for 2 *valid* values of `last`: `0` and `last.high()`.
Adds an overload for `initSkipTable` which returns a newly initialized
table. This encapsulates every single usage of a `var`-acting original
func in this module.
Co-authored-by: flywind <xzsflywind@gmail.com>
|
|
|
|
|
| |
* Add Microtasks
* Add Microtasks
|
|
|
|
|
|
|
| |
* RST: improve simple tables
* nim 1.0 gotchas
* Still allow legacy boundaries like `----`
|
|
|
|
|
| |
change the type of mangleJsName
since mangleJsName is used in macros, there is no need to use cstring. Using cstring may increase conversions and cause warnings.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* borrowed `$` to make Time string friendly
* added sep character parameter
* Revert "added sep character parameter"
This reverts commit 45f4b019a4883b6ba577ade1f94677266beb5960.
* added sep character parameter
* Revert "borrowed `$` to make Time string friendly"
This reverts commit 10e2e44c9a04970f38cf66556635bdbb50b69136.
* added uri tests and made changelong entry
* Update lib/pure/uri.nim
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* Update lib/pure/uri.nim
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* Update tests/stdlib/turi.nim
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* Update tests/stdlib/turi.nim
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
* Add Array.shift for JavaScript targets
* Add Array.shift for JavaScript targets
|