[Jprogramming] Unbox - Active, Community Maintained, GPL J

2016-01-15 Thread Thomas Costigliola
This post is to announce "Unbox" a new project which aims to be an actively maintained GPL release of J. I am committed to contributing my time and energy to incorporate community ideas, enhancements and bug-fixes. Currently, the focus is on the core engine which intends to be a drop in replace

Re: [Jprogramming] Round to nearest integer: harder than it seems

2016-01-15 Thread Linda Alvord
You never showed what should be the correct results using your code! ]P=:0 1 0 1 u P 0 1 ]Q=: 0 0 0 0 0 0 0 0 0 0 u Q 0 0 0 0 0 Linda -Original Message- From: Programming [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of David Lambert Sent: Friday, January 15, 2

[Jprogramming] How to put a plot in a document

2016-01-15 Thread Linda A Alvord
If I run the code below, which contains a viewmat and a plot when I run it in JHS, I can copy the entire output into a Word document. Everything except the plot appears correctly. Is there a way to capture the plot and insert it into he document? load 'viewmat plot' ]N=:8 GRB=:|.255*1 0 2

Re: [Jprogramming] Definition: Frame of an argument

2016-01-15 Thread Matthew Baulch
Very good point about verbal shorthands. The word "empty" is very likely to trip up newcomers. Once they learn one meaning, they're less likely to look out for others. Perhaps even experienced J'ers sometimes get tripped up? Though they'll more easily work out the consequences of each possible inte

Re: [Jprogramming] Definition: Frame of an argument

2016-01-15 Thread Matthew Baulch
Empty arrays are perfectly clear. They are exactly those arrays with shape containing at least one '0'. I had not considered applying a verb with argument rank 'n' to a noun 'a' of rank >:n where (>:n){$a is 0. Such an application has frame ,0. Applying the verb to a noun of rank n is entirely dif

Re: [Jprogramming] Definition: Frame of an argument

2016-01-15 Thread Raul Miller
I think you meant your first sentence to be "It sounds like your original confusion was between empty arguments (where the frame contains 0) and a frame with an empty shape (which simply means that the verb operates on a single cell)." Empty shape is very different from empty of values. But our t

Re: [Jprogramming] Round to nearest integer: harder than it seems

2016-01-15 Thread David Lambert
F=: '(<.0.5+y)-.(>.y)-:"0>.0.5+y' f=: 13 : F u=: 13 :(;6{.;:F) v=: 13 :(;7}.;:F) g=: u -. v g f. ([: <. 0.5 + ]) -. >. -:"0 [: >. 0.5 + ] f ([: <. 0.5 + ]) -. >. -:"0 [: >. 0.5 + ] ]N=:100*?.4 5$0 3.8363 32.9284 33.5644 98.5972 5.83756 28.2326 69.186 72.943 77.0554

Re: [Jprogramming] Cash Flow forecasting with J

2016-01-15 Thread John Baker
Thanks Jose, I have always admired your extreme tacit programming and wondered how you do it. I can manage short tacits (about a line) but beyond that my stack completely overflows. Cheers On Thu, Jan 14, 2016 at 4:51 PM, Jose Mario Quintana < jose.mario.quint...@gmail.com> wrote: > It looks v

Re: [Jprogramming] Round to nearest integer: harder than it seems

2016-01-15 Thread Mike Day
Well, perhaps you meant: g=:([: <. 0.5 + ]) -. >. -:"0 [: >. 1r2 + ] But g 1.25*_1 1 _1 and f 1.25*_1 1 _1 whereas g (1.25e10+1r2)*_1 1 _125 1250001 and f (1.25e10+1r2)*_1 1 _125 1250001 Ranks: g b. 0 _ _ _ f b. 0 _ _ _ ??? Mike On 1

Re: [Jprogramming] Definition: Frame of an argument

2016-01-15 Thread Henry Rich
It sounds like your original confusion was between empty arguments (where the frame contains 0) and an empty frame (which simply means that the verb operates on a single cell). http://code.jsoftware.com/wiki/Vocabulary/EmptyArguments has more on this topic. Whenever an earnest user has confus