[HN Gopher] Show HN: A small, weird and unpractical programming ...
       ___________________________________________________________________
        
       Show HN: A small, weird and unpractical programming language
        
       I've been spending some time coding fp. It is a programming
       language heavily inspired by the language John Backus described in
       his 1977 Turing Award lecture. There's plenty of examples in the
       projects github repository for the interested!
        
       Author : japiirainen
       Score  : 74 points
       Date   : 2022-10-31 16:11 UTC (6 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | sindoc wrote:
       | Nice and clean. Keep up the good work. One thing I understood in
       | programming languages is their ability to integrate with the rest
       | of the ecosystem. A couple of things I like about your approach
       | is how you allow your users to get a repl without even them
       | having to install any perm files on their machine. That's
       | brilliant.
        
         | japiirainen wrote:
         | Thanks for the nice comment!
        
       | mlajtos wrote:
       | I see FP [0] (and FL [1,2]) as continuations of the original APL
       | vision - an algebra for programs.
       | 
       | It is really nice to see this implementation of FP and I hope it
       | will spark interest in the community. :)
       | 
       | [0]: https://dl.acm.org/doi/pdf/10.1145/359576.359579
       | 
       | [1]:
       | https://theory.stanford.edu/~aiken/publications/trs/FLProjec...
       | 
       | [2]: https://www.youtube.com/watch?v=FxcT4vK01-w
        
       | pasquinelli wrote:
       | i've always been curious about fp, but, to my knowlege there
       | aren't any implementations of it or closely related successors to
       | play with-- or i suppose now there's one.
        
       | lloydatkinson wrote:
       | Well designing a language to use characters that aren't on the
       | keyboard is certainly an example of an _im_ practical language.
        
         | still_grokking wrote:
         | We should stop the ASCII madness at some point. The world
         | speaks Unicode. Only programming languages are mostly stuck in
         | the 7-bit era. That sucks.
         | 
         | People even use extra keyboards to input their emojis, but we
         | "can't" input math or programming symbols? Really?
         | 
         | An "international" keyboard layout gives you already a shitload
         | of "special" signs.
         | 
         | Using the compose key you can input even more.
         | 
         | When this isn't enough it's trivial to add something to
         | ~/.XCompose
         | 
         | I'm not advocating to have a pure symbolic programming
         | language. But things that are better expressed through symbols
         | just should be.
         | 
         | It has reasons why you use symbols in math instead of writing
         | everything out in some human language.
         | 
         | Programming is _evidently symbolic_ , just like math: We know
         | that as we let professionals read code while in a MRI scanner
         | and we could look on their brain activity. The brain activity
         | correlates with the one seen when reading (and understanding)
         | math, not with the one seen while processing human language.
         | 
         | We should design programming languages accordingly!
        
         | mlajtos wrote:
         | Can programming be liberated from the keyboard-style input?
        
       | chewxy wrote:
       | Nice. I can roughly understand it though I don't quite understand
       | why inner product has a transpose in it (assuming you use are
       | using the symbols per APL).
       | 
       | Check my understanding: IP = distribute `+` across an application
       | of `*` across all transposed elements.
       | 
       | If your vectors/arrays are just arrays and column/row vectors are
       | shape conventions then there is no need for transposition. Right?
       | Unless you have some sort of checks for shapes
        
         | japiirainen wrote:
         | Hi, yeah you assumes right that the transpose symbol comes from
         | APL!
         | 
         | This language does not have "implicit iteration" a la APL, thus
         | * is just a binary operation you can apply like this *:<1,2>
         | which will yield 3. This is why inner product needs to first
         | transpose. TBH I don't like this, I just wanted to follow the
         | specification given in the paper as closely as possible. I
         | might diverge from this and implement "implicit iteration" in
         | the future!
        
           | chewxy wrote:
           | Backus' paper had a specification. TIL.
           | 
           | Must be a weird award speech to give.
           | 
           | Thanks for the explanation. It's now very clear
        
             | Jtsummers wrote:
             | Turing Award _lectures_ are not acceptance speeches in the
             | normal sense. They 've been technical lectures since the
             | start related to the primary work/interest of the
             | individual receiving the award.
             | 
             | https://amturing.acm.org/alphabetical.cfm - You can find
             | the lectures linked from the individual's name. The length
             | varies significantly.
        
       | ad404b8a372f2b9 wrote:
       | Could you describe/explain it? Referencing some obscure language
       | from a lecture in 1977 means nothing to me.
       | 
       | edited for everyone else's convenience, from wikipedia:
       | 
       | FP (short for functional programming)[2] is a programming
       | language created by John Backus to support the function-level
       | programming[2] paradigm. It allows building programs from a set
       | of generally useful primitives and avoiding named variables (a
       | style also called tacit programming or "point free"). It was
       | heavily influenced by APL which was developed by Kenneth E.
       | Iverson in the early 1960s.[3]
       | 
       | The FP language was introduced in Backus's 1977 Turing Award
       | paper, "Can Programming Be Liberated from the von Neumann
       | Style?", subtitled "a functional style and its algebra of
       | programs." The paper sparked interest in functional programming
       | research,[4] eventually leading to modern functional languages,
       | which are largely founded on the lambda calculus paradigm, and
       | not the function-level paradigm Backus had hoped. In his Turing
       | award paper, Backus described how the FP style is different:
       | An FP system is based on the use of a fixed set of combining
       | forms called functional forms. These, plus simple definitions,
       | are the only means of building new functions from existing ones;
       | they use no variables or substitutions rules, and they become the
       | operations of an associated algebra of programs. All the
       | functions of an FP system are of one type: they map objects onto
       | objects and always take a single argument.[2]
       | 
       | FP itself never found much use outside of academia.[5] In the
       | 1980s Backus created a successor language, FL, which was an
       | internal project at IBM Research.
        
         | lolinder wrote:
         | The lecture in question is not obscure, it's one of the most
         | influential papers in Computer Science and is foundational to a
         | lot of modern PL research. It's currently sitting at 4166
         | citations on Google Scholar--that's _twice_ as many as Dijkstra
         | 's "goto considered harmful".
         | 
         | In general I'm all for including context, but in this case and
         | for this audience (people on HN interested in useless
         | programming languages) a reference to the paper is plenty.
        
         | Jtsummers wrote:
         | Did you click on the link to the github repo?
         | 
         | https://github.com/japiirainen/fp
        
           | ad404b8a372f2b9 wrote:
           | Yes the readme contains the exact same referential
           | description as this post. I looked at the examples, I don't
           | know the language and its purpose is not immediately obvious
           | to me. If I missed some explanation in the repo, please
           | enlighten me.
        
             | Jtsummers wrote:
             | There's a list of links under "Documentation" you could
             | check out: https://github.com/japiirainen/fp#documentation
        
               | ad404b8a372f2b9 wrote:
               | I've already read this, it's not an appropriate
               | description of the language. Those are available in every
               | language I've ever worked with. What is differentiating
               | about this language? Why is it interesting? What is the
               | design philosophy that makes it worthwhile? Was it the
               | first language to introduce some of these? Does it enable
               | the user to implement things other languages can't as
               | elegantly?
               | 
               | I feel like those shouldn't be very hard questions to
               | answer. I can answer them about every language I've ever
               | worked with, and every language I've developed.
        
               | Jtsummers wrote:
               | I don't know what to tell you, your questions are mostly
               | answered in the 1977 lecture you seem to want to avoid
               | reading.
        
               | ad404b8a372f2b9 wrote:
               | You could tell me the answer which isn't all that
               | complicated and you seem unable or unwilling to do.
               | 
               | When you post a project somewhere, or generally start a
               | discussion with people, it's generally wise to establish
               | a minimum context about what you are talking about and
               | not require the participant to read a 40 year old paper,
               | or lecture, or so on, just to understand the basis of
               | your premise.
               | 
               | Even more so online when the work is multiplied by the
               | number of people who will read your post and a two-
               | sentences description can solve it.
        
               | lolinder wrote:
               | Honestly, if you're _this_ opposed to exploring Backus 's
               | 1977 Turing Award lecture, you are not the target
               | audience. This isn't some obscure paper that's been lost
               | to time, it's been cited 96 times _in 2022 alone_ [0]. It
               | 's a huge freaking deal in the PL community, and OP is
               | perfectly justified in referencing it and moving on.
               | 
               | [0] https://scholar.google.com/scholar?as_ylo=2022&cites=
               | 7066062...
        
       | svnpenn wrote:
        
         | pvg wrote:
         | _Title should contain the name of the thing._
         | 
         | People presenting their own work get a lot of leeway and
         | there's nothing in this that approaches clickbait. Having to
         | click on a thing to learn more about what it is is not in
         | itself clickbait.
        
           | svnpenn wrote:
           | The name is the single more important fact about a thing.
           | Omitting that is not acceptable in my opinion.
        
             | pvg wrote:
             | Sure but HN titles and especially HN titles of self-posts
             | and Show HNs don't have that as a requirement for pretty
             | straightforward reasons.
        
         | Retr0id wrote:
         | The name of the thing is "fp". What new information does that
         | give you? What more information could you possibly jam into the
         | post title?
        
           | xigoi wrote:
           | Knowing whether you'd already seen the language, for one.
        
       ___________________________________________________________________
       (page generated 2022-10-31 23:00 UTC)