Re: [Jprogramming] AOC 2018 day 6

2018-12-12 Thread 'Mike Day' via Programming
It occurred to me yesterday, though I haven’t coded it, that you can work through twice, first for the minimum suitable spanning box, and second for that box extended one row up and down and one column left and right. The inner regions are those whose size doesn’t change. Probably pretty ineffic

Re: [Jprogramming] Linear representation bug

2018-12-14 Thread 'Mike Day' via Programming
Thank Heavens Ken and Roger avoided all those APL glyphs Mike > On 14 Dec 2018, at 16:08, Raul Miller wrote: > > I think this might be at least partially a font issue. > > If I am reading your current message right, I probably read 5” as 5’’ > > And, in the environment I am currently working

Re: [Jprogramming] time zones

2018-12-27 Thread 'Mike Day' via Programming
Well, we’ve been calling our times gmt and bst (British Summer T) throughout membership of the EU, and that’s bound to continue; however, our synchronisation with Europe on the changeover dates might change in the future, perhaps. Perhaps brexit should be a time-zone acronym, left as an exerc

Re: [Jprogramming] Tagging duplicate values in a list

2018-12-30 Thread 'Mike Day' via Programming
... this thread popped up over breakfast, so to speak. Playing with Roger’s solution, I noticed this variant which happens to solve a more specialised requirement, to indicate doubletons only: ~:~:~:&.|. as in (~:~:~:&.|.)t 1 1 0 1 1 1 0 0 0 1 0 ... so the 2, which occurs 3 times is not f

Re: [Jprogramming] Finding indices

2019-01-13 Thread 'Mike Day' via Programming
You often see this sort of thing, returning pairs of indices of all occurrences: 5 ($@] #.inv I.@,@:=) |: 1 2 3 4,. 2 3 4 5,. 5 4 3 2 ,. 2 3 5 4 1 3 2 0 3 2 You can obviously get the row indices using {:”1 or some such, and you can of course make the bracketed code a named dyadic verb, Cheer

Re: [Jprogramming] stack error from recursion

2019-01-26 Thread 'Mike Day' via Programming
Pascal Jasmin’s power verb looks neat, but I don’t think one pass does quite what Brian’s foo does: one pass of foo modifies x with bar1 before changing y with bar2 using the new x. eg, x1 =. x bar1 y y =. x1 bar2 y x =. x I _think_ (bar1 ; bar2 ) &>/ x0;y0 returns (x0 bar1 y0); x

Re: [Jprogramming] Jupyter Versions of J Labs

2019-01-29 Thread 'Mike Day' via Programming
Not sure who Martin was (as mentioned below),  I eventually found https://code.jsoftware.com/wiki/Guides/Jupyter, contributed by "Martin Saurer" This is fine,  but the download/jupyter link on that page refers to zipped j805 packages, with the Windows version apparently only available in 3

[Jprogramming] recovery from |stack error ?

2019-02-02 Thread 'Mike Day' via Programming
Occasionally I get this sort of thing happening. I've (usually?) used debug earlier in the session for tracing through a verb or three: Today: load 'c:/d/j807/user/myscript.ijs' |stack error: mpart ... so I try again, hoping it disappears (!) load 'c:/d/j807/user/myscript.ijs' |stack error: m

Re: [Jprogramming] recovery from |stack error ?

2019-02-02 Thread 'Mike Day' via Programming
done anything wrong yet. It want to > leave the stack for you to look at. It's a bit inelegant not to be able to > execute any name at all, I admit. If going out of debug doesn't fix it, give > me an example I can reproduce the problem with. > > > Henry Rich >

Re: [Jprogramming] recovery from |stack error ?

2019-02-02 Thread 'Mike Day' via Programming
> are executed. >>> >>> If you are in debug, the system hasn't done anything wrong yet. It want to >>> leave the stack for you to look at. It's a bit inelegant not to be able to >>> execute any name at all, I admit. If going out of debug doesn&#x

Re: [Jprogramming] Adding leading zeros

2019-02-03 Thread 'Mike Day' via Programming
Paolo has just beaten me to it,  but I'll post this anyway.    b    NB. shorter than a,  just to avoid line-wrapping 1 10 100 1000 2 20 200 2000 3 30 300 3000 Monadic,  with 4 and '000' embedded:    (,@:((' ',~_4{.'000',":)"0)) b 0001 0010 0100 1000 0002 0020 0200 2000 0003 0030 0300 3000 Dyad

Re: [Jprogramming] Error in addons/math/misc/fermat.ijs

2021-02-05 Thread 'Mike Day' via Programming
Yes, of course it was x. ! M Sent from my iPad > On 5 Feb 2021, at 02:17, chris burke wrote: > > Thanks, fixed now. > > The code dates from the time when x. was the left argument. > > On Thu, Feb 4, 2021 at 4:00 PM 'Michael Day' via Programming > wrote: >> >> Having a look at the scripts i

Re: [Jprogramming] Bug in Calculus

2021-02-07 Thread 'Mike Day' via Programming
Assuming what I can now see is the latest version, line 174 still looks wrong: if. coeffs=. -: '' do. '0&p.' return. should be if. coeffs -: '' do. '0&p.' return. ... but perhaps that’s already been done in another incarnation. Cheers, Mike Sent from my iPad > On 7 Feb 2021, at 15:18, chr

