News for hackers. Stuff that matters.
Re:Hy – A Lisp-flavored Python by IgorPartola on Wednesday August 02, 2017 @04:37PM (#14914362)
As a heavy user of Python, and someone who grew up with the "curly braces" languages, I have a question for y'all. Is this really readable?

    (setv result (- (/ (+ 1 3 88) 2) 8))

Or rather is it more readable than

    result = ((1 + 3 + 88) / 2) - 8
I just... Do you just get used to this, or is it something that you have to keep struggling with? Especially given that the latter is how we do math the rest of the time?
Re:Hy – A Lisp-flavored Python by mthomas on Wednesday August 02, 2017 @04:44PM (#14914448)
I find that both are equally (un)readable. However, for expressions that are that long, I'm inclined to write:

    (setv result (-> (+ 1 3 88) 
                     (/ 2) 
                     (- 8)))
Re:Hy – A Lisp-flavored Python by jamescostian on Wednesday August 02, 2017 @05:26PM (#14914815)
I am not a lisper, but that looks pretty cool. The non-lisp ways of writing that would either require adding parens like GP or writing things like "result /= 2", but that means repeating "result" or whatever variable many times.
Re:Hy – A Lisp-flavored Python by cle on Wednesday August 02, 2017 @05:56PM (#14915060)
This is even better than in-fix notation.
Re:Hy – A Lisp-flavored Python by btschaegg on Wednesday August 02, 2017 @11:54PM (#14916847)
Still being an absolute beginner at lispy syntax, I'll have to ask you the same question though.

While I see the awesomeness in threading macros, I'm usually left pondering a while on where the result actually goes in the next s-expression. How long did it take you to get used to that? Would you prefer someting like `as->` for readability?

Re:Hy – A Lisp-flavored Python by klibertp on Thursday August 03, 2017 @04:05AM (#14917810)
I thought it's a simple mnemonic: -> means inserting the form just after the beginning of the next one, while ->> inserts at the end of it.

You most certainly can have explicit variable to thread through expressions, like this:

   (it-> (form1 it) (form2 3 it 4) ...)
where it means "previous expression". I think there's a Clojure library which already implements this. You can use that if you want.
Re:Hy – A Lisp-flavored Python by serpix on Thursday August 03, 2017 @06:45AM (#14918446)
in Clojure this is achieved with `as->`
Re:Hy – A Lisp-flavored Python by baldfat on Thursday August 03, 2017 @07:20AM (#14918580)
In Racket we actually have a threading macro with ~>

This:

(- (bytes-ref (string->bytes/utf-8 (symbol->string 'abc)) 1) 2)

Becomes this:

(~> 'abc

    symbol->string

    string->bytes/utf-8

    (bytes-ref 1)

    (- 2))

https://docs.racket-lang.org/threading/index.html
Re:Hy – A Lisp-flavored Python by peatmoss on Thursday August 03, 2017 @09:33AM (#14919371)
I believe the use of "~>" rather than "->" in Racket was set in #lang rackjure which adds in some of the Clojure syntax to Racket. Also amusing is their explanation:

> For example the threading macros are ~> and ~>> (using ~ instead of -) because Racket already uses -> for contracts. Plus as Danny Yoo pointed out to me, ~ is more "thready".

http://docs.racket-lang.org/rackjure/index.html#%28part._.Ba...

More thready indeed :-p

Re:Hy – A Lisp-flavored Python by alphapapa on Saturday August 05, 2017 @01:04AM (#14934315)
Emacs 25 has thread-first and thread-last macros in subr-x.el.
Re:Hy – A Lisp-flavored Python by lliamander on Wednesday August 02, 2017 @08:34PM (#14915988)
Also, I've seen lisps that obviate the need for the outermost parentheses (I think by using significant whitespace). In that case, the above example would have as many parens as the python example (for those who are keeping count).
Re:Hy – A Lisp-flavored Python by lliamander on Wednesday August 02, 2017 @08:32PM (#14915977)
Indeed, I like that better than either typical prefix or infix nested expressions.

What do you advise in the case the expression tree is a little bit more complex?

For example: (setv result (- (/ (+ 1 3 88) 2) (* 8 (+ 3 2)))

Re:Hy – A Lisp-flavored Python by jlarocco on Wednesday August 02, 2017 @10:03PM (#14916385)
Because the operators all take a list of values it's sometimes convenient to format them like any other long list, with each nested sub-expression on its own line to form a tree:

    (setv result (- (/ (+ 1 3 88)
                       2)
                    (* 8 
                       (+ 3 2)))
Another possibility is to use a (let ...) to give nested values temporary names, like:

    (setv result (let ((first (/ (+ 1 3 88) 2))
                       (second (* 8 (+ 3 2))))
                   (- first second)))
It helps if "first" and "second" have meaningful names like "velocity" or "force" that can describe what they are.
Re:Hy – A Lisp-flavored Python by mthomas on Wednesday August 02, 2017 @09:17PM (#14916199)
I don't see any clever way to make that more readable. I would have to break it into two subexpressions and then take the difference. i.e.

    (setv e0 (-> (+ 1 3 88) (/ 2)))
    (setv e1 (-> (+ 3 2) (* 8)))
    (setv result (- e0 e1))
Re:Hy – A Lisp-flavored Python by kazinator on Wednesday August 02, 2017 @11:35PM (#14916775)
BTW doesn't setv support multiple pairs?

    (setv e0 (-> (+ 1 3 88) (/ 2)))
          e1 (-> (+ 3 2) (* 8))
          result (- e0 e1))
like setq and setf in CL.
Re:Hy – A Lisp-flavored Python by kazinator on Wednesday August 02, 2017 @06:46PM (#14915368)
There are advantages:

Long Lisp expressions break into multiple indented lines according to a couple of very easy rules:

   (- (/ (+ 1 3     ;; sideways tree [-] --- [/] --- [+] -- 1 3
            8 8)    ;;                   |       |       `- 8 8
         2)         ;;                   |        ` 2
      8)            ;;                    `- 8
by contrast, there is any satisfactory, canonical way to break up infix into multiple lines (with excellent support from editors like Emacs and Vim). Thus, Lisp expressions can be longer while remaining understandable. (Which is important because entire function definitions, for instance, are really one big expression.)

There is no ambiguity in Lisp expressions. The parentheses are not optional grouping punctuators, but operators denoting operator application (analogous to the parentheses in f(x, y)). You never, ever have to grapple with "what is the precedence/associativity of this?" or "I know the precedence/associativity of this, but did the person who wrote this intend it that way?"

Sufficiently long expressions are hard to read in any notation. Just like in any language, Lisp programs break down complex calculations with intermediate variables:

   (let ((bytes (+ 1 3 8 8)) ;; what is this term? Oh, bytes
         (words (/ bytes 2)) ;; why divide it by two? Ah 16 bit words
         (size (- words 8))) ;; Why subtract? Account for some header or special offset.
     ...)
> Do you just get used to this

What happens is that you have to get used to working with big, nested prefix expressions: because that's what functions are. A 200 line function in Lisp is a 200 line nested expression. You find that this it is perfectly manageable and you even like it. You get used to structuring code that way, and then that all applies to arithmetic expressions also, which are just more of the same thing. Given that you're able to cope with big functions made up of that sort of syntax, you are then not fazed by some five node arithmetic subexpression.

Re:Hy – A Lisp-flavored Python by brudgers on Wednesday August 02, 2017 @07:28PM (#14915606)
Neither is readable because both are filled with magic numbers. With experience the Lisp becomes more readable when formatted conventionally:

  (setv result (- (/ (+ 1 3 88)
                      2)
                  8))
Line breaking the Python is possible but unconventional and requires additional symbols.

As expressions become more complex, languages with infix operators are faced with the choice between some form of operator precedence and strict left to right (or right to left) application. It is hard to look at:

  6 * 89 & 57 >> 2**2 - 1
and see the implicit parenthesis. And maybe not having to figure out where the implicit parentheses go in complex cases is part of the attraction of Lisp syntax. Lisp code does not require going to the rule book as often.
Re:Hy – A Lisp-flavored Python by mythrwy on Wednesday August 02, 2017 @08:35PM (#14915991)
Once you are in the parentheses line breaks in python are just fine, no additional symbols needed.

  result = ((( 1 +
 
          3 +
         
          8) /
         
          2)
 
          * 6)
works.

Also works as a way to deal with long strings without the \.

  long_string = ('hello'
      'really'
      ' really'
      ' long'
      ' line'
      )
Re:Hy – A Lisp-flavored Python by brudgers on Wednesday August 02, 2017 @09:37PM (#14916270)
Line breaks in Python are generally unconventional. For what it is worth, the PEP 8 recommendation is for the operator to begin the line (Knuth style), i.e.

  result = ((( 1
               + 3
               + 8)
               / 2)
               * 6)
How much that looks like Lisp is a matter of opinion I suppose.
Re:Hy – A Lisp-flavored Python by jonahx on Wednesday August 02, 2017 @05:55PM (#14915044)
> Do you just get used to this

Short answer: yes, and in far less time than you'd think. The difference between the examples you cite, specifically, is trivial, and if it's a sticking point for you I'd suggest (and I'm not trying to be catty at all) that you broaden your experience with different languages. I mean, languages like J can become readable with enough experience -- stuff like the above is just a blip on the syntactical radar screen.

Optimizing syntax for readability is a worthy goal, but experience (both with the language in question and languages in general) is an almost insurmountable confound here, and ultimately your goal should be to effortlessly "see past" surface differences so you can concentrate on the deeper facilities the language provides for expression.

Re:Hy – A Lisp-flavored Python by IgorPartola on Wednesday August 02, 2017 @10:29PM (#14916497)
Heh. I am pulling this example straight from Hy's tutorial. They are the ones claiming that this syntax is superior to Python's. I do have a hard time with parsing it in my brain.

Long ago, I internalized what I believe to be true about programming languages: they should be optimized for the humans using them, not for the machines that run the programs or the compiler authors who create them. This leads to less bugs. Maybe your goal is to see past syntax to understand language semantics. My goal is to get code shipped with as few bugs as possible as quickly as possible. Python and ES let me do that pretty well. Also don't meant to be catty, to each their own interests.

Re:Hy – A Lisp-flavored Python by didibus on Wednesday August 02, 2017 @11:09PM (#14916675)
I think what was meant was that the semantics should be optimized to human. Those semantics matter more then the syntax, since you can quickly get used to syntax.

So think of it as learning to recognize and pronounce an alphabet used to form words, over understanding the meaning of sentences in a given language.

Having said that, once you get used to the lisp syntax, as I did, I find it is better suited to humans. But to believe it you need to try out structural editing.

Re:Hy – A Lisp-flavored Python by IgorPartola on Thursday August 03, 2017 @12:04AM (#14916879)
Hmm, that seems to imply that you can't optimize for semantics and syntax at the same time.
Re:Hy – A Lisp-flavored Python by didibus on Thursday August 03, 2017 @06:04AM (#14918276)
It can optimize for both, in fact that's what Lisp is all about. Take Hy, its got Python's semantics, supports all of its features and paradigms, but its syntax is simpler, more uniform, homoiconic and more powerful. This is turn allows you to extend, modify or refine Python's semantics, since the Lisp syntax will always be able to express them.
Re:Hy – A Lisp-flavored Python by jonahx on Thursday August 03, 2017 @12:11AM (#14916902)
> they should be optimized for the humans using them, not for the machines that run the programs or the compiler authors who create them.

Almost every high-level language espouses this goal -- even something as seemingly esoteric as J specifically does. Which is to say, your argument assumes that python's syntax is somehow more suited to humans, but I think you'd be hard pressed to back that up with evidence. Clearly it feels more natural to you, but why? It's hard to control for familiarity even in your own personal case, let alone programmers in general.

Re:Hy – A Lisp-flavored Python by jwr on Wednesday August 02, 2017 @04:42PM (#14914412)
From a long-time Lisper (Common Lisp, and now Clojure): not, this is not comfortably readable.

That said, I very rarely write code like this. I tend to split operations over multiple lines, so that you don't spend so much time digging into and out of nesting levels. Prefix notation is not ideal for reading math. People have been writing infix math notation libraries for CL for exactly this reason.

It's not a showstopper, though. Also, I do find that sometimes having + and < to be of arbitrary arity is really convenient and makes for nicer code.

Re:Hy – A Lisp-flavored Python by kazinator on Wednesday August 02, 2017 @07:04PM (#14915474)
> People have been writing infix math notation libraries for CL for exactly this reason.

People have writing these notation libraries, but then not actually using them.

Infix libraries for CL mostly exist to end arguments; "we have infix; Lispers choose not to use it, and you will understand why soon enough".

Re:Hy – A Lisp-flavored Python by a-saleh on Thursday August 03, 2017 @05:10AM (#14918057)
I actually used them quite often when i.e. dealing with math.

I just realized I don't use math that ofthen when programming :)

Re:Hy – A Lisp-flavored Python by evilduck on Wednesday August 02, 2017 @04:40PM (#14914391)
It's just training. Buy and use a RPN calculator and lisp suddenly seems normal.

(To answer your question directly, yes it's readable. You learn to look past the syntax in lisp the same as you stop reading semi-colons and curly braces in other languages)

Re:Hy – A Lisp-flavored Python by chx on Thursday August 03, 2017 @06:23AM (#14918353)
Normal? It's upside down! I am a die hard RPN fan, started with a HP 32S when I was 14 years old almost three decades ago, upgraded to a HP 48G a few years old (well, kind of a 48G - 48GX hybrid, a friend of mine and I hacked it to 512K SRAM, gosh, hand soldering those little TSOP legs, brrr, we just stacked them chips and ran the data legs together, those were the days).

But this is alien and hard to read, RPN should be _reverse_ polish notation, you know? And + 1 2 3 is weird because it makes + a three argument operation, or I guess in this case, variable number of arguments. 1 2 3 + + is easy to read and understand :)

Re:Hy – A Lisp-flavored Python by gkya on Wednesday August 02, 2017 @09:05PM (#14916143)
M-x calc!
Re:Hy – A Lisp-flavored Python by xelxebar on Thursday August 03, 2017 @01:49AM (#14917235)
Or if you're a fan of cli tools, check out dc!
Re:Hy – A Lisp-flavored Python by vram22 on Thursday August 03, 2017 @11:30AM (#14920426)
For people who prefer infix, bc was/is a more user-friendly wrapper over dc. See:

$ man bc

and

https://en.wikipedia.org/wiki/Bc_(programming_language)

I normally invoke it with:

$ bc -l

to get more digits of precision after the decimal point (see Wikipedia page).

Excerpt:

[ bc first appeared in Version 6 Unix in 1975 and was written by Robert Morris and Lorinda Cherry of Bell Labs. bc was preceded by dc, an earlier arbitrary-precision calculator written by the same authors. dc could do arbitrary-precision calculations, but its reverse Polish notation (RPN) syntax was inconvenient for users, and therefore bc was written as a front-end to dc. bc was a very simple compiler (a single yacc source file with a few hundred lines), which converted the new, C-like, bc syntax into dc's postfix notation and piped the results through dc. ]

Note that GNU bc is no longer a front-end to dc:

[ In 1991, POSIX rigorously defined and standardized bc. Two implementations of this standard survive today: The first is the traditional Unix implementation, a front-end to dc, which survives in Unix and Plan 9 systems. The second is the free software GNU bc, first released in 1991 by Philip A. Nelson. The GNU implementation has numerous extensions beyond the POSIX standard and is no longer a front-end to dc (it is a bytecode interpreter). ]

Also, you can pipe the standard output of any other (filter) command into bc, and likewise, pipe bc's output to any other filter.

Re:Hy – A Lisp-flavored Python by unkown-unknowns on Thursday August 03, 2017 @02:57AM (#14917500)
I use dc every now and then but I wish it'd do decimal math by default.

    9 35 5 12 *+/p
Furthermore I think it's strange that the order of the operands of the division operator is divisor as top-most value on the stack and dividend as second top-most value and not the other way around.

For example, to me it'd feel more natural if

    3 5 /p
was equivalent to

    5 / 3
in infix notation, not

    3 / 5
Because when I think of a fraction I think of it as "dividend over divisor".

Edit: Actually I Googled and it makes sense now. I've been focusing on what's on the stack but if we look at what is provided as input instead then it becomes "calculate dividend, calculate divisor, divide". Longer example which shows this:

Algebraic expression

    (4 + 2 * 5) / (1 + 3 * 2)
RPN

    4 2 5 * + 1 3 2 * + /
Re:Hy – A Lisp-flavored Python by boomlinde on Thursday August 03, 2017 @05:15AM (#14918080)
Some distributions use a ".dcrc" or some such that will be executed on startup. Dump "3k" in there to set the precision.

The order of the operands of non-commutative operators reflects popular RPN calculators and Forth. You can swap the topmost elements of the stack with "r", for example "3 5r/p"

Re:Hy – A Lisp-flavored Python by gkya on Wednesday August 02, 2017 @08:59PM (#14916115)
Maths in lisp is like learning a language with a different alphabet, it's confusing at first, then becomes natural. I myself prefer lisp's syntax especially for maths and parenthesise heavily in other languages because in you can never know how tightly they follow mathematical association rules, and that can be a source for really annoying bugs. Generally the total absence of syntactical ambiguity in lisp is really relieving (tho lots of complexity is shifted into macro expansion, which is less intriguing for me as macroes allow easy inspection whereas core language constructs not so much).
Re:Hy – A Lisp-flavored Python by benji-york on Wednesday August 02, 2017 @09:13PM (#14916178)
> you can never know how tightly they follow mathematical association rules

You might be interested in the way Pony (https://www.ponylang.org/) handles mathematical order of operation rules: it doesn't. Runs of like-operator are allowed, but any complex expression has to have all the operations grouped by parentheses so as to remove any ambiguity.

Re:Hy – A Lisp-flavored Python by gnaritas on Thursday August 03, 2017 @12:13AM (#14916908)
Smalltalk and Lisp work that way as well; operator precedence is an illogical hangover from the blackboard and chalk era; it's a needless complication that greatly simplifies both the language and understanding when removed.
Re:Hy – A Lisp-flavored Python by klibertp on Thursday August 03, 2017 @04:58AM (#14918012)
Yes! Now try telling this to some more mathematically oriented people. The opposition is so violent that I stopped trying long ago :(
Re:Hy – A Lisp-flavored Python by gnaritas on Thursday August 03, 2017 @12:51PM (#14921237)
> mathematically oriented

i.e. the blackboard indoctrinated. It's much harder to unlearn something than to learn something, you have to show them what they think is "natural" isn't, it's just what they were taught and it's based on laziness not intelligence and implicit hidden rules are bad and lead to ambiguity. Operator precedence is simply stupid. In Lisp and Smalltalk, operators are just ordinary functions and the lack of precedence makes everything simpler across the board.

Re:Hy – A Lisp-flavored Python by rthomas6 on Friday August 04, 2017 @01:20PM (#14930234)
As a Python user who read about 60% of SICP, yes it really is readable.

The trick is to realize that in lisps open-parenthesis denotes something more than a grouping. ( means "function call", and a change in scope.

So if it really was written in Python, it would look something like this:

  setv(result, sub(div(add(1, 2, 88), 2), 8))
Really, this is clearer what's happening under the hood than infix notation. + is a function, and so is =. Why is it called the way that it is, other than convention? It's just syntactic sugar. Doing it with prefix notation makes every function have the same syntax, which makes nesting functions easier to look at and reason about.
Re:Hy – A Lisp-flavored Python by dragonwriter on Wednesday August 02, 2017 @07:06PM (#14915481)
Prefix notation is something you get used to; it's not as easy as infix for operations that use the same infix operators with the same meaning and priority in the domain (e.g., math) but real programming languages often use operators that aren't standard math operators and have precedence and/or associativity quirks with the operators they use which increase overhead. Prefix notation is basically everything-is-a-function, which I think is ultimately less overhead overall, though still more for simple math, than infix.

Indentation can help, too.

Re:Hy – A Lisp-flavored Python by 6581 on Wednesday August 02, 2017 @04:50PM (#14914512)
I have been using RPN calculators for all my life (except when I was forced to use infix calculators in school). Your first example is at least as readable to me as the second one. Just read it from inside to outside instead of from left to right.
Re:Hy – A Lisp-flavored Python by dunham on Wednesday August 02, 2017 @09:43PM (#14916294)
In school, RPN occasionally caused trouble for me as I could work through an entire problem (leaving values on the stack) without writing down any intermediate steps.
Re:Hy – A Lisp-flavored Python by breck on Wednesday August 02, 2017 @06:56PM (#14915425)
I'm a Lisper (and Pythoner) and strongly agree, the first one is not readable. I would say it's gross. It boggles my mind that Lispers haven't taken that problem seriously. I have taken it very seriously and have been working on it for years.

I just started publishing my results.

http://breckyunits.com/the-flaw-in-lisp.html

What I've discovered is that the parentheses are completely unnecessary in Lisp, and in fact cause much harm by making Lisp harder to read and maintain in the long run. Drop the parentheses in Lisp by switching to whitespace/geometry for syntactic structure and you suddenly have the dream language.

Your example above would be something like:

  setv result
   -
    /
     + 1 3 88
     2
    8
You might think that looks a little strange too at first, but the neat thing about that code is you can write it on a piece of graph paper, draw lines around each word, connect the indented nodes, and you'd have a tree visualization of your syntax code without doing a single transformation of the source.
Re:Hy – A Lisp-flavored Python by kod on Wednesday August 02, 2017 @07:13PM (#14915521)
Yeah, whitespace sensitive languages are a great idea...

Until you permanently lose user data because of a pull request that contained whitespace changes.

Yes, I've seen this happen in production, yes it could have been prevented in other ways... but why invite disasters like that upon yourself?

Re:Hy – A Lisp-flavored Python by simonh on Wednesday August 02, 2017 @08:27PM (#14915951)
Have you really never seen a bug in curly brace code due to a misplaced curly bracket hidden by incorrect indenting? Or code that was just really difficult to understand and modify accurately because it was indented inconsistently with the braces? And yes there are tools that can help with that, but...

I worked on Quartz for a few tears, that's over 10 million lines of Python code and many thousands of commits per day. If concerns like that really were anything more than nitpicking, projects like that would know about it.

Re:Hy – A Lisp-flavored Python by kazinator on Wednesday August 02, 2017 @11:39PM (#14916794)
Discrepancy between actual code structure and indentation is susceptible to diagnosis by machine. That's the beauty of having a bit of redundancy in the representation.

Recent GCC now has a warning for indentation that doesn't match code structure. (Had to recently patch a breakage in GNU Binutils in an embedded distro due to this being a -Werror).

Re:Hy – A Lisp-flavored Python by kod on Wednesday August 02, 2017 @09:08PM (#14916157)
The point is with lisp you can automatically and unambiguously parse and format code regardless of whitespace. Giving that up in favor of whitespace sensitive languages has real world drawbacks, no matter how many "no true python programmer" arguments you make.
Re:Hy – A Lisp-flavored Python by JadeNB on Thursday August 03, 2017 @09:25AM (#14919306)
> I worked on Quartz for a few tears

This lovely typo deserves to be noticed.

Re:Hy – A Lisp-flavored Python by mulmen on Wednesday August 02, 2017 @07:38PM (#14915671)
Is that a problem with whitespace or your test/qa/release process? A curly brace language isn't any less likely to lose user data to a bug just because it has curly braces.
Re:Hy – A Lisp-flavored Python by kod on Wednesday August 02, 2017 @08:12PM (#14915888)
It is less likely to cause problems, because a removed curly brace won't parse correctly, and won't be hidden when someone excludes whitesoace from a diff.
Re:Hy – A Lisp-flavored Python by JadeNB on Thursday August 03, 2017 @09:29AM (#14919335)
> won't be hidden when someone excludes whitesoace from a diff.

Surely it is good advice not to exclude whitespace from a diff when using a whitespace-sensitive language?

Re:Hy – A Lisp-flavored Python by pharrington on Wednesday August 02, 2017 @10:04PM (#14916391)
Your -if- clause sans curly braces definitely still parses.
Re:Hy – A Lisp-flavored Python by jjnoakes on Wednesday August 02, 2017 @10:22PM (#14916463)
Depends on the language.
Re:Hy – A Lisp-flavored Python by lgas on Thursday August 03, 2017 @01:32AM (#14917165)
Technically true, but I mean c'mon... Java, JavaScript, C, C++, C#, PHP... You have to get down to into the Go/Swift neighborhood before you'll find mandatory braces.
Re:Hy – A Lisp-flavored Python by breck on Wednesday August 02, 2017 @07:45PM (#14915722)
This is a great concern, and glad you brought it up.

In ETNs (the new family of programming languages I'm talking about), there are no "whitespace changes", in the sense that all changes to the code affect actual nodes in the program.

This is a really important property that embeds diffs with a whole lot more meaning. You can not only see the number of lines changed, but also the number of nodes changed. If you expected a change to only change content and not change any nodes, and you saw in a negative number in the nodes changed field, you would know immediately that something had gone wrong.

This is one of the many new beneficial properties unique to these languages.

Re:Hy – A Lisp-flavored Python by kod on Wednesday August 02, 2017 @08:10PM (#14915878)
Unless your language is somehow changing the behavior of existing tools like diff -w or github ?w=1, you're just making semantic distinctions.
Re:Hy – A Lisp-flavored Python by breck on Wednesday August 02, 2017 @08:44PM (#14916041)
Correct. We have new diff tools specifically for ETNs.
Re:Hy – A Lisp-flavored Python by gnaritas on Thursday August 03, 2017 @12:18AM (#14916926)
No, that's not changing the behavior of the existing tools everyone uses and aren't going to stop using. You can't say correct when you're not actually agreeing with his point.
Re:Hy – A Lisp-flavored Python by breck on Thursday August 03, 2017 @01:57AM (#14917273)
Perhaps I misunderstood the parent comment.

It changes the behavior in the sense that there is no w=1 option. All whitespace is significant. The idea of ignoring whitespace would be like the idea of ignoring angle brackets in html. Whitespace is an essential part of TN and ETNs and is never ignored.

Diff tools then can benefit by showing not only aggregate line diffs but aggregate node and word level diffs without knowing anything about the meaning of a program.

Re:Hy – A Lisp-flavored Python by olavk on Thursday August 03, 2017 @03:17AM (#14917576)
Well, if you randomly delete parentheses in Lisp or curly braces in C you will also get problems. So...don't delete information at random.
Re:Hy – A Lisp-flavored Python by dragonwriter on Wednesday August 02, 2017 @08:19PM (#14915913)
> Drop the parentheses in Lisp by switching to whitespace/geometry for syntactic structure and you suddenly have the dream language.

This has been “discovered” many times, but somehow this dream language never approaches even Lisp in popularity. (Though a loosely similar transformation of it's basic ML-based syntax is used in Haskell to reduce parens, but that's not a Lisp base.)

Re:Hy – A Lisp-flavored Python by breck on Wednesday August 02, 2017 @08:39PM (#14916012)
> This has been “discovered” many times,

So far I'm only aware of one previous discovery--https://srfi.schemers.org/srfi-49/srfi-49.html--, which nsajko pointed me to a couple weeks ago, (https://news.ycombinator.com/item?id=14606595). Are you aware of other identical or near identical implementations? The tiniest details matter here. I'd be very interested in more.

> but somehow this dream language never approaches even Lisp in popularity.

Agreed! That's what I'm hoping to help change. It's going to be a long slog, but I'm very confident the math works out and it's going to happen. The tooling needs to be built to take advantage of the properties of these languages before they will catch on. But once that happens, I think we're in for a whole new world in programming.

Re:Hy – A Lisp-flavored Python by kbp on Thursday August 03, 2017 @01:42PM (#14921822)
Logo lets you leave out parentheses most of the time, except to use rest arguments or force grouping. For example:

    ? print list sum 0 1 2
    1 2
That expression parses as (print (list (sum 0 1) 2)) because both list and sum normally take 2 arguments. However, using the parenthesised function call syntax, you can pass them however many you like:

    ? (print (list 1 2 3 (sum 1 1 1 1)))
    1 2 3 4
Or you can of course mix and match (probably to better effect than this example):

    ? print (list 1 2 sum 1 2 4)
    1 2 3 4
Logo also lets you use infix arithmetic operators with normal precedence:

    ? print 1 + 2 * 3 + 4
    11
Re:Hy – A Lisp-flavored Python by breck on Thursday August 03, 2017 @04:14PM (#14923386)
I love Logo! Advanced Logo by Michael Friendly is one of my programming books.

Logo came very close to TN and ETNs but adding the parens and other visible syntax I believe was a design mistake. It's not obvious, but when working with large programs in 2 and 3 dimensions (only possible with parens free lisp, or ETNs as we call them), you gain tremendous productivity benefits

Re:Hy – A Lisp-flavored Python by dTal on Friday August 04, 2017 @06:35AM (#14927654)
>Are you aware of other identical or near identical implementations?:

srfi-110, srfi-119.

Re:Hy – A Lisp-flavored Python by breck on Saturday August 05, 2017 @01:44PM (#14936864)
Thanks!

Some thoughts on 110 and 119 in my comment below.

Re:Hy – A Lisp-flavored Python by emmelaich on Wednesday August 02, 2017 @08:32PM (#14915978)
e.g. http://chrisdone.com/z/

Fascinating but I don't think it has many users!

A quote from that page...

    (Note: there are no parentheses in Z. Zero.)

    Which, if you think about it, is the natural
    grouping for the definition of the name
    argument syntax I gave above.

    To pass additional arguments to a function,
    the arguments are put on the next line and
    indented to the column of the first argument:
Re:Hy – A Lisp-flavored Python by breck on Wednesday August 02, 2017 @08:43PM (#14916035)
I love Z but think there are a few details that are off.

1. A single space for indenting nodes works much better. 2. strings don't need quotes.

Re:Hy – A Lisp-flavored Python by anaphor on Wednesday August 02, 2017 @06:58PM (#14915444)
The problem is that it requires all of your functions to have a fixed arity I think, or at least a lower bound on the arity, or you use newlines as part of the syntax. Check out this https://shriram.github.io/p4p/
Re:Hy – A Lisp-flavored Python by breck on Wednesday August 02, 2017 @07:42PM (#14915688)
Very interesting link, thanks for sharing. I'm always eager to see developments in the Racket world.

> The problem is that it requires all of your functions to have a fixed arity I think, or at least a lower bound on the arity, or you use newlines as part of the syntax.

This was my initial thought as well.

However, in my latest batch of ETNs (the name I give to these types of lisps), I've found that a simple convention of putting any variadic argument last seems to work well.

An example may help. Here would be a language blueprint that defines 2 node types:

  =+2
   description Adds two numbers
   pattern resultIdentifier number number
  =+
   description A variadic adder of unknown arity
   pattern resultIdentifier number+
Here's a sample program in the language we partially defined above:

  =+2 sum 2 5
  print sum
  # prints 7

  =+ sum 1 2 4
  print sum
  # prints 7
Re:Hy – A Lisp-flavored Python by flavio81 on Thursday August 03, 2017 @12:56PM (#14921303)
>I'm a Lisper (and Pythoner) (...) It boggles my mind that Lispers haven't taken that problem seriously. I have taken it very seriously and have been working on it for years. I just started publishing my results. http://breckyunits.com/the-flaw-in-lisp.html

Honestly, there is no flaw in the parentheses. You just need to write more Lisp.

The parentheses are one of the best things in Lisp.

Re:Hy – A Lisp-flavored Python by breck on Thursday August 03, 2017 @04:12PM (#14923352)
Disagree. The parens are a missed opportunity. If you use geometry instead, you gain extraordinary new powers of analyzing and editing large programs in 2 and 3 dimensions. Not possible with the parens. The benefits still are not obvious but we're working on publishing more data and tools
Re:Hy – A Lisp-flavored Python by flavio81 on Thursday August 03, 2017 @08:41PM (#14925415)
Well, then have fun programming in Befunge, exactly the programming language that will fullfill your bidimensional desires.
Re:Hy – A Lisp-flavored Python by breck on Saturday August 05, 2017 @01:42PM (#14936854)
Sadly, I've worked with some code bases before that may have been more fun to work on if they were in Befunge.
Re:Hy – A Lisp-flavored Python by blain_the_train on Wednesday August 02, 2017 @09:13PM (#14916179)
Take a look an Parinfer https://shaunlebron.github.io/parinfer/. Which essential makes clojure a whitespace language with indent mode.
Re:Hy – A Lisp-flavored Python by breck on Wednesday August 02, 2017 @09:47PM (#14916320)
Super interesting.

I wonder if the creator has considered just not having parens at all?

Re:Hy – A Lisp-flavored Python by undershirt on Thursday August 03, 2017 @01:48AM (#14917229)
Re:Hy – A Lisp-flavored Python by breck on Thursday August 03, 2017 @02:01AM (#14917292)
Interesting, I should have been clearer when I said not just no parens, but also just whitespace instead of any syntax characters. The none language uses both () and "". Sweet expressions use {}. And indent-clj uses () and [].
Re:Hy – A Lisp-flavored Python by blain_the_train on Wednesday August 02, 2017 @10:04PM (#14916387)
I have had the same thought. I'm guessing, given how long lisp has been around. That the ideas is well research.
Re:Hy – A Lisp-flavored Python by amelius on Thursday August 03, 2017 @03:20AM (#14917579)
I'm using this same approach in a side project. The idea is very old. See e.g. [1] and the references therein.

[1] https://srfi.schemers.org/srfi-119/srfi-119.html

Re:Hy – A Lisp-flavored Python by breck on Thursday August 03, 2017 @11:59AM (#14920699)
Very cool! Is wisp yours? I learned of SRFI 49 just over a month ago. I reached out to Egil and hope will be able to chat with him this summer.

As 110 and 119 also note, Egil was on to something. Although I came to it from a different angle, I think he had it about 90% correct.

My contribution is identifying the split between TN and ETNs, and then getting the details perfect with TN. Getting the details perfect meant showing how to craft it so that every single input was a valid TN program. My motivation was, if you can write it/build it in real physical life (3D world), or in other words, if nature allows it, then why shouldn't your compiler? I think 49 missed a few tiny details (like " It is an error if neither one of the leading space/tab seqquences are a prefix of the other, nor are they "...in my TN, there are no errors, and extra spaces are translated into separators for empty words).

Re:Hy – A Lisp-flavored Python by gnaritas on Thursday August 03, 2017 @12:15AM (#14916914)
> by switching to whitespace/geometry for syntactic structure and you suddenly have the dream language.

Nope, you've just made it awful, white-space with syntactic meaning is just god-awful. It's the worse thing about Python, there's a reason it's not a more popular language feature.

Re:Hy – A Lisp-flavored Python by breck on Thursday August 03, 2017 @11:37AM (#14920487)
I actually agree.

Unless done perfectly, whitespace with syntactic meaning languages are quite annoying.

If I had a nickel for every time I had a tab vs space bug in Python when I was first starting to code.

Re:Hy – A Lisp-flavored Python by kirbyfan64sos on Friday August 04, 2017 @07:13PM (#14933141)
Well, now Python 3 doesn't allow tabs anyway. ;)
Re:Hy – A Lisp-flavored Python by breck on Saturday August 05, 2017 @01:38PM (#14936833)
I got it excited when I read your comment, but turns out it still allows tabs, just not mixing. :(
Re:Hy – A Lisp-flavored Python by pvdebbe on Thursday August 03, 2017 @07:09AM (#14918539)
The thing is that usually basic algebra like this occurs somewhat seldomly in code. The rest of the function calls are readable, this is the (only) outlier to readability.
Re:Hy – A Lisp-flavored Python by zeveb on Wednesday August 02, 2017 @07:04PM (#14915475)
I'd say that they're about equally (un)readable. What do you think of:

    (setf result (make-instance 'foo :bar (baz quux)))
vice:

    result = new Foo(bar=baz(quux))
The first is simple to write a parser for, but the second is … evil.
Re:Hy – A Lisp-flavored Python by dustingetz on Wednesday August 02, 2017 @05:58PM (#14915072)
In clojure you write it like this, so the parens indicate scope. No need to mutate an environment here. dunno about hy

    (let [result (- (/ (+ 1 3 88) 2) 8)]
      ; result defined inside the expression only
      )
Re:Hy – A Lisp-flavored Python by eggy on Thursday August 03, 2017 @06:38PM (#14924607)
I am a polyglot, so no, I don't find it unreadable. I would probably structure it differently.

I always wonder why Lisp never ceases to get singled out for parentheses when each language uses parentheses, braces, semicolons, colons, pipes, etc...

I program in C, Forth\Factor, Lisp/Scheme, Python, J, APL, F#, C#, Asm, Basic, Clojure and others. Each has their syntax and differences, and it just takes getting used to them.

I like Hy, but as the documentation says it is not Lisp or Clojure, but Homoiconic Python with that guiding and constraining its implementation. A lot of fun, really. I only get as much pleasure from J for play.

Re:Hy – A Lisp-flavored Python by kazinator on Thursday August 03, 2017 @11:38PM (#14926153)
> I always wonder why Lisp never ceases to get singled out for parentheses

POSIX shell:

   FOO=$(basename $(dirname $(cat file)))
Make:

   OBJS=$(foreach x,$(WHATEVER),\
           $(addprefix $(call BLAH,arg),....))
Re:Hy – A Lisp-flavored Python by swiley on Wednesday August 02, 2017 @04:44PM (#14914452)
I'd imagine it's like FORTH: If you read enough of it (it only takes a few days of reading) it becomes clear.
Re:Hy – A Lisp-flavored Python by throwaway135634 on Wednesday August 02, 2017 @10:43PM (#14916566)
In my experience, the hardest part about reading Forth is recognizing when a word doesn't use RPN because of metaprogramming
Re:Hy – A Lisp-flavored Python by klibertp on Thursday August 03, 2017 @03:57AM (#14917762)
I have a blog post about this: http://klibert.eu/posts/tools_for_lisp_syntax.html (with pictures: http://klibert.eu/statics/images/lisp-editor-features1.png).

Basically, in my opinion, what makes a difference in readability is the tooling a certain kind of syntax enables. As you can see on my "Languages" page I have been trying out new languages for quite a while now, and so I've seen all levels of syntactic helpers. The syntax itself is actually a secondary concern: it's really not that important if your editor can easily generate it, manipulate it, and display while hiding parts of it for you.

However, how easy it is to write such tooling for a language depends on the kind of syntax it uses. Languages with more complex grammars are generally harder to support properly in the editor. Of course, how good the tools are, depends also on a level of effort invested in making them so - so relatively complex, but popular, languages may still have better editor support.

Anyway, back on topic of Lisp: yes, you get used to the prefix notation to the point that - after a long while, mind you - you're able to open a Lisp file in Notepad and still easily read it. No one does it, though, unless forced for some reason - things like:

  - blink the matching paren, display parens as rainbow colored
  - jump to matching paren
  - jump to inside next expression
  - reliably select current block of code
  - fix indentation automatically when copy&pasting code
  - split ( (..|..) -> (..)|(..) ), join, transpose, extend the current expression
  - convolute, which means making the nested (inner) expression the outside one
all of this makes Lisp readable, and probably more readable than some other languages with much more complex grammars. Lisp is not the only language with such a "feature" - recently I found Idris to be very good in this regard, both Erlang and (even more so) Elixir are similar, some (popular) brace languages too.

Then there's a thing about macros and trivial AST manipulation in Lisp, arguably enabled by the syntax being as it is. You can have pattern-based macros in any language, actually (see Nim, or Dylan), but the raw AST being identical to the code makes certain kinds of imperative macros much easier to write. Again, take a look at Nim: is has imperative macro facility, but for every piece of syntax you want to introduce you need to call a special constructor.

Re:Hy – A Lisp-flavored Python by flavio81 on Thursday August 03, 2017 @02:15PM (#14922176)
> Do you just get used to this, or is it something that you have to keep struggling with?

You get easily used to parenthesis and you start loving them, since the auto-indenting (on any good Lisp editor) can make you have very readable code. In fact, Common Lisp, having so much versatility in control flow operators (and, in general, a ton of handy helper functions), lets you write really readable code, and often that is the case. So highly readable, that the downside is that the common Common lisper (pun intended) feels no need to add comments in the code...

As for your formula

(setv result (- (/ (+ 1 3 88) 2) 8))

It can be written in a more readable way. As user "brudgers" wrote above:

   (- (/ (+ 1 3 88)    
         2)         
      8)           
... and it gets more evident.

As for "result", usually in Lisp you don't need to have such a variable since the last expression returned by a function automatically becomes the return value of the function.

Re:Hy – A Lisp-flavored Python by ifelsehow on Wednesday August 02, 2017 @04:45PM (#14914461)
As @jwr says, there are different paradigms in Lisp, such that you would never really write code like this.
Re:Hy – A Lisp-flavored Python by didibus on Wednesday August 02, 2017 @10:59PM (#14916633)
I got used to it, now I almost have the reverse problem.

Having said that, sometime for math, infix operators for complex equations are easier, and its easy to write a macro in Lisp to let you do that too:

(setv result (infix ((1 + 3 + 88) / 2) - 8))

Re:Hy – A Lisp-flavored Python by ohyes on Wednesday August 02, 2017 @10:30PM (#14916500)
I was never any good at math in the first place, order of operations always screwed me up, still does. Order of operations actually makes no sense at all (if you really think about it). So yeah, lisp is easier for me.
Re:Hy – A Lisp-flavored Python by ohyes on Wednesday August 02, 2017 @10:33PM (#14916513)
Compare to:

1 + 3 + 88 / 2 - 2

Or (1 + 3 + 88) / 2 - 2

Or (1 + 3 + 88) / (2 - 2)

If it comes down to it, I'm going to fully parenthesize the stupid thing anything else is difficult to parse. If I'm using all the parens, prefix is fine.

Re:Hy – A Lisp-flavored Python by endgame on Wednesday August 02, 2017 @11:22PM (#14916730)
I've only written a small amount of elisp but I've found that while you don't actually do all that much arithmetic manipulation, the ease of manipulating S-Expressions outweighs the price of entry.
Re:Hy – A Lisp-flavored Python by a-saleh on Thursday August 03, 2017 @05:07AM (#14918049)
Well, when using clojure and needed to deal with lot of math I usually used some sort of infix macro, i.e. [1].

Otherwise, I wasn't really bothered by the brackets. And most of the time I would be using some sort of threading macro anyway [2], such as -> mthomas suggested in one of the responses.

[1] https://github.com/rm-hull/infix [2] https://clojure.org/guides/threading_macros

Re:Hy – A Lisp-flavored Python by jrs95 on Wednesday August 02, 2017 @07:18PM (#14915559)
I find it difficult to read if I just try and read it left to right, but if I simply go directly to the innermost operation its not really much more difficult for me. And I’m not a lisp user, either.
Re:Hy – A Lisp-flavored Python by IgorPartola on Wednesday August 02, 2017 @10:31PM (#14916504)
Since I can't edit, I'll reply to my own comment. This is not my example, but one I pulled straight from Hy's tutorial at https://hy.readthedocs.io/en/stable/tutorial.html#basic-intr.... I don't think I could have dreamt up code like this.
Re:Hy – A Lisp-flavored Python by cutler on Wednesday August 02, 2017 @05:43PM (#14914943)
It's not merely a matter of syntax or taste. Lisp's code-as-data and advanced macros are made possible by its s-expressions.
Re:Hy – A Lisp-flavored Python by deathanatos on Wednesday August 02, 2017 @05:03PM (#14914626)
This is the main reason Lisp has just never grown on me. I'm certain — and other responses demonstrate — that the readability can certainly be improved here. Yes, a programming language needs nothing more than parens. But dedicating a tastefully chosen set of sigils seems to make a lot of difference, in my opinion.
Re:Hy – A Lisp-flavored Python by kazinator on Wednesday August 02, 2017 @07:23PM (#14915579)
In the dialect called TXR Lisp, I have introduced precisely that: some tastefully chosen syntactic sugars which do not disturb the structure of the surrounding Lisp. I believe I made a wise choice by not targetting arithmetic. My syntactic inventions target areas like working with arrays, string processing, OOP and higher order functions.

Small taste:

  1> (let ((x "abc") (y "def"))
       (swap [x 0..2] [y 2..:])
       (list x y))
  ("fc" "deab")

  2> (mapcar (ret `@1-@2`) "abc" "def")
  ("a-d" "b-e" "c-f")

  3> '#"lorem ipsum dolor sit"
  ("lorem" "ipsum" "dolor" "sit")

  4> (let ((a "dolor")) ^#`lorem ipsum @,a sit`)
  #`lorem ipsum dolor sit`

  5> (eval *4)
  ("lorem" "ipsum" "dolor" "sit")

  7> (defstruct (point x y) nil (x 0) (y 0))
  #<struct-type point>

  8> (new point)
  #S(point x 0 y 0)

  9> (new (point 1 2))
  #S(point x 1 y 2)

  10> (new point x 2 y 3)
  #S(point x 2 y 3)

  11> (let ((a (new (point 10 20))))
        ^(,a.x ,a.y))
  (10 20)

  12> (let ((a (new (point 10 20))))
        `<@{a.x}, @{a.y}>`)
  "<10, 20>"

  13> (defmeth point distance (p) (sqrt (+ (* p.x p.x) (* p.y p.y))))
  (meth point distance)

  14> (new (point 3 4)).(distance)
  5.0

  15> (defmeth point distance-to (p q)
        (let ((r (new (point (- q.x p.x)
                             (- q.y p.y)))))
          r.(distance))) 
  (meth point distance-to)

  16> (new (point 3 4)).(distance-to (new (point 20 30)))
  31.0644491340181

  19> (let ((pts (build (dotimes (i 10) (add (new (point (rand 10)
                                                         (rand 10))))))))
        pts)
  (#S(point x 5 y 6) #S(point x 1 y 1) #S(point x 1 y 3) #S(point x 5 y 7)
   #S(point x 2 y 8) #S(point x 7 y 3) #S(point x 1 y 1) #S(point x 2 y 4)
   #S(point x 5 y 6) #S(point x 5 y 3))

  20> (mapcar .(distance) *19)
  (7.81024967590665 1.4142135623731 3.16227766016838 8.60232526704263
   8.24621125123532 7.61577310586391 1.4142135623731 4.47213595499958
   7.81024967590665 5.8309518948453)

  21> (mapcar (ret @1.(distance-to @2)) *19 (cdr *19))
  (6.40312423743285 2.0 5.65685424949238 3.16227766016838 7.07106781186548
   6.32455532033676 3.16227766016838 3.60555127546399 3.0)
Re:Hy – A Lisp-flavored Python by kbp on Wednesday August 02, 2017 @05:05PM (#14914640)
I understand this point of view if most of your programs are just doing arithmetic, but once you start using functions and procedures the differences are pretty minimal.
Re:Hy – A Lisp-flavored Python by jlarocco on Wednesday August 02, 2017 @09:56PM (#14916360)
It takes some getting used to, but eventually the Lisp style is just as readable as the non-Lisp style.

For actual coding (in an editor vs reading in a browser) it's even easier with things like matching parenthesis highlight, jump to matching brace, and rainbow parenthesis mode.

Re:Hy – A Lisp-flavored Python by cannonpr on Wednesday August 02, 2017 @06:04PM (#14915110)
I used to be mostly a Python guy, fell in love with Clojures syntax, you get used to it surprisingly fast, and it's caused me less headaches than 'interesting' pythonic syntax. That having been said, I still love Python too.
Re:Hy – A Lisp-flavored Python by erikpukinskis on Wednesday August 02, 2017 @06:40PM (#14915337)
I would never use a variable name like result, it's meaningless. And the inner values should be labeled too, with their own variable names. Any compiler worth its salt will optimize the names away.
Re:Hy – A Lisp-flavored Python by dmoney on Thursday August 03, 2017 @01:54AM (#14917256)
As a Python-lover who previously played with Common Lisp and Clojure, lispy syntax took less getting used to than having no end tags, but I'm still not used to prefix math.
Re:Hy – A Lisp-flavored Python by platform on Thursday August 03, 2017 @04:13PM (#14923360)
prefix notation mimics of how we call functions

   setv result  (my_function  arg1, arg2)
to me this is as readeable as

   set result= my_function( arg1, arg2)
I realize that specifically arithmetic expressions in prefix notation look foreign, however I think most of the code are function calls -- and that's very normal.

If I would to think of an example where LISP notation is un natural -- it would be the if-statements.

Re:Hy – A Lisp-flavored Python by asimjalis on Thursday August 03, 2017 @01:33AM (#14917172)
Here is how I would write that expression in Hy.

    (-> 1 (+ 3) (+ 88) (/ 2) (- 8))
Here is how I would write the assignment, using my definition of def2.

    (defmacro def2 [value variable] `(def ~variable ~value))
    (-> 1 (+ 3) (+ 88) (/ 2) (- 8) (def2 result))
Re:Hy – A Lisp-flavored Python by cgag on Wednesday August 02, 2017 @07:48PM (#14915738)
I find it pretty readable.
Re:Hy – A Lisp-flavored Python by such_a_casual on Wednesday August 02, 2017 @09:14PM (#14916180)
Prefix notation is a problem because nothing beats the familiarity of:

    x = 10
But prefix notation is superior. You don't have to invent an order of operations out of thin air. All your functions take several arguments, not just 2. So + is now sum, - is difference, / quotient, > greater than order, etc. They aren't special. they're just like everything else.

It'll never be as familiar, but it's smarter and makes writing code easier. For example

    "hello " + name + ", welcome to the " + place +"."
    + "hello " name ", welcome to the " place "."
The reality is you want functions that work on many things, not just 2, even when you're doing math.

    1 + height + x + floor-height
    + 1 height x floor-height
infix notation does nothing to make code clearer
Re:Hy – A Lisp-flavored Python by kazinator on Wednesday August 02, 2017 @10:49PM (#14916586)
Anyway, you want string interpolation for the former example anyway:

  1> (let ((name "Alice") (place "The Palace"))
       `Hello @name, welcome to @place!`)
  "Hello Alice, welcome to The Palace!"
string interpolation is compatible with Lisp designs; it is self-contained and so doesn't "disturb" the surrounding syntax with issues of precedence and associativity. The above example is from TXR Lisp which has this built in. For Common Lisp, there is the cl-interpol and other packages, and other dialects have their own solutions.
Re:Hy – A Lisp-flavored Python by such_a_casual on Thursday August 03, 2017 @08:47AM (#14919040)
And it's pretty trivial to roll your own.
Re:Hy – A Lisp-flavored Python by torrent-of-ions on Thursday August 03, 2017 @03:33AM (#14917651)
Yes, it is. I can't say anything about being "more readable" but English is presumably "more readable" than isiXhosa for you. Reading is a skill that has to be learnt and practised. You were not born with the ability to read English or infix notation, you just got used to them.