7;
> db2
> ' ' , ' ' ,~ dbx
> db2 x
> the better angels of our nature
>$db2 x
> 33
>
> J is so good at simplifying what I write!
>
> Linda
>
>
> -Original Message-
> From: programming-boun...@jsoftware.com
> [ma
x27;'
db2
' ' , ' ' ,~ dbx
db2 x
the better angels of our nature
$db2 x
33
J is so good at simplifying what I write!
Linda
-Original Message-
From: programming-boun...@jsoftware.com
[mailto:programming-boun...@jsoftware.com] On Behalf Of Roger Hui
Sent:
' E. ]
Linda
-Original Message-
From: programming-boun...@jsoftware.com
[mailto:programming-boun...@jsoftware.com] On Behalf Of Roger Hui
Sent: Wednesday, January 04, 2012 9:13 PM
To: Programming forum
Subject: Re: [Jprogramming] Faster deb
dbx=: #~ -.@(' '&E.)
fun4=.-.
a fun4 ' '
nowisthetimeforallgoodmentocometotheaidoftheircountry
a fun4 'c'
now is the time for all good men to ome to the aidof their ountry
a -. ' '
nowisthetimeforallgoodmentocometotheaidoftheircountry
2012/1/5 Linda Alvord
> Some hints to create a tacit verb:
>
>
>
forum
Subject: Re: [Jprogramming] Faster deb
Thank you and Linda for this information and help.
Don Kelly
-Original Message-
From: Joey K Tuttle
Sent: Wednesday, January 04, 2012 8:28 PM
To: Programming forum
Subject: Re: [Jprogramming] Faster deb
How about:
fun3 =: ' '
Thank you and Linda for this information and help.
Don Kelly
-Original Message-
From: Joey K Tuttle
Sent: Wednesday, January 04, 2012 8:28 PM
To: Programming forum
Subject: Re: [Jprogramming] Faster deb
How about:
fun3 =: ' ' -.~ ]
fun2 a
> nowisthetimeforallgoodmentocometotheaidoftheircountry
>
> And it should work in the same way that your sample worked.
>
> Linda
>
> -Original Message-
> From: programming-boun...@jsoftware.com
> [mailto:programming-boun...@jsoftware.com] On Behalf Of d...@sha
...@shaw.ca
Sent: Wednesday, January 04, 2012 9:08 PM
To: Programming forum
Subject: Re: [Jprogramming] Faster deb
How about using E. ?
fun=:verb define
s=.0< -. ' 'E.y
s#y
)
a=.' now is the time for all good men to come to the aid of their country '
fun a
nowisthetim
I like that way of temporarily padding the ends with extra spaces to
mop up any already there.
On Thu, Jan 5, 2012 at 2:12 AM, Roger Hui wrote:
> dbx=: #~ -.@(' '&E.)
> db=: dbx&.(,&' ')&.(' '&,)
>
> x=: 'the better angels of our nature'
>
> '>',(db x),'<'
>>the better angels of ou
dbx=: #~ -.@(' '&E.)
db=: dbx&.(,&' ')&.(' '&,)
x=: 'the better angels of our nature'
'>',(db x),'<'
>the better angels of our nature<
'>',(db ' ',x),'<'
>the better angels of our nature<
'>',(db x,' '),'<'
>the better angels of our nature<
'>',(db ' ',x,' '),'<'
>the
ross out to reply
-Original Message-
From: Marshall Lochbaum
Sent: Wednesday, January 04, 2012 9:41 AM
To: Programming forum
Subject: Re: [Jprogramming] Faster deb
If you really want top-of-the-line performance, you'll have to go to a
sequential machine. Here's my solution, whic
Behalf Of Marshall Lochbaum
Sent: Wednesday, January 04, 2012 12:42 PM
To: Programming forum
Subject: Re: [Jprogramming] Faster deb
If you really want top-of-the-line performance, you'll have to go to a
sequential machine. Here's my solution, which leaves the leading and
trailing blanks
If you really want top-of-the-line performance, you'll have to go to a
sequential machine. Here's my solution, which leaves the leading and
trailing blanks in, then specifically deletes them.
I don't claim that these tests are universal; it's quite plausible that a
different mixture of blanks and w
okay, I didn't read Raul's posting properly.
On Wed, Jan 4, 2012 at 4:44 PM, Ian Clark wrote:
> Raul's points are valid, but as a technique I like it. I'm going to
> add it to my collection of idioms for a monograph on string-handling.
>
> Rotate-and-compare can be generalized to detect any given
Raul's points are valid, but as a technique I like it. I'm going to
add it to my collection of idioms for a monograph on string-handling.
Rotate-and-compare can be generalized to detect any given letter
followed/preceded by some other. But in the speed stakes, there's
often extra housekeeping hand
As you point out, these are not equivalent.
# TEST=: ' this is a test '
26
# deb TEST
14
# fdeb TEST
15
Note also:
# ]&.;: TEST
14
That said:
# ]&.;: ' Don''t do this... '
|open quote
Also, the timing difference between 3.446e_6 and 3.293e_6 is inconsequential.
--
Rau
"delete extra blanks" from strings.ijs has this definition:
deb =: #~ (+. (1: |. (> w'
3.446e_6 3072
1000 tx 'fdeb ,>w'
3.293e_6 3072
NB. same value for both the old and new fun
(deb -: fdeb),>w
1
NB. the results match the original string
s -: fdeb ,>w
1
However, it's not exactly t
17 matches
Mail list logo