Re: [Jprogramming] Search

2023-05-10 Thread HH PackRat
I may be completely mistaken (and I didn't have time to double check the history), but I thought Roger Hui chose "j" because (I *think*) it was convenient (or conveniently located). In that spirit (and I realize it's probably ridiculous, yet practical), I would like to suggest "jkl". It's fantast

Re: [Jprogramming] Beginner: Where to start?

2022-12-29 Thread HH PackRat
Hi, Lawrence! On 12/28/22, Galaxy Being wrote: > I would like to learn J programming paradigm. I have a standard programming > background (C/C++, Java) along with some basic math, as well as some > functional programming exposure. Since you have a C background, be sure to check the published boo

Re: [Jprogramming] Second and Third Episodes of the Arraycast podcast are available

2021-06-12 Thread HH PackRat
On 6/12/21, bobtherriault wrote: > Thanks for pointing that out Harvey, Thanks for taking care of this! These are GREAT discussions, and I have learned a LOT from them! I hope there are a lot of episodes still to come! Harvey

Re: [Jprogramming] Second and Third Episodes of the Arraycast podcast are available

2021-06-12 Thread HH PackRat
On 6/12/21, 'robert therriault' via Programming wrote: > Just to let everyone know we have published our 2nd and 3rd episodes of the > Arraycast podcast all about the array programming languages. Why can one download the 1st episode but NOT the 2nd and 3rd episodes (via the "Download" option that

Re: [Jprogramming] Mass amend

2021-05-26 Thread HH PackRat
On 5/26/21, greg heil wrote: > Another take on viewing such DOHLCV data Thanks, Greg! I've already implemented previous ideas, but I will look into your code for possible applications in the future. Again, thanks! Harvey -- Fo

Re: [Jprogramming] Mass amend

2021-05-16 Thread HH PackRat
Hi, Raul! On 5/16/21, Raul Miller wrote: > You left out your example data for 'filer', but you gave enough detail > that I think I can see what you are trying to do. The following (which I did show) was the untransposed original version, downloaded from Yahoo Finance: DateOpen H

Re: [Jprogramming] Mass amend

2021-05-15 Thread HH PackRat
Hello--I was out of the house for much of today, so I haven't been able to respond until now. Thanks to all who responded with suggestions! Unfortunately, none of them worked as is, probably because you're used to a different way of approaching the problem and also because I probably should have

[Jprogramming] Mass amend

2021-05-14 Thread HH PackRat
Hello again! I'm thinking, for example, of a table of boxed data in its transposed horizontal position that has, say, 3 rows of, say, 1000 *boxed* values each. My goal is to amend *all* of the boxed values to their square roots in one version of what I want to do and *all* of the original boxed v

Re: [Jprogramming] How to choose characters with a boolean mask?

2021-04-16 Thread HH PackRat
A big THANK YOU to all who replied! Your methods worked exactly as I had hoped! Thanks again! Harvey -- For information about J forums see http://www.jsoftware.com/forums.htm

[Jprogramming] How to choose characters with a boolean mask?

2021-04-15 Thread HH PackRat
Hello, all! I have a list of characters and a boolean list of 1s and 0s. I thought that I could use the boolean list as a "mask" to choose characters by using "and" (*.). But the definition in NuVoc basically states that it can only be used with numbers (no literals). Here's an example of the k

Re: [Jprogramming] Need better understanding of "from"

2021-04-13 Thread HH PackRat
Hello, all! On 4/13/21, HH PackRat wrote: > I'm stumped and need to know why the following "from" problem occurs > and how to do what I'd like to do: > No problem when numeric values are used: ... > Problem when formulas are used instead of numeric values: ... >

[Jprogramming] Need better understanding of "from"

2021-04-13 Thread HH PackRat
Hello, all! I'm stumped and need to know why the following "from" problem occurs and how to do what I'd like to do: No problem when numeric values are used: val=. 0 1 { 'mevema' me val=. 2 3 { 'mevema' ve Problem when formulas are used instead of numeric values: j=. 0 [or 1 or 2] v

Re: [Jprogramming] Problem using variables in place of numbers

2021-03-19 Thread HH PackRat
On 3/19/21, Julian Fondren wrote: On 3/19/21, Raul Miller wrote: A big "thank you" to both of you! Harvey -- For information about J forums see http://www.jsoftware.com/forums.htm

[Jprogramming] Problem using variables in place of numbers

2021-03-19 Thread HH PackRat
Hello again! I want to match 2 tables to have the same length, but I want to save the overage. Here is the code that didn't work because J does not seem to allow variables in place of numbers: [leny1 is the length of the DEG table and lenx1 is the length of the table to match DEG with] xydiff=.

Re: [Jprogramming] "Amending" a row of boxed data?

2021-02-27 Thread HH PackRat
On 2/23/21, Ric Sherlock wrote: ... On 2/23/21, Raul Miller wrote: ... A big "thank you!" to both Ric and Raul! You solved my problem, and it now works the way I wanted. Harvey -- For information about J forums see http://www.

[Jprogramming] "Amending" a row of boxed data?

2021-02-23 Thread HH PackRat
Hello again! I've run into another "stumper" (for me, at least). True amending (according to the Vocabulary) does not work for boxed data, and the examples under "AmendingBoxedStructures" do not seem to be the kind of solution I'm looking for. What I'm trying to do is something that any human ca

Re: [Jprogramming] J tutorial from the perspective of a novice

2021-01-19 Thread HH PackRat
On 1/19/21, Arnab Chakraborty wrote: > Anyway, I have dumped a few more draft pages ( > https://arnabc74.github.io/jsoft/) The hotlink to nonlin11.html should be nonlin1.html to avoid a 404 error. Harvey -- For information a

Re: [Jprogramming] Problem with Acrobat Reader displaying plot

2021-01-05 Thread HH PackRat
On 1/4/21, Devon McCormick wrote: > I used to use Sumatra and only stopped because it did not survive the > Windows 10 migration. I tried to get Sumatra (based on recommends here), but my BitDefender product gave an "Infected web page" critical message and blocked its installation. So I went in

Re: [Jprogramming] Ken's 100th

2020-12-14 Thread HH PackRat
On 12/13/20, Eric Iverson wrote: > Ken Iverson's 100th birthday is on Thursday, December 17th. > A number of people significant in the APL/K/J story are putting together a > panel discussion that will be available online. > . . . > I believe, but am not sure, that there is a limit of 100 tickets.

Re: [Jprogramming] Seeking advice on structures

2020-12-09 Thread HH PackRat
On 12/9/20, emacstheviking wrote: > Thanks Devon... you wrote the VSCode J-plugin then? Amazing stuff, using it > right now! ... > Sean Perhaps you meant Ric Sherlock instead?? Harvey -- For

Re: [Jprogramming] Merging (amending?) two different data files

2020-11-27 Thread HH PackRat
On 11/27/20, R.E. Boss wrote: >[C=: A([,. ({:"1)@] #^:_1~ e.&:({."1))B > > e.&:({."1)NB. Indicates in which places first elements from B occur in A > #^:_1~NB. Expand the elements from left according to the > Booleans from the > right > [,. NB. Extend A with the

Re: [Jprogramming] Merging (amending?) two different data files

2020-11-27 Thread HH PackRat
On 11/27/20, HH PackRat wrote: > Hello again! Another stock market related question: > I need to merge the data of two different data files on the basis of > common dates. > . . . > I appreciate any help with this! I forgot to mention that I need any help to be explicit code, pl

Re: [Jprogramming] Stop command when testing

2020-11-26 Thread HH PackRat
Hi, Don! On 11/27/20, Don Kelly wrote: > That is fine- it is something from "TEurbo Basic" and implemented in APL > , in a way.and is very useful, but it only works if you detect, during > coding, when to deal with a problem due, often, to coding errors. What > is needed is an interrupt outside o

[Jprogramming] Merging (amending?) two different data files

2020-11-26 Thread HH PackRat
Hello again! Another stock market related question: I need to merge the data of two different data files on the basis of common dates. QUESTION 1 -- I know that I can use a "for." loop, but I was wondering if there was perhaps a better (perhaps faster?), more J-like approach. The basic idea i

Re: [Jprogramming] Stop command when testing

2020-11-26 Thread HH PackRat
I figured out how to do what I wanted: . . . . . . goto_stop. . . . . . . label_stop. ) The name "stop", of course, can be any label name you wish. In effect, this pattern can be used to "rem out" (remark out) any portion of code that you don't want executed at a particular moment

[Jprogramming] Stop command when testing

2020-11-26 Thread HH PackRat
I could have sworn that, a couple of months ago, someone posted some code that included a "stop" command of some sort in explicit coding, but I can't remember how it was done. I cannot find such a command anywhere in NuVoc. Searching the wiki brought back the "Vocabulary/JBreak" ancillary page, w

Re: [Jprogramming] List of Plot color names (preferably with colors)

2020-08-17 Thread HH PackRat
On 8/17/20, chris burke wrote: > Plot uses the graphics/color addon. The names are in > github.com/jsoftware/graphics_color/blob/master/colortab.ijs . Thanks, Chris! That's exactly what I was looking for! Harvey -- For informat

[Jprogramming] List of Plot color names (preferably with colors)

2020-08-17 Thread HH PackRat
The J program I'm currently working on uses Plot for showing multiple versions of stock prices simultaneously. Hence, I need to differentiate colors. I'm familiar with some minimal "standard" colors such as red, green, blue, etc., but some of those shades are too light or too dark for my purposes

Re: [Jprogramming] Amending a table

2020-08-07 Thread HH PackRat
On 8/7/20, Raul Miller wrote: >row=.1 >col=.2 >row,col > 1 2 >row col > |syntax error THAT was the cherry on top of the sundae! My program now works exactly as it is supposed to! Thank you VERY much, Pascal, Bob, Ric, and Raul!! You all are the greatest J helpers! Harvey -

Re: [Jprogramming] Amending a table

2020-08-06 Thread HH PackRat
On 8/6/20, 'robert therriault' via Programming wrote: Hi, Bob! > Pascal got you most of the way there, but I will add the idea of using a > selector to the Amend adverb to provide more precision. Where can I find more info on using a selector with Amend? > [ t=: <"0 i. 2 3 4 NB. creates ra

Re: [Jprogramming] Amending a table

2020-08-06 Thread HH PackRat
On 8/6/20, 'Pascal Jasmin' via Programming wrote: >> NB. (row{data)=. (< interpolated) start } row{data > > to change row 1, > 2 2 2 2 2 (1}) i. 4 5 > 0 1 2 3 4 > 2 2 2 2 2 > 10 11 12 13 14 > 15 16 17 18 19 > > if your data is boxed by column, > 2 3 2 3 2 (1}) each <"1&.|: i. 4 5 NB. t

[Jprogramming] Amending a table

2020-08-06 Thread HH PackRat
I'm back with another question! ;-) I know how to amend a list, but amending a table presents challenges beyond my knowledge of J. I read the several sources that deal very briefly with amending tables, but they assume knowledge and familiarity which is beyond me at the moment. Additionally, I f

[Jprogramming] Ancillary pages disappeared??

2020-08-06 Thread HH PackRat
I didn't know which of the two email pages was the better one to post this on, so I posted on both--sorry if this was a violation. When I clicked on the "Ancillary Pages" option near the top of the main NuVoc pages, the page goes to the bottom, but there are NO pages there! Have they moved elsewh

Re: [Jprogramming] Stumped by unboxing situation

2020-06-29 Thread HH PackRat
On 6/29/20, HH PackRat wrote: > I feel a little stupid for asking for help with something probably so > elementary that I'm missing it for some reason. I've done lots of > switching between boxed and unboxed data in the past, but this one's > got me stumped. ... >

[Jprogramming] Stumped by unboxing situation

2020-06-29 Thread HH PackRat
Hello, again! I feel a little stupid for asking for help with something probably so elementary that I'm missing it for some reason. I've done lots of switching between boxed and unboxed data in the past, but this one's got me stumped. I would have attached the 28K data file, but attachments aren

Re: [Jprogramming] zip API

2020-06-25 Thread HH PackRat
On 6/25/20, Jan-Pieter Jacobs wrote: > One of the first things I usually install on a windows machine is 7zip ( > https://7-zip.org). It opens about any archive, is cross-platform free and > open source (thus fairly future proof). Another vote for 7-Zip. I've used it for years--it's great! (It

Re: [Jprogramming] Why does a simple amend give a rank error?

2020-06-22 Thread HH PackRat
Thank you, Raoul and Julian! Your explanations clarified everything for me! Harvey -- For information about J forums see http://www.jsoftware.com/forums.htm

[Jprogramming] Why does a simple amend give a rank error?

2020-06-22 Thread HH PackRat
This is based on some exemplary amend code I found somewhere (but don't remember where): ]s=. i.12 0 1 2 3 4 5 6 7 8 9 10 11 This example of multiple indexes works: ]s1=. 999 (1 5 9) } s 0 999 2 3 4 999 6 7 8 999 10 11 but this seemingly simpler version (appearing exactly the same as the

[Jprogramming] How to merge consecutive and non-consecutive data?

2020-06-05 Thread HH PackRat
Another project, another question Below are two tables. Table A is daily stock data showing date, daily low, and daily high (columns 0, 1, 2). Table B is stock pivots only (based on a particular percentage between them), showing date and whether the pivot was a top (T) or a bottom (B) (colum

Re: [Jprogramming] Why is this match false?

2020-05-26 Thread HH PackRat
On 5/26/20, HH PackRat wrote: > I'm eager to find out why the test file works but the full file > doesn't (even though the test file is the first 11 rows of the full > file). A BIG THANK YOU TO ROB HODGKINSON for solving the problem! And thank you as well to Raul Mille

Re: [Jprogramming] Why is this match false?

2020-05-26 Thread HH PackRat
On 5/25/20, Henry Rich wrote: > You used {: in the last line. Try it with {. . > > and on 5/25/20, 'robert therriault' via Programming > wrote: > I noticed in the single line test that you used {: a and not {. a > > and on 5/25/20, bill lam wrote: > ... Maybe there are some typo such as {: ins

Re: [Jprogramming] Why is this match false?

2020-05-25 Thread HH PackRat
On 5/25/20, bill lam wrote: > what is the result of > 5!:5<'b' [ b=. {.a b=. {. a ┌───┬───┬───┬───┬───┬──┬──┬┐ │Date│Price│Open│High│Low│Vol.│Change %││ └───┴───┴───┴───┴───┴──┴──┴┘ 5!:5 < 'b' 'Date';'Price';'Open';'High';'Low';'Vol.';'Change %';0$0 Harvey ---

Re: [Jprogramming] Why is this match false?

2020-05-25 Thread HH PackRat
On 5/25/20, Henry Rich wrote: > Look at the shape of the strings. Probably one of them has a leading 1 > in the shape. You can either display the shape by hand or use Dissect. Here is my data again, this time with the shape after each step: {. a ┌───┬───┬───┬───┬─-─┬-──┬──-┬┐ │Date│Price│O

[Jprogramming] Why is this match false?

2020-05-25 Thread HH PackRat
I am stumped. a is a table with a label row followed by data rows. Breaking everything down into small steps to see where an error might occur: {. a ┌───┬───┬───┬───┬─-─┬-──┬──-┬┐ │Date│Price│Open│High│Low│Vol.│Change %││ └───┴───┴───┴───┴-──┴─-─┴─-─┴┘ 0 { ({. a) ┌───┐ │Date│ └───┘ > 0 {

Re: [Jprogramming] Deleting?

2020-05-21 Thread HH PackRat
On 5/19/20, HH PackRat wrote: > ... how to DELETE tables or any of their rows. Again, thanks so much for all your responses! I always learn so much from the responses to questions, not only mine, but others' as well.

Re: [Jprogramming] Deleting?

2020-05-19 Thread HH PackRat
On 5/19/20, Michael Dykman wrote: > In functional languages, you don't really delete so much as you make a > fresh copy absent of the undesirable elements. > Where you looking for this? > > ] a=. <"0 'abcdef' > ┌─┬─┬─┬─┬─┬─┐ > │a│b│c│d│e│f│ > └─┴─┴─┴─┴─┴─┘ >0 0 1 1 0 1 # a > ┌─┬─┬─┐ > │c│d│f│

[Jprogramming] Deleting?

2020-05-19 Thread HH PackRat
Feel free to skip this apologetic preface that applies to all questions I ask: By way of excuse, I'm 74, and my memory has been failing little by little over the last number of years. I looked at some J code I had written 8-12 years ago and was astounded at what I used to be able to do--nothing m

Re: [Jprogramming] How to convert list of phrases to list of boxed phrases?

2020-05-18 Thread HH PackRat
On 5/17/20, HH PackRat wrote: > I need to convert the following list of 5 (in reality, far more) > 11-character dates: ... > to a list of 5 boxed dates: ... Many THANK YOU's to those who responded! As usual with J, there's often more than one way to accomplish somethi

[Jprogramming] How to convert list of phrases to list of boxed phrases?

2020-05-16 Thread HH PackRat
I need to convert the following list of 5 (in reality, far more) 11-character dates: May 04 2020 May 01 2020 Apr 30 2020 Apr 29 2020 Apr 28 2020 $ --> 5 11 to a list of 5 boxed dates: +-+ |May 04 2020| +-+ |May 01 2020| +-+ |Apr 30 2020| +-

Re: [Jprogramming] Generating "music" in J (or otherwise)

2020-04-24 Thread HH PackRat
It occurred to me that I had forgotten two other ways that the "rhythm" resultant of 3 2 1 3 1 2 3 could be used--namely, for volume (dynamics) and for speed (tempo) of some music. The point is that any resultant of "interference" of 2 or more rhythms (whether constant "beats" or including another

Re: [Jprogramming] Generating "music" in J (or otherwise)

2020-04-24 Thread HH PackRat
On 4/23/20, Brian Schott wrote: > Harvey, > Your explanations were very helpful. Especially of the second line of > RSLTNT output. > There is no listing of the notes that go with the example RSLTNT 5 3, are > there? Your explanation just understands what notes are typical and the > meaning of "int

Re: [Jprogramming] Generating "music" in J (or otherwise)

2020-04-22 Thread HH PackRat
Hi, Devon! On 4/22/20, Devon McCormick wrote: > ... One thing that confused both of us is the output of > the "RSLTNT" code on page 54. I see that you reproduced this in J as > "resultant" but am unsure how the output, e.g. 3 2 1 3 1 2 3,:2 1 1 1 1 1 1 > as the output from RSLTNT 5 3, is suppose

Re: [Jprogramming] stock data programming how-to #4

2020-04-02 Thread HH PackRat
On 4/2/20, Raul Miller wrote: > One other thing -- after sleeping on this, I realized I had two > conflicting views about negative numbers in the stock values you were > working with: > (*) One is that negative numbers may appear in the data. > (*) The other is that negative numbers do not appear

Re: [Jprogramming] stock data programming how-to #4

2020-04-02 Thread HH PackRat
On 3/31/20, Raul Miller wrote: > If you have enough memory for the intermediate results, you would have > no problems with a file that large. You need an order of magnitude > more memory for intermediate results than the raw data, though. I have a desktop PC with 12 GB memory and 2 TB + 1 TB hard

Re: [Jprogramming] stock data programming how-to #4

2020-03-31 Thread HH PackRat
On 3/31/20, 'Jim Russell' via Programming wrote: > If I may, and having heard no reply to my defense of component files, I'd > suggest jfiles as a potential solution. Each record can take whatever size > you are comfortable with: a month, year, or decade. Or am I missing > something (as usual)? I

[Jprogramming] stock data programming how-to #4

2020-03-30 Thread HH PackRat
Finishing up with function #4.. I have a very large file consisting of multiple sets of historical stock prices that I would like to split into individual files for each stock. (I'll probably first have to write out all the files to a USB flash drive [I have limited hard drive space, but it m

[Jprogramming] stock data programming how-to #3

2020-03-30 Thread HH PackRat
Continuing on to function #3. Stock data normally consists of 6 pieces of data: date, open, high, low, close, volume. Occasionally, early data for some stocks has no data for the opening price of the day. One technique that some data vendors use (in order to guarantee non-zero prices, which

[Jprogramming] stock data programming how-to #2

2020-03-30 Thread HH PackRat
On to function #2 that I need (see how-to #1 for background) Given data set B below, moving from first to last, if the CLOSE value (column 4) is zero, replace the zeros in columns 1 to 5 with the preceding day's data (columns 1 to 5). Note that multiple zero rows will therefore have the same

[Jprogramming] stock data programming how-to #1

2020-03-30 Thread HH PackRat
I need your help, please! I also hope to learn more about using J in other contexts from your responses. I'm writing some software to manipulate my extensive stock market data in different ways, and I need *explicit* code (NOT tacit code) for several functions, which I'm splitting between multipl

Re: [Jprogramming] Generating "music" in J (or otherwise)

2020-03-30 Thread HH PackRat
On 3/28/20, Devon McCormick wrote: > has anyone done work with generating music or musical phrases in J? I'm > helping someone develop a music training game that starts by generating > sounds with a particular key, tempo, and phrase length. ... > I've told my collaborator that I think the generat

Re: [Jprogramming] Displaying stock market data

2019-09-11 Thread HH PackRat
On 9/11/19, Henry Rich wrote: > The definitive documentation of J is NuVoc > https://code.jsoftware.com/wiki/NuVoc > ": is described in https://code.jsoftware.com/wiki/Vocabulary/quoteco#dyadic and Chris Burke said essentially the same thing. I'm very familiar with the ": primitive. It was the

Re: [Jprogramming] Displaying stock market data

2019-09-11 Thread HH PackRat
On 9/11/19, Ric Sherlock wrote: > Here are a couple of options >0j4 ": 5.75449876 654356.766578 > 5.7545 654356.7666 Thank you--that worked just the way I wanted. Thanks again to both you and Mike! Where is the 0j4 ": (and all of its variations) located in the J documentation? I want to ma

[Jprogramming] Displaying stock market data

2019-09-11 Thread HH PackRat
Although I can find general print precision in the J documentation, I can't seem to find how to display 2 decimal digits, 3 decimal digits, or 4 decimal digits, for example. In other words, I don't really care how many digits precede the decimal point, but I need to have a fixed number of digits f