Re: [Jprogramming] Error in comment in addons/math/misc/pollard.ijs

2021-02-13 Thread 'Mike Day' via Programming
Thanks, Ric. I think I’d prefer to continue offering public comments open to criticism and correction in this and perhaps other forums/fora. Cheers, Mike Sent from my iPad > On 13 Feb 2021, at 23:20, Ric Sherlock wrote: > > Hi Mike, > I've made the suggested change and pushed to GitHub

Re: [Jprogramming] csvedit

2021-02-18 Thread 'Mike Day' via Programming
Oops! Sent from my iPad > On 18 Feb 2021, at 11:38, R.E. Boss wrote: > > In my first message (far below) I wrote: > I could only find it in \j64-602\addons\tables\csvedit > > > R.E. Boss > > > -Original Message- > From: Programming On Behalf Of > 'Michael Day' via Programm

Re: [Jprogramming] Is this a bug?

2021-03-15 Thread 'Mike Day' via Programming
Henry’s pointed out that 13 : ... has bugs. It’s very useful for quick tacitisation, but it’s always advisable to check the resulting verb. Mike Sent from my iPad > On 15 Mar 2021, at 12:00, 'Bo Jacoby' via Programming > wrote: > > Hi Bob > Thank you very much! > Bo. > >Den søndag den

Re: [Jprogramming] Quora Problem

2021-03-21 Thread 'Mike Day' via Programming
OK... here’s what I should have sent earlier: 1. The required number includes all nn = n raised to n for which n are multiples of 3. 2. It also includes all nn for which n are already powers of 3 3. But we need to avoid double-counting nn for which both 1 & 2 apply. So: qprob =: 3 : 0 N =. y

Re: [Jprogramming] Groups

2021-03-30 Thread 'Mike Day' via Programming
... Skip’s t had a trailing zero, but you can’t take that as given, so need to append in case the last entry is 1 Sent from my iPad > On 30 Mar 2021, at 06:29, Raul Miller wrote: > > The ,0 is at the end because Skip specified that the list was zero > delimited, and verbs of the form u;._2 ar

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

