It looks as if you don't appreciate the action of " &. " The
dot/period/full-stop is
significant. Whereas & is bond/compose, &. and &.: are both
"Under(Dual) " .
NuVoc says (http://code.jsoftware.com/wiki/Vocabulary/ampdot)
[x] u &. v y
executes v on the argument (s) cell by cell
. for each
Memory failure again...
Mike
On 27/02/2018 11:37, R.E. Boss wrote:
-Original Message-
From: Programming [mailto:programming-boun...@forums.jsoftware.com]
On Behalf Of 'Mike Day' via Programming
Sent: dinsdag 27 februari 2018 11:31
To: programm...@jsoftware.com
S
I think the recon verb needs a check on whether there are any improvements.
Anyway, here are my tries.
fwalg is the unadorned minimum distance algorithm, fwtree the same with the
additional bits to provide the tree, and fwpath and fwpatht use the tree to
return required paths.
NB. input y = g
Sorry for a partial message just now - I was editing and pressed send
by mistake!
Raul's obviously done a lot on this - I'd been drafting something, so I'll
send what I was working on.
I think the recon verb needs a check on whether there are any improvements.
Anyway, here are my tries.
fwalg
AND AGAIN! Will get it right this time...
Sorry for a partial message just now - I was editing and pressed send
by mistake!
Raul's obviously done a lot on this - I'd been drafting something, so I'll
send what I was working on.
I think the recon verb needs a check on whether there are any improv
Sorry - pressed send instead of paste!
Trying again:
=
Hello Skip
Points:
0: is this the same Quora which keeps sending me e-messages with headers
such as
"What are the best things for Oxford students to do on weekends?"
"What i
Hello Skip
Points:
0: is this the same Quora which keeps sending me e-messages with headers
such as
"What are the best things for Oxford students to do on weekends?"
"What is the best and most prestigious English university nowadays?
Oxford? Cambridge?"
- both received yesterday/today!
1: A r
ming wrote:
Hi Mike,
Regarding point 1:, that was me, Jon Hough.
----
On Mon, 4/9/18, 'Mike Day' via Programming wrote:
Subject: Re: [Jprogramming] Quora Problem
To: programm...@jsoftware.com
Date: Monday, April 9, 2018, 5:33 PM
Hello Skip
ng
in your own set up?
On Mon, Apr 9, 2018 at 1:40 AM, 'Mike Day' via Programming <
programm...@jsoftware.com> wrote:
Ah! It's mildly annoying to only see oneself and others, such as you,
identified
only as Programming Forum! There doesn't seem to be any get-aro
eck the box.
I don't know why some Forum mails were anonymized and others weren't,
but after this change your messages display as coming from 'Mike Day'
via Programming.
Henry Rich
On 4/9/2018 11:10 AM, 'Mike Day' via Programming wrote:
Thanks, Chris
I think
The iPad’s help window doesn’t seem to include a delete feature.
je only gets a file up for editing, while jd only lists files, as far as I can
see.
I found that 1!:0 gives a unix ls-type listing, which is useful.
So I thought 1!:55 might work for deleting scripts, etc. However, it returns a
I use this script...
rbdel
3 : 'do ''ferase ''''~user/'',y,''.ijs'''''''
eg rbdel 'fred'
Rob.
On 14 Apr 2018, at 17:16, 'Mike Day' via Programming
wrote:
The iPad’s help window d
Similar here, London (UK), using Safari on iPad, at ca 1:20 pm BST,
Mike
Please reply to mike_liz@tiscali.co.uk.
Sent from my iPad
> On 17 Apr 2018, at 11:48, Ian Clark wrote:
>
> The J wiki has been inaccessible to me in England all morning, either on
> Firefox or Safari. I get a
Sorry - a trivial response, but might be of use.
Just started this up. Did
load'jd'
and
jdrt'' NB. list tutorials
as suggested.
I thought J had hung, and was wondering what to do when the following
message appeared, after a minute or three:
"building demos - takes time"
It might
s. But this seems overkill.
>
> My old win7 laptop it takes less than 15 seconds to build the demos.
>
> Did it really take 'a minute or three'?
>
> Unless others raise this issue, we'll let it rest.
>
> Meanwhile, now that your demos are built, I hope y
Oh ... I'd already replied to your previous reply, having thought you'd have
thought about we 'msgs' !
Mike
Please reply to mike_liz@tiscali.co.uk.
Sent from my iPad
> On 17 May 2018, at 22:21, Eric Iverson wrote:
>
> Mike,
>
> Chris has pointed out that doing wd'msgs' will get the
Similar here for an avx machine, running Windows 10,
with processor: AMD A10-7300 :-
JVERSION
Engine: j807/j64/windows
Beta-e: commercial/2018-05-25T12:07:57
Library: 8.07.15
Qt IDE: 1.7.1s/5.9.5
Platform: Win 64
Installer: J807 install
InstallPath: c:/d/j807
Contact: www.jsoftware.com
My twopenn'th, while we're home, briefly...
It seemed best to prepend throwaway extra values to ensure the
appropriate assignment of wins and losses. The Kelly method
doesn't consider the cases of zero wins and/or losses!
kf =: 3 : 0 NB. quite similar to Devon's versions
returns =. y
m
You probably already know all this, Jim!
Mea culpa, I only use JHS occasionally, for the purpose of transferring
scripts
between this Windows laptop and my iPad.
So to get a script from the laptop to the iPad:
0) I've got a small script ~user/myserver.ijs; here it is:
myserver =: 3 : 0
Russell' via Programming wrote:
Thank you very much Mike; you would be astounded at how little I already know.
Your input is appreciated.
On Aug 2, 2018, at 4:55 AM, 'Mike Day' via Programming
wrote:
You probably already know all this, Jim!
Mea culpa, I only use JHS occas
How about these snapshots?
q =: 21, 38, 55, 106
}.+/\inv q NB. 1st differences
21 17 17 51
+./}.+/\inv q NB. gcd of 1st diffs
17
NB. or
2 -/\ q
_17 _17 _51
+./2 -/\ q
17
17|q NB. So, what is the required offset?
4 4 4 4
17%~ q-4 NB. what are the required factors
Spot the non-deliberate editing error!
M
On 14/08/2018 16:16, Mike Day wrote:
How about these snapshots?
q =: 21, 38, 55, 106
}.+/\inv q NB. 1st differences
21 17 17 51
+./}.+/\inv q NB. gcd of 1st diffs
17
NB. or
2 -/\ q
_17 _17 _51
+./2 -/\ q
17
17|q NB. So, wha
It should work on arrays of the form
a + b * i, where a and b are integer scalars, and i is an integer vector.
So, if
q=: 6 + 7*1 2 5 11 23,
applying this function yields
(-/ .* % -/ .+)@:(2 2&$) q
7.4
I think you need instead something like
Difference’s greatest common divisor,
integers. Am I wrong?
>
>
> On Tue, Aug 14, 2018 at 7:00 PM, 'Mike Day' via Programming <
> programm...@jsoftware.com> wrote:
>
>> It should work on arrays of the form
>> a + b * i, where a and b are integer scalars, and i is an integer
>&
>>>
>>> —
>>> Raul
>>>
>>> On Tuesday, August 14, 2018, Jose Mario Quintana <
>>> jose.mario.quint...@gmail.com> wrote:
>>>
>>>> After I saw your message I searched for the particular Quora problem
>> and
>&g
Sorry, I haven’t been following this work, but I’m now wondering where these
materials may be found. Thanks for any links,
Mike
Please reply to mike_liz@tiscali.co.uk.
Sent from my iPad
> On 19 Aug 2018, at 22:46, Brian Schott wrote:
>
> Henry,
>
> I assume you also mean like thes
hades_of_J/Editing_Guidelines
> Judging by how over my head they are, I conclude they are excellent!
>
>> On Aug 19, 2018, at 6:00 PM, 'Mike Day' via Programming
>> wrote:
>>
>> Sorry, I haven’t been following this work, but I’m now wondering w
Thanks, Eric
Puzzlement rather than problem, I hope.
So I've just downloaded the new zip for windows 64, overwriting my
existing J807 files and folders.
Absent-mindedly I then opened JQt before updating JQt, realised I should
have done the latter, so
closed the JQt session, and then ran the
Apologies re my earlier msg, below... it looks as if I’d inadvertently run two
jqt updates concurrently, so I expect there was some conflict. Anyway, jQt
seems to be ok.
Thanks,
Mike
Please reply to mike_liz@tiscali.co.uk.
Sent from my iPad
> On 24 Aug 2018, at 20:39, 'Mike
Does this help?
Each line is a small amendment to the preceding one...
(-:@(+/))3 4 5NB. Semiperimeter, s
6
(-:@(+/)-0&,)3 4 5 NB. s - 0, a, b, c
6 3 2 1
(-:@(+/)*/@:-0&,)3 4 5 NB. s * (s - a) * ...
36
(-:@(+/)%:@(*/)@:-0&,)3 4 5 NB. Heron’s formula applied to 3 4 5
6
(-:@(
ument.
Cheers,
Mike
On 04/09/2018 23:11, Martin Kreuzer wrote:
@Mike
Yes, it does help, as
it is a sort of eye-opener, rephrasing the fourth factor (s) as (s-0),
and
it answers my (yet un-uttered) question about "m14".
-M
At 2018-09-04 13:46, 'Mike Day' via Programmin
I don’t think that’s Linda’s problem here.
Rather, she has S2 -y which will yield _6
*/ S2 - y is still _6
So(S2 y) * */ S2 - y gives _36, and we
end up with root(-36)
In general, the absolute value of taher2 is incorrect.
eg,
taher2 5 12 13 NB. Should be 30
0j8.75
Mike
Plea
ok-ish on iPad J701 too. Well, no system crash, anyway:
VERSION_j_
701.1 2
,./a.
bad utf8 characters in output
just out of curiosity, not need!
Mike
Please reply to mike_liz@tiscali.co.uk.
Sent from my iPad
> On 6 Sep 2018, at 14:38, Henry Rich wrote:
>
> I tried ,./
that result would occupy 5.7896e76 bytes.
Thanks,
-- Raul On Thu, Sep 6, 2018 at 12:01 PM bill lam
wrote:
crashed on jandroid.
On Thu, Sep 6, 2018, 11:05 PM 'Mike Day' via Programming <
programm...@jsoftware.com> wrote:
ok-ish on iPad J701 too. Well, no syst
a couple of seconds.
hhr
On 9/6/2018 12:40 PM, 'Mike Day' via Programming wrote:
OK - Devon later explained he meant ,:/ a.
FWIW, trying that expression on the iPad yields:
VERSION_j_ NB. iPad iOS 11.4.1
701.1 2
$,:/a.
|out of memory
| $ ,:/a.
So it terminates grace
Fair enough, it looks neat, but doesn't deal with Martin Kreuzer's
original requirement to apply
s just the once, ie how should we handle the intermediate result, s?
On the other hand, David Lambert and others propose variations on how to
factor the formula so
as to use the result of s.
It'
Yes, although I thought the non-f. version showed s happened to be
"saved" on this occasion...
Mike
On 07/09/2018 15:17, Raul Miller wrote:
You can always find cases which optimizing compilers don't deal with
(because there's infinities of those).
That said, in this case, I think it's worth
Agreed on the "strong hint" in herona below. I got into that habit
years ago in Fortran
And Sorry for the unintentional extra characters. (I'm seeing
A-circumflex where I'd typed space!) Just as well we're not talking APL!
Mike
On 08/09/2018 09:40, Martin Kreuzer wrote:
@Linda
I think
,000. With a loan of $12,000 at 5.75
interest for 20 years. As a tenured teacher and a woman no bank would give
me a mortgage but for 20 years I payed the previous woman owner $87.77. At
the last payment it just so happened that I sold it.
Linda
-Original Message-
From: Programmin
$12,000 at 5.75
interest for 20 years. As a tenured teacher and a woman no bank
would give
me a mortgage but for 20 years I payed the previous woman owner
$87.77. At
the last payment it just so happened that I sold it.
Linda
-Original Message-
From: Programming On Behalf
Of &
NB. I've purged most of the earlier posts (below)
Martin Kreuzer's original question was how to handle intermediate results!
Anyway, staying off topic for now, Ric's tongue-in-cheek proposal is
"explicit",
but perhaps you wanted something more so, Linda.
He's got a point, though - would you
... so were those explicit verbs that Raul and I developed from Ric’s pmt
irrelevant? Raul gave application-relevant names such as principal, to
intermediate results, in a fully “explicated” form, while I was less
ambitious, assigning a what-it-does name, incrtot for (1+r)^t .
I just don’t
Recycling what I've already offered:
NB. single-line (with luck!) explicit form:
pmtex =: 3 : 'b * r * incrtot % <: incrtot =. t^~ >: r =. 1200 %~ {. ''r
t b'' =. y'
NB. in case line-wrapping spoils the above,
NB. here's a version avoiding unnecessary spaces:
pmtex0sp =: 3 : 'b*r*incrtot%<:in
I confess to carelessness in replying/commenting to/on some messages recently.
It’s easy to overlook their length.
Anyway, if and when I spot loads of indents, I try to delete earlier
contributions, in which case I add a remark that I’ve “snipped” some
correspondence.
Mike
Please reply to m
This thread has come a long way!
Anyway, as someone who aims for neat tacit verbs but usually fails and
mainly uses explicit ones, and is pretty vague about adverbs, and could
perhaps learn something useful from your insights, where can I find
your Wicked Tookit?
I do have a saved script, n
I was going to have a look back at my old workings from when I was actually
involved professionally in thinking about meta-stats, but you've evidently
found something useful while we were having supper!
Let me know if you think it might still be useful, always assuming I
can find
anything rel
ec 14, 2015 in the programming forum.
Skip
On Thu, Sep 20, 2018 at 10:36 AM 'Mike Day' via Programming <
programm...@jsoftware.com> wrote:
This thread has come a long way!
Anyway, as someone who aims for neat tacit verbs but usually fails and
mainly uses explicit ones,
. Devon's "data" as 2 sets
17 64.8236 26.4226
2 3 $ 5 51.4 23.6072 12 70.4167 26.3972 NB. as table of with rows
5 51.4 23.6072
12 70.4167 26.3972
nmscomb 2 3 $ 5 51.4 23.6072 12 70.4167 26.3972 NB. process table
17 64.8236 26.4226
Any use?
Mike
On 20/09/2018 18:01,
er the alternative to avoid
recalculations is juggling intermediate results with hooks and forks or
using boxes, is just to recalculate.
On Thu, Sep 20, 2018 at 3:33 PM, 'Mike Day' via Programming <
programm...@jsoftware.com> wrote:
Yes, I know - that's where I was looking for
wrote:
Thanks to everyone who responded.
Mike, I like your technique of returning output in the form of input for a
future iteration.
On Thu, Sep 20, 2018 at 6:22 PM 'Mike Day' via Programming <
programm...@jsoftware.com> wrote:
It's likely my old stuff was in APL.
But f
B. I know, I know
RunWT''
test=. u@:(1 + u) Adv
%: test
%:@:(1 + %:)
┌──┬──┬┐
│%:│@:│┌─┬─┬──┐│
│ │ ││1│+│%:││
│ │ │└─┴─┴──┘│
└──┴──┴┘
(%: test)(^: _) 0
1.49022
Moreover, I ran the script many times (using Ctrl+A followed by Ctrl+E
repeatedly
fwiw, trying this in a new instance of JQt, the first line worked
fine, as you'd expect.
I then tried the rhs of the equivalence test:
((i. 5) +/ (5 * i. 500)) <@:{"1 _ yy =. 2500 $ 3 1 4 1 5 9x
and that was fine too.
But, the session window hung and then terminated running this lhs,
(yx Redu
You should be able to edit the shortcuts’ properties, select the icon box,
browse to the icons folder in your installed j folders, and choose from those
displayed.
Mike
Please reply to mike_liz@tiscali.co.uk.
Sent from my iPad
> On 27 Sep 2018, at 03:03, Linda Alvord wrote:
>
> I
Thanks, Linda
No problems under Windows 10 in JQt 807.
I'm no good at Bridge, but might be persuaded to play whist!
If we want to choose Whist or Bridge, we need to specify the
size of a hand. In either case, you can use draw from the row-count
of deck rather than the product of x.
This co
Sorry for previous - pressed Send instead of Edit!
Thanks, Linda
No problems under Windows 10 in JQt 807.
I'm no good at Bridge, but might be persuaded to play whist!
If we want to choose Whist or Bridge, we need to specify the
size of a hand. In either case, you can use draw from the row-c
her than ?)
7 (]<"2 @: {~ \:~"1 @: ((4 , [) ($ ? ~@:#) ])) deck
┌──┬──┬──┬──┐
│♥A│♠K│♠A│♠T│
│♥T│♠4│♠Q│♠5│
│♥2│♦5│♠8│♥J│
│♦T│♦4│♠6│♦9│
│♣Q│♦2│♥K│♦8│
│♣3│♣A│♥7│♣K│
│♣2│♣T│♦J│♣6│
└──┴──┴──┴──┘
Use lh arg of 13 for Bridge Hands.
The down-sort is now intuitive, and we don't need to reverse eac
r hand to their own liking.
>
> Linda
>
>
> Sent from my Verizon, Samsung Galaxy smartphone
>
>
> Original message
> From: 'Mike Day' via Programming
> Date: 10/14/18 1:45 PM (GMT-05:00)
> To: programm...@jsoftware.com
> Subje
Yes, that's a nice example of J, although that example leaves each hand
in its shuffle order. The Rosetta task doesn't require reordering
within hands.
No advance on the J front hereafter, just a link to a Bridge fan's view.
This site claims (I think) to display any possible Bridge deal (!):
From: 'Mike Day' via Programming
Date: 10/14/18 1:45 PM (GMT-05:00)
To: programm...@jsoftware.com
Subject: Re: [Jprogramming] Shuffle and deal 4 bridge hands
Sorry - getting rather chatty, not much J -
your deck, Linda, has faces increasing within decreasing suits, given
that Brid
FAO Linda:
results from ? are "random", if only in yielding different results each time.
Results from ?. , however, yield the same results on each call. I believe
this
feature is designed for testing purposes, and not recommended for clinical
trials, nor
for Bridge or Poker or Whist or Rum
Bo beat me to it!
FWIW, here's a slightly different way to do this if you avoid
or don't know about +. or the + key is broken! -
with a cursory examination of performance:
ts =: 6!:2 , 7!:2@] NB. time & space
ix =: ([ -. -.) NB. set intersection
1 2 3 4 ix 3 4 5 6 7 NB. eg...
3 4
I seem to have raised a hare in my reply to Skip's original post on 23/10.
I defined a convenient one-liner for intersection,
ix =: ([ -. -.) NB. set intersection
as it was sufficient to the discussion - I wanted to reinforce the idea
that
it was better to take the gcd of the list.
iPod?
Yes, that's also happened for me very occasionally - in J701 on the iPad.
Not under iOS12, as far as I recall, but that's probably not relevant.
So what does "open 'stdlib' " do on your iPad? I don't recognise it
as a J action... Or did you type something quite different?
Mike
On
Some extraneous vertical bars have appeared after sending the following.
Please ignore any vertical, possibly grey, bars in " |∩ | "
Partly why KEI & Roger wrote J.
Mike
On 25/10/2018 18:56, 'Mike Day' via Programming wrote:
I seem to have raised a hare in my reply to
/wiki/Vocabulary/slashco , which said:
> View definition(s) by entering in the J session: open'stdlib'
> I finally decided that sort_z_ would been he easier approach. But I still
> don’t know why /: isn’t giving me what I want.
>> On Oct 25, 2018, at 2:17 PM, 'Mik
iki page to clarify that `open` only
applies to JQt.
I've also added a link to the page of the User manual that describes the
Standard Library in more detail.
On Fri, Oct 26, 2018 at 12:13 PM 'Mike Day' via Programming <
programm...@jsoftware.com> wrote:
I'd forgotten abo
RE Boss has just beaten me to it, but before I read his contribution,
here's a fairly
idiomatic tacit, might well be in stdlib under some name (?).
The definition is followed by doing "run selection" (crtl-E) in JQt on a
copy
of your Examples, so your answers are also interpreted to show I'm n
---Oorspronkelijk bericht-
Van: Programming Namens 'Mike Day'
via Programming
Verzonden: donderdag 25 oktober 2018 19:56
Aan: programm...@jsoftware.com
Onderwerp: [Jprogramming] Set Intersection - was Re: Common factors
I seem to have raised a hare in my reply to Skip's origina
Ok, just seen you need boolean, so better to have
ssm =: +./@E.
Sorry for that,
Mike
Please reply to mike_liz@tiscali.co.uk.
Sent from my iPad
> On 26 Oct 2018, at 09:15, 'Mike Day' via Programming
> wrote:
>
> RE Boss has just beaten me to it,
Posisbly the only virtue of this offering is that it's different from
Kenneth's!:
va =: - (|."0 1) 1 ,. 0 $~ 9 ,~ # NB. !!!
va 1 2 3
0 1 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0
va 0 3 7
1 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 1 0 0
Mike
On 29/10/2
; 0 1 0 0 0 0 0 0 0 0
> 0 0 1 0 0 0 0 0 0 0
>
> Thanks,
>
> --
> Raul
> On Mon, Oct 29, 2018 at 2:37 PM 'Mike Day' via Programming
> wrote:
>>
>> Posisbly the only virtue of this offering is that it's different from
>> Kenneth's!:
&
0 0 0 0 0 0
> 0 0 1 0 0 0 0 0 0 0
>
> Thanks,
>
> --
> Raul
> On Mon, Oct 29, 2018 at 2:37 PM 'Mike Day' via Programming
> wrote:
>>
>> Posisbly the only virtue of this offering is that it's different from
>> Kenneth's!:
>>
&g
dverb (]})
>>
>> Yeah, rotate has some fun possibilities, as does take. For example:
>>
>> V=: (10 {. - {. 1:)@>:
>> V 0 1 2
>> 1 0 0 0 0 0 0 0 0 0
>> 0 1 0 0 0 0 0 0 0 0
>> 0 0 1 0 0 0 0 0 0 0
>>
>> Thanks,
>&
I had a look at using my earlier offerings, ix and u, which I'd
observed to be non-commutative in my note of around 25 October.
The best derivations I found were
ixcom =: ix #/@:|:@:(<./"3)@:((~. ,.~ #/.~)@:/:~&>)@:; ix~
ucom =: u #/@:|:@:(>./"3) @:((~.,.~#/.~)@:/:~ every )@:; u~
which di
NB. I've omitted Jose's rather lengthy original posting to save space.
Re Linda's quoted Fibonacci verb,
13 :',(([:+/\|.)^:2)^:(<`(1,1:))y'
I couldn't understand it until I checked the vocabulary entry for ^:
a) u ^: (
Sorry about the post in the wrong thread.
There should be some "Y combinat
or this variant?
f(1 i.~"1+./@E.~&> /)s. NB. f & s obvious?
0 0 1 2
This lists the index of the first instance of a substring of each element of
fullNames in the
shortNames boxed list. It assumes it's there somewhere, but you can use the
property
that non-inclusion is shown by index = len
┐
│3│:│1{"1([:+/\|.)^:(<:i.y)1 1│
└─┴─┴─┘
Linda
-----Original Message-
From: Programming On Behalf Of 'Mike
Day' via Programming
Sent: Monday, November 12, 2018 1:59 PM
To: programm...@jsoftware.com
Subject: Re: [Jprogram
This is iterative rather than recursive, and exploits the gerund form
of dyadic power,
whose usage I'm still learning:
x u^:(v0`v1`v2)y ↔ (x v0 y)u^:(x v1 y) (x v2 y) NB. from the
Vocabulary
Here we have:
u =: (2 4 <:@* ])@{:@] NB. generate next TWO terms given the first
one or two.
As I said earlier, if you’re content with restriction to positive integers, you
can use the (temporary) sign as a parity flag.
Here’s an explicit form:
fe =: 4 : '|(-@<:@+:)^:( On 27 Nov 2018, at 15:25, Raul Miller wrote:
>
> It's more like this, actually:
>
> seqodd=: +: - 1:
> seqevn=: +:
Yes, this is one way to get high terms without having to evaluate all
their predecessors.
Bear in mind that it's calculating 2^n twice, and the zero-th term
should surely be the
starting value. Also, it assumes that starting value is 4; just change
"4" to "x" in the
13 : ... expression to ma
This same idea can be implemented in Mathematica as:
>
> In[1]:= FoldList[2 #1 + #2 &, 4, {-1 , 1 , -1 , 1, -1}]
> Out[1]= {4, 7, 15, 29, 59, 117}
> ____
> From: Programming on behalf of
> 'Mike Day' via Programming
> Sent: Wedn
Yes, sorry... transcription problem. As I said, it does x + 2y,
Mike
Please reply to mike_liz@tiscali.co.uk.
Sent from my iPad
> On 29 Nov 2018, at 10:31, Martin Kreuzer wrote:
>
> Mike -
> (having followed only loosely) shouldn't this 'hook' read
> h=: + +:
> ?
> -M
>
> At 2018-11
Well, there's no need to apply N Y to zero!
So, for example,
N Y"0] 1 1 2 3 5 8
1 1 1 2 5 21
N Y 20
6765
It took me a while to understand N Y , as I was confusing the right
argument,
the index i of an element ai in the sequence, a0 a1 a2 ... ai ..., with
its value.
N Y actually execut
That’s the one I always use, too,
Mike
Please reply to mike_liz@tiscali.co.uk.
Sent from my iPad
> On 30 Nov 2018, at 19:31, Raul Miller wrote:
>
> Or, slightly longer:
> ($a)#:I.,a
> or
> ($#:I.@,)a
>
> ...
>
> Thanks,
>
> --
> Raul
>
>> On Fri, Nov 30, 2018 at 2:04 PM Don G
OK - I bit. Prob 1 part 1 is easy-peasy, but it took me at least quarter of an
hour to copy n paste the 1000 data points to a J quasi-script on this iPad.
After typing this far in this message, I thought I ought to have a look for
myself, and rediscovered gethttp. It's necessary on the iPad to
Thanks, Bill, but it doesn't appear to be available in iOS:
r=. 2!:0'curl -s -o - https://adventofcode.com/2018/about'
|interface error
| r=.2!:0'curl -s -o - https://adventofcode.com/2018/about'
Cheers,
Mike
Please reply to mike_liz@tiscali.co.uk.
Sent from my iPad
> On 1
I think I was still logged in.
Here's another crack at using curl, in a J701 session on this iPad, trying to
access a site which doesn't require a login:
r=. 2!:0'curl -s -o - http://rosettacode.org/wiki/Zeckendorf_arithmetic'
|interface error
| r=.2!:0'curl -s -o - http://rosettacode
It looks as though that foreign doesn’t work. The vocabulary does say “unix
only”!
Thanks again, Bill,
Cheers,
Mike
Please reply to mike_liz@tiscali.co.uk.
Sent from my iPad
> On 1 Dec 2018, at 13:02, bill lam wrote:
>
> 2!:0 'uname'
> 2!:0 'true'
> 2!:0 'date'
--
Also...
I’ve just discovered this global in the wgethttp locale:
HTTPCMD_wgethttp_
curl
So gethttp is trying to use curl. Or it would, but the verb gives up before
trying, as it first tests whether the string starts with ‘http://‘, returning
with the caution,
'only http:// supported'
Sorry, Bill, I think I misled you - 2!:0 does work in iOS - it's only
2!:1 for which
the Vocab says "only unix" - for 2!:0, it says "not Windows".
As for downloading AOC data files, it looks as if I'll have to stick to
using
this Windows Laptop,
Cheers,
Mike
On 01/12/2018 14:57, bill lam
Does this help?
<\i.4
+-+---+-+---+
|0|0 1|0 1 2|0 1 2 3|
+-+---+-+---+
<\.i.4
+---+-+---+-+
|0 1 2 3|1 2 3|2 3|3|
+---+-+---+-+
<\.|.i.4
+---+-+---+-+
|3 2 1 0|2 1 0|1 0|0|
+---+-+---+-+
Mike
On 04/12/2018 07:50, Linda Alvord wrote:
H
1 3│2 3│
> │1 4│3 5│
> │1 5│5 8│
> │1 6│8 13│
> └───┴────┘
> Linda
>
> -Original Message-
> From: Programming On Behalf Of
> 'Mike Day' via Programming
> Sent: Tuesday, December 4, 2018 4:04 AM
> To: programm...@jsoftware.com
> Subject: Re:
The inputs aren’t identical, though, once you get to 1 2.
[:+/\| is window-dressing for sum=: +/\, while sumr =: [:+/\|. sums the
reverse of its input.
So,
(sum ; sumr) 1 2
+---+---+
|1 3|2 3|
+---+---+
Does that solve the mystery?
Mike
Please reply to mike_liz@tiscali.co.uk.
Se
gt;> │1 1│1 1│
>> │1 1│1 1│
>> │1 1│1 1│
>> │1 1│1 1│
>> └───┴───┘
>> (([:+/\|)^:(i.6)1 1);([:+/\|.)^:(i.6)1 1
>> ┌───┬┐
>> │1 1│1 1│
>> │1 2│1 2│
>> │1 3│2 3│
>> │1 4│3 5│
>> │1 5│5 8│
>> │1 6│8 13│
>> └───┴┘
>> Linda
That’s the “4-permutations”, but Skip wants all 1-, 2-, 3- and 4-perms.
Mike
Sent from my iPad
> On 6 Dec 2018, at 12:14, Linda Alvord wrote:
>
> 1 2&p.&.> 1 2 3 4 perm each 4
--
For information about J forums see http://www
This was my take, don’t have time to check whether it duplicates/plagiarises
others’ offerings. Apologies for poor formatting from iPad.
allpermofallsize =: ;@(<<"1@:{~ each(perm ~ each >:@i.) @#)
#allpermofallsize 1 3 5
15
10 {. allpermofallsize 1 3 5
+-+-+-+---+---+---+---+---+---+-
Reposting to correct the inadvertently changed thread head.
I should have pointed out that my suggestion works for an arbitrary vector. I
chose a triplet, 1 3 5 in order to limit the size of the output. So, also, for
example
_10{. allpermofallsize 'j807'
++++++++
Don’t we all get different data sets? My day 6 data is also 50 by 2, but
starts
195, 221
132, 132
333, 192
75, 354
and ends
258, 305
241, 157
117, 162
96, 301
Mike
Please reply to mike_liz@tiscali.co.uk.
Sent from my iPad
> On 10 Dec 2018, at 19:42, Brian Schott wrote:
>
> Jimmy,
I also get 3890 on “data6a”, as it appears listed in the message, below.
Here’s a list of all 27 non-infinite areas, though in a different order,
probably because I worked on the transposed example in order to reproduce the
regions shown in the example.
3 by 9 to avoid line-wrapping:
1899 2320
I think your difficulty might be in not recognising that the length of
the combination
vector, or the order of the tuple, representing the combination is a
property
of the input: Norman's expression for a combination (c0, c1,
c2...,c(r-1)) of r out
of n integers, where c(i) e. i.n , (AND c(i
201 - 300 of 583 matches
Mail list logo