Difference between revisions of "User:Schindler97/GSoC18/Log"

From BRL-CAD
(Coding Period)
(Coding Period)
Line 88: Line 88:
 
*** We were facing issues in installations but once Sean explained about how lib_bundles work, I was able to get everything running.
 
*** We were facing issues in installations but once Sean explained about how lib_bundles work, I was able to get everything running.
 
*** I also wrote and submitted a script that does what proc-db/wdb_example.c does using the tcl (nmz) approach and have submitted it for review. We will not decide whether to go ahead with the tcl approach or the ctypesgen one.
 
*** I also wrote and submitted a script that does what proc-db/wdb_example.c does using the tcl (nmz) approach and have submitted it for review. We will not decide whether to go ahead with the tcl approach or the ctypesgen one.
 +
*'''Week 5'''
 +
** '''17th June'''
 +
*** src/tcl/generic/tclParse.c seemed like a good place to understand how tcl scripts are parsed. Spent the entire day reading this code and trying to understand it.
 +
** '''18th June'''
 +
*** tclParse.c is very very complicated and I feel like it'll be less of a challenge to write the parsing script from scratch. I plan to use pyparsing (lib) to create the parser.
 +
*** Spent the day learning how pyparsing works and going through it's tutorial series.
 +
*** pyparsing requires a BNF of the script format to work with.
 +
*** I'm planning to use tcl scripts as input for the procedural geometry because they are already in use in the BRLCAD ecosystem and I don't want to introduce a new file format.
 +
*** Creating a BNF for tcl is turning out to be a complicated job
 +
*** I've been at this for hours now and finally, I've come across this on the TCL website : http://wiki.tcl.tk/1643. Essentially you cannot have a BNF for TCL.
 +
**'''19th June'''
 +
*** I'm just going to write a vanilla parser and add functionality as modules slowly.
 +
*** Basic TCL script parsing is working now.
 +
*** ''' The script parser works with python-brlcad (ctypesgen) to read tcl scripts and creating corresponding .g objects'''
 +
**'''20th June'''
 +
*** Changed the structure of the code and refactored it a bit.
 +
*** Right now arguments in scripts are being passed as constants but having variables would be an integral part of procedural geometry too.
 +
*** Changed the primitive creation code so that variable parsing can be introduced later.
 +
**'''21st June'''
 +
*** Some primitives are still remaining in the script parser. Adding those and making some finishing touches.

Revision as of 22:59, 21 June 2018

Development Logs

Community Bonding Period

Progress through the community bonding period

Coding Period

