Re: [PATCH] Add string-replace-substring to (ice-9 string-fun)

2020-01-06 Thread Linus Björnstam
Did you try it with a "better" string-contains? IIRC the guile one is a naive string search (but in C) which could maybe be better if it was implemented as, say, a KMP search. The reference srfi-13 has one you could try. That could be faster for longer strings and longer patterns. If that is f

Re: [PATCH] Add string-replace-substring to (ice-9 string-fun)

2020-01-05 Thread David Pirotte
Hi, > > On 5 Jan 2020, at 13:12, Jan Nieuwenhuizen wrote: > > > > Andy Wingo writes: > > > >> On Fri 20 Dec 2019 18:32, lloda writes: > >> > >>> This patch adds string-replace-substring that wingo posted to the > >>> mailing list to (ice-9 strings). This is a commonly used function > >>>

Re: [PATCH] Add string-replace-substring to (ice-9 string-fun)

2020-01-05 Thread Arne Babenhauserheide
Christopher Lam writes: > This function has an interesting history. > > Someone or something in #guile had clued me there was a magic > string-replace-substring somewhere in guile-user archives. With some luck I > found it, and had bookmarked it, and kept it at the back of my mind for a > good

Re: [PATCH] Add string-replace-substring to (ice-9 string-fun)

2020-01-05 Thread lloda
> On 5 Jan 2020, at 13:12, Jan Nieuwenhuizen wrote: > > Andy Wingo writes: > >> On Fri 20 Dec 2019 18:32, lloda writes: >> >>> This patch adds string-replace-substring that wingo posted to the >>> mailing list to (ice-9 strings). This is a commonly used function and a >>> good implementatio

Re: [PATCH] Add string-replace-substring to (ice-9 string-fun)

2020-01-05 Thread Christopher Lam
This function has an interesting history. Someone or something in #guile had clued me there was a magic string-replace-substring somewhere in guile-user archives. With some luck I found it, and had bookmarked it, and kept it at the back of my mind for a good number of months. Meanwhile I was stea

Re: [PATCH] Add string-replace-substring to (ice-9 string-fun)

2020-01-05 Thread Jan Nieuwenhuizen
Andy Wingo writes: > On Fri 20 Dec 2019 18:32, lloda writes: > >> This patch adds string-replace-substring that wingo posted to the >> mailing list to (ice-9 strings). This is a commonly used function and a >> good implementation isn't trivial, so I think it deserves inclusion. > > I didn't know

Re: [PATCH] Add string-replace-substring to (ice-9 string-fun)

2020-01-05 Thread Andy Wingo
On Fri 20 Dec 2019 18:32, lloda writes: > This patch adds string-replace-substring that wingo posted to the > mailing list to (ice-9 strings). This is a commonly used function and a > good implementation isn't trivial, so I think it deserves inclusion. I didn't know that this module existed :)

[PATCH] Add string-replace-substring to (ice-9 string-fun)

2019-12-20 Thread lloda
This patch adds string-replace-substring that wingo posted to the mailing list to (ice-9 strings). This is a commonly used function and a good implementation isn't trivial, so I think it deserves inclusion. 0001-Add-string-replace-substring-to-ice-9-string-fun.patch Description: Binary data