freenode/#clim - IRC Chatlog
Search
8:20:30
jackdaniel
could you comment on formatting-table issue you have filled? https://github.com/robert-strandh/McCLIM/issues/93
8:44:54
scymtym
jackdaniel: maybe i'm imagining this, but in the "Bordered-Output" demo, didn't the first Oval change its background to white when highlighted? now it just seems to flicker briefly
8:47:19
jackdaniel
scymtym: thanks. "Bordered-Output"? you mean `tables with borders` or `border styles tests`?
8:49:16
scymtym
the demodemo button is labeled "Border Styles Test", the window it opens has the title "Bordered-Output"
8:51:37
jackdaniel
loke`: I have left another comment there – yes, I understand better what you meant now
8:54:37
jackdaniel
basically this isn't something directly caused by my changes, it just happens, that highlighting-output-border uses the same code as standard-output-border. specializing method for highlight to use old behavior may work just fine (not sure yet)
9:01:29
jackdaniel
yes, thanks. I'm not sure if it will be easy, that will require at least two passes across all rows (some columns may rival for space, how do we arbiter that – etc), but now it is more clear to me
9:05:25
jackdaniel
unless we take greedy heuristic and we starve remaining columns if one takes most of the space
9:06:57
loke`
I started looking at it some time ago, and I also came to the conclusion that at least two passes are needed (well, two passes in the case when there is a contention)
9:07:53
jackdaniel
I know how to implement that (and if we allow situation, where remaining columns are space-starved, it requiers just one pass), but I'll wait for MatthewRock, so he doesn't feel like I have stolen it from him
10:08:30
jackdaniel
if we have equalize-width t, then obviously all columns take (min (/ pane-width n) biggest-width), if we don't, then (for greedy approach) – mth-column takes (min col-requested-width (- pane-rest-width (* rest-cols min-width)))
10:09:47
loke`
jackdaniel: But there is no way of knowing the requested width of a column without rendering it
10:10:18
loke`
And if a column turns out to request too much width, then it needs to be re-rendered with a narrower width.
10:11:52
jackdaniel
loke`: you provide in both cases :max-width as approprietly (/ pane-width n) and (- pane-rest-width (* rest-cols min width)), and then you judge, what is smaller
10:15:34
loke`
jackdaniel: How can they be known? Let's say you have columns A and B. Pane width is 100. B contains nothing but the letter "X" (i.e. super narrow) and has width 5. How will you know that the max width for A will be 95 by the time you render it? This information isn't known until B has been rendered.
10:18:33
jackdaniel
as I said, greedy approach assumes, that you assign space as you go. First you render A (equalize-width is NIL) – you provide :max-width (- pane-width (* 1 col-min-width)) ; ("1", because there is one remaining column)
10:28:58
jackdaniel
so when you render B, you have :max-width (- pane-width all-previously-rendered-columns (* 0 col-min-width)) ; ("0", because tehre is no columns left)
10:35:21
loke`
jackdaniel: But if A requests 90% of the width, you won't know if that's going to be acceptable until you render B.
10:36:07
loke`
It may be that B only requetss a width of 5, in which case all is good. But if B requests 20, then you need to re-render A with a max width of 80
10:41:40
loke`
jackdaniel: I'm pretty sure it doesn't work that way in HTML. Let me give another example to highlight it. Let's say you have two columns. Total width 100. Both column A and B want to have a width of 60. With your proposal, A wiuld be 60 and B would be 40. I'd like them to both be 50.
10:42:35
loke`
jackdaniel: But that will give a bad result if A wants to be 80 and B wants to be 10.
10:47:56
jackdaniel
arranging columns as you suggest isn't well defined in my understanding. How do you decide, if they should have equal width (60 vs 40 -> 50 vs 50) vs (80 vs 20 -> 80 vs 20)?
10:51:01
loke`
jackdaniel: That would depend on the weight of each column. The weight by default should be equal for all.
10:52:15
loke`
if one column has weiight 2 and the rest have 1, then that column get twice as much space than the rest.
10:58:12
loke`
That's essentially what I'd like. The weight would be useful, but to be honest I rarely used it in Java
11:00:38
jackdaniel
as you have mentioned, this algorithm would require displaying each cell content twice. I'm sure we can't do that unless we rewrite it as incremental-output which would be a big task I think (without breaking the spec that is)
11:04:11
loke`
jackdaniel: Hmm... does it? Oh wait... Yes. Incremental output contains the newlines as well.
18:31:12
jackdaniel
beach: could you add Nisar Ahmad (handler @nsrahmad) as a contributor to McCLIM repository please?
18:37:31
jackdaniel
(rationale: he contributes high quality code to McCLIM for quite long time and reports issues promptly – hence he is testing the code, IMO he definetely deserves that status)
18:48:23
jackdaniel
and there are still active bounties. I believe though, that internal motivation is best, and I believe that's what most hackers have
18:49:04
jackdaniel
but if you are willing to chip in to McCLIM funds (or to give him some money), I have to say it is very noble from your side and I support it ;-)
18:51:20
jackdaniel
stassats: that sounds like a praise to us – given how much development IE6 had compared to McCLIM (re the clipping issue comment)
18:53:10
jackdaniel
well, last time I've used windows as my system was 10 years ago and I don't remember if I had used IE6 at all, so I don't have strong opinion on that. I'm glad you're glad though