IRC Log Viewer » #firebreath » 2010-10-01

IRC Nick Time (GMT-7) Message
cygmatic 04:10 WarGloom, just curious: does the original code sample not work in some case (i.e. some "JSAPIPtr f() { return new X; }" )
WarGloom 04:10 one moment I'' check
do you mean changes in wiki?
error: conversion from ‘XXXAPI*’ to non-scalar type ‘FB::JSAPIPtr’ requested
cygmatic 04:10 interesting, will have to test when i'm back home
WarGloom 04:10 class XXXAPI : public FB::JSAPIAuto
it is because AutoPtr -> boost::shared_ptr
cygmatic 04:10 ah, explicit is it
good thing you found it
nirvdrum 05:10 taxilian: I lost my log the other day. If you could refresh my memory, that'd be helpful. Did you suggest I clone the repo and use that for the install or just grab the canonical repo and do whatever I need to in a branch?
WarGloom 06:10 have anyone problems with latest version from trunk?
cygmatic 06:10 dev or default?
WarGloom 06:10 default
after taxilian merge from dev
my plugin on linux in firefox - core dump
cygmatic 06:10 ouch
WarGloom 06:10 some where in in FB::PropertyFunctors::operator=(FB::PropertyFunctors const&) ()
in FB::JSAPIAuto::registerProperty (this=0x7fdb6c6d5140, name="value", propFuncs=...)
cygmatic 06:10 hm, i know i haven't touched that stuff in a long time
so most likely its originating somewhere else
also at work now and off over the weekend, so i can't really take a look
but the scriptingcore unit test already crashes here
WarGloom 06:10 ./bin/UnitTest_ScriptingCore ?
success: 11 test passed
cygmatic 06:10 correction, fbtp_unittest_npapi_plugin
which is an outstanding issue with that test :/
well, sorry about the instabilities
... i'm off to berlin now
WarGloom 06:10 no problem its normal :) I'll try to find solution... good trip
taxilian 08:10 nirvdrum: I usually just clone the repo (sorry, slowly reading through all that has happened since I signed off last night)
nirvdrum 08:10 But there are now stable & dev branches?
taxilian 08:10 stable is now beta, as of after 1.2.2
so it's actually just "more" stable
if you need rock solid, keep using 1.2.2
if you don't mind helping us test and keep things running, and particularly if you want the new DOM objects, use trunk
and let me know as soon as you find things, I'll try to fix it
I have basic logging support in, btw.
nirvdrum 08:10 I don't mind helping out. I just want to make sure I'm following the proper gcode/mercurial workflow.
taxilian 08:10 well, if you're really brave you could use dev.firebreath
if you're just willing to help you could use just trunk =]
nirvdrum 08:10 Principally, I'm not sure if I can checkout the canonical repo and then later create a clone to push to.
taxilian 08:10 or you could even use both
yes, you can
nirvdrum 08:10 (You can do this in git & github for instance)
I'm fine tracking trunk.
Sounds like I don't need to clone, I can just checkout. And then if I want to work after the fact, I can clone.
That should work out fine.
taxilian 08:10 yes
nirvdrum 08:10 It'll be kinda funky to have an hg repo inside git though :-)
Since I track my project with git.
So, just don't blow up the repository size on me please ;-)
taxilian 08:10 what I would recommend
is to keep them seperate
use your fb clone (or trunk, as you want) for firebreath
and keep your project in a seperate dir
and put that in git
I have to run now; class starts in 30 minutes and I'm 20 minutes from campus
be back on when I get there
nirvdrum 08:10 Hmm . . . I'll have to chew on that. I'd like a clone of my repo to have everything needed code-wise to build it.
elthariel_ 08:10 Hello
nick /Lta
Lta 08:10 sorry
WarGloom 08:10 hello
taxilian 09:10 Lta: welcome
always good to see new faces =] (err… nicknames?
0
)
wow, can't type
Lta 09:10 huhu, nice to meet your nickname too
taxilian 09:10 lol
Lta 09:10 I'm trying to make a firebreath based plugin embedding vlc to do video conferencing. And i was wondering if any of you were knowing if there is any example plugin that aren't windowless
taxilian 09:10 example plugins that are *not* windowless?
Lta 09:10 yes
taxilian 09:10 none of the examples are windowless
what platform are you working on?
Lta 09:10 x11/linux. yep they ha
taxilian 09:10 well, you need to understand
that windowless is different than non-drawing
Lta 09:10 yes they have windows but actually doesn't draw anything on it
taxilian 09:10 in plugin land, windowless literally means they don't have a window
and it's a very different problem
Lta 09:10 i wrote some npapi plugins by hand a long time ago
but i can't find the code anymore and i don't remember if i've something to do with the xid before being able to use it
taxilian 09:10 Lta: AFAIK, there are no examples of doing drawing in X11
I don' know how to do it myself, so I can't make one =]
most people using it on linux, AFAIK, aren't drawing
Lta 09:10 i'll eventually find out what's the problem. I'll publish the code and post the link
taxilian 09:10 that would be awesome =] in the mean time, let us know if you have any firebreath-specific questions =]
Lta 09:10 anyway firebreath is a nice project
taxilian 09:10 those I can help with
glad you like it
Lta 09:10 i tried to play a little bit with qt browser plugin project, but it seems to be buggy
taxilian 09:10 qt browser plugin project?/
Lta 09:10 qt have a similar library
taxilian 09:10 ahh
we should add support for QT browser plugins in FireBreath, I think
only problem? I don't know QT either =]
Lta 09:10 http://doc.qt.nokia.com/solutions/4/qtbrowserplugin/
taxilian 09:10 interesting
haven't seen that before
thanks for sharing
Lta 09:10 i was making firefox crash, but i was able to display video under chromium
you are welcome
*it was
amackera 09:10 It says it uses LiveConnect :S
Lta 09:10 there's a confusion around the internet about the name of mozilla's plugin technology
plugin development is kind of dark magic
it's possible the xid reported by getWindow or getBrowserWindow isn't the good one
taxilian 09:10 these are the reasons that we created FireBreath :-/
unfortunately, you've hit on the least-well rounded part of the system
if we can flesh it out in FireBreath, it should take most of the guesswork out of what you're trying to do
amackera has spent the last couple of months doing the same thing on Mac
but neither of us knows enough about linux drawing and event models to do it there
Lta 09:10 i didn't touched to xwindow apis since i was student, will be kind of hard
but if you tell be it works well on windows, i'm happy cause i prefer to do the work for x11 than for win32
taxilian 09:10 :-/ I wish I could help more. Feel free to ask questions; we might be able to help a little
it works great on windows and Mac
linux drawing and events just aren't fleshed out
particularly since there are at least 3 different models you can use on linux
amackera 09:10 nasty :(
Lta 09:10 nasty too: return (char*)in - (char*)0;
taxilian 09:10 is that from FireBreath code?
Lta 09:10 yes
taxilian 09:10 I think I put that in, acutally
Lta 09:10 :)
taxilian 09:10 and I think it had to do with makign it compile on 64 bit
and I would be thrilled if someone fixed it to be less nasty =]
Lta 09:10 i don't understand the purpose
aren't pointer unsigned int ?
taxilian 09:10 in 64 bit it's an unsigned long
or maybe even unsigned long long
I forget
anyway, it was different on 64 bit
Lta 09:10 uint64_t
taxilian 09:10 and I had to convert it for some reason
right
I honestly don't remember; that was in January
Lta 09:10 i'm on a 64bit system, i'll have a look
taxilian 09:10 and I was just trying to get something up so that someone else could fix it =]
unfortunately, nobody has cared enough to fix it
and I don't know enough to fix it
Lta 09:10 anyway, i've found my problem i think. I'll confirm this on monday and posts something
taxilian 09:10 cool
feel free to submit a patch =]
Lta 09:10 the last time i worked with npapi i wasn't using xembed, so im trying to draw on a GtkSocket
instead i need to create my own window and plug it in it
i don't think this is a firebreath bug anymore :)
i'll check this monday. See you later. Need to get back on starcraft 2
:)
taxilian 09:10 lol
please let us know what you find; we would really like to get this both stable and easy to use =]
taxilian 09:10 I'll be back in probably 30 minutes
amackera 10:10 I wonder why it's common convention to surround '+' and '-', etc. operators with spaces, but not '->'
taxilian 10:10 probably because -> is seen as a connecting operator
and + and - seen as operators that affect two things
amackera 10:10 Yeah I was thinking is something like that
Like the '->' operator is done *to* a pointer (dereference it)
similar to the '.' operator
whereas '+' isn't done *to* an integer, or whatever
taxilian 10:10 yeah
-> is a unary operator
unary operators tend to not have spaces
amackera 10:10 interesting!
taxilian 10:10 (that's my supposition from sitting here and thinking about it for a minute, anyway)
taxilian 10:10 incidently, anyone here care about logging
?
amackera 10:10 It would be really sweet to have
taxilian 10:10 it's in the latest dev
amackera 10:10 awesome!
taxilian 10:10 but not enabled by default
when you're ready, let me know and I'll tell you how to enable it
amackera 10:10 taxilian_props++;
taxilian 10:10 I'm still trying to figure out what the best way to integrate all of it is
we are not using boost log
if I can help it, I will never use boost log
amackera 10:10 no?
taxilian 10:10 I want to kill boost log
amackera 10:10 hard to use?
;p;
taxilian 10:10 and cut it into small pieces
amackera 10:10 er, lol*
taxilian 10:10 bury it deep into the earth
and erase all trace of it's existence
it is responsible for about 7 hours of wasted time for me yesterday, and I didn't have that 7 hours to waste
so currently it's using log4cplus
amackera 10:10 dammmn
taxilian 10:10 but there is another one I would also like to integrate in
after I was mostly done integrating log4cplus I found pantheios
which looks very nice
http://pantheios.sourceforge.net/
fortunately, the integration allows you to choose your own logging stuff
or at least can fairly easily
amackera 10:10 pantheios looks very good, but log4cplus seems also pretty solid
taxilian 10:10 yeah
the way it is set up you can include log4cplus by doing add_firebreath.library(lib4cplus) in your projectconfig
and then the logging will use that
you could also do the same for pantheios and any other logging lib you want
the goal being to keep things really simple in FireBreath core so that you can use whichever library you want for logging
but give a couple of sensible default
s
WarGloom 10:10 sounds cool
amackera 10:10 what about logging from withing firebreath core?
within*
taxilian 10:10 it uses whatever loggers are defined
if any
amackera 10:10 ah i see
taxilian 10:10 the default is "NullLogger" which just throws everything away
and for those concerned about performance I'll have a way to disable the logging macros entirely
amackera 10:10 cool :)
taxilian 10:10 I may update this a little, but here is the initial interface: http://code.google.com/p/firebreath/source/browse/src/PluginCommon/logging.h?spec=svn.dev.e3eb53cc5bc1afb9c867006adc42b7f57e74302c&repo=dev&r=e3eb53cc5bc1afb9c867006adc42b7f57e74302c
the log4cplus module: http://code.google.com/p/firebreath/source/browse/src/PluginCommon/log4cplus/log4cplus.cpp?spec=svn.dev.e3eb53cc5bc1afb9c867006adc42b7f57e74302c&repo=dev&r=e3eb53cc5bc1afb9c867006adc42b7f57e74302c
and the NullLogger: http://code.google.com/p/firebreath/source/browse/src/PluginCommon/null/NullLogger.cpp?spec=svn.dev.e3eb53cc5bc1afb9c867006adc42b7f57e74302c&repo=dev&r=e3eb53cc5bc1afb9c867006adc42b7f57e74302c
amackera 10:10 taxilian: at what point do the params get defined for the plugin?
i'm trying to read them in the NpapiPluginWin() constructor and they aren't initialized there, it looks like
taxilian 10:10 init
let me look
hang on
amackera 10:10 Aw crap, my visual studio crashed
taxilian 10:10 I hate that
but it happens pretty often
amackera 10:10 yes it looks like init() is where the params are set
taxilian 10:10 yeah
amackera 10:10 hmm... ugly hack time? i need to call NPP_SetValue() with NPPVpluginWindowBool and false to tell the browser we're windowless
but i can't do that in the constructor of the NpapiPluginWin since it's constructed before the params are initialized
taxilian 10:10 you can't do that from init?
amackera 10:10 oh yeah!
sure
taxilian 10:10 after it sets the params, have it call into the plugincore object
and ask if it should be windowless or not
that way the plugin creator still has control
but in PluginCore have the default check for that param
in IE you should be able to do about the same thing
amackera 10:10 i have an isWindowless() call in PluginCore that just parses the param list for a "windowless" param
taxilian 10:10 perfect
shouldn't have to do any parsing, though… it's just a map =]
amackera 10:10 mk
right yeah
of course, haha
taxilian 10:10 be back in a few; gotta move to where I have power
amackera 10:10 mk
taxilian 10:10 even a macbook pro runs out of battery after 3 hours of running at full brightness wtih 2 virtualmachines and compiling stuff…. :-P
amackera 10:10 :P
WarGloom 11:10 taxilian you forget to fix CMakeFile to build with system boost...
taxilian 11:10 WarGloom: can you try it with dev instead of trunk?
I fixed it there, I think
I was up so late fighting boost:log that I didn't get a chance to try it in trunk
taxilian 11:10 hmm. the question on the mailing list about printing is a very itneresting one; not one that I've looked into at all. thoughts?
amackera 11:10 I really have no idea how printing works :S
taxilian 11:10 me neither =]
nirvdrum 12:10 Having not looked into it at all, there's a Win32 method called PrintWindow that accepts a source HDC and a destination one, which could be fetched from a printer object.
I use this to render to a screenshot, but ostensibly it's designed for sending content to a physical printer.
When I get a few minutes tonight I'll try to look into it for him.
taxilian 12:10 yeah, I think he's looking for for how the browser would tell us to print
there is a NPP_Print
but I have no idea how it works
and I guess there is a OnPrint on the ATL class as well
taxilian 12:10 well, gotta run for a bit. be back
taxilian 14:10 amackera: do you have an answer to Schnapple's issue on the mailing list?
lol
n/m
amackera 14:10 hehe
Methinks it's a model negotiation problem, like maybe he's trying to use Cocoa in FFox3.6
(which you can't do)
Actually, hm... that might not be the problem..
Well whenever he replies we'll get a better idea
taxilian 14:10 sounds like he's trying to use Cocoa in FFox 3.6
we need to document somewhere what you can use where
(he replied)
amackera 14:10 It is documented
I guess it's just not clear/finished enough
taxilian 14:10 could be
I haven't even looked at it yet
amackera 14:10 mac plugin development is pretty confusing, i must admit
it's a good thing firebreath exists to mostly abstract it
the only thing it can't really abstract is drawing
taxilian 14:10 yeah
we might try to do something with that, though
an optional drawing abstraction
or better yet, find another library that does a decent job
and integrate it
I'm all about lazy
amackera 15:10 yeah me too
that's basically what my plugin does, it just uses OGL for cross-platform drawing
damn, TimeQueues execute the callback on a separate thread
looks like i'll need to figure out the async call stuff
but TimerQueueTimers do actually work for windowless plugins, which i guess is good to know
Better than SetTimer (which requires a HWND)
taxilian 15:10 well, if you don't need it synchronous, it's not hard
just use the stuff that has been there for awhile
just like events
we can get a HWND on windowless if need be
amackera 15:10 hmm
the browser's
but then it delivers the timer event to the browser, and the browser doesn't forward it to the plugin
under windowless there's not WM_TIMER msg forwards
taxilian 15:10 no, we can get a plugin HWND on a windowless
we just have to create a hidden window
I do it on IE already
amackera 15:10 ahhh yes i suppose so
taxilian 15:10 since that's all I can use for async calls there
on NPAPI there is an easier way
amackera 15:10 hmm
taxilian 15:10 look at ScheduleAsyncCall in http://code.google.com/p/firebreath/source/browse/src/ScriptingCore/BrowserHost.h
that works universally
for some reason I thought you needed to get a response back
if you just need to send to the browser, that works
amackera 15:10 nope
sweet
taxilian 15:10 yeah; I'm working on a better way
that will let you just do something like ScheduleAsyncCall(boost::bind<Object, Class::method>(param1, param2, …));
and have it work
however, I have to finish my homework first :-P
and get ready for a test
amackera 15:10 delayed gratification :)
amackera 15:10 taxilian: sorry to bother you but ScheduleAsyncCall takes a void (*func)(void *) function pointer arg
taxilian 15:10 yes, it does
amackera 15:10 i tried to use NPNFuncs.invalidaterect
taxilian 15:10 that won't work
you'll have to make your own function
that you can pass in
amackera 15:10 ahhh
i see
got it
thx
taxilian 15:10 that dereferences the void* that will be passed into it
amackera 15:10 it will call it on the plugin's thread, though?
taxilian 15:10 yes
amackera 15:10 awesome :)
taxilian 15:10 that's what it is there for
that's what the events use
amackera 15:10 right
taxilian 19:10 ok, my brain has shut off. someone tell me how to do a probabilistic random selection =] (probability of something being selected is, say, 5%; I have a probability for each item, and I need to select 20 items from the list)
nirvdrum 19:10 Does everything have equal probability?
taxilian 19:10 no
I guess the way I'll do it is just pick a random number between 0 and 100
loop through all the items and sum the probabilities
when one of them causes the sum to be greater than the generated number, I pick that one
nirvdrum 19:10 If you need to pick 20 unique, don't forget to account for changes in probability if you remove one from the list.
taxilian 19:10 yeah, it doesn't technically need to be unique
but it might be better
so I will probably do that
since it doesn't have to perform well (this is a school assignment), I'll probably just recalculate each time
nirvdrum 19:10 I think the technique you just described would deterministically pick the same set of items every time, unless you randomized the list after each selection.
taxilian 19:10 as long as the random number is generated properly, it should be a different set each time
new random number each time
therefore it hits a different point in the list
nirvdrum 19:10 Okay. Maybe I misunderstood what you're doing.
taxilian 19:10 a = rnd(0, 100)
foreach (item) { sum += probability(item); if sum >= a return item; }
nirvdrum 19:10 Heh, my brain is fried too. Working 5:00 - 23:00 every day is taking its toll. Off-hand that doesn't look like and independent selection because the sum is predicated on the order of the list to begin with. But, I could just be making shit up, too.
taxilian 19:10 yeah
the sum is
but the random number is not
so it's like stacking the items up against the wall
— predetermined order --
but then throwing a dart at it to choose which one to use
I hate doing algorithms when I'm tired :-/
my specialty is more systems integration… things like FireBreath =] not many algorithms required
nirvdrum 19:10 I'm actually fairly handy with algorithms, but not at the moment.
I barely can type right now :-/
But, I just got a new version of rubber out the door, so yay.
taxilian 19:10 hehe
well good
but, err
what is rubber in this context?
nirvdrum 19:10 Cloud-deployment tool.
http://github.com/wr0ngway/rubber
taxilian 19:10 huh. cool
nirvdrum 19:10 Hopefully a selenium grid release tomorrow.
Then a Selenium release sometime in the next week.
taxilian 19:10 how well does Selenium work on linux desktops?
unrelated question at the same time; anyone know how to get mac os x working in VirtualBox?
nirvdrum 19:10 It works fine on Linux.
taxilian 19:10 excelent
so I have a linux server
nirvdrum 19:10 Mac is sorta the weird one because of the way Apple does weird stuff with application focus.
taxilian 19:10 running a bunch of virtualbox vms
I would really like to set up selenium or windmill to do automated tests for FireBreath on FBTestPlugin every time it builds
nirvdrum 19:10 I haven't tried running OS X in VirtualBox, although from what I gather it's "supported" now.
taxilian 19:10 I installed a hackintosh version and it installed fine, but I can't get it to come up after; gets to where it asks you if you want to transfer settings, you hit next, and it just sits there forever
nirvdrum 19:10 Crappy.
taxilian 19:10 annoying. I have linux and windows vms set up, though
just need to figure out the automation tests
if I can do that, I should be able to catch at least 50% of the bugs that keep cropping up, if not more
nirvdrum 19:10 So, there are two APIs in Selenium now. The original ones (Se 1.x) and the new ones (WebDriver). Se 1.x has been around forever and I guess is more feature complete, but it does everything via JavaScript.
taxilian 19:10 I think that would make everyone happy =]
nirvdrum 19:10 So, that creates some sever limitations when manipulating the browser.
WebDriver does native OS bindings, so it can do more.
For your purposes, it probably does everything you need.
taxilian 19:10 cool
nirvdrum 19:10 Heh. Catching bugs is good :-)
taxilian 19:10 .. now if I only had any time :/
yeah, I think so
at least I now have a build server doing builds on 4 platoforms (linux 64 and 32, mac, windows) automatically every 6 hours when things change
that's caught a few things already
nirvdrum 19:10 If by some miracle I free up a bit, I'll give you a hand.
taxilian 19:10 cool
Jarom's planning to look at it too
nirvdrum 19:10 But I'm spread extraordinarily thin at the moment.
taxilian 19:10 we'll see who finds time first =]
yeah, aren't we all?
nirvdrum 19:10 Heh.
taxilian 19:10 (as I finish my genetic search algorithm so I can write the 4 page paper all due monday....)
nirvdrum 20:10 GAs are cool.
I wish I did more machine learning.
taxilian 20:10 oh, it's pretty cool
but it's still not as interesting as what needs to get done on FireBreath :-P
nirvdrum 20:10 Heh.
taxilian 20:10 I'm glad I've learned how to do it, though
I'm sure I'll use it sometime for something ridiculous
seems like I always do on weird things like this