/srv/irclogs.ubuntu.com/2013/03/14/#ubuntu-mir.txt

sturmflutkdub: How will window decorations be handled in Mir? Server-side or client-side?00:03
kdubsturmflut, current thinking is client-side, but its still up in the air... your thoughts welcome00:18
robert_ancellkdub, good point. thomi, can you set up ci and automatic PPA building for lp:qmir into lp:mir-team/staging?00:21
sh4rm4so mir uses C++ and boost, right ?00:38
RAOFIndeed.00:39
sh4rm4ah. i heard someone saying that boost apps are very slow to compile and templates will expand to a lot of code00:40
sh4rm4in other words, bloat00:40
sh4rm4is that correct ?00:40
sh4rm4also, he said something about massive ram usage. he said that i possibly want be able to rebuild mir on a netbook with 512MB RAM00:43
sh4rm4*won't00:43
RAOFHe probably wouldn't want te rebuild mir on a netbook with 512MB of ram, no.00:44
RAOFBut that's more because a netbook with 512MB of ram is terribly, horribly underpowered, and won't build *anything* well :)00:45
sh4rm4because of the compilation times ?00:45
sh4rm4well i built an entire linux distro in 3 days on an efika mx00:45
sh4rm4800 mhz, 512MB RAM00:45
sh4rm4about 300 packages00:46
RAOFYou would no longer be able to do that :)00:46
sh4rm4:(00:46
RAOFYou couldn't do that for Ubuntu *now*; firefox and libreoffice (at least) would trigger the OOM killer.00:47
sturmflutkdub: Personally I think server-side decorations are better because they provide a unified look for all windows regardless of the toolkit and the controls (minimize/maximize/close) would still work if the client freezes. Also the decoration theme developers would have to rewrite their themes for every toolkit and all applications not relying on the latest version of one of the big toolkits would use different decorations,00:47
sturmflut resulting in chaos. Client-side decorations may offer more flexibility but I think the negative sides outweigh the positive ones.00:47
sturmflutRAOF: I agree, I've seen single gcc instances using more than 1 GB of RAM00:48
sh4rm4btw: why was CMAKE chosen as a build system ? in the eyes of a packager, it's horrible - doesnt even support DESTDIR00:48
RAOFsh4rm4: Mir's build is much lighter than that; I can have 5 parallel g++ processes in 4GB of ram, so you'll be able to build in under a GB of ram easy.00:49
sh4rm4RAOF, even with debug info ?00:49
RAOFsh4rm4: Because all build systems suck, and the person who did the initial build system thought cmake sucked the least.00:49
RAOFIt's not terrible, and we've got plenty of cmake packages working fine.00:50
RAOFsh4rm4: Indeed with debug info00:50
sh4rm4well, autoconf *can* at least be used sanely, and it's at least freestanding and straightforward to use: ./configure --prefix=/ --enable-feature && make -j200:51
RAOFcmake can be used just as sanely.00:51
RAOF*I'd* prefer autotools, but that's because I've got a huge amount of experience with their utter terribleness.00:51
sh4rm4whereas invoking cmake requires a ton of options, cmake calls back into itself, and needs a C++ compiler to begin with00:51
sturmflutsh4rm4: cmake does support DESTDIR00:53
sh4rm4example of a build script for a cmake-using app (mysql) https://github.com/rofl0r/sabotage/blob/master/pkg/mysql#L1900:53
sh4rm4in comparison, postgresql: https://github.com/rofl0r/sabotage/blob/master/pkg/postgresql00:53
sh4rm4sturmflut, oh ? how is it being passed ?00:54
sturmflutsh4rm4: You pass it to the "make install" command00:54
sh4rm4hmm i wonder why that doesnt work with mysql00:54
sturmflutI just tried it with mir and it worked00:55
RAOFsh4rm4: Eh; fix your tools. http://bazaar.launchpad.net/~mir-team/mir/trunk/view/head:/debian/rules is a much nicer package build ☺00:55
sh4rm4btw, doesn't the usage of C++ objects, which are usually dynamically allocated, lead to much higher mem consumption and slow speed due to repeated malloc calls ?01:05
sh4rm4according to the mir overview page, one of the design goals is speed01:06
sh4rm4thinking along the lines of this paper:  http://domino.watson.ibm.com/comm/research_people.nsf/pages/nickmitchell.pubs.html/$FILE/oopsla2007-bloat.pdf01:07
RAOFsh4rm4: Only if you repeatedly create objects? You can do that in C, too.01:08
sh4rm4right, but that's not idiomatic C01:09
sh4rm4whereas it's idiomatic OOP01:09
RAOFIt's *totally* idiomatic C!01:09
sh4rm4this here is OOP style: if(string("xxx:xxx:xxx").split(":").elements(2) == "xxx") { ... }01:10
sh4rm4you got 4 dynamic allocs in that line01:10
sh4rm4in C you would deal with a buffer on stack01:10
RAOFThat's not particularly "OOP style"; that's just a bad interface.01:12
RAOFAlso, that paper appears to be all about the overhead of Java objects, which C++ doesn't have?01:12
sh4rm4aren't java and C++ objects quite similar ?01:12
RAOFNo.01:12
sh4rm4maybe C++ objects are even worse because they have a vtable01:13
RAOFJava uses a VM; there's a certain amount of overhead involved in that.01:13
sh4rm4that's at least one pointer overhead for each object01:13
RAOFA C++ object only has a vtable if it's got a virtual member; and that's *exactly* what you'd do with a C struct.01:14
sh4rm4you mean a C struct with function pointers ?01:14
RAOFIndeed01:14
sh4rm4you wouldnt do that01:14
RAOFPerhaps you've not read much C? You do that _all the time_01:14
sh4rm4that's a pretty bad style01:15
RAOFI don't think you'll find any non-trivial C program that _doesn't_ use that style.01:15
sh4rm4i've written about 50, and only one uses that style, because its a straight translation from actionscript code01:16
dufluRAOF: It's "common", but not common to most non-trivial C, I think01:16
RAOFduflu: It might just be the areas I deal with; X, mesa, the kernel, anything using glib, …01:17
dufluRAOF: Yeah I know it's common in those areas. Those are the first things I thought of. But then... nothing else01:18
sh4rm4well, glib is C that tries to be C++, so no surprise there01:19
RAOFI'm can't think of any non-trivial C code which doesn't have at least one struct with function pointers in it, but I guess there could be areas of the C-verse I've not explored :)01:20
dufluWelcome to the multiverse01:20
sturmflutC structs with function pointers are pretty standard I would say01:21
sh4rm4when you need to stick a function pointer into a struct, you should rethink your design, because bets are high you're about to do something stupid01:22
duflush4rm4: I agree. It's high risk and should be avoided in C /if/ there is an alternative procedural approach01:27
dufluWell, medium risk...01:28
dufluYou can shoot yourself in the foot many other ways01:28
sh4rm4;)01:29
dufluYou reduce the risk if you don't expose the object structure in any public APIs. Users just see "myapi_foo_init()" and it populates the vtable.01:31
sh4rm4yeah, but as soon as you deal with callbacks, the code starts getting messy01:31
dufluYeah, no implicit "this" parameter is a constant headache01:32
dufluThough there's a good argument that anything implicit is dangerous01:32
duflurobert_ancell: https://bugs.launchpad.net/mir/+bug/113693802:20
ubot5Launchpad bug 1136938 in Mir "mirserver.pc is empty/incomplete" [High,New]02:20
robert_ancellduflu, turned out to be the fricking CMake cache being stupid02:39
robert_ancelldelete the cache and it works02:39
duflurobert_ancell: Yes "make clean" is never enough. You should regularly "rm -rf build"02:40
robert_ancellwhat is the point of a cache if it doesn't work...02:40
RAOFIndeed.\02:40
RAOFMIR_GCC_VERSION is in the same boat; you can't change it once it's been set. And you can't change it in ccmake *until* it's been set!02:40
robert_ancellwell, there goes 3 hours of time wasting02:41
robert_ancellas I side effect. I learnt a lot more about cmake. And lost a lot of respect for it02:42
RAOFYou clearly had more respect for it than I did ;)02:47
robert_ancellpeople say it works well for them. I think they all must have Stockholm syndrome02:52
RAOF*I* say autotools works well for me :)02:54
RAOFSure, it's horrible in basically every way, but it's explicably horrible. Except where it isn't  :)02:54
robert_ancellRAOF, at least autotools has the excuse of being old02:59
tehcloudnothing beats a hand-crafted makefile03:08
TheMusoEven autotools beats a hand-crafted makefile. :)03:21
dufluI love GNU Make. However it totally fails for complex projects with cross-directory dependencies03:22
dufluCMake does that very well03:22
dufluSo I use CMake, but don't *like* it03:22
robert_ancellduflu, do you know the rationale for this wait handle stuff? Can't we just do something like http://paste.ubuntu.com/5612673/?03:52
RAOFWe could do that (although I'd change mir_connect_sync to return a MirConnection rather than void)03:55
robert_ancellRAOF, sure, in that case when there's only one thing to return03:55
* RAOF is still rooting for the foo_begin/foo_end/foo pattern.03:56
robert_ancellThe only case I can see for the wait handle is to be able to cancel the request03:56
robert_ancellI really like the way GLib did it, though it uses a generic type for the callbacks which I'd avoid03:56
RAOFThe wait handle is there so you can wait until it's done, not so you can cancel it.03:57
robert_ancellRAOF, yeah, though we need some sort of cancelling mechanism and that seems the right place to put it03:57
dufluRAOF: I proposed such a solution already and it was disapproved on the basis of multiple functions doing the same thing03:58
robert_ancellRAOF, who disapproved it?03:58
RAOFduflu: I know :(03:58
robert_ancellduflu, i mean03:58
* duflu looks03:58
RAOFrobert_ancell: Do we need a cancellation mechanism? With what porpoise?03:58
robert_ancellRAOF, if you register a callback and then need to delete the object you have to cancel the callback03:59
duflurobert_ancell: alan_g disapproved that too: https://code.launchpad.net/~vanvugt/mir/simple-connect/+merge/14730503:59
RAOFrobert_ancell: Ah, yeah. Fair call.03:59
robert_ancellduflu, do you have the previous proposal you reference handy?04:02
duflurobert_ancell: That was an earlier version of the current "optional-callbacks" branch04:02
dufluOh, no04:02
dufluThat was "remove callbacks"04:02
duflurobert_ancell: https://code.launchpad.net/~vanvugt/mir/remove-callbacks-mir_connect/+merge/14705604:03
dufluNow all 3 proposals to simplify the client API have been disapproved04:03
dufluI'm becoming slightly dismayed for the future of Mir development04:03
RAOFrobert_ancell: And bug #111219504:04
ubot5Error: Launchpad bug 1112195 could not be found04:04
* duflu goes to the store and whip up lunch04:05
RAOFduflu: Did you deliberately refrain from making that bug public?04:05
dufluRAOF: I only forgot to make "closed" bugs public04:06
dufluYou can do so if you like04:06
RAOFPublicified.04:06
* duflu goes to play in the rain and kitchen04:06
dufluRAIN!04:06
RAOFDear lord. In Perth?!04:06
robert_ancellbug #111219504:07
ubot5bug 1112195 in Mir "Mir client API lacks simple synchronous interface" [High,Opinion] https://launchpad.net/bugs/111219504:07
robert_ancellRAOF, yeah, we've stolen all Australia's good weather at the moment. But we'd quite like the rain back now04:07
robert_ancellReading that bug report. When anyone says "With templates" I get a shudder down my spine04:09
RAOFrobert_ancell: What's a harmless bit of template metaprogramming between friends? ☺04:24
RAOFThe begin/end approach doesn't require metaprogramming, at the cost of needing to define an extra two-line function for each begin/end pair.04:26
robert_ancellyes, I agree04:29
robert_ancellI'm going to send this to the mailing list as I think most people are thinking along the same lines04:29
=== robert_ancell is now known as robert_ancell|di
RAOFYou know what would be awesome? If we could build Mir with clang and get sensible goddamned compiler errors.05:41
dufluRAOF: Yeah a few people have started trying and logged bugs about the problems05:43
RAOFWe'd also want to stop our brain-dead MIR_GCC_VERSION thingy.05:44
dufluI was going to address one of them today but it may turn out that I continue having to work on the old surface-types05:44
=== robert_ancell|di is now known as robert_ancell
RAOFrobert_ancell: Are you planning to take bug #1112195 to the list?07:02
ubot5bug 1112195 in Mir "Mir client API lacks simple synchronous interface" [High,Opinion] https://launchpad.net/bugs/111219507:02
robert_ancellRAOF, I've written a draft, was thinking on it07:03
robert_ancellI don't want us to fall into design by committe07:03
RAOFCool. I shall wait until you've posted it before commenting further.07:04
RAOFActually, we really need to get the toolkit-patching stakeholders in; they're the so-far somewhat mythical “common use case” we're currently optimised for.07:04
tvossRAOF, you should grab loicm in, he is the one with the deepest understanding of Qt's platform abstraction layer07:05
tvossalf_, the Jenkins VM build seems to be unstable for some time now. Are you aware of that?07:12
robert_ancellduflu, still around?07:15
alf_tvoss: Yes, but I haven't had time to deeply look into it. I'll try to take a look soon, but from what I saw its a timeout issue that's related to the test code, not something actually wrong with the main code.07:18
duflurobert_ancell: I think so. Have not combusted yet07:18
dufluMore to the point... why are you still around?07:18
robert_ancellduflu, I stay up late on Thursdays to talk to the Europeans07:19
duflurobert_ancell: That's not a euphemism is it?07:20
robert_ancelluh, I'm struggling to work out what it would be a euphemism for...07:21
tvossalf_, ack and thanks07:21
=== duflu_ is now known as duflu
=== yofel_ is now known as yofel
=== mmrazik is now known as mmrazik|lunch
=== mmrazik|lunch is now known as mmrazik
sturmflutCan you already estimate when basic input handling and window management will be implemented in Mir? I am waiting for the moment when I can start the demo clients and move the windows around12:44
tvosssturmflut, racarr is busy working on the input bits, you might want to ping him when he comes online. He is on the US west coast13:49
=== jono is now known as Guest54570
sturmfluttvoss: What about window management? I saw that window decorations are still a TODO, so how would one interact with Mir at the moment? Without window decorations there are no window borders and controls for maximizing/minimizing, moving, closing etc.14:01
tvosssturmflut, those are left to do right now, the window decorations will be provided by the shell/Unity14:04
=== mmrazik is now known as mmrazik|afk
kdubgood morning folks, status, working on the server constructing the android display differently depending on the environment the server is ran (start of hwc work)15:06
alan_gHello kdub15:15
alan_gI've started on the refactoring of frontend we discussed earlier in the week and on mir-devel15:16
alan_galf_: kdub racarr - there seem to be varying thoughts about how the shell hooks into mir. Shall we plan a hangout this afternoon/morning?15:44
* alan_g thought it was all clear after the London sprint15:45
alf_alan_g: I am in15:48
alan_galf_: kdub - let's give racarr an hour in which to appear. Hangout at 17:00 UTC15:51
kdubalan_g, sounds good15:53
racarrI am appeared16:10
racarrhangout at 17:00 would be best though. still digesting16:10
=== mmrazik|afk is now known as mmrazik
=== zAo^_ is now known as zAo^
alan_galf_: kdub racarr - https://plus.google.com/hangouts/_/73bee7c67b692d0a384d6cc18448029c47205a49?authuser=0&hl=en-GB#17:01
racarralan_g: alf_: kdub: Says no one is there17:07
racarrmaybe someone could send me an invite through teh interface?17:07
racarrthe*17:07
racarrthanks for the updates to prepare-to-send-clients input btw :)17:57
alan_gsometimes its easier just to write the code18:01
=== alan_g is now known as alan_g|life
=== mmrazik is now known as mmrazik|afk
=== dpm is now known as dpm-afk
=== mmrazik|afk is now known as mmrazik
=== kdub is now known as kdub^lunch
racarrFollowing up on prepare-sessions-for-input-focus, using this SessionManager::create_surface_for approach, the test I want to write is TEST(SessionManager, create_surface_for_session_forwards_and_then_focuses_session)22:06
racarrbut I can't set an expectation on the session because it's the real SessionManager, which doesn't use a factory to construct Session implementations22:06
racarrI am trying to decide if this is evidence that the SessionContainer is also a SessionFactory (or some such)22:07
racarror if it's just not a compelling change, if there is no other real motivation for it, here it's just easy to set the expectation on the surface factory instead22:08
racarrbut it kind of seems like it might be correct *shrug*22:08
=== kdub^lunch is now known as kdub

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!