Live data from Hacker News

Why Racket? Why Lisp?

practicaltypography.com

191–200 of 295 posts

Re: Why Racket? Why Lisp?

#191

Earlier quoted context omitted.

You can get started with Clojure without Leiningen. You can get started with Scala without SBT. These are build tools for serious projects, with lots of options and lots of things they do for you. Some people recommend them to beginners and while that's not necessarily wise, it goes to show that they are mature and OK enough that some beginners cope with it. Yes, you can get started easily with Haskell - but then Cab…

I agree. If Cabal was as good as Leiningen, then Haskell would has been way more popular than today.

Avoid success at all cost. :)

Re: Why Racket? Why Lisp?

#192

Can not resist... This article is fairly misguided. I find it painful that everybody who writes about a Lisp offshoot (Scheme, Clojure, ...) ends up misrepresenting Common Lisp. To sum up "Why Lisp?" from a CL perspective: CL has pretty much every feature of every programming language around, only that its better designed, implemented and generally more powerful. It's just a poweruser language. Its not just macros, s…

> CL has pretty much every feature of every programming language around, only that its better designed, implemented and generally more powerful.

The thing is, sometimes what makes a language powerful is the restrictions it imposes. For example, if you know a function is referentially transparent, then you know that calling it multiple times won't cause side effects to happen multiple times.

Having restrictions means that you can rely on those restrictions applying to other code, which might allow you to do things that would otherwise be unsafe.

Re: Why Racket? Why Lisp?

#193
post #22

Earlier quoted context omitted.

If you write Lisp every day why not remap the ( and ) to a non-shifted position? I use the [ and ] keys but I use Common Lisp, not Clojure.

I find it odd that people use their pinky to type parens. When my fingers are on the home row, '(' is above my middle finger, and ')' is above my ring finger. Typing them with my pinky would require me to contort my hand.

> When my fingers are on the home row, '(' is above my middle finger, and ')' is above my ring finger.

If your fingers are on the standard home keys (index fingers on "F" and "J"), '(' is between the middle and ring finger and on the normal (inward) path of the ring finger as it extends, ')' is between the ring finger and pinky and on the normal path of the pinky as it extends.

OTOH, if you keep your right index finger on the "K", which is less standard, then those become naturally on the middle and ring (and it may make sense for programming, but less for general typing -- the standard home position is based on where the letter keys are, but the extra symbols on the right are more used in programming than general typing, so moving the right hand one key out makes some sense.)

Re: Why Racket? Why Lisp?

#194
post #155

Re 1. everything is an expression benefit, condition example: C-like languages often have the ternary operator, cond?exp1:exp2 , that is exactly this. I feel clever using it, but I consider it a hack, because it's (usually) less clear. A microcosm of lisp, clever but unclear.

I think it mostly seems unclear in C because of the syntax.

If you could write this in C, would it still seem unclear?

    int x = if (y == 0) then 7 else 10;
As opposed to one of these:

    int x;
    if (y == 0)
      x = 7;
    else
      x = 10;
or

    int x = 10;
    if (y == 0) x = 7;
It makes everything local, and in my opinion reduces cognitive load.

Re: Why Racket? Why Lisp?

#195
post #170

Earlier quoted context omitted.

No, the article is correct. Hygienic macros give you strictly more information to work with, enabling them to be more expressive. It's possible to implement unhygienic macros, either at an individual macro level or a whole new macro syso, using Racket's macro system.

I'm thinking you're right in the theoretical sense, but I'm right in the practical sense. Every time I've looked at hygienic macro systems, it just seems like now I'm jumping through extra hoops to overcome a more restrictive way of doing things. Is that extra information you cite typically useful for anything besides safety? Can you give an example?

Most of my development time is spent on correctness, safety, and refactorings.

If the extra information helps those at the cost of not one of those, it's almost always the right choice for me to use.

Re: Why Racket? Why Lisp?

#196
post #87

Earlier quoted context omitted.

