[HN Gopher] BQNPAD
       ___________________________________________________________________
        
       BQNPAD
        
       Author : tosh
       Score  : 75 points
       Date   : 2023-05-12 07:51 UTC (15 hours ago)
        
 (HTM) web link (bqnpad.mechanize.systems)
 (TXT) w3m dump (bqnpad.mechanize.systems)
        
       | mydriasis wrote:
       | , pronounced "bacon-pad", ...
        
       | alexisread wrote:
       | For more info: https://mlochbaum.github.io/BQN/doc/quick.html
       | 
       | BQN is an array language similar to APL, it has 2 VM runtimes,
       | one in javascript (for this engine) and one in C.
       | 
       | BQN stands for Big Query Notation language, but is a play on
       | being better than APL -> BQN
        
         | ithkuil wrote:
         | Unfortunately (missed opportunity):
         | "APL"+1         "BQM"
        
           | mlajtos wrote:
           | Brain Quotient Measure
           | 
           | Best Quality Marshall
           | 
           | Bizarrely Quirky Matrices
        
           | hoosieree wrote:
           | "Big Questions Mnotation"
           | 
           | The retcon is that it's not "APL"+1, but "APL"+Fibonacci.
        
             | Avshalom wrote:
             | 'Mnemonic' _almost_ makes sense, you could even leave it as
             | BQN and claim the m is silent.
        
             | ithkuil wrote:
             | "APL"+{[?](+`[?])[?]x 1_1}"|3         "BQN"
             | 
             | (https://bqnpad.mechanize.systems/s?bqn=eyJkb2MiOiIjIFdlbGN
             | vb...)
        
               | teddyh wrote:
               | Python:                 "".join(chr(ord(c)+1) for c in
               | "APL")       - 'BQM'
        
               | ithkuil wrote:
               | The comment you're replying to is the BQN code that adds
               | a Fibonacci number to each letter of the "APL" string.
               | 
               | You're python code is spelled just "APL"+1 in BQN.
               | 
               | Array languages implicitly so a "foreach" when there is a
               | scalar operand
        
               | teddyh wrote:
               | > * The comment you're replying to is the BQN code that
               | adds a Fibonacci number to each letter of the "APL"
               | string.*
               | 
               | Oh, right.
               | 
               | > [Your] _python code is spelled just "APL"+1 in BQN._
               | 
               | Apparently APL has very weak typing, if "A"+1 is "B".
        
               | dzaima wrote:
               | APL doesn't do this character arithmetic; BQN does. But
               | it's not weak typing, it's an intentionally designed
               | feature[0]; so things like "a"+1.2 or "a"+"b" error. It's
               | quite useful too - you can add the null character to a
               | number (or list of numbers) to convert code points to
               | respective characters (or subtract to do the inverse). Or
               | do things like '0'+x to convert a list of numbers to a
               | string of digits (and x-'0' for the inverse); or 'a'+|26
               | (|26 being a list of the numbers 0...25) to generate the
               | alphabet.
               | 
               | (it's the same logic that's behind any language with
               | pointers - you can add a number to a pointer, subtract a
               | number from a pointer, and subtract two pointers to get a
               | number)
               | 
               | [0]: https://mlochbaum.github.io/BQN/doc/arithmetic.html#
               | characte...
        
               | ithkuil wrote:
               | Well said.
               | 
               | Your average "very weakly" typed language will happily do
               | "APL"+1 == "APL1"
        
               | [deleted]
        
         | dzaima wrote:
         | BQNPAD can also use CBQN via the VM dropdown at the top right
         | (but CBQN doesn't support live previewing unlike BQN.js).
         | 
         | Also, "Big Questions Notation", not "Query". Not that it
         | matters much.
        
       | mantis369 wrote:
       | There should be a warning before a Web page captures keyboard
       | input and prevents browser hot keys from working.
        
       ___________________________________________________________________
       (page generated 2023-05-12 23:01 UTC)