#qi-hardware IRC log for Tuesday, 2013-01-29

viricI don't have a big success rate in bios updates00:14
wpwraki try to ignore them. not having to figure out what to do with bios_updater_win_xp.zip is much better for my blood pressure ;-)00:19
whitequarkwell, this one is pretty good00:23
whitequarkfirst, it *actually* can read the flash from a 32GB USB flash drive formatted to vfat00:23
whitequarkand it doesn't require any windows bullshit00:23
whitequarkas you can see it also can successfully flash the chip, which is also an achievement00:24
wpwrakwow. didn't know it was christmas again ;-)00:25
whitequarkwpwrak: christmas?00:25
wpwrakwhen you get gifts :)00:26
whitequarkheh00:26
whitequarkit also has a nasty habit of making first power-up after flashing last for half a second00:26
whitequarkafter which the machine simply goes black00:26
whitequarkI hope the engineer who designed that will wake up monthly to see a serial killer place his knife next to his neck and then silently flee00:27
whitequarkaaaand no, of course these morons did not actually fix any of the actual BIOS bugs.00:28
whitequark*sigh00:28
whitequarkagain.00:28
whitequarksign00:28
qi-bot[commit] Werner Almesberger: libubb/mmcclk.c (mmcclk_first): add flags to relax clock selection constraints (master) http://qi-hw.com/p/ben-blinkenlights/591bb6400:28
qi-bot[commit] Werner Almesberger: ubb-patgen/ubb-patgen.c (frequencies): adapt use of mmcclk for API change (master) http://qi-hw.com/p/ben-blinkenlights/66a487b00:28
qi-bot[commit] Werner Almesberger: ubb-la/ubb-la.c (frequency): adapt use of mmcclk for API change (master) http://qi-hw.com/p/ben-blinkenlights/85bda4c00:28
qi-bot[commit] Werner Almesberger: ubb-la/ubb-la.c: new option -F freq_MHz to select "unsafe" frequencies (master) http://qi-hw.com/p/ben-blinkenlights/f862a8200:28
qi-bot[commit] Werner Almesberger: ubb-patgen/ubb-patgen.c: new option -F freq_Hz to select "unsafe" frequencies (master) http://qi-hw.com/p/ben-blinkenlights/04b235c00:28
qi-bot[commit] Werner Almesberger: ubb-patgen/ubb-patgen.c: new option -I inter_s to select "unsafe" frequencies (master) http://qi-hw.com/p/ben-blinkenlights/128590b00:28
wpwraki take the christmas back :) but it's nice to see my "don't worry about BIOS updates" policy validated00:29
whitequarkwell, they did add windows 8 support00:30
wpwraktiles, here we come ! ;-)00:30
Action: whitequark was going to add something sarcastic, but just "windows 8" is enough00:31
whitequarkin unrelated news, my language slowly turns into something like C++, but without all the insane "oh we accidentally turing-completed templates"00:32
whitequarkthe turing-completeness in my system is very much intended.00:32
wpwrakwell, tiles date back to the bronze age. so that sounds about right for windows :)00:32
wpwraktemplates, the ultimate achievement in obfuscation00:33
whitequarkwpwrak: if you want a compile-time loop, you just write a fucking loop. that's how I do it :)00:35
whitequarkor, if you for some weird reason want to parse some pngs at compile-time, then convert it to 2-bit grayscale and store as constants--why not.00:35
wpwrakyeah, never underestimate the combined power of make and #include00:36
whitequarkor compute a trigonometric function table taking into account endianness or word width of your target00:36
whitequarkor...00:36
whitequarkwpwrak: you can't do the latter without some really heavyweight magic.00:37
whitequarkand then you have a target which has non-IEEE-compliant floats, and you need to generate something for them00:37
whitequarkand then you begin to despise your desire to stay with make and #include ;)00:38
wpwrakhuh ? static crazy_type[] = { CONST1, CONST2, CONST3, ... };00:38
wpwrakleave it to the (cross-)compiler to figure out the machine representation00:38
wpwrakand of course, that array is generated at make time00:39
whitequarkwpwrak: obviously. now, make a sin() table.00:39
whitequarkin a portable way of course, because that's a library.00:39
wpwraksin.inc:\n\tperl -e make_sin_table.pl >sin.inc00:40
whitequarknot portable, because see above: you have a target with weird floats.00:40
wpwrakso ? sin.inc has them in ASCII00:41
whitequarkand from what I know, ARM floats and x86 floats do behave differently.00:41
wpwrakthe ASCII to weird conversion happens in the cross-compiler00:41
wpwrakthe one that #includes sin.inc00:41
wpwrakyou're just bloating the language instead of using the potential of the tools already available to you. of course, that's the C++ way ;-)00:42
whitequarkyou also cannot precisely represent floats in decimal notation, you know, right? :)00:42
whitequarkthis is why e.g. LLVM assembly has float literals in hex.00:43
wpwrakwell, i can make a worst-case estimate of epsilon and just pump out enough digits00:43
whitequarkoh, I don't bloat anything, nor I require the programmer to use third-party tools for the stuff the compiler *already knows*00:43
whitequarkit is aware of all target semantics, and of the precise configuration this code is being compiled with00:43
whitequarkperl is not00:44
wpwrakperl doesn't need to since you can intelligently divide the task :)00:44
whitequarkmeh00:47
whitequarkoh nice, that bios update actually broke the battery meter00:57
wpwrakhmm, anti-christmas ?00:58
whitequarkthrough I'm not sure how exactly because ACPI reports correct values. but my status widget displays inf%00:58
whitequarki guess i got coal :)00:58
wpwrakbetter be careful what you wish for ... things like uncommanded overheating do exist00:59
whitequarkit's called "oh this website has flash"00:59
wpwrakinteresting. "uncommanded" isn't in the dictionary. such a useful word.01:00
wpwrakyeah, that's a good predicator01:00
whitequarkthe damn thing goes 100% on one of my cpu cores each time I wake the machine up01:00
whitequarksomething with alsa I guess01:00
wpwrakthat confirmation came quickly ;-)01:01
whitequarkwell it isn't quite bios-related. but still annoying.01:01
wpwrakgoing from christmas to christmas cancelled to anti-christmas to antichrist-mas :)01:01
whitequarkI only use it because russian facebook clone vk.com is easily the world's biggest archive of pirated mp3s01:02
whitequarkwhich is, well, not very nice, I admit, but nothing else I know has an interface when you type the band name, hit "play" and forget about it.01:02
whitequarkit'll just go on for hours. only needs manual intervention when someone hijacks the name with a dubstep remix.01:03
whitequarkbtw, did you know how C++ handles exceptions?01:07
whitequarkit strcmp()s the class name and names of all its parents with all the classes in catch clauses01:07
whitequarkand does it twice on the entire callstack01:07
whitequarkand to walk the callstack, it uses DWARF debug info01:07
whitequarkas in my runtime the caller is responsible for allocating stack space for the result, I think I'll just use the 'regular' return value for 'stack unwinding'01:11
whitequarki.e. basically translate error handling with stack unwinding to error handling with error codes.01:11
whitequarkcombine the best! :)01:12
whitequarkall the things you can do when you get to design your own ABI.01:18
wpwrak(C++ exceptions) nice. if Morgan Spurlock was a hacker, "Super Size Me" would have been about C++01:33
wpwrakbtw, if you want to listen to music for a long time, you may find this interesting; http://musicmachinery.com/2012/11/12/the-infinite-jukebox/01:44
wpwrakworks on linux with a reasonably recent chromium and chromium-codecs-ffmpeg-extra01:44
whitequarkwpwrak: (music) thanks, I do!10:54
whitequarkhmm, this is a very interesting experiment11:00
whitequarkbut unfortunately not good enoough to listen to it for an extended time :/11:00
whitequarkplus, "Sorry, cannot play music properly in the background".11:01
wpwrakwhitequark: yeah, works best if you have an extra screen. it seems to want to be visible.13:07
wpwrakwhitequark: some songs work amazingly well, e.g., "Blue Monday"13:07
wpwrakwhitequark: in some you can also see how lazy their makers really were :)13:08
larschm, if I select one of the loops it jumps back?13:15
whitequarkwpwrak: one of the most seamless ones is the "Nyan Cat"13:18
whitequarkwhich somehow doesn't surprise me at all13:18
wpwraki'm not entirely sure about that part. when you click on it, it becomes red and is ignored on the next encounter. when you click again it becomes green (and stays green when you mouse away), in which case it may be taken the next time. not entirely sure if it works like this, though, since you're often not fast enough13:19
wpwrakwhitequark: an, need to try that one once i get tired of blue monday :)13:20
whitequarkwpwrak: well you kinda can just listen to it in a regular loop13:21
whitequarkI'm not sure what point the creators of the jukebox tried to prove by including it13:21
wpwrakalso need to see how "bad apple" and "last jungle" go. they could be fun.13:21
wpwrak(nyan cat) ah ;-) never quite got that meme13:21
whitequarkneither did I13:22
wpwrakthey have a few oddities there. and i think they don't "include" anything (or at least they don't say). it's all based on user uploads and statistics13:22
wpwrakhmm, it doesn't recognize "last jungle" :( "bad apple" works well, as expected15:22
LunaVoraxHi!18:03
larscoh, that's interesting there seem to be some samsung notebooks, which, if you boot linux, brick themself.19:53
Fallenouwow19:55
larschttps://bugs.launchpad.net/ubuntu-cdimage/+bug/1040557?comments=all19:56
Fallenouvery nice20:05
wpwrakwhitequark: "bug powder dust" works almost perfectly, with a nice mix of loop lengths. there are some small pops but they seem to come mainly from deficiencies of the algorithm.22:10
whitequarkwpwrak: hm, thanks22:10
wpwrakwhitequark: also 3 am eternal works pretty well.22:10
whitequarktalking about bugs, remember we talked about a faulty circuit breaker?22:10
whitequarkyou were right: the colder it is outside, the better it works22:11
wpwrakah, i don't remember the context22:11
whitequarkwpwrak: http://irclog.whitequark.org/qi-hardware/2012-12-26#2552953;22:12
wpwrakhmm. my comment about temperature was about holes (and cold) increasing the power consumption.22:16
whitequarkoh.22:16
wpwrakso ... "the better it works" was a) ironic or b) a conclusion about the validity of your fix ?22:17
whitequarkno, the frequency of malfunction events actually decreases with the temperature outside.22:17
whitequarkor at least I have this impression22:17
wpwrakyou'd enjoy the water problem we have here at the moment :) the mechanism that's supposed to control a pump that fills a water tank sometimes "sticks". fun ensues ...22:18
wpwrak(circuit breaker) could be. frozen water is probably less conductive than the liquid variant.22:19
wpwrak(water problem) so i've successfully applied the concept of "water hammer" to get it unstuck. not sure if i should explain the find points of it to anyone, though ;-)22:20
whitequarkoooh22:21
whitequarkthat is a rather radical way of solving problems22:21
wpwrakwell, the domestic variant. the speed at which i can close those valves is limited. but still :)22:22
wpwrakthe nasty bit about that tank control is that the problem only shows up at night, because the frequency of normal activation decreases to a point where it can stay stuck long enough to overflow22:26
wpwrakso the first encounter was one day at 2:30 am. i think i've heard part of it some days before, but didn't realize it was actually a problem.22:27
wpwrakat least this gave me an opportunity to remind our administrator that she had (foolishly, IMHO) promised to be available 24/7 :)22:29
hellekinCERN OHL translation will follow suit of the FSF for translations. It's now available in English only. Translators to your editors! http://www.ohwr.org/projects/cernohl/wiki/Translations22:29
hellekintalking about translation, I'd be really glad to read http://www.premium-cola.de/betriebssystem and the links in English. I think it has a lot of potential for Free sw/hw business approaches22:36
wpwrakgoogle translate ?22:41
wpwrakhmm, seems confusing22:43
wpwrakbut guessable, i guess22:43
hellekinwpwrak: yes, that can serve as a first step, but a proper translation would be nice, so that it can be reused :)22:53
wpwrakpick out the idea, apply them to the respective new context :) a 1:1 copy rarely work. well, unless you adjust all four dimensions. but then, the language wouldn't be an issue :)22:59
hellekinyes, you're right. A reminiscence of my hate of the awful German language ;o)23:13
wpwrakonce you crack the grammar, the rest is almost easy :)23:13
hellekinhehe23:13
whitequarkhm interesting23:18
whitequark(that'd be re: exceptions)23:18
whitequarkllvm codebase has a nice feature called ErrorOr<ty>, i.e. ErrorOr<int32_t>23:18
whitequarkwhich holds either an error code and a human-readable description, or an arbitrary value23:18
whitequarklooks like it's better than exceptions, although it is quite loquacious.23:20
larscwhat does it do?23:21
larscah23:22
larscthe value can either be an error condition or of type ty23:23
whitequarkexactly23:23
whitequarkwhat I want is to add such a construct as a language builtin, add it to the ABI and then simply map it to exceptions23:24
whitequarkit has a cost of 1 cycle per non-inlined function call on the common case. I consider this reasonable.23:24
whitequark(1 cycle on pipelined CPUs, i.e. everything.)23:24
larscwhy the extra cost?23:25
whitequarklarsc: checking of the return value after the call23:25
whitequarksee, the implementation of exceptions with unwinder is zero-cost in the common case23:25
whitequarki.e. non-exceptional control flow23:25
whitequarkthere are two problems however. first, ruby has to implement certain `break's and `return's, which cause nonlocal control flow (i.e. breaks/returns from closures), effectively as exceptions23:26
larscand how would you use it?23:26
whitequarksecond, the unwinder is really really unwieldy (pun intended) on the uncommon case23:27
whitequarkthe latency is thousands of cycles if you're lucky23:27
whitequarknot to mention bloating the binary with all the tables, etc.23:27
whitequarkof course, C++ doesn't have another option, as it has to support C interoperability, and even link with different languages. I'd have to translate them back and forth on FFI boundaries.23:28
whitequarklarsc: (how to use it) you just raise exceptions. from the programmers' point of view, nothing has changed.23:29
whitequarkthe code, instead of invoking an external unwinder, then unwinds itself23:29
whitequarkjust as you'd do "if(!fd) return 1;" manually, but with 100% less boilerplate.23:30
whitequarkthoughts?23:31
larscso you basically only jump one stackframe up instead of multiple23:34
whitequarkthe C++ unwinder still jumps stackframes one by one23:35
whitequarkbecause it has to invoke destructors in each23:35
whitequarkand, in fact, if it has *some* kind of catch/finally, including implicit, it *must* pass the control to the landing pad, because it's the code at landing pad which determines if the handlers will be ran23:35
whitequarkand if the unwinding has to stop23:35
whitequarkalso, it actually searches the entire stack twice; "phase 1" verifies that there's a handler, and if not, calls abort()23:36
larschm23:42
--- Wed Jan 30 201300:00

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