Re: [Jprogramming] jios user subdirectory

2023-12-27 Thread Brian Schott
Edit, avoid > bracketing it with {{…}} or even 3 : 0 … ) > > Safer still, turn off Syntax Coloring. > > > > On Wed, 27 Dec 2023 at 18:49, 'Mike Day' via Programming < > programm...@jsoftware.com> wrote: > > > Glad that was useful. > > > > You

Re: [Jprogramming] jios user subdirectory

2023-12-26 Thread Brian Schott
21:00 > Platform: iOS/iPadOS > Version: 903.2 57 > Installer: App Store > Contact: www.jsoftware.com > > I think I "created" them by copying folders with scripts from iCloud, but > I see there is a folder-create icon in the Files app's display. > > Hope that&#

[Jprogramming] jios user subdirectory

2023-12-26 Thread Brian Schott
Can the user create a subdirectory under j/user and fill it with .ijs files in j90x on iphone? Thanks, -- (B=) -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Rank difficulties

2023-09-06 Thread Brian Schott
Does this help? ,./0 1 {"1 m 0 2 1 3 -- (B=) <-my sig Brian Schott -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Anagram Operator (A.) and Generalized Datatype declaration in function assignments.

2023-08-14 Thread Brian Schott
Have you tried the following? (,&'x')&.(0&":) 180548043269214561950911457875657 180548043269214573494164592263168 datatype (,&'x')&.(0&":) 1805480432692145619509114

Re: [Jprogramming] Bivalent verb query

2023-05-15 Thread Brian Schott
Reading in Nuvoc I see the following comment. Perhaps, it pertains. 3. In no case does $: refer to a larger unit than the sentence it appears in, for example an explicit definition in which it appears. -- For information about J f

Re: [Jprogramming] Search

2023-05-10 Thread Brian Schott
ps://en.wikipedia.org/wiki/F_%28programming_language%29 > > P (programming language) - Wikipedia > https://en.wikipedia.org/wiki/P_(programming_language) > > T (programming language) - Wikipedia > https://en.wikipedia.org/wiki/T_(programming_languag

Re: [Jprogramming] Search

2023-05-09 Thread Brian Schott
OR site:jsoftware.com) > > to a search tends to find at least some J content. > > And, maybe if more people used it, search engine support might improve? > > Thanks, > > -- > Raul > > -- (B=) <-my sig Brian Schott

Re: [Jprogramming] File Operations

2023-02-01 Thread Brian Schott
I think you want to start with 5!:5 <'testfile' which is text. -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Grade behavior

2023-01-30 Thread Brian Schott
Raul, Yes, your example and its explanation are correct. I'll rethink this approach, perhaps as you suggested. > > -- For information about J forums see http://www.jsoftware.com/forums.htm

[Jprogramming] Grade behavior

2023-01-30 Thread Brian Schott
'(())' 0 1 /:'[[[]]]';'[[]]' 0 1 /:'((()))';'(())' 0 1 /:'{{{}}}';'{{}}' 0 1 /:' ';'' 1 0 /:'aa';'' 1 0 -- (B=) <-my sig Brian Schott -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Questions on Advent of code Day 5

2022-12-07 Thread Brian Schott
Pascal, The most important thing I learned/remembered from your reply is that your lfold is an adverb (that happens to be constructed from a pair of adverbs in an adverb train). That helped me understand that Raul's lfold is an adverb, too, but defined explicitly, where yours is defined implicitly

Re: [Jprogramming] Questions on Advent of code Day 5

2022-12-06 Thread Brian Schott
Damn. On Tue, Dec 6, 2022 at 6:31 PM Henry Rich wrote: > No, u is the left argument and v is the right. u@v for example. > > Henry Rich > > > -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Questions on Advent of code Day 5

2022-12-06 Thread Brian Schott
Raul, I'm beginning to understand your explanation of lfold=: {{ ]F..(u~) }} . You're saying that j conjunctions have a left and right argument we call v and u, respectively (from the perspective of the interpreter). In that context, u is on the right of the conjunction, and that's why you used u

Re: [Jprogramming] Questions on Advent of code Day 5

