2009-07-03_mbuf_code_cross_referencing_tools.log

*kushal has changed the topic to: Welcome to Linux User's Group of Durgapur | Mailing list at http://lists.dgplug.org/listinfo.cgi/users-dgplug.org | Old classes http://www.dgplug.org/irclogs/ | 7pm mbuf on Code cross-referencing tools | <-- CLASS STARTED -->Jul 03 19:11
mbufI don't have any presentation slides, but, we have some interesting points to ponderJul 03 19:11
sumitc!Jul 03 19:12
mbufWhen I type "START" on a separate line, I would like each one of you, to enter your favorite ice cream; when I say "STOP", everyone stops, and I continue sharing my thoughtsJul 03 19:12
mbufsumitc, shoot!Jul 03 19:12
*khushi__ (n=khushbu@59.180.129.245) has joined #dgplugJul 03 19:12
sumitcwhat does Code cross-referencing mean?Jul 03 19:12
mbufsumitc, we shall get to thatJul 03 19:12
sumitcokJul 03 19:12
mbufSTARTJul 03 19:12
sumitc<eof>Jul 03 19:12
techno_freakCasattaJul 03 19:12
mavuVanillaJul 03 19:13
Kishanblack currantJul 03 19:13
bose_aritrabutter scotchJul 03 19:13
rtnproButter ScotchJul 03 19:13
_roshanvanilaJul 03 19:13
amritakesar pistaJul 03 19:13
sumitcButterscotchJul 03 19:13
riavanillaJul 03 19:13
ArpitasundaeJul 03 19:14
DebashreestrawberryJul 03 19:14
*kushal gives channel operator status to techno_freakJul 03 19:14
susenj_vanillaJul 03 19:14
mbufSTOPJul 03 19:15
mbufas you can see, we have different people in the room who have different tastesJul 03 19:15
mbufit is not fair to make all of you to eat only 'vanilla' or 'butter scotch'Jul 03 19:15
mbufSimilarly, there are different tools available for code browsing, referencingJul 03 19:16
mbufyou try out each of these tools, and use the one that you like;Jul 03 19:16
mbufwith Free Software and GPL, you enjoy the freedom and choice of choosing whichever tools you likeJul 03 19:17
mbufcode referencing is a means of browsing code segments -- could be location of variable/function declarations; where they are referenced/used et. al.Jul 03 19:17
mbufwhen I now say START on a separate line, I would like you to enter the text editor or IDE that you use for writing programsJul 03 19:18
*khushbu (n=khushbu@59.180.132.107) has joined #dgplugJul 03 19:18
mbufof course, when I say STOP, I resume the talkingJul 03 19:18
mbufSTARTJul 03 19:18
techno_freakEmacsJul 03 19:18
rtnproviJul 03 19:18
sumitcvimJul 03 19:18
susenj_geditJul 03 19:18
amritaviJul 03 19:18
bose_aritravimJul 03 19:19
DebashreeviJul 03 19:19
riavimJul 03 19:19
ArpitaviJul 03 19:19
mbufEmacsJul 03 19:19
mbufSTOPJul 03 19:21
mavugedit :| and eclipseJul 03 19:21
mbufok, as we say most of them prefer either 'vanilla' or 'butter scotch'Jul 03 19:21
mbufwhich is which, you decide later :)Jul 03 19:21
mbufThe point I am trying to get to is, again the freedom of editor choice that you get to use with programmingJul 03 19:22
mbufThese editors have integration with tools that aid in code browsing/referencingJul 03 19:22
mbufor, you can use external toolsJul 03 19:22
mbufI prefer people to use any buffer editor (vim/GNU Emacs), simply because, you can work with these without the mouseJul 03 19:23
mbufA good programmer whose thoughts flow like beautiful poetry, should not worry much about the environmentJul 03 19:23
mbufWhen people start using the mouse, their hands move away from the keyboard; and if you don't know typing, you really find it hard to put them back in place -- trust meJul 03 19:23
mbufmost keyboards have a small hinge in "F" and "J" keys, as a marker to place your index fingersJul 03 19:24
mbufyou may not have realized them, until now :)Jul 03 19:24
mbufThese buffer editors work directly with RAM, and hence, working with them is really fastJul 03 19:24
mbufThey also have mouse bindings, so if you'd like you can use the GUIJul 03 19:25
mbufThirdly, if you are working on a remote server, you may not have a fancy bandwidth, and if you want to edit files, these buffer editors are really handy!Jul 03 19:25
mbufSo, you may wonder why is this guy talking so much about these editors and not discussing about code referencing yetJul 03 19:26
mbufBTW, my favorite ice-cream is chocolate :)Jul 03 19:26
mbufI am getting to thatJul 03 19:26
mbufWhich editor you use, determines your comfort nature and the tools you can use with themJul 03 19:27
mbufOf course, there are external tools available; but, most people like to have them integrated; YMMVJul 03 19:27
mbufSometimes in projects, you may have to use IDEs like Anjuta/Eclipse; if you have to use them, you really have to use themJul 03 19:27
*khushi_ has quit (Read error: 110 (Connection timed out))Jul 03 19:27
mbufThese IDEs have 'tooltip' or tab completion features;Jul 03 19:28
*khushi_ (n=khushbu@59.180.146.10) has joined #dgplugJul 03 19:28
*Arpita_ (i=Arpita@117.201.97.78) has joined #dgplugJul 03 19:28
mbufIf you click on a function, it shows the parameters to be passed to the function, syntax etc.Jul 03 19:28
mbufsome people like these; tab completion fills up the function name for you;Jul 03 19:28
*khushi_ (n=khushbu@59.180.146.10) has left #dgplug ("Ex-Chat")Jul 03 19:29
mbufIDEs also have 'search' feature where you can search for locations where the variable/functions are usedJul 03 19:29
mbufor where they are declaredJul 03 19:29
mbufOr, what I often use is simple "grep"Jul 03 19:29
mbufgrep -r "variable/function" .Jul 03 19:29
mbufIt will search all the .c and .h files, and displays the entries; fast, elegant and efficientJul 03 19:30
mbufor, if the code is huge, and you really want to easily move across code; you can use ctags with vim, or etags with GNU EmacsJul 03 19:30
mbufhttp://ctags.sourceforge.net/ctags.htmlJul 03 19:31
mbuffor etags, http://www.linuxjournal.com/article/0153Jul 03 19:31
*khushi__ has quit (Read error: 110 (Connection timed out))Jul 03 19:31
mbufdon't read it yet! just skim through quicklyJul 03 19:32
*rangeen (i=sherry@220.226.41.237) has joined #dgplugJul 03 19:32
*_roshan has quit (Read error: 104 (Connection reset by peer))Jul 03 19:32
mbufi use the following to generate the TAGS file from etags:Jul 03 19:32
mbuffind . -type f -name '*.[ch]' | xargs etags -aJul 03 19:32
*kushal has quit (Connection timed out)Jul 03 19:32
mbufopen Emacs, and then use the short-cuts to just browse through the codeJul 03 19:33
mbufyou can also use cscope: http://cscope.sourceforge.net/Jul 03 19:33
*Subhodip (n=subhodip@125.20.11.34) has joined #dgplugJul 03 19:33
mbufand here is a tutorial for vim/cscope: http://cscope.sourceforge.net/cscope_vim_tutorial.htmlJul 03 19:33
mbufdon't try it yet! just skim through quicklyJul 03 19:33
mavu!Jul 03 19:34
mbufmavu, shoot!Jul 03 19:34
*kushal (n=kd@122.167.25.88) has joined #dgplugJul 03 19:34
mavuis emacs already present or we download it?Jul 03 19:34
mbufmavu, depends on your distro :) if not installed, you can install it -- use your distro package managerJul 03 19:34
mavuokayJul 03 19:35
mbufIf people using GNU Emacs, still want the "IDE" kind of look and feel, you can try emacs code browser:Jul 03 19:35
mbufhttp://ecb.sourceforge.net/screenshots/index.htmlJul 03 19:35
*Arpita has quit (Read error: 104 (Connection reset by peer))Jul 03 19:35
rtnpro!Jul 03 19:36
mbufrtnpro, shoot!Jul 03 19:36
rtnproHow do we get the emacs code browser?Jul 03 19:37
rtnpro<EOF>Jul 03 19:37
mbufrtnpro, 1. Need to install "ecb" from your distro package manager 2. you could have searched this on the Internet :)Jul 03 19:37
rtnproIt is not in my distroJul 03 19:38
sumitc!Jul 03 19:38
mbufrtnpro, and which distro are you using?Jul 03 19:38
rtnproIts Fedora 9Jul 03 19:38
rtnproI have got emacs but not emacs code browserJul 03 19:39
*drunkencoder (i=7aa70fb7@gateway/web/ajax/mibbit.com/x-9781ac98a90b9dc8) has joined #dgplugJul 03 19:39
mbufrtnpro, you can always install from sourceJul 03 19:39
techno_freakrtnpro, http://ecb.sourceforge.net/downloads.htmlJul 03 19:39
*khushbu has quit (Read error: 110 (Connection timed out))Jul 03 19:39
rtnprookJul 03 19:39
drunkencoderMy connection is going down after every couple of minuteJul 03 19:39
mbufsumitc, shoot!Jul 03 19:39
sumitcwhat is a tag-file?Jul 03 19:39
rtnproWhat factors should decide the choice of our editor?Jul 03 19:40
mbufrtnpro, wait!Jul 03 19:40
ria /msg drunkencoder drunkencoder pingJul 03 19:40
*pushkal (n=chatzill@117.197.16.148) has joined #dgplugJul 03 19:40
mbufsumitc, the TAGS file contains the details of the reference count, and locations of variables/functions et. al.Jul 03 19:40
*techno_freak gives channel operator status to drunkencoderJul 03 19:41
sumitcSo, a tag file is always associated with a specific file?Jul 03 19:41
mbufsumitc, no, it can have information of files in a directoryJul 03 19:41
sumitcokJul 03 19:41
sumitc<eof>Jul 03 19:41
*drunkencoder has quit (Client Quit)Jul 03 19:42
mbufsumitc, think of it as a database that answers all your queries regarding code referencesJul 03 19:42
mbufrtnpro, what factors made you choose your favorite ice-cream?Jul 03 19:42
sumitcokJul 03 19:42
rtnproMy likes and dislikesJul 03 19:42
rtnproMy tasteJul 03 19:43
mbufrtnpro, that answers your questionJul 03 19:43
rtnprookJul 03 19:43
rtnproThanksJul 03 19:43
mbufmoving alongJul 03 19:43
mbufLXR is a very popular cross-referencing engine/tool that you can setup with Apache web-server for your code baseJul 03 19:44
mbuffor example: http://lxr.linux.no/linux/drivers/acpi/bus.cJul 03 19:44
mbufit is wonderful! you can click on any function, variable instance, and it will simply take you to its references!Jul 03 19:45
mbufpeople who like web interfaces, can setup LXRJul 03 19:45
mbufor there are tools like doxygen that can generate HTML documentation from source codeJul 03 19:46
mbufhttp://www.stack.nl/~dimitri/doxygen/Jul 03 19:46
sumitc!Jul 03 19:46
mbufKDevelop API is a good example: http://kdevelop.org/HEAD/doc/api/html/classes.htmlJul 03 19:46
mbufsumitc, shoot!Jul 03 19:46
sumitcwhat do you mean by "generate HTML documentation from source code"?Jul 03 19:47
*kd_ (n=kd@122.167.39.15) has joined #dgplugJul 03 19:47
mbufsumitc, i just sent an example link :)Jul 03 19:47
sumitcoh, alright!Jul 03 19:47
sumitc:)Jul 03 19:47
mbuftry this one: http://kdevelop.org/HEAD/doc/api/html/cmakejob_8cpp.htmlJul 03 19:48
mbufwho really wants to documentation? write the code, comment it; generate the documentation!Jul 03 19:48
sumitcwowJul 03 19:49
mbufThe gnome guys have devhelp for API references: http://www.gnome.org/projects/devtools/devhelp.shtmlJul 03 19:49
mbufGNOME documentation is also available online: http://library.gnome.org/devel/gtk/2.12/GtkButton.htmlJul 03 19:50
mbufWow!Jul 03 19:50
mbufBy the way, you can also install these documentation offline, usually installs in /usr/share/docJul 03 19:51
mbufIt is a very good practice, to install development documentation like these when you install development headers and toolsJul 03 19:51
mbufbecause you can always refer to them when you are disconnected from the Internet!Jul 03 19:51
mbufthey come in extremely handyJul 03 19:52
mbufso, we have editors, tools; what if you wanted to know how the flow of code?Jul 03 19:52
mbuftry GNU cflow: http://www.gnu.org/software/cflow/Jul 03 19:52
*rangeen has quit (Read error: 104 (Connection reset by peer))Jul 03 19:52
mbufActually, most people use printfJul 03 19:52
*kushal has quit (Connection timed out)Jul 03 19:53
mbufYou can also understand the flow with LXR, as you read codeJul 03 19:53
rtnpro!Jul 03 19:53
mbufrtnpro, shoot!Jul 03 19:53
*Debashree has quit (Read error: 54 (Connection reset by peer))Jul 03 19:54
rtnproWhy do we need these LXR,API?Jul 03 19:54
rtnproaren't vi, emacs sufficient?Jul 03 19:54
mbufrtnpro, different people like different ice-creamsJul 03 19:54
rtnproMeans its the same case of choiceJul 03 19:55
rtnproOr is these better than the previous ones?Jul 03 19:55
susenj_!Jul 03 19:55
mbufrtnpro, what I have mentioned is only a few; there are more tools that you can explore :)Jul 03 19:56
rtnprookJul 03 19:56
mbufrtnpro, I am only giving an insight into the different ice-creams that are availableJul 03 19:56
*runa_b (n=runa@122.169.12.50) has joined #dgplugJul 03 19:56
mbufsusenj_, shoot!Jul 03 19:56
*Debashree (n=Debashre@61.0.133.55) has joined #dgplugJul 03 19:56
susenj_  can we use KDevelop for editing and cross referencing both?Jul 03 19:56
mbufsusenj_, i guess you can; it is an IDE, I believe; you can check with the KDE guysJul 03 19:57
susenj_i use KDE ,that's whyJul 03 19:57
susenj_<eof>Jul 03 19:57
mbufsusenj_, i haven't used it much; except for the KDevelop tutorialJul 03 19:57
rtnpro!Jul 03 19:58
mbufsusenj_, the features are here: http://www.kdevelop.org/index.html?filename=3.5/features.htmlJul 03 19:58
mbufrtnpro, shoot!Jul 03 19:58
rtnproWhat is LXR?Jul 03 19:58
mbufrtnpro, i expected you to use a search engine; anyways, "Linux Cross Referencer" -- http://sourceforge.net/projects/lxrJul 03 19:59
rtnprookJul 03 20:00
rtnproThanks ...let me see the pageJul 03 20:01
mbufas i said, this is just a few of the tools that are available, or, that i have come acrossJul 03 20:01
mbufthere could be even more; you should explore more, and use the one that you likeJul 03 20:01
mbufafter all, this community is all about freedom and choiceJul 03 20:01
mbufsomeday we will make an open recipe for ice-creams as wellJul 03 20:02
mbufThis is the end of the session; and I am open to questionsJul 03 20:02
sumitc:)Jul 03 20:02
*indradg (n=indradg@59.93.202.56) has joined #dgplugJul 03 20:03
mbufEither people have gone to buy ice-cream or they are still looking at the links and documentation in detailJul 03 20:04
sumitcthe nd one, actuallyJul 03 20:04
sumitc2nd oneJul 03 20:04
mbufI am ok with either one :)Jul 03 20:05
rtnpro!Jul 03 20:05
mbufrtnpro, shoot!Jul 03 20:05
*Prakhar (n=prakhar@122.163.69.23) has joined #dgplugJul 03 20:05
rtnprois cross referencing kind of browsing through the codes?Jul 03 20:06
mbufrtnpro, more than just browsingJul 03 20:06
rtnproin what sense?Jul 03 20:06
mbufrtnpro, what does this tell you? http://lxr.linux.no/linux/+ident=10010111Jul 03 20:07
rtnprookJul 03 20:07
mavuwhile i was looking at the link.. i accidentally stumbled upon this... seems awesome..http://tomoyo.sourceforge.jp/cgi-bin/lxr/ident?Jul 03 20:08
mbufrtnpro, 1.where the function is located 2. Where it is referenced et. al.Jul 03 20:08
*susenj_ has quit ("ChatZilla 0.9.83 [Firefox 3.0b5/2008043010]")Jul 03 20:08
mbufi would encourage people to document whatever new things they learn, or come across in dgplug wiki siteJul 03 20:08
mbufand if all of you have started blogging, put that in your planetJul 03 20:08
mbufafter all, this community is about sharing knowledge :)Jul 03 20:09
*susenj__ (n=chatzill@59.178.176.6) has joined #dgplugJul 03 20:09
*susenj__ is now known as susenj_Jul 03 20:09
*kd_ has quit (Read error: 110 (Connection timed out))Jul 03 20:09
*susenj_ is now known as suse_njJul 03 20:09
mbufso, we will close the class session for now; and we shall leave it open for further discussionsJul 03 20:10
mbufso everyone can chip in their suggestions, views, discussions et. al.Jul 03 20:10
mbuf<EOF>Jul 03 20:10
sumitcdoxygen is excellentJul 03 20:11
sumitcso is ctagsJul 03 20:12
mbufIt is going to be a long night for all of you, trying all these tools; but, I would prefer if you can spend a day or two on themJul 03 20:15
pushkalmbuf, when you referenced http://kdevelop.org/HEAD/doc/api/html/classes.html, what exactly were you trying to show ?Jul 03 20:18
pushkali mean that i always thought these documentation were built up manually, or is it done with the help of the cross-referencing tools you just mentioned?Jul 03 20:18
mbufpushkal, the tools generate the documentation :)Jul 03 20:19
mbufpushkal, use Free Software tools to make yourself more productive, and efficientJul 03 20:19
pushkalmbuf, all of it ? i mean the from the web pages, to the links to the matter ?Jul 03 20:20
pushkal<eof>Jul 03 20:20
mbufpushkal, if you want to eat all the ice-cream, you can! nobody is stopping you :)Jul 03 20:21
techno_freakpushkal, in the place where i work, we generate the entire documentation library using a tool called sphinxJul 03 20:21
mbufpushkal, or if you only want selected flavors, you can choose;Jul 03 20:21
techno_freakwe write only the code and document content, rest is done by the toolJul 03 20:21
*pushkal would certainly love to have all of it !!Jul 03 20:21
*susenj (n=student@59.178.176.6) has joined #dgplugJul 03 20:22
*ecntrk (n=ecntrk@117.194.2.120) has joined #dgplugJul 03 20:22
pushkalthanks mbuf , techno_freak !Jul 03 20:22
Prakharsorry, guys, i missed. will read the logs soon. it seems that something very cool was discussedJul 03 20:23
mbufPrakhar, yes, both Free Software and ice-cream are cool!Jul 03 20:23
*pushkal has quit ("ChatZilla 0.9.83 [Firefox 2.0.0.15/2008062306]")Jul 03 20:24
Prakhar:) hey mbuf, i read many of your presentations. and i appreciate your effortsJul 03 20:24
mbufPrakhar, npJul 03 20:24
mbufok guyz, i am calling it a dayJul 03 20:24
*pushkal (n=chatzill@117.197.16.148) has joined #dgplugJul 03 20:24
mbufnow that we know each other, you are welcome to add me in orkut,  or LinkedIn;Jul 03 20:25
mbufi will be available on this channel, if I am logged in;Jul 03 20:25
mbufelse, you are welcome to send me an e-mail; and we shall keep in touchJul 03 20:25
ecntrkwill you please give your orkut uid?Jul 03 20:25
bose_aritra^^^^^^ yesJul 03 20:26
Prakharsure, thanks mbuf!Jul 03 20:26
susenjwill you please?Jul 03 20:26
mbufecntrk, take the link from shakthimaan.com; you really need to use a search engineJul 03 20:26
Kishanof course.Jul 03 20:26
pushkaluse shois peopleJul 03 20:26
*Debashree has quit (Read error: 113 (No route to host))Jul 03 20:26
mbufHappy Hacking!Jul 03 20:26
pushkalwhois*Jul 03 20:26
Prakharmbuf, :)Jul 03 20:26
ecntrkmbuf: hmm<eof>Jul 03 20:26
*mbuf has quit ("shakthimaan.com")Jul 03 20:26
*suse_nj has quit ("ChatZilla 0.9.83 [Firefox 2.0.0.14/0000000000]")Jul 03 20:26
bose_aritratuxmaniac, when will be the next class?Jul 03 20:27
*amrita_ (n=amrita@117.201.97.62) has joined #dgplugJul 03 20:29
*amrita_ has quit (Client Quit)Jul 03 20:29
rtnpro!Jul 03 20:29
*techno_freak has changed the topic to: Welcome to Linux User's Group of Durgapur | Mailing list at http://lists.dgplug.org/listinfo.cgi/users-dgplug.org | Old classes http://www.dgplug.org/irclogs/ | 7pm mbuf on Code cross-referencing tools - CLASS OVER |Jul 03 20:29
amritatechno_freak, what about the class at 10.30?Jul 03 20:30
rtnproDoes doxygen generate docmentation from the source code by itself?Jul 03 20:30
*Arpita_ has quit (Read error: 104 (Connection reset by peer))Jul 03 20:30
rtnproIs documentaion a kind of help file?Jul 03 20:31
techno_freakamrita, no idea, looks like nothing is scheduled. gotta ask kushal daJul 03 20:31
riatechno_freak, pingJul 03 20:31
rtnprotechno_freak, can you help me with the doubtsJul 03 20:31
techno_freakria, yes?Jul 03 20:31
techno_freakrtnpro, ?Jul 03 20:31
rtnprotechno_freak, yesJul 03 20:31
Kishanwill there be a class at 10:30????Jul 03 20:31
riatechno_freak, kushal has asked you to send logs of today's class positivelyJul 03 20:32
*deepakBCREC_ (n=chatzill@125.20.11.34) has joined #dgplugJul 03 20:32
riaKishan, not sure about itJul 03 20:32
techno_freakria, sure, will mail him the logsJul 03 20:32
techno_freak:)Jul 03 20:32
rtnprotechno_freak, is this documentation generated by doxygen a kinf of hhelp file?Jul 03 20:32
riatechno_freak, okJul 03 20:32
Kishanya...seems so....Jul 03 20:32
rtnproKishan, any commmentsJul 03 20:32
techno_freakrtnpro, it's a proper HTML documentation for the source filesJul 03 20:33
rtnprotechno_freak, ?Jul 03 20:33
techno_freakrtnpro, it's not a manual or tutorial, it's code documentationJul 03 20:33
rtnprotechno_freak, means code in html format for easy searching the various functionsJul 03 20:33
rtnprotechno_freak, is it?Jul 03 20:34
sumitcrtnpro, try them out, you'll get itJul 03 20:34
*susenj (n=student@59.178.176.6) has left #dgplugJul 03 20:34
techno_freakrtnpro, when you write code, you also write documentation along with itJul 03 20:34
rtnprotechno_freak, like web pagesJul 03 20:34
riatoday there will be no classesJul 03 20:34
rtnprosumitc, let me see...thanksJul 03 20:34
sumitcnpJul 03 20:34
*techno_freak has changed the topic to: Welcome to Linux User's Group of Durgapur | Mailing list at http://lists.dgplug.org/listinfo.cgi/users-dgplug.org | Old classes http://www.dgplug.org/irclogs/ | 7pm mbuf on Code cross-referencing tools - CLASS OVER | No Class at 10.30 today |Jul 03 20:34

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!