difference between any and auto?

2020-07-06 Thread timothee
manual says: any: distinct auto (see below) but doesnt' actually elaborate; what's the difference between any and auto? they seem to behave the same with behavior: "bind many" proc fn(a, b: auto)= # works # proc fn(a, b: any)= # also works echo (a,b, $type(a), $type(b))

ok to merge "overload resolution" label into "Symbol Resolution" label in github issues?

2020-06-24 Thread timothee
[https://github.com/nim-lang/Nim/issues?q=label%3A%22symbol+resolution%22](https://github.com/nim-lang/Nim/issues?q=label%3A%22symbol+resolution%22)+ [https://github.com/nim-lang/Nim/issues?q=label%3A%22overload+resolution%22](https://github.com/nim-lang/Nim/issues?q=label%3A%22overload+resolution

Re: Perf: Table.del(key)is taking 85% of my code's time

2020-06-17 Thread timothee
@snej * what is nim -v ? (I'm assuming it's 1.2.2 but please double check) * please post minimum reproducible example, otherwise it's hard to do anything about your problem

Re: Transform procs at compile time?

2020-06-16 Thread timothee
also relevant: patchFile. I've actually been toying with the idea of replacing patchFile with patchAst which would allow AST-level modifications instead of source-level modifications, which are more robust. eg use case: for patching 3rd party (or even stdlib) code

Re: Transform procs at compile time?

2020-06-15 Thread timothee
partial answers: * parseStmt + staticRead * [https://github.com/nim-lang/Nim/pull/9560](https://github.com/nim-lang/Nim/pull/9560)

Re: Awk-Style text processing with Nim

2020-06-15 Thread timothee
same remarks as [https://github.com/nim-lang/Nim/issues/14637#issuecomment-644338428](https://github.com/nim-lang/Nim/issues/14637#issuecomment-644338428) the standard nim version is: * more readable * syntax highlights correctly * interacts correctly with the rest of the language * lead

Re: Setting up a FreeBSD VM for Nim development

2020-06-09 Thread timothee
there are use cases where you don't care about performance too much, or getting the latest OS, for eg if you're simply trying to fix a bug that only affects an OS, like the very flaky openbsd tioselectors bug [https://github.com/nim-lang/Nim/issues/13166](https://github.com/nim-lang/Nim/issues/1

Re: Can I "prune" directories with walkDirRect?

2020-06-01 Thread timothee
see also walkDirRecFilter since [https://github.com/nim-lang/Nim/pull/14501](https://github.com/nim-lang/Nim/pull/14501) but for now it's internal use only until API is deemed good

Re: execProcess when spaces in directory path

2020-05-27 Thread timothee
> I'd like to use nim to execute something like "C:UsersMeAppDataLocalThe > AppTheApp.exe --uninstall --silent" or "bob" for short did you mean: "C:UsersMeAppDataLocalThe App\TheApp.exe --uninstall --silent" Run ? (you were missing the ) > execShellCmd(bob)

Re: Generate warnings for default returns

2020-05-26 Thread timothee
one questions is for generics, conditional compilation, and when templates are in the mix which can complicate things. > The extra line result = 0 or similar in the beginning of a proc how about used(result); it's more generic and would work with any type, and doesn't change semantics

Re: Can I "prune" directories with walkDirRect?

2020-05-26 Thread timothee
this is probably what you're looking for [https://github.com/citycide/glob](https://github.com/citycide/glob) but IMO there should be something equivalent in stdlib

Re: Traceback missing line number

2020-05-24 Thread timothee
@yardanico that's a wrong, unrelated line number as you can see here: when defined case2: echo "ok0" var i = "" var u0 = 12 echo "ok1" ## <- line number points to here const u1 = 12 var u2 = 12 i[10] = 'j' echo i Run let

Re: Setting up a FreeBSD VM for Nim development

2020-05-23 Thread timothee
thanks for the super detailed guide!! curious though, is there a docker way? docker run -it madworx/netbsd:8.0-x86_64 bash this one-liner docker run -it phusion/baseimage bash gives you ubuntu 16.04 from osx, and (at least last week, but somehow not today), docker run -it madworx/netbsd:8.0-x86

Re: Call-for-Help: a 128-bit Decimal library expansion

2020-05-18 Thread timothee
I wonder: nim could start supporting user defined litterals so you'd be able to write: import fusion/decimal128 echo -0.123'dec128 + 12e-4022'dec128 Run nim parser would change to transform -0.123'dec128 into dec128("-0.123") which feels more native (and would r

Re: Revisiting my oldest Nim project.

2020-05-18 Thread timothee
> I don't think this is true it is true across the board; maybe there are some FP time libraries out there, but the vast majority uses integral arithmetics over some unit (s, ms, us, ns are typical) * C (ctime) * C++ (std::chrono, boost date_time) * mongodb (int64 milliseconds since epoch

Re: Revisiting my oldest Nim project.

2020-05-17 Thread timothee
> I don't think the same issues apply to timestamps the moment you're using FP as your internal internal representation you're affected by FP semantics and the machine epsilon, eg: * catastophic cancellation problem: var a = 1.2 var b = a + 1e14 var c = b - 1e14

Re: Nim Compiler Documentation

2020-05-17 Thread timothee
compiler docs used to be generated for a short while until [https://github.com/nim-lang/Nim/pull/13509](https://github.com/nim-lang/Nim/pull/13509); a few small things need to be addressed to re-enable compiler docs, which was quite helpful, eg for nim-lang.github.io/Nim/compiler/ast.html (link

Re: proposal: PTAL tag to make it clear that a PR is ready again for review

2020-05-17 Thread timothee
> > look at my stuff, my stuff is more important than all the other stuff by > > all the other contributors that's not the point at all, quite the opposite. The whole point is for triaging PRs and saving reviewer time by allowing them to filter from those 114 open PR's the ones that are in a re

Re: Revisiting my oldest Nim project.

2020-05-17 Thread timothee
agree with most points in top post except: * float64 for timestamp for the same reason as ppl don't use floating points for banking applications, but instead use either integer in some units eg cents or fraction of cents, or other fixed point arithmetics. floats will cause issues with round

proposal: PTAL tag to make it clear that a PR is ready again for review

2020-05-17 Thread timothee
Currently, looking at [https://github.com/nim-lang/Nim/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc](https://github.com/nim-lang/Nim/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) it's not clear which PR's are ready for review vs still being worked on: * using draft vs not draft is not good f

Re: rerunning CI works for github actions, sr.ht, but not azure pipelines

2020-05-17 Thread timothee
seems like you need special permissions to rerun from within azure pipelines UI (eg [https://dev.azure.com/nim-lang/Nim/_build/results?buildId=5365&view=results)](https://dev.azure.com/nim-lang/Nim/_build/results?buildId=5365&view=results\)), which I don't have, since it's possible for a PR agai

rerunning CI works for github actions, sr.ht, but not azure pipelines

2020-05-13 Thread timothee
I'd like to be able to re-run CI just for what needs to be re-run without having to re-run everything to save CI cycles. this works fine for sr.ht (if you have an account), and for github actions (when it fails, IIRC you can rerun at least if project member), but somehow not for azure pipelines

Re: Semantic grep, a very cool idea (currently mostly for Python)

2020-05-07 Thread timothee
: inspect resolveSymbol(`$`) /Users/timothee/git_clone/nim/Nim_prs/tests/magics/tresolve_overloads.nim:134:35: $ = closedSymChoice: /Users/timothee/git_clone/nim/Nim_prs/lib/system/dollars.nim:10:1 proc `$`(x: float): string {.magic: "FloatToStr", noSideEffect.} /User

is `tyOpt` still used?

2020-05-07 Thread timothee
my understanding is that this Builtin optional type is dead code and should be removed, which matters a lot because TTypeKind.high == 63 I'd like to add a new TTypeKind without making set operations on types slower (although this should be benchmarked to see if it matters or not)

Re: Hotcodereloading not working out of the box on OSX

2020-05-04 Thread timothee
please check github issues first :) it's already tracked here: [https://github.com/nim-lang/Nim/issues/13999](https://github.com/nim-lang/Nim/issues/13999)

Re: Can the nim compiler run in the browser? Experimenting Nim to template web pages

2020-05-02 Thread timothee
see also [https://github.com/pragmagic/karax](https://github.com/pragmagic/karax) which uses a virtual DOM, but is production ready.

Re: How to use file system watcher (fsmonitor) in Nim?

2020-04-24 Thread timothee
finally found a nim package that works on OSX, see also a comparison: [https://github.com/paul-nameless/nim-fswatch/issues/1](https://github.com/paul-nameless/nim-fswatch/issues/1)

Re: Times in the VM?

2020-04-20 Thread timothee
@Hlaaftana CT getTime now possible via {.push experimental: "vmopsDanger".} since [https://github.com/nim-lang/Nim/pull/13813](https://github.com/nim-lang/Nim/pull/13813); see example in that PR

Re: Turn a warning into an error

2020-04-04 Thread timothee
\--warningAsError[X]:on|off| ---|--- [https://github.com/nim-lang/Nim/commit/9c46927fad6535cf7e172f5af5e93d179cec1020](https://github.com/nim-lang/Nim/commit/9c46927fad6535cf7e172f5af5e93d179cec1020)

Re: Compile time FFI

2020-04-04 Thread timothee
/cc @jgeralnik| ---|--- > On second thought - not sure how well this could possibly work. When > compiling my stand alone utility I pass in: --passL:"-lpcap" so that my > binary will like against pcap, but if I want this code to run in compile time > I need to either link the compiler to

Re: FFI: how to avoid naming arguments in C functions

2020-03-10 Thread timothee
=> I filed it here: [https://github.com/nimterop/nimterop/issues/171](https://github.com/nimterop/nimterop/issues/171)

Re: Times in the VM?

2020-03-09 Thread timothee
## staticExec is wrong approach staticExec is a bad approach to solve this kind of problem more generally (whether it's for regex, rand, getTime, and hosts of other things that require importc procs). * large performance overhead (especially if what you need is something that measures time, w

Re: Documenting one liner

2020-03-09 Thread timothee
I think this is an important special case that nim doc should handle, so that these 2 cases work: proc fun1*() = discard ## doc comment for `fun1` proc fun2*() = discard ## doc comment for `fun2` Run

Re: Module Introspection

2020-03-09 Thread timothee
I had a PR for that but krux02 closed it (see [https://github.com/nim-lang/Nim/pull/9560)](https://github.com/nim-lang/Nim/pull/9560\)); I've been using it (and subsequent improvements of it) in my own patched nim compiler and it is very useful; one use case is enabling things like nim doc in u

Re: Some rant about nim

2020-03-03 Thread timothee
> It's known at compile time as int32 int, not int32 > It's known at compile time as int32, not iX, while nim compiler totally > ignores this and assume they are compatible. But they aren't. [...] the more > sane option is not provide a subrange type in the first place. again, not-a-bug. 2.int

Re: do we need travis+appveyor in nim repo now that we have azure-pipelines?

2020-03-03 Thread timothee
[https://travis-ci.org/nim-lang/Nim](https://travis-ci.org/nim-lang/Nim) still shows at least travis is still in use; and it translates in a badge saying build failing or passing on [https://github.com/nim-lang/Nim](https://github.com/nim-lang/Nim)

do we need travis+appveyor in nim repo now that we have azure-pipelines?

2020-03-02 Thread timothee
Do we need .travis+appveyor in nim repo now that we have azure-pipelines? can we remove these? This leads to odd cases where PR's are green but nim's build is broken, since nim's build (triggered on PR merge IIUC) runs on travis+appveyor (at least) but PR's run azure-pipelines (+freebsd buildsh

Re: Some rant about nim

2020-03-02 Thread timothee
@Somerandomguy > I mean this does compile, seems like I'm a bit too emotional last morning type iX = range[1..5] var a: iX = 3 let b = 10 # will give RT error # const b = 4 # will work # const b = 10 # will give CT error a = b Run not-a-bug. it will

Re: Why not introduce the concept of Decimal in nim ???

2020-02-28 Thread timothee
you may want to search in forum for similar questions before opening a new thread (which fragments discussion) => duplicate of [interest in a decimal library - Nim forum : interest in a decimal library - Nim forum]([https://forum.nim-lang.org/t/5687](https://forum.nim-lang.org/t/5687)) also you

Re: re or nre. What should i use? What will be supported in future?

2020-02-28 Thread timothee
* for use in stdlib, IMO nre is the better design * for use outside stdlib, IMO pkg/regex has a better design, eg works at CT, and is pure nim code without pcre dependency; I'm curious about performance, haven't seen benchmarks on this

Re: Nim's float issue?

2020-02-26 Thread timothee
@Stefan_Salewski @Nam > It`s a bit hard to believe that this is a serious question because of > But maybe you missed that and have no CS experience. > That is not a Nim issue, but occurs from representation of floats in the CPU it's a serious question, no need to question about OP's CS credentia

Re: Nim Community Survey 2019

2020-02-20 Thread timothee
oups, guess I'm a bit late; I tried to fill [https://nim-lang.org/blog/2019/12/20/community-survey-2019.html](https://nim-lang.org/blog/2019/12/20/community-survey-2019.html) but it says it's closed; any chance to re-open? otherwise no big deal

Re: Nim problems. 1 internal, 1 mine

2020-02-07 Thread timothee
* @moerm regarding not blindly ignoring warnings, I completely agree and in fact after [https://github.com/nim-lang/Nim/pull/11591](https://github.com/nim-lang/Nim/pull/11591) is merged you'll be able to show c/c++ warnings (see that PR for rationale + bugs it helped uncover) * I second

Re: Compile time FFI

2020-02-03 Thread timothee
for C/C++ structs, the binary layout is different from the PNode binary layout of a compile time object instance, so you can't just deref a ptr Foo returned by a importc proc (that wouldn't make sense); and thankfully the compiler prevents it. However you can access individual fields via access

Re: Compile time FFI

2020-02-03 Thread timothee
> What in particular needs work on Windows 64bit? libffi bindings only support win32, not win64; maybe a solution is to use a dll for win64 instead of embedding the sources, see [https://github.com/Araq/libffi/blob/master/libffi.nim#L14](https://github.com/Araq/libffi/blob/master/libffi.nim#L14)

Re: Compile time FFI

2020-02-03 Thread timothee
I've been using it extensively ever since the feature was introduced, it's a very useful feature and works well. Feel free to upvote [https://github.com/nim-lang/Nim/pull/13091](https://github.com/nim-lang/Nim/pull/13091) which re-enables testing this feature in CI, to prevent future regressions

Re: How to find the path to nim lib from the command-line

2020-01-24 Thread timothee
it just got merged

Re: How to find the path to nim lib from the command-line

2020-01-24 Thread timothee
after [https://github.com/nim-lang/Nim/pull/13249](https://github.com/nim-lang/Nim/pull/13249) you'll be able to do: nim dump --dump.format:json . | jq -r .libpath /Users/timothee/git_clone/nim/Nim_prs/lib Run (for jq, use for eg: brew install jq)

Re: Goto based exception handling

2020-01-08 Thread timothee
following example is even more drastic, 3x speedup over C++ (in case where there are a lot of thrown exceptions) import std / [times, monotimes, stats, strutils] const depthRaise = 100 type MyExcept = object of CatchableError proc fib(m: string, depth = 0): int =

Re: nim android tutorial

2019-12-17 Thread timothee
this might be of help too (adapting some ideas from D to nim): [adamdruppe/d_android: Helper programs and interfaces for using D on Android systems : adamdruppe/d_android: Helper programs and interfaces for using D on Android systems]([https://github.com/adamdruppe/d_android](https://github.com

Re: How to count varargs[untyped] inside of template?

2019-12-15 Thread timothee
=> see PR [https://github.com/nim-lang/Nim/pull/12907](https://github.com/nim-lang/Nim/pull/12907)

Re: [RFC] Why use Nim?

2019-09-24 Thread timothee
Well, the article was published this morning, here it is: [https://www.theregister.co.uk/2019/09/24/nim_version_10](https://www.theregister.co.uk/2019/09/24/nim_version_10)/

Re: [RFC] Why use Nim?

2019-09-24 Thread timothee
thanks; I've updated the wording in the C++ interop paragraph

[RFC] Why use Nim?

2019-09-24 Thread timothee
I was asked to comment on the following for an article: > Nim has just reached 1.0 and I was wondering whether you might be willing to comment on why Nim is useful and where it fits into the continuum of programming languages? Here's my tentative response; feedback is welcome: Nim gives you the

How to parse html wild?

2019-09-16 Thread timothee
related: [parseHtml does not work (eg: can't find any div) in presence of

nim users in San Francisco / bay area?

2019-09-05 Thread timothee
Curious about who's using Nim in SF / bay area, and whether there'd be interest in organizing a meetup / FB group. If there's enough interest I could set up one.

Re: `import foo {.private.}` to allows access to private fields (eg: package-level visibility)

2019-07-31 Thread timothee
I've implemented this in [https://github.com/nim-lang/Nim/pull/11865](https://github.com/nim-lang/Nim/pull/11865)

Re: Alias for proc names -- any progress?

2019-07-25 Thread timothee
> Will you alias work for the result variable too? Would be great -- I had > often procs like it works, I just added a test case for that see [https://github.com/nim-lang/Nim/pull/11822/files#diff-ef6ec6154188e96632ac5bf114a7c1faR131](https://github.com/nim-lang/Nim/pull/11822/files#diff-ef6ec61

Re: Alias for proc names -- any progress?

2019-07-24 Thread timothee
properly fixed here: [https://github.com/nim-lang/Nim/pull/11822](https://github.com/nim-lang/Nim/pull/11822) nim has a real alias that works with any symbol #11822 proc getLength(i: int): int = sizeof(i) proc getLength(s: string): int = s.len # const length = getLength # Er

Re: optional params before `untyped` body

2019-07-16 Thread timothee
with this PR [https://github.com/nim-lang/Nim/pull/11754](https://github.com/nim-lang/Nim/pull/11754) we can do it as follows: dispatch foo: for a in 0..<3: echo a echo 10 Run

optional params before `untyped` body

2019-06-25 Thread timothee
Is there a way to have optional params before an untyped body in templates/macros? The last case gives an error, that's the one I want: template foo(a1 = 10, a2 = "", body: untyped) = discard # works foo(3, "asdf"): for a in 0..<3: echo a echo 10

Re: template/macro should return `void` instead of `typed` (synonym and much clearer)

2019-05-21 Thread timothee
this PR by @krux02 will fix this: [https://github.com/nim-lang/Nim/pull/11286](https://github.com/nim-lang/Nim/pull/11286) (Allow void macro result)

Re: Debugging - again

2019-02-09 Thread timothee
@moerm > Thanks for the hint! Now with the "trick" setting a breakpoint at a proc does work if you need to script this, (gdb) rbreak main_ or (lldb) br s -r main_ for regex breakpoint (ie that works with mangled names)

Re: no "--opt:size" leads EXE to "SIGSEGV: Illegal storage access. (Attempt to read from nil?)"

2019-02-01 Thread timothee
this helped me before: import segfaults it inserts a signal handler and outputs a stacktrace.

Re: generic instantiation with object inheritance

2019-01-16 Thread timothee
=> [https://gist.github.com/rayman22201/92f28f0c1d9ccbc5a36fe04c2132c49e#gistcomment-2811762](https://gist.github.com/rayman22201/92f28f0c1d9ccbc5a36fe04c2132c49e#gistcomment-2811762)

Re: generic instantiation with object inheritance

2019-01-16 Thread timothee
can u show a minimal reproducing example?

difference bw `discard "foo"` and `discard # foo` ?

2019-01-05 Thread timothee
I often see @araq write in this style: $nimc_D/compiler/layouter.nim: [1] discard "do nothing, see #9499" return Run is there any semantic difference with: [2] discard # do nothing, see #9499 return Run or even [3]

[help needed] nim version of: COMPARING PYTHAGOREAN TRIPLES IN C++, D, AND RUST

2019-01-01 Thread timothee
original article: [https://atilanevesoncode.wordpress.com/2018/12/31/comparing-pythagorean-triples-in-c-d-and-rust](https://atilanevesoncode.wordpress.com/2018/12/31/comparing-pythagorean-triples-in-c-d-and-rust)/ here's nim version I proposed: see [https://github.com/atilaneves/pythagoras/pull/

Win7 installation issue

2018-12-24 Thread timothee
tracked here: [https://github.com/nim-lang/Nim/issues/10088](https://github.com/nim-lang/Nim/issues/10088) building from source on windows: instructions lack necessary details and lead to errors #10088 see [https://github.com/nim-lang/Nim/issues/10088#issuecomment-449787627](https://github.com

Re: unary operators are often best replaced by explicit names, eg: `%*` => toJson

2018-12-16 Thread timothee
=> PR [https://github.com/nim-lang/Nim/pull/10011](https://github.com/nim-lang/Nim/pull/10011)

Re: startProcess alternative with lossless output stream

2018-12-13 Thread timothee
seems related to [https://github.com/nim-lang/Nim/issues/9953](https://github.com/nim-lang/Nim/issues/9953) /cc @araq @alaviss in your top-level example, when I use: let p = startProcess("{file_b2}", options = {{poParentStdin}}) (right now, pending my updating PR, I call it poParentStreams, ov

How do I get the process ID of the current program?

2018-12-03 Thread timothee
https://github.com/nim-lang/Nim/pull/9846

missing topN/partial_sort in stdlib :-(

2018-11-20 Thread timothee
maybe we could add a naive topN based on sort + slice last N elements, so clients can start using that, and then they'd benefit when a proper topN is in stdlib ## example implementations * [https://dlang.org/library/std/algorithm/sorting/top_n.html](https://dlang.org/library/std/algorithm/so

Re: how to stringify token in nim template?

2018-11-14 Thread timothee
see also: [astToStr(arg) inserts spurious newline for fun:arg · Issue #9719 · nim-lang/Nim]([https://github.com/nim-lang/Nim/issues/9719](https://github.com/nim-lang/Nim/issues/9719))

Re: {.hint[XDeclaredButNotUsed]:off.}

2018-11-10 Thread timothee
can you show a minimized example where it fails?

Re: the v0.19.1 => 0.19.9 jump should've been v0.19.0 => 0.20.0

2018-11-06 Thread timothee
I'm not talking about the name of devel branch but about semantic versioning typically, symver assumptions is that patch version is increased for bug fixes; they shouldn't introduce breaking changes; right now devel (with NimMajor.Minor.Path = 0.19.9) keeps introducing breaking changes on the s

the v0.19.1 => 0.19.9 jump should've been v0.19.0 => 0.20.0

2018-11-06 Thread timothee
this commit b4f16fab498ae705532391d7f57481197972d70f changed from 0.19.1 to 0.19.9 this doesn't make sense to me. What would make sense would be to change from 0.19.1 to 0.20.0 if we want to backport critical bugs to 0.19.X, they can be backported to a branch hotfix/0.19.2 until a new tag 0.19

Re: Nim as a hot-patching scripting language?

2018-11-06 Thread timothee
* [https://github.com/nim-lang/Nim/issues/8927](https://github.com/nim-lang/Nim/issues/8927) seems very promising but no idea what's ETA on having it as a viable option * all the other options mentioned have limitations, eg javascript/wasm and nimscript offer a subset of what Nim can do; and

Re: sublimetext nim plugin (NimLime) hasn't worked since july

2018-11-02 Thread timothee
actually if anyone can help with this bug it would really help: [how to reload NimLime without re-opening sublimetext? · Issue #115 · Varriount/NimLime]([https://github.com/Varriount/NimLime/issues/115](https://github.com/Varriount/NimLime/issues/115))

Re: sublimetext nim plugin (NimLime) hasn't worked since july

2018-11-02 Thread timothee
ok, find the fix: [https://github.com/Varriount/NimLime/pull/114](https://github.com/Varriount/NimLime/pull/114)

sublimetext nim plugin (NimLime) hasn't worked since july

2018-11-02 Thread timothee
I just posted it here [nothing works, eg: nimcheck output is run but doesn't show anything (even if there are obvious errors) · Issue #113 · Varriount/NimLime]([https://github.com/Varriount/NimLime/issues/113](https://github.com/Varriount/NimLime/issues/113)) but the problem has existed since ~j

Re: should `computedGoto` be always implied ? (ie make computedGoto noop)

2018-11-01 Thread timothee
> it can use more memory than a "naked" switch that doesn't make sense to me; it would be a array (ie compile time length), so would only use stack allocation; furthermore I don't see how switch would use less stack memory

Re: should `computedGoto` be always implied ? (ie make computedGoto noop)

2018-11-01 Thread timothee
well not sure it's only for "interpreter loops" ; seems to be applicable any time you have a switch on a finite range (eg enum; maybe also 8 bit integers in case all integers are specified); so the question remains: is there any disadvantage to always turn on this optimization? (which as I ment

Re: development and release model: use the `oneflow` model

2018-11-01 Thread timothee
/cc @araq| ---|--- correct; it's simpler than traditional gitflow because in gitflow we must know in advance where a bugfix PR goes (is it v1? is it v2? is it 0.18.x branch? is it 0.17.x release? ) which is often not practical (especially when PR contains multiple commits, only one of wh

Re: development and release model: use the `oneflow` model

2018-11-01 Thread timothee
@araq > That is what we like to do though, if not for the upcoming 0.19.2 vs 0.20 > split, then later for the v1 vs v2 split, so we might as well figure out how > to do it now. IIRC the article mentions how to adapt the model to handle that case (eg for python2 vs python3, or in our case nim1

should `computedGoto` be always implied ? (ie make computedGoto noop)

2018-11-01 Thread timothee
Are there any disadvantage to using computed goto ? (I'm not aware of any but could've missed something) If not, why not make {. computedGoto.} implied automatically for all switch statements over enum (or finite range) variables (see [https://nim-lang.org/docs/manual.html#pragmas-computedgoto-

development and release model: use the `oneflow` model

2018-10-31 Thread timothee
/cc @araq @kaushalmodi| ---|--- We've recently agreed to use a branch based development as opposed to trunk based, see [https://github.com/nim-lang/Nim/issues/7527](https://github.com/nim-lang/Nim/issues/7527) ([RFC] Nim development and release model - 1.0 and beyond #7527) and are now

Re: should we deprecate nim.cfg in favor of config.nims format?

2018-10-25 Thread timothee
the cfg macro would be nice indeed. solves all the problems IMO

Re: should we deprecate nim.cfg in favor of config.nims format?

2018-10-24 Thread timothee
speaking for myself here, but I don't think the (main) concern of the 'keep cfg' camp is that the syntax is different between \--hint[LineTooLong]=off (cfg) and hint("LineTooLong", "on") (nims) as that's easy to switch to (and we can write a tool to automate if needed), their main concern is the

Re: does RST `foo`:idx: actually work?

2018-10-23 Thread timothee
ok thanks; indeed `foo`:idx: Run will end up in an entry in [https://nim-lang.github.io/Nim/theindex.html](https://nim-lang.github.io/Nim/theindex.html) It would be nice if docsearch would also find it, and the foo would result in a link instead of plain text

Re: should we deprecate nim.cfg in favor of config.nims format?

2018-10-23 Thread timothee
@arnetheduck @ juancarlospaco To misquote Jamie Zawinski's Law, "every declarative config language attempts to expand until it can read mail. Those which cannot are replaced by ones which can." Joking aside, declarative config style may be fine for the simplest projects, but in more complex ca

does RST `foo`:idx: actually work?

2018-10-22 Thread timothee
see context in this commit: [https://github.com/nim-lang/Nim/commit/37986d0ba8d83b76e710b352a7da7cce2a5cb157](https://github.com/nim-lang/Nim/commit/37986d0ba8d83b76e710b352a7da7cce2a5cb157) typetraits.nim defines: proc supportsCopyMem*(t: typedesc): bool {.magic: "TypeTrait".}

nimble packages should standardize on a `build` directory for generated files

2018-10-22 Thread timothee
nimble packages should standardize on a build directory for generated files, to keep git status clean ## proposal * nimble init should create a build dir, in addition to what it already creates (src, tests, foo.nimble) * it should also add a .gitignore file with contents: /b

should we deprecate nim.cfg in favor of config.nims format?

2018-10-22 Thread timothee
everything that can be done with nim.cfg can be done with config.nims (after a number of issues were fixed in past few months), and config.nims is also much more featureful, so the question is: should we deprecate nim.cfg in favor of config.nims format? ## arguments for deprecating nim.cfg *

Re: Why can't the Nim VM use FFI?

2018-10-19 Thread timothee
=> tracked here: [https://github.com/nim-lang/Nim/issues/9253](https://github.com/nim-lang/Nim/issues/9253)

Re: State of Concepts in Nim 0.19

2018-10-19 Thread timothee
example: exponential compile time reported here : [https://github.com/nim-lang/Nim/issues/9422#issue-371425191](https://github.com/nim-lang/Nim/issues/9422#issue-371425191)

Re: Insert 'NULL' value in Postgres with Nim 0.19.1 without 'nil'

2018-10-18 Thread timothee
@ThomasTJdev7h @mikra what I meant was supporting something like this: var i_am_nil: Option[string] # this will be none var i_am_not_nil: Option[string] = some("foo") # this will be none discard insertID(db, sql"INSERT INTO myTable (name, name2) VALUES (?, ?)", i_am_nil, i_a

Re: It is not easy to find generic procs like system.find()

2018-10-18 Thread timothee
I'd really prefer doing like what github does with its search bar, see [[docgen] allow github-like search syntax · Issue #9431 · nim-lang/Nim]([https://github.com/nim-lang/Nim/issues/9431](https://github.com/nim-lang/Nim/issues/9431)) eg: find limit:30 Run

Re: Insert 'NULL' value in Postgres with Nim 0.19.1 without 'nil'

2018-10-18 Thread timothee
could API's be changed to accept Option[string] ? (likewise with seq) Seems like a clean way to handle nil.

Re: [poll] Moving all RFCs in a separate repo

2018-10-17 Thread timothee
/cc @araq @arnetheduck @dom96 @miran| ---|--- We need a decision on this soon, or, if more time is needed, at least lock (see [https://help.github.com/articles/locking-conversations/](https://help.github.com/articles/locking-conversations/)) in the meantime the duplicated exported issues

  1   2   3   >