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 the compiler, 
what's why this tool was useful.


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.com/traceglMPL/tracegl](https://github.com/traceglMPL/tracegl)

Perhaps you can take this even further and experiment with full-program tracing 
and integration with such a visualizer.


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 Fibonacci call hierarchy.
Peter


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 something like that) -- 
that can be very useful to analyze a piece of code from many different angles.