xkapastel has quit [Quit: Connection closed for inactivity]
andyjpb has joined #picolisp
xkapastel has joined #picolisp
orivej has joined #picolisp
orivej_ has joined #picolisp
orivej has quit [Read error: Connection reset by peer]
mtsd has quit [Quit: Leaving]
rob_w has quit [Quit: Leaving]
<beneroth>
Regenaxer ping
<beneroth>
Regenaxer, when working with svg.l, you do manually determine length of a line? and I assume you have no code for block formatting of text body?
<beneroth>
asking just in case
<beneroth>
maybe SVG styling could be used for that, I'm unsure
<beneroth>
Regenaxer, we probably discussed before, but I forgot: Why did you switch from latex to SVG? because of the multi-purpose use of SVG? or because LaTex is such a big installation?
<Regenaxer>
No, there is no way to determine the length of aline in the server (same problem was with @lib/ps.l)
<Regenaxer>
I switched latex.l -> ps.l -> svg.l
<Regenaxer>
latex was not very convenient
<Regenaxer>
and, yes, svg is more useful
<beneroth>
guessed so
<Regenaxer>
eg in PilBox
<Regenaxer>
there is no ps / pdf in native Android
<beneroth>
in which ways was latex inconvenient? too much debug time?
<Regenaxer>
not so flexible
<Regenaxer>
you cannot draw something direcyly
<Regenaxer>
LaTex wants to do the layout
<Regenaxer>
good for documents if a class is given
<beneroth>
ah yes
<beneroth>
I see
<Regenaxer>
Problem with PS is also international characters
<Regenaxer>
no UTF-O
<Regenaxer>
8
<beneroth>
you only have reports, not e.g. letters where user can write content in App and then PDF is generated (with additional header, receiver address, etc.) ?
<beneroth>
uh that is a biggy
<Regenaxer>
I have letters too
<beneroth>
no problem with SVG I assume?
<Regenaxer>
and invoices and other documents
<beneroth>
ok how do you solve the "block formatting would be nice" topic there? user enters strict lines?
<Regenaxer>
Never tried to solve it
<beneroth>
I currently have a textarea, user-entered line-breaks are kept, additional linebreaks are added at spaces when necessary to keep line length in a character limit
<beneroth>
rendering (kerning etc) is of course not taken into account
<beneroth>
looks good enough, I think
<beneroth>
but yeah, looks left-aligned, not block formatted :)
<Regenaxer>
One difficult point with svg is page breaks
<beneroth>
yes, that I had too
<Regenaxer>
In ps I just do (page T)
<Regenaxer>
Now it must be nested
<Regenaxer>
I do that with coroutines
<Regenaxer>
one coroutine generates lines or text pieces
<beneroth>
currently I solve it by first ensure the number of lines I have, then determine from that the number of pages.
<Regenaxer>
the main part does the nesting
<beneroth>
the code is not optimized (I don't make use of coroutines), but good enough for now it seems
<beneroth>
ok
<beneroth>
sounds interesting
<Regenaxer>
But not usuable in general
<Regenaxer>
I dont know how many lines will appear
<beneroth>
yeah it's highly document "layout" design specific
<Regenaxer>
the code is a loop with lots of flow functions
<Regenaxer>
if while when etc
<beneroth>
the area "documents" is way deeper then what meets the eye
<Regenaxer>
right
<Regenaxer>
eg an invoice
<Regenaxer>
it is generated from many conditions
<beneroth>
I understand
<beneroth>
yeah I have while loops and poping here too
<Regenaxer>
With coroutines it is trivial
<Regenaxer>
ok
<beneroth>
ok
<Regenaxer>
The logic just produces the lines
<Regenaxer>
and (yield) after a line or a block
<beneroth>
I would be interested in reviewing your code eventually :) not now.. but will rework my code some time in the future
<beneroth>
ah nice idea
<beneroth>
i SEE
<Regenaxer>
I think app does that
<beneroth>
no need to store the state explicitly
<beneroth>
ok
<Regenaxer>
ah, no, no coroutine in app/lib.l
<Regenaxer>
yes, state is separated
<Regenaxer>
ie. two states, one in the logic and one in the layout
<beneroth>
yeah I see
<beneroth>
I just have a bunch of local variables
<beneroth>
but the layout here is not so involved
<Regenaxer>
ok
<beneroth>
at least...yet
<Regenaxer>
hehe, yeah
xkapastel has quit [Quit: Connection closed for inactivity]
<beneroth>
just a specific implementation to solve this client case here
<beneroth>
not good for general case
<beneroth>
and yeah I want to solve the general case :)
<Regenaxer>
but ok cause never generalize too early
<beneroth>
aye
<beneroth>
one also needs first some specific examples to generalize from
<Regenaxer>
T
<beneroth>
generalizing out of thin air usually ends in premature optimization and overengineering