Introductions done! Lots of cool people here.
I was typically too verbose in my self-introduction, oops
Language Oriented Programming section now starting
core idea: most languages are multiple languages, composed
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
now talking about big-bang as an example of a DSL
"Expression-level Embedded Languages"
Side note, had a nice conversation with Jay McCarthy when I explained how https://dustycloud.org/blog/lets-just-be-weird-together/ works, and how his DOS library inspired the next iteration of Goblins
"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
Getting the sense that Matthias Felleisen wants to separate the term syntax abstraction from macros, even though syntax abstraction technically is hygenic macros?
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
(#lang + syntax-parse)
- fine-grained embeddings
This sounds like it's gonna be a hell of a cool week
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
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
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.
Q from audience: "When does learning DSLs actually add mental
Felleisen: Beyond the scope of this paper/class. I am enabling you to
build technology. Like every technology, there are enormous upsides
"Kids these days are terrified about parentheses. If you replace
everything with square brackets and curly braces the fear goes away."
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.
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?
"Programming language designers do not throw in embedded DSLs because they feel like it, they do it because they make programmers much more productive."
"pure lambda calculus, raw functions like raw meat"
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.
On day two of How to Design Languages. Starting out the day with Jay reviewing how to do the exercises from yesterday's lab https://school.racket-lang.org/2019/plan/mon-aft-lab.html
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
"An abstraction that exposes its implementation ain't no abstraction" -- Jay
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.
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!