6 ms·
Rhombus is designed to be * approachable and easy to use for everyday purposes, with a readable indentation syntax; and * uniquely customisable with an _open-
by spdegabrielle 3mo ago
Rhombus is designed to be
* approachable and easy to use for everyday purposes, with a readable indentation syntax; and
* uniquely customisable with an _open-compiler API_ that is accessible to a wide audience.
- cptmurphy 3mo agoRacket is already approachable and easy to use for everyday purposes
- bjoli 3mo agoA lot of people hate sexprs. Even seemingly reasonable folks. I imagined they have met students that really struggle with the syntax, while grokking the concepts easily. I myself have heard "the parentheses are hard to balance" and "after a while you dont even see the parentheses" enough times that I think maybe both can be correct.
- drob518 3mo agoMy editor balances my parentheses (Emacs Paredit). I rarely think about them. I just think structurally and the editor manages the details.
- psychoslave 3mo agoIt really feels like, "when I move through the wasteland, I only focus on the path and GPS is guiding me well". For some reasons, people tend to prefer having a walk in a forest rather than in z wasteland.
- drob518 3mo agoLook, if you’re committed to Blub, don’t let me talk you out of it.
- iLemming 3mo ago> when I move through the wasteland You got that exactly backwards. A non-lisper unavoidably has to deal with tons of syntactic and semantic clues - parens, colons & semicolons, square brackets, indentation & white-space, special chars, static type annotations, lsp servers and tree-sitter parsers. Lisp only needs two things - a [small] set of structural idioms, and a live REPL.
- iLemming 3mo ago> A lot of people hate sexprs In all my time I have never come across a single Lisper, neither in person nor online, and I know far more than a few dozens, who once grokked the REPL-driven workflow and the structural editing idioms only to later, for whatever reason, suddenly start disliking or even hating s-expressions. All that so-called "hatred" stems from unfamiliarity. People fuss about Lisps lacking static types, without a single clue about how a "true" REPL trades them off for something different. They compare it to a Python or C# REPL and think "it ain't a big deal". Well, the Lisp REPL is quite different, and yes, a major deal - every single part of the Read-Eval-Print-Loop differs. They complain about "hard to deal with parentheses" and "I can't refactor without types" while having no clue how amazingly nice structural editing is in practice, that you never even think about parens - you only see structure, order and reason.
- jitl 3mo agowell, i guess i know what the grandparent was talking about when they said 'I myself have heard [...] "after a while you dont even see the parentheses" enough times [...]'. Thanks for the example.
- bjoli 3mo agoAs I said, i think they have been teaching long enough to have a pretty good basis for the claim that racket's syntax can be a problem. I am firmly in the "after a while you don't see the parentheses" camp, but I have a friend who I respect a lot who works in clojure (with Emacs/cider/paredit) that just doesn't like it. I mean, I prefer sexprs above all other syntaxes, and I have had people tell me I just need to get used to indentation syntax or whatever they fancy.
- lmm 3mo ago> In all my time I have never come across a single Lisper, neither in person nor online, and I know far more than a few dozens, who once grokked the REPL-driven workflow and the structural editing idioms only to later, for whatever reason, suddenly start disliking or even hating s-expressions. And we've never seen bullet holes in these parts of the plane, so there's no point putting armour there.
- IshKebab 3mo agoIt's not unreasonable to dislike coding in s-expression syntax. It is not very readable. There's a reason the vast majority of programming languages (especially weighted by popularity) use more traditional syntax.
- iLemming 3mo ago> It is not very readable. That holds true only for two cases: - For a programmer who never learned Lisp as their first language. I have met people who learned Clojure as their very first PL and they said it was fun. Later there were utterly confused about Java, Python and Javascript. Going the opposite may feel confusing and identity-breaking. - Reading static code. In a sense, it can be a bit harder to read a wall of Lisp, say printed on paper. Lispers typically don't inspect "dead code" like that; they'd connect to the live REPL and eval expressions on the go, programming it from "inside out". With experience, it becomes easier to scan the code and mentally parse it. Lisp at that point actually gets far more readable than any other PL. For instance, Lisp code is better suited for smaller screens of smartphones - the code wraps around yet retains its readability. Try that trick with literally any other language, I can 100% guarantee - most of them would look like a huge pile of indecipherable mess.
- IshKebab 3mo ago> For a programmer who never learned Lisp as their first language Maybe. But I have never heard anyone say that Python is hard to read, and it's one of the most common complaints against Lisps. Just looking at them both it's hard to imagine how one could seriously believe that s-expressions are more readable. `(== a b)` is clearly worse than `a == b`. Even JavaScript programmers know that. > they'd connect to the live REPL Yeah I dunno this is the same cop-out Ruby programmers use to justify its lack of static typing. It's fundamentally better if you can understand code without having to run it.
- evdubs 3mo ago> `(== a b)` is clearly worse than `a == b` It's clearly worse just because it moved from infix to prefix and is wrapped by parens? Is `(* (+ a b) (+ c d))` clearly worse than `(a + b) * (c + d);`? Both have a bunch of parens, and one even has a semi colon. This works both ways. `(list 1 2 3)` is clearly better than: var l = new List(); l.add(1); l.add(2); l.add(3); It's also better than `var l = [1, 2, 3];` How often are you trying to make sense of a bunch of infix arithmetic operations when you're programming? Separately, how often are you creating data structures, navigating data structures, handling data in the form of JSON or XML, parsing that data into your language's native data structures, etc.? Reading arithmetic in prefix instead of infix is easy, even if it is counter to how you were taught in elementary school. Working with s-expressions for code and data is clearly better than whatever syntax your language uses for code and either directly instantiating data or reaching for JSON or XML. > justify its lack of static typing Racket has both Typed/Racket as well as contracts.
- jitl 3mo agoFor you, perhaps. I've never been able to get into lisp style sexpr syntax languages :'(
- ashton314 3mo ago) There matched your paren for you.
- psychoslave 3mo agoDon’t you know that :’( is actually a trigraph for meta-quote-expression·opening ? Such a a reckless move as a lone mere literal closing bracket could destabilize the cosmic equilibrium entirely!
- RetroTechie 3mo agoBeing in the Lisp family, an often heard criticism is its use of parenthesis (disclaimer: I understand the difference between syntax & semantics. But syntax does matter). Is this an issue in Rhombus? Or Racket?
- cosmicriver 3mo agoRacket is s-expression based, so it has a lot of parentheses. Racket can claim to have slightly fewer parentheses than most other Lisps because it uses brackets in some places rather than parentheses.[1] Rhombus is a novel notation (that is implemented as a Racket macro) which eliminates the need for almost all parentheses. They have a handful of code snippets on their homepage. [1] Racket doesn't distinguish between parentheses and brackets, so programs could be paren-free. In practice, brackets are only used in a few key places: https://docs.racket-lang.org/reference/if.html#%28form._%28%28lib._racket%2Fprivate%2Fletstx-scheme..rkt%29._cond%29%29 https://docs.racket-lang.org/reference/if.html#%28form._%28%...
- spdegabrielle 3mo agoI agree 100%. Racket is Awesome. The Rhombus implementation is about 70% Racket!
- ginko 3mo agoAdding significant whitespace to a new language feels like a bad choice. It's not terrible but I do think it was a bad call for Python in hindsight.
- pasquinelli 3mo agowhy do you think it was a bad choice?
- ginko 3mo agoIt‘s a source of problems with mismatched tabs/spaces being used for indentation between team members for fairly little upside. Imo it also makes moving blocks of code more cumbersome.
- miffi 3mo agoShrubbery, Rhombus's first-pass indentation-sensitive syntax, has a syntax form to facilitate copy-paste. With guillemets, « and », you can make a section of Shrubbery code indentation-insensitive. The idea for copy-paste it to "armor" the section you want to copy with guillemets in the right places, and unarmoring it after posting. This needs editor support to do fluidly, but imo it's much better than trying to copy-paste the indentation-sensitive syntax. The Guillemets syntax is described here: <https://docs.racket-lang.org/shrubbery/group-and-block.html#%28part._guillemet%29 https://docs.racket-lang.org/shrubbery/group-and-block.html#...> I can't tell from my 5 minutes of poking DrRacket whether it supports this "armoring", I've been writing Shrubbery in nvim, which, unsurprisingly, does not support it.