Re: [Jprogramming] Adler-32

2014-08-26 Thread Raul Miller
Hmm... Here's another gerundy example you might want to tag for future reading... http://rosettacode.org/wiki/Odd_word_problem#J Honestly, though, most of this stuff is for play rather than serious work. Then again, the only way you get good at this stuff is if you play with it. Serious work ten

Re: [Jprogramming] Adler-32

2014-08-26 Thread Joe Bogner
On Tue, Aug 26, 2014 at 12:05 PM, Raul Miller wrote: > P.S. example use: > > trampoline 3 peano 5 > 8 > Thank you. This whole thread has pushed me well beyond my comfort zone. I realize that these examples are simply illustrative of the trampoline concept and wouldn't be used in the real worl

Re: [Jprogramming] Adler-32

2014-08-26 Thread Jose Mario Quintana
Raul already described the problem; I often use an adverb (scan) instead of (/\.) to solve this kind of issues: u ( scan=. ((~/)\.)(&.|.) ) u~/\.&.|. Again, the difference between these adverbs can be appreciated by means of symbolic nouns and verbs: ( YS=. <;._1 ' Y0 Y1 .. YN' ) ┌──┬──┬──

Re: [Jprogramming] Adler-32

2014-08-26 Thread Jose Mario Quintana
Raul wrote: " http://weblambdazero.blogspot.com/2010/07/advanced-recursion-in-newlisp.html looks like it is describing this: memoize=: M. " Yes; however, a trampoline function was defined further down. In any case, this is not very relevant now because… Raul wrote: " I should also add an imp

Re: [Jprogramming] Existing a Tacit

2014-08-26 Thread 'Pascal Jasmin' via Programming
nice Raul, thank you. - Original Message - From: Raul Miller To: Programming forum Cc: Sent: Tuesday, August 26, 2014 2:41:52 PM Subject: Re: [Jprogramming] Existing a Tacit I think this should be equivalent?   bs=: 2 :'u/@(}.~ # |&>: v i: 1:)' Thanks, -- Raul On Tue, Aug 26,

Re: [Jprogramming] Existing a Tacit

2014-08-26 Thread Raul Miller
I think this should be equivalent? bs=: 2 :'u/@(}.~ # |&>: v i: 1:)' Thanks, -- Raul On Tue, Aug 26, 2014 at 2:24 PM, 'Pascal Jasmin' via Programming < programm...@jsoftware.com> wrote: > Here is a function that will break from / based on the first item that > would match the condition (

Re: [Jprogramming] Existing a Tacit

2014-08-26 Thread 'Pascal Jasmin' via Programming
Here is a function that will break from / based on the first item that would match the condition (v) breakscan =: 2 : 'u/@:(] [`(>:@] }. [)@.(#@:[ > ]) 1: i:~ v)' the v verb can be anything that builds a boolean list matching the shape of y, and u will be applied to all items to the right of th

Re: [Jprogramming] Adler-32

2014-08-26 Thread Raul Miller
I should also add an implementation of the "tco" at the very bottom of that post: tco=:(0 :0)(2 :0) : context=. cocreate'' NB. context active__context=: 0 accumulated__context=: '' v 2 :m context ) : accumulated__n=: x,&/pair end. active__n=. 0 value__n end. ) sum=: (4 :0)

Re: [Jprogramming] Existing a Tacit

2014-08-26 Thread Roger Hui
The closing sentence of Ken Iverson's Turing Lecture http://www.jsoftware.com/papers/tot.htm : Finally, overemphasis of efficiency leads to an unfortunate circularity in design: for reasons of efficiency early programming languages reflected the characteristics of the early computers, and each gen

Re: [Jprogramming] Adler-32

2014-08-26 Thread Raul Miller
P.S. example use: trampoline 3 peano 5 8 Thanks, -- Raul On Tue, Aug 26, 2014 at 12:04 PM, Raul Miller wrote: > (I thought I sent this message, this morning, but I see that it has not > yet been sent. I have been having this happen a lot recently. I have a > hunch about what is happeni

Re: [Jprogramming] Adler-32

2014-08-26 Thread Raul Miller
(I thought I sent this message, this morning, but I see that it has not yet been sent. I have been having this happen a lot recently. I have a hunch about what is happening, but for now I'll just note that I am having this issue, and I apologize if it seems I am ignoring anyone.) -

Re: [Jprogramming] Adler-32

2014-08-26 Thread 'Pascal Jasmin' via Programming
The reason for any procedure (say looping) is to pass a small number of arguments to a lot of code.  recursion can bring the advantages/feature of local variables, and a chunk of code/lego that could be called by something else.  It is not really an advantage that it will use the stack for stora

Re: [Jprogramming] Adler-32

2014-08-26 Thread Joe Bogner
On Mon, Aug 25, 2014 at 9:51 PM, Raul Miller wrote: > http://www.integralist.co.uk/posts/understanding-recursion-in-functional-javascript-programming/#the-solution > looks like it is describing this: > > trampoline=:3 :0 >try. > while. 1 do. > y=. y`:6'' > end. >catch.