2021-04-13 Thread 'Mike Day' via Programming
My variant: j =. 1 'mevema' {~ 0 1 + +: j ve I use {~ quite often, possibly thanks to nostalgia for [i] ! Mike Sent from my iPad > On 13 Apr 2021, at 09:14, HH PackRat wrote: > > Hello, all! > > I'm stumped and need to know why the following "from" problem occurs > and how to do wha

Re: [Jprogramming] Mass amend

2021-05-15 Thread 'Mike Day' via Programming
Sent from my iPad > On 15 May 2021, at 04:13, HH PackRat wrote: > > 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 s

Re: [Jprogramming] Mass amend

2021-05-15 Thread 'Mike Day' via Programming
Sorry... another early send! You’ve already had some helpful, constructive, replies. All I’ve got to add is to wonder why you’re working with boxed data if your data are as regular as your example suggests. If you really do have m rows of n boxed numeric values, why not just open it up w

Re: [Jprogramming] Cut

2021-07-04 Thread 'Mike Day' via Programming
That’s what I was thinking too, or even take all 3-digit numbers & insert, pretend, append triples... again, it’s better if you’re happy with quads etc. Cheers, Mike Sent from my iPad > On 4 Jul 2021, at 08:50, Jan-Pieter Jacobs wrote: > > Not using cut here, but I took a generative approa

Re: [Jprogramming] Cut

2021-07-04 Thread 'Mike Day' via Programming
... prepend ..., thanks to iPad spell correction! M Sent from my iPad > On 4 Jul 2021, at 09:24, Mike Day wrote: > > That’s what I was thinking too, or even take all 3-digit numbers & insert, > pretend, append triples... > again, it’s better if you’re happy with quads etc. > > Cheers, > >

Re: [Jprogramming] Cut

2021-07-07 Thread 'Mike Day' via Programming
Here’s one implementation of what I’d suggested for construction from all 3-digit representations of 0-999, working in characters rather than numerals. Staying in characters saves time and space, not shown here, compared to evaluating the representations. Also, I’m pre-evaluating the 3-digit

Re: [Jprogramming] Cut

2021-07-07 Thread 'Mike Day' via Programming
=: (i.4) |. rtbl 0 1 , rtbl 1 > clean2 =: ~.@: #~ %~@i.&'0'"1 > > and finally, check if everything worked out fine: > > (noi,6) -: $ clean2 d3a exp2 tripsa > > >> Am 07.07.21 um 12:15 schrieb 'Mike Day' via Programming: >> Here’s one

Re: [Jprogramming] possibly heretical proposal : .. as sentence separator ?

2021-07-27 Thread 'Mike Day' via Programming
... or even <> a la APL!? Mike Sent from my iPad > On 27 Jul 2021, at 02:18, Henry Rich wrote: > > I don't see much downside to implementing a sentence delimiter, except for a > nagging feeling that the good Lord left that space for you to put commentary > in. > > Take a moment to consider w

Re: [Jprogramming] possibly heretical proposal : .. as sentence separator ?

2021-07-27 Thread &#x27;Mike Day&#x27; via Programming
Except <> is a valid train, so would need special treatment. I suppose the user could set a separator string or strings of their choice, probably in a config file. Cheers, Mike Sent from my iPad > On 27 Jul 2021, at 09:48, Mike Day wrote: > > ... or even <> a la APL!? > Mike > > Sent f

Re: [Jprogramming] Tacit hook

2021-08-01 Thread &#x27;Mike Day&#x27; via Programming
Nice work, especially persuading 13 : to return a tacit version. I had reached the same solution as Pascal Jasmin’s, so not worth a comment in itself. However, it is just about worth pointing out that the filtering approach gets expensive for larger values of y; eg 3 Smps 20 would entail fi

Re: [Jprogramming] Tacit hook

2021-08-03 Thread &#x27;Mike Day&#x27; via Programming
gt;> corrected variances of all samples is equal to the bessel corrected variance >> of the population. >> >>E =. +/%# NB. mean >> >>Va =. E@:*:-*:@:E NB. Variance >> >>Bc =. -.&.:%@#*Va NB. Bessel corrected variance >> >>

Re: [Jprogramming] All selected hand possibilities (long)

2021-08-11 Thread &#x27;Mike Day&#x27; via Programming
NB. No history in this comment - side-effect of using iPad away from home WiFi My farthingsworth: Suppose you’ve got one canonical solution in the form of an array of m-hands compatible (in some way) with one canonical n-hand. (Devon asked for all 5-hands given 1 (or 6 permutations of 1) 4-han

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

2021-08-20 Thread &#x27;Mike Day&#x27; via Programming
But are they all evaluated in one go, or are you already buffering the data, as suggested by several correspondents? If the latter is the case, different buffers might give rise to “different” values... But we haven’t seen your data. Can you reproduce the apparent error on an example that’

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

2021-08-20 Thread &#x27;Mike Day&#x27; via Programming
a 20160627.070001.177063283 0 0 18634 0:e4b700 18546 124.7 >> 6384 125 18546 124.7 7384 125 >> >> TopOfBookDelta 20160627.070001.177063284 0 0 18634 0:e5e000 18546 124.7 >> 7384 125 18546 124.7 7474 125 >> >> TopOfBookDelta 20160627.070001.177063285 0 0 18634

Re: [Jprogramming] J903-beta-n

2021-08-23 Thread &#x27;Mike Day&#x27; via Programming
Sending to Beta AND Programming- sorry if wrong! Just tried it, in Windows 10 Unfortunately, Jqt doesn’t start up. Running J console’s batch file with an added (by me) pause line shows: “ load library c:\\bin\j.dll failed. The specified module could not be found. “ I can confirm tha

Re: [Jprogramming] break from loading a script with 'load'

2021-09-01 Thread &#x27;Mike Day&#x27; via Programming
Yes, a good point. As I said, I have a need for this facility occasionally, but not for production code. Most of my programming is recreational problem-solving. I think I used the block comment method a week or so ago in solving a numerical Times Listener crossword, number 4673, 21 August

Re: [Jprogramming] Odd behaviour - functional?

2021-09-14 Thread &#x27;Mike Day&#x27; via Programming
This rings a bell ... I think this might have been a problem with an early beta, forget which version. Later correspondence shows you’re in release beta 901-a, so likely to have been buggy, perhaps. Cheers, Mike Sent from my iPad > On 14 Sep 2021, at 14:59, Jon Quant wrote: > > Dear all,

Re: [Jprogramming] vanishing parentheses

2021-09-16 Thread &#x27;Mike Day&#x27; via Programming
I’d noticed the unmatched bracket, thought it was deliberate, so didn’t comment. Sorry, could have saved you some time! Mike Sent from my iPad > On 16 Sep 2021, at 14:07, R.E. Boss wrote: > > OK. I see the mistake I made, left paren was missing, so J gave a length > error on 0 0 0 1,: _ _ d

Re: [Jprogramming] cross product

2021-09-21 Thread &#x27;Mike Day&#x27; via Programming
Similar approach, essentially, to Ric’s, using a table of indices of the ones: ix =: $#:I.@, ix map 0 0 0 3 1 1 1 2 ({&m@:{."1)ix map aabb ({&m@:{."1,. {&n@:{:"1)ix map aA aD bB bC Somehow, though, I think you’re after something more elegant. Sorry, the display is probably poor a

Re: [Jprogramming] cross product

2021-09-23 Thread &#x27;Mike Day&#x27; via Programming
FWIW, I compared my suggestion (based on I. on the ravel) with Igor’s on a 3000x4000 Boolean, with about 3% ones. Igor’s was far better, in space and time. Might be different given a different starting point, such as a sparse matrix, or index array, either/both of which Bill says he’s us

Re: [Jprogramming] sudoku solver

2021-10-14 Thread &#x27;Mike Day&#x27; via Programming
Also, there’s been correspondence in this forum over the years since Sudokus emerged around ‘05. Many solutions were discussed. Roger Hui presented elegant compact solvers; John Scholes produced a nice one using “direct definition” in Dyalog APL, I forget where it’s published. My own is ty

Re: [Jprogramming] histogram verb

2021-10-19 Thread &#x27;Mike Day&#x27; via Programming
Sorting the result suggests this amendment to save one transpose: shist =:|:@(/:~@~.,.#/.~) Cheers, Mike Sent from my iPad > On 19 Oct 2021, at 13:00, Raul Miller wrote: > > ~. and #/.~ maintain the order of their argument. > > So this is one approach: > > hist=: ~. ,: #/.~ > n=:?100#

Re: [Jprogramming] sorting up and up

2021-10-22 Thread &#x27;Mike Day&#x27; via Programming
I was evolving a halfway decent approach, but yours is far, far better. Pace J-P Jacobs, he seems to have missed your amendment; perhaps the messages passed each other by like ships in the night... Anyway, the ] may be dropped, at the expense of a couple of brackets: foo =: /:(,.~3|3+*

Re: [Jprogramming] sorting up and up

2021-10-22 Thread &#x27;Mike Day&#x27; via Programming
! Sent from my iPad > On 22 Oct 2021, at 13:54, Ben Gorte wrote: > > Ha! > > > (\:%) i:10 > > 0 1 2 3 4 5 6 7 8 9 10 _10 _9 _8 _7 _6 _5 _4 _3 _2 _1 > > >> On Fri, 22 Oct 2021 at 20:14, R.E. Boss wrote: >> >> Some time ago I stumbled on an elegant solution to sort a sequence of >> numbers

Re: [Jprogramming] Where, oh where have my indices...

2021-10-25 Thread &#x27;Mike Day&#x27; via Programming
I’m almost sure you already know this idiom: ]x=. 0 4 5 e.~ i.3 3 1 0 0 0 1 1 0 0 0 where =: $#:I.@, where x 0 0 1 1 1 2 ... and you know that I.x is filling in zeros in rows 0 & 2 to match the length of row 1, so I’ve probably missed the point! Sadly, Roger isn’t around to explain w

Re: [Jprogramming] Where, oh where have my indices...

2021-10-25 Thread &#x27;Mike Day&#x27; via Programming
Fair point. Apologies M Sent from my iPad > On 25 Oct 2021, at 13:09, Marshall Lochbaum wrote: > > ($#:I.@,) 0 0 1 1 -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] JQt terminal development environment

2021-11-03 Thread &#x27;Mike Day&#x27; via Programming
Devon, in your initial msg, you mentioned “Anyway, for really simple things I do in emacs, like recalling the previous command...” You probably mean something else entirely, but just in case it helps, the hot key combination ctrl-shift-up arrow goes back up previous commands; ctrl-shift-do

Re: [Jprogramming] JQt terminal development environment

2021-11-03 Thread &#x27;Mike Day&#x27; via Programming
> > On Wed, Nov 3, 2021 at 10:51 AM 'Mike Day' via Programming < > programm...@jsoftware.com> wrote: > >> Devon, in your initial msg, you mentioned >> “Anyway, for really simple things I do in emacs, like recalling the >> previous command...” &

Re: [Jprogramming] 10 is special

2021-11-08 Thread &#x27;Mike Day&#x27; via Programming
Also, surely the integer restriction is consistent with the “scientific notation” that’s so pervasive in science and in computer languages. Cheers, Mike Sent from my iPad > On 8 Nov 2021, at 11:47, Raul Miller wrote: > > Conceptually, 2e3.4 would be 2 * 10^3.4 or approximately 5023.77 > >

Re: [Jprogramming] JHS update

2021-12-02 Thread &#x27;Mike Day&#x27; via Programming
I’ve just remembered to check menu>tour>overview in jhs after updating the addon. Yes, it launches without error. In looking for a msg to reply to I found your (Eric’s) note nested below. Sorry I’d overlooked it, but thanks all the same! Seems fine in Avast - I think it’s a Chrome clone!

Re: [Jprogramming] Advent of Code Day 6

2021-12-27 Thread &#x27;Mike Day&#x27; via Programming
Yes, a 9x9 Boolean matrix with an offset 1s diagonal and an extra 1. It might have been worth using the high-power squaring technique, if the power were really large, but for 256 I just took the direct 256th power. Cheers, Mike Sent from my iPad > On 27 Dec 2021, at 06:17, Raul Miller wro

Re: [Jprogramming] Advent of Code Day 14

2022-01-04 Thread &#x27;Mike Day&#x27; via Programming
As I recall, a killer question until one realises there’s no need to preserve the order; then it’s just a matter of maintaining counts, as you observe. I’m currently wondering how to acquire the tera- or peta-bytes of storage to deal with day 22 part 2. Part 1 is easy, of course. No spoilers,

Re: [Jprogramming] AOC Day 22 - was Re: Advent of Code Day 14

2022-01-06 Thread &#x27;Mike Day&#x27; via Programming
>> >> There must be a better way, but at least this slow-coach method didn't >> need a super-computer! >> >> I might inspect the efficiency, but probably not - it's taken too long >> to find a working solution! >> >> Looking forward to Rau

Re: [Jprogramming] Advent of Code Day 16

2022-01-06 Thread &#x27;Mike Day&#x27; via Programming
I’d forgotten that this day was also pretty hard. My “unpack” function (snap!) also delivered the goods for both parts. It works through the message calling either “literal” or “operator”. literal is self-contained, returning a value and an unused message fragment, while operator calls unpack

Re: [Jprogramming] AOC Day 22 - was Re: Advent of Code Day 14

2022-01-06 Thread &#x27;Mike Day&#x27; via Programming
though the initial set of 420 "ops" >>> generated only ~ 43000 small objects. >>> The space actually used appears fo be ~9GB: >>> >>> 7!:2@] 'reboot2 data' >>> >>> 8721760 >>> >>> >>> There

Re: [Jprogramming] Advent of Code Day 19

2022-01-10 Thread &#x27;Mike Day&#x27; via Programming
Sure. Sorry, excuse my phrasing; that’s what I meant but didn’t express clearly! Ciao, Mike Sent from my iPad > On 10 Jan 2022, at 03:21, Pierpaolo Bernardi wrote: > >> Il giorno 9 gennaio 2022, alle ore 20:56, 'Michael Day' via Programming >> ha scritto: >> >> Chat really, but I think

Re: [Jprogramming] Advent of Code Day 19

2022-01-10 Thread &#x27;Mike Day&#x27; via Programming
Well, I was using my right hand/ lh/ 2 fingers & thumb, a la Faraday, for insight! Didn’t help! Mike Sent from my iPad > On 10 Jan 2022, at 04:54, Raul Miller wrote: > > I should perhaps clarify -- since there's no actual physical > coordinates involved here. I am using "left handed" and "ri

Re: [Jprogramming] Advent of Code Day 19

2022-01-10 Thread &#x27;Mike Day&#x27; via Programming
Perhaps we’re not talking about the same thing. I was using this bit of the problem description: “By finding pairs of scanners that both see at least 12 of the same beacons, you can assemble the entire map” So for each scanner I found its inter-beacon distances, which are independent of th

Re: [Jprogramming] Advent of Code Day 21

2022-01-10 Thread &#x27;Mike Day&#x27; via Programming
Part 1 was relatively easy, but I was annoyed that I couldn’t see how to exploit its cyclic nature. Here’s a comment to self from my script: “ m10 +/\"1}."1 |: 15 2 $+/|:30 3$die 4 6 6 4 10 4 6 6 4 10 4 6 6 4 3 4 3 10 5 8 9 8 5 10 3 4 3 10 NB. Players 1 2 score 60 65 respectively every 10

[Jprogramming] Parsing {{ }}

2022-01-11 Thread &#x27;Mike Day&#x27; via Programming
For Henry I expect: as I share code between J903 on the laptop and J701 on this iPad, I’ve been avoiding the use of {{ }} objects. (My iPad can’t support Ian’s new J902.) But I was just wondering about adding a routine to the J701 start.ijs script to parse a J903 script translating direct def

Re: [Jprogramming] Parsing {{ }}

2022-01-11 Thread &#x27;Mike Day&#x27; via Programming
% #) y' >> >> But this would be useless for your purposes: >> >>mean=: {{ {{x + y}} {{u/}} {{x % y}} {{#y}} }} >>5!:5<'mean' >> 3 : '{{ x + y }} {{ u/ }} {{ x % y }} {{ #y }} ' >> >> FYI, >> >>

Re: [Jprogramming] Advent of Code Day 22

2022-01-11 Thread &#x27;Mike Day&#x27; via Programming
Briefly for now, as the pub quiz went on far too long & it’s midnight... I hope my hint wasn’t too much of a spoiler; unintended if it was. My insight was somewhat mathematical, and is similar in a way to the Moebius transform. I worked through a 2-d analogue looking at intersecting rectangles

Re: [Jprogramming] Advent of Code Day 22

2022-01-12 Thread &#x27;Mike Day&#x27; via Programming
this into a useful algorithm. > > Thanks, > > -- > Raul > > On Tue, Jan 11, 2022 at 7:42 PM 'Mike Day' via Programming > wrote: >> >> Briefly for now, as the pub quiz went on far too long & it’s midnight... >> I hope my hint wasn’t too much of a

Re: [Jprogramming] Advent of Code Day 24

2022-01-14 Thread &#x27;Mike Day&#x27; via Programming
I’ve just got going on this after throwing in the towel on 23.2, though I haven’t yet persuaded myself to crib your post on that one! It’s one of those days where Dyalog APL’s direct definitions, where alpha and omega are the default arguments, would have saved renaming the registers to upper

Re: [Jprogramming] Advent of Code Day 23

2022-01-23 Thread &#x27;Mike Day&#x27; via Programming
So I’d missed the 2-moves restriction, too. That significantly reduces the possible number of states! Cheers, Mike Sent from my iPad > On 23 Jan 2022, at 19:10, Raul Miller wrote: > > On Sun, Jan 23, 2022 at 2:03 PM 'Michael Day' via Programming > wrote: >> Then I noticed: NB. I MISSED TH

Re: [Jprogramming] wordle

2022-01-24 Thread &#x27;Mike Day&#x27; via Programming
Iirc, Wordle’s inventor was on the radio recently, bbc natch; he concurred with the Mastermind attribution. Mike Sent from my iPad > On 24 Jan 2022, at 14:59, Ian Clark wrote: > > Wordle strikes me as a variation of Mastermind / Cows & Bulls / Moo, using > alpha instead of digits, or color

Re: [Jprogramming] wordle

2022-01-24 Thread &#x27;Mike Day&#x27; via Programming
FWIW, I haven’t got into Wordle yet, although, by coincidence, neighbours were chatting about it during yesterday morning’s rehearsal for the afternoon concert! Anyway, my “anag” APL workspace has become a J script with ~285000 words and phrases, of which ~12700 are of 5 letters*. These i

Re: [Jprogramming] ArrayFire addon

2022-01-26 Thread &#x27;Mike Day&#x27; via Programming
Just about downloading ArrayFire for Windows 11... I tried downloading the two exe files, one for W11, which failed, and then W10, also a failure. The failures both reported inability to verify. My son has just commented that it’s a common M/S feature... Anyone else seen this behaviour?

Re: [Jprogramming] Find nth duplicate in vector

2022-01-26 Thread &#x27;Mike Day&#x27; via Programming
Unfortunately, Pawel wants 2 f d to be 3 11. However, I find that 3 f d IS 3 11. Other results are a bit strange, too: 4 f d 2 12 8 f d |index error: f | y({~,])x i.~+/\(i.@#~:i.~)y I wasn’t going to post my effort, but it might interest Pawel. This version works on the slightl

Re: [Jprogramming] ArrayFire addon

2022-01-27 Thread &#x27;Mike Day&#x27; via Programming
es. You will need to take some extra step to override the > security check. > > On Wed, Jan 26, 2022 at 3:35 PM 'Mike Day' via Programming < > programm...@jsoftware.com> wrote: > >> Just about downloading ArrayFire for Windows 11... >> >> I tried do

Re: [Jprogramming] Find nth duplicate in vector

2022-01-27 Thread &#x27;Mike Day&#x27; via Programming
Perhaps I should point out that my verb, h (see below), uses a lot of space for a large list, especially if there are few repeats, as it’s using an outer product. I later produced an even more verbose effort which runs in less space on a 10^6 long vector, but takes 3-4x the space & time o

Re: [Jprogramming] Find nth duplicate in vector

2022-01-27 Thread &#x27;Mike Day&#x27; via Programming
vior like the previous version) or a list > containing no indices (which gives an empty result). > > (Note also that if we were working with extremely long lists, and if > the duplicates we were looking for were typically at the beginning of > those long lists, it would be statistica

Re: [Jprogramming] arrayfire addon updated

2022-01-27 Thread &#x27;Mike Day&#x27; via Programming
I did manage to install it eventually! Other Windows users might wish to know that I found I needed to load J as an administrator to avoid failure. Thanks, Mike Sent from my iPad > On 27 Jan 2022, at 21:07, Eric Iverson wrote: > > arrayfire addon updated > > * improved init > > * support

Re: [Jprogramming] ArrayFire addon

2022-01-28 Thread &#x27;Mike Day&#x27; via Programming
I’ve just updated the addon to Vn 2.1.6, and tried load ‘~addons/math/arrayfire/arrayfire.ijs’ |value error: JAPP | d=.toJ Freda. JAPP,’man.txt’ |[-56] c:\…\addons\…\arrayfire.ijs This is in the latest J version, j903/j64avx2/Windows Release-b...28T04:09:50 Library: 9.03.08 ... I ran J

Re: [Jprogramming] ArrayFire addon

2022-01-28 Thread &#x27;Mike Day&#x27; via Programming
ain. > > On Fri, Jan 28, 2022 at 4:44 PM Eric Iverson > wrote: > >> Sloppy release on my part. I will fix this in a few minutes. >> >> >> On Fri, Jan 28, 2022 at 4:39 PM 'Mike Day' via Programming < >> programm...@jsoftware.com&

Re: [Jprogramming] ArrayFire addon

2022-01-29 Thread &#x27;Mike Day&#x27; via Programming
Not a problem, just hoping for some enlightenment. As Raul found, init_jaf_ worked with both ‘cpu’ and ‘opencl’ but not ‘cuda’. The last didn’t surprise me, as I hadn’t downloaded cuda. However, while ... freeall ‘’ after init ‘cpu’ (dropping the _jaf_) reported, verbosely, ... [0] AMD:

Re: [Jprogramming] ArrayFire addon

2022-01-30 Thread &#x27;Mike Day&#x27; via Programming
> On Fri, Jan 28, 2022 at 4:44 PM Eric Iverson > wrote: > >> Sloppy release on my part. I will fix this in a few minutes. >> >> >> On Fri, Jan 28, 2022 at 4:39 PM 'Mike Day' via Programming < >> programm...@jsoftware.com> wrote: >&

Re: [Jprogramming] ArrayFire addon

2022-01-30 Thread &#x27;Mike Day&#x27; via Programming
Sorry, iPad spell-checker rendered “mptime” as “motive”! M Sent from my iPad > On 30 Jan 2022, at 10:49, 'Mike Day' via Programming > wrote: > > One glitch: > man_jaf_ ‘benchmarks’ > ... > motive 4000NB. takes sev seconds > ... > &g

Re: [Jprogramming] arrayfire

2022-01-30 Thread &#x27;Mike Day&#x27; via Programming
So ...bench/matmul.ijs now has mpx, which now calls mptime, and returns benchmarks for f64 and f32. It’s fairly obvious what’s meant, but I’m getting two comments comparing J and AF results, but they don’t state which of f36 or f64 applies. I’m copy-typing, again, so typos rule: J and AF r

Re: [Jprogramming] arrayfire

2022-01-30 Thread &#x27;Mike Day&#x27; via Programming
l 3 arrayfire backends for me. The fp32 differ > on all 3 backends. I think AMD gpus also match with fp64. > > > > > > > On Sunday, January 30, 2022, 05:33:08 p.m. EST, 'Mike Day' via Programming > wrote: > > > > > > So ...ben

Re: [Jprogramming] polynomial division

2022-02-20 Thread &#x27;Mike Day&#x27; via Programming
This approach, from my A-level Maths perhaps, seems far too simple compared to that of the article, but works, on this iPad running J701 (no, it can’t run Ian’s J902!), including when dbho or dblo throws a domain error for, eg, dividing order 50 by order 30. I haven’t tried in J903 on the l

Re: [Jprogramming] Cyclotomic Polynomials and FFT - was Re: polynomial division

2022-03-01 Thread &#x27;Mike Day&#x27; via Programming
Sorry if I misattributed. The one time I met Roger face to face was in a London pub when he explained the idea to a few APLers, at the time he was collaborating with John Scholes, I think. I haven’t explored the remainder issue, since divisibility is assured in the cyclotomic routines. Ye

Re: [Jprogramming] Cyclotomic Polynomials and FFT - was Re: polynomial division

2022-03-01 Thread &#x27;Mike Day&#x27; via Programming
No, no acknowledgment expected; my contribution was trivial. taskorderu is just an adverbial form of your taskorder with “u” replacing “cyclotomic” Cheers, Mike Sent from my iPad > On 1 Mar 2022, at 17:13, Raul Miller wrote: > > Yes, pDiv was largely derived from your message. I did not

Re: [Jprogramming] prime testing on large numbers

2022-03-10 Thread &#x27;Mike Day&#x27; via Programming
I’d forgotten the start to this thread, so have just checked: it seems to have started with Raul Miller discussing J performance for a Rosetta Code task about repunit primes; “large” numbers, eg ~10^1200 are considered. But later correspondence suggests interest has shifted to incorporation o

Re: [Jprogramming] integrat.ijs

2022-04-18 Thread &#x27;Mike Day&#x27; via Programming
Just checked on older versions: this also fails in J902 but works fine in J901 Mike On 18/04/2022 01:53, David Lambert wrote: > The test fn integrate 0 10 12 evaluates to a verb rather than to > > 9862.950182 14 > > I suspect this is indicates a more widely spread issue with ol

Re: [Jprogramming] Extended precision question

2022-04-21 Thread &#x27;Mike Day&#x27; via Programming
One way to obtain high precision roots is to use, say, Newton’s solution to y = x^2 - a : Given an estimate x(n-1), the next estimate is xn = x(n-1) - y/(dy/dx), in Maths notation. In J, (J701 on this iPad), rt =: -:@] + (% +:) NB. x is number whose root is required, y an initial guess

Re: [Jprogramming] JQT not starting properly in Windows 11

2022-05-17 Thread &#x27;Mike Day&#x27; via Programming
I should also point out that: a) I hadn’t knowingly updated J itself or any addons during or since yesterday’s session. b) I’m not aware of any other changes between yesterday’s Windows or J environment (ok for Jqt) and today’s. Thanks, Mike Sent from my iPad > On 17 May 2022, at 07:34, 'Michae

Re: [Jprogramming] How to get the timezone?

2022-06-12 Thread &#x27;Mike Day&#x27; via Programming
I just tried 2!:0 ‘tzutil /g’ in J503, J602 & J805, of which I still have runnable exes on the Windows 11 laptop. All yield ‘domain error’. However, shell ‘tzutil /g’ works in each version, confirming Raul’s surmise. Cheers, Mike Sent from my iPad > On 12 Jun 2022, at 05:01, Raul Mille

Re: [Jprogramming] Sudoku16

2022-06-20 Thread &#x27;Mike Day&#x27; via Programming
I got confused trying to reconcile Roger’s wiki essay version and his earlier (I think) forum posting. So here’s a new attempt to generalise his algorithm starting from the wiki essay. I’ve assumed the input’s ravel is of length an exact fourth power, n4; n1, n2, n3 are the lower powers, an

Re: [Jprogramming] Sudoku16

2022-06-24 Thread &#x27;Mike Day&#x27; via Programming
Perhaps I was just unlucky, but I tried an iPad-type “share” to Documents, which didn’t produce a useable file; later downloaded a pdf with the Windows 11 laptop. Copy-paste from adobe worked to the extent that multi-spaces became single spaces, which I then filled out by hand! Anyway, I’ll

Re: [Jprogramming] Sudoku16

2022-06-24 Thread &#x27;Mike Day&#x27; via Programming
Ahhh... I hadn’t spotted “hexadoku” - I’d used “alphadoku”. We shall see in due course! M Sent from my iPad > On 24 Jun 2022, at 12:24, 'Mike Day' via Programming > wrote: > > Perhaps I was just unlucky, but I tried an iPad-type “share” to Documents, > which didn

Re: [Jprogramming] Sudoku16

2022-06-24 Thread &#x27;Mike Day&#x27; via Programming
Sorry, Brian. I thought I’d removed the h from solveh- the h was for Hui, but not relevant for the version I prepared for this example. I had another “solve” in a larger script. As for the dyadic version, the line below solve =: 3 : 0 , and before the : line, shows a default lhs argum

Re: [Jprogramming] detect number but survive also string input

2022-09-11 Thread &#x27;Mike Day&#x27; via Programming
Doesn’t “unsubscribe” in the subject field do the trick for you? If you’re really sure you want to leave us... M Sent from my iPad > On 11 Sep 2022, at 16:28, lb_tay...@charter.net wrote: > > Hello.Could you please remove me from this distribution list for > now?Thank you.Sallie > >-

Re: [Jprogramming] Viewmatnot functioning in IOS J

2022-09-19 Thread &#x27;Mike Day&#x27; via Programming
Confirming Raul’s observations on this iPad running J701 under iOS 12.5.5 . viewmat shows the circle, square and intermediate shape without problem, presumably as required, after copying from the email and pasting into the terminal screen, so Raul probably typed correctly. Also, same result u

Re: [Jprogramming] J blind spot

2022-10-21 Thread &#x27;Mike Day&#x27; via Programming
Getting off topic, but why don’t the new Fold primitives work in the iPad app, given it’s J9.03 beta-k? The info screen links to a NuVoc description. I tried the example starting with v=: dyad define z=. y + 0.01 z [smoutput x ; 'v' ; y ; '-->' ; z ) ….. Pasting into a new script and ru

Re: [Jprogramming] J blind spot

2022-10-22 Thread &#x27;Mike Day&#x27; via Programming
that the foldr script is missing, didn't it? >> >> Henry Rich >> >> >> On Fri, Oct 21, 2022, 6:49 PM 'Mike Day' via Programming < >> programm...@jsoftware.com> wrote: >> >>> Getting off topic, but why don’t the new Fol

[Jprogramming] Odd behaviour in direct definition of a noun in “Jios” (J903 beta-k)

2022-10-30 Thread &#x27;Mike Day&#x27; via Programming
It’s a moot point whether this should be under programming or beta; it looks as if it’s the j engine rather than Ian’s amazing new iOS implementation. In Jios for iPad: NB. A toy example foo =: {{)n abcd efgh }} foo NB. Expecting two rows… abcd efgh LF cut foo NB. And two boxes…

