Commit Graph

2105 Commits

Author SHA1 Message Date
Hans Raaf
0634486689 Fixed deprecation warnings while Nim compiles.
I just removed unsigned and changed a writeLn() call to writeLine() to
avoid the remaining deprecation warnings.
2016-01-18 18:14:50 +01:00
Dominik Picheta
d79a5f5276 Added missing modules to lib.txt and warnings to some module's docs. 2016-01-18 15:33:39 +00:00
Andreas Rumpf
b0aaeaa436 Merge pull request #3703 from singularperturbation/feature/counttableref_getordefault
Fix CountTableRef#getOrDefault (#3702)
2016-01-18 14:30:14 +01:00
Andreas Rumpf
9fad7c4c2b Merge pull request #3519 from jlp765/stats1
stats.nim pure library (moved from math lib to new lib)
2016-01-17 21:56:11 +01:00
Andreas Rumpf
2c2ab6884c fixes strutils.unescape; refs #3634 2016-01-17 21:29:25 +01:00
Andreas Rumpf
dda01cb726 Merge branch 'devel' of https://github.com/nim-lang/Nim into devel 2016-01-17 20:30:08 +01:00
Dominik Picheta
eb1bedc3c2 Removed redis module from standard library. 2016-01-16 14:58:12 +00:00
Andreas Rumpf
0d4e52c648 makes tests green 2016-01-15 14:44:54 +01:00
Andreas Rumpf
1124c61c49 Merge branch 'devel' into new-ll 2016-01-14 15:01:55 +01:00
Sloane Simmons
aa0d65ed70 Fix CountTableRef#getOrDefault
Fixes issue with CountTableRef and getOrDefault:
```{nimrod}
import tables

proc main() =
  const testKey = "TESTKEY"
  let t: CountTableRef[string] = newCountTable[string]()

  # Before, does not compile with error message:
  #test_counttable.nim(7, 43) template/generic instantiation from here
  #lib/pure/collections/tables.nim(117, 21) template/generic instantiation from here
  #lib/pure/collections/tableimpl.nim(32, 27) Error: undeclared field: 'hcode'

  echo "Count of " & testKey & " is " & $t.getOrDefault(testKey)
  t.inc(testKey,3)
  echo "Count of " & testKey & " is " & $t.getOrDefault(testKey)

when isMainModule:
  main()
```

Previously, `getOrDefault` for CountTableRef objects was calling the
`getOrDefaultImpl` template, which used the t.data.hcode object -
assuming a Table or similar object.  Because CountTableRef didn't have
an hcode in its data tuples, this wouldn't compile.  Changed to be the
same as `CountTable#getOrDefault`.
2016-01-09 21:46:47 -06:00
Dominik Picheta
fffdae32c7 Fixed TimeInterval bug. 2016-01-08 11:54:34 +00:00
Dominik Picheta
09b159b816 Fixed ttime test. Improved docs in times module. 2016-01-08 11:46:11 +00:00
Dominik Picheta
596d400825 Merge branch 'times_intervals' of https://github.com/jlp765/Nim into jlp765-times_intervals 2016-01-08 11:12:16 +00:00
Andreas Rumpf
cd707084d1 fixes calling convention for the callbacks 2016-01-08 12:08:32 +01:00
Yuriy Glukhov
589132065e Lexbase compatible with JS 2016-01-06 16:38:27 +02:00
Dominik Picheta
9aa60add87 Fixes docgen for lib/pure/db_common.nim.
See http://forum.nim-lang.org/t/1916.
2016-01-05 15:56:13 +00:00
Yuriy Glukhov
dee5f9ad4f osproc fix for Android 2016-01-04 12:52:54 +02:00
Dominik Picheta
deef047f27 Merge branch 'devel' of github.com:nim-lang/Nim into devel 2015-12-29 16:25:43 +00:00
Dominik Picheta
bf4c13711a Fixes incorrect Host header when using httpclient with proxy. 2015-12-29 16:25:21 +00:00
Dominik Picheta
cbab2ecea2 Merge pull request #3663 from def-/netbsd-fix
Fix osproc compilation on NetBSD, use workaround for missing execvpe
2015-12-25 14:30:23 +00:00
def
31cc1815d1 Fix nativesockets compilation on OpenBSD and NetBSD 2015-12-23 05:59:29 +01:00
def
25e862b9bc Fix osproc compilation on NetBSD, use workaround for missing execvpe 2015-12-23 05:56:42 +01:00
Andreas Rumpf
d6fbc1425f profiling doesn't require call to enableProfiling 2015-12-18 01:50:27 +01:00
Andreas Rumpf
f75d11193a modified the integrated profiler to hopefully produce more reliable results 2015-12-18 01:47:39 +01:00
Andreas Rumpf
4e157114a6 added more column information fields 2015-12-17 14:39:40 +01:00
Andreas Rumpf
cb10f30656 big update for the db*.nim modules; uses new db_common.nim 2015-12-16 20:56:12 +01:00
qio-io
135668a7ba Fixing too many open files on quit command with an explicit socket close, and importing the net module 2015-12-13 15:36:26 -04:00
Yuriy Glukhov
5545d36330 Fixed getAddrInfo on android 2015-12-08 12:30:38 +02:00
JamesP
8af8f7673b add timeinterval helping functions as per issue #3609
add tests to ttime.nim for timeinterval add/subtract functionality

