summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/core/macros.nim2
-rw-r--r--lib/deprecated/pure/LockFreeHash.nim2
-rw-r--r--lib/deprecated/pure/parseopt2.nim2
-rw-r--r--lib/experimental/diff.nim6
-rw-r--r--lib/impure/db_odbc.nim2
-rw-r--r--lib/impure/db_postgres.nim2
-rw-r--r--lib/impure/nre.nim2
-rw-r--r--lib/packages/docutils/rstgen.nim4
-rw-r--r--lib/posix/posix.nim2
-rw-r--r--lib/posix/posix_utils.nim2
-rw-r--r--lib/pure/asyncdispatch.nim2
-rw-r--r--lib/pure/asyncstreams.nim2
-rw-r--r--lib/pure/bitops.nim2
-rw-r--r--lib/pure/collections/sequtils.nim4
-rw-r--r--lib/pure/concurrency/atomics.nim2
-rw-r--r--lib/pure/concurrency/cpuinfo.nim2
-rw-r--r--lib/pure/htmlparser.nim2
-rw-r--r--lib/pure/json.nim2
-rw-r--r--lib/pure/lenientops.nim2
-rw-r--r--lib/pure/memfiles.nim2
-rw-r--r--lib/pure/net.nim6
-rw-r--r--lib/pure/os.nim8
-rw-r--r--lib/pure/parsecsv.nim2
-rw-r--r--lib/pure/parsesql.nim2
-rw-r--r--lib/pure/parseutils.nim2
-rw-r--r--lib/pure/parsexml.nim2
-rw-r--r--lib/pure/selectors.nim4
-rw-r--r--lib/pure/smtp.nim2
-rw-r--r--lib/pure/strformat.nim4
-rw-r--r--lib/pure/strtabs.nim2
-rw-r--r--lib/pure/strutils.nim10
-rw-r--r--lib/pure/times.nim8
-rw-r--r--lib/pure/unittest.nim2
-rw-r--r--lib/std/editdistance.nim2
-rw-r--r--lib/system.nim16
-rw-r--r--lib/system/gc.nim2
-rw-r--r--lib/system/gc2.nim2
-rw-r--r--lib/system/mmdisp.nim2
-rw-r--r--lib/wrappers/sqlite3.nim2
39 files changed, 64 insertions, 64 deletions
diff --git a/lib/core/macros.nim b/lib/core/macros.nim
index 73f5790fa..408cbb9d6 100644
--- a/lib/core/macros.nim
+++ b/lib/core/macros.nim
@@ -364,7 +364,7 @@ when defined(nimHasSignatureHashInMacro):
 
 proc symBodyHash*(s: NimNode): string {.noSideEffect.} =
   ## Returns a stable digest for symbols derived not only from type signature
-  ## and owning module, but also implementation body. All procs/varibles used in
+  ## and owning module, but also implementation body. All procs/variables used in
   ## the implementation of this symbol are hashed recursively as well, including
   ## magics from system module.
   discard
