[Jprogramming] OpenWhisk Docker J image under Alpine.

2017-06-20 Thread Thomas McGuire
Joe Bogner Posted a Docker image for running J on a tiny core docker image on JChat forum. http://www.jsoftware.com/pipermail/chat/2016-November/007158.html I happened across the post doing a search on the Forums. It gave me a

Re: [Jprogramming] largest rectangle problem

2017-06-20 Thread Raul Miller
Ah.. hmm... Is this what you were thinking of? (i. >./)(+ * *@[)/\. 0 1 1 1 0 1 0 1 Note that there could be multiple blocks the same length, though, so maybe instead: (I.@:= >./)(+ * *@[)/\. 0 1 1 1 0 1 0 1 That's an interesting approach you've got going here, and it might turn out to b

Re: [Jprogramming] largest rectangle problem

2017-06-20 Thread Martin Kreuzer
Proved myself wrong with this set of data: lrds 2 6 7 4 1 7 7 NB. largest rectangle within data set (at that stage only matrix output) 2 6 7 4 1 7 7 0 1 1 1 0 1 1NB. 14 vs 12 (hmm) So, if I'd stick with that approach, it isn't the *longest *block, but maybe larg

Re: [Jprogramming] largest rectangle problem

2017-06-20 Thread Martin Kreuzer
@Raul Beg your pardon for taking your time ... This is what I did (as an approach); maybe I learn something from you (or somebody else) proving me wrong. Anyway, this seems to work on the given set of data: Taking the mean of the column heights ] v=. 2 6 7 4 1 7 2 6 7 4 1 7 am=. +/ %

Re: [Jprogramming] largest rectangle problem

2017-06-20 Thread 'Mike Day' via Programming
Thanks. All those Euler problems had me fearing something worse! Mike Please reply to mike_liz@tiscali.co.uk. Sent from my iPad > On 20 Jun 2017, at 21:56, Raul Miller wrote: > > Yes. > > One way of thinking about that would be that the elements have > orthogonal sides, and slanted

Re: [Jprogramming] largest rectangle problem

2017-06-20 Thread Raul Miller
Yes. One way of thinking about that would be that the elements have orthogonal sides, and slanted "rectangles" would thus include empty space on the edges. Thanks, -- Raul On Tue, Jun 20, 2017 at 4:49 PM, 'Mike Day' via Programming wrote: > I've only just seen this. > I expect it's obvious,

Re: [Jprogramming] largest rectangle problem

2017-06-20 Thread 'Mike Day' via Programming
I've only just seen this. I expect it's obvious, but you ARE looking only for rectangles with "vertical" and "horizontal" sides, i.e. no rotations other than multiples of pi/2 involved? Thanks, Mike Please reply to mike_liz@tiscali.co.uk. Sent from my iPad > On 20 Jun 2017, at 16:29

Re: [Jprogramming] largest rectangle problem

2017-06-20 Thread Raul Miller
(eratta) I should have written: ... but time and space are proportional to the square of the list of bar lengths ... Sorry about the bad sentence structure. -- Raul On Tue, Jun 20, 2017 at 4:43 PM, Raul Miller wrote: > Hmm... maybe I should have just gone out and shown how I approached > th

Re: [Jprogramming] largest rectangle problem

2017-06-20 Thread Raul Miller
Hmm... maybe I should have just gone out and shown how I approached the problem... (but feel free to hold off on reading this post, or replies to it, if you are wanting to solve it on your own and you think you understand the problem description). And, perhaps, I should add that that drdobbs writ

Re: [Jprogramming] largest rectangle problem

2017-06-20 Thread Joe Bogner
possible spoiler - http://www.drdobbs.com/database/the-maximal-rectangle-problem/184410529 At a minimum, it help explains the problem On Tue, Jun 20, 2017 at 1:02 PM, Xiao-Yong Jin wrote: > Brute force: > > (\:*/"1);<@:((#,<./)\.)\2 6 7 4 1 7 > 2 6 > 3 4 > 4 2 > 2 4 > 1 7 > 1 7 > 1 6 > 3

Re: [Jprogramming] largest rectangle problem

2017-06-20 Thread Xiao-Yong Jin
Brute force: (\:*/"1);<@:((#,<./)\.)\2 6 7 4 1 7 2 6 3 4 4 2 2 4 1 7 1 7 1 6 3 2 6 1 5 1 5 1 2 2 1 4 4 1 4 1 3 1 3 1 1 2 2 1 2 1 1 1 Though the complexity looks like n^3 to me. There must be a more efficient algorithm. > On Jun 20, 2017, at 10:29 AM, Raul Miller wrote: > > Something I st

Re: [Jprogramming] ios speculation

2017-06-20 Thread bill lam
J can download addons from pacman. If all of them are pure j scripts, these code should be viewable and editable by the user. Вт, 20 июн 2017, Xiao-Yong Jin написал(а): > You may have more wiggle room now that > > from https://developer.apple.com/app-store/review/guidelines/ > > • 2.5.2 Ap

Re: [Jprogramming] largest rectangle problem

2017-06-20 Thread Don Guinn
I still don't understand what you want. But how about boxing it? <'*'#"0~2 6 7 4 1 7 +---+ |** | |** | |***| | | |* | |***| +---+ Well, it would be a box for a fixed font. On Jun 20, 2017 9:30 AM, "Raul Miller" wrote: > Something I stumbled over today. > >

Re: [Jprogramming] largest rectangle problem

2017-06-20 Thread robert therriault
I think that I would approach it using ;. 3 to create results such as this 3 4 <;. 3 '*'#"0~2 6 7 4 1 7 ┌┬┬┬┬───┬──┬─┐ │** │* │││ │ │ │ ││││*** │** │* │ │ │││││***│**│*│ ├┼┼┼┼───┼──┼─┤ ││││*** │** │* │ │ │*

Re: [Jprogramming] ios speculation

2017-06-20 Thread Xiao-Yong Jin
You may have more wiggle room now that from https://developer.apple.com/app-store/review/guidelines/ • 2.5.2 Apps should be self-contained in their bundles, and may not read or write data outside the designated container area, nor may they download, install, or execute code, including o

Re: [Jprogramming] largest rectangle problem

2017-06-20 Thread Raul Miller
Both of those are valid answers. The problem is simply to determine the largest area. Thanks, -- Raul On Tue, Jun 20, 2017 at 11:58 AM, 'Pascal Jasmin' via Programming wrote: > is the answer to your example, 6x2 or 4x3? > > > > > From: Raul Miller > To: Prog

Re: [Jprogramming] ios speculation

2017-06-20 Thread Eric Iverson
I am looking at various possibilities here. At some point it comes down to what the app store accept. For now, all I can suggest is patience for a few months until we have something to show. On Mon, Jun 19, 2017 at 10:09 PM, 'Jim Russell' via Programming < programm...@jsoftware.com> wrote: > Any

Re: [Jprogramming] largest rectangle problem

2017-06-20 Thread 'Pascal Jasmin' via Programming
is the answer to your example, 6x2 or 4x3? From: Raul Miller To: Programming forum Sent: Tuesday, June 20, 2017 11:30 AM Subject: [Jprogramming] largest rectangle problem Something I stumbled over today. If we have a series of bars of varying height, what

Re: [Jprogramming] largest rectangle problem

2017-06-20 Thread Raul Miller
Actually, the area of the rectangle I am looking for in that data set is 12, where the area of the rectangle you proposed is 42. Despite how famous 42 is as an answer, that rectangle includes empty spaces, so it's an answer which I have rejected. I hope this helps. Thanks, -- Raul On Tue, Jun

Re: [Jprogramming] largest rectangle problem

2017-06-20 Thread robert therriault
I think that you are asking for a rectangle that would enclose all of the *'s minimally. So that there would be spaces within the rectangle but none more than necessary. I would use something like this: '*'#"0~2 6 7 4 1 7 ** ** *** * *** ('o' $~ # , >./) 2

[Jprogramming] largest rectangle problem

2017-06-20 Thread Raul Miller
Something I stumbled over today. If we have a series of bars of varying height, what's the largest rectangle that can be drawn over the bars without covering any empty space. For example: '*'#"0~2 6 7 4 1 7 ** ** *** * *** I'll post a solution later, and I'll be interested i