IRC Log Viewer » #firebreath » 2011-10-21

IRC Nick Time (GMT-7) Message
taxilian 09:10 good morning all
linearray 09:10 ohai
JSHANAB 09:10 Good morning
chris2_ 10:10 hello i have a question about drawing in a windowless context
taxilian 10:10 okay
chris2_ 10:10 I've been raising "NPN_InvalidateRect" events on my main thread. I do this quite often (30/sec) to force fast redraw. I find that safari cpu jumps 30% on one core, just dealing with the draw event
(I've made the draw event handler empty)
I'm wondering if you are doing something different for force redraw in firebreath?
(also wondering how something like flash handles this type of self rendering issue)
taxilian 10:10 Flash would have to do it the same way
and that's more or less what we do
chris2_ 10:10 hmmm :(
JSHANAB 10:10 I am speaking from early WIN32 days, but are you clipping the rect and not trying to redraw the whole thing
taxilian 10:10 wouldn't surprise me if there is something else other than the invalidate call that is causing your issue
chris2_ 10:10 yeah I cap jsut the area I'm interested in
i've removed the core of all my drawing functions. all i do is raise the NPN_InvalidateRect event and print a log in the event handler. The CPU jump happens in safari "web content" process not even in my plugin process
taxilian 10:10 maybe you're redrawing more often than you think, then
how are you controlling the rate?
chris2_ 10:10 possible... I have a off main thread timer which calls "performOnMainSelector" which in-turn generates the NPN_InvalidateRect
my timer might be off ... I'll check that
so I guess I just wanted to confirm that the accepted way to slef render in a window less plugin (speaking MAC NPAPI here) is to have the main plugin thread generate NPN_InvalidateRect (or similar) request on your bounding rectangle and handle the event in the plugins main event handler (along side mouse move etc)
taxilian 10:10 yes
the only way that I am aware of
staylor 10:10 so would a windowless plugin allow me to have some website elements overlap the plugin, for example a floating toolbar inside the plugin area?
taxilian 10:10 yes
on windows, anyway; CoreAnimation on Mac doesn't allow that on Chrome
but otherwise, yes
staylor 10:10 is there a way to do that on mac?
and I've seen mentioned that it's much slower, but something doing full blits at about 5fps should be fine?
taxilian 10:10 CoreGraphics works fine
staylor 10:10 do you happen to know if it also works fine in linux?
taxilian 10:10 supposedly, but I've never gotten it working
I don't know a lot about drawing on linux
staylor 10:10 thanks, not too worried about linux just curious
Sudi 11:10 Good Morning !! TGIF
taxilian 11:10 =]
Sudi 11:10 taxilian.. need your help please.. can you tell me where can I find good tutorials of objective-c++ ??
does FB wiki has that ??
linearray 11:10 where are you now? do you know C or C++?
taxilian 11:10 Sudi: I recommend google
Objective-C++ is just C++ where you can also use objective c, basically
if you know both objective c and c++ then you know objective c++
linearray 11:10 oh, I totally missed he wrote '++' there
Sudi 11:10 ya.. but I am looking for some specific conversions that goes between these two languages like NSArray or NSMutableArray to C++ arrays and stuffs..
taxilian 11:10 Sudi: I recommend google
there is no conversion between those types, however
you just have to know C++ well enough to convert it yourself
NSArray to C++: 2 options, you can either use a vector or a dynamically allocated array
either way you loop through the NSArray and assign the values to the C++ array, manually converting the type if needed
to convert from a NSString to a C string or a std::string you just need to know the right NSString APIs to get that info; again, google will turn up the answer quickly
there is nothing magic or hand-wavy about it; it's just C++ and objective C in the same file
Sudi 11:10 ok... thanks.. I was also thinking about vector.. so magic is all about knowing C++ well... thanks :) need to get back to C++ now :(
taxilian 11:10 yep
staylor 11:10 anyone familiar with cmake in windows know if I can override the provided modules in my home directory?
taxilian 11:10 I'm not sure I follow
which modules?
you mean the .cmake files that come with cmake like FindCurl.cmake etc?
staylor 11:10 well for example FindBoost.cmake I build all my libraries like that I use in c:\Libraries\Boost and I've been changing the FindBoost.cmake file in program files but I'm wondering if there's a better way to do that without changing the cmake install.
taxilian 11:10 you mean other than passing in -D BOOST_ROOT?
staylor 11:10 yeah
because between boost, openssl, protocol buffers, zlib, etc it's nice to have cmake just find the damn things when needed
taxilian 11:10 I see. If it were me, I'd just create a prep2010.cmd of your own in your own directory that calls the prep script with the parameters that you need
which saves you from having to modify any other files
as to your original question, I don't know for sure how that would work; it might be possible
staylor 12:10 well turns out to be trivially easy, CMAKE_PREFIX_PATH takes a list of paths to add to the search
taxilian 12:10 excellent
glad you found it
staylor 12:10 so I added CMAKE_PREFIX_PATH=c:\Libraries\Boost;c:\Libraries\etc
I've been using cmake for our linux builds for a while, but I still maintain the vs2010 projects as well so I'd like to just move everything over to cmake
taxilian 12:10 sounds reasonable to me; it's a little more trouble at first, but long term it saves a lot of time to have it all in one system
staylor 12:10 especially since we're looking at mac support soon, I'd rather not spend too much time figuring out xcode projects
taxilian 12:10 hehe
linearray 12:10 btw, taxilian: if (when) you update boost the next time, it'd be super-duper important for me to include boost::phoenix (also, it should be easy)... should I write a ticket for this?
taxilian 12:10 linearray: how big is phoenix?
linearray 12:10 omg 18MB
didn't expect that
taxilian 12:10 that would be my concern
linearray 12:10 let me clean boost and check again
taxilian 12:10 pull out the docs and examples, etc, look just at the headers, and see if it's still that big
linearray 12:10 well, this is bad.
taxilian 12:10 oh, no!!!!
wait, what?
linearray 12:10 it compresses nicely to 180 KB
taxilian 12:10 hehe. and uncompressed?
linearray 12:10 but there's just no way to reduce the decompressed size short of deleting preprocessed headers
taxilian 12:10 interesting
linearray 12:10 that would bring it down to 500 KB or so
from 18 MB
taxilian 12:10 I may still consider it, as long as it compresses decently
linearray 12:10 something the people in #boost do not recommend btw
taxilian 12:10 download time is the main thing I'm worried about
linearray 12:10 the preprocessed headers are generated by Wave... so there should be a way to generate them on the client, but that doesn't really help
taxilian 12:10 yeah, not worth it
I need to look into that library more
but I'll at least consider including it
linearray 12:10 ok cool
it replaces lambda and bind :)
If you don't include it, it's no biggie; I just don't want to pass up a chance to get rid of system boost :)
taxilian 12:10 fair enough =]
staylor 14:10 so using the system boost, the build's trying to link to -gd instead of -sgd even though I have -DBoost_USE_STATIC_LIBS=on
taxilian 14:10 I don't know :-/
EL45 14:10 Hello Everyone, Quick question: Is there anything I should be watching out for when using FB_JSAPI_EVENT with IE? Currently my events are working in all browsers except Internet Explorer.
I define my event as: FB_JSAPI_EVENT(statuschanged, 1, (int)); and am using it like: fire_statuschanged(100);
taxilian 15:10 how are you attaching to the event?
EL45 15:10
taxilian 15:10 and your problem is with IE9, right?
EL45 15:10 Correct
taxilian 15:10 addEventListener doesn't work with ActiveX controls in IE9
you need to reverse your order and prefer attachEvent
EL45 15:10 Ok great.
Thats it. Once again. Thank you!
taxilian 15:10 yw
glad to hear you're still alive :-P
linearray 15:10 !wiki attachEvent
FireBreathBot 15:10 4 results found. Note: Results limited to 8
"Firing Events from JSAPI":
"Interacting with Javascript":
"Frequently Asked Questions":
staylor 15:10 btw -DBoost_USE_STATIC_RUNTIME=ON is also required, should probably be the default actually since the default is to build with /MT
taxilian 15:10 staylor: ahh. I wasn't aware of that. Could you add it to the wiki? and possibly add a jira ticket for that to be added by default?
staylor 15:10 sure
another thing, the docs are really hard to find information on the build system.
taxilian 15:10 I welcome suggestions for how to improve that
staylor 15:10 I think just sticking everything related to building with prep on the same page
taxilian 15:10 I spend most of my time working on the code and the project itself; my expectation is that those who use it should be willing to help keep the documentation going, since most of them do very little else for the project =] (that sounds a tad more harsh than I intend it)
staylor: seems more or less reasonable; however, I don't think we want all of the platform specific build stuff all on one page; that seems like it'd be too much. maybe better links to the prep scripts info from the build pages?
staylor 15:10 yeah that would work too
taxilian 15:10 do you mind doing that update? you probably have a better idea of what would be understandable to an average user than I do
staylor 15:10 yeah I'll do that too, I added the note about Boost_USE_STATIC_RUNTIME
taxilian 15:10 thanks
linearray 15:10 there are some pages with overlapping info
maybe i'll get to clean it up someday
staylor 15:10 I just added another see also for prep scripts under building on windows
taxilian 15:10 Definitely a good start
I may go back and add a little more explanation on that to clarify
but having the link there will probably help
staylor 15:10 but otherwise with that change I was able to build in windows using the external boost
taxilian 15:10 excellent
staylor 15:10 microsoft makes building 10000x more cumbersome than it needs to be with their whole issue with the various c-runtimes
linearray 15:10 couldnt agree more
taxilian 15:10 yeah
unfortunately true
I kinda understand why they've done what they have, but it's still really cumbersome
linearray 15:10 well i dont. why are runtimes not included with the OS?
taxilian 15:10 they are
but the problem is that they added new features later that required new runtimes
linearray 15:10 hmm
taxilian 15:10 and so the new runtimes weren't included with the OS because they weren't available when the OS was released
probably not considered something necessary enough to bother putting in a windows update
because you can always just include the runtime installation with your application, right?
windows was never designed to properly allow installation of software without administrative privileges
linearray 15:10 do they really release new runtimes for e.g. vs2005 these days?
taxilian 15:10 it's not hard at all to include something in your installation that will install the runtime if needed
nope; in fact, I think vs2005 runtimes are already in xp and later
linearray 15:10 when i download older software i always have to go on the hunt for a suitable runtime
taxilian 15:10 so if you use vs2005 you may be alright using the dynamic CRT
linearray 15:10 well, that never worked for me :)
taxilian 15:10 hehe. I haven't actually tried it; perhaps 2005 came out too late for that to be the case
linearray 15:10 but now i know they include _something_ with the os
taxilian 15:10 also possible that they found some bugs in the 2005 CRT and released a later version with a patch to visual studio
there are multiple versions of each
chris2_ 15:10 thanks for your help taxilian
taxilian 15:10 you're welcome, Chris
linearray 15:10 wait, i read that security updates for the shared runtime are one good reason not to use the static runtime
so it must be updated somehow
by windows update
taxilian 15:10 hmm. possibly
I'm not sure, toher than that often the crt you need isn't present
I think the manifest in the DLL keeps it from using a version older than it was compiled with
but probably allows newer versions?
also quite possible that it only installs the newer version if you have an older version installed
doesn't install it in the first place
linearray 15:10 yeah, that's what i'm thinking
taxilian 15:10 and in recent years MS hasn't really wanted people using C++; they've been pushing .net
so why revisit old problems?
staylor 15:10 if you look at the windows driver kit you'll see the horrible hacks windows does to use the base msvcrt.dll the biggest difference is they changed c++ exception handling in vs2005
but they statically link for each version of windows against a patch to the base msvcrt.dll
taxilian 15:10 heh
FireBreathBot 16:10 JIRA issue issue created by miketalbot
JIRA issue issue resolved by richard "Can you please explain why you have submitted this again? Your patch included in the last fix (FI..."
JSHANAB 16:10 VS2010 is a real example of not wanting people to do c++ any more. Lottsa problems and broken features.
taxilian 16:10 I haven't had much trouble with vs2010, myself
seems to work fine
except for macros
well, I guess I've had msbuild.exe not go away for me more than once as well
linearray 16:10 with SP1 it works ok for me
FireBreathBot 16:10 JIRA issue issue commented by miketalbot "Follow up from FIREBREATH-134 which broke non-Express Visual C++ builds. Fix attached."
JSHANAB 16:10 We have had a lot of issues. Where we have to shutdown and restart a few times a day to get things working again and the intellisese is really bad. Nice features if they core was more stabel and faster. (like it was before they rewrote it all in wpf, i hear)
FireBreathBot 16:10 JIRA issue issue updated by miketalbot
JIRA issue issue reopened by richard "Fair enough; thanks for double checking this. "
Commit 4fc3612 on firebreath-1.6 by miket: "FIREBREATH-135: Fixed ATL_LIBRARY problem for Visual C++ (no..."
Commit 4fc3612 on master by miket: "FIREBREATH-135: Fixed ATL_LIBRARY problem for Visual C++ (no..."
linearray 16:10 there is intellisense for c++? (without something like VA X?)
FireBreathBot 16:10 JIRA issue issue updated by richard
JIRA issue issue updated by richard
JIRA issue issue updated by richard
JIRA issue issue updated by richard
JIRA issue issue updated by richard
JIRA issue issue updated by richard
linearray 16:10 update spree!
FireBreathBot 16:10 JIRA issue issue commented by miketalbot "Sorry, probably shouldn't have cloned the original issue. I believe my original patch introduced..."
JSHANAB 16:10 VA X ???
linearray 16:10 visual assist x
taxilian 16:10 linearray: yes, there is
though it doesn't work as well as visual assist does
visual assist is a very nice tool
linearray 16:10 ok
it is a bit sluggish though.... nor sure if that's because of being a plugin or because of VS in general
typing on an ipad--
JSHANAB 17:10 Yeah there is intellisesne but MS is tied to a legacy method of external symbols and that has caused them to try 3 different ways to store the symbols and serve them to the debugger. the current SQL server method gets jammed up. If you tear off a window it cannot update intellisense correctly, known issue. It also is soulution wide and does not follw the include path so it is sometimes wrong
FireBreathBot 17:10 JIRA issue issue resolved by richard "Thanks for the patch; this isn't used by many people (completely undocumented, for one thing) so ..."
JSHANAB 17:10 I will have to look at it.
taxilian 17:10 weird
JSHANAB: visual assist X is *really* useful. top features I use: "open file" (alt+shift+o, type part of hte filename, enter to open. "go to definition" works better than the normal F12 in VS. "move implementation to source file" moves a function implementation from the .h to the .cpp file. "create implementation/create declaration" on something in the header or cpp file it will make the counterpart in the other file
just those things save me tons of time
JSHANAB 17:10 A matter of fact they downgraded a feature showing references to and from a class because it was slow and made it a seperate option and replaced the most used option with just a string search. A lot of issues "work only in managed code"
taxilian 17:10 nirvdrum donated my copy; it's a bit pricy
well, pricy for a one-man shop
JSHANAB 17:10 Very nice, sounds like some of the refactoring tools we had in JAVA at my previous job
taxilian 17:10 yeah
also has tools for adding documentation easily and some other refactoring tasks
JSHANAB 17:10 I do not think there would be any problem getting it here
taxilian 17:10 download the 30 day trial
but be warned… when it runs out, you'll want to pull your hair out
JSHANAB 17:10 I will definitely look at it. I have actually been considering migrating the other project to a cmake system modeled after the way you ahve done Firebreath. Then try eclipse and see if it is better for continuous use
No problem (has very little hair)
taxilian 17:10 bleh. don't model after FireBreath's cmake… I'm planning to completely redo pretty much all of it
I just havent' had time
JSHANAB 17:10 At a previous job, my bosses name was Harry, they called me NotHarry
taxilian 17:10 hehe
JSHANAB 17:10 Really? what are you going to change. I had to add libcurl to my project and was very pleased how easy it was to add it and it fetched during prep, so cool
taxilian 17:10 yeah. I'm one of those people "cursed" that I'm in my late 20s and still no sign of hair loss at all… except periodically when I have to write activex code
that part will be the same, more or less
the main thing is that firebreath will look more like an include from your project
rather than your project an include from firebreath
JSHANAB 17:10 Humm. that will be interesting to see, but I don't know how big a deal it is. The only issue I have run into is that in order for the one project I have to wrok, it has to be compiled /MD or /MDd and we cannot have a redistributable with our plugin so it is /MT or /MTd but they share a common directory. So there are a few #defines and such. If they wer both in CMAKE I think it would be...
...eaiser, but I don't yet have a good system for a common lib that works for both
taxilian 17:10 well, I do have a cmake book you could borrow for a few days if you'd like. (electronic)
JSHANAB 17:10 I think I am going home. I made great progress the last few days. libCurl really helped make that possible. I now have very smooth playback of video. The new camera pushes out past the firewall reaching out to our server then a stream is esablished to the server that records and lets people connect to view live and archive. Nice camera
taxilian 17:10 nice
don't forget to upgrade to 1.6
trust me on that one
you want to and it'll be pretty painless
and my current thought is that the next major release may be 2.0
we'll see
so this is a good place to be at; mostly will be bugfixes for awhile
JSHANAB 17:10 I amy take most the wekend off and get the BMS (Battery managment System) installed in my electric car. Ever write code for a basic stamp? worst piece of junk ever, makes php and activeX fun
taxilian 17:10 hehe
sounds fun
good luck
JSHANAB 17:10 I am told that I only have a few sunny weekends left. Chicago weather :-(
taxilian 17:10 =]
I desperately need to mow my lawn
but my mower is broken
and I haven't had time to fix it
JSHANAB 17:10 I threw in the towel and got a yard/snow service. Next I may get a maid. It may actually be more economical for me time wise :-)
taxilian 17:10 hehe
I usually hire a neighbor kid for that, but my lawn has been in a weird state the last while
JSHANAB 17:10 I decided when I moved here. I wasn't going to shovel snow
taxilian 17:10 cya
mhilmi 17:10 Hey taxilian, just recently updated to 1.6 and now get a lot of warnings when building in MSVC 2010 - LNK4099 and C4748. Any ideas?
taxilian 17:10 what are the messages for those?
ahh. you're using cmake, right?
mhilmi 17:10 warning C4748: /GS can not protect parameters and local variables from local buffer overrun because optimizations are disabled in function
taxilian 17:10 sorry, curl I mean
mhilmi 17:10 Yeah
taxilian 17:10 the 4099 there probably isn't a lot you can do about unless you want to build curl yourself (doable, but annoying)
you could maybe hide it
it's just saying it can't find the debug libs for curl
the other… I'm really not sure
I didn't think we were using /GS
did you add it by chance?
mhilmi 17:10 Not sure, I think it is enabled by default so probably can just throw it off.
taxilian 17:10 I've never seen that error