Live data from Hacker News

Why Language-Oriented Programming? Why Racket?

beautifulracket.com

11–20 of 115 posts

Re: Why Language-Oriented Programming? Why Racket?

#11
I find it a pretty amazing feat that the author has created a programming language (Racket), then used it to create another language called Pollen[1] for book publishing, then went ahead and used Pollen to publish three books. Oh and the fonts are designed by him too[2].

[1] https://docs.racket-lang.org/pollen/

[2] https://mbtype.com/

Re: Why Language-Oriented Programming? Why Racket?

#12
post #6

Earlier quoted context omitted.

I think racket makes it simple to compose your language implementation modules. So e.g., hygiene could be imported (with minimal adaptions to your syntax/binders).

Yeah, that's true. I would love to read an article about that with practical examples, i.e. showing that language composition is really a common and needed pattern (not just a theoretic concern, ... are LOP users really composing several language modules often?), and how Racket enables it.

https://www.elizabethblog.com.ng/2019/02/maduguri-in-explosi...

Re: Why Language-Oriented Programming? Why Racket?

#13

I find it a pretty amazing feat that the author has created a programming language (Racket), then used it to create another language called Pollen[1] for book publishing, then went ahead and used Pollen to publish three books. Oh and the fonts are designed by him too[2]. [1] https://docs.racket-lang.org/pollen/ [2] https://mbtype.com/

No, the author hasn't created Racket. The author is the lawyer https://en.wikipedia.org/wiki/Matthew_Butterick.

Racket was developed by PLT Inc.

Re: Why Language-Oriented Programming? Why Racket?

#14
post #3

About a decade ago, I would have agreed with this 100%, and I still am fascinated and, quite frankly, awed by Racket and LOP (and looking forward to Racket Fest 2019 here in Berlin[1]). But. (You knew there was a "but"). While I don't quite agree with the assertion that with the right tooling (so: this tooling), creating a language is as easy as creating a library, I don't think it would solve our problems even if it…

Making a language "in the heat of the programming battle" is indeed a very bad idea. So is making a lib.

On the other hand I really would like to see a world with 10s or even 100s of little (preferably non Turing complete) languages with extremely good integration(with each other) and very good tooling and visualizations. Because right know the languages we use tend to be way too powerful. This prevents good tooling and optimizations.

Re: Why Language-Oriented Programming? Why Racket?

#15
post #3

About a decade ago, I would have agreed with this 100%, and I still am fascinated and, quite frankly, awed by Racket and LOP (and looking forward to Racket Fest 2019 here in Berlin[1]). But. (You knew there was a "but"). While I don't quite agree with the assertion that with the right tooling (so: this tooling), creating a language is as easy as creating a library, I don't think it would solve our problems even if it…

Making a language "in the heat of the programming battle" is indeed a very bad idea. So is making a lib. On the other hand I really would like to see a world with 10s or even 100s of little (preferably non Turing complete) languages with extremely good integration(with each other) and very good tooling and visualizations. Because right know the languages we use tend to be way too powerful. This prevents good tooling…

Reminded me of this: http://langsec.org/occupy/

Re: Why Language-Oriented Programming? Why Racket?

#16

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…

Yeah, that's what I like about languages like Lisp and to a lesser extent Python and, conversely, why I dislike languages like Go.

uh..What is? (what you like about them)

Re: Why Language-Oriented Programming? Why Racket?

#17
I bought two of the author’s books and also enjoy his newsletter. That said, I still have not drank the LOP coolaid, yet.

I almost always start Lisp development projects in a repl, getting low level things I need working. Initially I don’t worry at all about making things tidy. I keep this process going until I have something that works. Then I start cleaning up code, perhaps factoring out common code, etc. If I see enough value in the new code and if it makes sense, then I move parts out to a separate library.

It is at this point, after experimenting with a problem and having good code, that I think in some cases it would be good to step back and decide whether to design a new language for the type of problem you just solved.

Re: Why Language-Oriented Programming? Why Racket?

#18

I find it a pretty amazing feat that the author has created a programming language (Racket), then used it to create another language called Pollen[1] for book publishing, then went ahead and used Pollen to publish three books. Oh and the fonts are designed by him too[2]. [1] https://docs.racket-lang.org/pollen/ [2] https://mbtype.com/

[deleted]

Re: Why Language-Oriented Programming? Why Racket?

#19

If you create whole new languages, i.e. external languages, not really embedded DSLs, with their own syntax, how is Racket better than other languages at implementing those? Neither the sntax object, nor hygiene are of concern when you build external DSLs, which the author's examples seem to be. I have not yet seen a compelling argument for Racket there vs. for instance a parser generator framework. I might just be m…

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-specific languages or LOP. You can write functions that write code, making a new language.

I think PG has some writings on this topic, but I don’t remember if it is online or in his LISP textbooks. His company Viaweb did this, IIRC, using a DSL written in LISP to generate HTML.

Re: Why Language-Oriented Programming? Why Racket?

#20

If you create whole new languages, i.e. external languages, not really embedded DSLs, with their own syntax, how is Racket better than other languages at implementing those? Neither the sntax object, nor hygiene are of concern when you build external DSLs, which the author's examples seem to be. I have not yet seen a compelling argument for Racket there vs. for instance a parser generator framework. I might just be m…

sharing ?
Post reply on HN