Commit Graph

6101 Commits

Author SHA1 Message Date
Timothee Cour
befca425c4 workaround issue #8223 nim doc fails with doAssertRaises (#8245) 2018-07-08 08:16:13 +02:00
Dmitry Atamanov
a6c3bbf01a Add proc toOpenArray[byte] for strings (#7820) 2018-07-07 21:03:22 +02:00
Mamy Ratsimbazafy
75ef90da82 Put back deprecation path for SomeReal
was wrongly deleted in c7298561c1
2018-07-07 15:04:41 +02:00
Dominik Picheta
53ce58f050 Merge pull request #6587 from FedericoCeratto/normalizePath
Add normalizePath and tests
2018-07-07 10:12:07 +01:00
Araq
8667899d53 hotfix: fixes possible out of bounds access in ospaths.joinPath 2018-07-07 02:31:43 +02:00
Federico Ceratto
d65429d857 Add normalizePath and tests 2018-07-06 20:21:39 +01:00
Araq
531013727d system.nim: minor code style change 2018-07-06 19:13:54 +02:00
Araq
5384de685f Merge branch 'devel' of github.com:nim-lang/Nim into araq-devel 2018-07-06 18:41:00 +02:00
Dominik Picheta
5e338c371e Use '\L' instead of '\n' in system for backwards compatibility.
See https://github.com/nim-lang/packages/pull/785.
2018-07-06 15:48:17 +01:00
Araq
8bcaee1fdf make tmemfile2 work again 2018-07-06 15:53:32 +02:00
Joey
a1457bfa9f Rewrite the memory management code for Nintendo Switch (#8169)
Rewrite the memory management code for Nintendo Switch

The first implementation was naive and did not account for multiple
memory allocations. However, this implementation may still be
incomplete. Currently, when running applications, the code runs fine.
When the application is exited via code (the end of the program is
reached or quit() is called), the Switch will crash. Not sure why this
happens, but I suspect it is from Nim memory allocations.

I suspect the memory allocations because when I compile the helloworld
application without any Nim allocations (just C function calls) and use
`--gc:none` as a compile option, the application exits fine.
2018-07-05 16:33:15 +02:00
Andreas Rumpf
683c60e2fd restore deprecated PNimrodNode in order to make the CIs happy 2018-07-05 09:17:44 +02:00
Andreas Rumpf
86a7054c88 Merge branch 'devel' into araq-devel 2018-07-04 19:25:53 +02:00
Timothee Cour
426e5c2d1f simplify typetraits.nim test (#8193) 2018-07-03 12:19:46 +02:00
Vindaar
681d8e0749 Deprecate 'c', 'C' prefix for octal literals, fixes #8082 (#8178)
* deprecate `0c`, `0C` prefix for octal literals

Deprecates the previously allowed syntax of `0c` and `0C` as a prefix for
octal literals to bring the literals in line with the behavior of
`parseOct` from parseutils.

* add `msgKind` arg to `lexMessageLitNum` for deprecation messages

* change literal tests to check all valid integer literals

Also adds the `tinvaligintegerlit3` test to test for the (still)
invalid `0O` prefix.
2018-07-03 01:56:36 +02:00
zargot
e63369f2b9 asyncftpclient: add missing file.close to retrFile 2018-07-02 18:07:24 +02:00
Tomohiro
c79f488027 Fix os.unixToNativePath proc returns wrong result(#8179) (#8181)
* Fix os.unixToNativePath proc returns wrong result(#8179)

* Add tests for unixToNativePath
2018-07-02 17:14:26 +02:00
Tomohiro
a2b2bc1a36 Fixed #8173 (#8175) 2018-07-02 00:46:56 +02:00
Andreas Rumpf
e455023902 Merge branch 'devel' into araq-devel 2018-07-01 16:24:56 +02:00
Andreas Rumpf
67c7e49e2a gc_common: minor reformating 2018-07-01 15:10:18 +02:00
Oscar Nihlgård
b61e69202b Unexport times.stringifyUnit (#8168) 2018-07-01 12:54:13 +02:00
Timothee Cour
fbd9f9da95 execCmdEx stderr redirection (#8162) 2018-07-01 04:38:15 -04:00
Oscar Nihlgård
7674df0dff Fixes #8100 (#8101) 2018-06-29 14:53:09 +02:00
Andreas Rumpf
b5a96d28c7 codgen refactoring: prepare for alternative string/seq implementations 2018-06-29 11:34:39 +02:00
Andreas Rumpf
a9e96888d0 system.nim: cleanup the formatting 2018-06-29 11:21:57 +02:00
Timothee Cour
4deda6b732 Update nre.nim (#8147) 2018-06-29 02:13:49 -04:00
Andreas Rumpf
c7298561c1 system.nim: remove deprecated symbols 2018-06-28 07:42:46 +02:00
Yuriy Glukhov
e66b7f3909 Clarify the docs for tables.del (#8134) 2018-06-27 22:25:22 +02:00
hlaaf
9ed671b2fe Replace NotString with typeclass in jsffi (#8128) 2018-06-27 21:43:45 +02:00
Joey
559a7615ad Nintendo switch support (#8069)
* Add config section for Nintendo Switch
* Add compiler configuration for Nintendo Switch and it's CPU
* Add specific lib code for Nintendo Switch
* Add GC support for Nintendo Switch
* Update changelog for Nintendo Switch
* Update changelog with more info about fixed paths
* Cleaned up GC memory management a bit
* Relocate docs for Switch
* Rename aarch64NoneElfGcc to nintendoSwitchGCC
* Remove armv8a57
* Fix installer.ini
* Reuse code in linux and amd64
* Add posix defs for nintendo switch
* Add more defined sections for nintendo switch
* Remove old comment
* Add what's not supported for Nintendo Switch docs
* Make nintendoswitch == posix
* Remove DEVKITPRO references from nim.cfg
* Make PR extccomp changes
* Remove Result type alias
* Add separate switch consts file
* Update docs for nintendo switch
* Fix travis errors with undefined consts and add correct wait.h procs
2018-06-27 12:35:09 +02:00
Andreas Rumpf
2a3a128e36 Merge branch 'devel' into typedesc-reforms 2018-06-26 18:33:51 +02:00
Kaushal Modi
4c2e712056 Support setting foreground/background colors to terminal defaults (#8073)
* Support setting foreground/background colors to terminal defaults

Adds fgDefault to ForegroundColor and bgDefault to BackgroundColor
enums.

For Windows console, the default foreground color is assumed to be
white, and the default background color black.

* Add default fg/bg color caching for Windows Console
2018-06-24 03:53:20 -04:00
Federico Ceratto
059ddeee10 Minor doc fix 2018-06-23 14:32:24 +01:00
Oscar Nihlgård
371f87e962 Change inconsistent paramaters in times.nim (#8091) 2018-06-23 09:01:55 -04:00
Andreas Rumpf
cc11aa9698 varints module: critical bugfix 2018-06-22 03:19:30 +02:00
gemath
db68bbe4f7 Pegs AST read access (#8050)
* Make PEG AST nodes readable from outside the module.

* Added a test module for the pegs stdlib module.

* Edited changelog.

* Renamed ``sons`` iterator to ``items``, added ``pairs``, inlined both.

* Updated entry and moved it to the right category.
2018-06-19 18:13:33 +01:00
Andreas Rumpf
3ca11def6d Merge pull request #7771 from nim-lang/nim-in-action-fixes
Higher Nim in Action coverage plus regression fix.
2018-06-19 17:52:05 +02:00
Kaushal Modi
abbf9ba9f7 Convert styledWriteLine and styledEcho to templates
This also fixes a bug in the styledWriteLine behavior where the background color
leaked onto the next newline if that command did not end with resetStyle.

Now it is not necessary to end styledWriteLine calls that set BackgroundColor to
end in resetStyle.
2018-06-18 09:09:23 -04:00
Kaushal Modi
3b5b3deecd Add styledWrite macro
Also:

- Move the tests block to the end of the file
- Fix the older tests
- Add tests for existing styledEcho
- Add new tests for styledWrite

Fixes https://github.com/nim-lang/Nim/issues/8046.
2018-06-18 09:09:23 -04:00
Dominik Picheta
03b073d541 Workaround VM bug in strutils 2018-06-17 23:26:18 +01:00
Kaushal Modi
4616b28c7b Add support for italic and strikethrough ANSI escape codes (#8048)
\e[3m -> italic
    \e[9m -> strikethrough

On terminals not supporting italic text, the text is shown in reverse instead,
and on terminals not supporting strikethrough text, the text is shown as is.
2018-06-17 12:37:41 -04:00
Dominik Picheta
8081a9b3d0 Exports unicode.toUpper/toLower in strutils module. 2018-06-17 00:12:51 +01:00
Zahary Karadjov
fb27357b62 A minimal patch enabling the new typedesc and static types syntax 2018-06-16 16:46:32 +03:00
Zahary Karadjov
7ab1aafc6b stdlib work 2018-06-16 16:46:32 +03:00
Dmitry Atamanov
bf5d619a52 Add MemMapFileStream. Fixes in memFiles. (#7944)
* Add MemMapFileStream

* Added tests

* Fixed bug in memfiles (zero index for string)

* Added flush to changelog

* Attempt to fix Win's nuances

* Fix attempt to fix

* Continue...

* And again...

* Reworked tests (all for win on Win)

* Fixes in flush (Win)

* Replace fn vars to consts

* Added the attempts parameter to the flush

* Replace while to for

* Move to memfiles

* Use Natural instead of uint

* Better error messages for append mode. Handle specific cases.
2018-06-14 17:34:26 +01:00
Araq
894f21eb73 RST hotfix: don't crash in rstnodeToRefname 2018-06-14 15:01:30 +02:00
Andreas Rumpf
2d186f18ec Merge pull request #7950 from Paalon/math-log
Add log for base b of x
2018-06-14 14:02:57 +02:00
Koki Fushimi
5332da2e7c Fix a test 2018-06-14 13:37:37 +09:00
Koki Fushimi
5fc5e37194 Use one same type for two parameters 2018-06-14 13:17:17 +09:00
Federico Ceratto
127556ad63 Update marshal.nim 2018-06-13 23:22:07 +01:00