2016-05-24 00:21 limpkin has joined #qi-hardware 2016-05-24 02:20 fengling has joined #qi-hardware 2016-05-24 03:32 sandeepkr has quit [Ping timeout: 244 seconds] 2016-05-24 03:53 archang has joined #qi-hardware 2016-05-24 04:00 DocScrutinizer05 has quit [Disconnected by services] 2016-05-24 04:00 DocScrutinizer05 has joined #qi-hardware 2016-05-24 04:32 luke-jr has quit [Ping timeout: 260 seconds] 2016-05-24 04:42 luke-jr has joined #qi-hardware 2016-05-24 05:14 incomprehensibly has quit [Ping timeout: 240 seconds] 2016-05-24 05:15 incomprehensibly has joined #qi-hardware 2016-05-24 05:16 apelete_ has joined #qi-hardware 2016-05-24 05:16 apelete has quit [Remote host closed the connection] 2016-05-24 06:04 archang has quit [Ping timeout: 272 seconds] 2016-05-24 07:03 dandon has joined #qi-hardware 2016-05-24 07:11 dandon has quit [Quit: .] 2016-05-24 07:12 dandon has joined #qi-hardware 2016-05-24 07:38 doomlord has joined #qi-hardware 2016-05-24 08:11 apelete_ is now known as apelete 2016-05-24 08:13 pcercuei has joined #qi-hardware 2016-05-24 08:34 dandon has quit [Quit: .] 2016-05-24 08:36 dandon has joined #qi-hardware 2016-05-24 09:24 wpwrak: btw, any luck using solvespace yet? 2016-05-24 09:25 as an aside, I discovered recently that, only on the gtk port, the tab keybinding was broken 2016-05-24 09:25 (it shows and hides the text window) 2016-05-24 11:06 mth has quit [] 2016-05-24 12:00 mth has joined #qi-hardware 2016-05-24 12:27 oh, having a "hotkey" sounds nice 2016-05-24 12:29 and i haven't tried anything "real" yet. for something major i'd really need variables / stored expressions and possibly tables (computed repetitions) 2016-05-24 12:29 i also found difficulties in the workflow. e.g., often enough, it seems to turn everything into a ball of messed-up things that i can only get out with "undo" or by restarting from scratch 2016-05-24 12:31 that happens mainly if i start with something that in the end doesn't need to be at the center of the construction. might actually help if one could just freeze recomputing, perform a set of changes, then try to recompute, and hurriedly get back again if recomputing results in the "ball" 2016-05-24 12:38 fengling has quit [Ping timeout: 240 seconds] 2016-05-24 12:43 (variables/stored expressions) ack. that's on the roadmap "soon", meaning right after unit tests 2016-05-24 12:43 adding unit tests is... involved 2016-05-24 12:44 an example of why it's involved is that currently the rendering is done by calling opengl all over the place, and sometimes even invoking the GUI message loop in a middle of computation 2016-05-24 12:44 sandeepkr has joined #qi-hardware 2016-05-24 12:44 this already fails with offscreen rendering (that is needed to overlay the editor on Linux and OS X), since... well... if the message loop is not running because it's preempted by a long computation, there's nothing to flip the buffers to show the "long computation" progress bar 2016-05-24 12:45 but this makes e.g. rendering to a cairo surface impossible 2016-05-24 12:45 and rendering to gl for unit tests means it's impossible to have reference rendering in the repo, because opengl has major differences in rendering on ifferent platforms 2016-05-24 12:45 this is very aggravating. 2016-05-24 12:45 actually, s/unit tests/integration tests/, but the rest is unchanged. 2016-05-24 12:46 wpwrak: (ball of messed-up things) can you clarify? 2016-05-24 12:46 you can check the "relax constraints and dimensions" checkbox in the group properties 2016-05-24 12:47 that lets you to move things around freely without invoking the solver. 2016-05-24 12:48 mth has quit [Ping timeout: 260 seconds] 2016-05-24 12:48 (undo) the undo stack is 10 levels deep, which to me seems very silly. 2016-05-24 12:49 it's mainly that short because of memory management, or lack thereof. it's just a static array. 2016-05-24 12:49 i feel like a more proper "history" view ought to exist, like in photoshop (that allows you to go back and forth, and even says what action caused the undo state to be pushed) 2016-05-24 12:54 mth has joined #qi-hardware 2016-05-24 12:54 (gui unit test) sounds nasty. but you could perhaps test the underlying geometry, if that's something you're not testing yet 2016-05-24 12:55 (shallow undo) yes, agreed. being able to change history is a nice feature :) 2016-05-24 12:56 (ball of things) one mistake i made when trying the "wedge" shape of anelok was that i just accepted default dimensions and tried at the end to set the right, much smaller values 2016-05-24 12:56 oh yeah 2016-05-24 12:57 what happened then is that the while thing reconfigured itself to a completely new topology, and wouldn't flip back to the original topology. 2016-05-24 12:57 ohhhhh 2016-05-24 12:57 yeah this is a well known problem 2016-05-24 12:57 the underlying cause is that many constraints are not signed 2016-05-24 12:57 yup. those implicit constrainrs 2016-05-24 12:57 and so they have bistable configurations 2016-05-24 12:57 you can explicitly flip them in some cases by entering a negative value for a dimension 2016-05-24 12:57 just what i thought :) 2016-05-24 12:57 or, you can "relax all constraints and dimensions" 2016-05-24 12:57 hmm :) 2016-05-24 12:58 but really none of that is a real solution because this would break hilariously with parametric sketches 2016-05-24 12:58 the real solution is to make them signed. 2016-05-24 12:58 if it's just signs, maybe some sort of "sign flip" tool could be useful ? 2016-05-24 12:58 yes, there's one. 2016-05-24 12:58 enter a negative value for a dimension. 2016-05-24 12:58 it will flip the sign. 2016-05-24 12:59 i was thinking more of something clickable :) show all the things there the sign could be reversed, then experiment 2016-05-24 12:59 s/there/where/ 2016-05-24 12:59 that's dressing up a bug instead of fixing it 2016-05-24 12:59 e.g. imagine a hexagon, constrained in the obvious way. say a hex head screw cap 2016-05-24 12:59 well, the signs are somewhat arbitrary from a user perspective anyway 2016-05-24 12:59 now if it's a parametric sketch and you instantiate it with a value 2, it works 2016-05-24 13:00 if then you re-instantiate it with a value 10, then it's going to get all inside out 2016-05-24 13:00 and transform into a david's star 2016-05-24 13:00 mth has quit [Ping timeout: 246 seconds] 2016-05-24 13:00 the real solution to this is to make solver never flip signs of constraints. right now they are ignored. 2016-05-24 13:00 ah yes, that would help a lot 2016-05-24 13:01 we have actually implemented this, but it didn't work out very well because the old files don't store sign 2016-05-24 13:01 and breaking backwards compat is a major no 2016-05-24 13:01 if there are multiple choices, does it prefer non-self-intersecting solutions over self-intersecting ones, or does that not influence the result ? 2016-05-24 13:01 so... you know... unit tests... that's how i realized we HAD to have them. 2016-05-24 13:01 it doesn't care. 2016-05-24 13:01 might be another useful guide 2016-05-24 13:02 the solver is wholly unaware that geometry exists, it solves a system of linear equations, in the straightforward way 2016-05-24 13:02 moreover, it does not find more than one solution, ever 2016-05-24 13:02 and it cannot, not with the method of solving we're using 2016-05-24 13:02 so searching for a non-intersecting geometry, unless it can be straightforwardly expressed as more equations, isn't going to work 2016-05-24 13:03 hmm, and it's probably too slow to just do this by trying combinations 2016-05-24 13:03 yes. 2016-05-24 13:03 and it's not like it has combinations, the space easily has a massive amount of dimensions 2016-05-24 13:04 I'm pretty sure one can write a PhD or two on the topic 2016-05-24 13:04 well, you could first find all the signs that can be tweaked, then try +++++. ++++-, etc. 2016-05-24 13:04 better just avoid the sign problem entirely. 2016-05-24 13:04 but, combinatory explosion 2016-05-24 13:04 yes. that's unviable. 2016-05-24 13:05 it's already slow as it is, without even adding this sort of complexity 2016-05-24 13:05 you could probably come up with very clever heuristics that keep the number of guesses low :) 2016-05-24 13:05 I don't see a point. 2016-05-24 13:05 like I said, the solution is to avoid the bug entirely, not dressing it up. 2016-05-24 13:06 i.e., based on the assumption that people will tend to intervene when the design moves in an unintended direction. so it would usually be just the last one or two edits that may have had an unintended interpretation. 2016-05-24 13:06 but yes, if you can avoid it nicely, even better 2016-05-24 13:07 (gui integration tests) there are currently 0 tests in the solvespace codebase 2016-05-24 13:07 and testing geometry without rendering it is orders of magnitude harder even 2016-05-24 13:07 but more importantly, it doesn't actually test that e.g. it can be created, that dragging stuff around doesn't cause crashes, that the menus and links in text window work... 2016-05-24 13:07 (compatibility) you could just use the old interpretation and store a (* 1, * -1) flag for newer designs. it have a global format version somewhere ;-) 2016-05-24 13:08 there's a small part of the geometric core exposed as a library but it doesn't have NURBS booleans, meshes, etc, etc 2016-05-24 13:08 doesn't even have groups, IIRC 2016-05-24 13:09 just the solver within a single group. so that's not very useful. and similarly it doesn't know how to load things, and cannot be easily taught to, for complicated reasons 2016-05-24 13:09 i decided to go with integration tests based on rendering first, and perhaps once i have a proper API and Python or Lua bindings, test it directly using that API 2016-05-24 13:10 since the API is much more work, this will allow me to iterate on other things that have a high bug introducing potential earlier 2016-05-24 13:10 yeah, tricky. but i guess you could test anything 2D by just driving the underlying engine. it often helps to split a complex testing problem into different tests of subsystems. so one would just look at a bunch of numbers, another at a sceenshot, etc. 2016-05-24 13:10 yes, you can test most of the things within a single group using the exposed core 2016-05-24 13:11 also, your tests don't need to be exact. i.e., you could let them pass if, say, 1% of pixels are off. or whatever metric you find useful. such tests would still alert you if there's a major screw-up. 2016-05-24 13:11 that's not where most bugs are created though, since that part of code is quite robust and also I basically never change them 2016-05-24 13:11 "1% of pixels" is a poor metric. an error message can well be under 1% of red pixels 2016-05-24 13:11 moreover, if I accidentally introduce a floating point instability or something like that, I absolutely do want to be alerted. it ought to be deterministic. 2016-05-24 13:12 print errors to stderr and check them separately :) 2016-05-24 13:12 that's just piling more hacks on already bad code. 2016-05-24 13:12 yes, but the floating point problem would show up on the numerical tests. unless you hit something that breaks opengl 2016-05-24 13:12 divide and conquer ;-) 2016-05-24 13:13 the numerical tests do not cover most of the code 2016-05-24 13:13 most of the code in solvespace deals with meshes, NURBS, and drawing sketches 2016-05-24 13:13 as well as loading and saving various files 2016-05-24 13:13 I'm actually not concerned about testing the geometric core because it's very simple and I don't think I've *ever* introduced a problem into it 2016-05-24 13:14 but e.g. drawing constraints? that's a thousand lines of extremely complicated control flow that depends on many factors like scale, font size, exact positioning, camera angle... 2016-05-24 13:14 generating meshes is a whole separate can of worms still 2016-05-24 13:15 that should be easy: have known input, load, then save, compare the results. if the match in content, use the saves one as your input. add a bit of epsilon so that you don't end up chasing your own tail. 2016-05-24 13:15 yes. roundtrip testing is exactly what i'm going to do, both with savefiles and on-screen rendering contents 2016-05-24 13:15 drawing constraints may be tricky. also because there may be many correct answers 2016-05-24 13:16 except no epsilon, because again, that's just setting yourself out for failure. 2016-05-24 13:16 but i guess there's only so much you can do. if you're unlucky, a minor tweak will invalidate most of your tests, even though the result is still correct, just in a different way 2016-05-24 13:16 if it doesn't match, then there is a reason, and you better find and fix it. knowing why that happened is even more important than actually fixing the problem. 2016-05-24 13:16 well... it's not quite that dramatic. 2016-05-24 13:17 i'll export the rendered results in a way that allows quick visual compare. (a/b slider, if you've seen the one on github) 2016-05-24 13:17 so once you're done with that, you can quickly go through the tests and "approve" (really just git add) them 2016-05-24 13:17 (no epsilon) if save->load->save naturally converges, even better 2016-05-24 13:17 it shouldn't change. 2016-05-24 13:18 well. the only reason for nondeterminism i see is ieee754 error, but for that we don't save with the *entire* double precision, i think there are 6 significant digits or so 2016-05-24 13:18 and if there's an error within those, things are bad 2016-05-24 13:18 (visual compare) yup, never underestimate the computing power of that piece of wetware ;-) 2016-05-24 13:19 there's also testing the text window itself... 2016-05-24 13:19 dump as ascii ? :) 2016-05-24 13:19 it uses a printf-like facility right now, with every piece of styling set up using vt52-like escape codes 2016-05-24 13:19 could it get any easier ? ;-) 2016-05-24 13:19 which is absolutely unmaintainable, among other things 2016-05-24 13:20 well. no. comparing to known text result isn't especially interesting 2016-05-24 13:20 what *is* interesting is driving the UI tests through the parts where one clicks on a link. 2016-05-24 13:20 this is internally done by printf'ing a function pointer, which is then magically recorded inside the "framebuffer" 2016-05-24 13:21 neat ;) 2016-05-24 13:21 "neat" is not the word I'd use 2016-05-24 13:21 just run it under valgrind every now and then :) 2016-05-24 13:21 for one, it requires lots of completely unnecessary global state, because pointers to members aren't compatible with C function pointers 2016-05-24 13:22 and so all the callbacks have to be static 2016-05-24 13:22 (in the C++ sense, that is, nonmembers, with no access to member data) 2016-05-24 13:22 for another, this is making testing really hard 2016-05-24 13:22 like, I cannot use the link name, because there are often many links with the same name 2016-05-24 13:22 and using link position in absolute coordinates makes tests very fragile 2016-05-24 13:23 name + #occurrence ? 2016-05-24 13:23 that's not an especially bad solution, although it still is fragile 2016-05-24 13:23 e.g. think of the configuration screen with lots of [edit] 2016-05-24 13:23 iterative search: patter/pattern/pattern/name 2016-05-24 13:23 do I edit fifty tests every time I add a field? 2016-05-24 13:24 bleh 2016-05-24 13:24 worst of all, this design of the text window makes internationalization wholly impossible 2016-05-24 13:24 even if I fed the input of every printf into gettext, no translator is able to make sense of it 2016-05-24 13:25 sed 's/edit/editieren/g;s/save/sichern/g; ...' 2016-05-24 13:25 very funny. 2016-05-24 13:25 use pictograms instead of words :) 2016-05-24 13:26 well, what i'm going to do with the text window is, most likely, add some sort of templating system 2016-05-24 13:26 not unlike a backend of a website, except without the "web" part 2016-05-24 13:26 unleash the inner artist ! once you're comfortable with the approach, you can move to truly abstract stuff the experts will try to interpret for decades :) 2016-05-24 13:26 and then I have a clean interface that I can rather easily test 2016-05-24 13:27 sounds reasonable 2016-05-24 13:27 even better, I never have to encipher styling into the baroque vt52-but-not-really codes again 2016-05-24 13:27 I am *so* looking forward to that 2016-05-24 13:27 you could always use :) 2016-05-24 13:27 I've considered just embedding a web browser there. 2016-05-24 13:27 though vt52 is nicely retro 2016-05-24 13:27 it's not actually related to vt52 in any way, it just uses escape sequences that set colors, etc 2016-05-24 13:28 next step: have sub-screens for ascii-art that is then converted to pixmaps :) 2016-05-24 13:28 I find actual vt52 escape codes *far* more readable than this system 2016-05-24 13:28 which is... an impressive achievement 2016-05-24 13:30 (web browser) but then I looked at the size of such a dependency, and then I realized that not using gtk or qt on Windows means using the engine of MSIE 2016-05-24 13:30 and then I reconsidered. 2016-05-24 13:30 because it's actually not at all hard to make a minimal layout system that just does the 3.5 things the existing text window needs. 2016-05-24 13:31 there's also The Language Not To Be Named Which Makes It Impossible To Center Things Vertically 2016-05-24 13:32 hmm, not sure if i met that one 2016-05-24 13:33 CSS :) 2016-05-24 13:33 meaning, if I used HTML+CSS, then for many things the text window currently uses I'd have to use a specific combination of HTML and CSS patterns to achieve the desired look 2016-05-24 13:33 this just makes it harder and harder to maintain a consistent look and feel 2016-05-24 13:34 the editor/color picker would have to become javascript... meh 2016-05-24 13:34 ah yes, css definitely puts a lot of complexity into things 2016-05-24 13:35 like, I know web dev, I did it commercially for many years 2016-05-24 13:35 which is exactly why /I do not want to add webdev here/ 2016-05-24 13:35 fengling has joined #qi-hardware 2016-05-24 13:37 honestly the thing that surprises me most is people who did webdev for years who want other things to be more like webdev 2016-05-24 13:38 if you're a hammer, you want everything to look like a nail :) 2016-05-24 13:39 what if you're a hammer with a massive migraine 2016-05-24 13:40 fengling has quit [Ping timeout: 240 seconds] 2016-05-24 13:42 that's part of the job description :) 2016-05-24 14:06 mth has joined #qi-hardware 2016-05-24 14:37 fengling has joined #qi-hardware 2016-05-24 14:42 fengling has quit [Ping timeout: 240 seconds] 2016-05-24 15:10 pcercuei has quit [Quit: Lost terminal] 2016-05-24 15:10 pcercuei has joined #qi-hardware 2016-05-24 15:11 wpwrak has quit [Read error: Connection reset by peer] 2016-05-24 15:12 wpwrak has joined #qi-hardware 2016-05-24 15:39 fengling has joined #qi-hardware 2016-05-24 15:43 fengling has quit [Ping timeout: 240 seconds] 2016-05-24 16:25 pcercuei has quit [Quit: leaving] 2016-05-24 16:40 fengling has joined #qi-hardware 2016-05-24 16:45 fengling has quit [Ping timeout: 240 seconds] 2016-05-24 17:30 sandeepkr has quit [Ping timeout: 260 seconds] 2016-05-24 17:42 fengling has joined #qi-hardware 2016-05-24 17:46 fengling has quit [Ping timeout: 240 seconds] 2016-05-24 18:00 fengling has joined #qi-hardware 2016-05-24 18:05 fengling has quit [Ping timeout: 240 seconds] 2016-05-24 18:36 hmmmm https://www.washingtonpost.com/news/wonk/wp/2015/07/23/call-off-the-bee-pocalypse-u-s-honeybee-colonies-hit-a-20-year-high/ 2016-05-24 18:37 but 48% of them died this winter 2016-05-24 19:02 fengling has joined #qi-hardware 2016-05-24 19:06 fengling has quit [Ping timeout: 240 seconds] 2016-05-24 19:18 mth has quit [Ping timeout: 250 seconds] 2016-05-24 19:52 mth has joined #qi-hardware 2016-05-24 20:03 fengling has joined #qi-hardware 2016-05-24 20:07 fengling has quit [Ping timeout: 240 seconds] 2016-05-24 20:10 mth has quit [Ping timeout: 246 seconds] 2016-05-24 21:04 mth has joined #qi-hardware 2016-05-24 21:04 fengling has joined #qi-hardware 2016-05-24 21:08 fengling has quit [Ping timeout: 240 seconds] 2016-05-24 21:17 doomlord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…] 2016-05-24 21:41 doomlord has joined #qi-hardware 2016-05-24 21:42 mth has quit [Ping timeout: 258 seconds] 2016-05-24 21:43 mth has joined #qi-hardware 2016-05-24 21:49 mth has quit [Ping timeout: 244 seconds] 2016-05-24 21:49 doomlord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…] 2016-05-24 21:50 doomlord has joined #qi-hardware 2016-05-24 22:00 doomlord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…] 2016-05-24 22:05 fengling has joined #qi-hardware 2016-05-24 22:10 fengling has quit [Ping timeout: 240 seconds] 2016-05-24 22:11 mth has joined #qi-hardware 2016-05-24 22:18 MistahDarcy has joined #qi-hardware 2016-05-24 22:18 MistahDarcy has quit [Changing host] 2016-05-24 22:18 MistahDarcy has joined #qi-hardware 2016-05-24 22:20 MistahDarcy has quit [Excess Flood] 2016-05-24 22:30 doomlord has joined #qi-hardware 2016-05-24 22:47 mth has quit [Ping timeout: 276 seconds] 2016-05-24 22:54 doomlord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…] 2016-05-24 23:06 fengling has joined #qi-hardware 2016-05-24 23:11 fengling has quit [Ping timeout: 240 seconds] 2016-05-24 23:12 doomlord has joined #qi-hardware 2016-05-24 23:34 mth has joined #qi-hardware 2016-05-24 23:57 doomlord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]