Friday, 2018-06-22

MeowDudeCBmal: dmesg | logcat -b | journalctl | systemctl --no-pager | various status
MeowDudeCBthose logs are for everyone to see as well00:06
MeowDudeCBUnable to hop onto D-Bus: Name already in use00:26
MeowDudeCBofono hack is using dbus so now ofono is being a jerk00:26
*** ubuntu is now known as Guest4249601:59
*** Guest42496 is now known as zhxt02:05
lazyguymcyay finally set up kubuntu02:07
lazyguymc Does everything look good so dar?02:28
*** Nokius_ is now known as Nokius03:28
namka - error 503.07:52
T4<adampigg> something is wrong with zypper/ssu/ssl on my jtab. i get ssl handshake failed for all repos. any idea what has gone wrong?08:05
T4<adampigg> ref fails/ for all08:14
T4<adampigg> ssl handshake failed08:15
malnamka: is there even supposed to be anything in that page?08:16
T4<adampigg> gonna have to try openssl debugging08:16
T4<adampigg> apart from openssl isnt installed08:16
MeowDudelol funny because you can't install openssl because ssl is broken08:31
T4<adampigg> or not funny.....this seems bad .... any way to pass options to curl to ignore ssl errors?08:32
MeowDudemanually move the package to your device and use pkcon install-local08:34
MeowDudeif you can find an openssl package from another device08:34
MeowDudeor manually build it in your env08:35
T4<adampigg> weird how curl works with the repo path with no /errors08:36
demonaxshI have a problem. droid-init-hal starts but then crashes with this log ( Apparently the problem is in healted, he dies with the code SIGABRT. But I can not find its dump in any way, in /etc/security/limits.conf I made the necessary changes. And is there an open source source for droid-hal-init?09:08
r0kk3rzi dont think healthd is useful to us so you can just stop it09:11
demonaxshOk, but I also saw that zygote was trying to start, can it disable, too?09:17
maldemonaxsh: what device and android base?09:22
demonaxshThis is a little-known chinese device, with bar code scanners. Powered by mt6735, aosp android 6.009:23
MeowDudedemonaxsh, what base are you on?09:29
MeowDudealso beidl: hit me up bruv, I fixed Dbus errors by defining export DBUS_SYSTEM_BUS_ADDRESS=/run/dbus in init.tuna.rc, but now I am getting RILD: connection refused errors in ofono09:30
demonaxshhybris-13.0 for bionics and hybris-sony-aosp-6.0 for everything else09:31
NotKitdemonaxsh, maybe you can try to disable droid-hal-init and start init manually with gdb09:31
NotKitdemonaxsh, did you port patches on top of MediaTek aosp tree?09:31
NotKitusing hybris-sony-aosp-6.0 verbatim is probably not very nice icea09:32
demonaxshI have an aops tree from the creator of this device09:32
MeowDudedemnaxsh: pastebin the entire output of "cat /init.project.rc" and "cat /init.mt6735.rc"09:33
demonaxshyes bad, I understand, but I have aosp, not cm09:33
MeowDudealso link em to your entire local manifest09:33
MeowDudewait what?09:33
MeowDudeno hybris 13 requires cm13 or los1309:33
MeowDudedoes it hav AOSP 5.0.1?09:33
NotKitdemonaxsh, I mean, your best bet is to cherry-pick Sailfish changes from hybris and apply them on your tree09:33
NotKitthat's how I did for Gemini09:33
MeowDudedude just make Cyanogenmod 13 for it09:34
MeowDudeit'll take like a day tops09:34
NotKitMeowDude, you have no idea what are you talking about with MediaTek :)09:34
NotKitthe most important ones are bionic, frameworks_native, frameworks_base and system_core09:34
MeowDudehe is trying to use an AOSP base with hybris 1309:34
MeowDudethat is what I have grasped, and his init files are using commands that the system doesn't know what to do with09:35
NotKitI know, but it's possible to cherry-pick hybris 13 changes and port them onto his AOSP tree from device creator09:35
MeowDudebut doesn't it still rely on the cm specific HAL drivers?09:36
MeowDudehybris 13 was made for cm13...09:36
T4<adampigg> mal, one of my users updated from common: anf got a new sensorfw package, which broke all sensors09:36
MeowDudeit just seems like it'd be easier to make a cm13 image and just start fresh in charted waters09:36
T4<adampigg> i havnt tried yet09:36
demonaxshI used hybris-13 only for bionics, because on other branches there was a build problem.09:37
NotKitdemonaxsh, did you use repo verbatim or merged with bionic from your AOSP tree?09:37
NotKitI would suggest the latter, as in
MeowDudewait you can make sailfish OS off of a 4.4.2 AOSP image???09:39
mal@adampigg you need to update the hybris sensor package in your adaptation repo09:40
T4<adampigg> k09:40
NotKitMeowDude, if you have buildable AOSP sources for device and know what are you doing, in theory yes09:42
mal@adampigg that will also fix compass, assuming your device has one09:42
MeowDudehmm neat.09:43
demonaxshI did not merge my native bionic with the hibris, I realize that this can cause problems, maybe this is exactly what. I did not know that there are changes in bionics for mediatek.09:44
NotKitlots of misc changes, which may or may not cause your binaries to be incompatible:
maldemonaxsh: better just cherry pick the hybris changes, there are only few patches09:45
NotKityes, what mal suggested. To make it easier, I first cloned the repo of corresponding AOSP tag, imported MediaTek changes from exiting tree, then git am *.patches, so git could do 3-way merge when possible09:46
demonaxshThat is, they are required as usual patches for: /system/core, /frameworks/native, /frameworks/av, /bionic ?09:51
maland build has some patch also09:53
demonaxshOf course, I would like to simply connect to gdb, but I have problems with telnet so that only logs remain that are not always informative.09:57
NotKitis the kernel arm32 or aarch64?09:58
NotKitI guess getting telnet or ssh is pretty important then for debugging, since you likely won't boot to UI easily on this SoC09:59
demonaxshYes, but I hope to get at least to wifi. + echo '########################## usb_info: Mer Debug telnet on port 2323 on rndis0 - also running udhcpd'. It seems to be all right, but it does not come out yet. True, I do not currently have a pure Linux host, only a virtual machine and mac.10:04
NotKitis USB network adapter detected on host at all?10:07
demonaxshThe driver is installed, but mac does not see even the recovery pure sailfish device)) With Windows opposite everything is fine, but it does not see Mer ( - not resolved). Need pure linux host, i think.10:12
MeowDudeCBlockscreen is back despite modem being broken10:31
r0kk3rzyou really dont understand that link do you :P10:32
MeowDudeCBwhat link, mine?10:32
MeowDudeCBph wait no modem isn't broken10:32
MeowDudeCBofono is10:32
MeowDudeCBalso r0kk3rz: that /sys/bus/devices/usb1/power/control file is always on auto, and attempts at manually writing the value do nothing. I used beidl's ofono hack to force modem online and the ofono-hack.service is running after I fixed dbus in init.10:37
MeowDudeCBI am getting grilio: RILD connection refused errors10:37
MeowDudeCBbut it's listening in on the right socket, and the socket is being spawned10:37
MeowDudeCBI am going to run chown 777 /dev/socket/rild in init and see what happens10:39
r0kk3rzone of these days, you might actually know what you're talking about10:40
MeowDudeCBr0kk3rz: [grilio] ERROR! Can't connect to RILD: Connection refused -- wut do?10:43
r0kk3rzthis was the problem that monich was trying to explain to you :P10:45
malMeowDudeCB: for future reference use /usr/libexec/droid-hybris/system/bin/logcat, not /system/bin/logcat10:47
MeowDudeCBwait that was what you guys meant with the logcat?10:47
MeowDudeCBwell fug10:47
malit does the same thing but you don't need to some hack you did if you use the correct logcat10:48
malMeowDudeCB: it's normal that there can be one RILD: Connection refused before rild is ready, in your log you see after that ofonod[512]: RIL version 6 which means it was connected10:50
MeowDudeCBhere is the new logcat:
MeowDudeCBmal: so what do I do from here? I don't know what is broken, ofono,or rild, or the modem, or what.10:51
MeowDudeCBloadOpnameFile: Can't open the Opname file: reason No such file or directory.10:53
MeowDudeCBcould this be it?10:53
MeowDudeCBwhat is the Opname file? why can't it just tell me "attempted to access "$path_to_OpName_file", no such file or directory, why does it hae to be so darned cryptic?10:54
malMeowDudeCB: have you tried any of the options in ril_subscription.conf10:55
MeowDudeCBI read through it and they all seem really kosher10:56
MeowDudeCBsoket is correct, i figured that's all that mattered10:56
MeowDudeCBit doesn't seem to be connected to the socket anyway : (10:56
malI mean there are some options that could be attempted, workarounds for some issues10:56
MeowDudeCBlike what OwO10:57
malMeowDudeCB: read what I said "ofonod[512]: RIL version 6" means it was connected at some point10:57
MeowDudeCBthats always the last line of each ofono log10:57
malsub, emptyPinQuery or legacyImeiQuery for example11:01
MeowDudeCBwhat is that? also what values can I set for those? just false and true I assume?11:02
MeowDudeCBdefintaley gonna do "legacy" everything11:02
maldon't just add all at once, try one at the time and see if there are any changes in logcat11:05
monichMeowDudeCB: emptyPinQuery is qualcomm specific, legacyImeiQuery I would turn that on for old ril11:05
MeowDudeCBI set emptyPinQuery to false and legacyImeiQuery to true11:07
MeowDudeCBsystem/csc/sales_code.dat is missing11:12
MeowDudeCBalso logcat -b radio is unchanged11:12
MeowDudeCB - journalctl -u ofono11:14
MeowDudeCBI don't get it, rild is healthy as far as I know, but I compare this to the journalctl -u ofono from my Nexus 5 and it just.. stops11:15
MeowDudeCBofono stops at RIL1 Version 6 and doesn't move on I don't get it11:15
maldid you try only adding those config options one at a time11:16
MeowDudeCBI did, and they made no change11:16
MeowDudeCBwhat about sub? what does that do?11:17
malread the description11:17
MeowDudeCBokay basically old rild's say "hey send me some data before I talk to you", but even with sub2 it won't... talk to me11:20
T4<abhishek_0> sledges was last seen a week ago ..11:23
MeowDudeCBstill nothing11:26
MeowDudeCBthis is no longer fun but I really want to run Sailfish OS on my galaxy nexus so i guess I have to do this.11:27
NotKitGalaxy Nexus?11:27
MeowDudeCBhey wait11:28
MeowDudeCBdoesn't droid 4 have the same processor?11:28
MeowDudeCBOMAP 4460?11:28
NotKitI did a build for @Sam once based on same hacks as for Droid 4, but RIL didn't work as well11:28
MeowDudeCBtell me these hacks11:28
NotKitwhat works for you now?11:28
MeowDudeCBwell that isn't true11:28
MeowDudeCBI honestly don't know what's broken11:28
NotKitwell, you have graphics?11:29
MeowDudeCBofono is running but just stops at RIL1 Version 611:29
MeowDudeCBoh yeah wifi, audio, UI, it's basically an iPod11:29
MeowDudeCBjust no radio11:29
MeowDudeCBI've fixed WiFi and audio and I'm working on bluetooth here and there11:29
NotKitfeels like it was same then11:29
MeowDudeCBI just REALLY need that modem/ofono working... you know, since it's a phone. I loev my Nexus 5 and all but I miss my galaxy nexus. so what hacks have you got???11:30
NotKitI mean I didn't get ofono working either, but didn't look much into it since I don't have the device11:30
MeowDudeCBwhat did you do to get the droid 4 up and running ril/ofono wise?11:31
MeowDudeCBwe are using the same base too11:31
malMeowDudeCB: did you ever have working ril on that?11:31
MeowDudeCBgalaxy nexus?11:32
MeowDudeCBdroid 4 and Gnexus have same GPU as well...11:32
malwhat ever device you use11:32
NotKitkernel and RIL implementations are different, on Droid 4 ofono didn't need any quirks except increasing start timeout11:32
MeowDudeCByeah ril is up and working thanks to those udev fixes you and krnlyng gave me.11:32
MeowDudeCB>increasing start time out -- should I try this11:33
MeowDudeCBnah that did nothing11:39
MeowDudeCB*sigh* I'll rebuild an image with my latest changes and release it tommorow night. I am getting burnt out on this, i don't even know what is wrong or how to go about it anymore. I need a break badly.11:40
MeowDudeCB[mce] ERROR! Failed to attach to system bus: Exhausted all available authentication mechanisms (tri...ONYMOUS)11:46
MeowDudeCBI manually defined it in inti using every variable it tried. this might just work11:49
MeowDudeCBsee this is what bugs me11:53
MeowDudeCBwhen I run journalctl -u ofono on my Nexus 5, it goes from stating the RIL version to "SIM OKAY", but on Galaxy Nexus, it just sits at the RIL version. it connects... then does nothing.11:53
MeowDudeCBmonich: any idea what other logs I could get to figure this out?12:21
MeowDudeCBI'm telling you guys, this is THE error; E/use-Rlog/RLOG-RIL(s)(  546): /data/misc/radio/kmem fopen error. No such file or directory.12:25
MeowDudeCBits so odd, rild is running but it just, stops. like it won't go on I don't get it!12:28
MeowDudeCBmonich: does this look right? it just stops here and won't move on at all12:42
MeowDudeCBis there any deeper debug level?12:42
malMeowDudeCB: yesterday you gave me just the cyanogenmod kernel config, not the ones you use12:47
MeowDudemal: yeah, I haven't changed them -- oh you mean the defconfig, yeah I can grab you that gimme a sec, I dumped them all on beidl the other day12:49
MeowDudemal: here are ALL my changes in one list:
MeowDude(hybris changes at the bottom12:52
MeowDude_sven how experienced are you at rild and modem debugging my friend?12:58
T4<abhishek_0> MeowDude porting sailfish for galaxy nexus ?13:15
MeowDudeit seems that rild is just being... difficult13:15
T4<abhishek_0> which version ?13:16
MeowDudeSailfish OS, CM11 base13:16
MeowDudeGUI, Wifi, fully working audio, just want modems working13:16
T4<abhishek_0> why dont you try los 13 base .. it is available for your device . right?13:16
MeowDudeyes but anything past cm11 gives gpu driver errors13:17
MeowDudeand frankly, the rild errors aren't base specific13:17
MeowDudebecause I got them on cm12.1 as well13:17
MeowDudedissapointing, Sailfish OS 2.2 on this phone beats anything andorid could ever give13:17
mal@adampigg you need to add something like this to fix some sensors I think
T4<adampigg> Mal, ta14:05
mal@adampigg or better example
malwith some more options14:07
T4<adampigg> Does the dev choose his fav radio station? ;)14:07
mal@adampigg I chose one for my configs, although I didn't yet push the latest version of my configs14:11
mal@adampigg I didn't connnect that config to missing sensors right away because I have had that config for so long time already14:12
malmore than a year, I made my version based on the file on some official device, one of those undocumented things14:13
malI sometimes do though all of the configs of official devices to see there are useful things14:14
T4<adampigg> So, this is now required? Hadk/faq update?14:27
malfaq has it already14:27
malline 86014:27
T4<adampigg> Which, pad or wiki? We should have 1 ideally14:28
malI think wiki is already falling behing14:28
malthis was caused by the update I made to fix compass, it would have been probably in next release anyway14:29
T4<adampigg> K14:32
T4<adampigg> Any other secret files we need???14:33
malnt sure if many porters have configured support for usb audio cards14:34
T4<adampigg> is there much demand for that?14:46
malprobably not14:46
malsomeone asked it for fp2 so I added it14:46
malquite simple thing to do14:46
malPSA: everyone updating from devel or testing OBS target update sensorfw-qt5-hybris and adapt this to for your device
r0kk3rzi thought that was just for csd tests15:02
malr0kk3rz: it used to be15:04
r0kk3rzi see, mebbe thats why my sensors also do not work :D15:04
malr0kk3rz: probably15:06
malr0kk3rz: did those break very recently?15:07
r0kk3rzafter i installed latest sensorfw stuff15:07
malthen that config will fix it15:08
kolobo4ekLocation '' is temporarily unaccessible.15:39
kolobo4ek(kolobo4ek) Location '' is temporarily unaccessible.15:40
kolobo4ekThat errors I'm getting from yesterday.15:49
T4<abhishek_0> anbox works!! yay15:50
T4<adampigg> Need to get into anbox...mal,.you accepted my 3.18+ patch yet?15:54
T4<abhishek_0> its too much sluggish ... and crashes often15:58
T4<abhishek_0> i had to downgrade my kernel, apply some crazy patches .. revert some patches15:59
r0kk3rzno shit15:59
T4<abhishek_0> it was a pretty good experiment15:59
T4<adampigg> The patches have been in my kernel for some time already in prep16:00
T4<abhishek_0> i have decided not to keep kernel downgraded kernel..16:05
mal@adampigg I forgot again, I'll try to add those today16:05
mal@adampigg I have been trying to get upstream anbox working on sailfish, no graphics yet with that16:06
T4<abhishek_0> @adampigg [The patches have been in my kernel for some ti …], can i see those ?16:08
T4<abhishek_0> okay mal i got anbox working the 3.10.10816:49
T4<abhishek_0> not working.. but systemctl status shows it is up16:49
T4<abhishek_0> let me grab some logs16:50
T4<abhishek_0> mal
malwhat exactly is the problem?17:04
T4<abhishek_0> i cannot launch anbox for second time,17:08
maloh, that's a known issue17:08
malyou just can't close the window17:08
T4<abhishek_0> okay .. so what is launched ... is launched until the next reboot17:12
malif you restart container it will work again17:14
T4<abhishek_0> yeah .. just checked ..17:16
T4<abhishek_0> for now i will just create a script to do all that for me17:24
demonaxshCan anyone tell me how I can get commits only for hybris? These commits are somehow labeled? Tag hybris or something like that?17:51
maldemonaxsh: in newer android bases those are tagged with (hybris), older ones didn't have that, you can compare those commit of old and new bases to see what the correct ones are17:53
AndroUser2_I'm going to building the droid-hal-device packages. And received messages "Location '' is temporarily unaccessible. Location '' is temporarily unaccessible."17:56
demonaxshgit tag return many results, but among them there is not a single hybris17:58
maldemonaxsh: not tagged like that, I meant a "tag" at the beginning of the commit message18:00
vknecht@abhishek_0: congrats :-)18:01
malAndroUser2_: there seems to be some issue with those18:02
r0kk3rzi wonder what is reading that ini file, adding it certainly fixed the sensors :)18:24
malor more accurately
r0kk3rzah i see, yeah that makes sense18:30
vknechtI guess managing dualsim variant of a device will require handling this file too, now ?18:35
vknechtor it simplifies, so that one just uses multisim packages, and this csd config check if multisim settings are to be shown ?18:37
malmaybe, not sure what the plan is18:38
duncan^I'm having a little bit of trouble understanding how to implement fixup-mountpoints correctly.18:59
duncan^My device doesn't create, as an example, /dev/block/platform/.../by-name/p1.19:00
duncan^Instead, I only have instances of by-num.19:00
duncan^I see in the fixup-mountpoints file, there are existing examples without that. Nonetheless, I'm not having success.19:00
duncan^Serial output:
malmore information needed, do you use latest droid-config submodule, what paths do you have (ls -lR /dev/block) and what do you expect19:02
malwhere did you get that output?19:03
duncan^It's the UART debug console19:04
duncan^These are the paths I found:
malso you can't use telnet which is the normal debug method?19:05
duncan^Yep, using pretty much the latest - 3539238f113d00b77d67db587c146fb4c385431619:06
duncan^Well, the device actually reboots after this output19:06
duncan^As far as I can see, the device is unable to mount Android /system. There's information about the SD card (what I'm booting from) only after this19:10
malare the mount services ok, the fixup should fix the paths in those, the services are in /lib/systemd/system/19:13
duncan^You mean in the initramfs, right?19:17
malin sailfish rootfs19:18
malthe fixup is what you pasted before19:18
duncan^E.g. in system.mount it's just /dev/block/by-name/system, which doesn't exist in the stock Android build19:22
duncan^What I don't understand, I guess, is whether fixup-mountpoints corrects the mountpoints at build-time, or whether it corrects them at runtime19:24
malso your fixup didn't work19:32
malbuild time19:32
malwhen you are building hybris-hal i.e. the android side stuff19:33
duncan^When I built hybris-hal, it told me /boot appears to live on /dev/block/by-name/boot. Would it be worth just trying fixups like that?19:35
malit should show that is the fstab file it found19:35
malso that's where you need to look for what you need19:35
vknechthmm, I've created a local kernel branch, wiped out/, made hybris-hal -j1, built packages -d, osc'ed droid-hal-$DEVICE*rpm in OBS devel, then get broken build for no obvious reason (to me) :19:44
vknechtis a tag bump/update really needed on kernel repo too ?19:47
vknechthere's the change to kernel I made :
r0kk3rzvknecht: whats your actual problem?19:49
vknechtwell, OBS marks droid-hal-idol3 as broken, but I don't see real error in build log I linked19:49
r0kk3rzvknecht: you need a spec file19:51
r0kk3rzlike this
vknechtosc ar19:55
vknechtD    droid-hal-idol3.spec19:55
* vknecht missed that19:55
vknechtit means when have to re-upload it each time ? or that I shouldn't have done just "osc ar" after deleting old droid-hal-$DEVICE*rpm and adding new ones from local repo ?19:57
r0kk3rzyou dont, but you also shouldnt delete the local one either19:59
vknechtwhen I delete, I mean all this is in OBS checkout directory, not in $ANDROID_ROOT/droid-local-repo/$DEVICE/20:01
sven_MeowDude: beginner, why do you ask for rild/modem debugging?20:02
r0kk3rzvknecht: yeah of course20:02
vknechtI've re-added the spec file on your example, adapting just the Source0 line and it seems fine for now20:07
r0kk3rzyeah theres not much to it20:08
vknechtI just don't get why it got removed ; but I reckon I didn't think about the spec before uploading new rpms, will have to pay more attention next time20:09
r0kk3rzits like git, if you push your local copy you push everything20:11
piggzmal: failing to download file to the watch doesnt seem to have any negative impacts so far20:13
piggzmal: dr_gogeta86: oh shit, it worked!20:25
piggzjust downloaded a watchface, and it works20:25
vknechtok, I made "rm droid-hal-idol3*" thinking only of rpms, not about the spec file20:26
vknechtthanks r0kk3rz20:27
malpiggz: wow20:28
piggzmal: now sporting a star trek watchface ;)20:28
piggznow to make a nice gui around it20:29
vknechtso what's the most promising choice for a sfos-[future]-compatible watch ?20:30
piggzamazfit bip ;)20:31
steamportWhy isn't ubu-chroot recognized as a command in the platform sdk shell20:39
r0kk3rzinstall android-tools20:41
malsteamport: run sudo ssu ar mer-tools20:41
maland then install android-tools20:41
steamportAlso, when i'm done, is it ok to distribute builds on XDA20:48
steamportAlso, is hybris-11.0 still supported20:49
steamportSince cm-11 is the only version for my device with support for like, bluetooth and LTWE20:49
r0kk3rzit should work20:58
duncan^Will I need to rebuild the SFOS rootfs packages after rebuidling hybris-hal?21:31
duncan^Given I only changed the fixup-mountpoints, one would wonder if it's strictly necessary in this case21:32
steamportr0kk3rz: my device is amazon-thor21:33
steamportoh hi duncan^ didn't expect to see you here21:33
malduncan^: how else would the packages end up on your device, obviously you could manually copy the content of those but wouldn't it be easier to just build, you don't have to rebuild all packages though21:57
duncan^mal: Well, I was wondering if it would be sufficient to just add hybris-boot.img and hybris-recovery.img to my boot partition, and leave the old rootfs on my userdata partition, if the corrections to the mountpoints only affected the initramfs.21:59
malduncan^: no that's not enough, the systemd services are also modified and thos are in the droid-hal rpms22:00
malthose systemd services of course are in the rootfs22:00
duncan^OK, thanks.22:00
malpiggz_: nice22:01
malpiggz_: that device seems so much more friendly than my device22:01
piggz_mal: this is how friendly it is (nt)
steamportI made a regex which can turn the output "ls -la /dev/block/platform/msm_sdcc.1/by-name/ " output into  a fixup-mountpoints thing22:24
MeowDudesven_: because ofono is having trouble properly connecting to the modem23:26
steamportmake: *** No rule to make target `/home/cat/hadk/out/target/product/thor/dt.img', needed by `/home/cat/hadk/out/target/product/thor/obj/ROOT/hybris-recovery_intermediates/hybris-recovery.img'.23:34
steamportWHAT DO YOU MEAN23:34
steamportI HAVE device_qcom_common, WHICH HAS dtbtoolCM23:34
steamporti need to add dtbtoolCM to product_packages23:45
steamportthat didn't work?123:46

Generated by 2.17.1 by Marius Gedminas - find it at!