<qi-bot> [commit] Ayla: Added sections directories for the dingux build. (master) http://qi-hw.com/p/gmenu2x/5a27851
<wolfspraul> good morning :-)
<kyak> indeed!
<wolfspraul> kyak: yesterday I saw Niels uploading some NanoMap screenshots, well, I hope they ran on a NanoNote :-)
<wolfspraul> a good mapping app would be cool
<wolfspraul> just a viewer, but fast, with point of interest lookup, easy pre-downloading of a certain area/city, etc.
<kyak> wolfspraul: yeah, it's a cool app and so far Niels kept it working on Ben (though it feels like he tends towards "desktop" features in NanoMap)
<viric> xiangfu: ni hao
<viric> xiangfu: you should see how 'offrss' makes PDFs for e-ink readers :)
<Ayla> mth: here's a patch for gmenu2x: http://pastebin.com/GJRMTEjP
<Ayla> mth: I don't know if you already worked on it, so I didn't commit it yet
<Ayla> this does fix a lot of memory leaks :)
<larsc> Ayla: delete should take NULL just fine, so there is no need to check for it
<Ayla> hi larsc
<larsc> hi
<Ayla> does delete also set the pointer back to NULL?
<larsc> nope
<Ayla> ok
<Ayla> then here's a new one: http://pastebin.com/mAjKEA7c
<mth> Ayla: I haven't worked on it yet, so there is no risk of conflicts
<mth> is "< list.end()" valid?
<mth> usually I only see != being used there
<mth> I don't know if iteration steps are ordered
<Ayla> it probably is valid, but I'd prefer having '!=' as well
<larsc> iirc it < list.end will not work
<larsc> but my c++ is a bit rusty
<Ayla> can I push the patch I uploaded?
<mth> what does erase() do exactly?
<Ayla> it empties the vector
<Ayla> (and call the destructor for each object contained on that vector)
<mth> "voices.erase(voices.begin(), voices.end());" could be replaced by "voices.clear();" then
<mth> actually, won't the destruction of the vector throw away all elements anyway?
<mth> then nothing would have to be done in ~SettingsDialog
<Ayla> it will destroy the array, but I'm not sure about the elements contained on the array
<Ayla> just because you can have pointers to external objects, used elsewhere on your program
<mth> this says the element destructors are called: http://www.cplusplus.com/reference/stl/vector/~vector/
<mth> pointers don't have destructors
<Ayla> then it won't work
<Ayla> and it does not work either with erase()
<mth> pointers and STL containers are a problem that has only been solved in C++11 afaik
<mth> in earlier C++ there is auto_ptr, but the problem with that is that the source becomes null on copy
<mth> so if you accidentally pass a container by value, you have just destroyed the original
<Ayla> I now use this:
<Ayla> Fixed a good number of memory leaks.
<Ayla> ups
<Ayla> wrong copy/paste
<Ayla> for (uint i=0; i<voices.size(); i++)
<Ayla>     delete voices[i];
<Ayla> voices.clear();
<mth> apparently random-access iterators can be compared with "<": http://www.cplusplus.com/reference/std/iterator/
<mth> but "!=" works on any kind of iterator
<Ayla> if you don't have any other remarks, I push the changes
<mth> I'd prefer this approach: for (vector<MenuSetting *>::iterator it = voices->begin(); it != voices->end(); ++it)
<Ayla> ok.
<mth> the clear() is not needed as the vector will be destructed automatically
<Ayla> rihgt
<Ayla> right*
<Ayla> so here's a new diff: http://pastebin.com/8nHBQr2b
<Ayla> if I success to find the gmenu2x bug with the VTs tonight, I'll have a look at bootsplash
<mth> patch looks good now
<mth> there is also still the problem with the thread that remains after exec
<Ayla> I'll be back tonight
<qi-bot> [commit] Ayla: Fixed a good number of memory leaks. (master) http://qi-hw.com/p/gmenu2x/81a607c
<wpwrak_> kristianpaul: hmm ... probably a factory hall where they take the bottom shell, put the PCB in it, place the top shell on it, then squeeze
<wpwrak_> kristianpaul: most of the "investment" were probably bribes ;-)
<wpwrak_> kristianpaul: that whole "industry" in tierra del fuego is a bit of a scam
<methril_work> a interesting new!!!
<kyak> wonder if it possible to turn Ben into a real time machine
<kyak> perform some signal processing or whatever
<wpwrak_> methril__: sounds promising
<wpwrak_> kyak: would ubb-vga be real-time enough ? ;-)
<kyak> wpwrak_: not sure. Can you halt all other tasks and do some processing in hard real time?
<wpwrak_> kyak: i halt all other tasks, oh yes ;-)
<methril_work> kyak, why you need a RT-Ben?
<wpwrak_> kyak: although this is by simply disabling interrupts :)
<methril_work> wpwrak_, is applying new RT concepts with UBB /)
<methril_work> ;)
<kyak> methril_work: it's a good question, probably i don't need it at all. But it's interesting and fun
<methril_work> kyak, i know :)
<kyak> wpwrak_: i might want to have a look into how you do it then :)
<wpwrak_> grmbl. openscad seems to have sprouted a gazillion other little cad variants, each with a different feature set, and of course none really complete
<kyak> i'm doing some steps to implement Ben NanoNote target support in MATLAB/Simulink.. It's hard to say where it's going, but it is interesting so far
<wpwrak_> kyak: (ubb-vga) the dirty way :)
<kyak> so far, no real time.. Just implement some things in Simulink and see it running on Ben, not real time
<methril_work> kyak, but are you going to use RTAI or RT patch?
<wpwrak_> kyak: there is one "interrupt" source. and that's a brief poll of the keyboard at the end of each frame :)
<kyak> methril_work: you should be using one of these, yes..
<kyak> s/you/i
<kyak> wpwrak_: do you do this from userspace?
<kyak> wpwrak_: this is intersting. Perhaps i can do the same when deploying my application - then i don't need the RT patch?
<wpwrak_> kyak: if you don't mind halting the rest of the system, perhaps not
<wpwrak_> kyak: the system survives this abuse. i.e., when ubb-vga exits, the ben returns to normal operation. the system time is probably off, though
<kyak> not only i don't mind doing that, but i'd like to do that :)
<wpwrak_> perfect then :)
<kyak> i liked the RTLinux approach though, when they have some RT governor and linux kernel is running inside of it
<kyak> and then your real time application can step in and take the priority
<wpwrak_> oh yes. it's a lot more versatile. also has quite different requirements than ubb-vga. ubb-vga is more a device driver than a proper RT task
<kyak> wpwrak_: what if i want to visualize something while running such application? I will have to enable interrupts at least for LCD driver (if such thing is even possible) and this could also lead to loosing the real time schedule?
<kyak> i don't quite understand why it is so easy to disable interrupts from userspace.. Would it work if started by regular user?
<kyak> also, the interrupts are relevant for device drivers, right? Would other running appplication cause any problems?
<wpwrak_> kyak: you need to be root to do all this
<wpwrak_> kyak: ubb-vga disables everything else. other drivers, other processes, etc.
<wpwrak_> kyak: if your timing requirements are less crazy, you can leave the LCD display on. the refresh happens automatically. it just eats a bit of memory bandwidth and introduces memory access delays.
<kristianpaul> wpwrak_: (scam) :-S, got it
<wpwrak_> kyak: don't forget that ubb-vga is very sensitive to delays. each 18 ns it must deliver another pixel (4 bits)
<wpwrak_> kyak: there's of course prefetching. de facto, the delay tolerance should be 1-2 us. if anything delays things beyond this, the timing falls apart.
<kristianpaul> kyak: when is next "image" will be released?
<kristianpaul> want to play allegro games and check last nanomap :)
<kyak> wpwrak_: cool, thanks for explanations :)
<kyak> kristianpaul: you would have to ask xiangfu, but you can always try the latest "nightly" build
<kristianpaul> kyak: there is Makefile or script that flash my nanonote from  "nightly" build?
<kristianpaul> freeze again when reading :S