Live data from Hacker News

Racket – Lisp beyond Clojure

slides.com

121–130 of 179 posts

Re: Racket – Lisp beyond Clojure

#121

I'm not a fan of Racket, as I've made clear elsewhere. Its insistance on using as many paradigms as possible frustrates me, and while I like "batteries included" in general, I wish some things like contracts, custodians, OO system, etc. had been moved out to other libraries to make core easier to wrap your head around. I am also not a fan of syntax-case: it violates the macro abstraction, and is overly complex for wh…

Can you elaborate on how syntax-case "violates the macro abstraction", and maybe what you think is important about the quality it breaks? Not a description I've heard before. I do agree it is complicated!

Re: Racket – Lisp beyond Clojure

#122
post #28

I find DSLs to be extraordinarily powerful for writing and working with my own programs. I find them painful when I'm trying to work with other people's programs. Making a DSL lets me construct a language to express my program that meshes with the way I think. Unfortunately, we all think differently, and what is intuitive and friendly for me is hostile and awkward for others. While reading someone else's program that…

While reading someone else's program that uses a DSL may be superficially easy, but the minute you try to get under the surface, you're left scrambling to understand what a given term or idea meant to the author. There is no language definition to rely on for common understanding. I have generally found that this is the same problem as with user-defined functions, and it has the same solution: programmers need to doc…

If you need documentation probably you are not writing good code. Documentation is absolutely needed when writing third party libraries, but everyone of your team should know all the aspects of the codebase, at least at high level. If someone doesn't know it then documentation is not the solution. Doing some pair-programming, adding them as reviewers of more pull requests, writing some wiki page that explains the architecture of the various components are much more effective ways. Remember that documentation is not free, you need to spend a certain amount of time to build it and even a greater amount of time to maintain it. Every time that I've seen some attempt at writing documentation in javadoc or whatever is called in .net, there were always missing parameters in the methods, wrong arguments and method names, parameters not existing anymore and so on. Naming is also a very important aspect. Just yesterday I found in a pull request something like "SingleLineTextBoxTextTooLongShowTooltipHandler". This doesn't really add any information and just makes it impossible to understand what is meant to do. I proposed to change it to "TextOveflowTooltipHandler", maybe still not ideal, but I think that is a definite improvement over the original.

DSLs in theory should be self documenting. Gherkin is quite easy even if you don't read the documentation and even if you don't write code. If on the other end you write some Lisp-esque ultra compact DSL that has no whatsoever connection with the real world then also in that case the best solution is not to write the documentation, it should be to write a better DSL.

Re: Racket – Lisp beyond Clojure

#123
post #20
post #15

Earlier quoted context omitted.

Lisp is a family of languages that includes Racket and Clojure. C is a language, not a family of languages that includes Rust and Go. The Lisp family of languages also contains Common Lisp. In some contexts, it's reasonable to assume "Lisp" means "Common Lisp". This is not one of those contexts.

Newcomers are always confused by the distinction, this doesn't help at all to put them in the same big bag. This classification is not wrong, but mostly useless when you see how the different "dialects" evolved (they are grown-up languages, nowadays). > C is a language, not a family of languages that includes Rust and Go. But Rust and Go are constantly compared to C. We always talk about C-like languages. Maybe I sho…

There isn't really a C family maybe a not-quite c family that includes c++/java/c# languages(but not c). C isn't very statically typed. C++/java/c# are object oriented (or sort of for c++) with generics/statics/inheritance, a few functional features, limited type inference. Similar looking syntax.

Rust syntax isn't really that close to c, I think it's close to ml.

Re: Racket – Lisp beyond Clojure

#124

Earlier quoted context omitted.

Well, of course you're limiting yourself to lisps (except Scala, about which I share your dislikes). How about F#, which is a very practical functional language with good tooling on all platforms? Or Ocaml, or Haskell?

I don't use too much Windows and Mono sucks from all my previous attempts at using it so that kind of kills F# from what I hear. I tried OCaml (many) years ago, but it always seemed like a kitchen sink research language. I like well designed languages. Ones with purpose when they start out. Ones I can see a path for. Languages of accretions (Python, Ruby, Javascript, etc) don't interests me as much unless they are la…