2022-12-06 Thread Brian Schott
Henry, *Oh!* The grey x and y's were so dim and small, I could not see them. That explains a lot. Thank you. Now, I need to look again at Raul's explanation, which came in after yours. On Tue, Dec 6, 2022 at 5:34 PM Henry Rich wrote: > The initial value (x) and all subsequent results of v go in

Re: [Jprogramming] Questions on Advent of code Day 5

2022-12-06 Thread Brian Schott
to date. > > Henry Rich > > On 12/6/2022 5:24 PM, Brian Schott wrote: > > Don't you mean v instead of u. > > And even so, that may be the backward stuff that was discussed for a > while > > in the early Fold stages? > > > > On Tue, Dec 6, 2022

Re: [Jprogramming] Questions on Advent of code Day 5

2022-12-06 Thread Brian Schott
Don't you mean v instead of u. And even so, that may be the backward stuff that was discussed for a while in the early Fold stages? On Tue, Dec 6, 2022 at 5:21 PM Raul Miller wrote: > You should probably spend a few minutes studying the diagram at > > https://code.jsoftware.com/wiki/Vocabulary/f

Re: [Jprogramming] Questions on Advent of code Day 5

2022-12-06 Thread Brian Schott
Raul, That is extremely helpful. The main thing I get out of both of your solutions, but most clearly out of the insert solution is that the argument to be altered should be on the right side. For some reason, I have wanted to reverse that. But your insert solution demonstrates that strongly. Whe

[Jprogramming] Questions on Advent of code Day 5

