Topic for #qi-hardware is now Copyleft hardware - http://qi-hardware.com | hardware hackers join here to discuss Ben NanoNote, atben / atusb 802.15.4 wireless, and other community driven hw projects | public logging at http://en.qi-hardware.com/irclogs
<viric> I don't have a big success rate in bios updates
<wpwrak> i 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 ;-)
<whitequark> well, this one is pretty good
<whitequark> first, it *actually* can read the flash from a 32GB USB flash drive formatted to vfat
<whitequark> and it doesn't require any windows bullshit
<whitequark> as you can see it also can successfully flash the chip, which is also an achievement
<wpwrak> wow. didn't know it was christmas again ;-)
<whitequark> wpwrak: christmas?
<wpwrak> when you get gifts :)
<whitequark> heh
<whitequark> it also has a nasty habit of making first power-up after flashing last for half a second
<whitequark> after which the machine simply goes black
<whitequark> I 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 flee
<whitequark> aaaand no, of course these morons did not actually fix any of the actual BIOS bugs.
<whitequark> *sigh
<whitequark> again.
<whitequark> sign
<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/591bb64
<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/66a487b
<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/85bda4c
<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/f862a82
<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/04b235c
<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/128590b
<wpwrak> i take the christmas back :) but it's nice to see my "don't worry about BIOS updates" policy validated
<whitequark> well, they did add windows 8 support
<wpwrak> tiles, here we come ! ;-)
* whitequark was going to add something sarcastic, but just "windows 8" is enough
<whitequark> in unrelated news, my language slowly turns into something like C++, but without all the insane "oh we accidentally turing-completed templates"
<whitequark> the turing-completeness in my system is very much intended.
<wpwrak> well, tiles date back to the bronze age. so that sounds about right for windows :)
<wpwrak> templates, the ultimate achievement in obfuscation
<whitequark> wpwrak: if you want a compile-time loop, you just write a fucking loop. that's how I do it :)
<whitequark> or, 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.
<wpwrak> yeah, never underestimate the combined power of make and #include
<whitequark> or compute a trigonometric function table taking into account endianness or word width of your target
<whitequark> or...
<whitequark> wpwrak: you can't do the latter without some really heavyweight magic.
<whitequark> and then you have a target which has non-IEEE-compliant floats, and you need to generate something for them
<whitequark> and then you begin to despise your desire to stay with make and #include ;)
<wpwrak> huh ? static crazy_type[] = { CONST1, CONST2, CONST3, ... };
<wpwrak> leave it to the (cross-)compiler to figure out the machine representation
<wpwrak> and of course, that array is generated at make time
<whitequark> wpwrak: obviously. now, make a sin() table.
<whitequark> in a portable way of course, because that's a library.
<wpwrak> sin.inc:\n\tperl -e make_sin_table.pl >sin.inc
<whitequark> not portable, because see above: you have a target with weird floats.
<wpwrak> so ? sin.inc has them in ASCII
<whitequark> and from what I know, ARM floats and x86 floats do behave differently.
<wpwrak> the ASCII to weird conversion happens in the cross-compiler
<wpwrak> the one that #includes sin.inc
<wpwrak> you're just bloating the language instead of using the potential of the tools already available to you. of course, that's the C++ way ;-)
<whitequark> you also cannot precisely represent floats in decimal notation, you know, right? :)
<whitequark> this is why e.g. LLVM assembly has float literals in hex.
<wpwrak> well, i can make a worst-case estimate of epsilon and just pump out enough digits
<whitequark> oh, I don't bloat anything, nor I require the programmer to use third-party tools for the stuff the compiler *already knows*
<whitequark> it is aware of all target semantics, and of the precise configuration this code is being compiled with
<whitequark> perl is not
<wpwrak> perl doesn't need to since you can intelligently divide the task :)
<whitequark> meh
emeb has quit [Quit: Leaving.]
guanucoluis has joined #qi-hardware
<whitequark> oh nice, that bios update actually broke the battery meter
<wpwrak> hmm, anti-christmas ?
<whitequark> through I'm not sure how exactly because ACPI reports correct values. but my status widget displays inf%
<whitequark> i guess i got coal :)
<wpwrak> better be careful what you wish for ... things like uncommanded overheating do exist
<whitequark> it's called "oh this website has flash"
<wpwrak> interesting. "uncommanded" isn't in the dictionary. such a useful word.
<wpwrak> yeah, that's a good predicator
<whitequark> the damn thing goes 100% on one of my cpu cores each time I wake the machine up
<whitequark> something with alsa I guess
<wpwrak> that confirmation came quickly ;-)
<whitequark> well it isn't quite bios-related. but still annoying.
<wpwrak> going from christmas to christmas cancelled to anti-christmas to antichrist-mas :)
<whitequark> I only use it because russian facebook clone vk.com is easily the world's biggest archive of pirated mp3s
<whitequark> which 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.
<whitequark> it'll just go on for hours. only needs manual intervention when someone hijacks the name with a dubstep remix.
<whitequark> btw, did you know how C++ handles exceptions?
<whitequark> it strcmp()s the class name and names of all its parents with all the classes in catch clauses
<whitequark> and does it twice on the entire callstack
<whitequark> and to walk the callstack, it uses DWARF debug info
megha has quit [Read error: Operation timed out]
<whitequark> as 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'
<whitequark> i.e. basically translate error handling with stack unwinding to error handling with error codes.
<whitequark> combine the best! :)
kuribas has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<whitequark> all the things you can do when you get to design your own ABI.
rz2k has quit []
megha has joined #qi-hardware
<wpwrak> (C++ exceptions) nice. if Morgan Spurlock was a hacker, "Super Size Me" would have been about C++
<wpwrak> btw, 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/
<wpwrak> works on linux with a reasonably recent chromium and chromium-codecs-ffmpeg-extra
wolfspraul has joined #qi-hardware
kristianpaul has quit [Quit: leaving]
kristianpaul has joined #qi-hardware
kristianpaul has quit [Changing host]
kristianpaul has joined #qi-hardware
wolfspraul has quit [Quit: leaving]
wolfspraul has joined #qi-hardware
urandom__ has quit [Quit: Konversation terminated!]
guanucoluis has quit [Ping timeout: 256 seconds]
xiangfu has joined #qi-hardware
pcercuei has joined #qi-hardware
pcercuei has quit [Ping timeout: 256 seconds]
DocScrutinizer05 has quit [Disconnected by services]
DocScrutinizer05 has joined #qi-hardware
wolfspraul has quit [Ping timeout: 244 seconds]
pcercuei has joined #qi-hardware
xiangfu_ has joined #qi-hardware
pcercuei has quit [Quit: Bye]
jekhor has joined #qi-hardware
megha has quit [Quit: WeeChat 0.4.0]
megha has joined #qi-hardware
megha has quit [Client Quit]
megha has joined #qi-hardware
jluis has quit [Read error: Operation timed out]
megha has quit [Ping timeout: 252 seconds]
megha has joined #qi-hardware
jekhor has quit [Ping timeout: 240 seconds]
jekhor has joined #qi-hardware
jekhor has quit [Ping timeout: 256 seconds]
bzb has joined #qi-hardware
wolfspraul has joined #qi-hardware
bzb has quit [Quit: Leaving]
security has joined #qi-hardware
megha has quit [Ping timeout: 264 seconds]
security has quit [Quit: WeeChat 0.4.0]
<whitequark> wpwrak: (music) thanks, I do!
<whitequark> hmm, this is a very interesting experiment
<whitequark> but unfortunately not good enoough to listen to it for an extended time :/
<whitequark> plus, "Sorry, cannot play music properly in the background".
wolfspraul has quit [Ping timeout: 245 seconds]
wolfspraul has joined #qi-hardware
megha has joined #qi-hardware
<wpwrak> whitequark: yeah, works best if you have an extra screen. it seems to want to be visible.
<wpwrak> whitequark: some songs work amazingly well, e.g., "Blue Monday"
<wpwrak> whitequark: in some you can also see how lazy their makers really were :)
<larsc> hm, if I select one of the loops it jumps back?
<whitequark> wpwrak: one of the most seamless ones is the "Nyan Cat"
<whitequark> which somehow doesn't surprise me at all
<wpwrak> i'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 enough
pcercuei has joined #qi-hardware
<wpwrak> whitequark: an, need to try that one once i get tired of blue monday :)
<whitequark> wpwrak: well you kinda can just listen to it in a regular loop
<whitequark> I'm not sure what point the creators of the jukebox tried to prove by including it
<wpwrak> also need to see how "bad apple" and "last jungle" go. they could be fun.
<wpwrak> (nyan cat) ah ;-) never quite got that meme
<whitequark> neither did I
<wpwrak> they 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 statistics
pcercuei has quit [Ping timeout: 256 seconds]
Hoolxi has joined #qi-hardware
pcercuei has joined #qi-hardware
pcercuei has quit [Ping timeout: 256 seconds]
pcercuei has joined #qi-hardware
emeb has joined #qi-hardware
valhalla has quit [Read error: No route to host]
urandom__ has joined #qi-hardware
pcercuei has quit [Ping timeout: 256 seconds]
xiangfu has quit [Remote host closed the connection]
xiangfu_ has quit [Remote host closed the connection]
valhalla has joined #qi-hardware
pcercuei has joined #qi-hardware
rz2k has joined #qi-hardware
Hoolxi has quit [Remote host closed the connection]
jekhor has joined #qi-hardware
jluis has joined #qi-hardware
megha has quit [Ping timeout: 255 seconds]
jekhor has quit [Read error: Connection reset by peer]
paroneayea has quit [Remote host closed the connection]
<wpwrak> hmm, it doesn't recognize "last jungle" :( "bad apple" works well, as expected
paroneayea has joined #qi-hardware
porchao has quit [Quit: Leaving...]
porchao has joined #qi-hardware
jluis has quit [Ping timeout: 248 seconds]
jekhor has joined #qi-hardware
pcercuei has quit [Quit: Bye]
megha has joined #qi-hardware
rz2k has quit [Read error: Connection reset by peer]
kilae has joined #qi-hardware
jekhor has quit [Ping timeout: 245 seconds]
megha has quit [Quit: WeeChat 0.4.0]
rz2k has joined #qi-hardware
paroneayea has quit [Remote host closed the connection]
paroneayea has joined #qi-hardware
LunaVorax has joined #qi-hardware
<LunaVorax> Hi!
wej has joined #qi-hardware
megha has joined #qi-hardware
pcercuei has joined #qi-hardware
pcercuei has quit [Ping timeout: 272 seconds]
wej has quit [Ping timeout: 248 seconds]
wej has joined #qi-hardware
jekhor has joined #qi-hardware
wej has quit [Ping timeout: 245 seconds]
pcercuei has joined #qi-hardware
pcercuei has quit [Client Quit]
wej has joined #qi-hardware
Jay7 has quit [Read error: Connection reset by peer]
Jay7 has joined #qi-hardware
Jay7 has quit [Ping timeout: 244 seconds]
wej has quit [Ping timeout: 264 seconds]
<larsc> oh, that's interesting there seem to be some samsung notebooks, which, if you boot linux, brick themself.
<Fallenou> wow
wej has joined #qi-hardware
<Fallenou> very nice
kyak has quit [Ping timeout: 244 seconds]
kilae has quit [Quit: ChatZilla 0.9.89 [Firefox 18.0.1/20130116073211]]
erikkugel has left #qi-hardware [#qi-hardware]
<wpwrak> whitequark: "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.
<whitequark> wpwrak: hm, thanks
<wpwrak> whitequark: also 3 am eternal works pretty well.
<whitequark> talking about bugs, remember we talked about a faulty circuit breaker?
<whitequark> you were right: the colder it is outside, the better it works
<wpwrak> ah, i don't remember the context
<wpwrak> hmm. my comment about temperature was about holes (and cold) increasing the power consumption.
<whitequark> oh.
<wpwrak> so ... "the better it works" was a) ironic or b) a conclusion about the validity of your fix ?
<whitequark> no, the frequency of malfunction events actually decreases with the temperature outside.
<whitequark> or at least I have this impression
<wpwrak> you'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 ...
<wpwrak> (circuit breaker) could be. frozen water is probably less conductive than the liquid variant.
<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 ;-)
<whitequark> oooh
<whitequark> that is a rather radical way of solving problems
<wpwrak> well, the domestic variant. the speed at which i can close those valves is limited. but still :)
<wpwrak> the 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 overflow
<wpwrak> so 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.
<wpwrak> at least this gave me an opportunity to remind our administrator that she had (foolishly, IMHO) promised to be available 24/7 :)
<hellekin> CERN 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/Translations
jekhor has quit [Ping timeout: 240 seconds]
<hellekin> talking 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 approaches
<wpwrak> google translate ?
<wpwrak> hmm, seems confusing
<wpwrak> but guessable, i guess
xiangfu has joined #qi-hardware
wej has quit [Ping timeout: 248 seconds]
wej has joined #qi-hardware
<hellekin> wpwrak: yes, that can serve as a first step, but a proper translation would be nice, so that it can be reused :)
<wpwrak> pick 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 :)
xiangfu has quit [Quit: leaving]
<hellekin> yes, you're right. A reminiscence of my hate of the awful German language ;o)
<wpwrak> once you crack the grammar, the rest is almost easy :)
<hellekin> hehe
<whitequark> hm interesting
<whitequark> (that'd be re: exceptions)
<whitequark> llvm codebase has a nice feature called ErrorOr<ty>, i.e. ErrorOr<int32_t>
<whitequark> which holds either an error code and a human-readable description, or an arbitrary value
<whitequark> looks like it's better than exceptions, although it is quite loquacious.
<larsc> what does it do?
<larsc> ah
<larsc> the value can either be an error condition or of type ty
<whitequark> exactly
<whitequark> what I want is to add such a construct as a language builtin, add it to the ABI and then simply map it to exceptions
<whitequark> it has a cost of 1 cycle per non-inlined function call on the common case. I consider this reasonable.
<whitequark> (1 cycle on pipelined CPUs, i.e. everything.)
<larsc> why the extra cost?
<whitequark> larsc: checking of the return value after the call
<whitequark> see, the implementation of exceptions with unwinder is zero-cost in the common case
<whitequark> i.e. non-exceptional control flow
<whitequark> there 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 exceptions
<larsc> and how would you use it?
<whitequark> second, the unwinder is really really unwieldy (pun intended) on the uncommon case
<whitequark> the latency is thousands of cycles if you're lucky
<whitequark> not to mention bloating the binary with all the tables, etc.
<whitequark> of 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.
<whitequark> larsc: (how to use it) you just raise exceptions. from the programmers' point of view, nothing has changed.
<whitequark> the code, instead of invoking an external unwinder, then unwinds itself
<whitequark> just as you'd do "if(!fd) return 1;" manually, but with 100% less boilerplate.
<whitequark> thoughts?
mirko has quit [Ping timeout: 276 seconds]
mirko has joined #qi-hardware
<larsc> so you basically only jump one stackframe up instead of multiple
<whitequark> the C++ unwinder still jumps stackframes one by one
<whitequark> because it has to invoke destructors in each
<whitequark> and, 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 ran
<whitequark> and if the unwinding has to stop
<whitequark> also, it actually searches the entire stack twice; "phase 1" verifies that there's a handler, and if not, calls abort()
wej has quit [Ping timeout: 245 seconds]
<larsc> hm
urandom__ has quit [Quit: Konversation terminated!]