Re: Testing `newruntime` `owned ref` as to cyclic data...

2019-08-27 Thread Araq
> This can't be done with just object destructors as ref's and owned ref's are > created by compiler magic and we can't make custom destructors for them. How to deal with that problem is part of the spec, see `.nodestroy`. > If this example and my thinking are correct, we are doing a lot of work

Re: replace c2nim by gcc work tracing to automate complex library bindings (Gtk, Qt, LLVM, Boost,...)

2019-08-27 Thread shashlick
Check out [nimterop](https://github.com/nimterop/nimterop) which aims to make it easier to create bindings. It uses `gcc -E` to tackle the preprocessor and [tree-sitter](https://github.com/tree-sitter/tree-sitter) to parse and generate an AST. The AST is then converted into Nim syntax. We aren'

Re: replace c2nim by gcc work tracing to automate complex library bindings (Gtk, Qt, LLVM, Boost,...)

2019-08-27 Thread Araq
Well we have a GTK3 wrapper in Nimble and there are project like "nimterop" etc that try to do that. IMO everything beyond c2nim's approach is deeply flawed as the type information available in C is too weak. `int fn(int count; char* args);` is this a pointer to a byte array? A pointer to a sin

Nim documentation like Go

2019-08-27 Thread SebastianM
Hi guys, Is anyone familliar with Golang documentation? If you type go doc fmt Println in terminal you can get a small peace of information: func Println(a ...interface{}) (n int, err error) Println formats using the default formats for its operands and writes to standard output. Spaces ar

Re: Nim documentation like Go

2019-08-27 Thread Araq
I don't think we have such a tool.

replace c2nim by gcc work tracing to automate complex library bindings (Gtk, Qt, LLVM, Boost,...)

2019-08-27 Thread dponyatov
Does anybody experimented with running gcc with -fdump-tree-all and -fdump-rtl-all to make more sophisticated and fully native preprocessed data to make complex C/C++ libraries binding automation? I tried to play with Gtk-3.0 library installed in by Debian 9 as a sample of Nim/C integration, bu

Re: Help me optimize this small Nim port to the speed of the original C version

2019-08-27 Thread r3c
Tested on devel, its fixed now. That was fast :P

Re: Testing `newruntime` `owned ref` as to cyclic data...

2019-08-27 Thread cdunn2001
I'm not sure I see your point. Yes, existing cyclic datastructures would require significant modification in this new regime. But is _your_ code even legal? Aren't you violating the single-ownership model?

Re: Nim vs. Python & Groovy (string splitting): Why is string splitting so slow in Nim?

2019-08-27 Thread cblake
It looks like `nim-faststreams` is just to bridge the API gap between mmap IO and streams interfaces which is nice and all, but won't help for `startProcess` or other `popen`-like contexts where in this discussion streams slowness was a problem. { @mratsim didn't say it would, exactly, but I tho

Re: What do you think about the programming language NIM?

2019-08-27 Thread kubilay
I am Python developer. I am so excited about Nim. I am using it with Nimpy. And i am learning Nim coding now. Excellent programming language. It has bright future. I like so much Nim.

Re: Need debugging help

2019-08-27 Thread mratsim
As shown in many other threads, you can get the same speed in Nim as in C or Assembly, especially for scientific computing: * [https://forum.nim-lang.org/t/5124](https://forum.nim-lang.org/t/5124) * my experiments for Project Picasso: [https://github.com/mratsim/weave/tree/master/benchmarks/

Re: Need debugging help

2019-08-27 Thread cdunn2001
Anyway, your help saved the day. I'm expanding our use of Nim internally. I still have a lot of concerns about performance for simple things, but Nim has so much upside that I think we'll be ok.

Re: Need debugging help

2019-08-27 Thread cdunn2001
Yes, a "canary field" would be a good debug-mode for reference-counting. That's a very good idea. Buffer-overflow is hard to detect, but when you switch to malloc/free there is a very good chance that valgrind will notice something. Maybe that's wishful thinking on my part.

Re: Help me optimize this small Nim port to the speed of the original C version

2019-08-27 Thread mratsim
Fix for negative float32 literals incoming - [https://github.com/nim-lang/Nim/pull/12063/files](https://github.com/nim-lang/Nim/pull/12063/files)

Re: Quantum Leaps framework implementation /Miro Samek/

2019-08-27 Thread refaqtor
It has been some years since I read the QL book. I thought it was a fantastically elegant and efficient design for maintainable and robust code. But, it takes a little effort to get your head around in the first place. - very unlike trends in scriptable live development these days. I, for one, w

Re: Help me optimize this small Nim port to the speed of the original C version

2019-08-27 Thread Jehan
For what it's worth, I wrote ptrmath primarily for C/C++ interop. Modern compilers are generally smart enough to generate identical code, and using pointer arithmetic can even inhibit optimizations in some cases. You'll see performance benefits only for certain edge cases and may lose performanc

Re: What EXCACTLY is pure pragma in object declaration?

2019-08-27 Thread Araq
It does nothing for objects that don't use inheritance.

Basketball: Space Jam or the World Cup? LeBron among USA's absent stars

2019-08-27 Thread calmnes12
WASHINGTON: So many NBA headliners from the United States are skipping the Basketball World Cup in China that they would assemble a formidable all-star squad of their own. But it is nothing new for the Americans as they seek a third consecutive crown in the global showdown that runs Aug 31 to S

Quantum Leaps framework implementation /Miro Samek/

2019-08-27 Thread dponyatov
* [http://www.state-machine.com/psicc](http://www.state-machine.com/psicc)/ * [http://www.state-machine.com/psicc2](http://www.state-machine.com/psicc2)/ What do you think about the pros/cons of events + state machine concept?