2022-12-06 Thread Brian Schott
next phrase {:every state tomove moves -- (B=) <-my sig Brian Schott tomove=: dyad define while. #y do. x =. x move {. y y =. }.y end. x ) NB. The verb `move` for part 1 is very simple: move =: dyad define 'n f t'=. _1 1 1*y - 0 1 1 take =. |.n{.>f{x left =. f{x put =. t{

Re: [Jprogramming] Nub with extra column

2022-11-24 Thread Brian Schott
j64/iOS beta-k: GPL3/2021-10-15T01:07:05 Platform: iOS/iPadOS Version: 901.1 49 Installer: App Store Contact: www.jsoftware.com -- (B=) <-my sig Brian Schott -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Plot package causing J to crash

2022-10-26 Thread Brian Schott
First picking up on Don's suggestion: simply replacing 'plot' with ';' as shown below can show that the number of arguments for plot are inconsistent. But this may not satisfy your bigger question. 'xlabel a b c d' ; 3 4 5 +--+-+ |xlabel a b c d|3 4 5| +--+-+

Re: [Jprogramming] Plot package causing J to crash

2022-10-26 Thread Brian Schott
Resending: On Tue, Oct 25, 2022 at 6:02 PM Brian Schott wrote: > Pablo, > > I was able to execute the following code using jconsole. > See my version info below. Perhaps, this will help. > >QA=: {&a.@(a.&i.@]+[QI 26"_) >QI=: ?.@$ >Fcat=:161 38

Re: [Jprogramming] Plot package causing J to crash

2022-10-25 Thread Brian Schott
Pablo, I was able to execute the following code using jconsole. See my version info below. Perhaps, this will help. QA=: {&a.@(a.&i.@]+[QI 26"_) QI=: ?.@$ Fcat=:161 38 QA 'a' load'plot' ('xlabel ',,Fcat,.' ') plot ?161#100 JVERSION Engine: j903/j64/darwin Release-b: commercial/2

Re: [Jprogramming] Old trace function

2022-10-25 Thread Brian Schott
First of all, I agree with Raul's idea of an Essay approach and/or perhaps a Lab or a video. This conversation's applications and scripts are very complicated and valuable. I am really impressed with the power of fgh.ijs . For example the letters i,f,g and h are interchangeable placeholders and ma

Re: [Jprogramming] Poll questions: new refcard

2022-08-10 Thread Brian Schott
couple weeks ago, > where I need to sum two columns, but can only enter a pair of data at a > time. The refcard was more helpful than Nuvoc for me to see an example of a > function that is doing close to what I need, as it had the functions in > groups. > > Thank you, &

Re: [Jprogramming] Directly loading J scripts from GitHub

2022-07-24 Thread Brian Schott
@jsoftware.com> wrote: > Is this what you may have remembered John? > > https://code.jsoftware.com/wiki/Addons/Developers_Guide > > Cheers, bob > > -- (B=) <-my sig Brian Schott -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Sudoku16

2022-06-24 Thread Brian Schott
dic application. > Most lines are unaltered. > > Cheers, > > Mike > > > > Sent from my iPad > > > On 24 Jun 2022, at 16:43, Brian Schott wrote: > > > > Mike, > > > > To check the inputs of a grid I found that Hui's verb 'ok&#x

Re: [Jprogramming] Sudoku16

2022-06-24 Thread Brian Schott
Raul, Your script for parsing the printed grid looks very effective, but I could not find an example html page at https://www.sudoku-puzzles-online.com/ to try it with. Instead I found a page like the following one and simply selected/highlighted the grid from the screen and copy-pasted that into

Re: [Jprogramming] Sudoku16

2022-06-24 Thread Brian Schott
Mike, To check the inputs of a grid I found that Hui's verb 'ok' works for me. Your revision of the verb 'solve' looks problematic to me because it suggests there is a dyadic version, but I could only find a monadic version from your earlier post. Also there is an example in this post using a ver

Re: [Jprogramming] Sudoku16

2022-06-20 Thread Brian Schott
All, My code is not perfect, but the error I was noticing in trying to step through the algorithm using the verbs f and diff were correct, BUT my initial data in the noun raw was missing a starting SPACE. So the example data was unsolvable. When I corrected the data, I was able to get an answer wi

Re: [Jprogramming] Sudoku16

2022-06-19 Thread Brian Schott
. Any more ideas? > -- (B=) <-my sig Brian Schott -- For information about J forums see http://www.jsoftware.com/forums.htm

[Jprogramming] Sudoku16

2022-06-18 Thread Brian Schott
||||||.E..|| ||.4..|.0.1|6DE9|2...|||||||||8.5.|*3*...||...*3*|| |||E7.8|.0..|...7|||||||||..2.|||..*3*.|| ||EB.F|8..A|.2..|C1..|||..7.||3...|...9||||||..0.|| |+++++|+++++|+----+----+++| +

Re: [Jprogramming] How to get the timezone?

2022-06-12 Thread Brian Schott
2!:0'date +"%Z %z"' EDT -0400 JVERSION Engine: j807/j64/darwin Release-c: commercial/2019-02-24T10:50:40 Library: 8.07.26 Platform: Darwin 64 Installer: J807 install InstallPath: /users/brian/j64-807 Contact: www.jsoftware.com -- (B=) <-

Re: [Jprogramming] Composite Item (m}y) with gerund m

2022-05-29 Thread Brian Schott
Very nice. Thank you. On Sun, May 29, 2022 at 6:08 PM Elijah Stone wrote: > I would use a fork, and 'bind' the left argument to the result of f. > There is a difficulty, because you can't compose adverbs with verbs. > Perhaps something like this: > >c=. (*@] {{x}y}} ,:) f >c i.10 > 0 1 2

[Jprogramming] Composite Item (m}y) with gerund m

2022-05-29 Thread Brian Schott
al f, but f is more compute heavy 3 : '(h y)}g y' i.10 NB. an example calculation 0 1 2 3 1 2 6 1 2 9 ]`h`g } i. 10 NB. another "tacit" calculation 0 1 2 3 1 2 6 1 2 9 -- (B=) <-my sig Brian Schott ---

Re: [Jprogramming] tgsjo: A turtle graphics system using "modern" openGL

2022-02-11 Thread Brian Schott
I have updated the turtle graphics system in J using modern openGL (tgsjo) to work with J9xx. Please see the "reply" message below for information. I would appreciate your feedback. Thank you, again, Raul. On Wed, May 19, 2021 at 6:03 PM Brian Schott wrote: > tgsjo is a s

Re: [Jprogramming] Sierpinski triangle

2022-02-01 Thread Brian Schott
Andrew, your observations are correct. Now consider this part which is an amend to create and amend a long list of zeroes. 1 (15)} (>:+:15) $ 0NB. beware, of long result 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 $,:1 (15)} (>:+:15) $ 0 NB. ,: forces a new dimension

Re: [Jprogramming] Report on the J wiki meeting of January 27, 2022

2022-01-31 Thread Brian Schott
community support. So I wonder if this is a suitably distinct feature set or if others believe they get a similar result and satisfaction from other programming languages? -- (B=) <-my sig Brian Schott -- For informat