Re: [Jprogramming] Odd behaviour in direct definition of a noun in “Jios” (J903 beta-k)

2022-10-30 Thread &#x27;Mike Day&#x27; via Programming
ote: > > What's in the small box? (Do you have 13{a. in foo?) > > Thanks, > > > -- > Raul > >> On Sun, Oct 30, 2022 at 1:32 PM 'Mike Day' via Programming >> wrote: >> >> It’s a moot point whether this should be under programming or bet

Re: [Jprogramming] Avoiding J crash

2022-12-02 Thread &#x27;Mike Day&#x27; via Programming
If .../bin/jbreak.bat doesn’t work, I use Task Manager to “end task”. Forgive me if This is blindingly obvious, but you didn’t mention it! Cheers, Mike Sent from my iPad > On 2 Dec 2022, at 10:53, Richard Donovan wrote: > > Hi! > > Is there any way to avoid the situation whereby by er

Re: [Jprogramming] Avoiding J crash

2022-12-02 Thread &#x27;Mike Day&#x27; via Programming
Sorry, I didn’t spot Elijah’s reply. M Sent from my iPad > On 2 Dec 2022, at 11:58, Mike Day wrote: > > If .../bin/jbreak.bat doesn’t work, I use Task Manager to “end task”. > Forgive me if > This is blindingly obvious, but you didn’t mention it! > > Cheers, > > Mike > > > > Sent from

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

2022-12-02 Thread &#x27;Mike Day&#x27; via Programming
LF2 ... new to me! I was a bit thrown by the parsing of the trivial example being different from that for the data file; however that's likely a by-product of copy&paste on the example versus downloading the file. Anyway, I wasn't expecting LF,LF (or LF2); the usual LF cut ... missed the e

Re: [Jprogramming] Questions about Advent of Code Day 2

2022-12-02 Thread &#x27;Mike Day&#x27; via Programming
I encoded both ABC & XYZ as 0 1 2 and used 3x3 score-tables, different ones for each part, 0 _1 _2 |."0 1 ] 3 6 0 for pt 1, 0 1 2 |."0 1 ] 3 1 2 for pt 2 There was an extra item to add in each part, corresponding to the chosen play, rock/paper/scissors, in pt 1, and the specified result, l

<    1   2   3   4   5   6   >