diff --git a/lib/deprecated/pure/LockFreeHash.nim b/lib/deprecated/pure/LockFreeHash.nim
index a9e68477a..97e1ef6ad 100644
--- a/lib/deprecated/pure/LockFreeHash.nim
+++ b/lib/deprecated/pure/LockFreeHash.nim
@@ -391,7 +391,7 @@ proc setVal[K, V](table: var PConcTable[K, V], key: int, val: int,
   # Done spinning for a new slot
   var oldVal = atomic_load_n(table[idx].value.addr, ATOMIC_RELAXED)
   if val == oldVal:
-    #echo("this val is alredy in the slot")
+    #echo("this val is already in the slot")
     return oldVal
   nextTable = atomic_load_n(table.next.addr, ATOMIC_SEQ_CST)
   if nextTable == nil and
diff --git a/lib/deprecated/pure/parseopt2.nim b/lib/deprecated/pure/parseopt2.nim
index 9fd6cd2c7..e57b7e2c9 100644
--- a/lib/deprecated/pure/parseopt2.nim
+++ b/lib/deprecated/pure/parseopt2.nim
@@ -42,7 +42,7 @@ type
                               ## the option was given a value
 
 proc initOptParser*(cmdline: seq[string]): OptParser {.rtl.} =
-  ## Initalizes option parses with cmdline. cmdline should not contain
+  ## Initializes option parses with cmdline. cmdline should not contain
   ## argument 0 - program name.
   ## If cmdline.len == 0 default to current command line arguments.
   result.remainingShortOptions = ""
diff --git a/lib/experimental/diff.nim b/lib/experimental/diff.nim
index 9046d7316..d98999912 100644
--- a/lib/experimental/diff.nim
+++ b/lib/experimental/diff.nim
@@ -275,9 +275,9 @@ proc createDiffs(dataA, dataB: DiffData): seq[Item] =
 proc diffInt*(arrayA, arrayB: openArray[int]): seq[Item] =
   ## Find the difference in 2 arrays of integers.
   ##
-  ## ``arrayA`` A-version of the numbers (usualy the old one)
+  ## ``arrayA`` A-version of the numbers (usually the old one)
   ##
-  ## ``arrayB`` B-version of the numbers (usualy the new one)
+  ## ``arrayB`` B-version of the numbers (usually the new one)
   ##
   ## Returns a sequence of Items that describe the differences.
 
@@ -301,7 +301,7 @@ proc diffText*(textA, textB: string): seq[Item] =
   ##
   ## The algorithm itself is comparing 2 arrays of numbers so when comparing 2 text documents
   ## each line is converted into a (hash) number. This hash-value is computed by storing all
-  ## textlines into a common hashtable so i can find dublicates in there, and generating a
+  ## textlines into a common hashtable so i can find duplicates in there, and generating a
   ## new number each time a new textline is inserted.
   ##
   ## ``textA`` A-version of the text (usually the old one)
diff --git a/lib/impure/db_odbc.nim b/lib/impure/db_odbc.nim
index 7b59f8313..a9e304788 100644
--- a/lib/impure/db_odbc.nim
+++ b/lib/impure/db_odbc.nim
@@ -303,7 +303,7 @@ iterator instantRows*(db: var DbConn, query: SqlQuery,
                       args: varargs[string, `$`]): InstantRow
                 {.tags: [ReadDbEffect, WriteDbEffect].} =
   ## Same as fastRows but returns a handle that can be used to get column text
-  ## on demand using []. Returned handle is valid only within the interator body.
+  ## on demand using []. Returned handle is valid only within the iterator body.
   var
     rowRes: Row = @[]
     sz: TSqlInteger = 0
diff --git a/lib/impure/db_postgres.nim b/lib/impure/db_postgres.nim
index 4b156b79f..fde4db119 100644
--- a/lib/impure/db_postgres.nim
+++ b/lib/impure/db_postgres.nim
@@ -182,7 +182,7 @@ proc setRow(res: PPGresult, r: var Row, line, cols: int32) =
 iterator fastRows*(db: DbConn, query: SqlQuery,
                    args: varargs[string, `$`]): Row {.tags: [ReadDbEffect].} =
   ## executes the query and iterates over the result dataset. This is very
-  ## fast, but potenially dangerous: If the for-loop-body executes another
+  ## fast, but potentially dangerous: If the for-loop-body executes another
   ## query, the results can be undefined. For Postgres it is safe though.
   var res = setupQuery(db, query, args)
   var L = pqnfields(res)
diff --git a/lib/impure/nre.nim b/lib/impure/nre.nim
index 8848b8d5b..22f786cd6 100644
--- a/lib/impure/nre.nim
+++ b/lib/impure/nre.nim
@@ -137,7 +137,7 @@ type
     ## into PCRE flags. These include ``NEVER_UTF``, ``ANCHORED``,
     ## ``DOLLAR_ENDONLY``, ``FIRSTLINE``, ``NO_AUTO_CAPTURE``,
     ## ``JAVASCRIPT_COMPAT``, ``U``, ``NO_STUDY``. In other PCRE wrappers, you
-    ## will need to pass these as seperate flags to PCRE.
+    ## will need to pass these as separate flags to PCRE.
     pattern*: string  ## not nil
     pcreObj: ptr pcre.Pcre  ## not nil
     pcreExtra: ptr pcre.ExtraData  ## nil
diff --git a/lib/packages/docutils/rstgen.nim b/lib/packages/docutils/rstgen.nim
index c5cee9c90..b75ff3ea1 100644
--- a/lib/packages/docutils/rstgen.nim
+++ b/lib/packages/docutils/rstgen.nim
@@ -101,7 +101,7 @@ proc initRstGenerator*(g: var RstGenerator, target: OutputTarget,
   ## index hyperlinks to the file, but you can pass an empty string here if you
   ## are parsing a stream in memory. If `filename` ends with the ``.nim``
   ## extension, the title for the document will be set by default to ``Module
-  ## filename``.  This default title can be overriden by the embedded rst, but
+  ## filename``.  This default title can be overridden by the embedded rst, but
   ## it helps to prettify the generated index if no title is found.
   ##
   ## The ``RstParseOptions``, ``FindFileHandler`` and ``MsgHandler`` types
@@ -350,7 +350,7 @@ proc hash(n: PRstNode): int =
 proc renderIndexTerm*(d: PDoc, n: PRstNode, result: var string) =
   ## Renders the string decorated within \`foobar\`\:idx\: markers.
   ##
-  ## Additionally adds the encosed text to the index as a term. Since we are
+  ## Additionally adds the enclosed text to the index as a term. Since we are
   ## interested in different instances of the same term to have different
   ## entries, a table is used to keep track of the amount of times a term has
   ## previously appeared to give a different identifier value for each.
diff --git a/lib/posix/posix.nim b/lib/posix/posix.nim
index a285928c2..8fcb9cb5c 100644
--- a/lib/posix/posix.nim
+++ b/lib/posix/posix.nim
@@ -29,7 +29,7 @@
 
 # Dead code elimination ensures that we don't accidentally generate #includes
 # for files that might not exist on a specific platform! The user will get an
-# error only if they actualy try to use the missing declaration
+# error only if they actually try to use the missing declaration
 {.deadCodeElim: on.}  # dce option deprecated
 
 when defined(nimHasStyleChecks):
diff --git a/lib/posix/posix_utils.nim b/lib/posix/posix_utils.nim
index ea6ef60f4..20a71971a 100644
--- a/lib/posix/posix_utils.nim
+++ b/lib/posix/posix_utils.nim
@@ -83,7 +83,7 @@ proc sendSignal*(pid: Pid, signal: int) =
 proc mkstemp*(prefix: string): (string, File) =
   ## Creates a unique temporary file from a prefix string. Adds a six chars suffix.
   ## The file is created with perms 0600.
-  ## Returs the filename and a file opened in r/w mode.
+  ## Returns the filename and a file opened in r/w mode.
   var tmpl = cstring(prefix & "XXXXXX")
   let fd = mkstemp(tmpl)
   var f: File
diff --git a/lib/pure/asyncdispatch.nim b/lib/pure/asyncdispatch.nim
index f4dc3de39..0eed1b929 100644
--- a/lib/pure/asyncdispatch.nim
+++ b/lib/pure/asyncdispatch.nim
@@ -198,7 +198,7 @@ proc processTimers(
     dec count
     didSomeWork = true
 
-  # Return the number of miliseconds in which the next timer will expire.
+  # Return the number of milliseconds in which the next timer will expire.
   if p.timers.len == 0: return
 
   let millisecs = (p.timers[0].finishAt - getMonoTime()).inMilliseconds
diff --git a/lib/pure/asyncstreams.nim b/lib/pure/asyncstreams.nim
index 573663f55..7ab4ab4bb 100644
--- a/lib/pure/asyncstreams.nim
+++ b/lib/pure/asyncstreams.nim
@@ -74,7 +74,7 @@ proc write*[T](future: FutureStream[T], value: T): Future[void] =
     result.fail(newException(ValueError, msg))
     return
   # TODO: Implement limiting of the streams storage to prevent it growing
-  # infinitely when no reads are occuring.
+  # infinitely when no reads are occurring.
   future.queue.addLast(value)
   if not future.cb.isNil: future.cb()
   result.complete()
diff --git a/lib/pure/bitops.nim b/lib/pure/bitops.nim
index 92e9ddf27..033c54a6a 100644
--- a/lib/pure/bitops.nim
+++ b/lib/pure/bitops.nim
@@ -23,7 +23,7 @@
 ## to force predictable behaviour for all input, causing a small performance hit.
 ##
 ## At this time only `fastLog2`, `firstSetBit, `countLeadingZeroBits`, `countTrailingZeroBits`
-## may return undefined and/or platform dependant value if given invalid input.
+## may return undefined and/or platform dependent value if given invalid input.
 
 proc bitnot*[T: SomeInteger](x: T): T {.magic: "BitnotI", noSideEffect.}
   ## Computes the `bitwise complement` of the integer `x`.
diff --git a/lib/pure/collections/sequtils.nim b/lib/pure/collections/sequtils.nim
index 3518a7ea0..9ca40de70 100644
--- a/lib/pure/collections/sequtils.nim
+++ b/lib/pure/collections/sequtils.nim
@@ -848,7 +848,7 @@ template mapIt*(s: typed, op: untyped): untyped =
     result
 
 template mapIt*(s, typ, op: untyped): untyped {.error:
-  "Deprecated since v0.12; Use 'mapIt(seq1, op)' - without specifying the type of the returned seqence".} =
+  "Deprecated since v0.12; Use 'mapIt(seq1, op)' - without specifying the type of the returned sequence".} =
   var result: seq[typ] = @[]
   for it {.inject.} in items(s):
     result.add(op)
@@ -883,7 +883,7 @@ template newSeqWith*(len: int, init: untyped): untyped =
   ## or to populate fields of the created sequence.
   ##
   runnableExamples:
-    ## Creates a seqence containing 5 bool sequences, each of length of 3.
+    ## Creates a sequence containing 5 bool sequences, each of length of 3.
     var seq2D = newSeqWith(5, newSeq[bool](3))
     assert seq2D.len == 5
     assert seq2D[0].len == 3
diff --git a/lib/pure/concurrency/atomics.nim b/lib/pure/concurrency/atomics.nim
index 32c37236f..83459425b 100644
--- a/lib/pure/concurrency/atomics.nim
+++ b/lib/pure/concurrency/atomics.nim
@@ -47,7 +47,7 @@ when defined(cpp) or defined(nimdoc):
         ## Behaves like Acquire when applied to load, like Release when
         ## applied to a store and like AcquireRelease when applied to a
         ## read-modify-write operation.
-        ## Also garantees that all threads observe the same total ordering
+        ## Also guarantees that all threads observe the same total ordering
         ## with other moSequentiallyConsistent operations.
 
   type
diff --git a/lib/pure/concurrency/cpuinfo.nim b/lib/pure/concurrency/cpuinfo.nim
index 6fc5eb95b..415b9a787 100644
--- a/lib/pure/concurrency/cpuinfo.nim
+++ b/lib/pure/concurrency/cpuinfo.nim
@@ -50,7 +50,7 @@ when defined(haiku):
                                                     header: "<OS.h>".}
 
 proc countProcessors*(): int {.rtl, extern: "ncpi$1".} =
-  ## returns the numer of the processors/cores the machine has.
+  ## returns the number of the processors/cores the machine has.
   ## Returns 0 if it cannot be detected.
   when defined(windows):
     type
diff --git a/lib/pure/htmlparser.nim b/lib/pure/htmlparser.nim
index d013c6342..be61bb0d8 100644
--- a/lib/pure/htmlparser.nim
+++ b/lib/pure/htmlparser.nim
@@ -2025,7 +2025,7 @@ proc parseHtml*(s: Stream, filename: string,
   #if x.kind != xmlEof:
   #  adderr(errorMsg(x, "EOF expected"))
   while x.kind != xmlEof:
-    var oldPos = x.bufpos # little hack to see if we made any progess
+    var oldPos = x.bufpos # little hack to see if we made any progress
     result.addNode(parse(x, errors))
     if x.bufpos == oldPos:
       # force progress!
diff --git a/lib/pure/json.nim b/lib/pure/json.nim
index 3480a76b7..530408b9f 100644
--- a/lib/pure/json.nim
+++ b/lib/pure/json.nim
@@ -30,7 +30,7 @@
 ## ``JNull``. You check the kind of this object variant by using the ``kind``
 ## accessor.
 ##
-## For a ``JsonNode`` who's kind is ``JObject``, you can acess its fields using
+## For a ``JsonNode`` who's kind is ``JObject``, you can access its fields using
 ## the ``[]`` operator. The following example shows how to do this:
 ##
 ## .. code-block:: Nim
diff --git a/lib/pure/lenientops.nim b/lib/pure/lenientops.nim
index c70e12e5f..cdea780a2 100644
--- a/lib/pure/lenientops.nim
+++ b/lib/pure/lenientops.nim
@@ -12,7 +12,7 @@
 ## which work for mixed float/int operands.
 ## All operations convert the integer operand into the
 ## type of the float operand. For numerical expressions, the return
-## type is always the type of the float involved in the expresssion,
+## type is always the type of the float involved in the expression,
 ## i.e., there is no auto conversion from float32 to float64.
 ##
 ## Note: In general, auto-converting from int to float loses
diff --git a/lib/pure/memfiles.nim b/lib/pure/memfiles.nim
index 68eacaa36..a6327b12e 100644
--- a/lib/pure/memfiles.nim
+++ b/lib/pure/memfiles.nim
@@ -303,7 +303,7 @@ when defined(posix) or defined(nimdoc):
     ## resize and re-map the file underlying an ``allowRemap MemFile``.
     ## **Note**: this assumes the entire file is mapped read-write at offset zero.
     ## Also, the value of ``.mem`` will probably change.
-    ## **Note**: This is not (yet) avaiable on Windows.
+    ## **Note**: This is not (yet) available on Windows.
     when defined(posix):
       if f.handle == -1:
         raise newException(IOError,
diff --git a/lib/pure/net.nim b/lib/pure/net.nim
index c337680f1..03a8d3a6b 100644
--- a/lib/pure/net.nim
+++ b/lib/pure/net.nim
@@ -230,7 +230,7 @@ proc newSocket*(domain: Domain = AF_INET, sockType: SockType = SOCK_STREAM,
   result = newSocket(fd, domain, sockType, protocol, buffered)
 
 proc parseIPv4Address(addressStr: string): IpAddress =
-  ## Parses IPv4 adresses
+  ## Parses IPv4 addresses
   ## Raises ValueError on errors
   var
     byteCount = 0
@@ -264,7 +264,7 @@ proc parseIPv4Address(addressStr: string): IpAddress =
   result.address_v4[byteCount] = cast[uint8](currentByte)
 
 proc parseIPv6Address(addressStr: string): IpAddress =
-  ## Parses IPv6 adresses
+  ## Parses IPv6 addresses
   ## Raises ValueError on errors
   result = IpAddress(family: IpAddressFamily.IPv6)
   if addressStr.len < 2:
@@ -1657,7 +1657,7 @@ proc connect*(socket: Socket, address: string, port = Port(0),
     timeout: int) {.tags: [ReadIOEffect, WriteIOEffect].} =
   ## Connects to server as specified by ``address`` on port specified by ``port``.
   ##
-  ## The ``timeout`` paremeter specifies the time in milliseconds to allow for
+  ## The ``timeout`` parameter specifies the time in milliseconds to allow for
   ## the connection to the server to be made.
   socket.fd.setBlocking(false)
 
diff --git a/lib/pure/os.nim b/lib/pure/os.nim
index e59c0962d..e8ece37c1 100644
--- a/lib/pure/os.nim
+++ b/lib/pure/os.nim
@@ -382,7 +382,7 @@ iterator parentDirs*(path: string, fromRoot=false, inclusive=true): string =
   ## Walks over all parent directories of a given `path`.
   ##
   ## If `fromRoot` is true (default: false), the traversal will start from
-  ## the file system root diretory.
+  ## the file system root directory.
   ## If `inclusive` is true (default), the original argument will be included
   ## in the traversal.
   ##
@@ -781,7 +781,7 @@ proc getTempDir*(): string {.rtl, extern: "nos$1",
   ## **Please do not use this**: On Android, it currently
   ## returns ``getHomeDir()``, and on other Unix based systems it can cause
   ## security problems too. That said, you can override this implementation
-  ## by adding ``-d:tempDir=mytempname`` to your compiler invokation.
+  ## by adding ``-d:tempDir=mytempname`` to your compiler invocation.
   ##
   ## See also:
   ## * `getHomeDir proc <#getHomeDir>`_
@@ -1868,7 +1868,7 @@ type
 proc getCurrentCompilerExe*(): string {.compileTime.} = discard
   ## This is `getAppFilename() <#getAppFilename>`_ at compile time.
   ##
-  ## Can be used to retrive the currently executing
+  ## Can be used to retrieve the currently executing
   ## Nim compiler from a Nim or nimscript program, or the nimble binary
   ## inside a nimble program (likewise with other binaries built from
   ## compiler API).
@@ -2475,7 +2475,7 @@ when defined(nimdoc):
     ##
     ## Unlike `argc`:idx: in C, if your binary was called without parameters this
     ## will return zero.
-    ## You can query each individual paramater with `paramStr proc <#paramStr,int>`_
+    ## You can query each individual parameter with `paramStr proc <#paramStr,int>`_
     ## or retrieve all of them in one go with `commandLineParams proc
     ## <#commandLineParams>`_.
     ##
diff --git a/lib/pure/parsecsv.nim b/lib/pure/parsecsv.nim
index 402e3ad31..91c878078 100644
--- a/lib/pure/parsecsv.nim
+++ b/lib/pure/parsecsv.nim
@@ -318,7 +318,7 @@ proc readHeaderRow*(my: var CsvParser) =
     my.headers = my.row
 
 proc rowEntry*(my: var CsvParser, entry: string): var string =
-  ## Acceses a specified `entry` from the current row.
+  ## Accesses a specified `entry` from the current row.
   ##
   ## Assumes that `readHeaderRow <#readHeaderRow,CsvParser>`_ has already been
   ## called.
diff --git a/lib/pure/parsesql.nim b/lib/pure/parsesql.nim
index 0b4249d2a..042d5374f 100644
--- a/lib/pure/parsesql.nim
+++ b/lib/pure/parsesql.nim
@@ -711,7 +711,7 @@ proc identOrLiteral(p: var SqlParser): SqlNode =
       getTok(p)
     else:
       sqlError(p, "expression expected")
-      getTok(p) # we must consume a token here to prevend endless loops!
+      getTok(p) # we must consume a token here to prevent endless loops!
 
 proc primary(p: var SqlParser): SqlNode =
   if (p.tok.kind == tkOperator and (p.tok.literal == "+" or p.tok.literal == "-")) or isKeyw(p, "not"):
diff --git a/lib/pure/parseutils.nim b/lib/pure/parseutils.nim
index a4032f8f3..e0561116e 100644
--- a/lib/pure/parseutils.nim
+++ b/lib/pure/parseutils.nim
@@ -634,7 +634,7 @@ iterator interpolatedFragments*(s: string): tuple[kind: InterpolatedKind,
         kind = ikDollar
       else:
         raise newException(ValueError,
-          "Unable to parse a varible name at " & substr(s, i, s.high))
+          "Unable to parse a variable name at " & substr(s, i, s.high))
     else:
       while j < s.len and s[j] != '$': inc j
       kind = ikStr
diff --git a/lib/pure/parsexml.nim b/lib/pure/parsexml.nim
index 686aad110..c1268bc1d 100644
--- a/lib/pure/parsexml.nim
+++ b/lib/pure/parsexml.nim
@@ -154,7 +154,7 @@ import
 #  xmlElementCloseEnd, ## ``/>``
 
 type
-  XmlEventKind* = enum ## enumation of all events that may occur when parsing
+  XmlEventKind* = enum ## enumeration of all events that may occur when parsing
     xmlError,           ## an error occurred during parsing
     xmlEof,             ## end of file reached
     xmlCharData,        ## character data
diff --git a/lib/pure/selectors.nim b/lib/pure/selectors.nim
index 9b149e26c..0ab1e7754 100644
--- a/lib/pure/selectors.nim
+++ b/lib/pure/selectors.nim
@@ -186,7 +186,7 @@ when defined(nimdoc):
   proc setData*[T](s: Selector[T], fd: SocketHandle|int, data: var T): bool =
     ## Associate application-defined ``data`` with descriptor ``fd``.
     ##
-    ## Returns ``true``, if data was succesfully updated, ``false`` otherwise.
+    ## Returns ``true``, if data was successfully updated, ``false`` otherwise.
 
   template isEmpty*[T](s: Selector[T]): bool = # TODO: Why is this a template?
     ## Returns ``true``, if there are no registered events or descriptors
@@ -316,7 +316,7 @@ else:
 
   proc verifySelectParams(timeout: int) =
     # Timeout of -1 means: wait forever
-    # Anything higher is the time to wait in miliseconds.
+    # Anything higher is the time to wait in milliseconds.
     doAssert(timeout >= -1, "Cannot select with a negative value, got " & $timeout)
 
   when defined(linux):
diff --git a/lib/pure/smtp.nim b/lib/pure/smtp.nim
index 577f6174e..cfe532ba4 100644
--- a/lib/pure/smtp.nim
+++ b/lib/pure/smtp.nim
@@ -206,7 +206,7 @@ proc auth*(smtp: Smtp | AsyncSmtp, username, password: string) {.multisync.} =
   await smtp.checkReply("334") # TODO: Same as above, only "Password:" (I think?)
 
   await smtp.debugSend(encode(password) & "\c\L")
-  await smtp.checkReply("235") # Check whether the authentification was successful.
+  await smtp.checkReply("235") # Check whether the authentication was successful.
 
 proc sendMail*(smtp: Smtp | AsyncSmtp, fromAddr: string,
                toAddrs: seq[string], msg: string) {.multisync.} =
diff --git a/lib/pure/strformat.nim b/lib/pure/strformat.nim
index af9568d92..25310c125 100644
--- a/lib/pure/strformat.nim
+++ b/lib/pure/strformat.nim
@@ -299,7 +299,7 @@ type
     alternateForm*: bool            ## Whether to prefix binary, octal and hex numbers
                                     ## with ``0b``, ``0o``, ``0x``.
     padWithZero*: bool              ## Whether to pad with zeros rather than spaces.
-    minimumWidth*, precision*: int  ## Desired minium width and precision.
+    minimumWidth*, precision*: int  ## Desired minimum width and precision.
     typ*: char                      ## Type like 'f', 'g' or 'd'.
     endPosition*: int ## End position in the format specifier after
                       ## ``parseStandardFormatSpecifier`` returned.
@@ -617,7 +617,7 @@ when isMainModule:
   check &"{1f:.3f}", "1.000"
   check &"Hello, {s}!", "Hello, string!"
 
-  # Tests for identifers without parenthesis
+  # Tests for identifiers without parenthesis
   check &"{s} works{s}", "string worksstring"
   check &"{s:>7}", " string"
   doAssert(not compiles(&"{s_works}")) # parsed as identifier `s_works`
diff --git a/lib/pure/strtabs.nim b/lib/pure/strtabs.nim
index 0726eb15d..a1429a2f7 100644
--- a/lib/pure/strtabs.nim
+++ b/lib/pure/strtabs.nim
@@ -326,7 +326,7 @@ proc del*(t: StringTableRef, key: string) =
   ## Removes `key` from `t`.
   ##
   ## See also:
-  ## * `clear proc <#clear,StringTableRef,StringTableMode>`_ for reseting a
+  ## * `clear proc <#clear,StringTableRef,StringTableMode>`_ for resetting a
   ##   table to be empty
   ## * `[]= proc <#[]=,StringTableRef,string,string>`_ for inserting a new
   ##   (key, value) pair in the table
diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim
index c22caa6f2..29a8afa58 100644
--- a/lib/pure/strutils.nim
+++ b/lib/pure/strutils.nim
@@ -2017,7 +2017,7 @@ proc countLines*(s: string): int {.noSideEffect,
   ## `character literal <manual.html#lexical-analysis-character-literals>`_
   ## newline combination (CR, LF, CR-LF) is supported.
   ##
-  ## In this context, a line is any string seperated by a newline combination.
+  ## In this context, a line is any string separated by a newline combination.
   ## A line can be an empty string.
   ##
   ## See also:
@@ -2145,7 +2145,7 @@ proc multiReplace*(s: string, replacements: varargs[(string, string)]): string {
   ## pass through the input string.
   ##
   ## `multiReplace` performs all replacements in a single pass, this means it
-  ## can be used to swap the occurences of "a" and "b", for instance.
+  ## can be used to swap the occurrences of "a" and "b", for instance.
   ##
   ## If the resulting string is not longer than the original input string,
   ## only a single memory allocation is required.
@@ -2280,14 +2280,14 @@ proc validIdentifier*(s: string): bool {.noSideEffect,
     return true
 
 
-# floating point formating:
+# floating point formatting:
 when not defined(js):
   proc c_sprintf(buf, frmt: cstring): cint {.header: "<stdio.h>",
                                      importc: "sprintf", varargs, noSideEffect.}
 
 type
   FloatFormatMode* = enum
-    ## the different modes of floating point formating
+    ## the different modes of floating point formatting
     ffDefault,   ## use the shorter floating point notation
     ffDecimal,   ## use decimal floating point notation
     ffScientific ## use scientific notation (using ``e`` character)
@@ -2892,7 +2892,7 @@ proc editDistance*(a, b: string): int {.noSideEffect,
   inc(len1)
   inc(len2)
   var half = len1 shr 1
-  # initalize first row:
+  # initialize first row:
   #var row = cast[ptr array[0..high(int) div 8, int]](alloc(len2*sizeof(int)))
   var row: seq[int]
   newSeq(row, len2)
diff --git a/lib/pure/times.nim b/lib/pure/times.nim
index 3e2557314..d8e466dc7 100644
--- a/lib/pure/times.nim
+++ b/lib/pure/times.nim
@@ -133,7 +133,7 @@
   The ``times`` module exports two similar types that are both used to
   represent some amount of time: `Duration <#Duration>`_ and
   `TimeInterval <#TimeInterval>`_.
-  This section explains how they differ and when one should be prefered over the
+  This section explains how they differ and when one should be preferred over the
   other (short answer: use ``Duration`` unless support for months and years is
   needed).
 
@@ -152,7 +152,7 @@
   A ``TimeInterval`` represents an amount of time expressed in calendar
   units, for example "1 year and 2 days". Since some units cannot be
   normalized (the length of a year is different for leap years for example),
-  the ``TimeInterval`` type uses seperate fields for every unit. The
+  the ``TimeInterval`` type uses separate fields for every unit. The
   ``TimeInterval``'s returned from this module generally don't normalize
   **anything**, so even units that could be normalized (like seconds,
   milliseconds and so on) are left untouched.
@@ -393,7 +393,7 @@ type
     years*: int        ## The number of years
 
   Timezone* = ref object ## \
-      ## Timezone interface for supporting `DateTime <#DateTime>`_\s of arbritary
+      ## Timezone interface for supporting `DateTime <#DateTime>`_\s of arbitrary
       ## timezones. The ``times`` module only supplies implementations for the
       ## systems local time and UTC.
     zonedTimeFromTimeImpl: proc (x: Time): ZonedTime
@@ -2526,7 +2526,7 @@ when not defined(JS):
     ## because sub-second resolution is likely to be supported (depending
     ## on the hardware/OS).
     ##
-    ## ``getTime`` should generally be prefered over this proc.
+    ## ``getTime`` should generally be preferred over this proc.
     when defined(macosx):
       var a: Timeval
       gettimeofday(a)
diff --git a/lib/pure/unittest.nim b/lib/pure/unittest.nim
index 46d63db8b..df2424e57 100644
--- a/lib/pure/unittest.nim
+++ b/lib/pure/unittest.nim
@@ -134,7 +134,7 @@ type
       ## non-js target to true or false respectively.
       ## The deprecated environment variable
       ## ``NIMTEST_NO_COLOR``, when set,
-      ## changes the defualt to true, if
+      ## changes the default to true, if
       ## ``NIMTEST_COLOR`` is undefined.
     outputLevel: OutputLevel
       ## Set the verbosity of test results.
diff --git a/lib/std/editdistance.nim b/lib/std/editdistance.nim
index 1e200e332..6acb7388f 100644
--- a/lib/std/editdistance.nim
+++ b/lib/std/editdistance.nim
@@ -210,7 +210,7 @@ proc editDistanceAscii*(a, b: string): int {.noSideEffect.} =
   inc(len1)
   inc(len2)
   var half = len1 shr 1
-  # initalize first row:
+  # initialize first row:
   #var row = cast[ptr array[0..high(int) div 8, int]](alloc(len2*sizeof(int)))
   var row: seq[int]
   newSeq(row, len2)
diff --git a/lib/system.nim b/lib/system.nim
index 3042b0693..28d2e4be6 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -477,14 +477,14 @@ when defined(nimArrIdx):
     x: S) {.noSideEffect, magic: "ArrPut".}
 
   proc `=destroy`*[T](x: var T) {.inline, magic: "Destroy".} =
-    ## Generic `destructor`:idx: implementation that can be overriden.
+    ## Generic `destructor`:idx: implementation that can be overridden.
     discard
   proc `=sink`*[T](x: var T; y: T) {.inline, magic: "Asgn".} =
-    ## Generic `sink`:idx: implementation that can be overriden.
+    ## Generic `sink`:idx: implementation that can be overridden.
     shallowCopy(x, y)
 
 type
-  HSlice*[T, U] = object   ## "Heterogenous" slice type.
+  HSlice*[T, U] = object   ## "Heterogeneous" slice type.
     a*: T                  ## The lower bound (inclusive).
     b*: U                  ## The upper bound (inclusive).
   Slice*[T] = HSlice[T, T] ## An alias for ``HSlice[T, T]``.
@@ -2314,7 +2314,7 @@ proc addQuitProc*(quitProc: proc() {.noconv.}) {.
   ## registered.
 
 # Support for addQuitProc() is done by Ansi C's facilities here.
-# In case of an unhandled exeption the exit handlers should
+# In case of an unhandled exception the exit handlers should
 # not be called explicitly! The user may decide to do this manually though.
 
 when not defined(nimscript) and not defined(JS):
@@ -3974,7 +3974,7 @@ proc `[]=`*[Idx, T, U, V](a: var array[Idx, T], x: HSlice[U, V], b: openArray[T]
   if L == b.len:
     for i in 0..<L: a[Idx(i + xa)] = b[i]
   else:
-    sysFatal(RangeError, "diferent lengths for slice assignment")
+    sysFatal(RangeError, "different lengths for slice assignment")
 
 proc `[]`*[T, U, V](s: openArray[T], x: HSlice[U, V]): seq[T] =
   ## Slice operation for sequences.
@@ -4224,7 +4224,7 @@ proc addEscapedChar*(s: var string, c: char) {.noSideEffect, inline.} =
   ##   by ``\xHH`` where ``HH`` is its hexadecimal value.
   ##
   ## The procedure has been designed so that its output is usable for many
-  ## diferent common syntaxes.
+  ## different common syntaxes.
   ##
   ## **Note**: This is **not correct** for producing Ansi C code!
   case c
@@ -4254,7 +4254,7 @@ proc addQuoted*[T](s: var string, x: T) =
   ## See `addEscapedChar <#addEscapedChar,string,char>`_
   ## for the escaping scheme. When `x` is a string, characters in the
   ## range ``{\128..\255}`` are never escaped so that multibyte UTF-8
-  ## characters are untouched (note that this behavior is diferent from
+  ## characters are untouched (note that this behavior is different from
   ## ``addEscapedChar``).
   ##
   ## The Nim standard library uses this function on the elements of
@@ -4315,7 +4315,7 @@ when hasAlloc:
       x.add(y)
 
   proc safeAdd*(x: var string, y: string) {.noSideEffect, deprecated.} =
-    ## Adds ``y`` to ``x`` unless ``x`` is not yet initalized; in that
+    ## Adds ``y`` to ``x`` unless ``x`` is not yet initialized; in that
     ## case, ``x`` becomes ``y``.
     when defined(nimNoNilSeqs):
       x.add(y)
diff --git a/lib/system/gc.nim b/lib/system/gc.nim
index 1aea9d27b..911b49fdb 100644
--- a/lib/system/gc.nim
+++ b/lib/system/gc.nim
@@ -244,7 +244,7 @@ proc asgnRefNoCycle(dest: PPointer, src: pointer) {.compilerproc, inline,
 
 proc unsureAsgnRef(dest: PPointer, src: pointer) {.compilerproc.} =
   # unsureAsgnRef updates the reference counters only if dest is not on the
-  # stack. It is used by the code generator if it cannot decide wether a
+  # stack. It is used by the code generator if it cannot decide whether a
   # reference is in the stack or not (this can happen for var parameters).
   if not isOnStack(dest):
     if src != nil: incRef(usrToCell(src))
diff --git a/lib/system/gc2.nim b/lib/system/gc2.nim
index cdf472b43..4da9b4f94 100644
--- a/lib/system/gc2.nim
+++ b/lib/system/gc2.nim
@@ -240,7 +240,7 @@ proc asgnRefNoCycle(dest: PPointer, src: pointer) {.compilerproc, inline,
 
 proc unsureAsgnRef(dest: PPointer, src: pointer) {.compilerproc.} =
   # unsureAsgnRef marks 'src' as grey only if dest is not on the
-  # stack. It is used by the code generator if it cannot decide wether a
+  # stack. It is used by the code generator if it cannot decide whether a
   # reference is in the stack or not (this can happen for var parameters).
   if src != nil:
     let s = usrToCell(src)
diff --git a/lib/system/mmdisp.nim b/lib/system/mmdisp.nim
index d2edacce7..ae30dbc73 100644
--- a/lib/system/mmdisp.nim
+++ b/lib/system/mmdisp.nim
@@ -42,7 +42,7 @@ type
 # CPU this needs to be changed:
 const
   PageShift = when defined(cpu16): 8 else: 12 # \
-    # my tests showed no improvments for using larger page sizes.
+    # my tests showed no improvements for using larger page sizes.
   PageSize = 1 shl PageShift
   PageMask = PageSize-1
 
diff --git a/lib/wrappers/sqlite3.nim b/lib/wrappers/sqlite3.nim
index 45ccbe6c0..b96a70ef3 100644
--- a/lib/wrappers/sqlite3.nim
+++ b/lib/wrappers/sqlite3.nim
@@ -62,7 +62,7 @@ const
   SQLITE_EMPTY* = 16          # Database is empty
   SQLITE_SCHEMA* = 17         # The database schema changed
   SQLITE_TOOBIG* = 18         # Too much data for one row of a table
-  SQLITE_CONSTRAINT* = 19     # Abort due to contraint violation
+  SQLITE_CONSTRAINT* = 19     # Abort due to constraint violation
   SQLITE_MISMATCH* = 20       # Data type mismatch
   SQLITE_MISUSE* = 21         # Library used incorrectly
   SQLITE_NOLFS* = 22          # Uses OS features not supported on host