Re: [Jprogramming] Advent of Code Day 16

2022-01-09 Thread Brian Schott
I have begun to punt on the aoc about here. Even with this part a solution I got frustrated thinking about the parsing of "operator" packets even on part a. Your explanation and code is very informative. For example in this day 16 question the snippet below was very satisfying because I could not s

Re: [Jprogramming] Advent of Code Day 12

2022-01-02 Thread Brian Schott
Raul, Yes, I was misunderstanding the first "bond" step. I could not see (-.&;:) as u in u&n . That does move 'start-A' to the left and leaves '-' on the right of the verb u. Great, I see it now. Thanks, On Sun, Jan 2, 2022 at 5:31 PM Raul Miller wrote: [snip] (-.&;:)&'-' 'start-A' >'sta

Re: [Jprogramming] Advent of Code Day 12

2022-01-02 Thread Brian Schott
Raul, Thanks for the explanation. But you do not explicitly clarify in the following how the grammar rules do the expansion. unexplained part below** But let's break this down formally. The sentence in question is formed using conjunctions. In other words, we could expan

Re: [Jprogramming] Advent of Code Day 12

2022-01-02 Thread Brian Schott
Raul, I cannot understand how *unpack* works. When I use 9!:3]6 to display *unpack* I get the following. ((-.&;:)&'-');._2 But that does not help me because I cannot process the parenthesized parts separately. The only "part" I can process is ;: ;. _2 in where *in* is defined as follows.

Re: [Jprogramming] Advent of Code Day 12

2022-01-02 Thread Brian Schott
I think I understand that Jan-Pieter has a data noun named in12 which I reproduce here. in12 =: 0 : 0 start-A start-b A-c A-b b-d A-end b-end ) Then that line of code, but ending in in12 instead of in 12, works. -- For informa

Re: [Jprogramming] JQt terminal development environment

2021-10-31 Thread Brian Schott
Devon, Regarding the set error, I thin the following will work. $initS=.('set ' , ])&> INIT 7 11 wd"1 initS size 12 -- (B=) -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] plot error

2021-08-21 Thread Brian Schott
t; > > pd 'reset' > > pd 'color black; type line ; tics 0; labels 0; frame 0; grids 0' > > pd <"_1 T > > pd 'aspect ',(": %~/(>./-<./)"1 ,/"2^:2 T) > > pd 'show' > > > > I get the famous >

Re: [Jprogramming] Is internal representation the problem? (again...)

2021-08-19 Thread Brian Schott
Try this? cf =: 3 : '(~.y),.#/.~y ' imp =: -,+ 0.05 imp 0.1*9!:18 '' 0.05 0.05 ~. 0.05 imp 0.1*9!:18 '' 0.05 0.05 cf 0.05 imp 0.1*9!:18 '' 0.05 1 0.05 1 -- (B=) -- For information about J forums see http://www.j

Re: [Jprogramming] Cut

2021-07-03 Thread Brian Schott
Does the following work for you? I.+./(|:3$,: i. 10) (+./ @:E.)"1/ sep tv 0 3 5 0 3 5{tv 123334 111222 555432 -- (B=) -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] python3 addon bug?

2021-07-03 Thread Brian Schott
Raoul, I hope you are well. Inside python3 all of the following works as expected, but I can't get the visidata command to work. Look below the working stuff to see the error I get. Perhaps, I am not able to use sys.path.append to put visidata into my path (see third line)? Might you suggest wher

Re: [Jprogramming] python3 addon bug?

2021-07-02 Thread Brian Schott
Eric, Thanks, that works for me. Btw, I edited line 11 of jbase.py as follows. jbase.dor('ghi') # print array Brian removed 'j' in 'jdor' Raoul, I have installed visidata using the instructions at github. But I don't understand how to follow the further *Usage* instructions at github be

Re: [Jprogramming] python3 addon bug?

2021-07-02 Thread Brian Schott
sts) > > My understanding is that 'jbase.set' serializes its numpy array argument to > a file, and the problem is that this file is perhaps left lying around when > it shouldn't. > I know this is a rather vague question, but does anybo

Re: [Jprogramming] tgsjo: A turtle graphics system using "modern" openGL

