Re: [Jprogramming] J forums migrate to Google Groups on Jan 1

2023-12-31 Thread chris burke
In 30 minutes we will close the mailman forums and set up the new forum. This should take an hour or so. Relevant pages: migration overview: https://code.jsoftware.com/wiki/System/Forums/Migration new forum archives: https://groups.google.com/a/jsoftware.com/g/forum new forum wiki page: https:/

Re: [Jprogramming] Roger Hui referenced in TAOCP Volume 4

2023-12-29 Thread Hauke Rehr
Thanks for the information. Much appreciated. I didn’t get the chance to converse all that much with him. Still, I miss his humor. On 29/12/2023 18:07, Eric Iverson wrote: Don Knuth's current work in progress is: "The Art of Computer Programming Volume 4 Fascicle 7" with publication expected in

[Jprogramming] Roger Hui referenced in TAOCP Volume 4

2023-12-29 Thread Eric Iverson
Don Knuth's current work in progress is: "The Art of Computer Programming Volume 4 Fascicle 7" with publication expected in 2024. See the oft-changing draft at: https://cs.stanford.edu/~knuth/fasc7a.ps.gz Roger Hui's essay https://code.jsoftware.com/wiki/Essays/Queens_and_Knights is referenced in

Re: [Jprogramming] Bug in sorting?

2023-12-28 Thread LdBeth
JVERSION Engine: j9.5.1/j64avx2/darwin Build: commercial/2023-12-20T04:08:21/clang-14-0-0/SLEEF=1 Library: 9.5.5 Platform: Darwin 64 Installer: j9.5 install InstallPath: /usr/local/etc/j9.5 Contact: www.jsoftware.com And sorting by itself along would crash JEngine p =. 8 2 $ 0 0 1 1 1 0 0 0

Re: [Jprogramming] jios user subdirectory

2023-12-28 Thread Ian Clark
Brian wrote: > I got the editing window open using ".o but I don't see a save option, or a run option or a load option from there. The ⌘ button (top-left) drops a menu of "File" items. Tap: More… -(the last item) to see the full menu (scrollable by finger-drag). One of those items is Redirect ⇧⌘S

Re: [Jprogramming] Bug in sorting?

2023-12-28 Thread 'Michael Day' via Programming
Also, perhaps unsurprisingly, ~.@:/:~ p crashes jqt in my Windows 11 installation of J 9.5 Strangely enough, ~./:~ p seems not to crash; however the results are inconsistent, and usually wrong! Bill's assertion about the bug being related to the Boolean type appears to hold in this insta

Re: [Jprogramming] jios user subdirectory

2023-12-28 Thread Ian Clark
getclip'' returns '' before any text has been placed on the clipboard (i.e. cut or copied). It looks like it's not working on your kit. Can you copy/paste text either way between other apps besides jios? As I tried to make clear, I know nothing about the feature except (a) it works between my Ma

Re: [Jprogramming] Bug in sorting?

2023-12-28 Thread bill lam
I got a similar result. I believe this bug is related to the boolean argument. coercing the array to integer can work correctly. p =. 00 + 8 2 $ 0 0 1 1 1 0 0 0 0 1 1 0 1 0 0 0 On Thu, Dec 28, 2023 at 6:02 PM Marcin Żołek < marcin.zo...@students.mimuw.edu.pl> wrote: > Hello, > I was trying to ru

[Jprogramming] Bug in sorting?

2023-12-28 Thread Marcin Żołek
Hello, I was trying to run my code on j9.4 Linux, j9.4 MacOS, j9.5 MacOS and it crashes. In terminal /Applications/j9.5/bin/jconsole bug.ijs < input.txt JE has crashed, likely due to an internal bug. Please report the code which caused the crash, as well as the following printout, to the J prog

Re: [Jprogramming] [Jgeneral] Report of the J wiki meeting of December 14th, 2023

2023-12-27 Thread 'Skip Cave' via Programming
All, I would like to attend the Thursday J Wiki meetings. How do I get an invite to those meetings? Skip Skip Cave Cave Consulting LLC On Thu, Dec 28, 2023 at 12:05 AM 'robert therriault' via General < gene...@jsoftware.com> wrote: > == Report of Meeting 2023-12-14 == > > Present: Art Anger,

[Jprogramming] Report of the J wiki meeting of December 14th, 2023

2023-12-27 Thread 'robert therriault' via Programming
== Report of Meeting 2023-12-14 == Present: Art Anger, Ed Gottsman, Raul Miller, and Bob Therriault Full transcripts of this meeting are now available on the its wiki page. https://code.jsoftware.com/wiki/Wiki/Report_of_Meeting_2023-12-14 1) Ed reported that he had removed the time slider as i

Re: [Jprogramming] jios user subdirectory

2023-12-27 Thread Brian Schott
Ian (et al), I tried your getclip'' experiment. When I execute getclip'' , the return was . There was no alert at the desktop, asking for my permission to paste, I got the same . And then when I enter "myfoldtext" on jios I see "4 : " . So maybe I'm doing something wrong. I have successfully e

