Re: [Jprogramming] Remora: An Array-Oriented Language with Static Rank Polymorphism

2016-04-14 Thread Michal Dobrogost
programming contest. http://www.jsoftware.com/papers/pousse.htm > > > On Wed, Apr 13, 2016 at 6:06 PM, Michal Dobrogost < > michal.dobrog...@gmail.com> wrote: > > > Thought you guys may be interested in this. > > > > *Full paper:* > > http://

[Jprogramming] Remora: An Array-Oriented Language with Static Rank Polymorphism

2016-04-13 Thread Michal Dobrogost
Thought you guys may be interested in this. *Full paper:* http://www.ccs.neu.edu/home/shivers/papers/rank-polymorphism.pdf *Abstract:* The array-computational model pioneered by Iverson’s languages APL and J offers a simple and expressive solution to the “von Neumann bottleneck.” It includes a

Re: [Jprogramming] The Syntax is Settled

2016-10-14 Thread Michal Dobrogost
At first I thought this was spam, but the video in the article is hilarious. On Sat, Oct 8, 2016 at 6:21 PM, John Baker wrote: > I cannot resist posting this. It's a superb example of the inane anal > retentive nature of programmers and also definitely answers an important

Re: [Jprogramming] Generating Lookup Tables (LUTs)

2016-10-13 Thread Michal Dobrogost
1 1 1 1 > > Binding LU into lu might be excessive for spatially large arrays of y. > > This approach should work well for fewer that 32 or 64 bits. Otherwise, > you'd need to break the arrays up into word-sized chunks. Perhaps that > is what you were getting at? > > Any help, >

Re: [Jprogramming] Generating Lookup Tables (LUTs)

2016-10-13 Thread Michal Dobrogost
Sorry, I should say I am assuming 256 bit SIMD registers when I say 68 ORs. On Thu, Oct 13, 2016 at 8:22 PM, Michal Dobrogost < michal.dobrog...@gmail.com> wrote: > Thanks Mike! > > I'm scared of diving off the deep end here, nevertheless, what you > describe is exactly how

Re: [Jprogramming] Generating Lookup Tables (LUTs)

2016-10-13 Thread Michal Dobrogost
gt; > On Thu, Oct 13, 2016 at 9:33 PM, Michal Dobrogost < > michal.dobrog...@gmail.com> wrote: > > > Yes, you can rewrite (+./@:*.) as (+./ . *.). > > > > Hehe, in terms of peculiar ways and unknown reasons, I invite you to > think > > about how you might go ab

Re: [Jprogramming] Generating Lookup Tables (LUTs)

2016-10-13 Thread Michal Dobrogost
The more I think about it the more I think that a full 17-bit LUT, as you suggest, would be best. Only an experiment will tell :-) On Thu, Oct 13, 2016 at 8:34 PM, Michal Dobrogost < michal.dobrog...@gmail.com> wrote: > A 17-bit lookup table for a 17x1024 sized Y would require 16 MB.

Re: [Jprogramming] Generating Lookup Tables (LUTs)

2016-10-13 Thread Michal Dobrogost
Yes, you can rewrite (+./@:*.) as (+./ . *.). Hehe, in terms of peculiar ways and unknown reasons, I invite you to think about how you might go about implementing a high-performance version of this operation where X and Y are restricted to boolean elements, Y is static and X dynamically changes.

Re: [Jprogramming] Generating Lookup Tables (LUTs)

2016-10-13 Thread Michal Dobrogost
ero 1 0 0 0 0 NB. 4 { y 0 0 0 0 0 0 0 0 0 0 NB. Compute by 2-bit lookups (same result as +./@:*. above). NB. We don't really care, this just demonstrates that the LUT works. +./ (_2#.@|.\x) {"0 2 L2 1 0 1 1 0 Cheers, Mike On Wed, Oct 12, 2016 at 7:00 PM, Michal Dobrogost < mi

Re: [Jprogramming] Generating Lookup Tables (LUTs)

2016-10-13 Thread Michal Dobrogost
ssume #: is implemented in reverse. On Thu, Oct 13, 2016 at 12:05 AM, Michal Dobrogost < michal.dobrog...@gmail.com> wrote: > And +./"2@:# can be rewritten as +./@#. > > Anything else? > > On Wed, Oct 12, 2016 at 11:55 PM, Michal Dobrogost < > michal.dobrog...@gmail.com&

Re: [Jprogramming] Generating Lookup Tables (LUTs)

2016-10-13 Thread Michal Dobrogost
And +./"2@:# can be rewritten as +./@#. Anything else? On Wed, Oct 12, 2016 at 11:55 PM, Michal Dobrogost < michal.dobrog...@gmail.com> wrote: > You can rewrite *."0 1"1 _ as # > >]L3=. _3((|."1@:#:@:i.@:(2^#)) (+./"2 @: #) ])\Y > 0 0 0 0 0 NB. zer

Re: [Jprogramming] Generating Lookup Tables (LUTs)

2016-10-13 Thread Michal Dobrogost
1 1 1 NB. +./ 0 1 2 { Y 0 0 0 0 0 NB. zero 0 1 0 0 0 NB. 3 { Y 1 0 0 0 0 NB. 4 { Y 1 1 0 0 0 NB. +./ 3 4 { Y 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 On Wed, Oct 12, 2016 at 11:34 PM, Michal Dobrogost < michal.dobrog...@gmail.com> wrote: > I've tried to clean up the code t

[Jprogramming] Generating Lookup Tables (LUTs)

2016-10-12 Thread Michal Dobrogost
Hi All, I've been mucking around generating look up tables in C++. Getting frustrated, I wrote up this J single liner. Can you think of ways to simplify the LUT computation (the expression we assign to L2 and L3 below)? *Original Operator (no LUT)* ] x =. ? 5 $ 2 1 0 1 1 0 ] y =. 30 > ? 5

Re: [Jprogramming] Generating Lookup Tables (LUTs)

2016-10-12 Thread Michal Dobrogost
: > > L=: adverb define > : >(m {. x) inds m {. y > ) > > Or, more concisely: > > L=: adverb define >inds&(m&{.) > ) > > But when I look at your calculations, I don't see anything like this. > > If I am off base here, could you describe ho