IRC Log Viewer » #firebreath » 2010-09-24

IRC Nick Time (GMT-7) Message
taxilian 08:09 so yesterday was the 4th highest traffic day in the history of the project
amackera 08:09 cool :D
how many hits?
taxilian 08:09 216
amackera 09:09 not bad
taxilian 09:09 considering that until last week the daily hits were generally between 40-100?
not bad at all
this week we've been around 150 all week
amackera 09:09 there seem to be some new faces on the mailing list too
or rather, names :P
taxilian 09:09 yeah
this has been very good for the project, I think
cygmatic: is FB::VariantList the one that is used for a variable number of arguments?
cygmatic 09:09 yes
taxilian 09:09 thx
cygmatic 09:09 unless you need to catch 1-n specific types and then a variable number
in that case use FB::CatchAll as the last one
taxilian 09:09 ahh, that's what I was looking for
I'm adding some docs on allowed types to the variant documentation
cygmatic 09:09 there should be an example in the JSAPIAuto page
ah, i'm just writing on a reply to Jos
can i cancel that?
taxilian 09:09 lol
send it to me instead
I'll see if I miss anything
add it to the docs
and then respond to him
cygmatic 09:09 ok
taxilian 09:09 I'm trying to update docs and respond with links instead of responding to individual questions
where apropriate
because that way it's there for someone else to find
cygmatic 09:09 a good strategy
taxilian 09:09 yeah; we'll see how long it lasts ;-)
cygmatic 09:09 "if a question had to be asked, it usually means there is documentation missing" ;)
taxilian 09:09 agreed
amackera: before doing any WiX specific documentation
it would be awesome to just have an explanation of how the WiX integration with firebreath works
i.e. "you need to install WiX, then you'll see this, and you can do this, and you look here for this...:"
cygmatic 09:09 taxilian, does the unit test on osx run through for you (dev repo)?
taxilian 09:09 they did last I tried
lol. good catch on the variant->vector change
cygmatic 09:09 np
taxilian 09:09 incidently, someone tweeted a couple of days ago that they thought the documentation for FireBreath is superb. Since you wrote most of it, I'll tell you good work -=]
cygmatic 09:09 oh, thanks
i would have thought of it as waaaayyy to incomplete
ok, i don't see how that unit test could work
taxilian 09:09 yeah, me too
those unit test
they don't work
cygmatic 09:09 this tries to call GetValue(NPNVWindowNPObject, (void**)&window) on a browser-host with no valid NPFuncs
taxilian 09:09 and aparently haven't been running since we switched to cmake
I would *really* like to get those unit tests working
but I haven't had time
I enabled them so we'd see it
since they've aparently been disabled for months when I thought they were working
cygmatic 09:09 oh, ouch
taxilian 09:09 yeah
cygmatic 09:09 hm, that makes changes on JSAPIAuto a bit harder
taxilian 09:09 which changes?
cygmatic 09:09 catching char, short, ... in JSAPIAuto methods
at compile time
just like int
and float
taxilian 09:09 might be better to just change it to use numeric_cast
and not try to force it ourselves
at least then it would throw an exception
cygmatic 09:09 well, if you put numeric_cast in, we could remove it
at the moment it is confusing as proven by Jos :)
taxilian 09:09 I didn't put it in
but I did add it to boost
I think
so that we should be able to use it if we want
so I'm thinking the cleanest way to do this
is that any time we convert between numeric types
we use numeric cast
and then we allow any numeric type
but strongly suggest they use a long
and then it throws an exception if they try to use int and they pass something that doesn't fit
cygmatic 09:09 i still rather have that catched at compile time and make the user a numeric_cast if he really wants it
but thats just my preference :)
taxilian 09:09 lol
I would to, except that it adds a lot of complexity
and there will always be cases we won't catch
like using unsigned long
cygmatic 09:09 nope, those would be all covered now
i switched to a white-list
taxilian 09:09 ahh
so it only allows types we specify?
cygmatic 09:09 well, all numeric types we specify
static const bool value = !is_a_number || is_in_whitelist;
taxilian 09:09 ahh
I guess that makes sense
in many ways I think the numeric_cast is more powerful, though
if they wanted to force it to only accept char, they could
and it would throw a type error just like anything else
who wants an email address?
cygmatic 09:09 cool, sure
i guess the main question is, is it intuitive that it throws type-errors for range violations?
taxilian 09:09 I'm trying to get as well, but we'll see; the domain is expired, so in a month to a month and a half we'll know if I got it or not
in the mean time, don't say anything about trying to get it so that nobody tries to take it and sell it back to us
to me it is
because if I pass in 123442 to a char field
I would expect it to tell me "couldn't convert long to a char"
or some such
or "value out of range"
cygmatic 09:09 but there is no such thing in JS
taxilian 09:09 no
cygmatic 10:09 it only knows "numbers"
taxilian 10:09 but we haven't been trying to force our messages to look like JS
the exceptions all expose what is actually happening
cygmatic 10:09 hm, but the rest comes rather natural for my limited JS view
taxilian 10:09 if you try to pass a string into a long, it'll tell you "can't convert std::string to long" or something similar
as it is now
to me that is fine
I'm not trying to look like this isn't a plugin
I'm trying to give them the info they need to find and fix the problem
cygmatic 10:09 hm, alright
i can always take 'long' if i need it
taxilian 10:09 cygmatic: check gtalk for your login info
amackera: do you want an email address
cygmatic 10:09 and as long as it is documented that 'long' and 'double' work everywhere without runtime exceptions...
taxilian 10:09 I will make sure it is so documented
cygmatic 10:09 (funny to have one of the longest discussions about such a relatively minor thing ^^)
taxilian 10:09 lol
happens, though
as simple as it is, it is very fundamental
cygmatic 10:09 a related anecdote: svn apparently never had really major disagreements in their community. the one thing that came down to an all-hands-vote was... spaces before parantheses or something like that ^^
taxilian 10:09 LOL
yeah, I can totally see that
this has actually been a very fun community so far. very rarely have we had any strong disagreements
and those are pretty much all about cmake
and "give me a better option and we'll talk" usually makes the question go away really fast...
cygmatic 10:09 heh, yeah
taxilian 10:09 though from what I heard scons might be a viable alternative now; however, I think that would have the exact same problems we have now, so I don't really see a reason to switch
amackera 10:09 taxilian: sure i'll write up a better intro to WiX
taxilian 10:09 cygmatic: is the numeric_cast thing a change you want to make?
amackera: awesome
cygmatic 10:09 taxilian: sounded like you knew what you wanted to do?
taxilian 10:09 yeah, but I tried it once and couldn't figure out how to make it work =]
if I do it it will be a few weeks
but either way
also, I'm not sure how to remove your whitelist/blacklist stuff
cygmatic 10:09 thats easy
taxilian 10:09 SFINAE makes my head hurt
cygmatic 10:09 removing the MPL_ASSERT_MS() in ConverterUtils.h should be all that is needed
taxilian 10:09 ok
cygmatic 10:09 hm, the rest shouldn't be too bad either
basically we could reduce the conversion_cast with numeric target types into one specialization
hm, if i'd have the unit tests running it would be a breeze :/
taxilian 10:09 well, ScriptingCore unit tests should be fine
it's just the NPAPI ones that are busted
cygmatic 10:09 right, phew
taxilian 10:09 gotta run for a big. amackera: still waiting for an answer on the email address
amackera 11:09 oh taxilian i don't think i need another email address :P
taxilian 11:09 hehe
well, if you're sure ;-)
amackera 11:09 actually, sure make one
taxilian 11:09 lol
amackera 11:09 i can always just forward it
taxilian 11:09 that's what I do
amackera 11:09 and it looks better on the mailing list
taxilian 11:09 all of my addresses forward to my personal one
amackera: how do you spell your last name, again?
n/m, found it
cygmatic 12:09 taxilian, is there a reason why variant::convert_cast_impl<bool>() is so selective about its numeric source types?
amackera 12:09 visual studio is so _slow_
cygmatic 12:09 what version?
vs2010 seemed greatly improved
amackera 12:09 i can't imagine how slow the other ones were then :S
cygmatic 12:09 for big projects? you don't wanna know *g
taxilian 12:09 cygmatic: I honestly don't remember. fix it as makes sense
I'll review it when you commit
amackera 13:09 taxilian: is this sort of thing: too detailed?
or not detailed enough?
taxilian 13:09 give me a few minutes to read over it
initially it looks good
cygmatic 13:09 ok... now why does boost::lexical_cast<int>(std::string("1.0")); fail :(
taxilian 13:09 The first suggestion that comes to mind
suggestion / request
amackera 13:09 sure
taxilian 13:09 put somewhere at the top somehow noticeable that all you need to do to get the WiX project created, etc, is install WiX
that should be step 1
amackera 13:09 ok
taxilian 13:09 or however it makes more sense
other than that, it looks good to me
amackera 13:09 i need to fill it out with more details, as it is it's really just a summary of the default wix file
i'll add stuff about changing the UI, adding images, different features, etc
taxilian 13:09 you might want to consider splitting it into two pieces
one that assumes you already know how to use WiX
and tells you how to get it going with FireBreath
and another that gives you more information about how to update the installer itself
amackera 13:09 yeah that's a good idea
taxilian 13:09 amackera: I also recommend adding a link to the wix download page. I'll get to it eventually if you don't, though
amackera 13:09 sure
obviously feel free to edit/change/rewrite
i won't be offended :)
open source projects succeed or fail based on the quality of their documentation, i find
taxilian 13:09 agreed
cygmatic 13:09 new conversion stuff pushed, please someone test on VS
taxilian 13:09 I can do so in an hour or two
cygmatic 13:09 well, imagine that had a viable sentence structure
taxilian 13:09 lol
close enough
cygmatic 13:09 huh, that looks like i still had left-overs from the previous failed attempt to push to dev
amackera 13:09 grammar are over rated
taxilian 13:09 I is good english speaker
because i growed up talking it
amackera 13:09 i do as good as i are
cygmatic 13:09 great, and i thought i could pick up some english here ;/
amackera 14:09 anyone know what might be causing this linker error in visual studio 2010: MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _floor already defined in LIBCMTD.lib(_floor_pentium4_.obj)
kalev 14:09 mixing objects compiled against different MSVC runtime would be my guess
amackera 15:09 ah that makes sense
anybody here tried to compile freetype into their library at all?
taxilian 15:09 nope
taxilian 15:09 Georg, did you ever figure out what was causing the regsvr32 to fail on you?
'cause it's happening to me now
amackera 15:09 do you have two dlls in different directories registered, perhaps?
is there an error or does it report success?
taxilian 15:09 there is an error
only one dll AFAIK
though there could be an old version somewhere
ti shouldn't matter
it's almost like the .rgs didn't get compiled in or something
yeah; FindResource failed
what it was/is
is that the .rc file somehow wasn't added as a resource
I'm betting it's a weird cmake bug
I'm going to upgrade to the latest
amackera 15:09 i am so very confused by why i can't link freetype with my project
cygmatic 15:09 taxilian, nope
something with the rgs probably
but i didn't follow up on this
taxilian 16:09 cygmatic: it wasn't the rgs
it was the .rc
not getting compiled
but no idea why
cygmatic 16:09 ah, weird
taxilian 16:09 so after upgrading to CMake 2.8.2 it works fine
I was on 2.8.0
cygmatic 16:09 good to know
ah, i love it when people think they can safely say something is not possible directly in C or C++
amackera 16:09 cygmatic: :D awesome
also of note: it seems like there's a boost library to do everything
i'm surprised there isn't a boost::npapi library
cygmatic 16:09 well, i'm still waiting for Boost.Coffee :D
they try to keep it to "commonly needed" areas
taxilian 17:09 wow
what a neat feature
when you put an array of strings on a javascript object in IE
using SetProperty on the IDispatch interface
it converts it to a single string
cygmatic 17:09 huh, what does this?
taxilian 17:09 if you call getUserData() on FBTestPlugin
cygmatic 17:09 ah, thats the issue from nikita
it just collapses the array? how rude
taxilian 17:09 yeah
I'm …. in shock
I'm not even sure how to address this
it's so… bizarre
cygmatic 17:09 i don't get what thats supposed to be good for
taxilian 17:09 I just pushed a test page to the stable repo that reproduces it
what the collapse? or the feature that isn't working?
cygmatic 17:09 the collapse
taxilian 17:09 I'm totally with you there
the only thing I can figure out is that for whatever reason it's calling the toString method
and putting whatever it returns in
but why? not a clue
I pass it in as an IDispatch
I just double checked
cygmatic 17:09 hm
or better: argh
taxilian 17:09 yes
I never realized because I never actually tried to access it as an array, aparently
when you alert the value it looks the same
cygmatic 17:09 but its a standard javascript array in IE too, no?
taxilian 17:09 yes
hmm. I have an idea
worth trying, anyway
you shoudl check out my test page, though
it's pretty cool
not very pretty
but cool
cygmatic 18:09 yay, nice
taxilian 18:09 hmm
so I guess I could create an array wannabe class
that just mimics all the behavior of an array
but that seems somewhat less than ideal
this is really annoying
I guess we just have to declare that function defunct
if I assign another map to it, the value gets set to "[object Object]"
as a string
cygmatic 18:09 what other map? one straight from JS?
taxilian 18:09 no
one from the browser
from the plugin I mean
so I just tried to nest the map
and it tried to convert it to a string
cygmatic 18:09 and it only happens with maps from the plugin?
taxilian 18:09 I suspect it happens anytime you use setproperty to assign something
that brings up an interesting question; what would happen if I tried to next it inside an array?
is there a built-in method for javascript objects for setting values?
similar to push?
cygmatic 18:09 suspect or have you tried? :)
i don't know
taxilian 18:09 well, that is what seems to be happening to me
so I have tried, but not every conceivable variant
well, I have an idea
tell me if this sounds too crazy
if we're on IE
I could inject a javascript function into the page for setting the values
something like _________fbset(obj, key, val)
and use that
cygmatic 18:09 that is crazy :D
but might be a last resort
it only happens for properties though?
and is it already collapsed when it comes into Invoke()/InvokeEx()?
taxilian 18:09 no, actually
it seems to be collapsing during the Invoke
but in this case, the invoke is a setproperty invoke
not a method invoke
I'm verifying that it works okay with nesting in arrays
cygmatic 18:09 interesting
taxilian 18:09 since those set it by a method call
if it does, then we should be able to use the function call hack
I'm out of other ideas
cygmatic 18:09 but if it collapses during invoke... might it not be a bug in FB?
taxilian 18:09 no
it's fine when we call into the other IDispatchEx Invoke method
if I put it in an array, I can nest all I want
because I'm assigning it using .push
it must be a (bug? feature?) in the IDISPATCH_SETPROPERTY thing
…. wait!
I have an idea
just remembered something
or something similar
The member is changed by a reference assignment rather than a value assignment. This flag is valid only when the property accepts a reference to an object (defined by IDispatch).
I bet that's it
cygmatic 18:09 if value assignment is the problem
taxilian 18:09 it would make sense
yep, that was it
cygmatic 18:09 nice :)
taxilian 18:09 well, learned something new today, didn't we?
cygmatic 18:09 me not quite
taxilian 18:09 so here is what happened
on IDispatch
when you set a property
you use ->Invoke(Ex)(… , IDISPATCH_PROPERTYPUT
cygmatic 18:09 so far yes
taxilian 18:09 but if you just do propertyput, it assigns by value
cygmatic 18:09 and you called it on what?
taxilian 18:09 so if you do IDISPATCH_PROPERTYPUTREF then it will assign by reference
I got an IDispatch by calling window.Object()
cygmatic 18:09 ah, ok
taxilian 18:09 I've never needed to use PUTREF before
so I had almost forgotten about it
cygmatic 18:09 and putting non-trivial objects by value doesn't make sense
taxilian 18:09 but it makes sense that it would do that
I think in the browser we should always be fine just doing a putref
cygmatic 18:09 hm, does putref work for the trivial types too? i assume not?
taxilian 19:09 it does
it just wouldn't if for some reason an object explicitly didn't accept references
bet that doesn't happen in the browser
and so far this is the only place we use PROPERTYPUT anyway, so we can add a special case if something new comes up
cygmatic 19:09 well, for non-object-types byref usually doesn't make sense
taxilian 19:09 in this case, byref might end up making the strings not get copied
but the other types will end up byval anyway
simply by nature of the fact that you can't share the simple types
all the tests pass now
on IE and Firefox
cygmatic 19:09 hm, ok :)
ActiveX still manages to confuse me at times
taxilian 19:09 lol
fortunately it only confuses me when I am using it or changing code that uses it
if you haven't set this up, you definitely want to:
all changes that have been made to stable are now in dev as well
cygmatic 19:09 hm, maybe that diffmerge actually works
taxilian 19:09 it worked great for me
cygmatic 19:09 i tried integrating apples diff tool but it didn't like me
taxilian 19:09 I've used it before with bzr as well
this one took me 5 minutes to set up
and I just used it to merge stable into dev
cygmatic 19:09 looks like i have to give it a shot
command line diffs are sub-optimal
taxilian 19:09 yeah
just kinda
taxilian 20:09 cygmatic: the new web-based unit tests have already caught a bug in the dev branch that I hadn't caught :-P
now if I can just expand and automate them… =]
cygmatic 20:09 nice
now why didn't we think of this earlier?
too easy?