GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    screwlisp (screwtape@mastodon.sdf.org)'s status on Saturday, 18-Jan-2025 16:45:17 JST screwlisp screwlisp

    Pratt
    so, I read this. https://dl.acm.org/doi/pdf/10.1145/512927.512931
    but I've never done this before, so I have been having trouble getting a vibe.
    A point Pratt mentions is that the central problem is that you can't get people to accept a prefix language like this:
    print + * 2 3 * 4 5
    (assuming + and * act on two elements)
    but there are these crazy #lisp people, that if you add overspecified brackets:
    (print (+ (* 2 3) (* 4 5)))
    Say they will happily read and write, and can understand this expression perfectly.

    In conversation about 4 months ago from mastodon.sdf.org permalink

    Attachments


    • Embed this notice
      webhat (webhat@infosec.exchange)'s status on Saturday, 18-Jan-2025 17:16:32 JST webhat webhat
      in reply to

      @screwtape isn't this called polish notation? I remember when I first learned bison/flex (GNU YACC/lex equivalent) it got me to write a polish notation calculator which was basically this

      In conversation about 4 months ago permalink
    • Embed this notice
      screwlisp (screwtape@mastodon.sdf.org)'s status on Saturday, 18-Jan-2025 17:16:32 JST screwlisp screwlisp
      in reply to
      • webhat

      @webhat Yeah, I heard it called Polish notation as well, or prefix notation. The problem arises that people want to write factorial as 5! not ! 5 (maybe you could get a lisper to write (fact 5)), or worse, people including lispers want to write 2/3 and so forth.
      So each token has a nud (prefix notation host language thing to do) and a led (infix or left-binding host language thing to do), and you compare the current right binding power with tokens' left binding powers as you go.... or something

      In conversation about 4 months ago permalink
    • Embed this notice
      screwlisp (screwtape@mastodon.sdf.org)'s status on Saturday, 18-Jan-2025 18:34:26 JST screwlisp screwlisp
      in reply to
      • Digital Mark λ 📚 🕹 💾 🥃
      • webhat
      • DougMerritt (log😅 = 💧log😄)

      @dougmerritt
      Well, I'm just being a bit slow working through, like, given the article's description of a parser, imagine I wanted to parse
      (- 1 + 2 * 3 / 4)
      I'm having more trouble than I thought writing a parser from the diagrams on page 47.

      Ah, I might have misread Pratt's line in the article about the unwritability of
      (= (+ (* a (^ b 2)) (* c (^ d 2))) (* 4 (sin (+ a b))))
      :
      "(But I have recently encountered some LISP users claiming the reverse, so I may be biased.)"
      @webhat @mdhughes

      In conversation about 4 months ago permalink
    • Embed this notice
      DougMerritt (log😅 = 💧log😄) (dougmerritt@mathstodon.xyz)'s status on Saturday, 18-Jan-2025 18:34:27 JST DougMerritt (log😅 = 💧log😄) DougMerritt (log😅 = 💧log😄)
      in reply to
      • Digital Mark λ 📚 🕹 💾 🥃
      • webhat

      @screwtape @webhat
      Vaughn Pratt was himself a Lisp programmer, and implemented CGOL as a Maclisp reader.

      He was at Stanford and MIT, and Berkeley pre-Unix, so there's no reason to think he was aware of the 'dc' RPN arithmetic tool, and the paper you reference is earlier than HP's RPN handheld calculators, which had a very loyal following.

      But was there a specific question?

      P.S. "Polish notation" is the most common name (after 'postfix') for operators following operands, just as Reverse Polish Notation (RPN) is the most common name (after 'prefix') for operators preceding operands.

      'The description "Polish" refers to the nationality of logician Jan Łukasiewicz' but people in the early 20th century had a tough time with Polish names so they used a nickname.

      He was famous for multiple things, though, for instance continuous (real-) valued logic, which in a hypothetical infinitely precise analog computer would allow hypercomputation -- computation beyond what is possible for Turing machines.

      https://en.wikipedia.org/wiki/Polish_notation
      https://en.wikipedia.org/wiki/Jan_%C5%81ukasiewicz

      @mdhughes

      In conversation about 4 months ago permalink

      Attachments


    • Embed this notice
      Pat (mostlypat@mastodon.sdf.org)'s status on Saturday, 18-Jan-2025 18:38:46 JST Pat Pat
      in reply to
      • webhat

      @screwtape @webhat I'm familiar with Reverse Polish Notation from FORTH, but for some reason I never realised there was a non-Reversed l version¡

      In the context of stacks (which FORTH is based on) RPN makes perfect sense, and the context of sexp (which LISP is based on) PN make perfect sense...but without some programming language reason, it just looks ridiculous

      In conversation about 4 months ago permalink
    • Embed this notice
      screwlisp (screwtape@mastodon.sdf.org)'s status on Saturday, 18-Jan-2025 18:39:26 JST screwlisp screwlisp
      in reply to
      • webhat
      • Pat

      @mostlypat
      Oh no I said Polish but I meant reverse polish sorry o_o
      @webhat

      In conversation about 4 months ago permalink
    • Embed this notice
      Pat (mostlypat@mastodon.sdf.org)'s status on Saturday, 18-Jan-2025 18:44:07 JST Pat Pat
      in reply to
      • webhat

      @screwtape @webhat
      Actually I think the example you posted was in PN, not in RPN?

      In RPN it would be: 4 5 * 2 3 * +

      (Push 4, push 5, push pop * pop, etc)

      In conversation about 4 months ago permalink
    • Embed this notice
      screwlisp (screwtape@mastodon.sdf.org)'s status on Saturday, 18-Jan-2025 18:45:11 JST screwlisp screwlisp
      in reply to
      • webhat
      • DougMerritt (log😅 = 💧log😄)
      • Pat

      @mostlypat
      Okay, I've got it backwards twice or something @dougmerritt
      @webhat

      In conversation about 4 months ago permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.