denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Denemo-devel] guile 2.0 support


From: Richard Shann
Subject: Re: [Denemo-devel] guile 2.0 support
Date: Wed, 27 Feb 2013 08:52:33 +0000

On Tue, 2013-02-26 at 22:29 -0600, Jeremiah Benham wrote:
> 
> 
> On Tue, Feb 26, 2013 at 2:38 AM, Richard Shann
> <address@hidden> wrote:
>         On Mon, 2013-02-25 at 22:04 -0600, Jeremiah Benham wrote:
>         > It all compiles now. I get several warnings about possible
>         unbound
>         > variables. I am see that several scripts
>         
>         
>         Are you sure that several scripts have this, not just that a
>         single
>         script is being invoked several times on startup?
>         grepping through the menus I see only
>         
>         actions/menus/ObjectMenu/NotesRests/Tuplets/ToggleTripleting
>         
>         
>         with that code in it. What's more, I can't see anything wrong
>         with the
>         syntax there - the definition is not inside an expression
>         context as I
>         understand it.
>         It would perhaps be better to have an init.scm in the Tuplets
>         directory
>         to set up the initial define, but that is another issue...
>         
>         >  have this in them:
>         >   (if (not (defined? 'ToggleTripleting::InsideTriplet))
>         >     (define ToggleTripleting::InsideTriplet #t))
Yes I was thinking about this, and the construct has probably become
dis-allowed in guile 2.0
As I got it from the guile-m/l folk in the first place I'll ask them
what should be done to replace it. Putting it in init.scm won't alter
the fact that the define is in an expression. My guess is that you have
to say something fancy to define a symbol in the toplevel now.

>         
> 
> I had to do this to get the script to run:
> +;(if (not (defined? 'ToggleTripleting::InsideTriplet))
> +;    (define ToggleTripleting::InsideTriplet #t))
> +(define ToggleTripleting::InsideTriplet #t)

This won't work because it will not alternate between #t and #f at each
call to ToggleTripleting. 
> So we should have this defined in an init.scm?
Putting it in init.scm will help, but if someone put another Tuplet
command in the same directory and called this in-between the calls to
ToggleTripleting then that command would go out of sequence. In
practice, though, this will work with the present set of commands well
enough.

>  After doing this it allowed me to go further. I also noticed some
> things that was making guile complain. Here is the diff that stopped
> the warning about the wrong number of arguments to ChangeValue.
> 
> --- a/actions/denemo-modules/wysiwyg.scm
> +++ b/actions/denemo-modules/wysiwyg.scm
> @@ -331,10 +331,10 @@
>    
>  ;;;;;;;; ChangePad
>  (define (ChangePad oldstr prefixstring postfixstring)
> -  (ChangeValue oldstr prefixstring postfixstring d-GetPadding "0"))
> +  (ChangeValue oldstr prefixstring postfixstring (d-GetPadding "0")))
>  ;;;;;;;; ChangeRelativeFontSize
>  (define (ChangeRelativeFontSize oldstr prefixstring postfixstring)
> -  (ChangeValue oldstr prefixstring postfixstring
> d-GetRelativeFontSize "0" DENEMO_OVERRIDE_AFFIX))
> +  (ChangeValue oldstr prefixstring postfixstring
> (d-GetRelativeFontSize "0" DENEMO_OVERRIDE_AFFIX)))
>  
These are bugs which you have now fixed with your corrections (at the
moment nothing is calling them, we would have hit a syntax error when
implementing creating padding via wysiwyg operations, not yet done).

So with (define ToggleTripleting::InsideTriplet #t) in an init.scm in
the Tuplets directory added to git and those two fixes we should be ok
for guile-2.0
Good work!

Richard

>  
> 
>         > They are giving an error like this:
>         >   #f definition in expression context, where definitions are
>         not
>         > allowed, ((line . 2) (column . 4) (filename . #f)) (define
>         > ToggleTripleting::InsideTriplet #t) #f)
>         >
>         > Other than that, everything seems to be working well.
>         
>         Well, presumably hitting Tab to turn triplets on/off is not
>         working?
>         
> 
> No. It was not. With the changes I have made it is not functioning
> perfectly. I don't see the bracket and the ---3--- wyswig thing. It
> seems to be getting the wrong duration values of the notes in the
> contents of the tripplet.
> 
> Jeremiah
>   
>  
>         Richard
>         
>         > I will do some more testing.
>         >
>         > Jeremiah
>         >
>         > On Mon, Feb 25, 2013 at 2:18 PM, Richard Shann
>         > <address@hidden> wrote:
>         >         I have fixed denemo-modules/scheme.scm for guile 2.0
>         >         compatibility,
>         >         I haven't been able to check it though - there may
>         be problems
>         >         with
>         >         other modules. Basically anything that would not
>         execute at
>         >         run time
>         >         will cause 2.0 to barf when it tries to compile it.
>         Such
>         >         things can be
>         >         deleted of course as they can't be in use.
>         >
>         >         Richard
>         >
>         >         On Sat, 2013-02-23 at 18:29 -0600, Jeremiah Benham
>         wrote:
>         >         >
>         >         >
>         >
>         >         > On Sat, Feb 23, 2013 at 3:44 PM, Richard Shann
>         >         > <address@hidden> wrote:
>         >         >         On Sat, 2013-02-23 at 14:27 -0600,
>         Jeremiah Benham
>         >         wrote:
>         >         >         > This seems to be working now. I still
>         get this
>         >         error
>         >         >         >
>         >         >         > (#f unexpected syntax #f () #f)
>         >         >         >
>         >         >         > Otherwise denemo seems to be running
>         fine. I think
>         >         before I
>         >         >         did not
>         >         >         > give it enough time for the modules to
>         compile or
>         >         something.
>         >         >         Shall I
>         >         >         > push this commit to git?
>         >         >
>         >         >
>         >         >         I think there will be at least some -
>         perhaps many -
>         >         commands
>         >         >         not
>         >         >         working. Test instrument name and editing
>         the
>         >         instrument name
>         >         >         once it is
>         >         >         set. These depend on denemo.scm parsing
>         correctly,
>         >         and I think
>         >         >         if
>         >         >         denemo-modules/scheme.scm fails to parse
>         the rest of
>         >         the code
>         >         >         is
>         >         >         abandoned.
>         >         > I clicked on the instrument name button and
>         renamed it
>         >         successfully. I
>         >         > got this when I hit the tab key to insert a
>         triplet even
>         >         though
>         >         > triplets are working via
>         Notes/Rests->Tuplets->insert
>         >         triplet:
>         >         >
>         >         > ** (denemo:27357): WARNING **:
>         >         > The tag is
>         >         >
>         >         > syntax-error
>         >         >
>         >         >
>         >         >
>         >         >
>         >         >         But if the option to use guile-2.0 is just
>         that - an
>         >         option -
>         >         >         then it
>         >         >         could go into git I guess...
>         >         >
>         >         > After I installed guile-2.0, denemo could no
>         longer find my
>         >         > guile-1.8.pc. I checked with find and it was
>         indeed gone. I
>         >         think this
>         >         > is a fault in the packaging. I read in the guile
>         manual that
>         >         these are
>         >         > kind of "slotted" to where they are designed to
>         allow
>         >         installation of
>         >         > a multitude of versions. pkg-config provides the
>         CFLAGS and
>         >         LIBS of
>         >         > 1.6, 1.8, or 2,0 based on the guile-2.0.pc file. I
>         am using
>         >         ubuntu
>         >         > 12.04 and I still see guile-1.6 in the
>         repositories. There
>         >         is an
>         >         > environment variable I can set and guile will list
>         all
>         >         depreciated
>         >         > code. I will check into that.
>         >         >
>         >         > Jeremiah
>         >         >
>         >         >
>         >         >         Richard
>         >         >
>         >         >
>         >         >
>         >
>         >
>         >
>         >
>         
>         
>         
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]