2021-05-19 Thread Brian Schott
Devon, You must create a turtle before you try to turn it with a yaw, for example. I think you issued the *yaw* command before you issued the *createTurtle* command. If not, let me know. -- (B=) -- For information about J fo

[Jprogramming] tgsjo: A turtle graphics system using "modern" openGL

2021-05-19 Thread Brian Schott
tgsjo is a script for jQt patterned after the graphical aspects of the Logo programming language. Turtles exist in a 3d environment projected onto a 2d canvas. tgsjo is available at https://github.com/zerowords/tgsjo . However that link is not needed because the following command in jconsole or jq

Re: [Jprogramming] Lab: An Introductory Course in J

2021-04-26 Thread Brian Schott
Bob, Thanks for that information. I did not realize that the whole Lab must be migrated with the migratelab.ijs script. I do not even have the addons you mentioned (see below), likely because of my version: j807. So perhaps I need to stay with the deprecated Labs instructions for now. > load'~ad

Re: [Jprogramming] Lab: An Introductory Course in J

2021-04-26 Thread Brian Schott
Because I am contemplating writing a Lab myself, I have been reviewing the text of 2 impressive Labs: '~addons/labs/labs/core/introcourse.ijt' and '~addons/labs/labs/core/jclickbeginners.ijt' . I have been reviewing the PREPARE sections in the 2 Labs. The PREPARE sections are very impressive on th

Re: [Jprogramming] histogram in stats/base

2021-04-14 Thread Brian Schott
Gilles, Both histogram1 and histogram2 can be plotted with the bar type, which I believe has colored bars. The problem being addressed mostly with the verb named 'relative' on the wiki page is the situation where the bins are of different width. In that case I could only find a line type drawing

Re: [Jprogramming] histogram in stats/base

2021-04-10 Thread Brian Schott
As you thought, Steve Jost kindly confirmed. I had never heard of the upper bin being treated differently. On Sat, Apr 10, 2021 at 1:59 PM Raul Miller wrote: > I give the english sentence precedence over the label for a specific > row in a table. > > For the example treated by that table, it doe

Re: [Jprogramming] histogram in stats/base

2021-04-10 Thread Brian Schott
Raul, Notice that at your link the uppermost interval is specified differently in paragraphs (1.) and (2.). In the former, [80,100]; latter, [80,100) . So, which does it mean? Also, notice the results below. 20*i. 6 0 20 40 60 80 100 (20*i. 6) histogram 5 39 75 79 85 90 91 93 93 9

Re: [Jprogramming] histogram in stats/base

2021-04-10 Thread Brian Schott
Like Devon, "I have noticed some oddities," and have described my variations at the following link. https://code.jsoftware.com/wiki/User:Brian_Schott/Histogram Below using spacing to emphasize similarities and differences in 3 definitions, I have tried to restate the definitions so that a non prop

Re: [Jprogramming] how to create + publish a package?

2021-03-07 Thread Brian Schott
Michal et al, I hope this forwarded conversation answers your question. Forwarded Conversation Subject: jwiki file directory upload From: Brian Schott Date: Sun, Sep 20, 2020 at 10:15 AM To: Chris Burke <> Chris, Some advice, please. I have a newer version of

Re: [Jprogramming] Contrintuitive argument order in Fold right verb

