Neat. See also http://www.jsoftware.com/pipermail/programming/2013-April/032150.html (long thread, spills over into chat).
On Mon, Jul 13, 2015 at 11:01 AM, Jon Hough <[email protected]> wrote: > Renders fine for me! > I have the opposite problem. I keep trying to learn APL but much much > prefer the ascii charset way J does things. Whenever I open Dyalog it takes > me about 20 minutes before I run back to J. > > --- Original Message --- > > From: "Marshall Bockrath-Vandegrift" <[email protected]> > Sent: July 13, 2015 6:53 PM > To: [email protected] > Subject: [Jchat] Emacs mode displaying J with APL characters > > [Apologies if this is a re-post, but I think I sent this to the wrong > address the first time around.] > > Hi, > > I've been getting into array-oriented/APL-family languages recently, with > no prior experience in any of them. After spending some time with a few > (mostly J and Dyalog APL) I decided that I prefer the semantics of J, but > really like expressiveness of the APL symbol-set. J's use of ASCII also > makes me a little sad, because it feels like a practical compromise which > the ubiquity of Unicode makes no longer necessary. > > Teaching the J interpreter about multi-byte characters in program text > looks tricky, so I decided to go the other, easier route -- teach an editor > how to display J using non-ASCII substitutions. > > It's very rough, but here's my work-in-progress fork of the Emacs j-mode: > https://github.com/llasram/j-mode/tree/pretty > > I'm not sure how well this will render for most people, but here's some > examples of J code rendered with my current selection of substitutions: > > dijkstra ← (⊢⌊⌊/.+)⍣∞ > totient ← × ∼∘÷∘∪⍢q̲ > eca ← (⌷ (8⍴2)∙⊤)⍨ (3⊥\ ¯1⌽ (2+⍴)⍴⊢) > life ← (1,̈⊢)∨/⍛∧ 3 4=⍤0 ∞ ⦙+/ ((3∙#⍪9∙⍴)⍸1)∙⌽ > qs ← ⊢∘̑(((⦙∇<#⊣),(=#⊣),(⦙∇>#⊣)) (⌷⍨?∘#))▫(0<#) > shuffle ← ⌷⍨ 0 1 ⍋⍛⍒⍛⍴⍨ # > P ← (0∙,+,∙0)⍣(⊢∘̑1̲)∘⍳ > phi ← (≥∘÷)⍣∞ ⊢1 > fib1 ← ⦙↑⍤1 (+/,↑)⍣(⊢∘̑1̲) > fib2 ← 1∧(≥∘÷)⍣(⊢∘̑1̲) > > I hope others might find this as fun as I have. > > -Marshall > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
