help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Changing the Emacs engine to Guile


From: Cecil Westerhof
Subject: Re: Changing the Emacs engine to Guile
Date: Wed, 08 Dec 2010 15:15:18 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Op dinsdag 22 jun 2010 10:38 CEST schreef Pascal J. Bourguignon:

> The above while found-match loop does not modify this-line.
> The result is to find the last match on the line.

I just hacked it fast to try it out. I only checked the standard case
where I changed the spaces at the beginning of the line with non break
spaces. I just tried something else and found this behaviour. As they
say: haste makes waste. There is also another bug, with certain input I
can get a value out of range. Next time I should verify my code and not
publish it immediately. :-{


> Also, (I'm not sure about it I would have to check string-replace, but
> my guess is that) the substituted text is (substring substitute-str
> start-match end-match), which will be different in the case of emacs
> code below.

I did a diff of the files generated by Guile and Emacs Lisp (when using
single byte characters) and they where the same. This was the case where
only the spaces at the beginning of the line where replaced.

I need to make a more robust version and make some test cases and test
again.

> this (while (re-search-forward  ...)) loop modifies the line for each
> occurence of the regexp, replacing it with (substring substitute-str 0
> match-length), which is a different replacement string in general.

Why? I would think the replacement string is the same. (When using
single byte characters.)


> I don't know about the other implementations, but with clisp you could
> also try to use the -C option to have your script compiled before
> running it.  On big files it might be worthwhile to spend some time
> compiling the script.

In my script I have:
    exec clisp -C "$0" "$@" 

That is not correct?


> But my point here is that in emacs, most code is compiled or byte
> compiled, therefore you should compare the speed of the code generated
> by sbcl vs. guile.  Benchmarking is hard.

As I understood it Guile compiles before executing. That is not correct?

Well, if the big time difference is nothing to worry about, I'll keep
still. ;-}

For the moment being I still prefer Emacs Lisp for scripting above
Guile. ;-]

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof


reply via email to

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