Nuvoc simplified

36 views
Skip to first unread message

David C. Salthouse

unread,
Jan 30, 2026, 10:14:55 AMJan 30
to forum
As a student of all things Iverson, Mathematical and Debian I have had difficulty getting my head  wrapped around Nuvoc. I asked Gemini to build a more structred, though incomplete, version. I invite more experienced J users with time on their hands to point out errors and ommisions. Comments from novices welcome. 

Thanks in Advance,

Dave Salthouse

  • Rank Key:

    • 0 = Atoms (Numbers)

    • 1 = Lists (Vectors)

    • _ = Everything (The whole array)

THE MONADIC BRANCH (One Argument y)
MATHEMATICS (Arithmetic)   
           - y Negate (Rank 0) | - 5 -> _5  
           % y Reciprocal (Rank 0) | % 4 -> 0.25  
            +: y Double (Rank 0) | +: 5 -> 10 
           -: y Halve (Rank 0) | -: 10 -> 5  
          *: y Square (Rank 0) | *: 3 -> 9 
          %: y Square Root (Rank 0) | %: 9 -> 3 
           ^. y Natural Log (Rank 0) | ^. 2.71 -> 1 
 
STRUCTURE (Shape) 
          $ y Shape Of (Rank _) | $ 2 3 4 -> 3 
         # y Tally (Count) (Rank _) | # 10 20 -> 2 
         , y Ravel (Flatten) (Rank _) | , i. 2 2 -> 0 1 2 3  
        |. y Reverse (Rank _) | |. 1 2 3 -> 3 2 1  
        |: y Transpose (Rank _) | Flip rows/cols  

SELECTION ( 
         {. y Head (First) (Rank _) | {. 10 20 30 -> 10  
         {: y Tail (Last) (Rank _) | {: 10 20 30 -> 30 
         }. y Behead (Drop 1) (Rank _) | }. 10 20 30 -> 20 30  
         }: y Curtail (Drop L)(Rank _) | }: 10 20 30 -> 10 20  
         ~. y Nub (Unique) (Rank _) | ~. 1 1 2 -> 1 2 

 DISCRETE MATH (Integers) 
           i. y Integers (Rank 1) | i. 5 -> 0 1 2 3 4 
           <. y Floor (Rank 0) | <. 3.14 -> 3 
           >. y Ceiling (Rank 0) | >. 3.14 -> 4 
           q: y Prime Factors (Rank 0) | q: 10 -> 2 5


DYADIC BRANCH (Two Arguments x and y)
ARITHMETIC (x combined with y) 
            x + y Plus (Rank 0 0) | 1 + 2 -> 3 
           x * y Times (Rank 0 0) | 2 * 3 -> 6 
           x % y Divide (Rank 0 0) | 1 % 2 -> 0.5 
           x ^ y Power (Rank 0 0) | 2 ^ 3 -> 8 
           x | y Residue (Mod) (Rank 0 0) | 2 | 5 -> 1 
 
STRUCTURAL (Reshaping) │ 
          x $ y Reshape (Rank 1 _) | 2 2 $ 1 -> 1 1, 1 1 
          x , y Append/Link (Rank _ _) | 1 , 2 -> 1 2 
          x # y Copy (Filter) (Rank 1 _) | 1 0 1 # 'ABC' -> 'AC'  
          x {. y Take (Rank 1 _) | 2 {. 10 20 30 -> 10 20 

LOGIC & COMPARISON 
          x = y Equal (Rank 0 0) | 1 = 1 -> 1 
          x < y Less Than (Rank 0 0) | 1 < 2 -> 1  
          x > y Greater Than (Rank 0 0) | 2 > 1 -> 1  
          x +. y GCD (OR) (Rank 0 0) | 0 +. 1 -> 1 
          x *. y LCM (AND) (Rank 0 0) | 0 *. 1 -> 0 

 SYSTEM 
           x 1!:1 y Read File (Rank 0 0) | Read y 
           x 1!:2 y Write File (Rank _ _) | Write x to y

MODIFIERS (Adverbs & Conjunctions)


  • Adverbs (1 arg):

    • / Insert: Put the verb between items (+/ Sum).

    • ~ Reflex: Use y as both arguments (*~ 5 is 5 * 5).

    • \ Prefix: Apply to prefixes (+\ i.5 Running Sum).

  • Conjunctions (2 args):

    • @ At: Functional Composition (f @ g).

    • & Bond: Glue an argument to a verb (double =: * & 2).

    • ^: Power: (Repeat logic).

Richard Donovan

unread,
Jan 30, 2026, 2:40:26 PM (14 days ago) Jan 30
to fo...@jsoftware.com
Certainly seems very clear, Dave. Thumbs up from this perpetual novice!

Richard

From: fo...@jsoftware.com <fo...@jsoftware.com> on behalf of David C. Salthouse <d.c.sa...@gmail.com>
Sent: 30 January 2026 15:14
To: forum <fo...@jsoftware.com>
Subject: [Jforum] Nuvoc simplified
 
To unsubscribe from this group and stop receiving emails from it, send an email to forum+un...@jsoftware.com.

Paul Jackson

unread,
Jan 30, 2026, 3:47:20 PM (14 days ago) Jan 30
to fo...@jsoftware.com
I'm not aware of an x argument for 1!:1

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

trx2358...@yahoo.com

unread,
Jan 31, 2026, 12:39:29 AM (14 days ago) Jan 31
to Digest Recipients
I’d bet systematically checking that Gemini output is an excellent roadmap for exploring J.  Sounds like a project you yourself might like.


Reply all
Reply to author
Forward
0 new messages