2021-02-27 Thread Brian Schott
Raul, Ok, I'll go along with your attempt to show programs in the program forum. I'm intrigued with your updated conjunction plural plural=: {{ (":m),' ',n,'s'#~1~:m }} which seems to replace the earlier definition at https://rosettacode.org/wiki/Bulls_and_cows#J . I have convinced myself wi

Re: [Jprogramming] Redefining mean..stddev for dyadic weighted usage

2021-02-27 Thread Brian Schott
Ric, That looks good to me. But I am unfamiliar with the wvar and cannot comment on it except to say it is impressive. wvar seems to be removing 0s in the weights and then adjusting for their removals. What adjustment is being made and why? Nice work, -- (B=) -

Re: [Jprogramming] Contrintuitive argument order in Fold right verb

2021-02-23 Thread Brian Schott
I think I am in favor of Sergey's suggestion. In my excerpted J session below I created a verb called test which has the traditional arguments x and y to emphasize how I think of the placement of x and y. The x and y in the verb test are reversed relative to the x and y in see_arg. That's the incon

Re: [Jprogramming] Interquartile range

2021-02-21 Thread Brian Schott
The manual method I learned is captured in the following formula. load'stats/base' midpt -:@<:@# median -:@(+/)@((<. , >.)@midpt { /:~) iqr=:((median@{.~-@>.@midpt)-(median@{.~>.@midpt))@/:~ -- (B=) -- For informat

Re: [Jprogramming] String replace puzzle

2020-12-18 Thread Brian Schott
; arithmetic expression, eg > 1 + (2 * 3) + (4 * (5 + 6)) > needs to be evaluated as > ((6 + 5) * 4) + (3 * 2) + 1 > > -- (B=) <-my sig Brian Schott -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] intersection with adverb Insert

2020-12-17 Thread Brian Schott
Pascal and Joseph, Thanks, changing every to each was just the fix I needed. -- (B=) -- For information about J forums see http://www.jsoftware.com/forums.htm

[Jprogramming] intersection with adverb Insert

2020-12-17 Thread Brian Schott
I am trying to use the verb `intersection` shown below as found https://code.jsoftware.com/wiki/Vocabulary/minusdot . But I get the following peculiar result on AOC#6 when applying it with intersection for the following data. Am I applying these primitives incorrectly? intersection [ -. -. #

Re: [Jprogramming] confused over bonding related error

2020-12-11 Thread Brian Schott
z @ pqgetvalue @ (y & ;) "0 i. pqnfields y' > > rows=: 3 : 0 > rows=. dtb each <"1 row @ (y & ;)"0 i. pqntuples y > (columns y),rows > ) > > -- (B=) <-my sig Brian Schott -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] jhs error

2020-12-06 Thread Brian Schott
Eric, Great. That works for me. Thank you. On Sun, Dec 6, 2020 at 4:36 PM Eric Iverson wrote: > Brian, > > Your script was very close to correct. I am not sure of exactly the problem > you saw. > > I have tested the following in both 807 and 902 with firefox on linux. I > think it should work o

Re: [Jprogramming] jhs error

2020-12-06 Thread Brian Schott
Raul, I used pacman in jqt to update the ide/jhs addon but got the same error. Before doing that I had checked your line 894 of code with my existing line 894 of code and they were identical. Is there more to "re-downloading the jhs addon" that I could try? Btw, I don't know how to use Chrome's

[Jprogramming] jconsole emulator for 2 buttons

2020-12-06 Thread Brian Schott
As you might know from my post "JHS error", I want to produce a very simple scorer/counter for Rock Paper Scissors. RPS But apparently my desktop computer's jhs cannot handle the code, so I cannot even use a mobile device'

Re: [Jprogramming] jhs error

2020-12-06 Thread Brian Schott
In Safari I was able to copy the Alert text and could see that " was used. "; z= " -- (B=) -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] jhs error

2020-12-05 Thread Brian Schott
Raul, My version is dated. Thanks for the feedback. JVERSION Engine: j807/j64/darwin Release-c: commercial/2019-02-24T10:50:40 Library: 8.07.26 Platform: Darwin 64 Installer: J807 install InstallPath: /users/brian/j64-807 Contact: www.jsoftware.com -- (B=)

Re: [Jprogramming] jhs error

2020-12-05 Thread Brian Schott
Eric, Thanks, but... Same behavior for me even without the paren's. I have now tried it in Safari, and get a slightly different initial Alert: SyntaxError: unexpected EOF Regarding the '' vs ", I could not copy from the Alert because it is treated like an image. -- (B=)

[Jprogramming] jhs error

2020-12-05 Thread Brian Schott
My jhs app, which is patterned after demo1, produces the following Alert when launched. SyntaxError: invalid or unexpected token ''; z= '' (Either of those ''s could be "s, I can't tell). But when I click on the OK button I see an h1 title on one line and then on the next line I see a button nam

Re: [Jprogramming] Wiki error but what is correct fix?

2020-11-30 Thread Brian Schott
It looks to me as if the corrections is 1 index Props -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Adding constant to a specified element of a vector

2020-10-25 Thread Brian Schott
Jan-Pieter, First, thanks for pointing out the link. But I am having some problems. [***my comment 0) here is likely inappropriate in light of Henry's reply in this thread 0) Are you suggesting that some wording be added to that link? It looks to me as if you are but where? I say where becaus

Re: [Jprogramming] Code smells in J

2020-08-20 Thread Brian Schott
One of the things that annoys me often in J is when I end up with an array with a trailing 1 in its shape. It tells me I have to rethink the process which lead up to that result. Having to use |: repeatedly is a similar signal. This relates to your comment about needing " rank in tacit code, I thin

Re: [Jprogramming] Producing text from load, not loadd

2020-08-06 Thread Brian Schott
I think I answered my own question, below. a_run =: monad define r=.3 5$'M' r 1!:2 ]2 ) a_run'' -- (B=) -- For information about J forums see http://www.jsoftware.com/forums.htm

[Jprogramming] Producing text from load, not loadd

2020-08-06 Thread Brian Schott
The session below is meant to demonstrate that just plain loading does not produce the desired text result, and I don't want to require loaded. Is there an alternative? [I want to encourage my user to enter code directly into jqt Term by requiring an initial user entry that produces a window driver

Re: [Jprogramming] Can a verb (adverb or conjunction) know and echo its own name?

2020-08-04 Thread Brian Schott
For more clarity, the session below shows the improvement after enabling debug. load 'debug' dbr 1 ownName 9 9 |ownName[0] | ownName 9 -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Can a verb (adverb or conjunction) know and echo its own name?

2020-08-04 Thread Brian Schott
ch wrote: > 13!:1 is defined only when debug is enabled. Don't rely on its behavior > when debug is off. > > Henry Rich > > -- (B=) <-my sig Brian Schott -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Can a verb (adverb or conjunction) know and echo its own name?

2020-08-04 Thread Brian Schott
Devon, I get slightly different results. 13!:13 produces nothing, but 13!:1 produces the name and y arg prepended with `'|` which may work for me. The number of spaces is a little unpredictable, so far, and I have not found a way to clean it up. Below is a session example. Thanks, ownName=

[Jprogramming] Can a verb (adverb or conjunction) know and echo its own name?

2020-08-04 Thread Brian Schott
In other words, is it possible to trace functions in a script by placing a verb inside explicitly defined verbs that will report that verb's name and maybe its arguments (like the way that the utility `trace` reports)? -- (B=) --

Re: [Jprogramming] Strange(?) behavior of J

2020-08-03 Thread Brian Schott
value error: a tallyB'' a =. i. 0 tallyB'' a =. i. 2 3 tallyB'' Got here On Mon, Aug 3, 2020 at 1:07 PM Julian Fondren wrote: > On 2020-08-03 11:52, Brian Schott wrote: > > This thread hints at a problem I am having. > > In particular the

Re: [Jprogramming] Strange(?) behavior of J

2020-08-03 Thread Brian Schott
This thread hints at a problem I am having. In particular the link suggested by Henry https://code.jsoftware.com/wiki/Vocabulary/ErrorMessages#value My problem is that I want to detect an error caused by an undefined noun but my attempt does not produce the desired error using :: . For example in

Re: [Jprogramming] fixed pseudorandom ?. very pseudo on powers of 2

2020-07-19 Thread Brian Schott
Yes, I see the problem you are describing better now. This behavior for powers of 2 is dissimilar with other power bases. It suggests a flaw in the algorithm for ?. . ?.2^11 1826 ?.2^12 1826 ?.2^13 1826 NB. compared to the following ?.3^11 35532 ?.3^12 212679 ?.3^13 1275561 On

Re: [Jprogramming] fixed pseudorandom ?. very pseudo on powers of 2

2020-07-19 Thread Brian Schott
I think the behavior is because of the rank of the argument of ?. . For example consider these rank examples. $2^3 $2^3+i.3 3 -- (B=) -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] uniform random numbers

