Re: Debugging the compiler

2016-08-23 Thread mbaulch
Thanks for your efforts @mora. The output looks like it could be very useful. Learning, debugging? Haven't quite decided. Something, I'm sure. Hope to have a play with it soon. Cheers.

Re: Debugging the compiler

2016-08-23 Thread mora
Currently I'm missing destructors, without them I can't write a valid XML (it is hard to close the last tag without knowing when your program will end). XMLs are great, because you can close and open the tree nodes in the browser. By the way, I spent most of my time digging info from types in th

Re: Debugging the compiler

2016-08-23 Thread zahary
I remember this cool trace visualizer that got popular a couple of years ago: [https://www.youtube.com/watch?v=4vtKRE9an_I](https://www.youtube.com/watch?v=4vtKRE9an_I) It was a commercial effort and the author abandoned it in the end I think, but the code was published here: [https://github.co

Re: Debugging the compiler

2016-08-23 Thread mora
This tool can be used for regular nim programs (not only for the compiler). I removed all the compiler specific parts and named it to _tracelogsimple.nim_. Please take a look at the end of [https://github.com/petermora/nimTracelog](https://github.com/petermora/nimTracelog) for an example with F

Re: Debugging the compiler

2016-08-23 Thread Angluca
Cool, really hope nim have full debugging facility.

Re: Debugging the compiler

2016-08-23 Thread jangko
very good job indeed, we need more tools like this to speed up development not only for nim compiler, any other projects could also benefits. I will try it soon. I imagine tools like this can be extended to generate/mapping function calls into program flow(visual flowchart, mindmap, graph or so

Debugging the compiler

2016-08-22 Thread mora
Hi, I created a tool for debugging the compiler. You can log any function. It actually modifies your function, before each line it checks the local variables, prints them (if they were newly introduced or modified), and also prints the lines in the code, and the stack, if it was modified. The