Re: [Jprogramming] jios user subdirectory

2023-12-27 Thread Ian Clark
@ Brian You say you don't use iCloud, and you've given up on iOS Files app. You're denying yourself the most robust way to move J scripts between your iOS device and your Mac. And (probably) the easiest to setup and use. Though that may not be saying much. If I had 10 coders in my team, I'd put on

Re: [Jprogramming] J forums migrate to Google Groups on Jan 1

2023-12-27 Thread chris burke
Just a reminder that we will move the forums to a single Google Group fo...@jsoftware.com over the New Year. We plan to shut down the current Mailman forums at midnight UTC Dec 31 and then try to enroll subscribers to the new forum. I think most emails should work, but there are likely to be some

Re: [Jprogramming] jios user subdirectory

2023-12-27 Thread 'Mike Day' via Programming
Glad that was useful. You mention copy & paste. Ian will have wise things to say about this, which I won't understand, but one of the things that "appears" to wipe my Jios ipad installation is copy from elsewhere or from the J session itself, and paste into a J edit session, even when bra

Re: [Jprogramming] Agenda on different versions ...

2023-12-27 Thread Martin Kreuzer
That sort of summarizes my question quite well ... Thanks. -Martin At 2023-12-27 02:01, you wrote: Uh... but before I can sensibly update the wiki I need to understand what I am talking about. 0:`1:`2:@.(3&|) i. 6 0 1 2 0 1 2 0:`1:`2:@.(3&|) i. 7 |rank error, executing monad (0:`1:

Re: [Jprogramming] Index of item in table

2023-12-26 Thread Gilles Kirouac
With p defined as p=.3 4 5$?.60$50 NB. ?. 33 (($@])#:[(I.@:=),@]) p 0 2 0 2 1 1 2 3 1 ~ Gilles Le 2023-12-26 à 21:06, 'Skip Cave' via Programming a écrit : What would a general "find the index of the value x in the array y" verb named fixv look like? It would work like this: ] p=.3 4 5$?6

Re: [Jprogramming] Index of item in table

2023-12-26 Thread 'Skip Cave' via Programming
What would a general "find the index of the value x in the array y" verb named fixv look like? It would work like this: ] p=.3 4 5$?60$50 10 49 11 0 4 39 33 34 32 38 49 24 43 36 41 1 21 11 14 27 7 28 38 9 26 24 42 39 12 3 8 28 33 1 4 46 40 7 49 0 10 8 49 37 39 5 45 46 39 6 7 38 32 2

Re: [Jprogramming] Agenda on different versions ...

2023-12-26 Thread Raul Miller
Uh... but before I can sensibly update the wiki I need to understand what I am talking about. 0:`1:`2:@.(3&|) i. 6 0 1 2 0 1 2 0:`1:`2:@.(3&|) i. 7 |rank error, executing monad (0:`1:`2:)@.(3&|) |each gerund must return a result whose shape agrees with its inputs | 0:`1:`2:@.(3&|

Re: [Jprogramming] Index of item in table

2023-12-26 Thread LdBeth
This is related to the question I asked several days ago, http://jsoftware.com/pipermail/programming/2023-December/062994.html My suggestion would be 8 (($@])#:[i.~,@]) A 1 3 Although you might want to an alternative behavior when there are multiple matches. LdBeth :) > In > Davi

Re: [Jprogramming] Index of item in table

2023-12-26 Thread Raul Miller
8 ($@] #: [ I.@:= ,@]) A 1 3 8 (4 $. $.@:= ) A 1 3 Note that both of these results are rank 2. -- Raul On Tue, Dec 26, 2023 at 8:32 PM David Pinchbeck wrote: > > Having trouble finding this in the wiki: I know that we can select from a > table using a boxed pair > > A > > 0 1 2 3 4 > >

[Jprogramming] Index of item in table

2023-12-26 Thread David Pinchbeck
Having trouble finding this in the wiki: I know that we can select from a table using a boxed pair A 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 (<1 3){A 8 How do I write a verb f to do the reverse, so that 8 f A yields the result 1 3 ? Thanks, David -- David Pinc

Re: [Jprogramming] jios user subdirectory

2023-12-26 Thread Brian Schott
Mike and Ian, Mike, your answer was very helpful because I could not get the iphone to be recognized by my desktop Mac when I tried to link them with a USB cable (I don't use icloud). An error keeps occurring, so I gave up on the ios files app. But your mention of a folder creation button made me

Re: [Jprogramming] Agenda on different versions ...

2023-12-26 Thread Henry Rich
The result of v contains verb numbers for the cells of x/y.  It also indicates the rank of those cells: the verbs execute on (-rv)-cells, where rv is the rank of the result of v. The text seems to me to describe the operation correctly, but as always you can change it if it is unclear.  Your d

Re: [Jprogramming] jios user subdirectory

2023-12-26 Thread Ian Clark
However you'd do it in jqt, it's worth trying the same in jios. If something doesn't work, it's usually not the fault of jios but the bizarre paranoid iOS directory system, which prioritizes security over convenience and takes getting used-to. As a general rule, paths beginning: 'j/' are the most

Re: [Jprogramming] Agenda on different versions ...

2023-12-26 Thread Raul Miller
I should add that the nuvoc has some examples of implied rank, but I can't figure out why a list of 10 numbers from an infinite ranked v means rank 0 while a list of five numbers from infinite ranked v means rank 1. I suspect what it's intended to mean is that the implied rank is _1 and "_1 on a ra

Re: [Jprogramming] Agenda on different versions ...

2023-12-26 Thread Raul Miller
It's not clear to me why this is a rank error. 2&|i.5 0 1 0 1 0 0:`1:@.0 1 0 1 0 0: 1: 0: 1: 0: (0:`1:@.0 1 0 1 0) i.5 1 That said, this line from nuvoc might be the issue: "The implied rank of m@.v y is the rank of y minus the rank of v y. y is then split into cells of that rank, and t

Re: [Jprogramming] jios user subdirectory

2023-12-26 Thread 'Mike Day' via Programming
Don't know about iphone, but I've got a couple of folders/directories under ~user in my iPad installation of Jios; here's the official info: JVERSION Engine: j903/j64/iOS beta-k: GPL3/2023-04-16T23:21:00 Platform: iOS/iPadOS Version: 903.2 57 Installer: App Store Contact: www.jsoftware.com I

[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] Agenda on different versions ...

2023-12-26 Thread Henry Rich
See https://code.jsoftware.com/wiki/System/ReleaseNotes/J902 Henry Rich On 12/26/2023 3:11 PM, Devon McCormick wrote: I don't know about the history but in 9.5.5 (under Windows 10): (0:`1: @. (2&|)) i.4 0 1 0 1 On Tue, Dec 26, 2023 at 7:44 AM Martin Kreuzer wrote: Dear all - This left

Re: [Jprogramming] Agenda on different versions ...

2023-12-26 Thread Devon McCormick
I don't know about the history but in 9.5.5 (under Windows 10): (0:`1: @. (2&|)) i.4 0 1 0 1 On Tue, Dec 26, 2023 at 7:44 AM Martin Kreuzer wrote: > Dear all - > > This left me puzzled today; have I missed some developments ? > (all in Console on Windows10) > > - v8.07 - > > (0:`1: @. (2

[Jprogramming] Agenda on different versions ...

2023-12-26 Thread Martin Kreuzer
Dear all - This left me puzzled today; have I missed some developments ? (all in Console on Windows10) - v8.07 - (0:`1: @. (2&|)) i.1 |rank error | (0:`1:@.(2&|))i.1 - v9.0.1 - (0:`1: @. (2&|)) i.1 |rank error | (0:`1:@.(2&|))i.1 - v9.0.2 - (0:`1: @. (2&|)) i.4 0 1 0

[Jprogramming] J Viewer December Update

2023-12-25 Thread Ed Gottsman
Season's Greetings. Thanks to everyone who tried the J Viewer, and particularly to those who submitted bug reports and feature requests. I believe I've addressed all of the former and I'm working my way through the latter. Highlights: The past month saw many minor bug fixes and performance

Re: [Jprogramming] testing for J version or later

2023-12-24 Thread chris burke
Since stdlib is not updated for older versions of J, addons that depend on the J version will have to use their own test like your original jversion function. Alternatively, set the addon manifest RELEASE for 9.4 or later and just support the new version number. The 9!:14 result is then parsed in

Re: [Jprogramming] testing for J version or later

2023-12-24 Thread Ian Clark
I've a better idea. Establish a new system flag called (say) VERSION_z_ and assign it within stdlib.ijs (c/f IFJHS or JLIB) the integer form of the J version (currently this would be VERSION_z_ = 951). Then ~addons/math/cal/cal.ijs, or some other utility with a version dependency, could test for

[Jprogramming] bug in plot type 'bar'

2023-12-23 Thread R.E. Boss
Compare the x-axes in 'bar'plot (;?.)p:i.10 and 'marker'plot (;?.)p:i.10 The second one gives the correct x-axis, the first one gives >:i. of the x-values. R.E. Boss -- For information about J forums see http://www.jsof

Re: [Jprogramming] Roger's Essay 'Continued Fractions' ...

2023-12-23 Thread Martin Kreuzer
Hi Devon - Thanks for your help -- much appreciated. I had a hunch when I saw this expression (%:n**:a). But as part of it (n**:a) turned up as well in the calculation for (r') I tackled the compound fraction using pen and paper to make shure that formula was correct. Then I changed the line f

[Jprogramming] David Zwitser is the guest on this episode of the ArrayCast

2023-12-22 Thread 'robert therriault' via Programming
David Zwitser is an artist who is using the BQN array language to create games. On this episode of the ArrayCast we explore his views on Art, Games and exploring computing as a non-computer scientist. Host: Conor Hoekstra Panel: Marshall Lochbaum, Adám Brudzewsky, Stephen Taylor and Bob Therriau

Re: [Jprogramming] Roger's Essay 'Continued Fractions' ...

2023-12-22 Thread Devon McCormick
I tested the revised code and it works properly for the examples, returning *_4 1 11;3 12* for *qcf 10 _1 _3 2* whereas the older version gives the same result (*0;12 3*) for both *qcf 10 _1 _3 2* and *qcf 10 1 _3 2*. I edited the body of *qcf* to remove the commented out line that Martin revised s

Re: [Jprogramming] how to apply the same adverb repeatedly ?

2023-12-22 Thread Jose Mario Quintana
You are welcome. By the way, I just noticed that nc could be redefined as, nc=. >:@: Best wishes on your recovery On Fri, Dec 22, 2023 at 1:35 PM Martin Kreuzer wrote: > @Raul | @Pepe - > > Sorry for the delay. > I was ill for quite some time (slowly recovering). > Thanks for your detailed a

[Jprogramming] Roger's Essay 'Continued Fractions' ...

2023-12-22 Thread Martin Kreuzer
Hi all - (This wasn't an easy one for me, as I still very much miss him.) I have been into CF for some time and re-read the essay this morning. It looks as there was a small glitch (maybe typo) in the body of function *qcf. May I ask you (having much more experience than me) to have a look at

Re: [Jprogramming] how to apply the same adverb repeatedly ?

2023-12-22 Thread Martin Kreuzer
@Raul | @Pepe - Sorry for the delay. I was ill for quite some time (slowly recovering). Thanks for your detailed answers. With season's greetings -Martin At 2023-06-13 21:11, you wrote: Exactly: "(extra parentheses and spaces for clarity)" On Tue, Jun 13, 2023 at 2:27 PM Raul Miller wrote

Re: [Jprogramming] sorting using verb returing a boolean

2023-12-22 Thread Henry Rich
When I was doing topo sort, it was for a sort tree that did one comparison per node.  You were asking about comparisons that are more complex than simple numeric comparison. For the topo sort, the comparison was essentially the sign of the volume of a pyramid after a 3D rotation. For pruning

Re: [Jprogramming] hello and announcement on implementation of web form server system for adding forms to Jconsole function

2023-12-21 Thread Yuji Suda
To Raul - In the early stage of development, in windows, the install directory is defined as Users home directory.  But it turned out that there can be a space character ' ' in the name of home directory, such as 'c:\Users\yuji suda', this never happens in MacOS and Linux where

Re: [Jprogramming] hello and announcement on implementation of web form server system for adding forms to Jconsole function

2023-12-21 Thread Yuji Suda
To LdBeth - The source scripts are in two zip files.    making_basic_ver_0_1.zip for simple server and client system to test infinite core loop for server socket communication    making_ver_0_1.zip  for web form server system based on server core loop with http protocol

Re: [Jprogramming] sorting using verb returing a boolean

2023-12-21 Thread Elijah Stone
For toposort, though, you'd presumably want a cleverer strategy than just sorting the nodes, doing a full graph traversal on each comparison. Alpha-beta pruning I don't know about. On Thu, 21 Dec 2023, Henry Rich wrote: Topological sorting was a big topic in graphics back in the day. I can i

Re: [Jprogramming] sorting using verb returing a boolean

2023-12-21 Thread Henry Rich
Topological sorting was a big topic in graphics back in the day. I can imagine that during alpha -beta pruning you might run into some ordering requirements that require more than simple keys. Henry Rich On Thu, Dec 21, 2023, 9:56 PM Elijah Stone wrote: > > The problem it has is that if elemen

Re: [Jprogramming] testing for J version or later

2023-12-21 Thread Raul Miller
Hmm... only if we're updating stdlib, supporting versions of J back to 4.0.1. A worthwhile effort, though, if someone was actually tackling those issues. Otherwise, I think an idiom would be about as good as it gets. -- Raul On Thu, Dec 21, 2023 at 9:24 PM Ian Clark wrote: > > For those of us

Re: [Jprogramming] sorting using verb returing a boolean

2023-12-21 Thread Elijah Stone
Oh yeah, unicode collation! That's a fun time. Floats is annoying. You should probably get a choice of invalid operation exception on nan or straight sign-magnitude interpretation (which is consistent with ieee total order). But I do concede that either way you probably want special code fo

Re: [Jprogramming] sorting using verb returing a boolean

2023-12-21 Thread Marshall Lochbaum
> I am curious what applications there are that really need a user-specified > comparison function (rather than just a sort key, like dyadic /: takes). There must some applications out there with some sort of smart string ordering that couldn't be reduced to array ordering. And of course in a lang

Re: [Jprogramming] sorting using verb returing a boolean

2023-12-21 Thread Elijah Stone
On Thu, 21 Dec 2023, Marshall Lochbaum wrote: This is a stable algorithm Yeah--it's the naive in-place version that's unstable. -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] sorting using verb returing a boolean

2023-12-21 Thread Elijah Stone
The problem it has is that if elements compare equal but don't match then it'll never get down to an array where ~.y has length 1. Right, of course. Shame on me for being lazy and not bothering to write out *./2 u/\y. Modern quicksort hybrids ... always use one bit at a time. I am curious

Re: [Jprogramming] sorting using verb returing a boolean

2023-12-21 Thread Marshall Lochbaum
This is a stable algorithm because it only ever changes the order of elements if one's less than the pivot and the other isn't. The problem it has is that if elements compare equal but don't match then it'll never get down to an array where ~.y has length 1. You get a stack error on (<&:*qs _1 2 3)

Re: [Jprogramming] sorting using verb returing a boolean

2023-12-21 Thread Marshall Lochbaum
You can get a three-result comparison from a boolean c by using it twice, (c-c~). See https://www.jsoftware.com/papers/50/50_00.htm . If this fails to distinguish elements then they are equivalent under the ordering, so a stable algorithm has to maintain their input order. It's my opinion that sor

[Jprogramming] testing for J version or later

2023-12-21 Thread Ian Clark
For those of us digital archaeologists running back-levels of J, it would be nice to have a robust test for a given version of J or later which tolerates versions down to 4.01, say. What represents best-practice? The best I can come up with is: jversion=: 3 : 0 ". 'j.' -.~ '/' taketo 9!:14''

Re: [Jprogramming] hello and announcement on implementation of web form server system for adding forms to Jconsole function

2023-12-21 Thread Yuji Suda
Comment on testing web form server sample application in j9.5.1 just released - If the web form server system is tested in the latest j9.5.1, the definition file has to be revised to require addons 'bmp' and 'png'  in the sample application of 52_hokusai_komon_image_galary_j9_5

Re: [Jprogramming] sorting using verb returing a boolean

2023-12-21 Thread 'Pascal Jasmin' via Programming
The same output of your quoted "program" \:~ _10 1 10 20 _30 15 25 30 0 30 25 20 15 10 1 0 _10 _30 I may have misunderstood your original question, based on subject line.  You appear to want to sort card hands. You would want to encode cards as integers, where 2-A maps to 0-13.  It is a good

Re: [Jprogramming] sorting using verb returing a boolean

2023-12-21 Thread Raul Miller
Yeah, I was talking about a stable quicksort, like we see at https://code.jsoftware.com/wiki/Essays/Quicksort I guess if you don't care about search stability you can eliminate the equality test against the pivot value. Thanks, -- Raul On Thu, Dec 21, 2023 at 5:07 PM Elijah Stone wrote: > > T

Re: [Jprogramming] sorting using verb returing a boolean

2023-12-21 Thread Elijah Stone
The quicksort I know does not care whether elements are out of order. Example: qs=. {{ NB.quicksort adverb; u compare, y array if. 1>:#~.y do. y return. end. NB.ignore ~. p=. y{~?#y s=. y u"_1 _ p (u qs s#y) , (u qs (-.s)#y) }} It is unstable, but that is to be expected. And it can be mad

Re: [Jprogramming] sorting using verb returing a boolean

2023-12-21 Thread Raul Miller
It's probably worth noting here that (for example) the quicksort algorithm relies on being able to tell whether items are equal. And a 0 1 result can't distinguish between ordering and equality. Many sorting implementations rely on a _1, 0, 1 result, as a consequence. That said, you could implemen

[Jprogramming] Compile Jqt for macOS

2023-12-21 Thread glam via Programming
I tried to start jqt from the desktop shortcut, after I install J on macOs, but it fail to start.So I tried to recompile jqt for macOs. First I tried to install Qt from source, but fail.Then i use the Qt online installer for macOS, and install the Qt version 6.5.3.Just follow the Guide to compil

Re: [Jprogramming] J9.5.1 release available

2023-12-21 Thread Eric Iverson
Did you use winget or AIO? I think the install is either in your home folder or in the windows system folder for program files. In any case, if you get J running, the following might help: jpath'~install' On Wed, Dec 20, 2023 at 9:24 PM Devon McCormick wrote: > I followed the Windows installa

Re: [Jprogramming] sorting using verb returing a boolean

2023-12-21 Thread Henry Rich
(/: verb-to-put-cards-in-order) table-of-hands For poker, verb-to-put-cards-in-order is vtpcio =. '23456789TJQKA'&i.    (/: vtpcio) _5 ]\ 'A22345323452' 23452 23453 2 A Henry Rich On 12/21/2023 10:29 AM, 'Viktor Grigorov' via Programming wrote: The first example is lesser, m

Re: [Jprogramming] sorting using verb returing a boolean

2023-12-21 Thread 'Viktor Grigorov' via Programming
The first example is lesser, my bad! Dec 21, 2023, 15:27 by programm...@jsoftware.com: > I have a list that I would like to sort using a verb that outputs 0 or 1, > depending on the two items compared. Since there are length-1 factorial > possible pairings and hence booleans, I'd thought of th

Re: [Jprogramming] sorting using verb returing a boolean

2023-12-21 Thread 'Viktor Grigorov' via Programming
I have a list that I would like to sort using a verb that outputs 0 or 1, depending on the two items compared. Since there are length-1 factorial possible pairings and hence booleans, I'd thought of the table. Here, the items are hands of playing cards. One hand is greater than another, if at a

Re: [Jprogramming] sorting using verb returing a boolean

2023-12-21 Thread Henry Rich
I don't understand the problem statement. Henry Rich On 12/21/2023 10:17 AM, 'Viktor Grigorov' via Programming wrote: Maybe a table, summation and a sort using that:    (/: ([:+/(>/]))) _10 1 10 20 _30 15 25 30 0 Can't imagine that being efficient, but it's better than nothing. The verb I'd

Re: [Jprogramming] sorting using verb returing a boolean

2023-12-21 Thread 'Viktor Grigorov' via Programming
Maybe a table, summation and a sort using that:    (/: ([:+/(>/]))) _10 1 10 20 _30 15 25 30 0 Can't imagine that being efficient, but it's better than nothing. The verb I'd defined can't deal with rank 2 nouns anyways. Dec 21, 2023, 14:21 by programm...@jsoftware.com: > Not quite though. Had I

Re: [Jprogramming] sorting using verb returing a boolean

2023-12-21 Thread 'Viktor Grigorov' via Programming
Not quite though. Had I 5 hands, that'd be !4 booleans. Dec 21, 2023, 14:11 by programm...@jsoftware.com: > > 1 0 0 1 0 /:~ i.5 > > 1 2 4 0 3 > > > On Thursday, December 21, 2023 at 09:03:34 a.m. EST, 'Viktor Grigorov' via > Programming wrote: > > Hey, > > Is there an easy way to sort an

Re: [Jprogramming] sorting using verb returing a boolean

2023-12-21 Thread 'Pascal Jasmin' via Programming
1 0 0 1 0 /:~ i.5 1 2 4 0 3 On Thursday, December 21, 2023 at 09:03:34 a.m. EST, 'Viktor Grigorov' via Programming wrote: Hey, Is there an easy way to sort an array with verb  returning either 0 or 1, like the comparison primitives? The verb that I'd in mind relates to the 2023'

[Jprogramming] sorting using verb returing a boolean

2023-12-21 Thread 'Viktor Grigorov' via Programming
Hey, Is there an easy way to sort an array with verb returning either 0 or 1, like the comparison primitives? The verb that I'd in mind relates to the 2023's advent of code's day 7: given two equal length hands, which one has the first high card. Which one can write as:    'K2345' ( 2 | 0 {

Re: [Jprogramming] J9.5.1 release available

2023-12-21 Thread bill lam
android J9.5.1 release available at * http://www.jsoftware.com/download/j9.5/install/ On Thu, Dec 21, 2023 at 3:20 AM Eric Iverson wrote: > J9.5.1 release available > > If you were running the 9.5 beta, do a full install to get everything and > have a clean slate. Do not just do an engine upgrad

Re: [Jprogramming] J9.5.1 release available

2023-12-21 Thread bill lam
Does typing JVERSION help? On Thu, Dec 21, 2023 at 10:24 Devon McCormick wrote: > I followed the Windows installation instructions and I think it worked but > I can't tell and I have to guess where it was installed since there is no > helpful message at the end saying something like "Successfull

Re: [Jprogramming] J9.5.1 release available

2023-12-20 Thread Devon McCormick
I followed the Windows installation instructions and I think it worked but I can't tell and I have to guess where it was installed since there is no helpful message at the end saying something like "Successfully installed at location XYZ" or whatever. On Wed, Dec 20, 2023 at 2:20 PM Eric Iverson

[Jprogramming] J9.5.1 release available

2023-12-20 Thread Eric Iverson
J9.5.1 release available If you were running the 9.5 beta, do a full install to get everything and have a clean slate. Do not just do an engine upgrade. https://code.jsoftware.com/wiki/System/Installation/J9.5 https://code.jsoftware.com/wiki/System/ReleaseNotes/J9.5 The 9.6 beta starts in earl

Re: [Jprogramming] hello and announcement on implementation of web form server system for adding forms to Jconsole function

2023-12-19 Thread Raul Miller
This looks interesting, though it will take some time for me to digest adequately. One thing which occurs to me is that begin_simple_server_or_client_jconsole.ijs and begin_simple_server_or_client_jconsole_wsl.ijs in the making_basic directory could be combined into a single script, though there

Re: [Jprogramming] hello and announcement on implementation of web form server system for adding forms to Jconsole function

2023-12-19 Thread LdBeth
Very interesting framework, the install process required for source package I found from https://www.smccake.net/japla/making_basic_ver_0_1.zip seems has a deviation from the description in PDF, that is, assume the 'making/' dir in downloaded zip is unpacked to $HOME, boot Jconsole in $HOME and

[Jprogramming] hello and announcement on implementation of web form server system for adding forms to Jconsole function

2023-12-18 Thread Yuji Suda
Hello everyone I am Yuji Suda from Sendai, Miyagi, Japan. Recently I have developed and implemented a web form server system in J and Jsocket for adding forms to Jconsole funtion.  It was presented in the Workshop of JAPLA http://japla.sakura.ne.jp on 8 December 2023. The abstract is as f

Re: [Jprogramming] Horse straggles cart

2023-12-17 Thread Raul Miller
There's actually several issues here, one being the parsing issue Henry has highlighted. Another is a difficulty in reproducing the problem: f=: {{ GLOBAL=: 'global defined here' }} GLOBAL [ f'' |domain error in GLOBAL, executing monad GLOBAL | GLOBAL[f'' GLOBAL [ f'' global defin

Re: [Jprogramming] Horse straggles cart

2023-12-17 Thread Henry Rich
This follows the parsing rules. f is executed when the pattern N V V N is seen on the execution stack. GLOBAL has already been stacked at that point, as an undefined verb. When later GLOBAL is to be executed, its value has been changed to a noun. That pun is disallowed. Henry Rich On Sun, Dec

[Jprogramming] Horse straggles cart

2023-12-17 Thread David Lambert
$ ijconsole f=: {{ GLOBAL=: 'global defined here' }} GLOBAL [ f'' |domain error in GLOBAL, executing monad GLOBAL | GLOBAL[f'' GLOBAL [ f'' global defined here JVERSION Engine: j9.5.0-beta9/j64avx2/linux Build: commercial/2023-12-06T14:16:14/clang-11-0-0/SLEEF=1 Library:

Re: [Jprogramming] j9.5.0-beta9 available

2023-12-14 Thread 'Mike Day' via Programming
Thanks, Bill. As JVERSION shows, it's Windows 11 Home, version 22H2. "Settings" wants to do an update, "2023-12 cumulative update ..."; I won't do that now as it's late. Bit busy tomorrow, but I might manage to do the update and see whether it helps. Cheers, Mike Sent from my iPad >

Re: [Jprogramming] j9.5.0-beta9 available

2023-12-14 Thread bill lam
The latest base library is 9.5.5 so yours has been updated. It uses windows stock curl.exe for http fetch therefore certificates come from windows. Did you get windows update? On Fri, Dec 15, 2023 at 03:59 'Michael Day' via Programming < programm...@jsoftware.com> wrote: > I'm still getting an e

Re: [Jprogramming] j9.5.0-beta9 available

2023-12-14 Thread Raul Miller
The base library is indeed in addons. And, you can edit httpget_jpacman_ to show you the urls it's fetching (and, thus, the url it's failing on). That said, I remember seeing https certificate errors a few days ago, so I expect that jsoftware is experiencing a hosting issue. I hope this helps,

Re: [Jprogramming] j9.5.0-beta9 available

2023-12-14 Thread 'Michael Day' via Programming
I'm still getting an error, reported earlier for beta 7 (msg copied below), when using upgrade - still can't see why.  The laptop has been through many on/off switches,  so it's not a transient error. I think I've updated to beta9 by using the zip file.  Jversion info follows my sign-off.  I s

[Jprogramming] Report of the J Wiki Meeting of December 7, 2023

2023-12-13 Thread 'robert therriault' via Programming
== Report of Meeting 2023-12-07 == Present: Ed Gottsman, Raul Miller, and Bob Therriault Full transcripts of this meeting are now available on the its wiki page. https://code.jsoftware.com/wiki/Wiki/Report_of_Meeting_2023-12-07 1) Ed reported that he can now get Skip Cave's answers to Quora in

Re: [Jprogramming] Get all indexes of a boolean array

2023-12-11 Thread LdBeth
I appreciate your effort demonstrate on how to derive reusable code in J. It is important to know how to adapt existed solutions for different needs. To me knowing that I can use the shape of the array to decode (#:) indices generated by I. is a good enough respond to my question. So I also tha

Re: [Jprogramming] Get all indexes of a boolean array

2023-12-11 Thread 'Viktor Grigorov' via Programming
The array and verb were an example; didn't want to copy anybody's array and boolean mask. A general purpose solution, to me, is a verb (that generates the mask), not an explicitly defined noun, lines above. It's how I've saved the snippet in my snippets file, and how I use it. Plug-and-play, or

Re: [Jprogramming] Get all indexes of a boolean array

2023-12-11 Thread 'Michael Day' via Programming
Sorry,  Viktor,  but I don't see your point. (>:i.8)* 8 8 $ 1j2 # 1 generates an integer array, not a Boolean. I agree (5&=) yields a boolean,  but is it in any way a general-purpose condition? You might note that Henry Rich proposed the same solution to LdBeth's enquiry. He (HR) might under

Re: [Jprogramming] Get all indexes of a boolean array

2023-12-11 Thread 'Viktor Grigorov' via Programming
A fully tacit solution would encapsulate the predicate too, here parenthesized for emphasis:    ($ #: [: I. [: (5&=) ,)  (>:i.8)* 8 8 $ 1j2 # 1 4 1 4 4 4 7 Dec 11, 2023, 17:01 by programm...@jsoftware.com: > I see Pablo has just replied, but here's a similar/same approach, as a tacit > expr

Re: [Jprogramming] Get all indexes of a boolean array

2023-12-11 Thread 'Mike Day' via Programming
I see Pablo has just replied, but here's a similar/same approach, as a tacit expression: b =. 0=3|i.2 3 4 ($#:I.@,) b 0 0 0 0 0 3 0 1 2 0 2 1 1 0 0 1 0 3 1 1 2 1 2 1 Might be of use, Mike Sent from my iPad > On 11 Dec 2023, at 10:06, LdBeth wrote: > > I've been running to too many s

Re: [Jprogramming] sparse element changes unexpectedly

2023-12-11 Thread Henry Rich
It's expected.  If you kept the sparse element at 0 the matrix would become dense.    3 $. -. $. 3 3 $ _4 {. 1 1    3 $. 1 - $. 3 3 $ _4 {. 1 1    3 $. 2 - $. 3 3 $ _4 {. 1 2    3 $. % $. 3 3 $ _4 {. 1 _ Henry Rich On 12/11/2023 11:53 AM, David Lambert wrote: $ ijconsole    JVERSION Engine:

[Jprogramming] sparse element changes unexpectedly

2023-12-11 Thread David Lambert
$ ijconsole    JVERSION Engine: j9.5.0-beta9/j64avx2/linux Build: commercial/2023-12-06T14:16:14/clang-11-0-0/SLEEF=1 Library: 9.5.5 Platform: Linux 64 Installer: unknown InstallPath: /usr/share/j/9.5 Contact: www.jsoftware.com    ]A=: 3 3 $ _4 {. 1 0 0 0 1 0 0 0 1 0    3 $. $. A 0    3 $. -.

Re: [Jprogramming] Get all indexes of a boolean array

2023-12-11 Thread Henry Rich
($ #: I.@,) y Henry Rich On 12/11/2023 5:06 AM, LdBeth wrote: I've been running to too many situations that I uses 4$.$.y a lot to get indexes of all non zero elements to an array, I wonder if there are any alternative ways to do that in J, especially when y is a boolean array. Also monadi

Re: [Jprogramming] Get all indexes of a boolean array

2023-12-11 Thread Pablo Landherr
index =: $ #: [: I. , index ? 2 4$2 0 0 1 0 1 3 index ? 2 4 5$2 0 0 0 0 0 1 0 0 2 0 0 3 0 1 1 0 2 1 0 2 3 0 2 4 0 3 2 1 0 0 1 0 1 1 0 2 1 0 4 1 1 1 1 1 3 1 2 1 1 2 2 1 2 4 1 3 0 1 3 1 1 3 2 On Mon, Dec 11, 2023 at 11:06 AM LdBeth wrote: > I've been running to too many

[Jprogramming] Get all indexes of a boolean array

2023-12-11 Thread LdBeth
I've been running to too many situations that I uses 4$.$.y a lot to get indexes of all non zero elements to an array, I wonder if there are any alternative ways to do that in J, especially when y is a boolean array. Also monadic I. only works for 1D array, while ⍸ from APL works for higher d

Re: [Jprogramming] Six cards

2023-12-10 Thread Henry Rich
I'll open with    (2 3 $ <@|:@(6 5&($!._))@:>:@I."1@|.)&.|: #: >: i. 60 +-+-+ |1 11 21 31 41 51 | 8 13 26 31 44 57| |3 13 23 33 43 53 | 9 14 27 40 45 58| |5 15 25 35 45 55 |10 15 28 41 46 59| |7 17 27 37 47 57 |11 24 29 42 47 60| |9 19 29 39 49 59 |12 25 30 43 56 

[Jprogramming] Six cards

2023-12-10 Thread bill lam
https://ibb.co/XLn0bxH The each of the 6 cards is missing a number that is present in the remaining 5 cards. By asking a player a number is present in the card or not, the number can be deducted. Eg, 55 is missing in the top left card. The problem is to generate all 6 cards in J.

[Jprogramming] AOC data to iPad - was Re: Advent of code newbie

2023-12-10 Thread 'Mike Day' via Programming
, December 9, 2023 4:46:50 PM > To: programming > Subject: Re: [Jprogramming] Advent of code newbie > > Hi Richard, > > What part of the display do you find difficult to read? Is it contrast or > font size or colour or layout? If you are on a Mac you have a lot of control > o

Re: [Jprogramming] J for android (Pixel 8) & other platforms

2023-12-09 Thread Thomas Arneson
Bill, I would like to see the J android user folder move as you suggested on 12/04/23. Thanks, Tom Arneson > On 12/04/2023 11:44 PM CST bill lam wrote: > > > Good observation. I am also thinking of moving the user folder to public > location such as download folder so that J scripts will be

Re: [Jprogramming] Advent of code newbie

2023-12-09 Thread 'robert therriault' via Programming
> From: Programming on behalf of > 'robert therriault' via Programming > Sent: Saturday, December 9, 2023 4:46:50 PM > To: programming > Subject: Re: [Jprogramming] Advent of code newbie > > Hi Richard, > > What part of the display do you f

  1   2   3   4   5   6   7   8   9   10   >