I can't find this function!

23 views
Skip to first unread message

Richard Donovan

unread,
May 7, 2026, 1:52:38 PMMay 7
to forum
Hi!

Unless I'm dreaming I thought I once came across a way of segmenting a string of digits in  y into subsets
Based on digits in x.

For example 

0 5 9 _ verb _1 0 1 2 3 4 5 6 7 8 9 99 would produce:
0 1 2 3 4 | 5 6 7 8 |9 | 99
So produces digits 0 to 4, 5 to 8, 9 to 98 then 99 to infinity

I hope you can either remind me what to look for if indeed it exists!

Thanks

Richard

Gilles Kirouac

unread,
May 7, 2026, 2:39:43 PMMay 7
to fo...@jsoftware.com
Richard

Are you not looking for the cut conjunction:

https://code.jsoftware.com/wiki/Vocabulary/semidot

or perhaps the key adverb

https://code.jsoftware.com/wiki/Vocabulary/slashdot#dyadic


~ Gilles

Ma clé publique est disponible sur keys.openpgp.org

Raul Miller

unread,
May 7, 2026, 2:43:04 PMMay 7
to fo...@jsoftware.com
There's a couple approaches which kind of come close. But neither of
them exactly.

Leaving off the top and bottom box drawing characters, because email
mutilates their alignment:

verb1=: ] <@#~ }:@:(<:/)*}.@:(>/)
verb2=: I. </. ]
0 5 9 99 _ verb1 _1 0 1 2 3 4 5 6 7 8 9 99
│0 1 2 3 4│5 6 7 8│9│99│
0 5 9 99 _ verb2 _1 0 1 2 3 4 5 6 7 8 9 99
│_1 0│1 2 3 4 5│6 7 8 9│99│

I don't know if either of these were what you were after.

--
Raul
> To unsubscribe from this group and stop receiving emails from it, send an email to forum+un...@jsoftware.com.

Devon McCormick

unread,
May 7, 2026, 4:11:32 PMMay 7
to fo...@jsoftware.com
Dyadic I. with key is tantalizingly close, e.g.

   0 5 9 {{(x I. y)</.y}} _1 0 1 2 3 4 5 6 7 8 9 99
+----+---------+-------+--+

|_1 0|1 2 3 4 5|6 7 8 9|99|
+----+---------+-------+--+


Devon McCormick



Michael Day

unread,
May 7, 2026, 4:19:25 PMMay 7
to fo...@jsoftware.com

I can't find the original email!  (Well,  I could look in the archive,  but it's not in my inbox!)

I was offering:

   0 5 9 99 _ (+/@:(<:/)</.]) _1 0 1 2 3 4 5 6 7 8 9 99
+--+---------+-------+-+--+


|_1|0 1 2 3 4|5 6 7 8|9|99|

+--+---------+-------+-+--+

noting that you need an extra item on the lhs to get the subsets you want,

but then saw it's essentially the same as - though less succint than - 

Raul's 2nd verb,  albeit with an operation on the lhs:

   (<:0 5 9 99 _)  (I. </. ])_1 0 1 2 3 4 5 6 7 8 9 99
+--+---------+-------+-+--+


|_1|0 1 2 3 4|5 6 7 8|9|99|

+--+---------+-------+-+--+

suggesting this tweak to verb2:

   0 5 9 99 _  ((I.~<:)~</.]) _1 0 1 2 3 4 5 6 7 8 9 99
+--+---------+-------+-+--+


|_1|0 1 2 3 4|5 6 7 8|9|99|

+--+---------+-------+-+--+

although you might prefer to respecify the lhs as the upper bounds 

to each required subset,  saving that ugly tweak: 

   (_1 4 8 9 )  (I. </. ]) _1 0 1 2 3 4 5 6 7 8 9 99
+--+---------+-------+-+--+


|_1|0 1 2 3 4|5 6 7 8|9|99|

+--+---------+-------+-+--+

The upper bound of _ isn't needed,  and you can of course drop the 

first and or last subset.  

Any use?

Mike


Virus-free.www.avast.com

Richard Donovan

unread,
May 7, 2026, 4:27:08 PMMay 7
to fo...@jsoftware.com
Thanks everyone!

Rauls second offering seems to be the one I want but I will enjoy trying all the others also

Richard


From: fo...@jsoftware.com <fo...@jsoftware.com> on behalf of Raul Miller <rauld...@gmail.com>
Sent: Thursday, May 7, 2026 7:42:33 PM
To: fo...@jsoftware.com <fo...@jsoftware.com>
Subject: Re: [Jforum] I can't find this function!
 
Reply all
Reply to author
Forward
0 new messages