« first day (147 days earlier)      last day (412 days later) » 

cfr
1:14 AM
@SašoŽivanović Thanks for sending the prooftrees version, especially. It is helping when I get stuck. However, can you tell me why this doesn't work?
              for name/.process={OwO4w4}{proof tree proof line no}{just ##1}{proof tree proof line no}{just}{just options}{y}{% from Sašo's anti-pgfmath version - rhaid ddweud proof tree proof line no yn ddwywaith ?! dim yn bosibl i ailddefnyddio'r gyntaf ?!
                if={(strequal(content(),""))||(strequal(content(),"##2"))}{%
                  content={##2},
                }{%
                  content+'={\foresteregister{merge delimiter}##2},
                  TeX={\PackageWarning{prooftrees}{Merging conflicting justifications for line ##1! Please examine the output carefully and 
If I substitute your version, it works. That version replaces
if={(strequal(content(),""))||(strequal(content(),"##2"))}{%
with
                if'={{O_= O_= |}
                  {content}{}
                  {content}{##2}
                }{%
I know what this does - sort of, anyway. But I don't know why the strequal version doesn't work. I should say that it works in many cases, but not all. With my current test file, I get my first error after 1500 lines. It happens if two justifications for the same line include macros defined with \ensuremath, such as \tnot or \liff. However, defining them without \ensuremath doesn't work either.
I've not been able to produce an MWE using just Forest yet, though.
@SašoŽivanović I didn't know there was such a thing as reverse Polish notation. (Only Polish notation.)
 
cfr
1:41 AM
@SašoŽivanović The documentation for .option currently says only that it can capture the value of the option at the current node. I gather from the code you sent that it can also use the value of option at another node e.g. !uu or whatever. Is this new? Do you plan to update the description with this? (Is the same true for .register?)
 
 
2 hours later…
cfr
3:35 AM
@SašoŽivanović It compiles. Too bad the results are such a mess. I've screwed up somewhere.
 
 
10 hours later…
cfr
1:19 PM
@SašoŽivanović OK. Typos. Now I think it works again. But I've only updated simple cases.... (No where or sort of node walk stuff.) I still haven't figured out why the strequal case failed though. I can see that missing apostrophes are going to be a pain ;).
 
 
9 hours later…
cfr
10:06 PM
@SašoŽivanović If I'm using sort by' in define long step, then I need ##1 for w rather than #1 because this is essentially defining a macro? That is, define long step could take arguments and #1 would then be the first argument, hence the doubling. Is that correct?
Also, I've written
define long step={proof tree camau}{}{% from saso's code (forest2-saso-ptsz.tex) & chat.stackexchange.com/transcript/message/28321501#28321501
    r, sort by'={{O}{y},{Ow}{x}{-##1}}, sort'={filter'={descendants}{{OO!&}{proof tree rhifo}{proof tree phantom}}}%
  },
which seems to work. However, I notice that you've written sort by' with an additional +d. Is there a reason for this (speed?)? Similarly, I notice that where I have, say, if line numbering={2}{1}, you've changed it to if line numbering={n=2}{n=1}, but I'm not at all sure why.
By the way, I found The numerical modifier is not allowed. very confusing. I couldn't think what this meant. This despite the fact that I understood from the syntax specification that ! could not be followed by *n*.
Etc.
I'm also a bit unclear about the explanation of what a number means when the instruction does not take an optional numerical modifier. Something like
O3
is straightforward enough. But what about
o3
I am guessing that this would indicate 3 arguments, each to be expanded once. But the current description in terms of repeating instructions suggests that a single argument might be expanded 3 times.
What would
O!3
do?
If the option is false, would this do F -> T -> F -> T ? Or would it expect 3 arguments, each specifying an option for it to invert?
I'm also unclear what something like i3 or >3 would do.
Typos:
Furthermore, as .process can return multiple arguments, it IS easier ...
Before we finally list XXXX of available instructions ....
 
cfr
10:46 PM
@SašoŽivanović I like the new .process stuff a lot. I found the reverse Polish notation reference very helpful. (I know what Polish notation is and the rest makes it fairly obvious what reversing it means.)
 
11:12 PM
@cfr I must admit I'm very glad to hear that. I was quite afraid you'll find it too complicated. Actually, when I read your first yesterday's message in the morning, which starts "Thank you. It is awful.", I was sure you were referring to the new .process. ;-)))
Anyways, thanks a lot for digging in and all the comments! I'll start working through them now. I was already thinking about your comment on speed and did a couple of fast tests ... I'm not impressed by myself, I thought it's gonna be faster. I need to test some ideas I have about optimizing.
@cfr I was thinking about how to reuse as well. I did implement a "duplicate" instruction (*) but that's obviously not what we need here. I was thinking about swap but I'm not sure what would be the best behaviour. Right now, you can reuse simply by wrapping more arguments, and honestly, this might turn out to be the best option in the end. So, instead of:
for name/.process={OwO2w2}{proof tree proof line no}{line no ##1}{proof tree proof line no}{y}{...##1...##2...}
you could say this to reuse:
for name/.process={OWOw3}{proof tree proof line no}{line no ##1}{y}{...###1...###3...}
 
11:43 PM
@cfr I was having some strequal trouble myself. My trouble was caused by the fact that pgfmath seems to expand everything while forest's comparisons (both if option/if register and = of .process) don't. Look at this, maybe your example boils down to something like it as well.
\documentclass{article}
\usepackage{forest}
\begin{document}
\forestset{
  test1/.style={
    if={strequal(temptoksa(),"#1")}{TeX=yes}{TeX=no},
  },
  test2/.style={
    if temptoksa={#1}{TeX=yes}{TeX=no},
  },
  test3/.style={
    if'={{R_=}{temptoksa}{#1}}{TeX=yes}{TeX=no},
  },
  test/.style={test1=#1,test2=#1,test3=#1},
  TeX={\def\blabla{blabla}},
  temptoksa={}, test, TeX={---}, %
  temptoksa={}, test={}, TeX={\\},
  temptoksa={blabla}, test=blabla, TeX={---},
  temptoksa={blabla}, test=\blabla,
@cfr Yes, I do.
@cfr Correct.
@cfr +d in sort is there so that the node comparison macro knows it should compare dimensions. It's stupid I know, but after the wrap the system has no idea what's inside the argument.
@cfr I still need to measure this, but short nodewalk keys are definitely slower than long ones. (This is true by definition, as they resolve into them.) So I would recommend sticking to long keys in a package. ---But as I said, I need to measure how exactly performance is impacted.
 
cfr
@SašoŽivanović But why does it work without it?
Before we finally list XXXX XX available instructions ....
 
@cfr You're quite right about all this. Specifically, I should have written, about repeating, that repetition walks forward in the argument list. However, all this might be obsolete, as I'm thinking that not having the number as the optional argument of all instructions might speed up things. In the end, is it really too much work to say OOOOw4 instead of O4w4? Anyways, measurements await ...
 

« first day (147 days earlier)      last day (412 days later) »