Hi Han-Wen,
On 18/08/11 03:16, Han-Wen Nienhuys wrote:
> On Wed, Aug 17, 2011 at 9:41 AM, David Kastrup
> wrote: [snip...] I should probably start using tags.
>
No, you're too nice a guy for that, how about
.
.
.
:-)
Cheers,
Ian
___
lilypond-deve
Han-Wen Nienhuys writes:
> On Wed, Aug 17, 2011 at 9:41 AM, David Kastrup wrote:
>
>>> on the plus side, if we use this, we will be the first GNU program to
>>> be compatible with the elisp compatibility mode in GUILE that has been
>>> almost ready for the last 15 years.
>>
>> I should say that
On Wed, Aug 17, 2011 at 9:41 AM, David Kastrup wrote:
>> on the plus side, if we use this, we will be the first GNU program to
>> be compatible with the elisp compatibility mode in GUILE that has been
>> almost ready for the last 15 years.
>
> I should say that would be rather irrelevant as a des
Han-Wen Nienhuys writes:
> On Wed, Aug 17, 2011 at 5:19 AM, David Kastrup wrote:
>
>> That would be scm_is_null (x). It is not exactly like the code gets
>> less readable by that substitution.
>
> it's not the same though. scm_is_null expands to
>
> pairs.h:#define scm_is_null(x)
On 17/08/11 07:41, Graham Percival wrote:
> On Tue, Aug 16, 2011 at 11:14:35PM -0300, Han-Wen Nienhuys wrote:
>> On Tue, Aug 16, 2011 at 7:17 PM, David Kastrup
>> wrote:
>>> So what does relying on undefined behavior buy us apart from
>>> the inability to debug type errors?
>>
>> It buys us time
On Wed, Aug 17, 2011 at 5:19 AM, David Kastrup wrote:
> --- a/lily/general-scheme.cc
> +++ b/lily/general-scheme.cc
> @@ -381,7 +381,7 @@ LY_DEFINE (ly_stderr_redirect, "ly:stderr-redirect",
> string m = "w";
> string f = ly_scm2string (file_name);
> FILE *stderrfile;
> - if (mode != SCM_U
Reinhold Kainhofer writes:
> On Mi., 17. Aug. 2011 10:19:33 CEST, David Kastrup wrote:
>> I mean, look at the bad code I dug up. Pretty early in the list there
>> was:
>> - if (mode != SCM_UNDEFINED && scm_string_p (mode))
>> + if (scm_is_string (mode))
>
>
> Yes, that's code that shoul
Reinhold Kainhofer writes:
> On Mi., 17. Aug. 2011 10:19:33 CEST, David Kastrup wrote:
>> I mean, look at the bad code I dug up. Pretty early in the list there
>> was:
>> - if (mode != SCM_UNDEFINED && scm_string_p (mode))
>> + if (scm_is_string (mode))
>
>
> Yes, that's code that shoul
On Mi., 17. Aug. 2011 10:19:33 CEST, David Kastrup wrote:
> I mean, look at the bad code I dug up. Pretty early in the list there
> was:
> - if (mode != SCM_UNDEFINED && scm_string_p (mode))
> + if (scm_is_string (mode))
Yes, that's code that should really be fixed.
> > If you feel co
David Kastrup writes:
> Bertrand Bordage writes:
>
>> 2011/8/17 David Kastrup
>>
>> Bertrand Bordage writes:
>>
>>
>> > This would be great if Han-Wen decides to keep it like that.
>> > Otherwise there is really a lot of work, with many shortcuts to
>> > define.
>>
Bertrand Bordage writes:
> 2011/8/17 David Kastrup
>
> Bertrand Bordage writes:
>
>
> > This would be great if Han-Wen decides to keep it like that.
> > Otherwise there is really a lot of work, with many shortcuts to
> > define.
> > to_boolean (scm_is_pair (x))
>
Han-Wen Nienhuys writes:
> On Tue, Aug 16, 2011 at 7:17 PM, David Kastrup wrote:
>>> (and I am speaking as a GUILE developer here as well)
>>
>> So what does relying on undefined behavior buy us apart from the
>> inability to debug type errors?
>
> It buys us time to work on more interesting and
Graham Percival wrote Wednesday, August 17, 2011 7:41 AM
On Tue, Aug 16, 2011 at 11:14:35PM -0300, Han-Wen Nienhuys wrote:
On Tue, Aug 16, 2011 at 7:17 PM, David Kastrup
wrote:
> So what does relying on undefined behavior buy us apart from
> the
> inability to debug type errors?
It buys u
2011/8/17 David Kastrup
> Bertrand Bordage writes:
>
> > This would be great if Han-Wen decides to keep it like that.
> > Otherwise there is really a lot of work, with many shortcuts to
> > define.
> > to_boolean (scm_is_pair (x))
>
> That one would be wrong since scm_is_pair already returns a C
On Tue, Aug 16, 2011 at 11:14:35PM -0300, Han-Wen Nienhuys wrote:
> On Tue, Aug 16, 2011 at 7:17 PM, David Kastrup wrote:
> > So what does relying on undefined behavior buy us apart from the
> > inability to debug type errors?
>
> It buys us time to work on more interesting and more valuable impr
> Speaking as a long-time lilypond developer, it is my experience that
> the errors you point out are not a problem (except for the SCM =>
> bool conversion). GUILE's API uses data that can be passed into C
> functions efficiently as parameters. This means that the SCM type
> must be a machine w
On Tue, Aug 16, 2011 at 7:17 PM, David Kastrup wrote:
>> (and I am speaking as a GUILE developer here as well)
>
> So what does relying on undefined behavior buy us apart from the
> inability to debug type errors?
It buys us time to work on more interesting and more valuable improvements.
Speaki
Reinhold Kainhofer writes:
> On Mi., 17. Aug. 2011 00:51:03 CEST, David Kastrup wrote:
>> All of the following would have been caught by this project (I
>> hand-sifted through a git grep with a few patterns catching only a small
>> subset of what the debug option would have).
>
> Yes, seems like
On Mi., 17. Aug. 2011 00:51:03 CEST, David Kastrup wrote:
> All of the following would have been caught by this project (I
> hand-sifted through a git grep with a few patterns catching only a small
> subset of what the debug option would have).
Yes, seems like those are real problems.
Doing a "gi
Han-Wen Nienhuys writes:
> The only real problem are boolean conversions because they are very wrong,
> ie,
>
> SCM x = ...
> if (x) {
> ..
> }
>
> for the rest, making lilypond SCM typing clean is just a lot of work
> with no benefits at all.
All of the following would have been ca
Han-Wen Nienhuys writes:
> On Tue, Aug 16, 2011 at 3:38 PM, David Kastrup wrote:
>>
>> Compile Lilypond with
>> -DSCM_DEBUG_TYPING_STRICTNESS=2
>>
>> The guile documentation states quite clearly
>>
>> -- C Type: SCM
>> `SCM' is the user level abstract C type that is used to represent
>>
Bertrand Bordage writes:
> This would be great if Han-Wen decides to keep it like that.
> Otherwise there is really a lot of work, with many shortcuts to
> define.
> to_boolean (scm_is_pair (x))
That one would be wrong since scm_is_pair already returns a C boolean.
-- C Function: int scm_is_pa
On Tue, Aug 16, 2011 at 3:38 PM, David Kastrup wrote:
>
> Compile Lilypond with
> -DSCM_DEBUG_TYPING_STRICTNESS=2
>
> The guile documentation states quite clearly
>
> -- C Type: SCM
> `SCM' is the user level abstract C type that is used to represent
> all of Guile's Scheme objects, no mat
Reinhold Kainhofer writes:
> Am Tuesday, 16. August 2011, 23:36:15 schrieb Reinhold Kainhofer:
>> However, I'm not sure if this will really work out or give us much benefit.
>> In particular, we have lots of checks for == SCM_EOL or == SCM_BOOL_T. E.g.
>> very deep inside the core of lilypond:
>>
This would be great if Han-Wen decides to keep it like that.
Otherwise there is really a lot of work, with many shortcuts to define.
to_boolean (scm_is_pair (x))
to_boolean (scm_list_p (x)) && !to_boolean (scm_null_p (x))
etc
Bertrand
___
lilypond-devel
Reinhold Kainhofer writes:
> However, I'm not sure if this will really work out or give us much benefit.
> In particular, we have lots of checks for == SCM_EOL or == SCM_BOOL_T. E.g.
> very deep inside the core of lilypond:
>
> inline bool ly_cheap_is_list (SCM x) {return scm_is_pair (x) || x==
Am Tuesday, 16. August 2011, 23:36:15 schrieb Reinhold Kainhofer:
> However, I'm not sure if this will really work out or give us much benefit.
> In particular, we have lots of checks for == SCM_EOL or == SCM_BOOL_T. E.g.
> very deep inside the core of lilypond:
>
> inline bool ly_cheap_is_list (S
Am Tuesday, 16. August 2011, 23:08:04 schrieb David Kastrup:
> Bertrand Bordage writes:
> > > Compile Lilypond with
> > > -DSCM_DEBUG_TYPING_STRICTNESS=2
> >
> > I don't understand how you're applying this setting.
> > I tried
> > ./configure -DSCM.
> > and
> > make -DSCM.
> > wit
David Kastrup writes:
> Bertrand Bordage writes:
>
>> > Compile Lilypond with
>> > -DSCM_DEBUG_TYPING_STRICTNESS=2
>>
>>
>> I don't understand how you're applying this setting.
>> I tried
>> ./configure -DSCM.
>> and
>> make -DSCM.
>> without success.
>
> ./configure CXXFLAG
Bertrand Bordage writes:
> > Compile Lilypond with
> > -DSCM_DEBUG_TYPING_STRICTNESS=2
>
>
> I don't understand how you're applying this setting.
> I tried
> ./configure -DSCM.
> and
> make -DSCM.
> without success.
./configure CXXFLAGS=-DSCM_DEBUG_TYPING_STRICTNESS=2
shoul
On Tue, Aug 16, 2011 at 10:34:54PM +0200, Bertrand Bordage wrote:
> > Compile Lilypond with
> > -DSCM_DEBUG_TYPING_STRICTNESS=2
>
>I don't understand how you're applying this setting.
>I tried
>./configure -DSCM.
My first guess would be to try
CFLAGS="-DSCM_..." ../co
>
> > Compile Lilypond with
> > -DSCM_DEBUG_TYPING_STRICTNESS=2
>
I don't understand how you're applying this setting.
I tried
./configure -DSCM.
and
make -DSCM.
without success.
> *cough* Bertrand? ;)
>
You're right!
Cécile Hauchemaille has started working on this!
Bertrand
_
On Tue, Aug 16, 2011 at 08:38:18PM +0200, David Kastrup wrote:
>
> Compile Lilypond with
> -DSCM_DEBUG_TYPING_STRICTNESS=2
...
> But with the current code base, cleaning this all up is going to be a
> lot of work. Not hard to do, but a lot.
I like it! It's something that's not challenging, it e
Compile Lilypond with
-DSCM_DEBUG_TYPING_STRICTNESS=2
The guile documentation states quite clearly
-- C Type: SCM
`SCM' is the user level abstract C type that is used to represent
all of Guile's Scheme objects, no matter what the Scheme object
type is. No C operation except assi
34 matches
Mail list logo