#qi-hardware IRC log for Friday, 2014-05-30

DocScrutinizer05to whom it may concern (whitequark? donors at large): please see http://neo900.org/#news "headline" ("Update")01:38
whitequarkwhat is meant by "original and final invoice" ?01:41
DocScrutinizer05original is what you received when donating, final is what you received in refund02:21
DocScrutinizer05UG doesn't know what you got refunded02:22
DocScrutinizer05so theoretically somebody could send 20EUR to UG and claim this is what GDC refunded for a 1000EUR original donation02:22
DocScrutinizer05we want to handle all donations as if they were the original amount02:23
nicksydneyanother small WiFi module https://www.indiegogo.com/projects/asiarf-tiny-linux-computer-with-wifi-and-ethernet08:12
kyakfawk! i spent several hours trying to figure out why i get "undefined reference" from ld. It turns out that the order of objects to link does matter!12:49
wpwrakjust objects, or also libraries ? :)12:50
pcercueiif you have cross-references, you can do that:12:50
pcercueigcc -Wl,--start-group foo.o bar.o -Wl,--end-group12:50
kyaki have an archive and an object12:50
kyak"ld archive object" doesn't work, "ld object archive" workd12:51
larscthere is a flag that allows you to specify that the order does not matter12:52
larscbut that makes things slower so it is off by default12:53
larscsince typically your dependency graph is a DAG12:53
wpwrakpcercuei: aren't mere objects always safe ? just libs have ordering constraints12:53
wpwraklarsc: biting people who alpha-sort their files ...12:54
kyaki think ld developers should enable "the order doesn't matter" flag when a dependency cannot be resolved12:54
kyakand probably warn people12:55
wpwraknaw, just print "kyak, you did it again !"12:55
kyaki'm pretty sure i will do it again12:56
kyakmaybe in some time, when i forget12:56
nicksydneyinteresting how the board has a sample code on the pcb http://www.seeedstudio.com/depot/images/product/SRF%20shield.jpg  :)13:03
wpwrakin the old days, we printed listings on paper. now they print them on pcbs. what's next, stone tablets ?13:18
wpwraksome people have strange ideas. e.g., freescale put a low-power wakeup function on a pin that's normally not interrupt-capable. ah, the logic in those parallel universes ...14:44
whitequarksometimes I think the people who assign functions to pins (and modules) are permanently high18:26
whitequark *incomprehensible giggling* and this one would be a timer or USART RTS!  cool idea, bro *both giggle*18:27
larscnobody needs rts anyaway18:28
DocScrutinizer05err huh? order matters on binding?18:50
DocScrutinizer05only when you have colliding references, i.e. of same name, no?18:50
DocScrutinizer05aiui that's the whole point of LD_PRELOAD18:51
whitequarkDocScrutinizer05: there are some obscure corner cases where order matters when linking18:53
larscI wouldn't call them obscure or corner cases18:54
DocScrutinizer05sorry that's beyond me18:54
larscthe dependent object needs to be listed before the dependency18:54
DocScrutinizer05ugh!18:55
whitequarklarsc: hm, really? I bumped into it far too rare then18:56
larsc(or the other way around)18:56
larschttp://stackoverflow.com/questions/45135/linker-order-gcc/409470#40947018:57
DocScrutinizer05recursuive and even circular dependcy resolving been a key feature of my first commercial project, done in pascal(!) which only allowed a limited (one digit) number of fixed file handles to get listed at compile time, no open()18:57
DocScrutinizer05back in 1983 or sth18:58
whitequarkld is not exactly modern18:58
larscit was changed for performance reasons, iirc18:59
larscit doesn't matter if you compile your hello world18:59
DocScrutinizer05nasty19:00
larscbut for large programs like e.g. firefox it is supposed to make a difference19:00
whitequarkllvm's linker, lld, works in a fascinating way19:00
larscalthough whether this should be default is indeed a bit questionable19:00
whitequarkit doesn't care about object files at all. instead, it has a graph of atoms (atom = symbol + content)19:00
whitequarkso, no need for ordering, or ridiculous hacks such as -ffunction-sections19:00
DocScrutinizer05wait, did I get it right: ld knows how to resolve forward dependencies, but it's disabled by default for performance reasons?19:14
whitequarkapparently19:15
DocScrutinizer05:-S19:15
DocScrutinizer05now that's what I call design of a lazy uninspired coder19:16
DocScrutinizer05wtf blocks ld to switch to a more smart way to resolve deps as soon as it runs into trouble with optimized method?19:17
DocScrutinizer05also I can't recall even seen a switch/option for that in ld's man page. Then otoh that manpage is a nighmare, right?19:18
DocScrutinizer05only 1344, not as bad as I thought19:20
larscthe switch is '-( ... )-'19:22
whitequark1344?19:22
DocScrutinizer05lines19:23
DocScrutinizer05but also not really self-explanatory19:24
DocScrutinizer05to understand what all the options *really* do you need ten times that anount of doc, at least19:24
DocScrutinizer05man ld|less -j2 +'/sort'   ; sounds kinda related. But maybe not at all19:28
DocScrutinizer05larsc: '-( archives -)' ?19:38
DocScrutinizer05yup, manpage explanation sounds about right19:39
DocScrutinizer05>>Using this option has a significant performance cost.  It is best to use it only when there are unavoidable circular references between two or more archives.<< LOL19:40
whitequark*circular* dependencies19:40
whitequarkthat's why I almost never had to use it19:40
DocScrutinizer05read the whole helptext, it suggests that usually you have an ordered list of archive files19:41
DocScrutinizer05and ld only switches to repeated circular search through all archives when -( -) is used19:42
wpwrakthe most common cast where it hits people is when they put libraries before object files19:42
wpwrakthe rest (dependencies between libraries and such) is less common19:43
DocScrutinizer05man ld|less -j2 +'2/--start-group'19:45
wpwrakwell, you have two types of problem situations: getting the DAG wrong or having a cyclic graph (DCG). in the former case you have to reorder the libraries. in the latter case you have to repeat some of them.19:50
wpwrak--start-group is basically a work-around. can make sense in cases where you can't quite predict what the libraries will do, though19:51
DocScrutinizer05or in cases where you have a shitload of back&forth references19:53
DocScrutinizer05but honestly, I'd expect a linker to take care of that without me helping it out of valley of ignorance19:54
wpwrakyeah, it does seem a little odd. not sure how much more effort it would be19:54
DocScrutinizer05some heuristics could help a lot19:54
wpwrakactually, the best would be to print a warning of it finds a DAG problem. then one could simply reorder the libs.19:55
DocScrutinizer05the best would be a warning and rescan of all archives like in -(-)19:56
wpwrakyes, that's what i meant19:57
DocScrutinizer05then keep in minf which archive been able to satisfy the "stale" reference, and search this archive first next time a stale reference happens19:57
wpwrakbut then, a fatal error can be seen as a warning you can't ignore ;-)19:58
DocScrutinizer05kinda, but silly19:58
wpwrakmafia-style programming ;-)19:58
DocScrutinizer05"sorry, I detected a problem and I can tell you which one, but my coder been too lazy to teach me how to solve it. HEEEELP!"19:59
DocScrutinizer05even s/(which one)/\1 and what's the supposed solution/20:00
wpwrakwell, it's not a big deal. once you understand it, it's easy enough to solve such problems when you run into them20:01
DocScrutinizer05yes, but it's terribly annoying20:01
DocScrutinizer05it's basically like an arbitrary cmdline tool throwing error "-x not allowed after -y, please use -x -y instead of -y -x!"20:04
wpwraki'd suggest you inform the UN security council. you've convinced me, something really has to be done about it ;-)20:08
whitequarkDocScrutinizer05: you mean like find? :D20:08
whitequark$ find -name foo /20:09
whitequarkfind: paths must precede expression: /20:09
DocScrutinizer05Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]20:12
DocScrutinizer05so W*T*F?20:12
DocScrutinizer05aah, sorry20:13
whitequarkwell what the fuck is its problem? author too lazy to sort the arguments?20:13
DocScrutinizer05short of coffee20:13
DocScrutinizer05yeah, obviously20:13
DocScrutinizer05you could argue it can't decide otherwise if it's a path starting with '-' or a misspelled EXPR20:16
whitequark$ find -/ -name foo20:16
whitequarkfind: unknown predicate `-/'20:16
whitequarkno.20:16
DocScrutinizer05but actually paths starting with - are cumbersome no matter what20:17
whitequarkall sane utilities use -- for separating args and paths20:17
DocScrutinizer05right20:17
whitequarkbut nooo, find just *has* to invent some ridiculous shit, and in fact -- can't work at all with it20:17
DocScrutinizer05or any other prper delimiter20:17
whitequarkbecause that'd put predicates before paths20:17
DocScrutinizer05:nod:20:18
DocScrutinizer05I guess find is quite ancient a tool20:18
DocScrutinizer05not everything made sense back when. Heck not even today everything makes sense20:19
whitequarkthat's some profound observation20:19
DocScrutinizer05I guess find's syntax is closely related to the natural language and therefore the logic of the original author20:20
DocScrutinizer05*cough*20:40
DocScrutinizer05think of dd20:43
DocScrutinizer05would be some fun to guess which tools are written by same (group of) author(s), only judging by the syntax and option names used20:44
wpwrakwell, these groups of original authors may indeed be rather small ;-)21:31
--- Sat May 31 201400:00

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