/srv/irclogs.ubuntu.com/2014/07/24/#ubuntu-mir.txt

racarr_...has anyone ever felt the desire to lay out code horizontally01:35
racarr_I have this big stub class...and for a second I was imagining laying out all the functions in a grid01:36
racarr_then remembered how code works lol01:36
RAOFHah01:37
racarr_it would be nice though01:40
racarr_lol01:40
racarr_in other news mi::InputTargets -> mi::Scene01:40
RAOFIt might be nice to code as the AST. There's no particular reason that a big string of text should be the canonical representation for the program.01:47
racarr_lol...one day im not going to be able to use emacs anymore :(02:11
dufluracarr_: Only a few days ago I was commenting on that. At some point in the past decade or so a trend of horizontal coding (long identifiers, long lines) started to become quite visible in some circles like ours.03:04
dufluPreviously people read code vertically, the most obvious origin being assembly03:04
dufluI say in some circles because other projects like the kernel, vertical structure dominates and 80 character lines are still enforced03:06
* duflu recalls the most extreme case in Compiz where Sam wrote several functions whose names exceeded 80, even 100 characters03:08
dufluRAOF: Come to think of it, yes there is a reason for code to be linear. It reduces the ease with which you can create spaghetti03:13
dufluP.S. Go rest03:13
racarr_duflu: Lol. I don't just mean...long lines though03:42
racarr_I mean like what if you could have two functions next to eachother03:42
dufluracarr_: Yeah OK. Like windows without windows03:42
racarr_yeah03:42
racarr_window management03:42
racarr_for source code03:42
racarr_lol03:42
* duflu 's head explodes03:42
dufluWhee, ssh works again on phablets. Life just got easier03:44
=== chihchun_afk is now known as chihchun
RAOFMan there's a *lot* of faffing involved in adding logging to our stuff.05:23
RAOFWhich would be why we have abysmal logging.05:23
dufluRAOF: I've counted 3 logging systems in Mir recently05:35
duflu:)05:35
RAOFOh, really?05:35
RAOFBut mostly contained to 3rd_party, right?05:36
* duflu checks05:36
RAOFWe've got the *_report thing for our own code. I can't think of a separate logging mechanism in pure-mir code.05:36
RAOFThe android code has some different logging.05:37
racarr_I agree on the report interfaces05:37
racarr_and I think thats05:37
racarr_err, not sure how to phrase it.. it's quite late05:37
racarr_but when we discussed lttng in malta05:37
racarr_I mean lttng isnt an alternative implementation of logging right05:37
racarr_and its not useful as such05:37
racarr_you want the probes in different sort of points05:37
racarr_rather than trying to use it as a low overhead printf05:37
racarr_so05:38
racarr_one of the main drives of using reporting interfaces is gone there.05:38
racarr_and then I think...well...if some logging really is REQUIRED05:38
racarr_perhaps it can be in a reporting interface and tested lol05:38
racarr_but I love logs05:38
racarr_I love logs05:38
racarr_so much05:38
racarr_I love logs of everything05:38
duflu(1) Android ALOGx() macros which call (2) mir::write_to_log() which is a stub; and (3) The cleaner logging in src/shared/logging used in reports05:39
racarr_so I would rather have lots of adhoc logging05:39
dufluI think everything should funnel back to (3)05:39
racarr_than tested reports :p05:39
dufluracarr_: I mean we should merge the underlying log function of them all05:39
duflu... er both.,05:39
RAOFI don't mind everything going through reports, but if that's what we want, then we need (a) lots more reports, (b) lots more functions in the reports, and (c) for the output of those reports to go somewhere by default.05:40
RAOFWe should, by default, log on the order of 500 lines for standard start up.05:40
dufluThe Report pattern is nice (yes I think so now) because you can do expensive reporting that's disabled by default05:40
racarr_duflu: That too :p05:40
dufluThat's different to always-on log messages05:41
racarr_that could be05:41
dufluBoth are good05:41
racarr_log domains...05:41
racarr_i.e. the cateogires could be prefined05:41
racarr_I think its more pain than its worth to have a method on a report interface for each kind of method05:42
racarr_I mean not only is it a pain but its often useful to log implementation details of classes05:42
dufluI like include/shared/mir/logging/logger.h more than the others, but it can all be improved05:42
racarr_which may not line up with some sort of generic report...05:42
racarr_lalala05:43
dufluI think "Logger" is a bad abstraction. It should be a "Log" interface to which you "write"05:43
duflu#define MIR_LOGGING_LOGGER_H_ http://www.youtube.com/watch?v=mL7n5mEmXJo05:45
RAOFTo the mailing list? :)05:47
dufluRAOF: Sure. Happy to see some unification. So long as we keep the nice timestamps and formatting of the src/shared logger05:47
RAOFOh, we'd totally do that.05:47
dufluWhich I recall I copied from Xorg to some extent05:48
dufluOr the kernel?05:48
dufluRAOF: Erm, actually just assign mir::write_to_log = &my_new_function_that_writes_to_Logger05:49
dufluAnd then they're unified :)05:50
RAOFI think both, actually.05:50
RAOFIIRC Xorg copied that logger from the kernel :)05:50
alf_alan_g: Hi! @fix-libmircommon, What was the problem with the MIR_COMMON_LIBRARIES approach?08:48
alan_galf_: try doing "nm  libmircommon.so" ;)08:49
alf_alan_g: That's quite unexpected... What's the rationale behind cmake not linking in the static libraries into the shared library?09:06
alan_gI don't know. If you *just* force them all to be linked then the android-input archive causes problem.09:08
alan_gHaving discovered that I decided there wasn't much point to the individual archives09:08
=== shuduo is now known as shuduo_afk
duflualan_g: The subordinate modules of mircommon should be "add_library(foo OBJECT ...)" so they don't produce archives and are guaranteed to be fully included in the final shared library09:44
dufluIt would be quite nice to not have those *.a lingering in the lib/ directory09:45
duflualan_g: I might do that this evening if you're not09:46
alan_gduflu: that's a cmake incantation I've no come across. Is there an example of how to use it?09:46
duflualan_g: It's newish: http://www.cmake.org/cmake/help/v2.8.12/cmake.html#command:add_library09:47
dufluDesigned for making bundles of objects to put into some other library later09:47
dufluAnd without needing fancy linker flags to force inclusion of all symbols09:47
alan_gYeah, that felt ugly09:48
dufluWell, it was right for the functionality we had before09:48
dufluBut CMake has improved on it09:48
groot_racarr_, I've installed 14.10 on desktop :). If you're available, can you tell me what packages should I install to compile mir ?10:40
alan_ggroot_: look in the doc directory for building_source_for_pc.md it has the incantations you need10:45
groot_alan_g, I'm building for android. So I checked build_source_for_android.md and installed the dependencies from root directory of mir.10:50
groot_how to build now? It says to pass config to cmake10:50
groot_in the doc10:50
alan_ggroot_: you're intending to cross compile?10:51
groot_alan_g, yes.10:51
alan_ggroot_: does "sudo apt-get download gcc:armhf" work?10:53
groot_alan_g, I think so. It outputs "Fetched 5,300 B in 1s (4,861 B/s) "10:54
alan_gSo you should be good to go with ./cross-compile-chroot.sh10:55
groot_alan_g, all right. I'll let you know what happens.10:56
dufluWhee... input lag of 3ms!11:05
dufluMore tweaking11:05
duflu(compared to the current 13)11:06
alan_gduflu: sounds worthwhile11:07
duflualan_g: Yes, it's the difference between meeting and missing the frame deadline11:08
=== chihchun is now known as chihchun_afk
alan_gduflu: FWIW add_library(... OBJECT helps simplify things. Good suggestion - thanks11:10
duflualan_g: Glad to help11:10
=== alan_g is now known as alan_g|lunch
greybackanpok_: running tests suites with qtomp+your mir patch, everything seems to be working great!12:34
greybackthank you for delving into that12:34
=== alan_g|lunch is now known as alan_g
tedgSo, looking for a good way to debug a Mir connection.13:16
tedgGetting the error from QtUbuntu that it can't create an application, but doesn't say why.13:17
tedgWhy can't I know why?13:17
kdubwe've been meaning to remove mir::Secrets for a while now...13:21
anpokbut people havent complained enough yet13:22
tedgThe Illuminati keep rejecting the MR?13:22
kdubtedg, but --session-mediator-report might help13:22
ogra_no more secrets !!!13:22
alan_gtedg: does --connector-report log (on server command line) help?13:22
kdubalso --msg-processor-report might help13:22
tedgWhich command lines are those? The unity8 one?13:22
alan_gOr  MIR_CLIENT_RPC_REPORT=log in the client environment13:23
kdubtedg, probably easiest to use an environment variable13:23
kdubright, like alan_g suggests :)13:23
tedgK, cool. I'll do that and see what I get. I can add the env var easily.13:23
alan_gA.k.a. MIR_SERVER_CONNECTOR_REPORT=log (in server environment) help?13:24
tedgHmm, adding MIR_CLIENT_RPC_REPORT didn't seem to print anything. Is it a stdout thing or should the log be somewhere?13:25
kdubthat should work on the client side, and it should go whereever stdout would go13:26
tedgHmm, okay. /me checks for typos13:27
=== pete-woods is now known as pete-woods|lunch
tedgGoing to grab an strace to see if there's information there.13:30
=== pete-woods|lunch is now known as pete-woods
anpokalf_, alan_g: could you have a look at https://code.launchpad.net/~andreas-pokorny/mir/fix-1346952/+merge/22799314:17
alan_ganpok: sure - after a cup of tea14:17
=== alan_g is now known as alan_g|tea
=== alan_g|tea is now known as alan_g
=== dandrader is now known as dandrader|afk
=== dandrader|afk is now known as dandrader
alan_gcamako: This should stop the test CI jobs installing mir-doc and a load of -dev package: https://code.launchpad.net/~alan-griffiths/mir/fix-1297100/+merge/228123 (I wonder how long that has been taking)16:17
* camako checks16:18
camakoalan_g, ack... So the CI team doesn't have to do anything...16:19
alan_gcamako: I just want some timestamps16:20
camakoalan_g, isn't this about installation, though? How does it affect build?16:20
camakoalan_g, https://bugs.launchpad.net/ubuntu-ci-services-itself/+bug/132220216:21
ubot5Launchpad bug 1322202 in Ubuntu CI Services "Jenkins logs need timestamps" [Undecided,New]16:21
camakoalan_g, feel free to put your thoughts in there16:21
anpokalf_, AlbertA: just updated..16:21
alan_gcamako: if you look at the test runner (e.g. http://s-jenkins.ubuntu-ci:8080/job/mir-mediumtests-runner-mako/) you'll see it installs the test packages using dpkg16:23
tedgSo it looks like what happening is that someone is setting up an epoll. And adding FDs to it.16:27
tedgWhen it gets to the FD that is the Mir socket, epollctrl fails with EBADF.16:27
tedgepoll_ctl16:27
alan_gtedg: how are you passing the FD to the process? (The actual FD not the fd number in the parent process)16:30
tedgalan_g, Via a dbus message16:30
alan_gtedg: can you check the FD is valid at the point of receiving that message?16:31
* alan_g tries to remember a suitable incantation...fails16:32
tedgalan_g, In theory, what's the best way to do that?16:32
alan_gracarr_: you once gave me an incantation to check a FD. ^16:32
alan_gtedg: try fcntl(fd, F_GETFD) - it shouldn't set errno if the FD's OK16:34
tedgK16:35
anpokalf_: bbiab, would be cool if I get your opinion before you eod16:38
racarr_I think it was fcntl F_GETFD yes.16:38
racarr_oh wow almost 10 already...16:39
groot_hello16:45
groot_racarr_, after many hours of downloading, compilation failed with some error.16:46
groot_can you take a look please http://paste.ubuntu.com/7848515/16:46
racarr_oh no16:46
racarr_groot_: Hehe lookslike kdub made a typo in his little hack for you16:47
racarr_if you do to that file src/platform/graphics/android/framebuffers.cpp16:47
racarr_around l74, find that function and just16:47
racarr_in the first line add16:47
racarr_(void) hwc_device;16:47
racarr_it should build16:47
racarr_its just a warning about an unused variable :)16:47
groot_racarr_: you mean in here, std::pair<geom::Size, double> determine_hwc11_size_and_rate(     std::shared_ptr<hwc_composer_device_1> const&    (void)       hwc_device)16:51
racarr_groot_: No leave the declaration alone16:51
racarr_groot_: I mean in the body of the funcftion16:51
racarr_after { :)16:51
racarr_and you need the ;16:52
groot_racarr_: the body has only return statement "return {{480,854}, 60.0f};"16:52
racarr_groot_: Yes so add a line before the return line16:53
racarr_(void) hwc_device;16:53
racarr_its just a no-op statement that lets the compiler know you are using the variable16:53
racarr_normally this function queries the size from the hwc device, but kdubs little workaround hardcoded the size for your device16:54
racarr_leaving the hwc_device variable unused, ala compile error because we have pedantic warnings16:54
racarr_:)16:54
groot_racarr_, ohh alright, trying again now :)16:55
racarr_:D16:55
tedgWell, on the plus side that didn't return an error. On the negative side, I still don't know why.16:55
alan_gtedg: At least you know the problem comes after that. ;)16:57
alan_gcan you print the FD at that point and the connection string you're passing to Mir?16:57
kdubgroot_, you could also bzr pull from the branch, corrected the problem yesterday16:57
tedgYeah, I am doing that. It's 8, and fd://816:58
tedgWonder if it's getting a close on exec set.16:59
groot_kdub, I'm no good with c++ :P17:00
alan_gtedg: presumably the exec happens before the dbuss call?17:01
tedgalan_g, Well, there's a chain of execs :-) But there is one between the dbus call and the exec to the process that is connecting to Mir.17:01
alan_gtedg: so the intention is for the process that connects to Mir to inherit the FD from its parent?17:03
tedgCorrect17:03
tedgHmm, that did a bunch more.17:03
tedgWoot! I think that was definitely a step in the right direction.17:04
alan_gOK I understood your original response to mean that it got if from dbus17:04
alan_g*it17:04
tedgalan_g, I have a "mir-connection-demangler" that gets it from dbus, and then it calls the app that is the prompt-handler.17:04
alan_gSo can you check the FD at the top of main()?17:05
tedgYeah, so it seems that it was set to close on exec. Seems gdbus did that for me.17:06
* alan_g goes while there's some little success happening17:07
=== alan_g is now known as alan_g|EOD
tedgHeh17:07
tedgThanks for your help alan_g|EOD17:09
alan_g|EOD;)17:09
groot_racarr_, yay build completed :D. Now I should connect my phone and when it gets stuck at boot, I run deploy-and-test.sh ?17:10
racarr_Err did you end up building on desktop17:12
racarr_or phone? I thought you were bnuilding on phone17:12
groot_nope, installed 14.10 on desktop today :)17:12
racarr_ah17:12
racarr_sounds right then!17:12
racarr_you may ened to17:12
racarr_after it gets stuck17:13
racarr_adb shell17:13
racarr_in and run17:13
racarr_"stop lightdm"17:13
racarr_oh I guess it crashed already and thats your problem17:13
racarr_so probably not :p17:13
racarr_once you've done that (will be interesting to see if tests run)17:13
racarr_the next thing is to copy build-android-arm/bin/mir_demo_server_shell over to the device17:13
racarr_and see if we can run that17:13
groot_racarr_, I see that deploy-and-test.sh has lines to push all the binaries to the phone. So just running it will do the all the work ?17:15
racarr_Yep17:23
racarr_oh I newver realized it copies the demo servers too :)17:23
racarr_brb lunch17:31
groot_racarr_, you still here ?17:39
groot_kdub: I ran the tests, some of them failed. Can you please take a look http://paste.ubuntu.com/7848753/17:42
kdubokay, the unit tests passed17:43
dandrader_kdub, AlbertA can we get this one top-approved?17:45
dandrader_https://code.launchpad.net/~andreas-pokorny/mir/fix-1346952/+merge/227993 ^17:45
dandrader_it's has already 2 approvals :)17:45
kdubits okay by me17:46
dandrader_kdub, then can you do it? what's the process?17:47
kduboh sure17:47
dandrader_kdub, thanks!17:48
kdubyou just top approve it, and jenkins picks it up, rejects it, top approve again, and then its in17:48
kdub;)17:48
greybackcan someone also look at https://code.launchpad.net/~andreas-pokorny/mir/fix-1346952-0.5/+merge/22809817:48
greybackit's just the backport of that patch17:49
* kdub doesn't know the rules around the backport process17:51
dandrader_greyback, just backport the approvals :)17:51
=== dandrader_ is now known as dandrader
=== dandrader is now known as dandrader|afk
groot_kdub, so what to do now ? Also, some of the test failed, is that ok ?17:59
groot_specially the test that reported my display size is 180, 101010118:01
kdubgroot_, just stub test values18:02
kdubgroot_, does the mir_demo_standalone_render_to_fb work?18:02
racarr_back18:06
groot_kdub, I rebooted the device. I'll try and let you know.18:06
groot_kdub, mir_demo_standalone_render_to_fb failed with "Segmentation fault (core dumped)"18:13
racarr_backtrace?18:16
groot_racarr_, here http://paste.ubuntu.com/7848940/18:17
kdubso, the driver is looking malformed or something18:19
kdubis it being pulled through hybris?18:19
groot_kdub, how can I test ?18:21
kdubyou can try the tests from hybris18:21
* kdub forgets the package name18:22
groot_kdub, tell me when you remember :)18:24
=== dandrader|afk is now known as dandrader
josharensonlet me see oy18:41
=== renato is now known as Guest26054

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