Changed assert to doAssert in ttime.nim
Added extra tests to ttime.nim
Removal of singular help procs for working with TimeIntervals
Added TimeIin proc toSeconds(a: TimeInfo, interval: TimeInterval) where subtracting a year gave wrong results
Add overflow of units on initInterval eg, 65 seconds is 5 seconds and 1 minute
2015-12-08 10:16:42 +10:00
Dominik Picheta
6f09282352 Merge pull request #3570 from juanfra684/patch-1
OpenBSD doesn't support AI_V4MAPPED
2015-12-04 15:29:56 +00:00
Federico Ceratto
97540b2ce4 Fix typo, minor rephrasing. 2015-12-03 15:57:55 +00:00
Federico Ceratto
05b856df23 Closes: #3611 2015-12-02 16:05:50 +00:00
JamesP
def25504e8 Add comment at end of file on where to find further tests 2015-12-01 23:05:37 +10:00
JamesP
f62e8558c8 Removal of tests from times module, that have been moved to ttime.nim test file 2015-12-01 18:08:52 +10:00
Araq
22ed2aab35 fixes memory leak for getAppFilename on Windows 2015-11-26 21:20:10 +01:00
Andreas Rumpf
fbe6695a52 Merge pull request #3594 from theduke/unicode-validate-overlong
validateUtf8: catch overlong ascii
2015-11-26 17:34:21 +01:00
theduke
25b605a3a2 validateUtf8: catch overlong ascii
Make unicode.validateUtf8() check for overlong ascii representations, which are 2 bytes long and start with c0 or c1.
2015-11-26 16:05:24 +01:00
Yuriy Glukhov
2fcc37fd2b fixed float formatting for js 2015-11-26 01:10:52 +02:00
def
93e01da671 Fix options module to use new import name 2015-11-23 16:30:18 +01:00
def
7540cdd169 Update comment about map being in system module 2015-11-23 16:23:35 +01:00
Juan Francisco Cantero Hurtado
e0835948bd OpenBSD doesn't support AI_V4MAPPED
Related to #3534
2015-11-23 04:27:20 +01:00
Charles Blake
716c12a436 Fix loop index bug in scan for a[s] in b[s..s+len2-1].
a, b must both be indexed starting from s after the common
prefix "strip" phase.  This resolves issue 3477:
  https://github.com/nim-lang/Nim/issues/3477
2015-11-19 06:52:31 -05:00
JamesP
41861711c8 add doco for array/seq helper procs 2015-11-12 07:03:16 +10:00
JamesP
52e40995b7 added helper procs for standalone calc of stats for array/seq
Changed derivation to use runningstats, so there
is a single point of truth for the calculations, and provides
more stats functions
2015-11-12 06:33:26 +10:00
Varriount
3832ea0785 Prevent Exported C procedure collisions
Prevents collisions between those C externalized procedures in parseopt and parseopt2.
2015-11-11 15:18:13 -05:00
JamesP
4cefbc2914 add comment to identify where RunningStat code resides 2015-11-11 08:56:51 +10:00
JamesP
0cf4e2603f Removal of stats procs for openarray (use the RunningStat methodology) 2015-11-11 08:56:12 +10:00
Araq
b6374f1f68 fixes newly introduced oswalkdir module 2015-11-10 15:56:17 +01:00
Araq
7578d580e0 added oswalkdir.nim for the JS target 2015-11-10 15:35:02 +01:00
Araq
2aff716134 os.walkDir is available at compile time 2015-11-10 15:31:21 +01:00