gnucash master: Multiple changes pushed
Christopher Lam
clam at code.gnucash.org
Tue Feb 18 05:47:14 EST 2020
Updated via https://github.com/Gnucash/gnucash/commit/1f83cfaf (commit)
via https://github.com/Gnucash/gnucash/commit/172e371d (commit)
via https://github.com/Gnucash/gnucash/commit/c671c579 (commit)
from https://github.com/Gnucash/gnucash/commit/6149352e (commit)
commit 1f83cfaf64d1cd3c8862b427dd043154f780a772
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Mon Feb 17 21:54:35 2020 +0800
[html-chart] compact, use (ice-9 match)
Use (ice-9 match) for easier matching for the variable
'path'. Explanation; consider the snippet
(cond
((null? path) ...A...)
((and (pair? (car path)) (number (caar path))) ...B...)
(else ...C...))
This snippet is a shorthand for nested if-then-else clauses, testing
'path' successfully to determine whether to evaluate A, B or C. Some
code will also use components of 'path' eg B uses (caar path).
Using Alex Shinn's match.scm library allows more concise matching and
assignment at the same time. The syntax is (match EXPR (CLAUSE BODY ...))
(define (try path)
(match path
(() (display "null"))
((((? number? idx)) . tail) (display "B") (display idx) (newline) (display tail))
((head . tail) (display "C") (display head) (newline) (display tail))))
A: the first match is easy -- if path is '() then evaluate the first
body.
(try '())
--> "null"
C: the third match is easy -- if path is a pair, then assign 'head' to
pair's car, 'tail' to the pair's cdr, and evaluate the body which has
access to head and tail. Note the head is a string, and the tail is a
list containing a single string.
(try '("this" "that"))
--> Cthis
(that)
B: the second match is more difficult -- let's consider the
broken-down clause: a pair, (HEAD . tail); where HEAD is a
single-element list (ELT), and ELT is a match conditional satisfying
number? and is also assigns the variable idx (? number? idx).
Example:
(try '((2) "two"))
--> B2
(two)
This means the match is successful when 'path' is a pair, the pair's
car is a single-element list, and the list's sole element is a
number. The latter is bound to the variable 'idx' which is accessible
in the body. The variable 'tail' contains the path's cdr which
contains a single string.
Note: later in same commit we also use the identifier _ to denote
elements which *must* be matched, but are *not* bound to any variable.
e.g. the clause (((? out-of-bound?)) . _) means that path is a pair,
whose car is a single-element list, and the element satisfies the
predicate out-of-bound?. We don't need to use the (cdr path) therefore
we use _ as a placeholder.
commit 172e371d8a20f2bf58a382f3f59b823fa023cf24
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Tue Feb 18 07:00:40 2020 +0800
[report-core] compact, use (ice-9 match)
commit c671c579471f57c1202fe766ce13c2b0b6fcb191
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Tue Feb 18 17:12:38 2020 +0800
[jqplot] bye bye jqplot
Summary of changes:
gnucash/report/CMakeLists.txt | 3 +-
gnucash/report/html-chart.scm | 115 +-
gnucash/report/jqplot/CMakeLists.txt | 36 -
gnucash/report/jqplot/MIT-LICENSE.txt | 21 -
gnucash/report/jqplot/README.txt | 77 -
gnucash/report/jqplot/changes.txt | 410 -
gnucash/report/jqplot/copyright.txt | 56 -
gnucash/report/jqplot/excanvas.js | 1438 ---
gnucash/report/jqplot/excanvas.min.js | 3 -
gnucash/report/jqplot/gpl-2.0.txt | 280 -
gnucash/report/jqplot/jqPlotCssStyling.txt | 53 -
gnucash/report/jqplot/jqPlotOptions.txt | 276 -
gnucash/report/jqplot/jquery-1.4.2.min.js | 154 -
gnucash/report/jqplot/jquery.jqplot.css | 259 -
gnucash/report/jqplot/jquery.jqplot.js | 11388 -------------------
gnucash/report/jqplot/jquery.jqplot.min.css | 1 -
gnucash/report/jqplot/jquery.jqplot.min.js | 3 -
gnucash/report/jqplot/jquery.js | 9597 ----------------
gnucash/report/jqplot/jquery.min.js | 5 -
gnucash/report/jqplot/optionsTutorial.txt | 240 -
.../jqplot/plugins/jqplot.BezierCurveRenderer.js | 313 -
.../plugins/jqplot.BezierCurveRenderer.min.js | 3 -
.../report/jqplot/plugins/jqplot.barRenderer.js | 810 --
.../jqplot/plugins/jqplot.barRenderer.min.js | 3 -
.../report/jqplot/plugins/jqplot.blockRenderer.js | 235 -
.../jqplot/plugins/jqplot.blockRenderer.min.js | 3 -
.../report/jqplot/plugins/jqplot.bubbleRenderer.js | 759 --
.../jqplot/plugins/jqplot.bubbleRenderer.min.js | 3 -
.../plugins/jqplot.canvasAxisLabelRenderer.js | 203 -
.../plugins/jqplot.canvasAxisLabelRenderer.min.js | 3 -
.../plugins/jqplot.canvasAxisTickRenderer.js | 243 -
.../plugins/jqplot.canvasAxisTickRenderer.min.js | 3 -
.../report/jqplot/plugins/jqplot.canvasOverlay.js | 865 --
.../jqplot/plugins/jqplot.canvasOverlay.min.js | 3 -
.../jqplot/plugins/jqplot.canvasTextRenderer.js | 449 -
.../plugins/jqplot.canvasTextRenderer.min.js | 3 -
.../jqplot/plugins/jqplot.categoryAxisRenderer.js | 673 --
.../plugins/jqplot.categoryAxisRenderer.min.js | 3 -
gnucash/report/jqplot/plugins/jqplot.ciParser.js | 116 -
.../report/jqplot/plugins/jqplot.ciParser.min.js | 3 -
gnucash/report/jqplot/plugins/jqplot.cursor.js | 1108 --
gnucash/report/jqplot/plugins/jqplot.cursor.min.js | 3 -
.../jqplot/plugins/jqplot.dateAxisRenderer.js | 737 --
.../jqplot/plugins/jqplot.dateAxisRenderer.min.js | 3 -
.../report/jqplot/plugins/jqplot.donutRenderer.js | 805 --
.../jqplot/plugins/jqplot.donutRenderer.min.js | 3 -
gnucash/report/jqplot/plugins/jqplot.dragable.js | 225 -
.../report/jqplot/plugins/jqplot.dragable.min.js | 3 -
.../plugins/jqplot.enhancedLegendRenderer.js | 305 -
.../plugins/jqplot.enhancedLegendRenderer.min.js | 3 -
.../report/jqplot/plugins/jqplot.funnelRenderer.js | 943 --
.../jqplot/plugins/jqplot.funnelRenderer.min.js | 3 -
.../report/jqplot/plugins/jqplot.highlighter.js | 465 -
.../jqplot/plugins/jqplot.highlighter.min.js | 3 -
gnucash/report/jqplot/plugins/jqplot.json2.js | 475 -
gnucash/report/jqplot/plugins/jqplot.json2.min.js | 3 -
.../jqplot/plugins/jqplot.logAxisRenderer.js | 529 -
.../jqplot/plugins/jqplot.logAxisRenderer.min.js | 3 -
.../jqplot/plugins/jqplot.mekkoAxisRenderer.js | 611 -
.../jqplot/plugins/jqplot.mekkoAxisRenderer.min.js | 3 -
.../report/jqplot/plugins/jqplot.mekkoRenderer.js | 437 -
.../jqplot/plugins/jqplot.mekkoRenderer.min.js | 3 -
.../jqplot/plugins/jqplot.meterGaugeRenderer.js | 1030 --
.../plugins/jqplot.meterGaugeRenderer.min.js | 3 -
gnucash/report/jqplot/plugins/jqplot.mobile.js | 45 -
gnucash/report/jqplot/plugins/jqplot.mobile.min.js | 3 -
.../report/jqplot/plugins/jqplot.ohlcRenderer.js | 373 -
.../jqplot/plugins/jqplot.ohlcRenderer.min.js | 3 -
.../report/jqplot/plugins/jqplot.pieRenderer.js | 904 --
.../jqplot/plugins/jqplot.pieRenderer.min.js | 3 -
.../report/jqplot/plugins/jqplot.pointLabels.js | 379 -
.../jqplot/plugins/jqplot.pointLabels.min.js | 3 -
.../jqplot/plugins/jqplot.pyramidAxisRenderer.js | 728 --
.../plugins/jqplot.pyramidAxisRenderer.min.js | 3 -
.../jqplot/plugins/jqplot.pyramidGridRenderer.js | 429 -
.../plugins/jqplot.pyramidGridRenderer.min.js | 3 -
.../jqplot/plugins/jqplot.pyramidRenderer.js | 514 -
.../jqplot/plugins/jqplot.pyramidRenderer.min.js | 3 -
gnucash/report/jqplot/plugins/jqplot.trendline.js | 223 -
.../report/jqplot/plugins/jqplot.trendline.min.js | 3 -
gnucash/report/jqplot/usage.txt | 126 -
gnucash/report/report-core.scm | 16 +-
82 files changed, 53 insertions(+), 40525 deletions(-)
delete mode 100644 gnucash/report/jqplot/CMakeLists.txt
delete mode 100644 gnucash/report/jqplot/MIT-LICENSE.txt
delete mode 100644 gnucash/report/jqplot/README.txt
delete mode 100644 gnucash/report/jqplot/changes.txt
delete mode 100644 gnucash/report/jqplot/copyright.txt
delete mode 100644 gnucash/report/jqplot/excanvas.js
delete mode 100644 gnucash/report/jqplot/excanvas.min.js
delete mode 100644 gnucash/report/jqplot/gpl-2.0.txt
delete mode 100644 gnucash/report/jqplot/jqPlotCssStyling.txt
delete mode 100644 gnucash/report/jqplot/jqPlotOptions.txt
delete mode 100644 gnucash/report/jqplot/jquery-1.4.2.min.js
delete mode 100644 gnucash/report/jqplot/jquery.jqplot.css
delete mode 100644 gnucash/report/jqplot/jquery.jqplot.js
delete mode 100644 gnucash/report/jqplot/jquery.jqplot.min.css
delete mode 100644 gnucash/report/jqplot/jquery.jqplot.min.js
delete mode 100644 gnucash/report/jqplot/jquery.js
delete mode 100644 gnucash/report/jqplot/jquery.min.js
delete mode 100644 gnucash/report/jqplot/optionsTutorial.txt
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.BezierCurveRenderer.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.BezierCurveRenderer.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.barRenderer.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.barRenderer.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.blockRenderer.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.blockRenderer.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.bubbleRenderer.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.bubbleRenderer.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.canvasAxisLabelRenderer.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.canvasAxisTickRenderer.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.canvasOverlay.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.canvasOverlay.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.canvasTextRenderer.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.canvasTextRenderer.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.categoryAxisRenderer.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.categoryAxisRenderer.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.ciParser.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.ciParser.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.cursor.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.cursor.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.dateAxisRenderer.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.dateAxisRenderer.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.donutRenderer.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.donutRenderer.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.dragable.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.dragable.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.enhancedLegendRenderer.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.enhancedLegendRenderer.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.funnelRenderer.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.funnelRenderer.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.highlighter.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.highlighter.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.json2.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.json2.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.logAxisRenderer.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.logAxisRenderer.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.mekkoAxisRenderer.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.mekkoAxisRenderer.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.mekkoRenderer.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.mekkoRenderer.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.meterGaugeRenderer.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.meterGaugeRenderer.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.mobile.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.mobile.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.ohlcRenderer.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.ohlcRenderer.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.pieRenderer.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.pieRenderer.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.pointLabels.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.pointLabels.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.pyramidAxisRenderer.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.pyramidAxisRenderer.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.pyramidGridRenderer.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.pyramidGridRenderer.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.pyramidRenderer.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.pyramidRenderer.min.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.trendline.js
delete mode 100644 gnucash/report/jqplot/plugins/jqplot.trendline.min.js
delete mode 100644 gnucash/report/jqplot/usage.txt
More information about the gnucash-patches
mailing list