IRC Log Viewer » #firebreath » 2012-08-13

IRC Nick Time (GMT-7) Message
Anurag 00:08 can we create a plugin that can send pages that the browser loads(url) to server without interfering with page?
i guess plugin is consumed as library to the browser
and page has to use it for
any help on this?
matutetandil 08:08 Hello there
has someone try to display windows using gtk??
taxilian 11:08 has anyone tried out the updated PCH stuff yet?
Elliott_D 12:08 Hello, I'd like one of my API functions to accept an optional callback. I've tried boost::optional<FB::JSObjectPtr &> but this gives an error: Error 1 error C2665: 'FB::variant_detail::conversion::convert_variant' : none of the 6 overloads could convert all the argument types. Does anyone know what I'm doing wrong?
taxilian 12:08 sure do
try boost::optional<FB::JSObjectPtr>
or boost::optional<const FB::JSObjectPtr &>
but you can't ever pass something into a JSAPI function as a non-const reference
Elliott_D: Remember that there are no true pass-by-reference arguments from Javascript to a plugin; the closest thing is passing in an object (such as a function) which is just a pointer; all making the JSObjectPtr const & does is prevents it from copying the shared_ptr once
and now I'm off to lunch; I'll be back in an hour or so
Elliott_D 12:08 Thank you
taxilian 12:08 yw
Jonathan___ 13:08 My company is looking for someone to develop a plugin. It would basically be a wrapper for a specialized scanner that can upload pictures to a web server. I can't find anybody that specializes in firebreath plugin development. Any ideas/volunteers?
taxilian 13:08 unfortunately finding people who specialize in browser plugin development is extremely difficult
primarily because there are very, very few good reasons to create a plugin (relatively speaking)
out of curiosity, if your specialized scanner can upload pictures to a web server, why do you need a plugin for it?
Jonathan___ 13:08 Sorry, syntax error. I'm not an english major. I meant that the plugin would need to do this.
taxilian 13:08 ahh. so your goal is to have the plugin interface with the scanner and then upload the images to a web server
Jonathan___ 13:08 Exactly. So I'm looking for leads - someone who would be experienced enough to put this together quickly. The API is simple enough. I guess ideally it would be someone who has a strong C++ base and has created a firebreath plugin before.
taxilian 13:08 hmm. well, probably most people in this room could do it, but most of us are pretty busy. it's the sort of thing that I sometimes take on as a quick side project, but I'd have to think about whether or not I have time and I'm not cheap
Jonathan___ 13:08 My supervisor is open to negotiation - unless you're charging like $1000/hr :D We're not doing this out of our mom's basement.
taxilian 13:08 heh. well, I'm not *that* expensive
why don't you PM me and give me some more details on what you need, and i'll think about it
I'll also tell you my rate
I wrote FireBreath, incidentally; if you need any other info I can point you at my resume
Jonathan___ 13:08 PM you using the forums? Or is there an IRC function that lets me do that?
taxilian 13:08 IRC
johannes 16:08 so, what's the current approach regarding file uploads from a plugin? :-)
i would expect it to be some common issue
taxilian 16:08 well, it really depends on the file
my recent endeavors have all just base64 encoded the file, passed it to javascript, and then posted it with AJAX :-P
johannes 16:08 yeah, i think that was the state of the discussion i asked it last time ;-)
while i still didn't implement it
taxilian 16:08 that's because there really aren't other good options
if you need to send bigger data you more or less have to use curl
johannes 16:08 naive as i am i would expect the rowsers to provide an interface for doing "random" post requests
taxilian 16:08 hehe. yeah, that'd be nice
I guess it's possible that they may actually support mutlipart form uploads
they don't claim to, though
you'd have to try it
johannes 16:08 https://developer.mozilla.org/en-US/docs/Gecko_Plugin_API_Reference/URLs#Uploading%20Files%20to%20an%20FTP%20Server at least has a few notes on some raw http post and ftp file uploads
taxilian 16:08 sure
string posts and binary ftp uploads
however, neither are what we're looking for =]
so the question is what would happen if you put together a binary multipart upload post and posted it
johannes 16:08 it might require some memory but shoud work ... the rowser shouldn't care aout the contents of that post string .oO(while it should add cookie and http auth headers :-p)
let me see if i get my code to compile (just figred that i lost some files while restoring my backup)
taxilian 16:08 it's definitely an interesting theory; hard to say for sure if it holds true, though
let me know if you try it =]
FireBreathBot 16:08 Commit 2f0f8ba on master by Richard Bateman: "Add boost::process to the included boost"
FireBreathBot 16:08 Commit aa62148 on master by Richard Bateman: "Updated packaged boost"
johannes 17:08 alright, it is possible to upload a file ... while i did it in a kind of hakish way for a test ...
taxilian 17:08 what kind of file did you upload?
johannes 17:08 http://pastebin.ca/2179840
taxilian 17:08 doesn't count
ti's not a real test unless it's binary data
preferably an image
johannes 17:08 it's a text file ut i verified the binary structure ...
taxilian 17:08 so?
johannes 17:08 but yes i can add some null bytes
taxilian 18:08 not just null bytes
but bytes > 127
the whole range
johannes 18:08 give me a sec
taxilian 18:08 and still; I won't consider it more than "promising" until you can upload a simple image =]
johannes 18:08 hrm, something is indeed not working as i expect ... the request in wireshark looks like the original, but the server keeps waiting, like if my content-length was wrong ...
johannes 19:08 taxilian_away: http://pastebin.ca/2179845 works with php_logo being https://raw.github.com/php/php-src/689fda310a7accaad6694056a0358a12d2459d90/main/logos.h
i've checked the md5sum on both sides to match
and am stil using the ugly npapi host patch
and only have firefox available
danzik171 20:08 does including a source file via cmakelists.txt do anything differently than including the source file directly in the project? ( ignoring that the latter will be wiped out after running the prep scripts again )
taxilian 22:08 danzik171: generally no
though there may be exceptions to that rule
taxilian 22:08 the fact that the latter will be wiped out after running the prep scripts again is a pretty crucial thing, though =] for quick development adding things on the project isn't a big deal, but I wouldn't recommend making a habit of changing the project directly; for example, I just committed some changes that should improve the build time and indexing of projects on both windows and mac; without rerunning cmake you won't get those, and it might even not work if you update firebreath
so you don't want to be too disconnected from the prep scripts
danzik171 22:08 taxilian: ok - the reason i was asking was actually that i have some .c src files - if i include them via CMake, the project fails to build
if i include it directly, it builds fine
taxilian 22:08 hmm
is this the absolute latest firebreath from master?
danzik171 22:08 no, it's the 1.6 build which i guess is stable
i can try dev latest and see what happens
taxilian 22:08 really? huh. what is the error?
master is pretty stable; I'm just letting the boost update and the new PCH cure a bit before releasing 1.7
danzik171 22:08 it's a bunch of illegal indirection and undeclared identifier errors mostly ( and some others )
just don't understand why including the source file manually in the .csproj doesn't cause any of these
taxilian 22:08 huh. and this is in your plugin project, right? you aren't trying to put it in a firebreath project or anything?
danzik171 22:08 yep, correct
taxilian 22:08 that is really odd
danzik171 22:08 i'm prepping with fb dev right now, might take a couple to download everything
taxilian 22:08 vs2010 pro?
danzik171 22:08 yup
taxilian 22:08 worth a try
it has been awhile since I've tried using a .c file, so I'm not really sure
but it does seem a bit weird
what version of cmake are you using?
danzik171 22:08 2.8.7
taxilian 22:08 hmm. could also try upgrading to 2.8.8, but I doubt it'll change anything
danzik171 22:08 looks like 2.8.9 is latest, so i can try grabbing that after this
taxilian 22:08 really? that must be out in the last couple of days
incidentally, pay attention to your build time; let me know if it's faster or slower than 1.6 was
if it's noticeably different
danzik171 22:08 btw this was from a while back, but i was asking about passing giant base64 encoded files back to JS but it was like horribly slow
taxilian 22:08 yeah; base64 encoded files work okay but only if they aren't too big
danzik171 22:08 actually quite the opposite, i've got pretty large ones working ( tested up to 100mb )
taxilian 22:08 really? wow
which browsers?
danzik171 22:08 the trick was with activex, there's a conversion from std::string to wstring that was crazy slow
taxilian 22:08 ahh; so if you start it out with a wstring it's okay?
danzik171 22:08 so i swapped out for a windows specific implementation of that conversion, and now it's fast
yep
taxilian 22:08 makes sense
danzik171 22:08 tested on Chrome, FF, and IE ( the 3 browsers my company supports internally )
taxilian 22:08 actually the built-in conversion is windows specific, but it assumes UTF8
since UTF8 is kinda an overkill for this caseā€¦. there are definitely quicker ways to do it
hmm. wonder if we could think of a reasonable way to deal with that
danzik171 22:08 yea that's why i brought it up before i forgot
taxilian 22:08 maybe a JSAPI-supported type that is basically a buffer that will be converted to base64
add an issue in jira, so I don't forget; if you want to try to add support for something like that in FireBreath let me know and I'll help you figure out where to start
be back in about 20 min; I need to put my son to bed
danzik171 22:08 so yea, i might be a little *too* new at c/c++ for that
the fb plugin is the first thing i ever wrote in c++ =P
ill catch you tomorrow then, and ill try those couple things - its getting late here anyway