Much better! Linda
-Original Message-
From: programming-boun...@forums.jsoftware.com
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Kip Murray
Sent: Friday, April 17, 2015 6:38 AM
To: programm...@jsoftware.com
Subject: Re: [Jprogramming] Verb to string and Verb array
com ] On
> Behalf Of David Lambert
> Sent: Thursday, April 16, 2015 7:26 AM
> To: programming
> Subject: Re: [Jprogramming] Verb to string and Verb array
>
> The conjunction @: turns u@:v into a single verb whereas u v alone
> represent
> 2 verbs. Sticking @: into a train c
al Message-
From: programming-boun...@forums.jsoftware.com
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of David Lambert
Sent: Thursday, April 16, 2015 7:26 AM
To: programming
Subject: Re: [Jprogramming] Verb to string and Verb array
The conjunction @: turns u@:v into a single ve
t;
> >> J has 2 such useful representations: linear and atomic. atomic is that
> >> of gerunds, and several built in modifiers can turn gerunds/ar's back
> into
> >> verbs.
> >>
> >> I find linear representation easier to read and work with.
> >>
9:09 -0400
From: "Linda Alvord"
To:
Subject: Re: [Jprogramming] Verb to string and Verb array
Message-ID:<000c01d07826$68500770$38f01650$@verizon.net>
Content-Type: text/plain; charset=utf-8
Why is @: necessary?
(1 {A=:(+/ % #) , *:@:+:) 1 2 3
4
A
(+/ % #) , *:@:+:
A 1 2 3
quot;Linda Alvord"
Sent: April 16, 2015 6:19 PM
To: programm...@jsoftware.com
Subject: Re: [Jprogramming] Verb to string and Verb array
Why is @: necessary?
(1 {A=:(+/ % #) , *:@:+:) 1 2 3
4
A
(+/ % #) , *:@:+:
A 1 2 3
2 4 16 36
(1 {B=:(+/ % #) , *:+:) 1 2 3
|domain err
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Jose Mario
Quintana
Sent: Wednesday, April 15, 2015 11:14 AM
To: Programming forum
Subject: Re: [Jprogramming] Verb to string and Verb array
One also would have to be careful:
(1 { ((+/ % #) , (*:@:+:) )) 1 2 3
4
(*:@:+:) 1 2
com [
> programming-boun...@forums.jsoftware.com] on behalf of Rob Hodgkinson
> [ rhodg...@me.com]
> > Sent: Wednesday, April 15, 2015 10:08
> > To: programm...@jsoftware.com
> > Subject: Re: [Jprogramming] Verb to string and Verb array
> >
> > John, notice subtle dif
into
>> verbs.
>>
>> I find linear representation easier to read and work with.
>>
>> lrA =: 1 : '5!:5 < ''u'''
>>
>>
>> (+/ % #)`'' NB. turns verb into ar, display ommitted
>>
>> (+/ % #) lrA NB.
>
> though (".) works well if your phrase will return a noun.
>
> +: '@' eval +
> +:@+
>
>
> +/ lrA , 1 2 3 lrA
> +/1 2 3 NB. string result
>
>
>
>
>
>
> From: Jon Hough
> To: "programm
nl
> > To: programm...@jsoftware.com
> > Date: Wed, 15 Apr 2015 08:14:42 +0000
> > Subject: Re: [Jprogramming] Verb to string and Verb array
> >
> > In addition, I was thinking that in
> >(1{k) 5
> > 0.2
> >
> > the (1{k) is a so-called noun
gt;> the second.
>> Of course, the unwanted verb still gets executed, so it seems a silly
>> idea, but feasible.
>>
>> > From: b.g.h.go...@tudelft.nl
>> > To: programm...@jsoftware.com
>> > Date: Wed, 15 Apr 2015 08:14:42 +
>> > Subject: R
ith some argument, and 1{... to do the same for
> the second.
> Of course, the unwanted verb still gets executed, so it seems a silly
> idea, but feasible.
>
> > From: b.g.h.go...@tudelft.nl
> > To: programm...@jsoftware.com
> > Date: Wed, 15 Apr 2015 08:14:42 +
>
ftware.com
>> Date: Wed, 15 Apr 2015 08:14:42 +0000
>> Subject: Re: [Jprogramming] Verb to string and Verb array
>>
>> In addition, I was thinking that in
>> (1{k) 5
>> 0.2
>>
>> the (1{k) is a so-called noun fork.
>> (n u v) y is def
Date: Wed, 15 Apr 2015 08:14:42 +0000
>> Subject: Re: [Jprogramming] Verb to string and Verb array
>>
>> In addition, I was thinking that in
>> (1{k) 5
>> 0.2
>>
>> the (1{k) is a so-called noun fork.
>> (n u v) y is defined to be n u (v y) and
.3
[ RESULT_OF_K =: k 3
24309.3 72927.8 218783
type'RESULT_OF_K'
++
|noun|
++
Date: Wed, 15 Apr 2015 07:34:05 +0100
From: Jon Hough
To:"programm...@jsoftware.com"
Subject: Re: [Jprogramming] Verb to string and Verb array
Message-ID:
Content-Type: text/plain; char
M, Jon Hough wrote:
> >> Yes, thanks. It seems more clear. I wasn't aware you could index tines of
> >> a fork.e.g.
> >>
> >> k =: ((+/),%,#)
> >>
> >>
> >> (1{k) 5
> >> gives 0.2
> >> That was the main cause of confusion.
...@forums.jsoftware.com
[programming-boun...@forums.jsoftware.com] on behalf of Rob Hodgkinson
[rhodg...@me.com]
Sent: Wednesday, April 15, 2015 10:08
To: programm...@jsoftware.com
Subject: Re: [Jprogramming] Verb to string and Verb array
John, notice subtle difference in what you typed:
k
Yes, thanks.
Please disregard my last question. My brain fell out of my head. I'm having a
bad day.
Thanks,Jon
> From: rhodg...@me.com
> Date: Wed, 15 Apr 2015 18:08:41 +1000
> To: programm...@jsoftware.com
> Subject: Re: [Jprogramming] Verb to string and Verb array
>
&
>>
>>> From: rauldmil...@gmail.com
>>> Date: Wed, 15 Apr 2015 02:55:14 -0400
>>> To: programm...@jsoftware.com
>>> Subject: Re: [Jprogramming] Verb to string and Verb array
>>>
>>> k is a single verb which produces 3 values for each element o
programm...@jsoftware.com
> Subject: Re: [Jprogramming] Verb to string and Verb array
>
> Technically, you are not indexing the tines of the fork but you are
> indexing the result of the fork.
>
> Thanks,
>
> --
> Raul
>
>
> On Wed, Apr 15, 2015 at 3:09 AM, Jon Hough
,#)
>
>
> (1{k) 5
> gives 0.2
> That was the main cause of confusion. Thanks.
>
>> From: rauldmil...@gmail.com
>> Date: Wed, 15 Apr 2015 02:55:14 -0400
>> To: programm...@jsoftware.com
>> Subject: Re: [Jprogramming] Verb to string and Verb array
>>
>
> Subject: Re: [Jprogramming] Verb to string and Verb array
>
> k is a single verb which produces 3 values for each element of its argument.
>
> It is also a fork, and each tine of the fork has a leaf which is a
> bond (n&v). So if you give it a left argument, that becomes a
d I can also do:
>
>
> (0{k) 3
>
>
> 24309.3
>
>
>
>
> So whatever k is, it returns three nouns for one input noun, and it is
> indexable so is an array of some sort. But what exactly (in terms of
> parts-of-speech) is k?
>
>
>
>> Date
janpieter.jac...@gmail.com
> To: programm...@jsoftware.com
> Subject: Re: [Jprogramming] Verb to string and Verb array
>
> Exactly. Actually, any time you want something to work as if it were
> assigned to a name, you'd need brackets.
> Eg: *: +&. won't work, while *: (+&
hanks,
> Just to be clear, '(',')',~ is just to bracketify the verb so its fork
> (in this case) works, right?
>
> --- Original Message ---
>
> From: "Jan-Pieter Jacobs"
> Sent: April 14, 2015 5:26 PM
> To: programm...@jsoftware.com
> Subject:
be clear, '(',')',~ is just to bracketify the verb so its fork
> (in this case) works, right?
>
> --- Original Message ---
>
> From: "Jan-Pieter Jacobs"
> Sent: April 14, 2015 5:26 PM
> To: programm...@jsoftware.com
> Subject: Re: [Jprogramming] Verb to
Thanks,
Just to be clear, '(',')',~ is just to bracketify the verb so its fork (in
this case) works, right?
--- Original Message ---
From: "Jan-Pieter Jacobs"
Sent: April 14, 2015 5:26 PM
To: programm...@jsoftware.com
Subject: Re: [Jprogramming] Verb to strin
Note also that +/ %# 2 3 4 is not equivalent to executing the verb
+/%# on the argument 2 3 4.
You need a parenthesis around the verb, to get the right "mean"ing.
Thanks,
--
Raul
On Tue, Apr 14, 2015 at 4:11 AM, Jon Hough wrote:
> I have a couple of questions:
> 1. Is it possible to convert a
quot;.) works well if your phrase will return a noun.
+: '@' eval +
+:@+
+/ lrA , 1 2 3 lrA
+/1 2 3 NB. string result
From: Jon Hough
To: "programm...@jsoftware.com"
Sent: Tuesday, April 14, 2015 4:11 AM
Subject: [Jprogramming] Verb t
Hey John,
I think 1. you can do using 5!:5:
mean =: +/%#
mean i.5
2
5!:5 <'mean'
+/ % #
datatype 5!:5 <'mean'
literal
". (('(',')',~5!:5) <'mean'),'0 1 2 3 4'
2
stringify =: '(',')',~5!:5
(stringify <'mean') , '0 1 2 3 4'
(+/ % #)0 1 2 3 4
For point 2, you can use gerunds to
I have a couple of questions:
1. Is it possible to convert a verb, e.g. +/%# , to a string?": '+/%# 2 3 4'
executes a stringed verb with an argument. But how would I convert a verb to a
string in the first place?
Also, I discovered the eval verb
eval=: 1 : 0
". 'w =. ' , u
(ar < 'w') ab
)
32 matches
Mail list logo