@johnabs

Org mode is great but its not intended as a generic document creation tool with all the formatting power of latex.

@lupyuen

@johnabs

My god that looks like an awful language... dont get me wrong maybe its actually fine.. but seriously lisp syntax, the uggliest and hardest to read syntax of the common choices outt here, to replace latex... i thought hte intent was to be as easy to use as markdown but as powerful as latex...

No for me one look at the example code for this tool sent me running.. I love functional languages like haskell but lisp-like formats are just offensive to my delicate eyes :)

@lupyuen

@freemo @lupyuen I personally like the lisp syntax because it enables structural editing and navigation, and the lack of \command{args} syntax which just becomes (command args). But I understand it's an acquired taste 😂

Also, this one doesn't *need* lisp syntax, it can also use emacs outline syntax which is close to org mode.

@johnabs

I mean, that is a fine argument for the need for a good formal syntax.. but it hardly needs to be of the lisp flavor.

@lupyuen

@freemo @lupyuen Well right, but I see the parens as a feature, not a bug, even though they're ugly:

"Low/simple syntax" is good for people to pick up the language and makes macro writing much simpler.

Navigating by AST branches makes rapidly locating certain pieces of your code by muscle memory/touch typing much faster.

They eliminate the need for closing tags (e.g. \end{environment}, <\head>), or the (IMO) awful syntactically meaningful whitespacing of python among other languages, so you can format it however you want.

They allow for autobalancing of parens, and automatically confer the use of "tree-sitter" esque parsers without needing to understand the compilation process to produce a concrete syntax tree (which can change when languages evolve).

As an extension of the previous point, they allow for semantically meaningful diffs as compared to character/line based diffs which dramatically improves the readability of code modifications as compared to the current standard.

For this particular case, it's a fully featured language using Guile scheme, not just a markup language, so you can extend it as much as you want, call other software, do computational experiments on a cluster and pull the data back, create and directly insert plots, and who knows what else, all from within this one tool.

Etc.

To conclude, I think lisp is aesthetically ugly, but one of the most (if not the most) practical language when it comes to building tooling to make development easier, automate tasks with macros, and to facilitate code sharing (at least with people who understand s-exp syntax), and since there are so many flavors, you can always pick your favorite 😁

Thank your for coming to my TED Talk 😂

@johnabs

I tried lisp for a few weeks and i just couldnt... maybe its purely aesthetic and im missing out... but no for whatever reason I see lisp code and i gag, I just cant :) It probably isnt fair...

@lupyuen

Unsolicited advice, lmao 

@freemo @lupyuen That's fair enough, I definitely understand the aesthetic aspect of doing knowledge work and problem solving.

.....But can I ask if you tried any of more recent developments in working with S-exp languages? I wouldn't want you missing out if there's anything I can do to convince you to give it another shot 😉 (ignore me if you've made up your mind lol)

There are quite a few Emacs packages for Lisps, such as:

[symex](github.com/countvajhula/symex.)/[paredit](emacswiki.org/emacs/ParEdit)/[lispy](github.com/abo-abo/lispy) for navigating and editing any sexp language

you can get better diffs with something like [this](n16f.net/blog/improving-git-di) or even better with something like [this](shivjm.blog/better-magit-diffs) (though it's less integrated with Magit) should be the same here, nearly universal for sexp languages

Macrostep (at least in CL) is a great feature, as you can expand macros in-place to view what they would evaluate to before runtime (and can expand them all the way down to assembly, which is pretty dope).

There's also the amazing sticker's debugging feature from SLY, which is just incredible (it let's you "mark" an sexp to grab the output of some code for testing **without** changing the source by injecting some macro around it on the back end. Easily one of my favorite debugging features).

And of course, you can't forget about the awesome "back-in-time" debugging, that prevents you from needing to unwind the stack every time your program dies, you can debug in place and re-run the last few frames without restarting the whole thing.

Anyway, I just think Lisps are awesome, particularly common lisp, despite all of their warts. They're fast, have amazing debugging, and such well defined structure for editing/analyzing/automating so much of the programming process, that I really fell in love with it. I sort of understand the rustacean mindset now, but for lisp, if that makes sense 😂

@johnabs @freemo @lupyuen How is it ugly if it enables all this? :-) There's nothing in the source code beyond what's needed. No superfluous characters; it's beautiful!

@akater @freemo @lupyuen Well, it's ugly because of the ((((((((( ))))))))) that inevitably crops up.

Of course, there are autoformatters that help with this, (and things like rainbow parens...unless you're coloblind 😅 ).

Also, there's of course the issue of the sexp being read inside out, rather than left to right (hence my love of pipes in languages like julia, but that are sorely lacking in lisps).

So yeah, they're ugly and unergonomic in the most basic ways (IMO), but in the much more complicated ways they become nearly frictionless.

@johnabs @freemo @lupyuen ((((((((( never crops up. I'm pretty sure you won't find any Lisp code with this substring in it.
@johnabs @freemo @lupyuen

> rainbow parens...unless you're coloblind

I'm not colorblind but I could never see the appeal of this. I write Lisp regularly, for my everyday stuff, for years, and I never wanted rainbow-parens. I think many people will agree that it's just extremely distracting and nothing else.

> hence my love of pipes […] that are sorely lacking in lisps

Threading macros had existed for a long time and are popular among those who want them.

“loop” reads like natural language.

For teaching little kids, I recently defined some functions and macros so that code reads like natural language. If you want it, you can have it.

@akater @johnabs @lupyuen

Different style parens for different functions helps drastically with readability. So yea...

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.