]> git.donarmstrong.com Git - lilypond.git/blob - TODO
release: 1.1.27
[lilypond.git] / TODO
1 Features you cannot find in the doco as working, should be mentioned
2 here.
3
4 This is an assorted collection of stuff that will be done, might be
5 done, or is an idea that I want to think about
6
7 Most of the items are marked in the code as well, with full explanation. 
8 grep for TODO and ugh/ugr/urg
9
10 *In a piece such as the Zipoli piece in mutopia/... there is a stray
11 `8' over every bar line when processed by LilyPond 1.1.25.
12
13 TODO before 1.2
14
15         - cf'able ly2dvi  tagline.
16
17         - make ly2dvi test page.
18
19         - fix dynamics decently, ie. use kerning & ligatures.  Junk
20 TeX macros.
21
22
23         - span bars. ->gallina 
24
25 *******
26 m=\notes\relative c'{
27 \voiceone
28 c1
29 \mark "A"; R1*3 \mark "B";
30 <{R1*3}{s1 \mark "C";}>
31 }
32
33 n=\notes\relative c'{
34 \voicetwo
35 c1 | c1 | c1 | c1 | c1 | c1 | c1 |
36 }
37
38 \score{ 
39     \type StaffGroup <
40        \type Staff = m <\m>
41        \type Staff = n <\n>
42     >
43
44         \paper {
45                 \translator { \OrchestralScoreContext
46                         markScriptPadding = "4.0";
47                }
48         }
49 }
50 *********
51
52         * junk Text_def, use G_text_item in stead.
53
54         * junk Script_def
55
56         * fix partial measures in meaningful way.
57
58         * fix AFM for BlueSky AFM files.
59
60         * working notehead style.
61
62         * add scripts to bars eg.  |^"bla" 
63
64         * relative mode for mi2mu
65
66         * uniformise recent feta contributions.
67         - use SCM and Molecules for {accordeon stuff, }
68         - bigger and fatter 4/4 C
69
70         * make a SMOB of Atom and Molecule
71
72         * sort out directory stuff.
73         - --prefix option?
74         - -I option per filetype?
75         - kpathsea?
76
77         * is \break broken? input/test/hara-kiri.ly
78
79         * fix OrchestralScore and Hara-kiri (i.e., fix Coriolan)
80
81 **************
82 I also found a few bugs:
83
84 * The examples in input/test/bar-scripts.ly and score-bar-scripts.ly
85   don't work. The problem seems to be that you can't define a 
86   a score identifier and then use it in the \score block.
87
88
89         - make separate MF chars for endings of ledger lines, and calc rest of lines.
90
91         * support_l_arr_ empty in staff-margin's G_staff_side_item
92
93         * todo doc left/rightbeamcount
94
95
96         * doc Single_malt_grouping_item
97
98         * ly2dvi/lilypond logfile.
99
100         * remove old preformats in RPM
101
102 ************
103
104 How can I specify a chord whose duration is longer than a whole note?
105
106  \type ChordNames { \chord{ A1*2-min } }
107
108 gives me a parse error.  And \times doesn't work either.  I can't use
109 a spacer note.  So it seems to be impossible to have long chords of
110 general length.  Of course, in the example above I can use \breve.
111 But what if I want a chord that lasts for 3 whole notes?  Or what
112 about 2.5 whole notes?  Is there a mechanism for getting this kind of
113 length?  
114
115
116 Why does my second extender request get junked in the following:
117
118 \score{
119 < \notes \relative c''{ 
120      a4()b()c()d c()d()b()a }
121    \type Lyrics \lyrics {
122      foo1 __  bar2. __ _4 }
123 > }
124
125 It seems that \cr and \decr don't work any more.  
126
127 \score{
128   \notes{
129     a \cr b \rc c }
130   \paper{linewidth=-1.;}
131 }
132
133 Gives me 
134
135 qq.ly:3:9: warning: can't find (de)crescendo to end:
136     a \cr
137           b \rc c }
138
139
140
141 Use of semicolons is still rather confusing.  They are obligatory
142 after some types of assignments and illegal after others.  
143
144   \property foo=bar               illegal
145   foo = 3 at top level            illegal
146   foo = 3 inside \paper           obligatory               
147   foo = \notes{ ...} top level    illegal
148   foo = \translator{ } in \paper  obligatory
149
150 As far as I can tell, the sole accomplishment of this syntactic
151 irregularity is to keep the user as confused as possible.  
152
153
154 I was trying to get interstaff beams to work and did this:
155
156 \score{
157 \type GrandStaff <
158 \type Staff=one \notes\relative c'{
159   \stemup
160   [c8 c \translator Staff=two \stemup c c]
161   \translator Staff=one
162   \stemdown 
163   [ b8 \translator Staff=two a8]
164   \translator Staff=one 
165   c4 
166   }
167 \type Staff=two \notes{ \clef bass; s1 }
168 >
169 \paper{
170                 \translator{
171                         \GrandStaffContext
172                         minVerticalAlign = 3.0*\staffheight;
173                         maxVerticalAlign = 3.0*\staffheight;
174                 }
175   linewidth = -1.;
176 }
177 }
178
179 The beams are at the right angle, but they aren't in the right place.
180
181
182
183 *******************
184
185
186         * fractional chord durs.
187
188         * hang Item on Spanner
189
190         * remove Interval dim_ from Dimension_cache and rename the struct.
191
192         * do --safe for PS output?
193
194         * convert-mudela --output
195
196         * Staff_margin (with a partial measure.)
197
198         * fix "I've been drinking too much"
199
200         * fix pletvisibility properties:
201           - bracket on/off/no-bracket-when-beam
202           - num on/off/no-num-when-beam
203
204         * fix: standchen.
205
206         * junk backlinks?
207
208         * junk text{sharp,flat,etc}
209
210         * fix convert-mudela manpage
211
212         * decimal point in \paper {}
213
214         *{  \voiceone <a'4.*2/3  d''4.*2/3 fis''4.*2/3>  [g''8 fis'' e''] d''4 |}
215          and=20
216          { \voicetwo  d'4 d'2.*2/3 } spacing
217
218         * tied notes for MIDI
219
220         * sharp /flat on trills (in MIDI ??)
221
222         * scm-ify \property values.
223
224         * move class Lookup {} into scm
225
226 BUGS:
227
228         * collisions/voices \voiceone \voicetwo are broken; see 
229           input/praeludium-fuga-E.ly
230           mutopia/J.S.Bach/wtk1-fugue2.ly
231
232         * fix: text on rests: rediculous dims
233
234         * ly2dvi
235           - bottomnote for ly2dvi
236           - deps for ly2dvi
237
238         * fix midi output:
239            - default duration?  duration must be not entered
240              explicitely on first note.
241
242         * turn slope-damping on/off
243
244         * c4 \! \> c4
245
246         * tremolo stuff
247
248         * gallina barlines.
249
250         * fix height of / collisions with lyrics (chords), 
251            see input/test/vertical-text.ly; input/test/repeat.ly
252
253         * latex bla.tex broken (titles / \lilyfooter stuff?)
254
255         * msgfmt -o check?
256
257         * \breathmark TeX macro 
258
259         * catch GUILE errors?
260
261         * add new glyphs to font.ly
262
263         * formatting of input stuff. 
264
265         * \notes{ a \< b \cr } vs \notes{ a \< b \! }
266
267         * if possible, it might be nice for a warning to appear if someone does
268         \translator with no name and without assigning it to an
269         identifier.  
270
271         * space after bars?
272
273         * 'hinterfleisch' before bar (e.g. wtk1-fugue2)?
274
275         * \type Voice \times 2/3 { [c8 c16 c16 c16 c16] }
276
277         * fix singleStaffBracket
278
279         * repeat bars: need distance after ":|" and before "|:"
280
281         Summary of minor spelling irregularities:
282         -  capitalization/use of underscores in property names
283
284         * fix SkipBars  -> skipBars
285
286         * \shape 1st dim skipped? 
287
288         * fix marks/barnumbers/marginal notes
289
290         * broken scripts:
291         lbheel = \script { "bheel" 0 0 -1  0 0 }
292         rbheel = \script { "bheel" 0 0 1 0 0 }
293         lbtoe = \script { "btoe" 0 0 -1 0 0 }
294         rbtoe = \script { "btoe" 0 0 1 0 0 }
295         lfheel = \script { "fheel" 0 0 -1  0 0 }
296         rfheel = \script { "fheel" 0 0 1 0 0 }
297         lftoe = \script { "ftoe" 0 0 -1 0 0 }
298         rftoe = \script { "ftoe" 0 0 1 0 0 }
299         
300         and also
301         
302         portato= \script { "portato" 0 -1 0 1 0 }
303
304 STUFF
305         * check out legal/(c) matters for scores.
306
307         * check out GCC signatures?
308
309         * Align_element::padding  ?
310
311         * uniformise property names...
312           - ydirection <-> yDirection
313           - rather allow '_' in identifiers first (i.e. junk ^ and _),
314             and do y_direction?
315           - typo checks on property names?
316
317         * use streambufs and iostream
318         to provide IO handling for TeX stream, mudela stream, data-file.
319
320         * seriously buffer TeX output (do profile of writing .5 mb TeX file.)
321
322         * strip EXEs before installing
323
324         * zip target for binary windows dist (JBR)
325
326         * junking \skip req in lyrics
327
328         * Language:
329         - \type -> \context ?
330         - \translator -> ?
331         - fix \partial 
332         - \bla {} vs \bla ; 
333         - mix engraver hacking with music ?
334         - \once\property  KEY = VAL
335         - \addtranslator, \removetranslator
336         - junk ^ and _ for scripts
337         - junk _ for lyrics.
338         - abstract grammar.
339
340         * percussion note heads
341
342         * mi2mu empty staffs.
343
344         * horizontal centering of dynamics 
345
346         * \font\fontA=feta20.afm (.afm?)
347
348         * gzip RH manpage
349
350         * stable make/config stuff
351
352         * $DEPENDENCIES_OUTPUT support
353
354         * Xdvi zooming ?! Try to understand GS garbage collection.
355                 gs: Error: /undefined in draw_beam
356                 gs: Operand stack:
357
358         * fix vertical alignment and stafflines
359
360         * GrandStaff needs more work -- I want a single word
361         `harpsichord' to the left of the grandstaff, not one on each
362         stave.  (Organ staff -- with separate pedal -- but common
363         properties may be something to think about.  Of course for
364         organ you want to be able to give stop indications on the way
365         through, so the \property Voice.Instrument would be a stop,
366         and \property GrandStaff.instrument would be PipeOrgan...)
367
368         * revise the Score_priority_align_engraver concept.  It sucks. 
369
370         * make new VoiceOne, VoiceTwo, VoiceThree contexts with
371 ydirection and hshift preset
372
373         * *.yo: fix pod manpage layout legacy
374
375         * text-items clash with stems/beams
376
377         * --include, -I option for ly2dvi (pass on to lily)
378
379         * fix placement of beam-less abbrev
380
381         * \meter 3/4;
382         <{\voiceone cis4. cis8 cis4 | cis4 cis cis | r1 }
383          {\voicetwo cis,4 r r | r2. | r1 }> |
384         }
385
386         * try to use template<Type> iso MACRO(Type)
387
388         - NEWS: ... Musical_pitch (analogous to Duration and Rhythmic_req)
389           think about, analogous to pitch: 
390            * { a4 a16 } c <-- duration of c?
391            * < a4 b8 > c <-- duration of c?
392
393         * \tempo 4. = 90;
394
395         * fix audio-items (don't use (input) requests, but copy data)
396
397         * make sure all ex's have a mudela-version
398
399         * do rest-collisions for Multi_measure_rests as well.
400
401         * split error/warning in error/warning/non_fatal_error
402
403         * add a Duration_convert member to Duration_iter to set parameters.
404         Junk global duration settings. 
405
406         * minimum length second part broken tie
407  
408         * en-,discouraged linebreaking: 
409           - handle DISALLOW < penalty > FORCE
410           - discourage breaking of slurs
411
412         * fix variable define/lookup parser global<->paper
413
414         * fix title/instrument placements; see input/test/title.ly
415
416         * <\voiceone c4. \voicetwo c4>
417
418         * add full cello suites to web site (kom op, Maarten!)
419
420         * Rethink Time_description
421           * \cadenza , \meter, \grouping should all be \properties
422
423         * rename
424           - measure -> bar
425           - abbrev -> tremolo
426           - abbreviation-beam -> (measured/unmeasured) tremolo
427           - partial -> anacrouse
428
429         * shared lib
430
431         * robustify Beam (in case of no stems, 32nd notes)
432
433         * decentralised spring factory
434
435         * move paper vars into engraver properties
436
437         * check for groff / troff/ nroff et
438
439         * more intelligent file searching
440
441         * make LilyPond RPM fully relocatable
442
443         * disable spaces in TeX stuff
444         
445         * handle ^C for tmp/file creation.
446
447         * dots & rest collisions.
448
449         * documentation
450         - introduction?
451         - info?
452         - LaTeX?
453         - more manpages?
454
455         * versioning for Feta
456
457         * the warning about the negative slur/tie length appears twice
458         which is irritating.
459
460         * The `3' in the meter key is a one or two pixels too thin (at 600dpi)
461         in the middle:
462
463         * the bracket is ugly (wings are too parabolic, should be more circular)
464
465         * better hshift (dots, distance, head dependent)
466
467         * clefs (AG): The "8" should appear closer to the actual clef,
468           touching it.
469
470         * put errorlevel in Input class
471
472         * junk nesting slurs
473
474         * integrate midi-elts from mi2mu and lily?
475
476
477 3RD PARTY BUGS:
478 ****************
479 /*
480 ICE
481 */
482 signature S {
483   int foo ();
484 };
485
486 signature V {
487   S * s();
488 };
489
490
491 V*v();
492 f ()
493 {
494   return v( )->foo ();
495 }
496
497 /*
498
499   egcs-1.1
500
501 foo.cc: In function `int f()':
502 foo.cc:6: label `b' used but not defined
503 */
504 void
505 f ()
506 {
507   bool b;
508   if (b && && b)
509          ;      
510 }
511 ***************
512
513         * make GCC warn about ctor that leaves member vars  uninitialised.
514
515         * GNU diff 2.7: diff -rN does not see a new directory with empty file
516
517         * glibc 2.0:
518
519           f = fopen ("/dev/null", "r")
520           assert (feof (f))
521
522 3RD PARTY PROJECTS:
523
524         * GNU patch 
525           - 'double-fix' mode: ignore identical fix, rather than suggest 
526             to revert patch direction when (more or less? exactly) the same 
527             thing is fixed
528
529 PROJECTS
530
531         * Scripts:
532         - fix position of bar number
533         - stack scripts in chords:
534           % fingering:        footing:
535             < a-4 c-2 g-1 >   < c-\ltoe e-\lheel >
536         - script-spacing
537         - slur parts as a script
538         - stack parameterised scripts for fingering and footing:
539
540         * convert-mudela:
541         - automatically add  a \version if not present.
542         - better parsing
543         - make smarter
544         - convert-mudela -e empty.ly
545
546         * emacs mudela-mode
547         -  should handle block comments too.
548         -  handle lexer modes (\header, \melodic, \lyric) etc.
549         -  indentation
550         -  notenames?
551         -  fontlock: \melodic \melodic
552
553         * use properties for:
554         - plet?
555         - Staff_sym size
556         - default tempo.
557         - font size
558         - bartypes (get rid of derived Span_bar_engravers)
559         - cadenza mode? 
560
561         * page handling:
562         - PS output
563         - optimal pagebreaking.
564
565         * Unicode support? -> man 7 unicode
566         - 16 bit Strings
567         - -u switch
568         - detect of 16/8 bit files
569         - examples to go with it.
570
571         * Spring_spacer:
572         - write a faster Spring_spacer (without matrices if possible)
573         - relate energybound to linelen unitspace fontsize etc.
574         - used fixed point fp?
575
576         * \header
577         - output header info to MIDI too.
578
579         * a musical dictionary. See Documentation/vocabulary-*, other
580         languages:
581         - explanations
582         - italian
583         - german
584         - dutch
585         - swedish
586          .. ?
587
588         * chords
589         - guitar chords (fret diagrams)
590         - other chord name styles (american(?) style)
591         - basso continuo
592         - MIDI output?
593
594         * Debug logs:
595         - derive lily_stream, Dstream, texstream from ostream?
596         - indentable stream as baseclass for TeX stream, lily stream, Dstream.
597         - use dstream feature in mi2mu
598         - integrate IO checking into stream class
599
600         * input converters
601         - NIFF?
602         - ABC? 
603         - SMDL?
604
605         * add to MIDI output:
606         - tempo change
607         - ornaments (and trills?)
608         - repeat/volta
609         - slurs
610         - accents
611         - dynamics
612         - account for rhythmic position in measure
613         - etc.
614
615         * grace notes
616         - make separate class for Grace_*_engravers 
617         (which is at Voice_gravs level)
618         - make encapsulated spacing problems.
619
620         * accidentals per Voice_group
621
622         * Output class, handles : (smallish)
623         - help text /(c) notice?
624         - version line
625         - warning /errors/progress
626         - abort on error/warning; exit status
627         - quiet/ignore-version options
628         - logfile output
629
630         * elaborate Staff_side baseclass:
631         - scripts
632         - text
633         - slur start/end
634
635         * PS 
636         - speed up PS code.
637         - PS lines to .eps files
638         - write custom prolog
639
640         * Output an output format independent (ofi) typeset file; and 
641           make ofi2 TeX, MusiXTex, Display PostScript, PostScript,
642           Ascii... interpreters. (difficult)
643
644         - NIFF ?
645         - Common Music Notation
646         - PostScript output (esp. Beams, Slurs, etc)
647         - Move all Score_elems, into libmutype.a
648         - SGML
649
650         * Documentation
651         - Doc (C) stuff of sheet music
652         - a better format?  SGML?  TeX?  Info?
653         - a better tutorial
654
655         * more spanners (smallish)
656         - Glissando
657         - trill
658
659         * Rewrite Stem, Beam and Rhythmic_grouping (hairy)
660         - [c8. c32 c32]
661         - doc on Rhythmic_grouping
662         - general shaving on Beam and Stem
663         - use plet grouping
664         - separate visual from rhythmic info even more
665         - beams over bars
666
667         * lines:
668         - Ledger lines, should be separate item: Ledger_lines, Ledger_lines
669         - set different line sizes / thicknesses
670         - beam stem showthrough, inter beam sizes (french vs german style)
671
672         * Collisions
673         - left/right note balls should be handled by Collision:
674         < \multi 2; { \stem 1; <b c> } { <f as b> } >
675
676         * Keys:
677         - merge key{item} & localkey{item}?
678         - spacing, national styles?
679
680         * Support for TAB
681         - redo Notehead to allow digits as heads
682         - add a \tablature {} lexer mode for easy entering
683
684         * should adjust stemlength for flag number.
685
686         * breaking:
687         - caching breakpoints
688         - saving them
689         - specify number of lines
690
691 INPUTLANGUAGE
692
693         * c4 4 4 4 for c4 c4 c4 c4?
694
695         * neatly (and readably) expressing concurrent
696         voices
697
698         * <c f a>4 ?
699
700         * Viola mode?
701
702                 @c c g e g 
703         for
704                 c g es g, 
705
706                 @A c g e g
707         for
708                 cis gis e gis
709
710         * relative mode for pitch entering
711
712         * configure pitch_byte
713
714         * rest name configurable
715
716 SMALLISH PROJECTS
717
718         * limit memory usage; the full coriolan takes up too much resources.
719
720         * fix confusing naming in Engraver vs Engraver_group_engraver (context)
721
722         * progress when creating MIDI elts.
723
724         * A range for context errors (eg. mark both { and }. )
725
726         * lyric in staff  (sharpsharp in staff, text below)
727
728         * half sharps/flats
729
730         * write Dynamic_line (to group dynamics horizontally)
731
732         * use Real for all y positions.
733         - use translate_axis( .. ,Y_AXIS)  iso separate variables.
734
735         * half-sharps, half-flats
736
737         * adaptive accidental spacing.
738
739         * handle EOF graciously in error messages.
740
741         * declare notenametab?
742
743         * midi esp.: use I32 iso int where 32 bits are needed (or assumed...)
744
745         * stafftypes: voice names/ instrument names.
746
747         * lily \tempo
748
749         * C meter iso 4/4, idem for alla breve, etc.
750
751         * textspanner: center position
752
753         *   % toe to bheel   four to five
754             %   ^_u            4_5  
755             %     -                           
756             %  --|x--         --|x--
757             %  --|---         --|---
758             %  --|---         --|---
759           (where "to" is a tiny bow)
760
761         * auxilliary file for caching info.
762
763         * Text_crescendo
764
765         * clean solution for staffsize in items.
766
767         * revise calcideal
768
769 IDEAS
770
771         * Output data structures of Mudela in XML/SGML.
772
773         * create libmudela, or liblily_frontend
774
775         * move MIDI stuff (including Quantization) to a ANSI C libmidi library.
776
777         * Spacing_request for manually adjusting spacing
778
779         * caching breakpoints
780
781         * used fixedpoint arithmetic for min. energy.
782
783         * move towards incremental algorithms.
784
785         * far fetched language ideas
786         - design meta-language like TeX and Metafont
787         - programming/macros input
788
789         * versioning stuff (cvt mudela, mudela, etc.)
790
791         * Klavarskribo?
792
793         * dynamic loading of engravers? 
794
795 SMOBS:
796
797 ****************************************
798 Han-Wen Nienhuys <hanwen@cs.uu.nl> writes:
799
800 > mcmanus@IDT.NET writes:
801 > > > I want different C++ objects (with scheme embedded) to be linked by
802 > > > C++ pointers.  I want to access these other objects from the Scheme
803 > > > code, and I want access to these pointers from C++.
804 > > 
805 > > You can do this with a  combination of smob's and primitive functions,
806 > > though it may not be  be exactly what you wanted.   You would have one
807 > > smob  for each class in  your application, and then  you would write a
808 > > primitive function that would return the objects  that are linked to a
809 > > base object.
810
811 > And the smob and the C++ class are interlinked?  Like
812
813 >       class Foo_class {
814 >               Foo_smob *smob_ptr_;
815 >       }
816
817 >       struct Foo_smob {
818 >               Foo_class *class_ptr_
819 >       }
820
821 Usually you can get away without having this interlinked structure.
822 One piece of information you need when exporting objects to scheme is
823 the smob tag for your class.  You might store this value (a long) into
824 a class static variable, or a file static variable.  I'll use a class
825 static variable in this example.
826
827 I typically use code that works like this (untested code ahead):
828
829 class Foo_class {
830     static long *Foo_smob_tag;
831     SCM obj; // representation as a scheme object, description comes later
832 }
833
834 // call this once on startup
835 void init_Foo_class {
836     static scm_smobfuns type_rec;
837
838     type_rec.mark = foo_mark;
839     type_rec.free = foo_free;
840     type_rec.print = foo_display;
841     type_rec.equalp = 0;
842     Foo_class::Foo_smob_tag = new int(scm_new_smob(type_rec));
843 }
844
845 When you want to export an object to scheme, you put a pointer to the
846 object itself in the cdr of the cell, and the tag in the car of the
847 cell.  The code looks like this:
848
849 // Is this a Foo?
850 static int
851 foo_p(SCM obj)
852 {
853     return(SCM_NIMP(obj) && SCM_CAR(obj) == Foo_class::Foo_smob_tag);
854 }
855
856 // given a Scheme representation, return, a C++ representation
857 static Foo_class *
858 foo_unbox(SCM obj)
859 {
860     return((Foo_class*)SCM_CDR(obj));
861 }
862
863 // the SCM representation of the object is stored inside itself
864 // this will become useful when destructor gets called
865 static SCM
866 foo_box(Foo_class *foo)
867 {
868     SCM_DEFER_INTS;
869     SCM_NEWCELL(foo->obj);
870     SCM_SETCAR(foo->obj, Foo_class::Foo_smob_tag);
871     SCM_SETCDR(foo->obj, (SCM)foo);
872     SCM_ALLOW_INTS;
873     return foo->obj;
874 }
875
876 > C++ determines life time, so what is the strategy?
877
878 What happens now when the destructor gets called?  Lets set the cdr to
879 NULL, and then check for that in all of the primitive functions that
880 use your smob.  We'll call this notion 'live'; a scheme object is
881 'live' if the C++ representation still exists, it's dead if the C++
882 object is gone.  You can still have references to dead objects in
883 scheme code; it's just an error to use them.  This idea is stolen from
884 Emacs's handling of buffers ('buffer-live-p' and friends).
885
886 Add another function, foo_live_p:
887
888 static int
889 foo_live_p(SCM obj)
890 {
891     return(foo_p(obj) && SCM_CDR(obj) != NULL);
892 }
893
894 In you destructor, you need to do:
895
896 ~Foo_class()
897 {
898     SCM_CDR(this->obj, NULL);
899 }
900
901 When writing new primitives, now just check foo_live_p().
902
903 I hope the above helps,
904
905 -russ
906
907
908 --
909 "Even if you are on the right track, you'll get run over 
910 if you just sit there."  
911              --Will Rogers (1879-1935)
912
913 ***************************
914
915 > I am still muddling along with integrating GUILE in LilyPond, and I
916 > have a question.  I want to replace an existing C++ implementation of
917 > identifier tables by GUILE's code.  I've managed to replace
918
919 >       Hash_table<String,Identifier*>
920
921 > by
922
923 >       Hash_table<SCM, Identifier*>
924
925 > and use interning and GUILE symbols for doing the identifier lookup.
926 > But I'd like to use GUILE's hash tables as well, and that's were my
927 > question comes in: is there an interface that allows me to iterate
928 > through the entries of a GUILE hash table?
929
930 I use the following, which should definitely be provided somewhere
931 in guile, but isn't, AFAIK:
932
933 (define (hash-table-for-each fn ht)
934   (do ((i 0 (+ 1 i)))
935       ((= i (vector-length ht)))
936     (do ((alist (vector-ref ht i) (cdr alist)))
937         ((null? alist) #t)
938       (fn (car (car alist)) (cdr (car alist))))))
939
940 (define (hash-table-map fn ht)
941   (do ((i 0 (+ 1 i))
942        (ret-ls '()))
943       ((= i (vector-length ht)) (reverse ret-ls))
944     (do ((alist (vector-ref ht i) (cdr alist)))
945         ((null? alist) #t)
946       (set! ret-ls (cons (fn (car (car alist)) (cdr (car alist))) ret-ls)))))
947
948 If you want a C version, you can run the above code through hobbit, or
949 tranlate it to C by hand.
950
951 -russ
952
953
954 --
955 "Whenever you find yourself on the side of the majority, it is time to
956 pause and reflect."
957              -- Mark Twain
958 ***********************