News for hackers. Stuff that matters.
Re:From Common Lisp to Julia by Joel_Mckay on Tuesday November 08, 2022 @01:03PM (#33522074)
Its ok to disagree friend, but when 95% percent of your bugs are syntax related rather than algorithmic design... it fails the sanity check.

Have a gloriously wonderful day =)

Re:From Common Lisp to Julia by reikonomusha on Tuesday November 08, 2022 @01:12PM (#33522200)
Lispers have been using structural editing since at least the 80s. Structural editing essentially allows modification to Lisp programs to be made as edits to a data structure with tokens. It sounds radical but it's really quite simple, at least in a language like Lisp, where

    (setf x 5)
is a piece of code that is truly and immediately represented by a data structure (a list containing the symbol SETF, the symbol X, and the number 5).

Let's do a routine example. In your editor, how would you get from

    (f x (y|)) z
to

    (f x y| z)
if the '|' was your cursor? Maybe you think you should click around and delete the right parentheses, and carefully balance them. With structural editing, a Lisp programmer might first do a "splice":

    (f x (y|)) z

    ;; splice: press Alt+s

    (f x y|) z
and then they will do a "slurp" (slang for moving the next thing after the cursor into the current enclosing parentheses):

    (f x y|) z

    ;; slurp: press Control-<right>

    (f x y| z)
We've managed to get to our destination by using only two structural commands that makes a parenthesis-mismatch error fundamentally impossible.

These are examples written with a package called "Paredit" in mind, and it actually makes editing Lisp a distinct joy compared to character-based editing of other languages. Some Lisp programmers prefer slightly different styles of structural editing, but they all reduce to the same motivations: Edit a Lisp program's structure, not its characters.

So, contrary to popular belief, Lisp programmers do not count parentheses. Lisp programmers' eyes do not glaze over at the sight of Lisp. Syntax errors are probably a <1% occurrence out of all of the errors one encounters. Though purely informally empirical, I'd be willing to get that syntax errors are far less common in Lisp compared to syntax-rich languages like C++, Haskell, etc.

People who dabble with Lisp for 15 minutes in notepad.exe invariably run into syntax errors, but that is not a reflection of what serious hobbyists and professional Lisp programmers do.

Re:From Common Lisp to Julia by Joel_Mckay on Tuesday November 08, 2022 @01:54PM (#33522748)
While I appreciate a parenthesis laden straw man argument, this just reinforces the assertion about poor readability.

Have a great day =)

Re:From Common Lisp to Julia by reikonomusha on Tuesday November 08, 2022 @02:09PM (#33522937)
Sorry, I made a mistake. You said

    Lisp has a readability issue
which I interpreted a statement of generality, but I think you meant

    Lisp is difficult for me to read
which I have no business arguing against, except to offer you guidance on what I believe are best practices for reading and writing Lisp. (In short, it's to use an editor specifically equipped to write Lisp. It gives you canonical indentation and structural editing. Emacs is the most popular choice, but there are extensions to Vim and VSCode; as well as full-blown commercial IDEs (plural!) by LispWorks and Franz Inc.)
Re:From Common Lisp to Julia by Joel_Mckay on Tuesday November 08, 2022 @02:46PM (#33523367)
again, getting sidetracked by making things personal.

You would not be upset, unless deep down you also agree this was true.

https://www.youtube.com/watch?v=q225u-qGpas

Re:From Common Lisp to Julia by corinroyal on Tuesday November 08, 2022 @11:19PM (#33527477)
When you are reduced to arguing that your opponent's passion proves your point, you know you have lost.
Re:From Common Lisp to Julia by Joel_Mckay on Wednesday November 09, 2022 @06:53AM (#33530251)
I would be interested in hearing how degenerative prefix notation affecting visual acuity relates to a cults indignation.

Having someones opinions disrespected under the guise of a off-topic counter-argument, doesn't sound much like a prize.

Here is an up-vote, and have a wonderful day. =)

Re:From Common Lisp to Julia by joeman1000 on Wednesday November 09, 2022 @04:34AM (#33529188)
Toxic kindness and skill issues right here.
Re:From Common Lisp to Julia by Joel_Mckay on Wednesday November 09, 2022 @06:32AM (#33530065)
You do realize that Julia code parsing and code-lowering are implemented in FemtoLisp a.k.a. a Scheme/Lisp dialect

And I genuinely still like you, even if you think the world is a terrible place. =)

Re:From Common Lisp to Julia by joeman1000 on Wednesday November 09, 2022 @12:32PM (#33534956)
Of course. I love both Julia and lisps. How does your comment contradict anything I’ve said?
Re:From Common Lisp to Julia by Joel_Mckay on Wednesday November 09, 2022 @04:52PM (#33538453)
Hard to say really, as I do not like to encourage off topic personal nonsense.

Have a wonderful day =)

Re:From Common Lisp to Julia by aidenn0 on Tuesday November 08, 2022 @01:18PM (#33522290)
Are you saying that Lisp has a readability issue just because you have trouble reading it?

1. I spend more time programming C than Lisp, but am more prone to syntax errors in C than lisp, so my experience is quite different than yours

2. Syntax bugs have little to do with readability; that has more to do with writeability.

3. Most languages make it possible to write code that is inscrutable, but that is not necessarily an indictment of their readability.

Re:From Common Lisp to Julia by Joel_Mckay on Tuesday November 08, 2022 @01:40PM (#33522594)
1. How quickly can you understand what others have written in a large lisp project. I found I was spending a lot of time interpreting what was going on rather than the design implementation process itself.

2. unless some clown thought conditional tail recursion was super awesome for the next guy.

3. All code is terrible, but some of it is useful... and if it is only useful to a few than it fails as a language.

Keep in mind I learned on an RPN machine, so understand the sirens song lisp sings. ;)

Re:From Common Lisp to Julia by aidenn0 on Tuesday November 08, 2022 @01:44PM (#33522653)
RE: 2

Tail recursion is non-idiomatic in Common Lisp; both because the standard does not guarantee tail-call elimination (as opposed to, say, Scheme) and because dynamic-binding, which is idiomatic in Common Lisp reduces the number of calls that are in a tail position.

Also, tail-recursion is entirely divorced from syntax; perhaps you meant semantics? For example GCC will optimize tail calls in a rather broad number of contexts.

Re:From Common Lisp to Julia by Joel_Mckay on Tuesday November 08, 2022 @02:27PM (#33523147)
If I recall correctly, some Lisp dialects had a super character that world close n open parentheses left open.

You may have confused interesting with useful...

Have a nice say ;)

Re:From Common Lisp to Julia by ortsan on Tuesday November 08, 2022 @02:09PM (#33522945)
1. In an average project Lisp would rank fairly high for me. In fact for making meaningful changes in an average quality large code base I'd rank it at the top, my order being (best first):

  Lisp, C, Java, C++, Python
It all depends, e.g., C++ would rank higher in a very high quality code base.
Re:From Common Lisp to Julia by Joel_Mckay on Tuesday November 08, 2022 @02:34PM (#33523224)
Do you find you yourself more productive from a time use perspective in lisp?

Or do you just prefer reading the structure in prefix notation.

Re:From Common Lisp to Julia by wiseowise on Tuesday November 08, 2022 @01:09PM (#33522142)
> but when 95% percent of your bugs are syntax related rather than algorithmic design... it fails the sanity check.

And you, of course, have study that proves it, right?

Re:From Common Lisp to Julia by Joel_Mckay on Tuesday November 08, 2022 @01:42PM (#33522628)
Anecdotes are funny this way, as the data is 100% accurate or 100% arbitrary.

Enhance your calm. =)

Re:From Common Lisp to Julia by wiseowise on Tuesday November 08, 2022 @02:20PM (#33523080)
QED
Re:From Common Lisp to Julia by Joel_Mckay on Tuesday November 08, 2022 @02:42PM (#33523318)
Just google "lisp syntax error" for the hit count if you are feeling petulant. =)
Re:From Common Lisp to Julia by Jach on Tuesday November 08, 2022 @03:58PM (#33524198)
"About 1,810,000 results (0.48 seconds)"

Googling "python syntax error"

"About 172,000,000 results (0.46 seconds)"

???

Re:From Common Lisp to Julia by drekipus on Tuesday November 08, 2022 @04:33PM (#33524619)
Don't get him started on python readability issues!!
Re:From Common Lisp to Julia by Joel_Mckay on Tuesday November 08, 2022 @04:54PM (#33524833)
Python is well organized, but has a fundamentally broken threading model.

Again, depends on the intended use-case. =)

Re:From Common Lisp to Julia by Joel_Mckay on Tuesday November 08, 2022 @04:47PM (#33524753)
You need to correct for the popular share of the languages.

Python is 48.07%

Lisp doesn't even show up in lists ;)

Re:From Common Lisp to Julia by kazinator on Tuesday November 08, 2022 @10:02PM (#33527083)
If the 172,000,000 figure from Google were not a brazen lie, it would indicate that for every developer on the planet using any stack, there exist several web pages mentioning Python syntax errors.
Re:From Common Lisp to Julia by Joel_Mckay on Wednesday November 09, 2022 @06:39AM (#33530137)
After a few years of seeing code build abominations, I am biased to believe that number may be plausible. Especially with automated testing frameworks dumping logs onto public areas of the web for the spiders to crawl.

I like data, but the hate in this place is unbelievable.

Have a great day, and happy computing my friend. =)