Commit Graph

18446 Commits

Author SHA1 Message Date
Clyybber
80c8f06663 Add test for static proc/lambda params (#16584) 2021-01-04 18:41:02 +01:00
flywind
9531afac48 fix #16499 (#16514) 2021-01-04 18:27:58 +01:00
Neelesh Chandola
0d67ad0bf3 Add backwards index overload for [] for JsonNode (#16501)
* Add backwards index overload for `[]` for JsonNode

* Add since

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>

* Add docs, example, and changelog

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
2021-01-04 17:46:39 +01:00
Juan Carlos
349574d574 Add posix_utils.osReleaseFile (#16452)
* Add posix_utils.osReleaseFile

* Update lib/posix/posix_utils.nim

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>

* Update lib/posix/posix_utils.nim

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>

* Add a basic sanity test

* Add a basic sanity test

* Add a basic sanity test

* Add a basic sanity test

* https://github.com/nim-lang/Nim/pull/16452#issuecomment-753364096

* Update lib/posix/posix_utils.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>

* Update lib/posix/posix_utils.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>

* Update changelog.md

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-01-04 15:21:36 +01:00
flywind
7c2c1ad072 enable tmath tests for JS backend (#16562) 2021-01-04 11:40:56 +01:00
flywind
acf3715ea8 continue #15456 add #pragma directives compiler support (#16472)
* continue #15456
* follow the advice from juan_carlos
2021-01-04 11:34:13 +01:00
konsumlamm
435f829348 Improve sequtils documentation (#16559)
* Improve sequtils documentation

Uncomment assertions in tests

* Use present tense
2021-01-04 11:04:30 +01:00
flywind
c80261bc00 fix #12311 (#16578) 2021-01-04 10:24:52 +01:00
konsumlamm
763fef59fa Improve documentation for critbits (#16568) 2021-01-03 22:25:05 -08:00
Clyybber
a0134671ee Make test independent of repo location (#16571)
* Make test independent of repo location

* Fix differently
2021-01-03 19:15:56 +01:00
Roman Inflianskas
c82c67dc69 fix #12958 (#16565)
Sync between Linux kernel code (header:
https://github.com/torvalds/linux/blob/master/tools/include/uapi/linux/sched.h)
and the linux module in lib.

`CLONE_STOPPED` was marked as deprecated, as it was removed in the
Linux kernel upstream.

Fixes #12958.
2021-01-03 14:00:22 +01:00
flywind
76f92265d9 fix #8412 (#16563)
* Revert "Make config processing order test more robust"

This reverts commit cf714c129f.

* enable tmath tests

* fix #8412

* Revert "enable tmath tests"

This reverts commit 293b63f57e.

* add tests

* fix
2021-01-03 11:05:59 +01:00
hlaaftana
2aed418698 Fix #16554 (#16564) 2021-01-03 08:02:12 +01:00
flywind
c71f5650c6 Revert "Make config processing order test more robust" (#16561)
This reverts commit cf714c129f.
2021-01-03 12:55:08 +08:00
Clyybber
cf714c129f Make config processing order test more robust 2021-01-02 21:47:26 +01:00
Timothee Cour
471aab86a0 fix #16526 run config.nims before foo.nim.cfg (#16557)
* fix #16526 run config.nims before foo.nim.cfg

* add test
2021-01-02 21:41:44 +01:00
konsumlamm
2eccef7ad6 Algorithm improvements (#16529)
* Improve documentation for algorithm

Remove unused import in algorithm tests
Improve formatting

* Reapply fix for reverse on empty openArray

* Use 3rd person singular

Add more explanations.
2021-01-02 20:28:59 +01:00
flywind
e869767aa7 fix #16061 (#16551) 2021-01-02 17:13:01 +01:00
flywind
b8775bff57 fix is "closure" (#16552) 2021-01-02 17:11:46 +01:00
flywind
d8b1ffc857 fix #16542 (#16549)
* fix #16542
2021-01-02 14:32:37 +01:00
Timothee Cour
854ff26ac5 fix #16206, nim r / nim -r recompiles if cwd changes (#16349) 2021-01-02 01:33:59 -08:00
Juan Carlos
1d2e2b5a5b Add mimetypes.mimesLongest (#16480)
* Allow single alloc mimetypes ops

* Allow single alloc mimetypes ops

* Update lib/pure/mimetypes.nim

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>

* https://github.com/nim-lang/Nim/pull/16480#issuecomment-752630190

* https://github.com/nim-lang/Nim/pull/16480#issuecomment-752630190

* https://github.com/nim-lang/Nim/pull/16480#issuecomment-753349661

* update changelog

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
2021-01-02 08:10:38 +01:00
Andreas Rumpf
73a8b950cb big steps torwards an efficient, simple IC implementation (#16543)
* reworked ID handling
* the packed AST now has its own ID mechanism
* basic serialization code works
* extract rodfiles to its own module
* rodfiles: store and compare configs
* rodfiles: store dependencies
* store config at the end
* precise dependency tracking
* dependency tracking for rodfiles
* completed loading of PSym, PType, etc
* removed dead code
* bugfix: do not realloc seqs when taking addr into an element
* make IC opt-in for now
* makes tcompilerapi green again
* final cleanups

Co-authored-by: Andy Davidoff <github@andy.disruptek.com>
2021-01-02 07:30:39 +01:00
Timothee Cour
0d0e43469f fix #14340 (#16386) 2021-01-01 22:55:22 +01:00
Juan Carlos
505d04389a Documentation only Testament unittest (#16532)
* Link Testament from unittest doc

* Update lib/pure/unittest.nim

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
2021-01-01 19:44:06 +01:00
n5m
b254d91cd0 reuse const (#16422) 2021-01-01 19:41:49 +01:00
flywind
d069c08d2b follow up #16399 clean up docs (#16539)
* follow up #16399 clean up docs

* more
2021-01-01 19:39:05 +01:00
flywind
bc0b4fbc9e happy new year 2021 (#16537) 2021-01-01 19:28:59 +01:00
n5m
5953fbd834 link to POSIX sendSignal from osproc.kill docs (#16475)
and from osproc.terminate docs
2021-01-01 19:01:45 +01:00
flywind
b5101b23b5 refactor the tests of options (#16527) 2021-01-01 19:01:07 +01:00
Federico Ceratto
e67059a03a Add short description on GC (#16535) 2021-01-01 18:36:20 +01:00
flywind
4a479f4a6e update contributing.rst (#16530)
* update docs

* Apply suggestions from code review

* Update doc/contributing.rst
2021-01-01 18:33:35 +01:00
flywind
eb25d7dd71 enable ggplotnim (#16538) 2021-01-01 18:32:41 +01:00
flywind
9d4a1f9554 fix #16494 (#16513)
* fix #16494

* fix

* fix

* fix

* fix

* fix

* fix performance

* add comments

* improve performance

* Update lib/system.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* Update lib/system.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* Update tests/stdlib/tmath_misc.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* Update tests/stdlib/tmath_misc.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-01-01 10:59:19 +01:00
flywind
5fb56a3b2c refactor cmpIgnoreStyle and cmpIgnoreCase (#16399)
* init

* support strutils

* more

* better

* Call len once per string/cstring

* Change var to let

* Compare ternary on first char

* More appropriate param name

* fix

* better

* one test

* impl

* more efficient

* minor

Co-authored-by: Clyybber <darkmine956@gmail.com>
2020-12-31 11:54:40 +01:00
Andrey Makarov
5984f7a7dd RST: improve line blocks (#16518) 2020-12-31 11:20:04 +01:00
Timothee Cour
17992fca1d disable ggplotnim, refs #16523 (#16524) 2020-12-30 20:29:22 -08:00
rockcavera
876fa3e62e adding missing commas in std/bitops (#16520)
adding missing commas between the importc and header pragmas of some procs.
2020-12-30 16:41:25 -08:00
flywind
b42e7c0ef9 make the docs of arithmetics better (#16510)
* fix

* Update lib/system/arithmetics.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* Apply suggestions from code review

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* Apply suggestions from code review

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2020-12-30 17:30:43 +01:00
flywind
805917768d use runnableExamples in options (#16503) 2020-12-30 16:26:49 +01:00
Juan Carlos
b8658a3e24 Add assertions for jsconsole (#16460) 2020-12-30 15:10:50 +01:00
flywind
515cd45420 Add math.copySign (#16406)
* add math.copySign
* fix + tests
2020-12-30 15:09:30 +01:00
flywind
73f778e441 follow #16505 move and active tests (#16508)
* fix printing negative zero in JS backend

* move tests
2020-12-30 15:06:50 +01:00
Saem Ghani
84a7544988 nim-gdb.py fixes mostly for nimsuggest debugging (#16479)
These fixes were primarily developed to assist in nimsuggest debugging. There
is nothing intentionally specific done for nimsuggest, but beyond the automated
tests all practical testing was done with nimsuggest. Undoubltedly these will
also assist in other debugging scenarios.

The current nim-dbg.py script was broken in a few ways:
- failed to provide detailed value information for common types (see below)
- was not passing existing tests
- could not produce type summary information

Broken types now working somewhat better:
- sequences with ref types like strings
- sequences with value types like ints
- arrays with ref types like strings
- tables with int or string keys

Other improvements:
- slightly more test coverage

Future considerations:
- this, data used by it, should be something the compiler can generates
- account for different memory layouts ([arc/orc differ](https://github.com/nim-lang/Nim/pull/16479#issuecomment-751469536))

Attempts at improving nim-gdb.py

More tests, few fixes for seq and type printing

Tables debugging fixed added further tests

Fixed type printing
2020-12-30 15:02:51 +01:00
Timothee Cour
8508c4e1c2 fix hintProcessing dots interference with static:echo and hintCC; add tests for nim secret, add tests for hintProcessing, misc other bug fixes (#16495)
* fix dots interfering with static:echo
* add tests
* fix hintProcessing dots for hintCC
* improve trunner tests
* fix bug: readLineFromStdin now writes prompt to stdout, consistent with linenoise and rdstdin
* disable a failing test for windows
2020-12-30 14:58:41 +01:00
flywind
2f4d00fb98 fix #16502 (#16512) 2020-12-30 14:51:17 +01:00
flywind
1df0c04a1c disable grams (#16511) 2020-12-30 12:30:20 +08:00
flywind
95f599ca2d move asciitables to std/private/ (#16498)
* move asciitables

* minor
2020-12-29 16:20:47 +01:00
flywind
89a2390f8b fix printing negative zero in JS backend (#16505) 2020-12-29 15:50:22 +01:00
flywind
732419ae90 improve examples in manual (#16497)
* improve examples in manual

* Update doc/manual.rst

Co-authored-by: Clyybber <darkmine956@gmail.com>

* Update tests/cpp/ttemplatetype.nim

Co-authored-by: Clyybber <darkmine956@gmail.com>

Co-authored-by: Clyybber <darkmine956@gmail.com>
2020-12-29 13:44:48 +01:00