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

IRC Nick Time (GMT-7) Message
linearray 02:10 taxilian_away: i used xbench... bonnie++'s standard tests finish too fast with this ssd to give meaningful results :)
taxilian 09:10 linearray: that's what I finally decided on. the results were impressive; I'll run it again in a bit and show you; it will be interesting to compare, I think
linearray 09:10 yeah
taxilian 09:10 at the moment, however, I'm busy working on transitioning to my new iphone
linearray 09:10 new gadget week? :)
taxilian 09:10 apparently
linearray 09:10 I installed iOS 5 today, itunes decided to delete all my apps, which I'm actually glad about because I only reinstalled 10% of them
taxilian 09:10 lol
odd
I'm having some trouble activating my new iphone… I guess the servers must be hammered
linearray 09:10 ah yes, it's the 14th
taxilian 10:10 yep
linearray 10:10 it seems like apple finally cleaned up the xcode mess
it's working reasonably well
taxilian 10:10 heh. some of that might be the SSD :-P
linearray 10:10 except that it's supposedly c++11, but it still complains about that age-old nuisance with angle brackets in nested templates
taxilian 10:10 linearray: https://gist.github.com/1287513
linearray 10:10 https://gist.github.com/1287523
taxilian 10:10 looks pretty close to mine
not quite as fast, but pretty close
linearray 10:10 good enough :)
how is that work on FIREBREATH-1 coming along?
FireBreathBot 10:10 FIREBREATH-1: Summary: Cross-platform timer abstraction.
FIREBREATH-1: Assigned To: [email protected]
FIREBREATH-1: Priority: Minor, Status: Open, http://jira.firebreath.org/browse/FIREBREATH-1
taxilian 10:10 nobody has worked on it in months
but the code is probably still there
if you want to take it over
linearray 10:10 well, where is it? :)
I can't promise anything, but it sounds simple enough to do
taxilian 10:10 https://github.com/mital/FireBreath/tree/timer
linearray 10:10 nice
taxilian 10:10 mital was working on it; I haven't seen him around in a long time
possibly he got frustrated waiting for me to find time to look at it
=]
Sudi 10:10 hello everyone
linearray 10:10 hi
Sudi 10:10 I love friday's
linearray 10:10 yup yup, thank god it's friday
taxilian 10:10 linearray: updated https://gist.github.com/1287513 with benchmarks from a system w/ a regular drive (also a macbook pro 2011)
Sudi 10:10 texilian.. if I am adding .dylib .. do i need to remake it as well ??
my dylib was created from cocoa and obj-c
can i ref it in the project directly ??
taxilian 10:10 Sudi: see the using libraries page on the wiki
!wiki libraries
FireBreathBot 10:10 8 results found. Note: Results limited to 8
"Using Libraries": http://goo.gl/cUVa6
"FireBreath Libraries": http://goo.gl/KqjOI
"Json": http://goo.gl/aWWju
"Re: Feedback": http://goo.gl/xZWWc
"Documentation To-Do": http://goo.gl/XzBGF
"Building on Mac OS X": http://goo.gl/iQ1mh
"Ideas": http://goo.gl/7QuAp
"FireBreath 1.5.0RC1 Released!": http://goo.gl/lppMa
Sudi 11:10 thanks
Sudi 11:10 I added the following line in projectDef.cmake at the end -
target_link_libraries(${PROJECT_NAME} debug "usr/local/lib/Mylib.dylib")
target_link_libraries(${PROJECT_NAME} optimized "usr/local/lib/Mylib.dylib")
and I have my lib in /usr/local/lib/
I did prepmake /project <- but still I am not albe to link
wait.. let me retry using /usr/local/... maybe I am missing initial /
taxilian 11:10 yeah, that would probably help
Sudi 12:10 N O L U C K :)
:(
webkit plugin is so much easier to create..
bad luck that mac is no more supporting it
taxilian 12:10 Sudi: unfortunately, the problem here is not really that firebreath plugins are hard, it's more that you don't know C++ very well
if you knew C++ better you'd have far less trouble
which libraries are you trying to use? are they system libraries or your own libraries?
Sudi 12:10 you are right .. I am dot net programmer.. but i think where I am struggling here is to make things link in firebreath..
taxilian 12:10 cmake, actually
you could try adding the link manually in xcode; if that works, then you just have to figure out what you're doing different
Sudi 12:10 its my own library MyLib.dylib written in cocoa framework using objective-c
taxilian 12:10 why not just link it statically?
dynamically linked libraries are a bit of a pain in a plugin, since you're being loaded by something else
Sudi 12:10 ok.. let me compile it as static library and see if that works
taxilian 12:10 if it doesn't, give us the error message; as I've said before, "it doesn't work" isn't particularly descriptive and doesn't help us much as far as being able to help you
Sharon_ 12:10 how can I register the overloaded method in the firebreath plugin
?
taxilian 12:10 … ?
I don't understand the question
Sharon_ 12:10 I want to define a method store(string, string) and store(int, string, string)
in the plugin
it is refistered using registerMethod
taxilian 12:10 you can't easily; I thought about supporting that, but it would have been a major performance problem
so if you want to do that, you'll have to use FB::CatchAll
Sharon_ 12:10 can you explain it? I didnt get you
Why would be a performace problem?
taxilian 12:10 if you use FB::CatchAll, then it will accept any number of parameters to the function and you'd have to decide what to do based on which parameter does what
heh. just trust me on that one; this isn't a direct interface from the browser, it's a case of the browser saying "call the method named (name) with these parameters"
so I'd have to go through each possible candidate and try converting the arguments, then fail over if it didn't work
Sharon_ 12:10 ok
you recomment not overloading the methods right?
another question can I overload operators?
taxilian 12:10 yes, I recommend not overloading the methods
Sharon_ 12:10 ok
taxilian 12:10 and no, you can't overload operators; there is no support for that in NPAPI or ActiveX
I would just have two similarly named methods
Sharon_ 12:10 ok
taxilian 12:10 much simpler
Sharon_ 12:10 thank you
Ok sounds fair
thanks a lot
taxilian 12:10 you're welcome
good luck
please feel free to update the docs on the website to better explain things so that others don't have to ask your question
Sharon_ 12:10 I will do that
Sure
linearray 15:10 clang: error: invalid deployment target for -stdlib=libc++ (requires Mac OS X 10.7 or later)
I'll call it a day.
taxilian 15:10 hmm
strnage
linearray 15:10 not a FB problem; I intentionally used libc++
so I can write c++11 code
taxilian 15:10 hehe
linearray 15:10 however, if I read that correctly it's a bad idea to do that, if I want to serve 10.5/10.6 customers
Sudi 16:10 taxilian.. thanks.. static linking is working fine... thanks
taxilian 16:10 Sudi: awesome
glad it worked
sabotaged|wk 16:10 ugh, running into this issue again where the browser just hangs inside a callback
think it's related to the issue where it can hang if an alert() window is open
i have a full screen windows open this time, though
cristcost 17:10 hello all,
anyone can help about a cmake question?
sabotaged|wk 17:10 just fire away
i'm sure you'll get a response sooner or later
cristcost 17:10 :-)
I want to add a lib to the project.
a simple one, Winmm.lib, (on windows)
it contains the symbol of the Win32 "PlaySound" function which I want to use to debug attachment and detach of the plugin.
which is the correct way to do this by using CMAKE?
sabotaged|wk 17:10 it might be on the wiki. but the way i do it is in my CMakeLists.txt, at the bottom where it does target_link_libraries, i add an extra line and stick my windows static libs in there
cristcost 17:10 good,
should I launch again prep2005 after that change?
sabotaged|wk 17:10 yes
cristcost 17:10 I go to try :-)
thank you!!
sabotaged|wk 17:10 sure
taxilian 17:10 cristcost: look at the using libraries page on the wiki
all that info is there
!wiki libraries
FireBreathBot 17:10 8 results found. Note: Results limited to 8
"Using Libraries": http://goo.gl/cUVa6
"FireBreath Libraries": http://goo.gl/KqjOI
"Json": http://goo.gl/aWWju
"Re: Feedback": http://goo.gl/xZWWc
"Documentation To-Do": http://goo.gl/XzBGF
"Building on Mac OS X": http://goo.gl/iQ1mh
"Ideas": http://goo.gl/7QuAp
taxilian 17:10 gotta run, good luck
FireBreathBot 17:10 "FireBreath 1.5.0RC1 Released!": http://goo.gl/lppMa
cristcost 17:10 wow, thanks!
Sharon_ 17:10 I have a store() API, where I want the the current URL of the document.inside the API.
How can I get it? m_host->getDOMWindows->location.href?
I am not sure what to use after getDOMWindow()
?
Sharon_ 17:10 m_host->getDOMWindow()->getLocation() will return the URL right?
anyone there?
kylehuff 17:10 here and there, but mostly, no... =c )
m_host->getDOMWindow()->getLocation() will return the location
there are samples for using getLocation on the wiki
Sharon_ 17:10 ok I will have a look at it
but location will contain the url right?
kylehuff 17:10 yes, it will be the same thing as document.location.URL, IIRC
Sharon_ 17:10 Ok cool
kylehuff 17:10 *document.location.href
FYI; the wiki @ firebreath.org is rather extensive, I highly recommend it as a resource.
Radicand 22:10 trying to use the logging features, but it never creates the logfile...
taxilian 22:10 Radicand: did you put add_firebreath_library(log4cplus) in your pluginconfig?
Radicand 22:10 yeah, and ran the prep script again
taxilian 22:10 and you updated your factory.cpp to specify where the log should go?
Radicand 22:10 http://dpaste.com/634640/
is at the end of my Factory.cpp
in my *API.cpp i just call FBLOG_INFO("func()", "entered"); etc, but no dice
it compiles fine
taxilian 22:10 does the log message show up in the debug console?
Radicand 22:10 that's a question as well- debug console as in firefox.exe -console ? or should it be the javascript console
answer is neither do
but, curious as to what it is
taxilian 22:10 no no no
the windows debug console
if you have a debugger attached in visual studio, then it'll be in the output window
Radicand 22:10 pardon my ignorance, where do i see that
i see
moment
taxilian 22:10 there is also a sysinternals tool that can listen for those logs
Radicand 22:10 yep
taxilian 22:10 that should probably be clarified in the docs
=]
Radicand 22:10 10-14-11 23:08:31,953 [4408] INFO FireBreath <> - c:\users\nick\desktop\firebreath\projects\---api.cpp:239 - ----API::nfcTrig - entered method
taxilian 22:10 try changing the / to \\
in your path
it's also possible that you can't write to that location; try using a path in documents
or… hang on a minute
Radicand 22:10 changed to desktop
still nothing..
taxilian 22:10 what browser?
Radicand 22:10 latest im trying with is ff7
can try chrome
no luck with chrome either
taxilian 22:10 this is what I'm using and it works fine: https://gist.github.com/1289031
that requires boost::filesystem
Radicand 22:10 let me try that
taxilian 22:10 if you pay attention you'll see that it'll put it in %userprofile%\AppData\LocalLow\CompanyName\logs
and that directory must exist or it won't set up logging
that's on vista/win7, of course
and it also requires 1.6.0rc2, since it uses functions that didn't exist before then
… which are totally undocumented :-P
Radicand 22:10 ;)
i'm currently using 1.5 from git
taxilian 22:10 hmm. that could also be part of your problem
Radicand 22:10 is the upgrade path to 1.6 "safe"?
taxilian 22:10 I recommend you update to 1.6.0rc2
yeah, no breaking changes
Radicand 22:10 switch branch and run prep?
taxilian 22:10 yeah
might even want to delete the build dir
one of the big changes is that it now uses PCH
which should dramatically speed up compilation time for the projects that use it
(on windows only)
Radicand 22:10 noerror C2039: 'getLocalAppDataPath' : is not a member of 'FB'
taxilian 22:10 you must have, er, missed the "#include "SystemHelpers.h"" that is at the top of the gist
Radicand 22:10 yepbu
-bu
taxilian 22:10 SystemHelpers should probably be expanded; I've been meaning to write something like that for a long time
but I finally actually needed it :-P
not yet supported on linux
Radicand 22:10 one more
1>Factory.obj : error LNK2001: unresolved external symbol "class boost::filesystem2::file_status __cdecl boost::filesystem2::detail::status_api(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class boost::system::error_code &)" ([email protected]@[email protected]@@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@Z)
taxilian 22:10 you forgot to include boost::filesystme
add_boost_library(filesystem)
in your pluginconfig
Radicand 22:10 ah geez
taxilian 22:10 don't need to delete the build dir for that, btw
just rerun prep
Radicand 22:10 build success, lets see now
taxilian 22:10 and if it works you should be grateful that my boss doesn't mind me sharing snippets like that from our plugin code
Radicand 22:10 ;) no dice unfortunately
always grateful for the help though
taxilian 22:10 hmm. I'd step through the code and see what is happening, then
look for PluginAuto/log4cplus/log4cplus.cpp
Radicand 22:10 i think i have a lead
taxilian 22:10 oh, good. anyway, it's a good thing for you to be on 1.6 any way you look at it
let me know if you have any issues; we're using it and it seems completely stable, but it is still in RC
I plan to release next week
just letting it bake for a week
Radicand 22:10 k
i notice some warnings that i didnt see before, seem harmless though
1> Factory.obj : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
things like that
taxilian 22:10 yeah; I turned on whole program linking
one of these days I'll track that down and figure out how to remove that warning
it may be slowing down the build slightly, but nothing serious
Radicand 22:10 kk
hah
ok, want a good laugh?
the issue the whole time was i just slapped the method at the end of factory instead of inside the class
once moved i now get my file
taxilian 22:10 lol
that would do it =]
but hey, the method I gave you is a lot cleaner for logging, and you can keep it in...
it won't create the logfile unless you have the directory created
so you can leave it in for troubleshooting, as long as you're a bit careful what you put in it
you can make a custom log handler as well, btw
Radicand 22:10 appreciate it
taxilian 22:10 feel free to throw that on the wiki somewhere to help the next person
huh; turns out that if you have a SSD drive and 8 gig of ram, windows in a VM is actually fairly useable even with visual studio
so far, anyway
Radicand 22:10 added some clarity to wiki
taxilian 22:10 cool
thanks
Radicand 23:10 also, not sure if you remember
eh, nm for now, enough help for one day