Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(6498)

Issue 300110043: Let define-session-public place variables natively into parser

Can't Edit
Can't Publish+Mail
Start Review
Created:
7 years, 11 months ago by dak
Modified:
7 years, 11 months ago
Reviewers:
carl.d.sorensen, Carl
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Let define-session-public place variables natively into parser Putting them as native variables in the parser module (rather than using export/import) makes `set!' and `define' equivalent rather than having `define' create a shadowing definition of the session variable. That is important in order to avoid the values of the variable diverging between parser module and `lily'.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -4 lines) Patch
M scm/lily.scm View 3 chunks +18 lines, -4 lines 0 comments Download

Messages

Total messages: 3
Carl
Looks very nice to me. I couldn't have done it, but I love how it ...
7 years, 11 months ago (2016-05-27 04:23:29 UTC) #1
dak
On 2016/05/27 04:23:29, Carl wrote: > Looks very nice to me. I couldn't have done ...
7 years, 11 months ago (2016-05-27 06:03:44 UTC) #2
Carl
7 years, 11 months ago (2016-05-27 15:05:41 UTC) #3
On 2016/05/27 06:03:44, dak wrote:
> On 2016/05/27 04:23:29, Carl wrote:
> > Looks very nice to me.  I couldn't have done it, but I love how it works.
> 
> Can you elaborate on the "couldn't have done it" part?  define-session-public
> copies some ugly code (concerning undead structures or something) from
> define-session.  Is it that, or the heavily underdocumented module system of
> Guile that's involved here?  Because I have a patch reorganizing the session
> stuff in limbo that would remove/replace the undead machinery with something
> saner.  Possibly giving fewer useful diagnostics, but we haven't had any
> _useful_ hint from that area for years.
> 

It's the module system of Guile.  I have no idea how the module system works. 
I'm vaguely aware that there are modules, and that variables are scoped locally
to the modules, but that's about it.

To be fair, I haven't spent any time digging in to that aspect of LilyPond.  I
assume that if I dug into it I could learn it, but that's beyond my current
understanding.

Thanks,

Carl
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b