Live data from Hacker News

Why Language-Oriented Programming? Why Racket?

beautifulracket.com

81–90 of 115 posts

Re: Why Language-Oriented Programming? Why Racket?

#81
post #57

I was thinking recently about why I find programming languages so interesting. The answer I came up with was that programming languages allow you to create your own reality. You get to define how things work in this reality. Want functions to be values that can be arguments and return values? Sure! Want a lot of crazy symbols to do complicated math? Go for it! Want everything to be dynamic? Why not. The caveat that c…

The problem is that people often create languages that are basically the same as existing languages; no new concepts. New languages are usually a grab-bag of features found in C, Java, Lisp and/or Haskell.

My guess is that you’re seeing popularity based selection bias at work: languages with more common features are easier to understand and gain popularity faster than truly bizarre and unique languages which are confusing to newcomers. These popular languages end up being the ones you see every day.

I bet a true random sample of programming languages would be a lot weirder.

Re: Why Language-Oriented Programming? Why Racket?

#82
post #28
post #19

Earlier quoted context omitted.

In LISP-like languages like Racket, the code is a list. That is, a program is just a list of tokens (a b c), the same data structure one would use for storing any other kind of data (the equivalent of Python’s [a b c]). When programs are themselves just lists, they are easy to manipulate with code. So, in LISP-like languages, it is easy to write code that writes code. That makes them especially suitable for domain-sp…

> In LISP-like languages like Racket, the code is a list. This is nothing special. In all languages, code is a list: a list of characters, that is. Just saying.

LISP code is not a list as you know it traditionally. It's made up of cons cells. The code of other languages is not a cons cell, altho it is a list of characters. Very important distinction.

Re: Why Language-Oriented Programming? Why Racket?

#83

Earlier quoted context omitted.

I largely agree but then I enter the modern ops stack where templated yaml is the lingua franca. It’s incomprehensible and for each system you are operating you have to learn some arcane yaml incantations that have dramatic impact on your production systems. It’s a world crying out for a set of well factored dsl.

Or a general purpose language with the ability do describe architectural configurations?

I think this is what Pulumi (https://www.pulumi.com) is trying to achieve.

Re: Why Language-Oriented Programming? Why Racket?

#84
post #31

I'm currently browsing the list of languages made with racket (here http://docs.racket-lang.org/search/index.html?q=H%3A ) and it seems like most languages are just lisp variants. I suppose they were made for educational or fun purposes, but i wonder if i haven't missed something more deep as to why someone would want to reimplement a lisp in a lisp language.

semantics != syntax

Re: Why Language-Oriented Programming? Why Racket?

#85
post #57

I was thinking recently about why I find programming languages so interesting. The answer I came up with was that programming languages allow you to create your own reality. You get to define how things work in this reality. Want functions to be values that can be arguments and return values? Sure! Want a lot of crazy symbols to do complicated math? Go for it! Want everything to be dynamic? Why not. The caveat that c…

The problem is that people often create languages that are basically the same as existing languages; no new concepts. New languages are usually a grab-bag of features found in C, Java, Lisp and/or Haskell.

I feel like programming languages that wants to be used in production have a novelty budget. Rust does a great job of managing this, for instance.

Haskell is an interesting case because it is a fairly simple language by default (hm type system) with laziness as big innovation. But it also lets you play with experimental features via language extensions. Some work out great, others like implicit nested data parallelism get axed eventually.

Re: Why Language-Oriented Programming? Why Racket?

#86
post #81
post #57

Earlier quoted context omitted.

The problem is that people often create languages that are basically the same as existing languages; no new concepts. New languages are usually a grab-bag of features found in C, Java, Lisp and/or Haskell.

My guess is that you’re seeing popularity based selection bias at work: languages with more common features are easier to understand and gain popularity faster than truly bizarre and unique languages which are confusing to newcomers. These popular languages end up being the ones you see every day. I bet a true random sample of programming languages would be a lot weirder.

I'd love to see some examples.

Re: Why Language-Oriented Programming? Why Racket?

#87
post #57

Earlier quoted context omitted.

The problem is that people often create languages that are basically the same as existing languages; no new concepts. New languages are usually a grab-bag of features found in C, Java, Lisp and/or Haskell.

There's a quote on the whiteboard in my lab that is (perhaps falsely) attributed to Larry Wall that says something like: > Programming languages are distinguished not by what they make possible, but by what they make easy. Practically all programming languages are computationally equivalent. The design of a new language simply seeks to answer the question: what should be easy for the programmer? Various languages are…

This seems unsatisfying. Most of the modern languages are choosing pretty much the same sets of features. I've been using them for years (decades?), and I couldn't tell you significant differences between most of these languages.

There's maybe 3 major islands of languages today. Within each island, they make essentially the same things easy.

The answer to a question like "Python or Ruby?", "C# or Java?", or "Rust or Go or C++?" mostly boils down to historical accident: what system did the original designer pick, which usually means which one just happened to have a good library for the primary goal of the first prototype.

Re: Why Language-Oriented Programming? Why Racket?

#88

I’m sorry to nitpick on a good article, but this article lost me when it proved that HTML is a programming language by showing that it can be output by a Python program. This seems to be a case of proving too much [0]. [0] https://en.wikipedia.org/wiki/Proving_too_much

It may be proving too much, but it is also arguing the general point. Your objection would be that this example would prove that all strings are programs, which might seem absurd. But in fact, all strings are programs if you haven't specify which interpreter they are supposed to be programs for.

Either way, that seems like a silly approach, IMO.

Re: Why Language-Oriented Programming? Why Racket?

#89
post #75
post #36

Earlier quoted context omitted.

> you can have any language, as long as it's LISP. Let's be fair, many lisp programmers would be perfectly fine with that.

ok but then since lisp already has an extremely small syntax, why not simply define functions in the language rather than using the macro system ? Unless your goal is to be source compatible with another lisp variant, of course.

>why not simply define functions in the language rather than using the macro system?

I don't know. Most examples I've seen from people extolling the virtues of lisp macros and metaprogramming wind up just generating more lisp code in the same language with the same syntax and semantics, so I don't know why you couldn't just use functions in that case.

To be fair, I only have a surface understanding of one lisp variant (Arc) so it's entirely likely I just don't get it.

Re: Why Language-Oriented Programming? Why Racket?

#90
post #86
post #81

Earlier quoted context omitted.

My guess is that you’re seeing popularity based selection bias at work: languages with more common features are easier to understand and gain popularity faster than truly bizarre and unique languages which are confusing to newcomers. These popular languages end up being the ones you see every day. I bet a true random sample of programming languages would be a lot weirder.

I'd love to see some examples.

///
Post reply on HN