diff --git a/config/nimdoc.cfg b/config/nimdoc.cfg index 464c506c45..3abae73885 100644 --- a/config/nimdoc.cfg +++ b/config/nimdoc.cfg @@ -130,7 +130,7 @@ html { -ms-text-size-adjust: 100%; } /* Where we want fancier font if available */ -h1, h2, h3, h4, h5, h6, p.module-desc, blockquote p { +h1, h2, h3, h4, h5, h6, p.module-desc, table.docinfo + blockquote p, table.docinfo blockquote p, h1 + blockquote p { font-family: "Raleway", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif !important; } h1.title { @@ -523,9 +523,13 @@ abbr.initialism { blockquote { padding: 0 0 0 15px; margin: 0 0 20px; - border-left: 5px solid #c9c9c9; } + border-left: 5px solid #EFEBE0; } -blockquote p { +table.docinfo + blockquote, table.docinfo blockquote, h1 + blockquote { + border-left: 5px solid #c9c9c9; +} + +table.docinfo + blockquote p, table.docinfo blockquote p, h1 + blockquote p { margin-bottom: 0; font-size: 15px; font-weight: 200; @@ -605,6 +609,10 @@ table { border-collapse: collapse; border-spacing: 0; } +table th, table td { + padding: 0px 8px 0px; +} + .table { width: 100%; margin-bottom: 20px; } diff --git a/doc/basicopt.txt b/doc/basicopt.txt index e8aaa2e4c1..ffb374f188 100644 --- a/doc/basicopt.txt +++ b/doc/basicopt.txt @@ -1,5 +1,6 @@ -Usage:: - nim command [options] [projectfile] [arguments] +:: + + nim command [options] [projectfile] [arguments] Command: //compile, c compile project with default code generator (C) diff --git a/doc/gc.txt b/doc/gc.txt index d6e2285582..ac8d46cfa3 100644 --- a/doc/gc.txt +++ b/doc/gc.txt @@ -2,11 +2,15 @@ Nim's Garbage Collector ========================== -:Author: Andreas Rumpf -:Version: |nimversion| +:Author: Andreas Rumpf +:Version: |nimversion| + +.. + "The road to hell is paved with good intentions." + Introduction ============ diff --git a/doc/nimc.txt b/doc/nimc.txt index 1f2675df89..92acd3979d 100644 --- a/doc/nimc.txt +++ b/doc/nimc.txt @@ -28,10 +28,14 @@ Compiler Usage Command line switches --------------------- -Basic command line switches are: +Basic command line switches are: + +Usage: .. include:: basicopt.txt +---- + Advanced command line switches are: .. include:: advopt.txt diff --git a/lib/pure/httpclient.nim b/lib/pure/httpclient.nim index a7e1aeab21..3afb625eec 100644 --- a/lib/pure/httpclient.nim +++ b/lib/pure/httpclient.nim @@ -156,7 +156,9 @@ proc parseChunks(s: Socket, timeout: int): string = else: httpError("Invalid chunk size: " & chunkSizeStr) inc(i) - if chunkSize <= 0: break + if chunkSize <= 0: + s.skip(2, timeout) # Skip \c\L + break result.setLen(ri+chunkSize) var bytesRead = 0 while bytesRead != chunkSize: @@ -521,7 +523,9 @@ proc parseChunks(client: AsyncHttpClient): Future[string] {.async.} = else: httpError("Invalid chunk size: " & chunkSizeStr) inc(i) - if chunkSize <= 0: break + if chunkSize <= 0: + discard await recvFull(client.socket, 2) # Skip \c\L + break result.add await recvFull(client.socket, chunkSize) discard await recvFull(client.socket, 2) # Skip \c\L # Trailer headers will only be sent if the request specifies that we want diff --git a/lib/pure/unittest.nim b/lib/pure/unittest.nim index fa2e30ef4c..6c0246f8b3 100644 --- a/lib/pure/unittest.nim +++ b/lib/pure/unittest.nim @@ -35,7 +35,7 @@ var abortOnError* {.threadvar.}: bool outputLevel* {.threadvar.}: OutputLevel colorOutput* {.threadvar.}: bool - + checkpoints {.threadvar.}: seq[string] checkpoints = @[] @@ -61,23 +61,23 @@ proc testDone(name: string, s: TestStatus) = programResult += 1 if outputLevel != PRINT_NONE and (outputLevel == PRINT_ALL or s == FAILED): - template rawPrint() = echo("[", $s, "] ", name, "\n") + template rawPrint() = echo("[", $s, "] ", name) when not defined(ECMAScript): if colorOutput and not defined(ECMAScript): var color = (if s == OK: fgGreen else: fgRed) - styledEcho styleBright, color, "[", $s, "] ", fgWhite, name, "\n" + styledEcho styleBright, color, "[", $s, "] ", fgWhite, name else: rawPrint() else: rawPrint() - + template test*(name: expr, body: stmt): stmt {.immediate, dirty.} = bind shouldRun, checkpoints, testDone if shouldRun(name): checkpoints = @[] var testStatusIMPL {.inject.} = OK - + try: testSetupIMPL() body @@ -101,7 +101,7 @@ template fail* = when not defined(ECMAScript): if abortOnError: quit(1) - + when declared(testStatusIMPL): testStatusIMPL = FAILED else: @@ -111,7 +111,7 @@ template fail* = macro check*(conditions: stmt): stmt {.immediate.} = let checked = callsite()[1] - + var argsAsgns = newNimNode(nnkStmtList) argsPrintOuts = newNimNode(nnkStmtList) @@ -120,7 +120,7 @@ macro check*(conditions: stmt): stmt {.immediate.} = template asgn(a, value: expr): stmt = var a = value # XXX: we need "var: var" here in order to # preserve the semantics of var params - + template print(name, value: expr): stmt = when compiles(string($value)): checkpoint(name & " was " & $value) @@ -146,7 +146,7 @@ macro check*(conditions: stmt): stmt {.immediate.} = checkpoint(lineInfoLit & ": Check failed: " & callLit) argPrintOuts fail() - + var checkedStr = checked.toStrLit inspectArgs(checked) result = getAst(rewrite(checked, checked.lineinfo, checkedStr, diff --git a/tools/nimweb.nim b/tools/nimweb.nim index d56b6aecf4..74f561b52a 100644 --- a/tools/nimweb.nim +++ b/tools/nimweb.nim @@ -268,18 +268,18 @@ proc buildDoc(c: var TConfigData, destPath: string) = commands = newSeq[string](len(c.doc) + len(c.srcdoc) + len(c.srcdoc2)) i = 0 for d in items(c.doc): - commands[i] = "nim rst2html $# --docSeeSrcUrl:$#/$#/$# -o:$# --index:on $#" % - [c.nimArgs, c.gitRepo, c.gitCommit, splitFile(d).dir, + commands[i] = "nim rst2html $# --docSeeSrcUrl:$#/$# -o:$# --index:on $#" % + [c.nimArgs, c.gitRepo, c.gitCommit, destPath / changeFileExt(splitFile(d).name, "html"), d] i.inc for d in items(c.srcdoc): - commands[i] = "nim doc $# --docSeeSrcUrl:$#/$#/$# -o:$# --index:on $#" % - [c.nimArgs, c.gitRepo, c.gitCommit, splitFile(d).dir, + commands[i] = "nim doc $# --docSeeSrcUrl:$#/$# -o:$# --index:on $#" % + [c.nimArgs, c.gitRepo, c.gitCommit, destPath / changeFileExt(splitFile(d).name, "html"), d] i.inc for d in items(c.srcdoc2): - commands[i] = "nim doc2 $# --docSeeSrcUrl:$#/$#/$# -o:$# --index:on $#" % - [c.nimArgs, c.gitRepo, c.gitCommit, splitFile(d).dir, + commands[i] = "nim doc2 $# --docSeeSrcUrl:$#/$# -o:$# --index:on $#" % + [c.nimArgs, c.gitRepo, c.gitCommit, destPath / changeFileExt(splitFile(d).name, "html"), d] i.inc @@ -311,8 +311,8 @@ proc buildAddDoc(c: var TConfigData, destPath: string) = # build additional documentation (without the index): var commands = newSeq[string](c.webdoc.len) for i, doc in pairs(c.webdoc): - commands[i] = "nim doc $# --docSeeSrcUrl:$#/$#/$# -o:$# $#" % - [c.nimArgs, c.gitRepo, c.gitCommit, splitFile(doc).dir, + commands[i] = "nim doc $# --docSeeSrcUrl:$#/$# -o:$# $#" % + [c.nimArgs, c.gitRepo, c.gitCommit, destPath / changeFileExt(splitFile(doc).name, "html"), doc] mexec(commands, c.numProcessors) diff --git a/web/assets/images/nim-logo.svg b/web/assets/images/nim-logo.svg new file mode 100644 index 0000000000..feae6c3d7e --- /dev/null +++ b/web/assets/images/nim-logo.svg @@ -0,0 +1,500 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/web/download.txt b/web/download.txt index 59ecdc3f5d..0d3d757563 100644 --- a/web/download.txt +++ b/web/download.txt @@ -40,10 +40,10 @@ Change the branch to suit your needs:: git clone -b master git://github.com/Araq/Nimrod.git cd Nimrod - git clone -b master --depth 1 git://github.com/nimrod-code/csources + git clone -b master --depth 1 git://github.com/nim-lang/csources cd csources && sh build.sh cd .. - bin/nimrod c koch + bin/nim c koch ./koch boot -d:release The ``master`` branch always contains the latest stable version of the compiler.