2020-07-16 Thread Brian Schott
I don't believe OP is trying to conclude 2 distributions are different, but that one is similar to another. The way I learned such goodness of fit tests, the null hypothesis always assumes equality. You do not have a choice on that. There is a separate section in the wikipedia article which states

Re: [Jprogramming] uniform random numbers

2020-07-16 Thread Brian Schott
My only quarrel with you analysis is that the null hypothesis is that the two distributions are equal, not that they are unequal. So because you want to accept the null hypothesis, it is unwise to interpret the result in terms of confidence. That interpretation applies when you wish to reject the n

Re: [Jprogramming] Boxing Issues

2020-07-07 Thread Brian Schott
This is awkward but works for me. 9!:6'' ┌┬┐├┼┤└┴┘│─ m=.'abc';'rtyuio';'b';'asdf';'wdrtybji';'ee';'nuko';'n' 9!:7' '(<<<9{i.11)}9!:6'' m │abc│rtyuio│b│asdf│wdrtybji│ee│nuko│n│ -- (B=) -- For information about J for

Re: [Jprogramming] graphs

2020-06-19 Thread Brian Schott
Almost the same answer, that is. On Fri, Jun 19, 2020 at 3:41 PM Brian Schott wrote: > I did not improve things much but get the same answer without the boxing. > Ie, starting with r=.'' instead of r=.,a: . > > > > -- (B

Re: [Jprogramming] graphs

2020-06-19 Thread Brian Schott
I did not improve things much but get the same answer without the boxing. Ie, starting with r=.'' instead of r=.,a: . -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] weird interaction with ". and $: and ::

