Re: guile style

2021-06-19 Thread jerry
On 6/19/21 1:59 PM, Linus Björnstam wrote: Unlike Donald Knuth, I can't stop myself from premature optimization and so far, in my short Guile career, I have almost always used my option 3. I will look into srfi-158 and srfi-171 because they look very interesting. Based on the responses here, I

Re: guile style

2021-06-19 Thread Linus Björnstam
On Sat, 19 Jun 2021, at 14:16, jerry wrote: > On 6/19/21 7:20 AM, Christopher Lam wrote: > > Agree set! is not a desirable form. It is not consistently optimisable. > > I cannot find the reference in the manual. > > > > Also consider the first form: you're building a list in 3 passes -- call

Re: guile style

2021-06-19 Thread Zelphir Kaltstahl
On 6/19/21 2:16 PM, jerry wrote: > On 6/19/21 7:20 AM, Christopher Lam wrote: >> Agree set! is not a desirable form. It is not consistently optimisable. I >> cannot find the reference in the manual. >> >> Also consider the first form: you're building a list in 3 passes -- call iota >> to

Re: guile studio

2021-06-19 Thread Kjetil Matheussen
> From: jerry > > I am fairly new to guile and scheme. People tell me that I should use a > functional style. > > I have 3 solutions for project euler problem #1. The first is > functional, the second is imperative and the third is written in "Little > Schemer" style. > > I was hoping other guile

Re: guile style

2021-06-19 Thread jerry
On 6/19/21 7:20 AM, Christopher Lam wrote: Agree set! is not a desirable form. It is not consistently optimisable. I cannot find the reference in the manual. Also consider the first form: you're building a list in 3 passes -- call iota to generate a list, call filter to navigate the list

Re: guile style

2021-06-19 Thread jerry
On 6/19/21 6:25 AM, Tim Van den Langenbergh wrote: On Saturday, 19 June 2021 02:55:34 CEST jerry wrote: I am fairly new to guile and scheme. People tell me that I should use a functional style. I have 3 solutions for project euler problem #1. The first is functional, the second is imperative

Fwd: guile style

2021-06-19 Thread Stefan Israelsson Tampe
-- Forwarded message - From: Stefan Israelsson Tampe Date: Sat, Jun 19, 2021 at 1:23 PM Subject: Re: guile style To: Tim Van den Langenbergh I'm a big fan of named let's which are a very general functional construct and tons of commentaries about the functional style misses

Re: guile style

2021-06-19 Thread Christopher Lam
Agree set! is not a desirable form. It is not consistently optimisable. I cannot find the reference in the manual. Also consider the first form: you're building a list in 3 passes -- call iota to generate a list, call filter to navigate the list again, then fold to accumulate your answer.

Re: guile style

2021-06-19 Thread Ricardo Wurmus
Hi Jerry, I am fairly new to guile and scheme. People tell me that I should use a functional style. I have 3 solutions for project euler problem #1. The first is functional, the second is imperative and the third is written in "Little Schemer" style. I was hoping other guile users would

Re: guile style

2021-06-19 Thread Tim Van den Langenbergh
On Saturday, 19 June 2021 02:55:34 CEST jerry wrote: > I am fairly new to guile and scheme. People tell me that I should use a > functional style. > > I have 3 solutions for project euler problem #1. The first is > functional, the second is imperative and the third is written in "Little > Schemer"

Re: guile studio - question

2021-06-19 Thread Adriano Peluso
Il giorno ven, 18/06/2021 alle 11.25 +0200, Ricardo Wurmus ha scritto: > Would you prefer a button in the toolbar that will always send the > code from the main buffer to the REPL? Personally, I would prefer a toolbar with a button in it, yes The simple reason is that this solution would be