scheme memory address

2019-04-08 Thread Gianmaria Lari
Suppose I write #(define x '(1 2 3)) is there any way in scheme to print the memory address where x is pointing to? (where is allocated the first element of the list) Thank you, g. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gn

Re: scheme set list function

2019-04-08 Thread Gianmaria Lari
Ciao Harm, Andrew, Aaron and David, this is what I have been able to do adapting Harm code: \version "2.21.0" foo = #(let ((x '(1))) (define-scheme-function (arg)(symbol?) (case arg ((incNumber) (set! x (append (drop-right x 1) (list (1+ (last x)) ((unindent) (drop-right! x

fraction-with-notes problem as of version 2.21.0

2019-04-08 Thread Jacques Menu
Hello folks, This snippet taken from LPNR 2.19.82 is handled alright by the latter, but fails with 2.21.0: %%% \version "2.21.0" \relative c'' { \once \override TupletNumber.text = #(tuplet-number::fraction-with-notes "4." "8") \tuplet 3/2 { c4. c4. c4. c4. } } %%% Starting lilyp

Re: scheme set list function

2019-04-08 Thread Thomas Morley
Hi Carl, Am Mo., 8. Apr. 2019 um 15:05 Uhr schrieb Carl Sorensen : > But you haven't implemented 'start in this code, have you?It's a default > no-op. You could start your indentation by using any symbol that is not > 'reset, 'increase, or 'indent, iIUC. Exactly. I should have dropped a co

Re: scheme set list function

2019-04-08 Thread Thomas Morley
Am Mo., 8. Apr. 2019 um 13:17 Uhr schrieb Aaron Hill : > > On 2019-04-08 2:48 am, Thomas Morley wrote: > > foo = > > #(let ((x (cons 1 0))) > > (define-scheme-function (arg)(symbol?) > > (case arg > > ((indent) (set! x (cons (car x) (1+ (cdr x) > > ((increase) (set! x (cons (1

Re: scheme set list function

2019-04-08 Thread Gianmaria Lari
On Mon, 8 Apr 2019 at 11:49, Thomas Morley wrote: > Am Mo., 8. Apr. 2019 um 10:07 Uhr schrieb Gianmaria Lari > : > > > > I try to explain what I'm trying to do. > > > > I want some functions helping me to numbering exercise like this: > > > > 1 > > 2 > > 3 > > 3.1 > > 3.2 > > 3.3 > > 4 > > 4.1 >

Re: A LilyPond Café in Paris

2019-04-08 Thread Karlin High
On 4/8/2019 9:06 AM, Abraham Lee wrote: I think you should a write-up on lilypondblog.org , even a quick one would be great! +1 I was thinking the same thing. If others elsewhere want to organize similar events, it could be helpful to hear how this one went. -- Karli

Re: A LilyPond Café in Paris

2019-04-08 Thread Abraham Lee
Hey, Pierre! On Sun, Apr 7, 2019 at 3:49 PM Pierre Perol-Schneider < pierre.schneider.pa...@gmail.com> wrote: > Hi Carl et All, > Here's some pics: > https://www.flickr.com/photos/148245202@N06/albums/72157706397021461 > > Cheers, > Pierre > That looks so fun! Thanks for sharing! How did you fe

Re: scheme set list function

2019-04-08 Thread David Kastrup
Aaron Hill writes: > On 2019-04-08 4:35 am, David Kastrup wrote: >> >> There is no global variable x. There is a binding, but the scope of >> the binding ends with the let. This binding is anonymous afterwards >> and has no name. You can call functions manipulating the global >> variable x fro

Re: scheme set list function

2019-04-08 Thread David Kastrup
Aaron Hill writes: > On 2019-04-08 4:08 am, David Kastrup wrote: >> Aaron Hill writes: >>> As such, procedures can have side effects where the objects that are >>> passed to such procedures may be modified. Consider the 1+last! >>> procedure I showed that is not a macro itself, but it still has

Re: scheme set list function

2019-04-08 Thread Carl Sorensen
On 4/8/19, 3:48 AM, "Thomas Morley" wrote: Am Mo., 8. Apr. 2019 um 10:07 Uhr schrieb Gianmaria Lari : > > I try to explain what I'm trying to do. > > I want some functions helping me to numbering exercise like this: > > 1 > 2 > 3 > 3.1 > 3.2

Re: Overlay "ossia" voice

2019-04-08 Thread Carl Sorensen
On 4/8/19, 1:23 AM, "Urs Liska" wrote: Hi Mark, Am 04.04.19 um 20:35 schrieb Mark Knoop: > I'm trying to create something a bit like an ossia voice which should be overlaid on top of the principal voice, but without affecting the layout of each; i.e. ignoring all collisions.

Re: scheme set list function

2019-04-08 Thread Aaron Hill
On 2019-04-08 5:31 am, Andrew Bernard wrote: Hi All, Here's a very well written post on pointers in Scheme (it doesn't have them, full stop). Wonderful language that it is, you can create something similar for yourself. We do not have access to pointers in the Scheme language, as it is inte

