IRC Log Viewer » #firebreath » 2011-04-16

IRC Nick Time (GMT-7) Message
jshanab_wcw 08:04 I have a plugin working really nice when retrieving archived video from our server, it is in a jquery control. But the "live" player, a simplification of the player part of the code with the other 95% the same has an issue. If i try to resize the browser window it immediatly crashes with unhandled exception during user callback and where it stops in WindowImplWin32.cpp line# 836, is because...
...the window callback handle is null in the window. Did I miss implementing a callback? (the window->handle is also null but the window object is valid)
oh, nevermind, not in FB framework at all LOL, in sfml
jshanab_wcw 09:04 So if i switch to git in my project and I want to be able to update the firebreath section of it, Do i pull from FB and then commit locally and push to my house server? I am use to svn :-( (go ahead, feel sorry for me, i do)
taxilian 09:04 jshanab_wcw: it all depends on how you want to set it up
generally, the easiest way to do it is to set it up as a submodule
jshanab_wcw 09:04 Like you did for boost?
taxilian 09:04 right
you can either do that using your own local clone of FireBreath or connected to the live one
unless you need to change things in the core framework, I'd use the live one
jshanab_wcw 09:04 I am trying to find out what to put on my server, so I can have user accounts and a web interface as well.
taxilian 09:04 ahh
well, I can tell you how I set it up
there are multiple options, though
basically your web is generally gunna end up seperate (to some extent) from your git repos themselves
jshanab_wcw 09:04 How do i create such a submodule. Is it possible to have a server coy that i can then update ?
That would be great. Do you have a web "blame" UI?
taxilian 09:04 I believe so
can you get to
jshanab_wcw 09:04 I will be pushing Continuous integration using jira and pulse :-)
a login screen appears "Project Tracker"
taxilian 09:04 hmm. that should allow anonymous access
let me check, hang on
ok, fixed
that's the web interface that I use
jshanab_wcw 09:04 ooh, looking at "Warehouse" for webui
taxilian 09:04 it's a little elaborate for only needing a git gui, though
yeah; there are plenty of different git web guis
you can use whatever you want
for the git access itself, though, I really strongly recommend gitolite
and you might find this interesting as well:
jshanab_wcw 09:04 I like your web ui, looks good
taxilian 09:04 it's actually a full project management tool — wiki, tasks, documents, etc
but you could just use it for repo gui if you wanted
disable the other stuff
only thing I don't like about it is its a ruby app
jshanab_wcw 09:04 looks pretty good for a ruby app :-) ruby has gotten better.
taxilian 09:04 I suppose so. I just have an unreasoning prejudice against ruby, really
no good reason for it
jshanab_wcw 09:04 ok, looks i have some reading and installing to do...(may take a while, I am on Gentoo)
taxilian 09:04 the coolest bit about gitolite is that you can set it up with wildcard repositories
if you need a new repository, you just clone it or push to it
and it creates it on the fly
jshanab_wcw 09:04 Ah. nice.
taxilian 09:04 so back to the firebreath related part; do you have internal changes to FireBreath that you need to worry about?
or do you just not want it to upgrade until you're ready?
jshanab_wcw 09:04 No... i dont think so. I was gonna upgrade and decided I'd like to avoid the svn shuffle and just move to git
taxilian 09:04 ok; there isn't really a need to have your own clone of the repo, then
you can, of course, but you don't need to
jshanab_wcw 09:04 I just want to not update until I am "between" releases. The worry wart in me is probably just a left over fromt he bad taste SVN merges has left me with
taxilian 09:04 a submodule entry includes a reference to the commit that it should point to
so it won't update automatically; to get a later revision you have to manually do a pull on the submodule, add that to the root repo, and commit
git merges aren't nearly as bad as svn merges, btw
but still, merges are annoying
jshanab_wcw 10:04 Sounds like what i want, I just am a little unsure on the add. is this the git add command and is it just being used to handle files that might be added in the update?
taxilian 10:04 read this page:
before you do anything else
jshanab_wcw 10:04 I need to find out how to force a less automatic merge sometimes. Especially when the language is not C++. I end up manually merginf sometimes to avoid "side effects"
OK, thanks
taxilian 10:04 I have never had an issue with side effects from an automatic git merge; git merges are a heck of a lot more intelligent than svn merges
and "automatic" doesn't occur when you commit or push
only when you merge
jshanab_wcw 10:04 SVN merges have screwed me so many times, sometimes quite subtlly
taxilian 10:04 like I said… you'll like git merges
and when you learn how to use the branches properly you'll probably swoon
jshanab_wcw 10:04 I keep studing it, watching presentatiions and decideing "Heel yeah" this is what i want and then get pulled away and not start using it. Today is the day..
taxilian 10:04 it's really not that bad
that book is actually really succinct
I was shocked how quickly it went once I decided to look at it
jshanab_wcw 10:04 One thing in SVN that really sucked is end of line handleing and properties per directory :-(
taxilian 10:04 git on windows sometimes has some odd EOL handling
I don't know about properties per directory; not sure what there is that way
git doesn't actually store directories; only files
so if there is no file in a directory, the directory won't be there
jshanab_wcw 10:04 How do you generally ignore files like generated backup files during editing and windows generated crap (I know.. Doctor it hurts when i use this OS...., then stop using windows)
taxilian 10:04 .gitignore
jshanab_wcw 10:04 thanks
taxilian 10:04 look at FireBreath's for an example
you might also find this helpful:
put that [alias] section in your ~/.gitconfig file and it will add those commands; they can be real useful
and in a comment at the bottom is a PS1 that will give you a prompt with the current branch in it, which is really really nice if you're using bash
jshanab_wcw 10:04 ok. Hey, when we talk about this .gitignore, is it in the repo, the clone and any server you push to? or just a local file
taxilian 10:04 .gitignore is in the repo
it's under source control
so it goes wherever the repository does
once you get to 1.5, btw, if you'd like to help me test it there is a new feature (totally undocumented, of course) in 1.5 that I think you'll like
it allows you to build the 4 "Core" FireBreath libraries once and then reuse them each time
rather than having to rebuild them any time your build dir has to get blown away
jshanab_wcw 10:04 Nice, because on windows compiling is so slow compared to GCC. I often thing the VLC approach for cross platform would be better, use gcc on windows. (just need a good IDE
taxilian 10:04 problem is that we can't do ActiveX with GCC
also, FYI, I plan to release 1.5 Monday morning. I don't expect anything to change between now and then
just seems to be better to release it at the beginning of the week rather than the end
jshanab_wcw 10:04 I don not know enough about activeX to even guess why, is it because of COM and the interface compiler thinggy
taxilian 10:04 well, part of the reason is that ATL won't build on GCC
jshanab_wcw 10:04 Good idea, have a nice quite weekend instead of one filled with questions
taxilian 10:04 part of it is that if we weren't using ATL, there are some built-in data types that aren't standard that we'd pretty much have to use
actually I haven't noticed a difference that way; just more people see it at the beginning of the week than at the end
hey, my ISP must have fixed my internet connection; this is the longest I've been able to stay on IRC without my connection going wonky all week
(wonky is, by the way, a technical term)
fortunately it's been a slow week on IRC
jshanab_wcw 10:04 I need to get rid of the last few windwos specific stuff in our code so i can start work on MAC and Linux port. I am thinking curl or boost::asio to replace winhttp and i haveto investigate replacements for "smartfile"
taxilian 10:04 you could look at the HttpClient class in src/libs/HTTPService
not sure what smartfile is, but that uses libcurl
jshanab_wcw 10:04 ok, as long as I can do https with it. The smartfile is a winapi that creates the full directory and path if not exists and maintains a persistant file pointer. More than one person can connect to the open file (it is a singleton class for the file handle) but each client gets a file pointer, I can write to it and others can read from it (kinda like Liinux VFS) It may be best to write a...
...wrapper class that shoehorns in or see if boost has something
taxilian 10:04 huh
HttpClient can do https, but it was streamlined to not require that the full openssl keystore be included, so the root CA that it currently supports is hardcoded
I would guess you could change that easilyish
jshanab_wcw 10:04 Actually. Got my server mixed with my client. No need to mess with smartfile until I port the server, :-)
taxilian 10:04 =]
well, gotta run. be back later
taxilian 13:04 jshanab_wcw: so are you an expert at git yet?
jshanab_wcw 13:04 Hah. Seems simple enough that I should be by now but I was updateing my server and broke a few things (mysql can be such a pain)
jshanab_wcw 13:04 Weird weather. Last weekend 88degrees and humid. It is snowing right now between sessions of rain.
jshanab_wcw 14:04 taxillian. A few questions about redmine. is jruby needed?
taxilian 15:04 jshanab_wcw: dont' remember, to be honest
sorry, didn't look at my im window =]
jshanab_wcw 15:04 K, I figured out that part, but the dependencies are coliding badly and i am having a bit of trouble getting redmine installed.
taxilian 15:04 I told you my least favorite part was that it's in ruby =]
jshanab_wcw 15:04 Yeah, ruby for some strange reason is a real cluster ___ on installs and dependencies, much like some of the early perl stuff.
Very fragile too. I think it is the new desire to depend on things at the same level instead of all on the same base.
jshanab_wcw 16:04 taxillian, wheree did you put the PS1 line? not in the gitconfig itself?
taxilian 16:04 no, it's a pash env variable
export PS1=...
jshanab_wcw 16:04 I just thought maybe it was stored and emmited by git somehow :-)
taxilian 16:04 nope
just a neat bash hack
taxilian 22:04 mital: hey, hows it going?
mital 22:04 heloo taxilian :)
taxilian 22:04 sorry I disappeared on you so fast last time
I had to give a presentation in class
mital 22:04 hey sorry about the delay I have been busy with lots of personal and work stuffs
taxilian 22:04 no worries
I wasn't expecting it in time for 1.5 anyway
mital 22:04 oh .. what u studying ?
taxilian 22:04 computer science
mital 22:04 masters ?
taxilian 22:04 finish up my degree finally
no, still bachelors =]
mital 22:04 hmm nice :)
taxilian 22:04 2 weeks left =]
mital 22:04 oh congratulations :)
yeah so i wanted to know things about shared_ptr and shared_from_this()
taxilian 22:04 the function shared_ptr() is gone now
should never have been
it was a misunderstanding on my part
but go ahead with your question
mital 22:04 yeah thats what I want to clear I could not understand how exactly shared_ptr work
taxilian 22:04 shared_ptr was just an alias for shared_from_this
if you're talking about the method
it just returns a reference to the class you call it on; it can't be used during the constructor or destructor of that class
mital 22:04 so I can safely get shard_ptr using shared_from_this() and if my variable goes out of scope it would not delete the object .. am i going right way
taxilian 22:04 a shared_ptr is a refcounted object; when the last shared_ptr that references a particular object goes out of scope the object will be deleted
mital 22:04 yeah that part i understood right... now checkout dan2's comment on FIREBREATH-1
FireBreathBot 22:04 FIREBREATH-1: Summary: Cross-platform timer abstraction.
FIREBREATH-1: Assigned To: [email protected]
FIREBREATH-1: Priority: Minor, Status: Open,
mital 22:04 I understood the problem correctly ... if Timer gets deleted it deletes deadline_timer but operation_aborted is not yet called ... so the "this" pointer referece may give a seg. fault.
is this right ? the part i didn't understood is that how we could solve this using shared_from_this()
taxilian 22:04 more or less; basically the issue is that as long as the ioService is still running your timer may fire a final time after you tell it to cancel
so if that callback, whatever it is, references an object (Timer) that gets released immediately after calling cancel you have a problem
however, the callback can use boost::bind, right?
mital 22:04 yeah I am using boost::bind while passing callback
taxilian 22:04 ok; so if hte pointer you pass in boost::bind is a shared_ptr instead of a raw pointer, then the object can't get released until the callback functor is released
mital 22:04 hmm I am getting it...
but most of the place in firebreath you have passed raw this pointer
taxilian 22:04 so the Timer object can be (needs to be, really) a shared_ptr, but when you create it you could do so with a method "CreateTimer" or something so that it creates the shared_ptr and then initializes the object after the constructor finishes, so that shared_from_this can be used
so we just need to make sure that we are using the right kind of pointer
if you need, implement it ignoring this for now and I'll work with you to figure out how to best abstract that when the rest works
mital 22:04 taxilian: yeh I have already implemented without it ... you can checkout mital/timer
taxilian 22:04 is that the only issue left?
mital 23:04 he also pointed out using boost::asio instead of asio header only.. but I am using boost::asio..
taxilian 23:04 hmm. I have no idea what he was talking about there
mital 23:04
I am already using boost::asio.. so i think this is no issue... I am not sure I understood that comment properly
taxilian 23:04 I don't know either. what about "If you do not reschedule a timer and a timer is the only thing running on asio, it is like calling ioService::stop();"?
mital 23:04 that is also no issue as I am supplying idle_work to io_service
that thread would alway be working
taxilian 23:04 as a minor point, prefer to use boost::scoped_ptr to std::auto_ptr unless you need to be able to hand off ownership of the underlying pointer
mital 23:04 until I call TimerService::Uninitialize which is yet to implement.
hmm ok
what about strand
strand with boost::bind
taxilian 23:04 I don't understand it real well, but it sounds like it might be worth looking into
I'll have to look at this more next week
mital 23:04 ok
taxilian 23:04 once I get finals out of the way (week after next) I should have a lot more time to look at things
mital 23:04 so when should I uninitialize the the timerservice?
taxilian 23:04 might be worth looking at, though
mital 23:04 is there any global even I can get when we are uninitializing the plugincore
taxilian 23:04 well, ideally the timerservice should go away when the last timer is done with it, I would think
hmm. there is one option (PluginCore::shutdown) but I'd prefer not to need to use that if we can avoid it
anyway, I gotta run for now
mital 23:04 ok
taxilian 23:04 sorry I haven't been much help; I'm glad you're making so much progress, though
mital 23:04 I would try to fix the uninitialization part if possible
taxilian 23:04 we can probably manage it with shared_ptrs
worst case we might have to add a mutex into the timer and require "cancel" be called on it or something
will have to look at it
gotta run, good luck
mital 23:04 okei... will try to fix
sabotaged 23:04 anyone know when its legal to draw with core animation for plugin?