2020-05-31 Thread Brian Schott
Cannot confirm your error. But it is a very cool verb(?). wcint =: ( :: ($:@:".)) NB. with convert to int/num 2 +&(+: wcint) '8' NB. works 4+16 20 2 +&(+: wcint) '4+4' NB. wrong: 8+4 20 JVERSION Engine: j807/j64/darwin Release-c: commercial/2019-02-24T10:50:40 Library: 8.07.26 Platf

Re: [Jprogramming] Condense a multidimensional array

2020-05-30 Thread Brian Schott
Could you please give a sample of your use of your swap. I can't understand your description or the input(s). Thanks, On Sat, May 30, 2020 at 3:27 AM Hauke Rehr wrote: [snip] My last use case was a boxed list consisting of > a 1-d array and a set of transpositions I produced. > I wrote (I bet

Re: [Jprogramming] restricting permutations

2020-05-25 Thread Brian Schott
Skip, I am having trouble finding perm. I tried using A. in its place, but did not succeed. But I think I see where you were going. Good idea. On Mon, May 25, 2020 at 2:54 PM Skip Cave wrote: > ssmb=:+./@E. > > l21=.-.1 1 ssmb"1+./"2]1 2=/"1 n=.perm 4 > > l30=.-.1 1 ssmb"1+./"2]0 3=/"1 n > > n#~

Re: [Jprogramming] restricting permutations

2020-05-25 Thread Brian Schott
[I thought I had sent this message after Mike's first, but apparently forgot to "Send"] Hauke, I could not figure out your approach. Mike, I think your solution is correct. I tested it with the following approach. First I went to NuVoc and looked up A. to find the following line of code. n=: !

Re: [Jprogramming] restricting permutations

2020-05-25 Thread Brian Schott
Only 4 items. On Mon, May 25, 2020 at 8:01 AM Hauke Rehr wrote: > is this a more general task, or do you only ever > have exactly four items to arrange that way? > > -- For information about J forums see http://www.jsoftware.com

[Jprogramming] restricting permutations

2020-05-25 Thread Brian Schott
I want all permutations of i. 4 for which 0 and 3 cannot be adjacent, nor can 1 and 2. My idea is to create a as follows to describe my situation. ]a =. 0 1 1 0,:i. 4 0 1 1 0 0 1 2 3 Next I created b and rotations on b to list the possibilities I can think of. So I can think of 6 permutati

Re: [Jprogramming] using clear'' and cancel

2020-04-25 Thread Brian Schott
Chris, Yes, I did not understand the right argument usage. On Sat, Apr 25, 2020 at 10:35 AM chris burke wrote: > The right argument to clear is the locale, default base. > > -- (B=) -- For information about J forums see http://

[Jprogramming] using clear'' and cancel

2020-04-25 Thread Brian Schott
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... $AA $ AA JVERSION Engine: j807/j64/darwin Release-c: commercial/2019-02-24T10:50:40 Library: 8.07.26 Qt IDE: 1.7.9/5.9.7 Platform: Darwin 64 Installer: J807 install InstallPath: /users/brian/j64-807 Co

  1   2   3   4   5   6   7   8   9   >