Re: How to track down missing nimcache/read.o ?

2017-10-28 Thread jlp765
to get more info on each compile step, set the verbosity level nim c --verbosity:2

How to track down missing nimcache/read.o ?

2017-10-28 Thread jackmott
on compile I'm getting this error from gcc: gcc: error: /home/jmott/easygl/examples/model_loading/nimcache/read.o: No such file or directory How can I track down the cause of this? edit: nim -f fixed it.

Re: Nim discord server

2017-10-28 Thread scriptkiddy
@wizzardx It's not that it offers an advantage for those already using IRC. It just makes it more convenient for people who aren't using IRC. Personally, I have a lot of music production groups I follow on Discord as well as a couple programming groups(like VueJS for instance). On IRC I follow

Re: possible compiler bug with generics?

2017-10-28 Thread wizzardx
Or at least, I think that's probably a fundamental underlying model. There's a lot of higher level clever things that Nim does before getting to separate C files, I think separate .c units is just an optimisation not a restriction, but that it did to some extent shape how the Nim compiler logic

Re: possible compiler bug with generics?

2017-10-28 Thread wizzardx
I checked things a bit. I _think_ it's an artifact of Nim code compiling each nim file into a separate .c file. After that point the regular C toolchain takes over. c gets compiled to .so, and then .so files get compiled to the final binary. Anyhow, at the .so level, there's some symbols export

Re: possible compiler bug with generics?

2017-10-28 Thread mratsim
Actually I think there is a difference between how types and procs are treated, I don't know if this is intentional. This compiles: types.nim type Foo* = distinct int proc toFoo*(x: int): Foo = Foo(x) lib.nim import types proc Bar*

Re: How do you keep your motivation on your open-source projects

2017-10-28 Thread dataman
> what keeps you motivated or make you most happy in an open-source project (or > inversely) When my pull-requests are accepted. This means that not only I find them useful. This is very important.

Re: Winim Excel

2017-10-28 Thread jlp765
No experience here, but if you google "excel vba saveas worksheet" and find some VBA code like With ActiveWorkbook .SaveAs "C:\" & .Sheets(1).Name .Close 0 End With then you should be able to do something like obj.activeSheet.saveAs("insert the

Re: possible compiler bug with generics?

2017-10-28 Thread jangko
@wizzardx is correct, this is normal Nim behaviour. Nim generic proc is instantiated at _callsite_. The above example, Bar is instantiated at bug.nim not at lib.nim, and at that time, the scope where the Bar is instantiated have no information about Foo symbol.

Re: Wrapping cpp type with integer parameters

2017-10-28 Thread Araq
Will give it a shot, doesn't look too hard to fix.

Re: How do you keep your motivation on your open-source projects

2017-10-28 Thread mratsim
Great feedbacks Araq and monster . I don't want this topic to be about my motivation specifically but everyone's experience, also this kind of topics happens often in Quora and Reddit so maybe we could top Google search and get some new blood this way . Now I do sports, several hours per week (

Re: Wrapping cpp type with integer parameters

2017-10-28 Thread mratsim
@wizzardx I tried similar things to work around importing [this templated C++ generic types bug](https://github.com/nim-lang/Nim/issues/6415) C extern function: Too much boilerplate code is needed on the C++ side and on the Nim side, "So you provided bindings for [T: SomeSignedInt] well now do

Re: testing private methods in external module

2017-10-28 Thread wizzardx
I'm pretty clueless in general with Nim, but don't you always put curley brace pragmas just before the equals sign, rather than in some other place? (I can't think of any exceptions to this in the code I've seen so far).

Re: Nim discord server

2017-10-28 Thread wizzardx
Hmm - what segment of the Nim community would this be for? I haven't used it, but isn't Discord mainly for gamers (basically, text message or voice)? So that's also assuming that people are online at the exact same time, while playing a given multiplayer game. What kind of advantage would this

Re: VS Code: Compiled Nim program

2017-10-28 Thread wizzardx
I work with VS code for Nim, but how I (and I'm guessing a lot of Nim users work) usually compile and execute the apps in a separate command-line (ie, what editor or IDE you're using doesn't affect your dev and testing). Just a total random thumbsuck, but it may be some interaction with "nimsugg

Re: Wrapping cpp type with integer parameters

2017-10-28 Thread wizzardx
I'm pretty clueless here, but just some 2c. How well is this handled in other non-C++ langs or tools which do have interop with C++? Some examples that come to mind: D lang, Python with pybind11, and SWIG. And a couple of other usual things - providing a C extern function from C++ that somehow

Re: possible compiler bug with generics?

2017-10-28 Thread wizzardx
I think that's just normal Nim behavior, right? If module A imports module B, and module B imports module C, then module A won't automatically see everything that B imported that was able to let B compile? You could probably solve the probly by either: 1\. Import types.nim in bug.nim, to bring

Re: Winim Excel

2017-10-28 Thread wizzardx
Congrats on finding that. I'm not sure, but I get several results if I google for "Component Object Model Excel.Application" Another way to put it - I think you'll have some success if you try to make a Windows app (eg: VB.net, VBscript, C#, etc, whatever you know best) that uses the "Excel.Ap

Re: possible compiler bug with generics?

2017-10-28 Thread jackmott
Ok here we go, takes 3 files to repro: types.nim: type Foo* = distinct int lib.nim: import types proc Bar*[T](input:T) = let x = 5.Foo echo $x.int echo input bug.nim: import lib proc bug() =

Getting CommentStmt from TypeDef AST

2017-10-28 Thread jcosborn
Is there a way to get a CommentStmt out of a TypeDef? In the example below, `comment 3` doesn't show up in the AST tree, but is there in the repr. import macros macro dump(x: typed): untyped = echo x.treerepr echo x.repr newEmptyNode() dump: