Let me ask you, have you ever coded for a non-procedural language?
If not, if scheme is your first, there is going to be learning curve,
and much of your experience with procedural languages not as much help
as you might think.
I'd suggest you get an elementary LISP text (scheme is a dialect of LISP)
But essentially.
a) It is a functional language. Instead of carrying out some procedure
you are evaluating some function*. A scheme (LISP) program is a
function. To make matters worse, sometimes the result of the evaluation
is irrelevant and what is wanted are "side effects" resulting form the
evaluation.
b) The fundamental data type is "list"
c) Those top level definitions are the definitions of named functions
that will be used in the main evaluation. Like in a procedural language
you might define subroutines that would be called. BUT you can also
"define on the fly" (a "lambda" function, not named, so only can be used
in this place)
Like I said, get an elementary LISP text and get well beyond the
equivalent of :hello world" before you try to understand scheme
Michael D Novack
* The computer science among us will know that these can be proven
equivalent (that's what LISP was all about originally). BTW, although c
is usually used as a procedural language it can be used as a functional
language. While learning c and on a list discussing what we were
learning I got challenged to rewrite one of my exercises as a pure
function (to convince me c could be used that way)
PS: the 'nix users who are comfortable at the command line and writing
scripts .... well your shell language plus library of standard utilities
constitute a non-procedural language of fundamental data type "string".
So what you learned doing that not completely useless. Also 'nix users
who use Emacs/XEmacs, well you ARE in a LISP environment when you do that.
On 1/15/2023 5:38 PM, flywire wrote:
This exercise has left me with a few questions about
https://github.com/flywire/gnucash/blob/Hello/gnucash/report/reports/example/options-example.scm
1. I'm not clear on the scheme terminology. What are the lines in the
top-level definitions I labelled initialise values? I understand they are
not constants and I'd normally call it initialising or assigning variables.
2. Why does the section referred to in the above point normally only
contain option name and help but not default, section, or sort order?
3. If option sections are defined, does a default section need to be set?
4. Can a default General section be added to? It seems not and the whole
thig must be created.
5. The formatting style is different to most standard reports. Does it
need updating?
6. How can I make the version number bold:
https://github.com/flywire/gnucash/blob/3a949c269735709b47e02f181d80ad7e8c671982/gnucash/report/reports/example/options-example.scm#L340-L345
7. What is the best way of understanding/searching the api? Things like
html format and date interval below or tracing from date intervalin other
reports back to the specific date.
8. I'm still not clear on things like let, let*, and nested let.
9. There seems to be some sort of git corruption. How can I move this
forward as a contribution?
10. > [raised previously] I'm not sure if version or report-guid should
be updated.
_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
--
There is no possibility of social justice on a dead planet except the equality
of the grave.
_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel