On Sat, Jul 2, 2022 at 12:21 PM Jacques Bailhache
wrote:
> but I don't see how to implement the combinator S.
> It must satisfy :
> ((S ap a) ap b) ap c = (a ap c) ap (b ap c)
Here's one approach:
ap=: {{ ({. {{ x`:6 y }} }.) x,y }}
I=: ]`''
K=: {{ if. 1<#y do. 1{.y else. K`y end. }}`''
S=: {{
To close the loop as to why I asked this question I have attached the graphics
program. It is simple. It uses the windows driver in J and the isigraph and gl2
to create a window using the toucan.bmp bitmap that comes with J as the
background. It starts displaying a single panel and when you resi
Edward Cherlin Paper
Pure functions in APL and J
https://dl.acm.org/doi/10.1145/114055.114065
Jared.
On Sat, Jul 2, 2022 at 12:21, Jacques Bailhache
wrote:
> I am trying to implement combinatory logic in J. I succeeded for
> combinators I and K :
>
> ap =: 4 : 'x @.(]@1) y'
> I =: ]`]
> I ap
I am trying to implement combinatory logic in J. I succeeded for
combinators I and K :
ap =: 4 : 'x @.(]@1) y'
I =: ]`]
I ap 5
5
K =: ]`(3 : ']`(]@y)')
(K ap 6) ap 8
6
but I don't see how to implement the combinator S.
It must satisfy :
((S ap a) ap b) ap c = (a ap c) ap (b ap c)
Is
what you are looking for?
Henry Rich
On 7/2/2022 10:42 AM, Ewart Shaw wrote:
Thanks Raul; sorry for being unclear about my Wiki markup difficulties.
I thought there was a command on the old J Wiki, something like [[Date]],
to show the current date (of modification/publication), but m
Pascal is right, after a small expansion:
If your modifier does not use explicit x or y, then it can return either
verbs or modifiers. (the returned entities need not be tacit)
Details at
https://code.jsoftware.com/wiki/Vocabulary/com#Defining_a_Modifier
Henry Rich
On 7/2/2022 10:35 AM, 'P
Thanks Raul; sorry for being unclear about my Wiki markup difficulties.
I thought there was a command on the old J Wiki, something like [[Date]],
to show the current date (of modification/publication), but maybe not. In
any case, as you say, it would be redundant now.
I might follow up in the gen
modifiers ((A)dverbs and (C)onjunctions) can return any form of speech (N V A
C) Though only have N or V arguments.
in terms of tacit definitions for modifiers,
thendouble =: +:@: NB. adverb
For modifier there is one form of explicit definition that can be distinguished
as semi-tacit: If y
P.S. beware email line wrap. Here's those last two definitions
rephrased to hopefully avoid line wrap issues:
editurl=: {{
'https://code.jsoftware.com/mediawiki/index.php?action=edit&title=',y
}}
wikisrc=: {{
t=. '-sL' gethttp editurl y
rplc&('<';'<';'&';'&');'textarea' innerhtmls t
}}
I ho
On Sat, Jul 2, 2022 at 5:15 AM Ewart Shaw wrote:
> In my dotage I've forgotten how to edit the J Wiki pages (for example, how
> to produce the editing date). Is there a guide, either within the J Wiki or
> externally? Many thanks.
I'm not quite sure what you're asking for here.
At the bottom of
Adverbs and conjunctions can (depending on their definition) produce a
noun, verb, adverb or conjunction.
Of course, for this to be manageable, you should probably document the
purpose of any such adverb or conjunction.
The : conjunction is an example of this. (And the !: conjunction is an
exampl
(><]) value
can be expanded to
(> value) < (] value)
which yields 0 (“false”) for any unboxed real value
(> (<])) value
can be expanded to
(value > (<])) value
and in turn to
value > (<]) value
and finally to
value > value < ] value
but value < ] value evaluates to the same as (><]) value above
Once you surround 3 verbs by ( ) you have defined a ‘verb train’ (called a fork
for 3 verbs).
The definition of a monadic fork is:
(f g h) y <==> (f y) g (h y)
Consider:
( + , * ) 123
123 1 NB. Ie (+123),(*123)
In your case:
(><]) 123
0NB. A
According to https://www.jsoftware.com/help/dictionary/d020.htm :
Open is the inverse of box, that is, ><]) 123
0
(>(<])) 123
1
How do you explain I get different results ?
--
For information about J forums see http://www.jsoft
If I understood correctly :
- A monad applies to a noun and produces a noun
- A dyad applies to two nouns and produces a noun
- An adverb applies to a verb or a noun and produces a verb
- A conjunction applies to two verbs or nouns and produces a verb
but does there exist something that produce
I've finally updated my basic J utilities page:
https://code.jsoftware.com/wiki/User:Ewart_Shaw/Utils
About half-way down the page is a script to produce examples of the
utilities.
In my dotage I've forgotten how to edit the J Wiki pages (for example, how
to produce the editing date). Is there a g
NB. Bill Lam fixed my overapplication of the stitch operator
NB. that fixes the transpose issue I was having with my original
NB. Solution
NB. my way:
,./;"1(3 2$"1(3 2$http://www.jsoftware.com/forums.htm
On Fri, Jul 1, 2022 at 11:51 PM Elijah Stone wrote:
> 8$"1]8$i.4 4
That's a nicer approach than mine and, with a minor change, works for
arbitrary (clipped)0 tiling as the result can be interpreted as
indices:
]k=: ?.3 3$100
94 56 8
6 85 48
66 96 76
(,k){~8$8$"1 i.$k
94 56 8 94 56
18 matches
Mail list logo