#qi-hardware IRC log for Friday, 2017-01-13

wpwrakwhitequark: btw, is it a known issue that H/V constraints shown while dragging a line (during its construction) don't always match what is taken when you click/hit Esc ?12:20
wpwrakwhitequark: and is there a way to get a list of constraints on an item, e.g., a point ? (where it's sometimes nearly impossible to see thruogh the thicket of things attached to it)12:21
wpwrakoh, and why is line dragging to sluggish ? even after "New" the lag feels as if i was dragging around the titanic :)12:22
wpwrakand the biggest question of all: if i attached a workplane to the wrong point, but realize that only later, is here a way to move it ? i.e., is there a dialog that lets me manipulate the workplane parameters, such as orientation, and placement ?12:47
wpwrakin complex cases, i guess it may also be useful to be able to name items (lines, points, etc.), such that they could be identified in constraints. i.e., a constraint could say c123-eq-length\n\tline segment "foo"\n\tline segment "bar"12:51
wpwrakwould that sound like a reasonable feature request ?12:51
whitequark(don't always match what's taken) well, that *should* have been fixed, but yes. I plan to retire that entire feature.17:50
whitequarkin favor of a different UI workflow entirely, a more generic one at that17:51
whitequark(list of constraints on an item) nope. easy to add. file an issue.17:51
whitequark(sluggish) why exactly do you think I bumped the requirement to gtk 3.22? :D17:51
whitequark(moving worklane) https://github.com/solvespace/solvespace/issues/10317:52
whitequark(naming items) it seems far more useful to link to the entities from the constraint, in the text window17:53
whitequarkwpwrak: *grumble* you people and your crufty distros18:36
whitequarkwpwrak: actually, no, scratch that.18:39
whitequark(solvespace:916): Gdk-WARNING **: gdk_gl_context_set_required_version - GL context versions less than 3.2 are not supported.18:39
whitequarkyou'll just have to deal with it18:39
wpwrak3.2(0) is fine for me ;-)18:39
whitequarkno, you don't get it18:39
whitequarkGTK prior to 3.22 *requires* the use of an OpenGL 3.2+ core profile18:40
whitequarkthis would require me to rework everything to use VBOs/VAOs, which ANGLE doesn't support18:40
whitequarkthis is totally a fuckup on the part of GTK that shows a complete lack of awareness of real-world software18:40
wpwrak#103 hmm, any good work-around ? .slvs looks a bit like a slightly pretty-printed memory dump18:42
wpwrakah, i see. library dependency hell.18:43
wpwrak(naming) yeah, i mean as the next level, when you can't quite figure out what is what. basically a way to leave breadcrumbs, to find your way out of the maze of interrelated objects18:44
whitequarkthis is *also* a fuckup on the part of OpenGL, which are even more divorced from the needs of developers18:45
whitequarkbasically, I hate everyone involved18:45
wpwrak(sluggish) just seems odd that dragging a line on an otherwise empty backgruond would already be very slow. i could imagine that happening with some major model in the background.18:45
wpwraksplit 2D editing and 3D rendering ? :)18:46
whitequarkthis has nothing to do with geometry itself18:46
whitequarkthe latency is constant and the result of me having to manually flip framebuffers through X1118:46
whitequarkthis is /literally the thing the newer gtkglarea is fixing/18:46
wpwrak(flipping) i see.18:47
whitequarkdo you have huge monitors too?18:48
whitequarkand perhaps not that high-end CPU?18:48
wpwrakmonitors are just 1920x1080. cpu is q6600. new ones still have about the same clock speed and number of cores ;)18:50
whitequarkmhm, weird18:50
wpwrak(thogh they probably now execute a dozen instructions per cycle :)18:50
whitequarkI also have full-hd and probably a less-powerful CPU18:50
whitequarknewer ones have lower TDP primarily18:50
whitequarkand wider SIMD registers18:52
wpwrakline dragging is just strangely slow. about 1 s latency.18:52
wpwrak(that's move mouse, wait until the line moves, then repeat. so system latency is maybe half that)18:53
whitequarkthat makes no sense at all18:53
wpwraktoldya :) it's SLOW.18:54
whitequarkthere's absolutely no way it should or even can take 1s18:54
whitequarkwell try it on 3.22 first.18:54
whitequarkI am absolutely not supporting the horrible framebuffer flipping hack anymore in any way, shape or form18:54
wpwrakwish i had that :)18:54
whitequarkdoes 2.3 also have the roblem?18:54
wpwrakhow would i test that ?18:55
whitequarkuhm, build solvespace 2.3? or install it from debian, assuming it's there already18:55
wpwraktag v2.3 is good ?18:56
whitequarkyup, exactly what you need18:56
wpwrakwhee. cmake doesn't hate me for trying that :)18:57
whitequarkI can't in good faith call cmake "decent" but it does handle many basic cases18:59
whitequarkwhich is more than can be said about most other build systems18:59
wpwrak2.3 is much faster. still lags a little, but maybe 100 ms at most.19:00
whitequarkhm, interesting19:09
whitequarkdoes 3.0 consume 100% of CPU?19:09
whitequarkit's "interesting" because I'm pretty sure my system is slower than yours19:09
wpwraksolvespace about 50%, X11 about 85% (quad core)19:11
whitequarkI know what happens, ok19:11
whitequarkwpwrak: ok so a shot in the dark19:11
wpwrakthe lag also depends on distance19:11
whitequarkcan you check out master and replace set_use_es(true) with set_required_version(4, 0) in both cases19:12
wpwraklemme upload two videos. just a sec ...19:12
whitequarkyeah I'm pretty sure that "fix" will work19:14
wpwrakv2.3, small lag: http://downloads.qi-hardware.com/people/werner/slvs/line-lag-v23.mp419:18
wpwrak"v3.0" using gtkmm 3.20, massive lag: http://downloads.qi-hardware.com/people/werner/slvs/line-lag-v30.mp419:18
whitequarkyeah, that's an event queueing issue19:19
whitequarkwpwrak: so, have you tried set_required_version on your hw?19:28
wpwraklemme try ...19:31
wpwrakthere's no set_use_es in the version i use19:34
wpwrakand if i try master, it fails the >= 3.22 dependency check19:34
whitequark> can you check out master and replace set_use_es(true) with set_required_version(4, 0) in both cases19:35
whitequarkjust remove the dependency check19:35
whitequarkcmake tells you on which line it is19:35
wpwrakcompiling ...19:36
wpwrak(changed the check to >= 3.20)19:37
wpwrakmmh. crashes on start. lemme find a pastebin ...19:40
whitequarkwpwrak: please rerun with G_DEBUG=fatal_warnings19:42
whitequarkit will crash earlier and in a more informative way19:42
wpwrakhmm. https://0bin.net/paste/odCswYryWvfVrKf7#w+L9UTk-7DDzmSRhfwIEZYmIStLYY0BNrX8fTQoTb1219:43
wpwrakstack trace: https://0bin.net/paste/462bVQgGXqVkHNZW#pjzgTr0HvQk1SWNcqzNBP9iaUSl-luAgGbYyMLNz6pk19:44
whitequarkwpwrak: btw to get debug symbols use cmake . -DCMAKE_BUILD_TYPE=Debug19:44
whitequark(you don't need to rm the build dir, just rerun make then)19:44
whitequarkwpwrak: please rerun with LIBGL_DEBUG=1 MESA_DEBUG=119:45
whitequark... I should add that in README somewhere.19:45
wpwrakbtw, you may find the little trick i used in eeshow useful: eeshow gdb args... is like eeshow args... but runs everything under gdb: call to run_under_gdb in https://neo900.org/git/eeshow/tree/main/eeshow.c19:47
wpwrakand https://neo900.org/git/eeshow/tree/main/common.c19:47
whitequarkwpwrak: you don't need that19:47
whitequarkgdb --args eeshow ...19:47
whitequarkhas the exact same behavior19:47
wpwrakyes, that's what i use :)19:48
DocScrutinizer05(([2017-01-13 Fri 18:51:48] <whitequark> (sluggish) why exactly do you think I bumped the requirement to gtk 3.22? :D)) maybe rate-limit redraws to 20/s?19:48
whitequarkDocScrutinizer05: ugh19:48
whitequarklet's make experience worse for *everyone* instead19:49
wpwrakwhitequark: https://0bin.net/paste/+IgnQCsuQy1REN-C#SHTN2Oj-bEZ76i2S7pokiVlKko9oKTBL+xsaqSpm3LQ19:49
wpwraka redraw limit could help if it was an issue of an excessively long queue. i've seen such things. but, apparently that's not the issue here.19:50
whitequarkwpwrak: oh wait, are you using nvidia?19:50
DocScrutinizer05whitequark: maybe I'm wrong about what it does, but it seems pretty insane to redrew for every dot of change of mouse position, of a mouse with possibly 1200dpi19:51
whitequarkDocScrutinizer05: it doesn't do a redraw for *every* change19:51
whitequarkit's locked to vsync of your monitor, as it should be19:51
wpwrakwhitequark: glxinfo -> OpenGL renderer string: Gallium 0.4 on AMD RV610 (DRM 2.46.0 / 4.8.0-30-generic, LLVM 3.8.1)19:51
whitequarkwpwrak: ohhhhh19:52
DocScrutinizer05reducing redraw to a sane rate limit makes sense19:52
DocScrutinizer05aah vsync *is* a sane rate limit19:52
wpwrakit's either a Radeon HD 6450 or Radeon HD 240019:52
whitequarkno point to ever render at rate more than vsync19:52
wpwraki have both, but don't remember which is on which monitor19:53
whitequarkwell in a CAD application, in games there are a few niche cases19:53
wpwrake.g., benchmarks ;-)19:54
whitequarkno, I mean stuff like trying to smoothe movement19:54
whitequarkit makes sense to render too many frames then blur fast-moving parts19:54
wpwrakheh, deluxe mode ;-)19:55
whitequarkyeah, that's a very rare technique and not even necessarily the best way to imlement this19:56
whitequarkwpwrak: can you show me the complete glxinfo outupt19:58
DocScrutinizer05well, it sort of emulates the shutter-open time of conventional (film) cameras19:58
DocScrutinizer05a real camera always integrates over a time window19:58
wpwrakwhitequark: https://0bin.net/paste/V7+cJZhK2ZHamls9#kSbIyJ0xgSQjhHOFm6lxqQJWKWnUTYGnHUoHcnKYY4Q20:00
DocScrutinizer05admittedly very smart cameras (and electronic cameras) can adjust the otherwise fixed ratio of 50% open 50% shut per each frame of the 24 frames of a movie20:00
whitequarkwpwrak: that actually looks like it ought to work20:01
whitequarkmaybe the bug is something else20:01
DocScrutinizer05funny fact: film projectors interrupt each frame and make it two flashes of light, to get from 24Hz to 48Hz while framerate is still 24fps20:04
DocScrutinizer05TV interlaced has basically same reason20:05
DocScrutinizer05all obsolete in time of LCD monitors20:07
DocScrutinizer05Plasma displays however... ;-D20:08
DocScrutinizer05haha 0bin is a smart concept20:12
whitequarkwpwrak: basically can you try commenting stuff out until you get an interesting crash?20:13
whitequarkthe body of RefreshRecentMenus is a good 1st candidate20:13
whitequarktheres something fucky going on with the GTK widget initialization order but I don't understand what it is20:13
whitequarkwpwrak: hang on.20:16
whitequarkdoes that use your DISPLAY_TEXTWND hack?20:17
whitequarkis it enabled during the crash, that is?20:17
wpwrakno, it's plain "master"20:17
whitequarkdoes it crash somewhere else oncey ou comment out the body of RefreshRecentMenus20:17
wpwrakcommented out body of RefreshRecentMenus: https://0bin.net/paste/gdOResU6L5XvmmlJ#XoUrqETi7+1jx8gtsg2k2bgHf4Q59YEucreXq3pL+mZ20:19
whitequarkwhy... why does it break with menus specifically20:19
wpwrakif you s/set_use_es(true);/set_required_version(4, 0);/ locally, it works ?20:21
whitequarkthe question is whether your mesa will support it20:21
whitequarkbut I'm getting some really bizarre crashes20:21
wpwrakapparently not without a fight :)20:21
whitequarkcan you do `export LANG=en_US.UTF-8`20:22
wpwraki currently have LANG=C20:22
whitequark$ LANG=C ./bin/solvespace20:22
whitequarkSorry, only UTF-8 locales are supported.20:22
wpwrakinteresting. LANG=en_US.UTF-8 did something ... white canvas (with menu bar on top)  with "OpenGL context creation failed"20:24
whitequarkok. two separate bugs, then.20:25
wpwrak(LANG=C works here. maybe it's some interactino with LC_CTYPE=en_US.UTF-8 that makes it work. or such. that i18n stuff is confusing.)20:25
wpwrakbtw, the above is still with RefreshRecentMenus body commented out20:25
whitequarkthe POSIX locales are a disaster20:26
whitequarkWindows locales work (it's a single LCID number more or less)20:26
wpwrakenabling the body produces the same result20:26
whitequarkmacOS locales work (it's a single ISO locale name)20:26
whitequarkPOSIX locales... just give me some rope20:26
wpwraki saw that you also take extensive precautions to keep . from becoming , and such :)20:27
whitequarkwpwrak: can you show me the output of `locale` on your system, so I could fix the other bug20:28
whitequarkI haven't managed to coerce solvespace into crashing like that, even though I know in principle which code path it takes on your machine20:28
wpwraklocale: https://0bin.net/paste/Sepco-kIow1yY8iU#S4lhyiwDYFNgRasrWNpiTYDnTte-ioyDgkgJRPJQTaj20:33
wpwrakin C i trust :)20:34
whitequarkwpwrak: I had to do: export LANG=C LC_CTYPE=en_US.UTF-8 LANGUAGE=20:43
whitequarkyou have to specifically set LANGUAGE= to an empty string. apparently.20:43
wpwrakexport LANGUAGE=   without anything else (i.e., still LANG=C) has no effect here (except for putting LANGUAGE in the environment)20:46
whitequarkwpwrak: then I just have no idea how you've managed to achieve this20:47
whitequarkanyway I fixed it20:47
wpwrak(no idea) there are some avenues of knowledge that may be better left unexplored, and i have a strong feeling than i18n/l10n are of that kind :)20:49
whitequarkhave you considered that not everyone speaks English20:49
wpwrakoh, do it in the application if you must20:49
whitequarkanyway, the only reason POSIX i18n is so bad is because it was written by people with this attitude20:49
wpwrakor use pretty icons ;-)20:49
whitequarkusing solid engineering practices almost entirely eliminates the pain in i18n20:50
whitequarkI know this because *SolveSpace has i18n*20:50
wpwrakas i said, do it in the application, not libc20:50
whitequarkyeah, I agree entirely20:50
whitequarkpersonally I would prefer libc to be split into "libposix", something that has malloc, open, socket, etc20:51
whitequarkand then libc proper, which has all the rest of the junk like string manipulation20:51
whitequarkfor one this would let sane people, i.e. those not using C, to avoid having to link to libc and drag in all the junk20:51
whitequark... there's also an argument to be made about glibc20:52
whitequarkfor example, did you know glibc actually *has a copy of gettext*?20:52
whitequarkit doesn't just implement all the garbage POSIX requires, it goes above and beyond!20:52
whitequarknaturally, this also means the source of gettext has all kinds of hairy stuff to make it e.g. threadsafe, but only when a part of libc...20:53
DocScrutinizer05what's wrong with POSIX locales?20:53
whitequark... and this is why I've the gettext runtime reimplemented from scratch in SolveSpace20:53
whitequarkDocScrutinizer05: 1) people rely on printf/scanf as a general-purpose string-formatting and string-parsing functions20:54
wpwrakglibc is a bit like how they did early GMOs: set up a field with test plants, put a radiation source, wait, see what happened, if the result looks sellable, multiply and prosper20:54
whitequarkthis is wrong, but it is a fact of life and a result of C not providing decent parsing facilities20:54
whitequark2) look at the locales themselves20:54
whitequarkit's insane that there are so many different knobs to turn20:55
whitequarkwhy are LC_* individually settable?20:55
whitequarkwhy is there no variant of e.g. isdigit that is *not* affected by locale?20:55
wpwrakwhy does the dominatrix have different types of whips in the dungeon ? ;-)20:55
whitequarklol wpwrak 20:55
DocScrutinizer05hmm i'm pretty happy with using e.g. english text but ISO dates20:55
whitequarkDocScrutinizer05: there's no argument this should be possible20:56
whitequarkthe way it should be possible is by writing a file that says how your en_US-DocScrutinizer locale works20:56
whitequarkit's unambiguous and simple20:56
whitequarkinstead you have this Lovecraftian horror20:56
DocScrutinizer05there's actually also no sane argument for american date format20:57
whitequarkwell, yes, but we unfortunately can't wish americans out of existence, so...20:58
DocScrutinizer05I agree on the horror aspect though20:58
whitequarkI would also prefer no human being used an ideographic writing system20:58
DocScrutinizer05example please20:59
whitequarkhigh-quality support for hanzi and kanji is really hard to do20:59
DocScrutinizer05aaah that, yeah21:00
whitequarklike for example, input methods are primarily why solvespace bothers with GTK21:00
DocScrutinizer05what *really* sucks is coma vs dot for decimal21:00
whitequarkGTK input boxes integrate with the system IME21:00
whitequarkso you can input Chinese if you want using the same tool you usually use21:00
whitequarkyeah, that's nasty21:00
whitequarkI've recently made the numpad dot always enter a dot in solvespace21:01
whitequarkeven if it's set to comma on your keyboard layout21:01
Action: DocScrutinizer05 still searches for a decent generic versatile keyboard handler that can even do macros21:02
DocScrutinizer05redefine keys "on the fly"21:02
DocScrutinizer05record and playback macros21:02
DocScrutinizer05just define ONE special "escape key" to switch to keyboard handler communication21:03
DocScrutinizer05capslock comes to mind21:04
DocScrutinizer05or numlock21:04
whitequarkwpwrak: I figured out why setting version to 4.0 works on my machine.21:05
wpwrakbefore the "Windows" key was added, Caps Lock had the crown of most useless key ever for ages21:05
whitequarkthat's because setting version to 4.0 through gtk actually sets it to *2.0* in the request to glX21:05
wpwrakheh :)21:05
whitequarkwhat the actual fuck?21:05
wpwrakwell, it preserved the .0 part pretty accurately21:06
DocScrutinizer05btw s/keyboard handler/input handler/21:06
whitequarkwpwrak: if I ask for 4.1 I still get 2.021:07
Action: DocScrutinizer05 glares at his MX500 12 button mouse21:07
whitequarkthis is extremely stupid because I CANNOT request a 2.0 context from GTK21:07
whitequarkthe ONLY reason this works is a bug in gtk 3.22, which I presume is not present in 3.20, or it would have worked on your system21:07
whitequarkwpwrak: *sigh* let's try one more thing21:08
DocScrutinizer05oh and when you complain about locale horror, never look into input driver layers horror!21:08
DocScrutinizer05I never managed so far to start reading about what's been sent via e.g. USB to PC from mouse/kbd and then read "upward" through layers til X-Event to an X11 program and still remember about the first layer and how it worked21:10
whitequarkwpwrak: you have gtk 3.20, right?21:12
whitequarknot 3.18 even?21:12
wpwrakyes, 3.20: https://0bin.net/paste/-3j6+gnDxCvzUpDX#CvQbuVB6uKJpGA7oD6XHQCs1Ol98yG2cAV11oQTvylb21:15
DocScrutinizer05sorry for OT, but for fun about kbd and how it works, refer to http://homepages.cwi.nl/~aeb/linux/kbd/scancodes-8.html21:16
DocScrutinizer05>>bit 1 A20 0: A20 line is forced 0, 1: A20 enabled <<  LOL21:32
whitequarkwpwrak: so I WANTED to use https://github.com/GNOME/gtk/blob/master/gdk/gdkglcontext.c#L103021:32
whitequarkbut that would be too easy right? turns out it's a private, totally inaccessible API21:33
wpwrakcan't you just call it ?21:33
whitequarkit's not exported.21:35
whitequarkit's not even present in the symbol table.21:35
wpwrakoh, crafty21:35
whitequarkwpwrak: https://github.com/GNOME/gtk/blob/gtk-3-20/gdk/x11/gdkglcontext-x11.c#L64021:39
whitequarkunless you can coerce it into setting legacy_bit=TRUE it is a total loss.21:39
wpwrakprobably not a good idea to depend on locally hacked libraries ...21:41
wpwrakso it gtkmm >= 3.22 still the way forward, eventually ? or will doom await there, too ? you mentioned that the magic translation that makes things work is a "bug" ...21:42
whitequarknah, gtk>=3.22 is fine21:43
whitequarkthey allow me to request a GL ES context, which is the proper way to do what I want21:43
whitequarkand I think even NVidia supports it these days21:43
whitequarkwpwrak: oooh, so I have an evil ide21:44
DocScrutinizer05>>Thio Yu Jin <jin@singmail.com> complains that on his Toshiba 4010CDS the Ctrl-Alt-Shift-T key combination brings up the Toshiba user manual. (04 Mar 1999 - not April 1.)<<21:50
DocScrutinizer05epic shit in http://homepages.cwi.nl/~aeb/linux/kbd/scancodes-1.html21:52
whitequarkwpwrak: good news. I have it working on gtk 3.16+. however, the text in the text window is replaced by rectangles.22:27
wpwrakall hail the new universal simplified character set ! ;-)22:31
DocScrutinizer05path to font22:34
DocScrutinizer05I've seen this effect frequently when the dir with fonts wasn't available thanks to a failed mount. Probably other path mismatches have a similar effect as result22:41
DocScrutinizer05where iirc path_to_font even includes stuff like 11PT and intalic, sometimes22:42
whitequarkI do not use the crappy X font system22:46
DocScrutinizer05well, no idea. rectangles instead chars usually means the char is unknown aka cannot be found in system23:26
whitequarkI know what happened exactly, I wrote that font renderer...23:27
--- Sat Jan 14 201700:00

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