It probably would be nice to have something like an ML-flavored compiler for some subset of J.
J already lets you link to freshly built shared objects (also known as "DLLs") using 15!: so all the next step is probably for someone to build a suitably small example implementation. There's actually a huge variety of such tools. They accumulate faster than most people can study them. Fortunately, no one needs to use most of their features - especially for starting projects. Thanks, -- Raul On Mon, Aug 4, 2014 at 3:30 PM, Alex Giannakopoulos <[email protected] > wrote: > Hm, interesting approach, that of Roger's, I still haven't digested it all, > but sometimes it would be nice to be able to tackle these problems the same > as everybody else in the world... > > > On 4 August 2014 20:12, Alex Giannakopoulos <[email protected]> > wrote: > > > I used the following memoized code, > > > > nextcol =: 3 : 0 > > > > if. 0=2|y do. -: y > > > > else. >: 3*y > > > > end. > > > > ) > > > > > > colchain =: 3 : 0 M. > > > > if. y=2 do. 1,2 > > > > else. chain=. colchain nextcol y > > > > (>:0{chain),x:y>.1{chain > > > > end. > > > > ) > > > > but it took forever to generate the following I aborted it. > > colchain"0 (2}.i.1000001) > > > > I wonder if I did something wrong. > > It seems to work if, for instance, you give > > colchain"0 (2+i.9999) > > Which makes me think the memoization isn't working > > Even my slow Scheme interpreter gives the answer in 10 seconds or so, C++ > > in less than a second. > > > > > > OTOH, old hands say that J isn't really meant for recursion. I wonder if > > this problem should be tackled differently. > > > > OK, I'm off to read Roger's post that Dan pointed to... > > > > > > > > On 4 August 2014 17:30, mvillarino <[email protected]> wrote: > > > >> 2014-08-04 14:12 GMT+02:00 Dan Bron <[email protected]>: > >> > If you're OK with spoilers, have you seen Roger's Collatz Conjecture > >> essay > >> > on the Wiki? > >> > > >> > http://jsoftware.com/jwiki/Essays/Collatz%20Conjecture > >> > > >> > >> ? I googled for information on a J spoiler... but no, I haven't found > it. > >> Thanks a lot !!! > >> ---------------------------------------------------------------------- > >> For information about J forums see http://www.jsoftware.com/forums.htm > >> > > > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