Progress through the coding period. Track changes in the current working repo : https://github.com/Killthebug/python-brlcad-tcl/commits/master

  • Week 1
    • 14 May Introduced bindings and examples for primitives : arb4, arb5, arb7
    • 15 May Introduced bindings and examples for primitives : tec, trc
    • 16 May Introduced bindings and examples for primitives : rhc, rec
    • 17 May Introduced bindings and examples for primitives : ehy, epa
    • 18 May
      • Introduced primtive : ell1
      • Going through libged to figure out how the 'in' command works. Edit : Found it, thanks to Cezar :)
      • Reading through the code of the ell primitive in librt to understand how primitives behave at a ground level. There's a lot going on, might take me a while to figure everything out.
      • Sean recommended going through the various READMEs scattered across the code, will start on those too and log progress here.
    • 19 May
      • Introduced the primitive : part
      • Trying to understand how certain parts of the pipe() function have been handled by nmz's code.
    • 20 May
      • Introduced bindings and example for : tor, eto & grip
      • Going through to libged/typce.in to understand how it works? Seems good so far.
  • Week 2
    • 21 May
      • Introduced bindings and example for the primitive : half
      • I've understood how typec.in functions
      • We're trying to figure out the ??? in : tcl -> .g . src/mged/setup.c (converts tcl to c commands) -> ??? -> include/rt/db_io.h -> .g
      • I learnt about opendb, which calls the f_opendb() function defined in src/mged/mged.c. to open and create new databases, this will be handy in our pipeline.
    • 22 May
      • Fixed primtive examples for arbx and sph
      • Did mged tutorials 6-8
      • Went through libged to understand how it work
    • 23 May :
      • Went through Hacking-BRL-CAD, I really wish I had found this document way earlier!
      • Couldn't get a lot of work done because of a research paper deadline I'm working on.
    • 24 May :
      • I've started documenting the project so far. The major subtopics I'm documenting are :
        • What is python brlcad?
        • How to setup python brlcad?
        • How do the different parts of the code work?
        • Creating geometry using existing primtives
        • Introducing and experimenting with primitives
        • Further Work
    • 25 May
      • Continuing work on the documentation.
      • I'm still not able to build a page using doxygen, I've dropped a message on Zulip and hope to get it resolved soon :)
    • 26-27 May
      • Took the weekend off to travel to the beach nearby, Last two weeks have been really hectic with GSoC work and my research paper deadline nearing up on the first of June!
    • 28 May - 4th June
      • No major GSoC work was done during this period because of an external submission deadline at a research conference.
  • Week 3
    • 5 June
      • Resumed GSoC work. Had a conversation with @Sean and updated him regarding the lag in project.
      • Revised through libwdb and some sample scripts in src/shapes and src/proc-db to get a hang on how .g files can be made using libwdb.
      • The plan now is to introduce a new primitive name "script" in librt. As a part of creating it, I'm going to have to define the syntax of the scripts that the primitive will parse.
    • 6 June
      • Major part of workday so far has been on understanding libged/typein.c that deals with the in command. I feel like we can incorporate a script keyword in this file itself. Also, waiting to hear from the mentors about what they think of this idea vs incorporating a new primitive.
    • 7 June
      • I've modified scripts in proc-db to better understand how to interact with libwdb's API.
      • I'm also trying to figure out where the logic for the main 'script' parser would go. I feel like putting it inside libwdb would be a logical choice.
    • 8 June
      • SVN has been acting weird today for me, despite multiple attempts (20+), I've been unable to checkout the repo. It seems to be an issue with my university proxy server but I'm not sure yet. I've been messing around a lot and have broken something which I can't seem to fix and hence am attempting to pull the latest build.
      • I've been scanning through libged and mged to figure out how file upload works in mged. That'll be the first challenge in working with the 'script' parser.
      • Discussion with Sean today is going-on. To be updated
    • 9 June
      • Today was majorly spent understanding the ctypesges approach as proposed by Kanzure.
      • ctypesgen seems to be automatically generating bindings for the c code and feels like a neat approach.
    • 10th June
      • Sean assisted with a path to fix some installation errors in the ctypegen code. It was due to certain missing header files.
      • We were facing issues in installations but once Sean explained about how lib_bundles work, I was able to get everything running.
      • I also wrote and submitted a script that does what proc-db/wdb_example.c does using the tcl (nmz) approach and have submitted it for review. We will not decide whether to go ahead with the tcl approach or the ctypesgen one.
  • Week 5
    • 17th June
      • src/tcl/generic/tclParse.c seemed like a good place to understand how tcl scripts are parsed. Spent the entire day reading this code and trying to understand it.
    • 18th June
      • tclParse.c is very very complicated and I feel like it'll be less of a challenge to write the parsing script from scratch. I plan to use pyparsing (lib) to create the parser.
      • Spent the day learning how pyparsing works and going through it's tutorial series.
      • pyparsing requires a BNF of the script format to work with.
      • I'm planning to use tcl scripts as input for the procedural geometry because they are already in use in the BRLCAD ecosystem and I don't want to introduce a new file format.
      • Creating a BNF for tcl is turning out to be a complicated job
      • I've been at this for hours now and finally, I've come across this on the TCL website : http://wiki.tcl.tk/1643. Essentially you cannot have a BNF for TCL.
    • 19th June
      • I'm just going to write a vanilla parser and add functionality as modules slowly.
      • Basic TCL script parsing is working now.
      • The script parser works with python-brlcad (ctypesgen) to read tcl scripts and creating corresponding .g objects
    • 20th June
      • Changed the structure of the code and refactored it a bit.
      • Right now arguments in scripts are being passed as constants but having variables would be an integral part of procedural geometry too.
      • Changed the primitive creation code so that variable parsing can be introduced later.
    • 21st June
      • Some primitives are still remaining in the script parser. Adding those and making some finishing touches.