Re: [best practice] should `importc` procs use native argument names instead of cryptic a1, a2, a3 ?

2018-07-30 Thread timothee
no, but better to have a documented policy to follow for such things instead of debating it for each PR. If there's any objection to this policy, here's a good place to debate this.

[best practice] should `importc` procs use native argument names instead of cryptic a1, a2, a3 ?

2018-07-30 Thread timothee
I like self documenting code. The import procs are nothing but self-documenting, see for eg lib/posix/posix.nim: proc fmtmsg*(a1: int, a2: cstring, a3: cint, a4, a5, a6: cstring): cint {.importc, header: "".} Run (many such examples) why not use

Re: Program crashes when more than 4GiB of RAM are allocated

2018-07-30 Thread brentp
If that was merged in March as the PR indicates then it is not fixed. In #7894, I tested devel in may and it was still present.

Re: [best practice] we should use `check` or `require` instead of `echo` + `discard` magic in tests

2018-07-30 Thread Araq
I don't like `unittest.nim` at all. For all sorts of reasons, historically, unittest would trigger compiler bugs that the test itself wouldn't. `unittest`'s implementation is far too messy and tests should be simple. Tests that are run by Nim's "testament" tool should use `doAssert` instead.

Re: [best practice] we should use `check` or `require` instead of `echo` + `discard` magic in tests

2018-07-30 Thread GULPF
I think most new tests use `doAssert` instead of `echo`. But even `doAssert` leads to a terrible testing experience. If the test is `doAssert x == y` you have no way of knowing the values of `x` and `y` when the test fails. Another issue is that `doAssert` always exists at the first failure.

Re: should we rename git branch `devel` to `master` and `master` to `stable`?

2018-07-30 Thread Araq
I'm not a git expert, but I'm in great favor of your suggestion. We can make `devel` an alias for `master` for a transition period afaik.

should we rename git branch `devel` to `master` and `master` to `stable`?

2018-07-30 Thread timothee
In vast majority of git projects, master means branch with latest developments, but in Nim, master points to latest dot release IIUC, and devel is the branch with latest developments. Here's an example where this non-standard convention gets in the way: when deleting a feature branch after it

Set of enums with holes

2018-07-30 Thread Stefan_Salewski
Recently someone complained about gintro not working well with latest Nim devel. Well not too surprising due to a few breaking changes. [https://github.com/StefanSalewski/gintro/issues/28](https://github.com/StefanSalewski/gintro/issues/28) I have just tried to try it with latest devel -- do

Re: Configuring Neovim

2018-07-30 Thread shashlick
That's interesting - the JumpTodef() code is from zah/nim.vim but you are installing baabelfish/nvim-nim which has no such function. I tried both plugins though and nim.vim complains that it was unable to locte definition, exit code 1 and nvim-nim complained there was no such function.

Program crashes when more than 4GiB of RAM are allocated

2018-07-30 Thread Tim_H
So, I'm not sure if I did something wrong, but this code [https://gist.github.com/TimseineLPs/fad00f7a8ade87fbe141a161439dd703](https://gist.github.com/TimseineLPs/fad00f7a8ade87fbe141a161439dd703) always crashes when using more than 4GiB of RAM. (4,4GiB when compiled with debug, 4GiB with

Re: how to send udp datagram?

2018-07-30 Thread euant
@mashingan the documentation explicitly contains the following as an example of using UDP, which is what @luntik2012 was referring to: var socket = newSocket() socket.sendTo("192.168.0.1", Port(27960), "status\n") Run I have submitted a PR to update the