Nonsense. We've figured out how to do type systems. We can even fully infer types if you're willing to accept some quite reasonable restrictions on how polymorphic your code is. We have a bunch of reasonable approaches to effect tracking, which Lisp folk used to have to do by hand (that story about the T garbage collector sounds like the most unmaintainable piece of code I've ever heard of). We know how to solve the…

Type systems are the one exception, but it still remains broadly true that Lisp was way ahead of everybody. There are many things we could talk about besides type systems: Lambda expressions - just now reaching Java and C++, been in Lisp forever Garbage collection – (obviously) Turing-complete (edit: fully evaluating) macro systems – I've heard C++ is moving in this direction (not sure to be honest) but Lisp is still…

A couple of quibbles with your list:

> Multiple inheritance – I think this is coming to Java finally

But it's been in C++ for a very long time.

> Functional programming techniques (map, reduce, etc.) – Still ahead

Still ahead of who? Haskell? How so?

Re: Why Racket? Why Lisp?

#197

Some practical features I enjoy in CL: 1. Conditions and restarts : As far as error handling in programs go this is the most rock-solid system I've encountered. You can tell the system which bits of code, called restarts, are able to handle a given error condition in your code. The nice thing about that is you can choose the appropriate restart based on what you know at a higher-level in the program and continue that…

"CLOS allows me to dispatch based on the types of all of the arguments."

But can it dispatch based on the return value?

Re: Why Racket? Why Lisp?

#198

Earlier quoted context omitted.

> truly functional programming languages (which includes Clojure and the other Lisps) This is wrong. I don't know how to say this... Lisps do usually support functional programming paradigms, but most Lisps are indeed anything but functional (in the ML sense).

Lisp was considered a functional programming language before ML existed. Lisps generally don't have as strong and exclusive support for the functional paradigm as some newer languages (and pretty much anything else still in use is newer than lisp), but then C++ is known as an OOPL despite having less strong and exclusive support for the OO paradigm than many older languages, so there's that.

Lisp is a multi-paradigm language. It can be functional, but it doesn't have to be. It can be OO, but it doesn't have to be. Classifying it as "being" any of these is asking for argument, unless you have very clearly defined (and agreed-upon) definitions of what it means to be a member of one of those categories. In particular, does membership mean that you require programming in that style, or only that you allow it?

Re: Why Racket? Why Lisp?

#199
post #54
post #6

I sure hope the giant, hideous, obtrusive diamonds inserted into the text to denote a hyperlink doesn't catch on as a trend. It's a great way to break the flow of the text and irritate your readers. As for the idea of Lisps, well, it sure seems neat. But I've literally never run across a situation where I needed my code to edit itself. I've never run across a situation where the lack of an everything-is-an-expression…

I didn't mind but note that he wrote http://practicaltypography.com . As for not missing stuff from Lisps, I think opportunities start appearing once you start using it more. But I agree, it doesn't prevent you from getting things done.. I don't see any Lisp in the Go space (native compilation, great networking features), so I find Go more pragmatic at this time.

> I don't see any Lisp in the Go space (native compilation, great networking features)

What?!?

Proper Lisps compile to native code, both JIT and AOT.

Plus there are quite a few code commercial compilers with networking libraries.

http://franz.com/products/allegrocl/

Don't judge Lisps by the open source alternatives.

Re: Why Racket? Why Lisp?

#200

I dislike this notion that Lisp (or Haskell or OCaml or ...) owe it to everyone else to explain and enunciate why it can be more productive to use Lisp. """ That’s ask­ing too much. If Lisp lan­guages are so great, then it should be pos­si­ble to sum­ma­rize their ben­e­fits in con­cise, prac­ti­cal terms. If Lisp ad­vo­cates refuse to do this, then we shouldn’t be sur­prised when these lan­guages re­main stuck near…

It benefits both groups to to enlighten G. Since G is so much larger, that's how we would increase the library count from 2727 to 27280.
Post reply on HN