Re: [Jprogramming] Call for Wiki work: standard library

2017-10-31 Thread 'Skip Cave' via Programming
The test: 1. Browse to jsoftware.com 2. Type "rand11" in the main search bar 3. I get 2 semi-useful results: random qymjdgu.jsoftware.com/docs/help602/user/script_random.htm

Re: [Jprogramming] Call for Wiki work: standard library

2017-10-31 Thread 'Skip Cave' via Programming
Raul, Great start, great plan. We need to set the main Jsoftware search bar (Google site search) so it can find the content on all those new pages. Skip Skip Cave Cave Consulting LLC On Wed, Nov 1, 2017 at 12:22 AM, Raul Miller wrote: > Ok, note however that that Addons page that I modified i

Re: [Jprogramming] Call for Wiki work: standard library

2017-10-31 Thread Raul Miller
Well... I tried using chrome (which is heavily integrated with google search). In the address bar, I typed: code.jsoftware.com and when I hit space, it brought up a j wiki search. In other words, when I searched google for: code.jsoftware.com rand11, it brought up http://code.jsoftware.com/mediaw

Re: [Jprogramming] Call for Wiki work: standard library

2017-10-31 Thread Raul Miller
Ok, note however that that Addons page that I modified is a landing page for the Addons top nav. If you go back to the page I modified you can see that Addons is bolded (and black) in that blue JAL bar. So now I need to think about that a little. Meanwhile, here's the system libs: require'general

Re: [Jprogramming] Parity patterns

