From 7fa399f51c39e6661876223009d5003cd2e0cf99 Mon Sep 17 00:00:00 2001 From: Araq Date: Tue, 15 Jul 2014 09:30:51 +0200 Subject: [PATCH 01/18] git forced me to commit these --- examples/cross_calculator/android/scripts/jnibuild.sh | 0 examples/cross_calculator/android/scripts/nimbuild.sh | 0 examples/cross_calculator/android/scripts/tags.sh | 0 examples/cross_calculator/ios/scripts/tags.sh | 0 examples/cross_calculator/ios/scripts/xcode_prebuild.sh | 0 lib/pure/unidecode/gen.py | 0 tinyc/tests/gcctestsuite.sh | 0 tinyc/texi2pod.pl | 0 8 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 examples/cross_calculator/android/scripts/jnibuild.sh mode change 100755 => 100644 examples/cross_calculator/android/scripts/nimbuild.sh mode change 100755 => 100644 examples/cross_calculator/android/scripts/tags.sh mode change 100755 => 100644 examples/cross_calculator/ios/scripts/tags.sh mode change 100755 => 100644 examples/cross_calculator/ios/scripts/xcode_prebuild.sh mode change 100755 => 100644 lib/pure/unidecode/gen.py mode change 100755 => 100644 tinyc/tests/gcctestsuite.sh mode change 100755 => 100644 tinyc/texi2pod.pl diff --git a/examples/cross_calculator/android/scripts/jnibuild.sh b/examples/cross_calculator/android/scripts/jnibuild.sh old mode 100755 new mode 100644 diff --git a/examples/cross_calculator/android/scripts/nimbuild.sh b/examples/cross_calculator/android/scripts/nimbuild.sh old mode 100755 new mode 100644 diff --git a/examples/cross_calculator/android/scripts/tags.sh b/examples/cross_calculator/android/scripts/tags.sh old mode 100755 new mode 100644 diff --git a/examples/cross_calculator/ios/scripts/tags.sh b/examples/cross_calculator/ios/scripts/tags.sh old mode 100755 new mode 100644 diff --git a/examples/cross_calculator/ios/scripts/xcode_prebuild.sh b/examples/cross_calculator/ios/scripts/xcode_prebuild.sh old mode 100755 new mode 100644 diff --git a/lib/pure/unidecode/gen.py b/lib/pure/unidecode/gen.py old mode 100755 new mode 100644 diff --git a/tinyc/tests/gcctestsuite.sh b/tinyc/tests/gcctestsuite.sh old mode 100755 new mode 100644 diff --git a/tinyc/texi2pod.pl b/tinyc/texi2pod.pl old mode 100755 new mode 100644 From e8a0b45f2adf94215bea025d237bb50ec6a4d915 Mon Sep 17 00:00:00 2001 From: Araq Date: Tue, 4 Nov 2014 07:34:05 +0100 Subject: [PATCH 02/18] proper development version number --- compiler/nversion.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/nversion.nim b/compiler/nversion.nim index bd1f79ac6b..bc69f5a856 100644 --- a/compiler/nversion.nim +++ b/compiler/nversion.nim @@ -14,7 +14,7 @@ const MaxSetElements* = 1 shl 16 # (2^16) to support unicode character sets? VersionMajor* = 0 VersionMinor* = 9 - VersionPatch* = 6 + VersionPatch* = 7 VersionAsString* = $VersionMajor & "." & $VersionMinor & "." & $VersionPatch RodFileVersion* = "1215" # modify this if the rod-format changes! From e39b12ee0a258d8d77cce7a5a6d172c1a223dd25 Mon Sep 17 00:00:00 2001 From: Simon Hafner Date: Tue, 13 Jan 2015 01:13:34 -0600 Subject: [PATCH 03/18] TSlice -> Slice in the tut1 --- doc/tut1.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/tut1.txt b/doc/tut1.txt index 9d75b1ea23..66bf75cb28 100644 --- a/doc/tut1.txt +++ b/doc/tut1.txt @@ -1313,9 +1313,9 @@ Slices ------ Slices look similar to subranges types in syntax but are used in a different -context. A slice is just an object of type TSlice which contains two bounds, +context. A slice is just an object of type Slice which contains two bounds, `a` and `b`. By itself a slice is not very useful, but other collection types -define operators which accept TSlice objects to define ranges. +define operators which accept Slice objects to define ranges. .. code-block:: nim From a3441b3db58dd021fa6f34ae3a72f73c5e9b7e37 Mon Sep 17 00:00:00 2001 From: dumndummer Date: Tue, 27 Jan 2015 12:04:07 +0000 Subject: [PATCH 04/18] Update sets.nim corrected misspelled word in doc comment --- lib/pure/collections/sets.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/collections/sets.nim b/lib/pure/collections/sets.nim index 92ef3152d9..8af0b3118e 100644 --- a/lib/pure/collections/sets.nim +++ b/lib/pure/collections/sets.nim @@ -253,7 +253,7 @@ proc containsOrIncl*[A](s: var HashSet[A], key: A): bool = proc init*[A](s: var HashSet[A], initialSize=64) = ## Initializes a hash set. ## - ## The `initialSize` parameter needs to be a power of too. You can use + ## The `initialSize` parameter needs to be a power of two. You can use ## `math.nextPowerOfTwo() `_ to guarantee that at ## runtime. All set variables have to be initialized before you can use them ## with other procs from this module with the exception of `isValid() From c7543652e67aea77dcda3a67c48efb9f76488140 Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Tue, 27 Jan 2015 12:48:48 +0000 Subject: [PATCH 05/18] Revert "Update sets.nim" --- lib/pure/collections/sets.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/collections/sets.nim b/lib/pure/collections/sets.nim index 8af0b3118e..92ef3152d9 100644 --- a/lib/pure/collections/sets.nim +++ b/lib/pure/collections/sets.nim @@ -253,7 +253,7 @@ proc containsOrIncl*[A](s: var HashSet[A], key: A): bool = proc init*[A](s: var HashSet[A], initialSize=64) = ## Initializes a hash set. ## - ## The `initialSize` parameter needs to be a power of two. You can use + ## The `initialSize` parameter needs to be a power of too. You can use ## `math.nextPowerOfTwo() `_ to guarantee that at ## runtime. All set variables have to be initialized before you can use them ## with other procs from this module with the exception of `isValid() From 7bf971fa1d4a18fdab4a82bec338324f587c7195 Mon Sep 17 00:00:00 2001 From: elpres Date: Fri, 30 Jan 2015 09:46:35 +0100 Subject: [PATCH 06/18] Same types for chars as in zlib.h zlib sets the return value to -1 to communicate errors, which won't work if the parameter type is 'char'. Also, one routine was missing. Source: http://www.zlib.net/manual.html --- lib/wrappers/zip/zlib.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/wrappers/zip/zlib.nim b/lib/wrappers/zip/zlib.nim index e3530d566d..b727b84283 100644 --- a/lib/wrappers/zip/zlib.nim +++ b/lib/wrappers/zip/zlib.nim @@ -119,9 +119,10 @@ proc gzputs*(thefile: GzFile, s: Pbytef): int32{.cdecl, dynlib: libz, importc: "gzputs".} proc gzgets*(thefile: GzFile, buf: Pbytef, length: int32): Pbytef{.cdecl, dynlib: libz, importc: "gzgets".} -proc gzputc*(thefile: GzFile, c: char): char{.cdecl, dynlib: libz, +proc gzputc*(thefile: GzFile, c: int): int{.cdecl, dynlib: libz, importc: "gzputc".} -proc gzgetc*(thefile: GzFile): char{.cdecl, dynlib: libz, importc: "gzgetc".} +proc gzgetc*(thefile: GzFile): int{.cdecl, dynlib: libz, importc: "gzgetc".} +proc gzungetc*(c: int, thefile: GzFile): int{.cdecl, dynlib: libz, importc: "gzungetc".} proc gzflush*(thefile: GzFile, flush: int32): int32{.cdecl, dynlib: libz, importc: "gzflush".} proc gzseek*(thefile: GzFile, offset: ZOffT, whence: int32): ZOffT{.cdecl, From ab29db58d3ebc4797e57fdc0807f38c767db2baa Mon Sep 17 00:00:00 2001 From: elpres Date: Fri, 30 Jan 2015 16:29:28 +0100 Subject: [PATCH 07/18] Fixed int to int32 --- lib/wrappers/zip/zlib.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/wrappers/zip/zlib.nim b/lib/wrappers/zip/zlib.nim index b727b84283..6f51e9a8df 100644 --- a/lib/wrappers/zip/zlib.nim +++ b/lib/wrappers/zip/zlib.nim @@ -119,10 +119,10 @@ proc gzputs*(thefile: GzFile, s: Pbytef): int32{.cdecl, dynlib: libz, importc: "gzputs".} proc gzgets*(thefile: GzFile, buf: Pbytef, length: int32): Pbytef{.cdecl, dynlib: libz, importc: "gzgets".} -proc gzputc*(thefile: GzFile, c: int): int{.cdecl, dynlib: libz, +proc gzputc*(thefile: GzFile, c: int32): int32{.cdecl, dynlib: libz, importc: "gzputc".} -proc gzgetc*(thefile: GzFile): int{.cdecl, dynlib: libz, importc: "gzgetc".} -proc gzungetc*(c: int, thefile: GzFile): int{.cdecl, dynlib: libz, importc: "gzungetc".} +proc gzgetc*(thefile: GzFile): int32{.cdecl, dynlib: libz, importc: "gzgetc".} +proc gzungetc*(c: int32, thefile: GzFile): int32{.cdecl, dynlib: libz, importc: "gzungetc".} proc gzflush*(thefile: GzFile, flush: int32): int32{.cdecl, dynlib: libz, importc: "gzflush".} proc gzseek*(thefile: GzFile, offset: ZOffT, whence: int32): ZOffT{.cdecl, From 344df154dcc4363a975f80cc78e3c4531f3a926b Mon Sep 17 00:00:00 2001 From: Fabio Cevasco Date: Fri, 6 Feb 2015 21:47:05 +0100 Subject: [PATCH 08/18] newRollingFileLogger - fmtStr is always set to defaultFmtStr --- lib/pure/logging.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/logging.nim b/lib/pure/logging.nim index 9247f69c5b..82e1025bb6 100644 --- a/lib/pure/logging.nim +++ b/lib/pure/logging.nim @@ -183,7 +183,7 @@ proc newRollingFileLogger*(filename = defaultFilename(), ## a new log file will be started and the old will be renamed. new(result) result.levelThreshold = levelThreshold - result.fmtStr = defaultFmtStr + result.fmtStr = fmtStr result.maxLines = maxLines result.f = open(filename, mode) result.curLine = 0 From 335c3e2b819bf3e190869dc432a9809c004557f1 Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Fri, 6 Feb 2015 21:30:45 +0000 Subject: [PATCH 09/18] Revert "newRollingFileLogger - fmtStr is always set to defaultFmtStr" --- lib/pure/logging.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/logging.nim b/lib/pure/logging.nim index 82e1025bb6..9247f69c5b 100644 --- a/lib/pure/logging.nim +++ b/lib/pure/logging.nim @@ -183,7 +183,7 @@ proc newRollingFileLogger*(filename = defaultFilename(), ## a new log file will be started and the old will be renamed. new(result) result.levelThreshold = levelThreshold - result.fmtStr = fmtStr + result.fmtStr = defaultFmtStr result.maxLines = maxLines result.f = open(filename, mode) result.curLine = 0 From 04c746dac15866877ebd2cc6dcf6f3d1ca93fed0 Mon Sep 17 00:00:00 2001 From: Brian Donovan Date: Fri, 20 Feb 2015 14:23:53 -0800 Subject: [PATCH 10/18] Fix a typo in "raises" annotation description. --- doc/manual/effects.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/manual/effects.txt b/doc/manual/effects.txt index 73934ab340..8443d2aca1 100644 --- a/doc/manual/effects.txt +++ b/doc/manual/effects.txt @@ -48,7 +48,7 @@ possibly raised exceptions; the algorithm operates on ``p``'s call graph: However if the call is of the form ``f(...)`` where ``f`` is a parameter of the currently analysed routine it is ignored. The call is optimistically assumed to have no effect. Rule 2 compensates for this case. -2. Every expression of some proc type wihtin a call that is not a call +2. Every expression of some proc type within a call that is not a call itself (and not nil) is assumed to be called indirectly somehow and thus its raises list is added to ``p``'s raises list. 3. Every call to a proc ``q`` which has an unknown body (due to a forward From cee08adebbe70614d7bd875cfe2211e31fca71a7 Mon Sep 17 00:00:00 2001 From: apense Date: Fri, 17 Apr 2015 13:14:36 -0400 Subject: [PATCH 11/18] Corrected code example in pegs The code as `"var1=key; var2=key2".replacef(peg"{\ident}'='{\ident}", "$1<-$2$2")` just results in `$1<-$2$2; $1<-$2$2` --- lib/pure/pegs.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/pegs.nim b/lib/pure/pegs.nim index 7cef0a00d0..53b09a7066 100644 --- a/lib/pure/pegs.nim +++ b/lib/pure/pegs.nim @@ -902,7 +902,7 @@ proc replacef*(s: string, sub: Peg, by: string): string {. ## with the notation ``$i`` and ``$#`` (see strutils.`%`). Examples: ## ## .. code-block:: nim - ## "var1=key; var2=key2".replace(peg"{\ident}'='{\ident}", "$1<-$2$2") + ## "var1=key; var2=key2".replacef(peg"{\ident}'='{\ident}", "$1<-$2$2") ## ## Results in: ## From 3caa7ff08c761cce6c68db19137dcbbe66c7cdbf Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Fri, 17 Apr 2015 22:09:02 +0200 Subject: [PATCH 12/18] Revert "Corrected code example in pegs" --- lib/pure/pegs.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/pegs.nim b/lib/pure/pegs.nim index 53b09a7066..7cef0a00d0 100644 --- a/lib/pure/pegs.nim +++ b/lib/pure/pegs.nim @@ -902,7 +902,7 @@ proc replacef*(s: string, sub: Peg, by: string): string {. ## with the notation ``$i`` and ``$#`` (see strutils.`%`). Examples: ## ## .. code-block:: nim - ## "var1=key; var2=key2".replacef(peg"{\ident}'='{\ident}", "$1<-$2$2") + ## "var1=key; var2=key2".replace(peg"{\ident}'='{\ident}", "$1<-$2$2") ## ## Results in: ## From fe84d9fefeb72daa112ad9e1be6a1d5b9aa8ca30 Mon Sep 17 00:00:00 2001 From: Fabio Zadrozny Date: Thu, 23 Apr 2015 21:04:42 -0300 Subject: [PATCH 13/18] New Editor (LiClipse) --- web/question.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/web/question.txt b/web/question.txt index d3a2dd5c08..64312683e1 100644 --- a/web/question.txt +++ b/web/question.txt @@ -110,6 +110,7 @@ General - Scite: Included - Gedit: The `Aporia .lang file `_ - jEdit: https://github.com/exhu/nimrod-misc/tree/master/jedit + - LiClipse: http://www.liclipse.com/ (Eclipse based plugin) .. container:: standout From 25fdac4ff4a9f70c1400b5218a6b99204c81e70b Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Fri, 24 Apr 2015 18:00:54 +0200 Subject: [PATCH 14/18] Revert "New Editor (LiClipse)" --- web/question.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/web/question.txt b/web/question.txt index 64312683e1..d3a2dd5c08 100644 --- a/web/question.txt +++ b/web/question.txt @@ -110,7 +110,6 @@ General - Scite: Included - Gedit: The `Aporia .lang file `_ - jEdit: https://github.com/exhu/nimrod-misc/tree/master/jedit - - LiClipse: http://www.liclipse.com/ (Eclipse based plugin) .. container:: standout From 47f6d38b67a794e6dbe7bc612fe682d43b0d0f18 Mon Sep 17 00:00:00 2001 From: Michael Werner Date: Thu, 7 May 2015 22:39:15 +0200 Subject: [PATCH 15/18] fixed typo in threadpool.nim --- lib/pure/concurrency/threadpool.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/concurrency/threadpool.nim b/lib/pure/concurrency/threadpool.nim index 9f1e53fb8a..a431691add 100644 --- a/lib/pure/concurrency/threadpool.nim +++ b/lib/pure/concurrency/threadpool.nim @@ -300,7 +300,7 @@ proc setMinPoolSize*(size: range[1..MaxThreadPoolSize]) = minPoolSize = size proc setMaxPoolSize*(size: range[1..MaxThreadPoolSize]) = - ## sets the minimal thread pool size. The default value of this + ## sets the maximal thread pool size. The default value of this ## is ``MaxThreadPoolSize``. maxPoolSize = size if currentPoolSize > maxPoolSize: From 50a6b49bf91601a64f8d28e61a9adb9c3f2a002d Mon Sep 17 00:00:00 2001 From: jonathonf Date: Sat, 1 Aug 2015 20:45:58 +0100 Subject: [PATCH 16/18] Set correct Host in request header Ensure the correct destination hostname is used in the request, otherwise the request will fail in one of a number of interesting ways when using a proxy. Fixes https://github.com/nim-lang/Nim/issues/3166 --- lib/pure/httpclient.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/httpclient.nim b/lib/pure/httpclient.nim index 9c27ecdabb..c646061c9a 100644 --- a/lib/pure/httpclient.nim +++ b/lib/pure/httpclient.nim @@ -402,7 +402,7 @@ proc request*(url: string, httpMethod: string, extraHeaders = "", headers.add(" HTTP/1.1\c\L") - add(headers, "Host: " & r.hostname & "\c\L") + add(headers, "Host: " & parseUri(url).hostname & "\c\L") if userAgent != "": add(headers, "User-Agent: " & userAgent & "\c\L") if proxy != nil and proxy.auth != "": From 3b1ca2af4e51b337bf407b3d8090175585f8d41e Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Sat, 1 Aug 2015 20:48:23 +0100 Subject: [PATCH 17/18] Revert "Set correct Host in request header" --- lib/pure/httpclient.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/httpclient.nim b/lib/pure/httpclient.nim index c646061c9a..9c27ecdabb 100644 --- a/lib/pure/httpclient.nim +++ b/lib/pure/httpclient.nim @@ -402,7 +402,7 @@ proc request*(url: string, httpMethod: string, extraHeaders = "", headers.add(" HTTP/1.1\c\L") - add(headers, "Host: " & parseUri(url).hostname & "\c\L") + add(headers, "Host: " & r.hostname & "\c\L") if userAgent != "": add(headers, "User-Agent: " & userAgent & "\c\L") if proxy != nil and proxy.auth != "": From d1bb246c20ac08c47dafa0eab7a9a9856f5ac163 Mon Sep 17 00:00:00 2001 From: Federico Ceratto Date: Fri, 23 Oct 2015 17:35:55 +0100 Subject: [PATCH 18/18] Replace "prefix" with "suffix" in endsWith doc --- lib/pure/pegs.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/pegs.nim b/lib/pure/pegs.nim index 39f0bfa95e..54d7ef761c 100644 --- a/lib/pure/pegs.nim +++ b/lib/pure/pegs.nim @@ -886,7 +886,7 @@ proc startsWith*(s: string, prefix: Peg, start = 0): bool {. proc endsWith*(s: string, suffix: Peg, start = 0): bool {. nosideEffect, rtl, extern: "npegs$1".} = - ## returns true if `s` ends with the pattern `prefix` + ## returns true if `s` ends with the pattern `suffix` var c: Captures c.origStart = start for i in start .. s.len-1: