IRC log for #brlcad on 20130403

02:02.36*** join/#brlcad archivist (~archivist@host81-149-189-98.in-addr.btopenworld.com)
03:02.20*** join/#brlcad maths22 (~gcimaths@66-118-151-70.static.sagonet.net)
05:10.11Notify03BRL-CAD:brlcad * 55017 brlcad/trunk/src/libbu/parallel.c: only need to set affinity once, but record our cpu number before doing anything
05:12.08Notify03BRL-CAD:brlcad * 55018 (brlcad/trunk/src/libbu/affinity.c brlcad/trunk/src/libbu/parallel.h): pass our cpu number to parallel_set_affinity() since there's no reason to incur a lookup cost here (we know the number) and it keeps open the possibility of reassignment later.
05:14.51Notify03BRL-CAD:brlcad * 55019 brlcad/trunk/src/adrt/librender/camera.c: plan is to turn thread affinity on for all bu_parallel()-invoked threads, so no need to request it explicitly
05:27.39Notify03BRL-CAD:brlcad * 55020 brlcad/trunk/src/libbu/thread.cpp: add initial support for getting/setting the cpu number via thread local storage (TLS) for pthreads
05:36.33Notify03BRL-CAD:brlcad * 55021 brlcad/trunk/src/libbu/thread.cpp: if we can rely on __declspec(thread), then the ThreadLocal template won't need to be conditionalized to anything else anytime soon
05:54.27Notify03BRL-CAD:brlcad * 55022 brlcad/trunk/src/libbu/thread.cpp: use cmake-set type names
06:04.34Notify03BRL-CAD:brlcad * 55023 brlcad/trunk/CMakeLists.txt: initial attempt at testing for TLS type specifiers
06:09.12*** join/#brlcad merzo (~merzo@37-152-133-95.pool.ukrtel.net)
06:24.37Notify03BRL-CAD:brlcad * 55024 brlcad/trunk/CMakeLists.txt: BRLCAD_TYPE_SIZE() and the built-in CMAKE_CHECK_TYPE() macros are no good for this purpose since they try to sizeof(). instead, just try compiling a small custom snippet.
06:25.04Notify03BRL-CAD:brlcad * 55025 brlcad/trunk/src/libbu/thread.cpp: use the better new names for detected TLS support
06:43.06Notify03BRL-CAD:brlcad * 55026 brlcad/trunk/src/libbu/thread.cpp: pthread shouldn't take priority over the intrinsic methods, let it be a fallback
10:48.51*** join/#brlcad Skriptkid (~Skriptkid@117.208.167.54)
11:01.46*** join/#brlcad Skriptkid (~Skriptkid@117.208.167.54)
11:03.31*** part/#brlcad Skriptkid (~Skriptkid@117.208.167.54)
11:41.53Notify03BRL-CAD:bob1961 * 55027 brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl: Modify ArcherCore::cp to draw and select the new object.
12:46.43*** join/#brlcad jordisayol (~jordisayo@unaffiliated/jordisayol)
13:42.42*** join/#brlcad caen23 (~cezar@109.97.111.14)
14:02.36Notify03BRL-CAD:carlmoore * 55028 (brlcad/trunk/src/anim/chan_add.c brlcad/trunk/src/anim/chan_mult.c): stdio.h removed because of bio.h
15:00.57brlcadstarseeker: nice work pushing the merge
15:20.44Notify03BRL-CAD:brlcad * 55029 brlcad/trunk/src/libbu/thread.cpp: need to be careful to not dereference the specific value for single-threaded contexts. initialize to cpu 0 so we can always return asane. valueue in bu_parallel_id().
15:34.13Notify03BRL-CAD:starseeker * 55030 (brlcad/trunk/NEWS brlcad/trunk/src/other/CMakeLists.txt and 1453 others): Revert Tcl/Tk upgrade - causing problems on 32 bit Windows.
15:53.15``Erikbrlcad: is bu_parallel() going to have a way to disable the affinity process binding stuff?
16:06.26*** join/#brlcad caen23 (~cezar@92.81.187.0)
16:16.11*** join/#brlcad ncsaba (~ncsaba@p54982FFC.dip.t-dialin.net)
16:16.43ncsabaHi all
16:17.25ncsabaI'm back with my development environment questions :-)
16:18.18ncsabafor Java I was using Netbeans, which BTW also works for C/C++
16:19.25ncsababut it has the bad habit of reparsing 100+ files on any change on pipe.c, and generally being a big resource hog for big projects...
16:23.00ncsabain turn it has very good code navigation features, for which I couldn't find yet a good match in the lighter editors I tried
16:24.01ncsabaso I was wondering, what kind of editor/code navigation/debugging setup are you using ?
16:25.40ncsabaof course vi/grep/find/cscope/ddd work just fine, but an integrated one like netbeans/eclipse (or intellij for just java) is a big help
16:26.13ncsabais there anything in the C world which matches netbeans/eclipse ?
16:46.13caen23why don't you google around for c ides and try out a few? i've used codeblocks in the past and it seemed pretty basic, but i don't know if it suits your needs
16:46.23``Erikvim and emacs seem to be the biggies for BRL-CAD devs
16:46.34*** join/#brlcad luca79 (~luca@net-188-216-230-48.cust.dsl.vodafone.it)
16:51.26ncsabawell that's what I'm doing (google and try), but I haven't find anything really satisfactory yet, and I'm inpatient as you know
16:52.01ncsabathe problem is that I got used to what a real nice integrated IDE has to offer
16:52.17ncsabait is just breaking down when the project gets big...
16:52.21``ErikI started writing an ide back in the lateish 90's because I couldn't find a good linux IDE that compared to borland or msvc... then I realized that *nix IS the ide...
16:53.03ncsabaErik: you're right on that, but have you ever tried IntelliJ for java ?
16:53.06``Erikctags/etags can help if you're exploring a project, though I kinda like cscope
16:53.11``Erikyes, and netbeans, and eclipse
16:53.33caen23there's a nice series of articles on unix as ide here http://blog.sanctum.geek.nz/series/unix-as-ide/
16:54.16ncsabaI prefer netbeans over eclipse - but it it gets at it's limits with brl-cad on the 2G of RAM I have on my VM
16:54.59ncsabacaen23: thanks for the link, I'll have a look
16:55.33``ErikI only use them for java stuff, eclipse for android and netbeans for dealing with an ugly thing that happens to use the netbeans framework (wired in with multiple maven poms and other horrors, just to provide a thin gui on a C library via bridj)
16:57.07``Erikwhen I'm doing BRL-CAD work with msvc, I set up the source on an smb exported share on linux, use vim to edit, then go to the windows box and hit 'compile', cuz I'm just that lame O.o
16:58.36caen23ncsaba: taking the time to learn how to use vim or emacs is really worth it, so maybe this is a good opportunity to start looking deeper into them? :-)
16:59.51ncsaba:)
17:00.26ncsabawell I'm just giving one more try to "codelite"
17:01.07ncsabait seems to have OK navigation, syntax highlight and fast enough with the resources I have
17:01.49ncsabaemacs I tried some time ago - too many things to remember when you want to use it well :-)
17:02.26ncsabavim I'm using at it's basic capabilities - anything more makes too emacs-like
17:02.56``Erikboth emacs and vim have a fairly steep learning curve, but once you become familiar with the basics, they're insanely powerful tools
17:03.25ncsabaErik: I know, and that's exactly the problem for an inpatient type like me
17:03.30ncsabaI want it to work _now_
17:03.43Notify03BRL-CAD Wiki:Modyannuamy * 0 /wiki/User:Modyannuamy:
17:04.05caen23well it works _now_. only not for you :P
17:04.07``Erikiirc, someone tried to make netbeans input mappings to emulate vim and emacs
17:04.15ncsabayes, right :-)
17:05.16ncsabawell a good IDE has the advantage that the basic things work visually - then later you can learn the shortcuts
17:06.31``Erikhttp://www.tuxfiles.org/linuxhelp/vimcheat.html
17:06.34``Erikhttp://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html
17:06.39ncsababut if you have to learn some shortcuts to get editing work - that works for me only when all visual editors die out ;-)
17:07.07``Erikhttp://refcards.com/docs/gildeas/gnu-emacs/emacs-refcard-a4.pdf
17:07.36``Erikthere's your visual
17:07.40ncsabawell no, that won't work
17:08.08ncsabait's the same thing why I won't ever learn 10-finger typing
17:08.45ncsababut this got too off of what I wanted :-)
17:09.24caen23ncsaba: first time i got a hang of vim while going through vimtutor (type that at the prompt). there's also a game i found out about recently, but i don't know how effective it is in teaching vim. it's a fun idea nonetheless http://vim-adventures.com
17:09.29ncsabaI took notice that you use vim, emacs, and MS stuff for brlcad :-)
17:09.41Notify03BRL-CAD Wiki:Gsauerborn * 0 /wiki/User:Gsauerborn:
17:10.24``Erikncsaba: is this what you're looking for? http://myeslfriends.com/wordpress/wp-content/uploads/2010/11/computer-easy-button.jpg
17:10.27brlcadncsaba: you could always turn that feature of netbeans off
17:11.32ncsabaErik: :-)) not exactly, but close :-)
17:11.51brlcadI use eclipse from time to time, but usually spending most of my productively in emacs
17:12.02brlcadit should work just fine if your machine isn't too slow
17:13.39brlcadvim and emacs are going to be frustrating if you're impatient, both have respectable learning curves
17:13.44ncsababrlcad: codelite seems to work OK so far, so I'll settle for it for now - if it turns to be too slow again, I promise I will give a go to emacs :-)
17:14.00brlcadbut general rule of thumb holds pretty true, the steeper the curve, the more productive in the *long* run
17:15.54ncsabanow about compiling: a "make" after a single character change in pipe.c takes a few minutes for me, is that normal ?
17:16.29``Erikpipe.c is part of librt, which is used by a lot of other components, so lots of relinking
17:16.57``Erikyou could just do 'make librt' if the interface isn't changing
17:17.24ncsabaok
17:18.26ncsabaI tried "make mged", that's definitely faster than the whole thing, but then "make install" will still compile everything :-)
17:19.59ncsabanow if I only "make librt" and have the "build/bin" on my PATH, will mged pick up the right library if I also have it installed system-wide ?
17:20.25``Erikd'no, hit it with ldd to see which one it finds
17:20.41``Erik(or otool -L on mac)
17:20.41ncsabaok
17:20.55ncsabaubuntu here :-)
17:23.20ncsaba"make librt" vs "make" is 10s vs 4min on my box...
17:24.52ncsabaand the "build/bin" version takes the "build/lib/..." libraries, as confirmed by ldd
17:25.37ncsabaso I have now my fast change/compile/test path :-)
17:26.40ncsabaapropos testing, is there some logging built in to brl-cad ? I haven't look for it closer, but I also don't see anything obvious
17:28.07ncsabathe problem is that I managed to build an infinite loop into rt_pipe_bbox and logging would be the easiest way to debug that
17:28.08brlcadncsaba: if you know what you've modified, you can just run "make [target]"
17:28.15ncsabaok
17:28.50brlcadif you want want to relink everything after changing a source file, you can also run "make [target]/fast"
17:28.55brlcade.g., make librt/fast
17:29.40brlcadthat will just recompile pipe.c and relink librt, but not relink anything that uses librt (if it happened to have static linkage anywhere)
17:30.22brlcadalso, you don't need to run "make install" -- your build directory is effectively an install path and you can test from there
17:30.27brlcade.g., make rt && bin/rt
17:30.28ncsaba"make librt/fast": 4 sec
17:30.58brlcadif you have multiple cores, make will almost always run faster with make -j# too
17:31.15ncsabanot sure about the cores, I have a VM
17:31.36brlcadeven if you do, probably doesn't matter :)
17:31.56brlcadvm IO is a killer
17:32.11ncsabayes, but that's what I'm stuck with for the moment
17:32.17brlcadnods
17:32.34``Erikfor logging, bu_log() (but it's pretty basic, no levels or directors or anything)
17:32.47brlcadcat /proc/cpuinfo
17:33.24ncsabaErik: thanks for the logging hint !
17:33.45brlcad``Erik: it has levels...
17:34.31brlcadnot syslog-style levels, but does do stateful indentation levels (automatic)
17:34.46ncsababrlcad: I have only 1 CPU emulated, the host has 4 - not sure what that means in terms of optimal threading
17:34.48``ErikO.o ah, I meant the syslog/log4j style levels, yeh
17:35.09brlcadncsaba: it means it doesn't matter, -j isn't useful to you
17:35.48brlcadIF it emulated multiple CPUS and IF the VM bound those to separate cores, you'd potentially see a (tiny) gain
17:35.55ncsabawell I only need a printf level for debugging :-)
17:36.07ncsababut just a simple printf was not working for mew
17:36.18ncsabanot sure where that gets intercepted ?
17:36.19brlcadbu_log() is basically a wrapper around fprintf(stderr, ...)
17:36.37``ErikI'd imagine the tower of file io abstractions going on would dominate the compile time
17:36.43brlcadwe intercept I/O all over the place for a variety of reasons
17:37.22brlcadmged intercepts I/O for example so it can print to the text console it displays (even when running a separate command not internal to mged)
17:37.24ncsabaok, so where is actually bu_log printing at the end ?
17:38.03``Erikcould try putting an fflush() after your printf? (might be that it printed right, but was sitting in a buffer that wasn't getting filled up)
17:38.45ncsabaErik: that might be the case...
17:38.46brlcadyeah, my bet would have been on not flushing your buffer if you used printf
17:39.27brlcadbu_log() will work in that case (auto-flushes)
17:40.51ncsababut: the code is sitting in an infinite loop, so any buffers would fill in if I print in the inner loop...
17:41.06ncsabaok, I will try bu_log
17:41.26``Erikdepends on how fast the loop is, how big the buffer is, and how impatient you are
17:41.40ncsaba:-)
17:43.28starseekerncsaba: did anyone suggest trying kdevelop or qt creator?
17:45.20ncsabastarseeker: not yet
17:45.34ncsababut for the moment I 'm happy with codelite
17:45.44ncsabajust discovered it
17:45.45starseekerncsaba: you may also find the ninja build tool of interest, as an alternative to make
17:47.35ncsabastarseeker: I will have a look at ninja
17:47.45ncsabalooks interesting
17:53.06ncsabaok, bu_log works - now I have the next problem :-)
17:54.11ncsabanot sure how to explain: the logs come so fast I can't see them, and if I interrupt the process, the mged terminal goes away
17:54.45ncsabaid there a way to actually save the logs somewhere, or interrupt mged so that the current command is terminated but the terminal stays ?
18:00.34ncsabaok, I found bu_flog, will try that
18:25.58*** part/#brlcad jordisayol (~jordisayo@unaffiliated/jordisayol)
18:36.13brlcadncsaba: how are you interrupting the process?
18:36.20brlcadand which process?
19:20.34*** join/#brlcad ibot (~ibot@rikers.org)
19:20.34*** topic/#brlcad is BRL-CAD || http://brlcad.org || logs: http://ibot.rikers.org/%23brlcad/ || Thanks to all of our GCI participants for their fantastic work! Join brlcad-news to see when your changes get rolled out...
19:59.54brlcadncsaba: curious that you'd actually need a circular list for something...
20:00.10ncsabaI don't need it circular
20:00.24brlcadthe list head must be properly initialized for a circular list to work
20:00.25ncsabais there some simply linked ?
20:00.36ncsabait is properly initialized
20:00.46brlcadif it's infinite-looping, it's not ;)
20:01.09ncsabaok, what is properly initialized ?
20:01.11ncsabaI use:
20:01.26ncsabaBU_LIST_INIT(head);
20:01.32ncsabaand then:
20:01.43ncsabaBU_LIST_APPEND(crt_l, &(new_elem->l));
20:01.47``Erikhm, hearing rumor that disney killed lucasarts this morning O.o
20:03.22ncsababrlcad: is what I do not good enough for initing the list ?
20:04.11brlcadncsaba: I'd have to see the whole block in question
20:04.15brlcadbut if you don't need circ, it's moot
20:04.32brlcadtry following the example in include/bu.h:788
20:04.43ncsabaOK, I'll have a look
20:05.08brlcadit shows how to set up a list and iterate over it with a while loop
20:05.33brlcadset up that way, BU_LIST_FOR() will work as well for a for loop iteration
20:05.44``Erikhuh, motif went lgpl in 2012
20:05.57brlcadand if you're in a .cpp file, you can use an STL container
20:06.15``Erikwe can finally go for that 80's look in a pure open source solution! w00t!
20:06.23brlcadheh, great
20:07.32``Erikhttp://sourceforge.net/projects/motif/
20:09.13ncsababrlcad: but I don't want to dequeue the list - I want to be able to re-use it
20:09.46``ErikBU_LIST_FOR() doesn't dequeue, it just iterates
20:09.52ncsabaas a first iteration dequeue would also work actually
20:10.37ncsabaalso the head of my list has no data - I wonder if the while/for is skipping the head ?
20:11.46``Erikheh... git commit -m "I don't know why this changed and it scares me"  MainView.xib
20:22.18ncsababrlcad: replacing BU_LIST_FOR_CIRC with BU_LIST_FOR fixes my infinite loop...
20:22.46ncsabaso probably I simply didn't understand what the 2 mean
20:22.54ncsabathe list is built OK
20:30.55ncsababrlcad: I have now code that works - it is the refactoring of the pipe element calculation so it can be easily reused
20:37.55ncsabaI will submit the patch tomorrow I guess
20:38.06ncsabathanks for your help today !
20:38.13ncsababye
21:03.11*** join/#brlcad crdueck (~cdk@24.212.219.10)
21:10.37*** join/#brlcad merzo (~merzo@205-115-132-95.pool.ukrtel.net)
22:26.48*** join/#brlcad hsrai (~hsrai@202.164.53.116)

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.