Re: Custom S-expression export

2025-03-18 Thread Aura Kelloniemi
Hi, On 2025-03-18 at 10:38 -0400, Saul Tobin wrote: Thank you very much for your responses! I believe these will help me to proceed. -- Aura

Re: Custom S-expression export

2025-03-18 Thread Saul Tobin
> > I got inclusion of the original init file working with the following code. > IMHO it feels like a very crude hack. Is there a scheme function that would > include a LilyPond file in the current context? > > Code: > > $(ly:parser-include-string > (format #f "\\include \"~a\"" >(string-appe

Re: Custom S-expression export

2025-03-18 Thread Timothy Lanfear
On 18/03/2025 10:07, Aura Kelloniemi wrote: his probably is already possible without any changes to LilyPond (using top-repl). Is there a Scheme function that takes an arbitrary LilyPond expression as a string, parses it and returns a music/score/book object? I'm not an expert of this topic, but

Re: Custom S-expression export

2025-03-18 Thread Aura Kelloniemi
Hello Hans, On 2025-03-17 at 18:28 +0100, Hans Åberg wrote: > > On 17 Mar 2025, at 11:01, Aura Kelloniemi wrote: > > I am developing a tool for processing musical notation in Haskell. > In my experience, it is hard to work with source code directly, because of > the difficulty to pin down de

Re: Custom S-expression export

2025-03-18 Thread Aura Kelloniemi
Hi, On 2025-03-17 at 12:43 -0400, Saul Tobin wrote: > I haven't had a chance to look at your code. Your project sounds > interesting – I'll try to make some time. It is in very early stages of development. I need to get LilyPond import working first and then see how I will represent music expr

Re: Custom S-expression export

2025-03-17 Thread Hans Åberg
> On 17 Mar 2025, at 21:54, Immanuel Litzroth > wrote: > > ghc has a FFI for C and C++ can be made to generate C compatible code. > There is no way to use a C++ library in another runtime without writing a > big chunk of glue code. I wrote a C++ wrapper for the Guile C interface, but I do not

Re: Custom S-expression export

2025-03-17 Thread Immanuel Litzroth
ghc has a FFI for C and C++ can be made to generate C compatible code. There is no way to use a C++ library in another runtime without writing a big chunk of glue code. Immanuel On Mon, Mar 17, 2025 at 6:31 PM Hans Åberg wrote: > > > On 17 Mar 2025, at 11:01, Aura Kelloniemi wrote: > > > > I am

Re: Custom S-expression export

2025-03-17 Thread Hans Åberg
> On 17 Mar 2025, at 11:01, Aura Kelloniemi wrote: > > I am developing a tool for processing musical notation in Haskell. I want to > be able to import LilyPond scores and as I don't want to parse LilyPond's > surface syntax and write a Scheme interpreter, I have decided to export > LilyPond sc

Re: Custom S-expression export

2025-03-17 Thread Saul Tobin
Hi Aura, I haven't had a chance to look at your code. Your project sounds interesting – I'll try to make some time. The exporter writes output to stdout. > > I have a few questions/problems: > > 1) First of all, is this a good strategy at all or would there be a better > way > to make LilyPond ru