lilypond-devel
[Top][All Lists]
Advanced

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

Re: scheme night-mare...


From: Arno Waschk
Subject: Re: scheme night-mare...
Date: Sun, 11 Jul 2010 16:52:42 +0200
User-agent: Opera Mail/10.60 (Linux)

On Sun, 11 Jul 2010 16:35:07 +0200, Carl Sorensen <address@hidden> wrote:




On 7/11/10 8:18 AM, "Arno Waschk" <address@hidden> wrote:

On Sun, 11 Jul 2010 16:01:52 +0200, Carl Sorensen <address@hidden>
wrote:




On 7/11/10 7:53 AM, "Arno Waschk" <address@hidden> wrote:

On Sun, 11 Jul 2010 15:48:57 +0200, Carl Sorensen <address@hidden>
wrote:

On 7/11/10 7:16 AM, "Arno Waschk" <address@hidden> wrote:

Dear list,

in the hope not for the x-th time having to give up due to that type
mess
scheme/c++ please forgive and help me:

how can i convert/process/whatever the result of
whateverGrob->get_property_alist_chain (SCM_EOL) into something easily
useable in the c++ realm?

Alist chains aren't easily handled in c++, as far as I know. But they
can
be used with scheme functions by using scm_call_3.


for the moment i am looking for either a complete dump of those
properties, or at least a complete list of which properties could be
addressed individually, although that would be less comfortable...

If you don't need the alist chain, but just need individual properties,
there are c++ functions to get the properties.

If your question were a little bit more specific, we could probably
help
better.

well, it is about getting around that types' things generally, too...

OK, so here's the place to go to find what you need. The Guile reference
has an API reference that lists all of the c++ calls to execute scheme
functions. The stuff that deals with alists is found under the compound
data types section:

http://www.gnu.org/software/guile/manual/html_node/Compound-Data-Types.html#
Compound-Data-Types

You can do anything that you can do in scheme in c++ with these calls.

except for generating the list of keys, it seems... :(

There is a scheme function in scm/lily-library.scm map-alist-keys that will
apply a function to all the keys in an alist.  That might be helpful...


How do i use this in a c line?

Your question isn't really about converting from scheme to c++, it's really about getting all of the keys and/or properties from an alist. That's not
built into scheme.

No, it is about easily accessing information buried into some scheme structures by some little c code.
As long this is not possible, this information is next to encrypted for me.


Just finished a profile run with a larger score- ly_scm2interval is reported to have consumd 16% of computation time. There must be something wrong.


Thanks, Arno


Sorry,

Carl



--
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/



reply via email to

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