RacketWeek / How To Design Languages starts in 8 minutes and I COULD NOT BE MORE EXCITED

This will be an update thread I guess!

Introductions done! Lots of cool people here.

I was typically too verbose in my self-introduction, oops

Show thread

Language Oriented Programming section now starting

school.racket-lang.org/2019/pl

core idea: most languages are multiple languages, composed

Show thread

some of the examples of DSLs embedded in languages commonly:

- string based formatters, inside of strings
- string based regexes, inside of strings
- pattern matchers

Though DSLs embedded in strings aren't very composable and can't do interesting things at compile time

Show thread

Side note, had a nice conversation with Jay McCarthy when I explained how dustycloud.org/blog/lets-just- works, and how his DOS library inspired the next iteration of Goblins

Show thread

"You don't need to call Matthew Flatt and ask him to add these
features for you, you can add them yourself"

What does it mean to build things inside of Racket? How do we do so?

"Racket was born in 1958 conceptually speaking. It was called Lisp. Its immediate [descendant] was Scheme in 1974 and Racket was born in 1995 (as PLT Scheme). That means we inherited an idea that came about
in 1963: you can extend the language with your own syntactic
constructs."

Show thread

Getting the sense that Matthias Felleisen wants to separate the term syntax abstraction from macros, even though syntax abstraction technically is hygenic macros?

Show thread

Racket is a channel of communication between different language extensions

- You can add layers on layers and before you know it have huge piles
of stuff. And huge piles of stuff with no protections against each
other, things can/will go wrong. (define-syntax)
- Restricitons / constraints on languages sometimes just as important
( + syntax-parse)
- fine-grained embeddings

Show thread

What's the difference between template haskell and syntax languages?
In template haskell or etc you describe things as an algebraic
datatype, then you put a thin layer on top of things... you can't
induce new binding structures into haskell. When you have an
algebraic datatype and the thing you need on top of that makes it look
almost as if it's in on top of a new embedded language, as this
embedded program is evaluated you get a data representation of the
program.

Show thread

It's not a string, that's the good news. It is a data
structure, that's the bad news: it runs at runtime.

The final tagless system sort of solved it, by making the runtime
system run very similarly, but you have limits as in terms of what you
can embed.

Template haskell has to step outside of haskell / the toolchain you
usually use to make this DSL. In Racket, everything good and bad you
do is available directly on the spot.

Show thread

Q from audience: "When does learning DSLs actually add mental
overhead?"

Felleisen: Beyond the scope of this paper/class. I am enabling you to
build technology. Like every technology, there are enormous upsides
and downsides.

Show thread

"Kids these days are terrified about parentheses. If you replace
everything with square brackets and curly braces the fear goes away."

Show thread

Errors matter. When the system works, everything is fine. But when things break, which they do all the time... if there are good error messages, people are happy. If they are bad, people are very unhappy. All systems go wrong all the time.

Show thread

Side thought on that: hm, what about sealing error messages sent across the wire for debugging when the receiving vat may or may not have authority to read the problem?

Show thread

"Programming language designers do not throw in embedded DSLs because they feel like it, they do it because they make programmers much more productive."

Show thread

Now we're in the lab section. I was getting thoroughly confused by a macro; Matthias told me my macro errors would be more obvious if I opened them in DrRacket rather than emacs. Well, I must admit he was right... great visual error reporting there.

Show thread

On day two of How to Design Languages. Starting out the day with Jay reviewing how to do the exercises from yesterday's lab school.racket-lang.org/2019/pl

Show thread

I noticed yesterday that Matthias Felleisen and Jay McCarthy talking about how involved Jay was in his emacs setup, and today Jay switched from showing stuff with Emacs to DrRacket. I'm assuming this parallels some experiences that @mlemweb and I had where teaching from emacs to non-emacs-users isn't wise and likely to confuse; better to start with DrRacket so people aren't overwhelmed

Show thread
Follow

"An abstraction that exposes its implementation ain't no abstraction" -- Jay

· · Web · 1 · 3 · 2

Whew. That section was a whirlwind.

Pretty cool stuff, though there was a lot more "magical syntax" stuff exposed (kind of like the automatic generation of accessors in Racket's struct). That's by far the yuckiest thing for me about Racket.

Show thread
Sign in to participate in the conversation
Octodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!