Re: [stack] Patterns, recursion combinators and a programming challenge
On Fri, 2003-05-02 at 14:15, Nick Forde wrote:
> So my best solution is still:
>
> DEFINE foo ==
> [+] cons [infra dup rest cons] cons
> [dupd swons swons].
>
> Are there no other takers? There must be a better Joy implementation
> than this. Also the first call to this function only initialises the
> accumulator, whereas it should actually execute the first accumulate
> operation.
The problem statement is still opaque to me so I've probably
misunderstood. Below is a solution (?) in Monkey (my Joy-alike) but the
Joy version (untested) would be:
Sorry folks, I broke all my mail files and need something to reply to. Do not reply to this (unless you are me - if you know what I mean). - Manfred...
Sorry about the mess. Thank you all for the help with the "#!" flag. On the web page in j09imp.html ("The current implementation" Section 5 "Initating a Joy ...
Thanks for the question, Nick, it prompted me to think long and hard. Part of the answer is this draft for two new questions for the Further FAQ, FFAQ (visible...
Manfred, Thanks for your detailed response. I did a little web searching and came across one attempt at formalising recursive patterns in a similar way to the...
... Thanks for that. My response to the pattern movement had been tepid until now, but after your mail I might well have another look. ... I was intrigued by...
... When I first read about design patterns I wasn't particularly impressed as they didn't really give me any new insights into OO design. I'd encountered many...
... Yes, that is the conclusion I reached when writing my previous note. The "structured flow of control" patterns IF, WHILE, REPEAT, CASE LOOP-and-a-half...
On Mon, 28 Apr 2003, Nick Forde wrote: [..] ... I found the specification of the problem quite inscrutable, and eventually understood it only when I read some...
... Yes, me too. Looking at some of the other solutions I now think my initial attempt was over engineered. ... Looking at some of the other solutions the...
... Here's a slightly better description of the problem: http://www.paulgraham.com/accgensub.html 1. Takes, and returns functions that take, exactly one...
... The problem statement is still opaque to me so I've probably misunderstood. Below is a solution (?) in Monkey (my Joy-alike) but the Joy version...
Hi Martin, ... Nice! I think this _is_ a valid solution. I've also just noticed that my solution returns i incremented by n rather than n incremented by i....
On Fri, 2 May 2003, Nick Forde wrote: [.. a propos solutions to the "accumulator challenge" ..] ... No, I think you were exactly right. Over the weekend I did...
... Very cool stuff. I am now beginning to play around with a Joy implementation in Scheme. The current C implementation is usable, but it is not beautiful...
On Thu, 8 May 2003, John Cowan wrote: [...] ... Alas, yes. I have on occasions thought about a cleaner and more flexible implementation, but it is all rather...
... Someone sent me an executable, dated 5 June 2001, so it does not have the latest fixes. The URL is http://www.ccil.org/~cowan/joy1.exe ; feel free to copy...
... I agree. I'm still getting my head around it! ... Great. A Scheme implementation would be much more elegant than the current C interpreter, although...
... Well, it depends on your environment: Unixes tend to come with gcc but not Scheme, so there is that hurdle to get over; still, the RPM package and the...
... to C ... more ... but not ... and ... [snip] Have you checked out Bigloo Scheme? I believe it is compiled directly into C. It's free, has .rpm's for...
... Excellent point. When I get the implemention done in Petite, I'll grab Bigloo and generate myself some C. ... Exactly what I have in mind: (j 32 45 +) ...
... grab ... that ... to ... Great! The chapter on embedding Prolog is toward the back of the book ;) Amazingly, Graham implements the entire language in a...
... I sure don't see any way to do it using only R5RS hygienic macros. So far my only deviation from R5RS is that in the Chez implementation symbols have...
... [snip] ... Ah, finally something I'm qualified to speak about around here ;) (1996) http://www.cs.indiana.edu/scheme-repository/imp/siod.html (1997)...
thanks john. finally, i'm able to actually run joy ... ... From: "John Cowan" <cowan@...> To: <concatenative@yahoogroups.com> Sent: Friday, May 09, 2003...
Stevan Apter
sa@...
May 9, 2003 4:07 pm
... know ... Pretty sure the most up-to-date page is http://people.delphiforums.com/gjc/siod.html. Another Scheme implementation in a similar vein is Gauche....
... It was pointed out to me that the top-of-page banner and the botton-of-page banner make some of my web pages hard to read. History: For years I have been...