What about Standard ML? [http://www.smlnj.org/sml.html]

Much simpler than Scala, OCaml etc.. Many would say much better designed. It is the god father of many languages. There are several very good compilers available. [http://www.smlnj.org/] [http://mosml.org/] [http://mlton.org/]

Re: Racket – Lisp beyond Clojure

#125

Earlier quoted context omitted.

Well, of course you're limiting yourself to lisps (except Scala, about which I share your dislikes). How about F#, which is a very practical functional language with good tooling on all platforms? Or Ocaml, or Haskell?

I don't use too much Windows and Mono sucks from all my previous attempts at using it so that kind of kills F# from what I hear. I tried OCaml (many) years ago, but it always seemed like a kitchen sink research language. I like well designed languages. Ones with purpose when they start out. Ones I can see a path for. Languages of accretions (Python, Ruby, Javascript, etc) don't interests me as much unless they are la…

Elixir and Erlang were built with a purpose. OCaml kitchen sink is due to use in prod btw. Like Erlang, it is a language that evolved with industry needs more than due to "research"

Re: Racket – Lisp beyond Clojure

#126
post #7

Earlier quoted context omitted.

Sure, there doesn't need to be only one. If one is more widely known it's common lisp.

I'm not so sure anymore. Scheme is at least taught in schools and isn't uncommon as a scripting language. Where are you likely to run into Common Lisp?

For me its at work.

Re: Racket – Lisp beyond Clojure

#127
post #123
post #20

Earlier quoted context omitted.

Newcomers are always confused by the distinction, this doesn't help at all to put them in the same big bag. This classification is not wrong, but mostly useless when you see how the different "dialects" evolved (they are grown-up languages, nowadays). > C is a language, not a family of languages that includes Rust and Go. But Rust and Go are constantly compared to C. We always talk about C-like languages. Maybe I sho…

There isn't really a C family maybe a not-quite c family that includes c++/java/c# languages(but not c). C isn't very statically typed. C++/java/c# are object oriented (or sort of for c++) with generics/statics/inheritance, a few functional features, limited type inference. Similar looking syntax. Rust syntax isn't really that close to c, I think it's close to ml.

> Similar looking syntax.

Exactly my point.

Re: Racket – Lisp beyond Clojure

#128
post #29

This is addressing a question I'm interested in, but on first read I'm struggling to see the value that's being presented here. - "parameterize" is great, but seems exactly the same as Clojure's "binding" on a dynamic variable. [Edit: modulo being "sticky" with regard to continuations... but Clojure doesn't have continuations, so it's a pretty subtle difference.] - Reader macros are an interesting feature, but do mov…

> - Reader macros are an interesting feature, but do move away from the syntactic regularity of LISP -- and were, AFAIK, explicitly rejected in Clojure

That does not make sense to me since clojure introduced explicit irregular syntax for things like maps and vectors. In Common Lisp the "we-the-language-developers can introduce special typography but the users cannot" thing, in constrast, doesn't exist .

Re: Racket – Lisp beyond Clojure

#129
post #64
post #39

Earlier quoted context omitted.

> Newcomers are always confused by the distinction, this doesn't help at all to put them in the same big bag. This classification is not wrong, but mostly useless when you see how the different "dialects" evolved (they are grown-up languages, nowadays). Sadly, language is determined by usage, which only incidentally correlates to usefulness. And critically, there's a feedback loop here: a word is only useful as it's…

I agree with you about actual usage, but your wish for Lisp==CL doesn't make sense either. Is LISP 1.5 "Lisp"? What about MacLisp or InterLisp or any of the other languages that both predated Common Lisp and had "lisp" in their name? The people who create Common Lisp didn't think that is was coextensive with "Lisp", so I'm not sure why that would have become _more_ true in the last 30 years.

Lisp 1.5, Maclisp, Interlisp and CL are all Lisp. They share a common core. Common Lisp can run Lisp 1.5 code with no or little changes. The Common Lisp Object System was developed from Interlisp's LOOPS. Interlisp-D had Common Lisp and Interlisp running in one Lisp image side by side. Maclisp and Common Lisp shared complex macros like the LOOP macro in one source file at MIT.

Common Lisp even runs pre-Lisp 1.5 code. See for example:

https://gist.github.com/lispm/93bba58caf3d3c7aab3b

That's original McCarthy code from 1960 in s-expression syntax. Runs mostly unchanged.

Re: Racket – Lisp beyond Clojure

#130
post #25

Earlier quoted context omitted.

> Racket is all the promise of developer-centric power tooling that puts Common Lisp to shame. Have you ever used a commercial Common Lisp like Allegro ?

We cant entirely blame them: those cost significant money while mainstream stuff usually has free IDE's that are good without limitations. Allegro even mentioned royalties last time I looked at them. Royalties!? Only natural hobbyists overlook this. But, yes, LispWorks and Allegro are very powerful environments. Comparing AllegroCache to Hibernate might be fun for newcomers too. Haha.

I guess we were spoiled by being able to have seen such environments, back when it was common to pay for software tools.

Even Macintosh Common Lisp would already have been a good experience.

http://basalgangster.macgui.com/RetroMacComputing/The_Long_V...

Post reply on HN