Thank you, now I see what I was missing: “Adverbs operate on what comes before
them”. That makes sense now. Much appreciated.
> On Oct 10, 2021, at 1:43 PM, Adrien Mathieu
> wrote:
>
> It's 0. Adverbs operate on what comes before them.
> Adverbs and conjunctions can operate on verbs and noun
I understand. I was following LJ section 15.2. So in the console I typed: bc=:
<“
When I tried calling which works as <“0 y but must use 0 bc y
which totally confused me. Further down on that section I see that (quote):
The argument to be supplied to the conjunction can be a noun or a verb, and
It's 0. Adverbs operate on what comes before them.
Adverbs and conjunctions can operate on verbs and nouns. For instance, you
usually call u"v with u a verb and v a noun, but any noun/verb combination
has a meaning (it is not always the case). Sometimes, when the conjunction
acts specifically on no
Adrien has got this and I will let him answer your question.
BUT: if you are new to J, know that no one would write 0(<") in a normal
sentence. The natural form is <"0 .
Henry Rich
On 10/10/2021 4:33 PM, P Padilcdx wrote:
Thank you for the quick reply. Got the adverb part, thank you. But I’
Thank you for the quick reply. Got the adverb part, thank you. But I’m still
missing something fundamental. If u=< and C=“, V=uC in [x] v V y, what is v in
[x] u C v y when called as 0(<“)y? Thank you for your patience!
> On Oct 10, 2021, at 1:13 PM, Adrien Mathieu
> wrote:
>
> Hello,
>
> I
Hello,
I think there is a confusion. <" is not a hook, it's an adverb, because
< is a verb and " a conjunction, and so technically <" is a partial
application of a conjunction. More generally, if you have a conjunction
C, uC is the adverb V such that [x] v V y is [x] u C v y and, similarly,
C
J noob so pardon the noob question. As the subject indicates, I’m confused as
to how or why <“0 y turns into 0(<“)y when interpreted as a hook. Looked at the
Primer and LJ and they don’t really explain the jump between the “0 to the
left” and the “0 to the right” transposition when a hook. Any
I suspect that this is a quirk of the editline library.
--
Raul
On Tue, Jul 27, 2021 at 2:18 PM 'Rudolf Sykora' via Programming
wrote:
>
> Dear list,
>
>
> what is the reason that the 'space' character is coded as '\' '0' '4'
> '0' in the .jhistory file?
>
> (I know that \040 is the octal code
Thanks, Ruda,
+1 on this one; I got used to doing something like s/\\040/ /g
… and that’s a behavior to be blamed for
I hope there’s not a very good reason for retaining that coding.
Hauke
Am 27.07.21 um 20:18 schrieb 'Rudolf Sykora' via Programming:
Dear list,
what is the reason that the
Dear list,
what is the reason that the 'space' character is coded as '\' '0' '4'
'0' in the .jhistory file?
(I know that \040 is the octal code for a space, but in .jhistory there
really are 4 characters '\', '0', '4', '0' instead of just single
'space' character).
This makes the file less read
Yes, the big differences between 0!:0 and ". on unboxed arguments are:
". returns the noun result from the execution if there is one, 0!:0
always returns $~0 0
". requires a single sentence, 0!:0 allows newlines (and so can handle
multiple sentences including :0 definitions).
Thanks,
--
Raul
Oh! Duh. I was confused. (0!:0) directly executes the string (or file).
Much clearer now. Thank you.
Raul Miller wrote:
>example=: 3 :'echo 1'
>0!:0'example'
>0!:0'example 0'
> 1
>
> Put different: when you evaluate a bare name which references a verb,
> the result of that execution
example=: 3 :'echo 1'
0!:0'example'
0!:0'example 0'
1
Put different: when you evaluate a bare name which references a verb,
the result of that execution is the named verb. You have to give the
verb an argument to execute it.
Also:
a=. 3
0!:0'a'
a
3
0!:0'a=. 4'
a
(But, al
Say we have a file ~home/script.jis with the following contents:
a=. 'bar'
and start a J session:
a=. 'foo'
verb=. 0 :0
a=. 'baz'
)
a
foo
0!:0 http://www.jsoftware.com/forums.htm
Hi,
you can start with this excellent article by Eugene McDonnell :
https://www.jsoftware.com/papers/eem/0div0a.htm
Jimmy
On Mon, May 27, 2019 at 3:16 PM Eugene Nonko wrote:
> Hello,
>
> Can someone please explain this:
>
>0 % 0
>
> 0
>
> Thanks,
> Eugene
>
In addition, to Roger's link, these are similar.
https://www.jsoftware.com/papers/zero.htm
http://www.jsoftware.com/pipermail/general/2003-January/013868.html
[the latter contains a dead link, which I think is the former]N
--
For
Eugene, funny that you should ask, because _the_ explanation can be found
in https://www.jsoftware.com/papers/eem/0div0.htm .
On Mon, May 27, 2019 at 12:16 PM Eugene Nonko wrote:
> Hello,
>
> Can someone please explain this:
>
>0 % 0
>
> 0
>
> Thanks,
> Eugene
> ---
Hello,
Can someone please explain this:
0 % 0
0
Thanks,
Eugene
--
For information about J forums see http://www.jsoftware.com/forums.htm
Subject: Re: [Jprogramming] 0 : 0 Adverb
Since you'd want to have the verb as return value, you'd want to have an
adverb or conjunction. They both need operands to do a job.
I tried this with } instead of Tacify, but I guess it will just work as
well:
> foo =: (0 :) }
>
>
No way to have a single word, since a single word is just a value and is
not executed.
And I can't find a way to do it on 2 words when one is an adverb.
Henry Rich
On 3/18/2014 8:42 AM, Pascal Jasmin wrote:
from
http://www.jsoftware.com/jwiki/PascalJasmin/Multiline%20tacit%20expressions%20wi
Since you'd want to have the verb as return value, you'd want to have an
adverb or conjunction. They both need operands to do a job.
I tried this with } instead of Tacify, but I guess it will just work as
well:
>foo =: (0 :) }
>
>0 foo
>123
>)
>(49 50 51 10{a.)}
I think this should equal
from
http://www.jsoftware.com/jwiki/PascalJasmin/Multiline%20tacit%20expressions%20with%20macros
test =: 0 : 0 Tacify
( +/
x % y 13 MACdef NB.macro that will call 13 : x % y and return %
#)
NB. blank line with comment next without comment
@:>
)
produces
+/ % #)@:>
and is
Notice below, the difference with and without parens.
Also, notice the difference with a literal.
What a puzzle.
test=. (<0)` NB. does this work?
test NB. no
|domain error
(test=. (<0)`) NB. with paren's this does not work
|domain error
test=. (<'a')` NB. does this work?
test
a`
It seems not to crash anything other than jconsole under J7; J6 & J8 work
as he indicates, as do the GTK and Qt variants.
On Sat, Dec 28, 2013 at 2:24 PM, Devon McCormick wrote:
> I'm running the same version of J that Pepe is but, for jconsole, his
> "(<1)test" crashes the interpreter.
>
>
>
>
I'm running the same version of J that Pepe is but, for jconsole, his
"(<1)test" crashes the interpreter.
On Sat, Dec 28, 2013 at 1:48 PM, Jose Mario Quintana <
jose.mario.quint...@gmail.com> wrote:
> Yes, it seems to work with literals, perhaps because
>
>test
> a`
> instead of |domain e
Yes, it seems to work with literals, perhaps because
test
a`
instead of |domain error: test
On Sat, Dec 28, 2013 at 1:13 PM, Raul Miller wrote:
> This smells like the use of uninitialized memory in the interpreter.
>
> --
> Raul
>
> On Sat, Dec 28, 2013 at 12:57 PM, Brian Schott
> wrote:
This smells like the use of uninitialized memory in the interpreter.
--
Raul
On Sat, Dec 28, 2013 at 12:57 PM, Brian Schott wrote:
> (<'b')(test=. (<'a')`) NB. First it works...
> +-+-+
> |a|b|
> +-+-+
>(<'b')test NB. ... Then, again, if literals?
> +-+-+
> |a|b|
> +-+-+
>
>
>
> On Sat,
(<'b')(test=. (<'a')`) NB. First it works...
+-+-+
|a|b|
+-+-+
(<'b')test NB. ... Then, again, if literals?
+-+-+
|a|b|
+-+-+
On Sat, Dec 28, 2013 at 12:28 PM, Jose Mario Quintana <
jose.mario.quint...@gmail.com> wrote:
> I know the display of bonded conjunctions is buggy,
>
> http://www
I know the display of bonded conjunctions is buggy,
http://www.jsoftware.com/jwiki/System/Interpreter/Bugs#display_of_bonded_conjunctions_buggybut
I did not see this one coming:
(9!:14)''
j701/2011-01-10/11:25
(<0)`(<1)
┌─┬─┐
│0│1│
└─┴─┘
(<1)(test=. (<0)`) NB. First it works...
┌─┬─┐
│0│
29 matches
Mail list logo