libera/#clim - IRC Chatlog
Search
14:48:53
etimmons
I'm seeing some weird behavior where if I format-graph-from-roots inside a with-output-as-presentation, the output isn't drawn until I so something like scroll the pane (it's drawn in full) or I mouse over it while accept'ing its presentation type (it's drawn in piecemeal).
14:50:12
etimmons
ACTION posted a file: (123KiB) < https://libera.ems.host/_matrix/media/r0/download/davidson-timmons.com/PcEYeJOtwgeEfKuzAsLOpaBj/2021-11-11%2009-45-00.mkv >
16:33:28
etimmons
ACTION posted a file: (1KiB) < https://libera.ems.host/_matrix/media/r0/download/davidson-timmons.com/NAWVpIkapPFiwqgNYiGwVKyP/graph-glitch.lisp >
16:49:43
jackdaniel
I see what's going on, I will need to think what is the right thing to do though
16:50:14
jackdaniel
for a time being you may put (stream-replay pane) at the end of display-app -- when the issue is fixed you won't need this
16:50:48
jackdaniel
n.b this may be the same issue that makes accepting-values disappear at times (not sure yet)
16:56:50
etimmons
For some reason, the horizontal scroll bar doesn't work correctly until I resize the frame. Can't reproduce that on the test case code, though.
17:00:34
etimmons
Haha. Well, I appreciate it. This is very fun to use and is going to help me out a lot as I'm debugging some algorithms.
17:20:40
etimmons
Got it reduced! Key was :display-time nil. If you uncomment the dotimes, you'll see the vertical scroll bar works as expected, but I can't get the horizontal one to work until I resize the frame.
17:20:45
etimmons
ACTION posted a file: (1KiB) < https://libera.ems.host/_matrix/media/r0/download/davidson-timmons.com/fdsKqWCSWbOZGxbcGUYDjFvt/graph-glitch-horizontal-scroll.lisp >
17:25:51
etimmons
I'm taking the :display-time nil approach because my pane displaying the graph changes rather infrequently and I wanted to avoid repeating calls to graphviz for layout.
19:29:50
jackdaniel
finally, when the stream is drawing-p *and* <xxx>, it turns off recording and replays output records
19:30:03
jackdaniel
where <xxx> is (output-record-ancestor-p (stream-output-history stream) graph-output-record)
19:30:31
jackdaniel
when you put formating graph in with-output-as-presentation, then the parent output record is the presentation output record /not yet added to the stream/
19:31:14
jackdaniel
the only remaining thing is to think hard why there is <xxx> requirement for graphs, perhaps git blame will help
19:32:46
jackdaniel
the commit message doesn't explain why and it adds it along with the drawing-p requirement, so let's take for now that <xxx> was a mistake (and, either way, this change was done for performance)
19:34:00
jackdaniel
I'm glad that it is /not/ a new bug, it makes it two introduced bugs vs three fixed now
19:42:23
etimmons
You're welcome. I have a habit of breaking software, so there might be more incoming.
19:43:02
etimmons
Hopefully the horizontal scroll issue is as easy to find (assuming I'm not doing something stupid by using :display-time nil)
19:45:03
etimmons
I think I got commit bits on ASDF in large part due to incessant MRs for weird corner cases.
19:54:21
jackdaniel
The defined ones are: :TREE, :DIRECTED-ACYCLIC-GRAPH, :DAG, :DIRECTED-GRAPH, :DIGRAPH.
19:57:47
jackdaniel
with-output-as-presentation also isn't the culpirt (the problem persists after removing it)
19:58:16
jackdaniel
regarding looking for a pane, the first application pane in :panes is bound to *standard-output*, so you may rely on that in such simple cases
20:01:00
jackdaniel
also (and this part is not in the specification), *debug-io* is left as is, so if you want to print something to repl as means of debugging then you have it available
20:05:38
jackdaniel
as a workaround you may put (change-space-requirements *standard-output*) in the command body after the output
20:08:08
jackdaniel
note that horizontal and vertical scrolls behave the same, the difference you saw is because you used two different mechanisms
20:08:56
jackdaniel
drawing graphics and printing text behave differently (i.e the latter have sementics for end-of-line and end-of-page defined and calls change-space-requirements)
20:09:27
jackdaniel
if you replace the command body with drawing a line, then neither scroll will update
20:09:30
jackdaniel
(draw-line* *standard-output* 20 20 800 800 :line-thickness 5 :ink +deep-sky-blue+)
20:12:03
etimmons
OK, makes sense. I'll shove the change-space-requirements in there for now until I switch over to incremental output
20:12:18
jackdaniel
note that changing the space requirements eagerly in the case of graphics may have rather catastrophic consequences
20:13:19
jackdaniel
if the stream has width / height set to :compute, then it is taken into account after invoking the display funciton
20:14:41
jackdaniel
re catastrophic consequences: consider that someone probes the sheet dimesnions and draws a horizontal line from 0 to the stream width, and then you have some kind of margin computation - you may and up in a window getting larger with each invocation
20:15:01
jackdaniel
if you pair executing the command with some frequent handle-event you may get funny results :)
20:16:05
jackdaniel
that's rather a programmer shooting their own foot scenario, still it isn't unimaginable
20:16:22
etimmons
Got it! Then yeah, I'm leaning toward this not being a bug. Since there's no obvious place for that to be computed with :display-time nil
20:17:41
jackdaniel
as of where to hook it, executing a command could be wrapped in changing-space-requirements, and then each record added would call change-space-requirements
20:18:12
jackdaniel
the former macro inhibits eager reasize, so all drwings would be aggregated and only after the command we'd start resizing