home.social

#jlang — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #jlang, aggregated by home.social.

  1. A mathematics problem

    How many 3-digit numbers are there where the sum of the cube of each digit of
    the number is equal to the number itself?

    Thinking about this (from a book of recreational maths problems) gave
    me the excuse to brush up on some #jlang programming.

    NB. Determine all the 3-digit numbers whose digits' cubes sum to the number

    a =: 100+ i. 900 NB. All 3-digit numbers
    fmt2=: 8!:2 NB. External function that turns numbers to strings
    d =: fmt2 each a NB. Turn a to a collection of boxed strings
    e =: ;"1 <each;d NB. Separate out each integer of each number
    f =: (;"1) ". each e NB. Get rid of the boxes and convert back to numbers
    g =: (+/"1) 3(^"0)~ f NB. Sum the cubes of the digits
    (I. g=a){a NB. List numbers for which the sum of the cubes of the
    NB. digits equals the number

    I know that someone who is better at J than me could do this more
    elegantly. If you are one of those people, I'd love to see your
    answer.

    If you are just curious, the answers are
    153 370 371 407

  2. Finally I'm able to save myself from unit conversion hell #jlang

  3. Tried to implement a matlab function in #jlang and it is a success.

  4. I just noticed the "Best Seller" sticker on my second hand copy of Alan Holt's Network Performance Analysis Using the J programming language. 😂 I love it but somehow I doubt the sticker #apljk #jlang

  5. I discovered the ArrayCast this week and have enjoyed it tremendously.

    arraycast.com/

    Fun content for nerds; positive and constructive perspectives; and soothingly orderly conversations where folks don’t interrupt each other 😌

  6. @Gboeer @okflo #jlang is so good when you get used to it though :)

  7. Well, I think it's time to re-watch Tracy Harms' J Programming Language talk again:
    youtu.be/RWYkx6-L04Q
    #jlang #apljk #array

  8. @jdarnold Same except I was using #jlang. I've been playing code.golf with J since then so hopefully should do better at the advent this year

  9. A nice blog entry illustrating the power of the APL programming language by
    unpacking a 1-line program of Conway's Game of Life

    wordsandbuttons.online/apl_des

    But while they say in that article that APL deserves a renaissance as Lisp had
    with clojure, it already has had its renaissance in the form of the language J,
    which was also designed by Kenneth Iverson (and Roger Hui at the time and others
    since), has all the expressiveness of APL but uses the ASCII character set.
    It's also open-source. You can download it and access more information at
    jsoftware.com if you are interested. #jlang

  10. time!

    I enjoy esp. & in . I follow and cyclically use . Also and am a wannabe nerd.

    I love speak & have studied and many more.

    I spend hours a week singing in and making &

    I'm a & but here focus on the above topics.

  11. @viznut Take a look at #apl or #jlang. For the latter, most commands are 1-2 ascii characters long and are more symbolic than words, although the description of how they function is quite grammatical (nouns, verbs, adverbs etc).

  12. @codesections Not #APL but I learn & write #J ( #Jlang)
    It's tacit way of writing code + the plethora of built-in math, array and various utilities make math very fun-.

    Compared to APL it restricts itself to easily accesible ASCII so it's very easy to write code (no special character issue).

    At the very least it should be a fun learning experience. If you are still wondering get started now!
    Good Luck!