Re: scheme set list function

2019-04-08 Thread Aaron Hill
On 2019-04-08 4:08 am, David Kastrup wrote: Aaron Hill writes: As such, procedures can have side effects where the objects that are passed to such procedures may be modified. Consider the 1+last! procedure I showed that is not a macro itself, but it still has the side effect of altering the li

Re: scheme set list function

2019-04-08 Thread Andrew Bernard
Hi All, Here's a very well written post on pointers in Scheme (it doesn't have them, full stop). Wonderful language that it is, you can create something similar for yourself. https://www.quora.com/How-are-pointers-in-Scheme-different-from-C Observe that this post also clearly states the Scheme i

Re: scheme set list function

2019-04-08 Thread Andrew Bernard
Hi Aaron, I beg to differ. Here plain and clear from the start of the R5RS Scheme specification is the following: Arguments to Scheme procedures are always passed by value, which means that the actual argument expressions are evaluated before the procedure gains control, whether the procedure nee

Re: scheme set list function

2019-04-08 Thread Aaron Hill
On 2019-04-08 4:35 am, David Kastrup wrote: Aaron Hill writes: On 2019-04-08 2:48 am, Thomas Morley wrote: foo = #(let ((x (cons 1 0))) (define-scheme-function (arg)(symbol?) (case arg ((indent) (set! x (cons (car x) (1+ (cdr x) ((increase) (set! x (cons (1+ (car x)) 0))

Re: scheme set list function

2019-04-08 Thread David Kastrup
Aaron Hill writes: > On 2019-04-08 2:48 am, Thomas Morley wrote: >> foo = >> #(let ((x (cons 1 0))) >> (define-scheme-function (arg)(symbol?) >> (case arg >> ((indent) (set! x (cons (car x) (1+ (cdr x) >> ((increase) (set! x (cons (1+ (car x)) 0))) >> ((reset) (set! x

Re: scheme set list function

2019-04-08 Thread Aaron Hill
On 2019-04-08 2:48 am, Thomas Morley wrote: foo = #(let ((x (cons 1 0))) (define-scheme-function (arg)(symbol?) (case arg ((indent) (set! x (cons (car x) (1+ (cdr x) ((increase) (set! x (cons (1+ (car x)) 0))) ((reset) (set! x (cons 1 0 (if (zero? (cdr x))

Re: scheme set list function

2019-04-08 Thread David Kastrup
Aaron Hill writes: > On 2019-04-07 6:01 pm, Andrew Bernard wrote: >> I am somewhat concerned that there is a misunderstanding you have about >> Scheme. Scheme procedures are call-by-value. This means the >> arguments are >> evaluated and the value then passed to the procedure. The value of the >>

Re: Forcing the rehearsal mark to the bar

2019-04-08 Thread Thomas Morley
Am So., 7. Apr. 2019 um 23:57 Uhr schrieb Dave Higgins : > > Is there a way to force the rehearsal mark to be under the tie (or > slur)? \override did not work either. I'm hoping I'm just misreading > the documentation. > > \version "2.19.83" > > \fixed c''' { \set Staff.RehearsalMark.outside-sta

Re: scheme set list function

2019-04-08 Thread Thomas Morley
Am Mo., 8. Apr. 2019 um 10:07 Uhr schrieb Gianmaria Lari : > > I try to explain what I'm trying to do. > > I want some functions helping me to numbering exercise like this: > > 1 > 2 > 3 > 3.1 > 3.2 > 3.3 > 4 > 4.1 > 4.2 > > etc. > I thought that an alternative approach that looks nice to try but

Re: scheme set list function

2019-04-08 Thread Gianmaria Lari
I try to explain what I'm trying to do. I want some functions helping me to numbering exercise like this: 1 2 3 3.1 3.2 3.3 4 4.1 4.2 etc. For that I thought to use the following three functions: #(define (incNumber l) (append (drop-right l 1) (list (1+ (last l) #(define (unindent l) (drop-

Re: Overlay "ossia" voice

2019-04-08 Thread Urs Liska
Hi Mark, Am 04.04.19 um 20:35 schrieb Mark Knoop: I'm trying to create something a bit like an ossia voice which should be overlaid on top of the principal voice, but without affecting the layout of each; i.e. ignoring all collisions. This is great and may be an inspiration for me to handle my