2017-10-31 Thread Raul Miller
Well... if you really wanted to go overboard on rephrasings, you could take that a bit further and do something like this: grow=: , _2&{ ~: 3 ~:/\ 0,{:,0: paritypattern=: 1 }. [ grow@:]^:([-1:) 0 ,: ] Though, of course, getting rid of meaningful names is not always a good thing. Anyway

Re: [Jprogramming] Call for Wiki work: standard library

2017-10-31 Thread Henry Rich
Bravo!  I have moved the page to http://code.jsoftware.com/wiki/Vocabulary/Libraries which is a place where a new user is more likely to stumble into it, I think. I see you have the Addons; what about the standard libraries like strings, regex, debug, etc.?  They need to be documented in the

Re: [Jprogramming] Parity patterns

2017-10-31 Thread Ivan S
01.11.2017, 05:12, "Raul Miller" : > I am not sure that if there's a better approach, though obviously we > could rephrase your approach slightly. > > For example: > >    nextrow=: [ ~: 3 ~:/\ 0,],0: >    grow=: , _2&{ nextrow {: >    paritypattern=: 1 }. [ grow@:]^:([-1:) 0 ,: ] > > I hope this he

Re: [Jprogramming] Call for Wiki work: standard library

2017-10-31 Thread 'Skip Cave' via Programming
The Addons page is nice. However, my test, which consistes of searching for "rand11" in the main Jsoftware search bar, still doesn't find any substantial references in the wiki pages, even though the key rand11 references are mentioned several times at: http://code.jsoftware.com/wiki/Addons/stats/b

Re: [Jprogramming] Parity patterns

2017-10-31 Thread Don Guinn
ep=:,~:/ NB. Build even parity op=:,[:-.~:/ NB. Build odd parity ep 1 1 1 ep 1 1 1 1 0 op 1 1 0 op 1 1 1 1 1 ep 0 0 0 op 0 0 1 On Tue, Oct 31, 2017 at 4:12 PM, Raul Miller wrote: > I am not sure that if there's a better approach, though obviously we > could rephrase

Re: [Jprogramming] Parity patterns

2017-10-31 Thread Raul Miller
I am not sure that if there's a better approach, though obviously we could rephrase your approach slightly. For example: nextrow=: [ ~: 3 ~:/\ 0,],0: grow=: , _2&{ nextrow {: paritypattern=: 1 }. [ grow@:]^:([-1:) 0 ,: ] I hope this helps... -- Raul On Tue, Oct 31, 2017 at 5:05 PM,

Re: [Jprogramming] Call for Wiki work: standard library

2017-10-31 Thread Raul Miller
Ok, after a few false starts, I think I have your three column table suggestion implemented at http://code.jsoftware.com/wiki/Addons It would need manual support going forwards, so the code I used to implement it is probably not interesting. Thanks, -- Raul On Tue, Oct 31, 2017 at 4:55 PM, He

Re: [Jprogramming] Call for Wiki work: standard library

2017-10-31 Thread chris burke
> Perhaps there would be a way to extract information from comments, if there is a standard format for the comments (like scriptdoc). The joxygen addon can be used to generate docs from comments, see code.jsoftware.com/wiki/Addons/docs/joxygen . This replaces scriptdoc and is currently used for th

[Jprogramming] Parity patterns

2017-10-31 Thread Ivan S
https://oeis.org/A118141 "A parity pattern is a matrix of 0's and 1's with the property that every 0 is adjacent to an even number of 1's and every 1 is adjacent to an odd number of 1's." As a J exercise, I've defined a verb that creates a parity pattern when given its height and the first row

Re: [Jprogramming] Call for Wiki work: standard library

2017-10-31 Thread Henry Rich
What you are talking about is what I was looking for as a starting point.  It would give a list of addons, and within each addon, a list of scripts. Then, for each script someone would need to extract the entry points and add a description of what the entry point does.  Maybe this could be au

Re: [Jprogramming] Call for Wiki work: standard library

2017-10-31 Thread neitzel
We have had "scriptdoc" for ages. It provides for both individual verb/whatnot documentation and for overall script/bundle documentation. Make its use mandatory for all add-on contributors. Extract the initial script comment as "add-on abstract" automatically. Make that abstract viewable Both f

[Jprogramming] JHS update

2017-10-31 Thread Eric Iverson
JHS updated to avoid a keyboard conflict on macOS. macOS - ctrl+shift+up/dn didn't work as line recall. macOS - ctrl+shift+ to recall lines. -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Partitions

2017-10-31 Thread 'Mike Day' via Programming
Thanks, Raul. NB - mods to parRuskey below! I'm not sure my latest effort (mdconst) merits much study. If you do look,  you might notice that the filtering check can be done slightly more efficiently by building only the first column of the new comparand and then constructing all columns only

Re: [Jprogramming] Call for Wiki work: standard library

2017-10-31 Thread Raul Miller
Well... Conceptually speaking, the list of packages are the unique path name part of require 'general/dirutils' (#~ +./@('manifest.ijs' E. ])@>) {."1 dirtree '~addons' And, conceptually, some (but not all) of the information that the wiki needs can be obtained from those manifests. The wa

Re: [Jprogramming] Call for Wiki work: standard library

2017-10-31 Thread Henry Rich
Yes, the eventual goal being to have a line in the new page for each entry point in the libraries. We should back up to what I want for the user.  I want someone to be able to wonder, "what does J do for me for reading JSON files?" or "how does J read images?" or "how do I create a CSV file?"

Re: [Jprogramming] Call for Wiki work: standard library

2017-10-31 Thread Raul Miller
So... just to be clear... I think we are talking about the http://code.jsoftware.com/wiki/Addons page, and bringing onto that page a variation of the table which appears on the linked version pages? Thanks, -- Raul On Tue, Oct 31, 2017 at 1:10 PM, chris burke wrote: > Thanks. One change I wou

Re: [Jprogramming] Call for Wiki work: standard library

2017-10-31 Thread chris burke
Thanks. One change I would make from the old Addons page is to not list the addons separately for each release, i.e. no need for JAL/805, JAL/804 etc. Instead, each addon page can indicate its target platform, and pages for obsolete addons can be moved elsewhere. On Tue, Oct 31, 2017 at 7:43 AM, H

Re: [Jprogramming] Partitions

2017-10-31 Thread Raul Miller
Well... I did get as far as doing basic timings: tim=:2 :0 : u ratetime v"0 ) ratetime=:2 :0 u NB. force x and y to be verb args : try. assert. x<:y tV=.6!:2 'rV=. x v y' tU=.6!:2 'rU=. x u y' tU%tV catch. rV=.rU=.0 _ end. assert. rV -:&(/:~)&:(/:~"1)&:(/:~&.>)

Re: [Jprogramming] Partitions

2017-10-31 Thread 'Mike Day' via Programming
OOps - it is still recursive.  Perhaps it's unavoidable, M On 31/10/2017 14:33, 'Mike Day' via Programming wrote: Well done!  I too was trying to see how to remove the recursion, without success. Have you considered the (trivial) modification,  to rename "r" as "a", and "a" as something els

[Jprogramming] Call for Wiki work: standard library

2017-10-31 Thread Henry Rich
Every so often someone observes, quite rightly, that there should be a Wiki guide to the J libraries. Can someone start this project?  I think that a page that lists all the standard libraries and the Addons files, giving the main entry points within them, would be enough to begin with.  Then

Re: [Jprogramming] Partitions

2017-10-31 Thread 'Mike Day' via Programming
Well done!  I too was trying to see how to remove the recursion, without success. Have you considered the (trivial) modification,  to rename "r" as "a", and "a" as something else,  to allow easier comparison with your verb? BTW,  I'd be interested to see reactions to my offering of a "constru

Re: [Jprogramming] Plot Questions

2017-10-31 Thread Don Guinn
Just playing and tried Raul's line for a single point and J hung in an error message over and over. load 'plot' 'color red; type marker;markersize 2' plot <"1|:,:10 10 Message box from wdhandler: error in: plot_gs_paint domain error: cd rc=: glcmds`glcmds_jglc@.(Poutput=iQTC)buf Had

[Jprogramming] Plot Questions

2017-10-31 Thread Andrew Nikitin
>> > Also in the first example, how can I put a text legend beside the dot at >> > 10,10? I just want a single ASCII number there beside the 10,10 dot. You can convert  plot coordinates to screen coordinates and use textc plot command to place label In the past (J6) I had to do the opposite

Re: [Jprogramming] Partitions

2017-10-31 Thread Erling Hellenäs
Hi all! Here is a new parRuskey, slightly slower but written in a normal way for J code. From here we can apply our normal tricks to make it faster and better. k and n in S is one less than in the original, because of the index origin of J. I removed the global variables. This had a negati

Re: [Jprogramming] Plot Questions

2017-10-31 Thread Raul Miller
I don't think ascii labels on dots is currently supported. http://code.jsoftware.com/wiki/Plot/Keys is as close as I can see to that, but even that does not seem like it could be relevant if we can't get single dot series (since I think the key is for a series rather than for a member of the serie

Re: [Jprogramming] Plot Questions

2017-10-31 Thread 'Skip Cave' via Programming
Raul, No, the plot locks up the same way on 8.05 in Win 10. Any clue on how to put ASCII labels on the dots? Skip Cave Cave Consulting LLC On Tue, Oct 31, 2017 at 1:59 AM, Raul Miller wrote: > That's a good question. > >require'plot' >'color red; type marker;markersize 2' plot <"1|:0