"Concatenative programming and stack-based languages" by Douglas Creager

  Рет қаралды 12,709

Strange Loop Conference

Strange Loop Conference

7 ай бұрын

In this talk we’ll explore stack-based programming languages, in which your program operates directly (and only!) on a stack of values. It might seem daunting at first to program without variable names, but the simplicity of stack-based languages makes them interesting to reason about mathematically, and also fun to tinker with! We’ll look at how stack-based languages are concatenative, letting you break apart your program into arbitrary pieces without affecting its meaning. We’ll compare them with combinatory logic, and see how small we can make our language while still being Turing-complete. And we’ll show how they make good low-level (but still readable!) assembly languages, by examining a Uxn program and running it on a variety of interesting hardware.
References:
* Henry Baker. “Linear logic and permutation stacks - The Forth shall be first”. SIGARCH Computer Architecture News 22:1, March 1994.
* Jeremy Gibbons. “Continuation-Passing Style, Defunctionalization, Accumulations, and Associativity”. The Art, Science, and Engineering of Programming, 2022.
* Brent Kirby. “The theory of concatenative combinators”.
* Slava Pestov, Daniel Ehrenberg, Joe Groff. “Factor: A Dynamic Stack-based Programming Language”. ACM SIGPLAN Notices 45:12. December 2010.
* Smullyan, Raymond. To Mock a Mockingbird. Alfred A. Knopf: New York, 1985.
* Manfred von Thun. “The mathematical foundations of Joy”.
Douglas Creager
Walland Heavy Research
@dcreager
I’ve been thinking about, and using, programming languages for a very long time. By day, I manage GitHub’s Semantic Code team, figuring out how to understand and analyze ~every programming language under the sun. By night, I balance family life with hacking on my own language, like any good PL enthusiast would!
----
Recorded on Sept 21, 2023 in the PWLConf track at Strange Loop 2023 in St. Louis, MO.
thestrangeloop.com
pwlconf

Пікірлер: 9
@blaiseutube
@blaiseutube 7 ай бұрын
I took a class with Alan Perlis when I was in college. Yes, I did have a slight idea of how lucky I was.
@sjmaddox
@sjmaddox 7 ай бұрын
Great talk! Very clear exposition. And thanks for the reference 🙂
@JohannesRiecken
@JohannesRiecken 6 ай бұрын
Why isn’t “swap” called “dig” for consistency with “dig2”? Very enjoyable to see how stack languages relate to other compiler theory concepts!
@DevineLuLinvega
@DevineLuLinvega 6 ай бұрын
In the joy docs, it says `Note that "dig1" is the same as "swap". ` It looks like it wanted to have a word that was symmetric to buryn/dign.
@teeesen
@teeesen 7 ай бұрын
This is bringing back a lot of memories. Back in the early 90s I made a semantics for machine code that had the same sort of [| p q |] = [| p |] o [| q |] distributivity relationship between semantics, concatenation, and composition, allowing you to break a machine code program at any point and get the same meaning. But, I’m wondering whether the language in the talk actually has this property. Since “[“ and “]” aren’t given meaning on their own, it seems that you only get the distributivity property if “[“ and “]” are replaced using quote and compose.
@TaranovskiAlex
@TaranovskiAlex 7 ай бұрын
Nice talk, thank you!
@BartoszGolda
@BartoszGolda 7 ай бұрын
Very nice, even if one would not get 100% - still, it's helpful. Examples in one of Forth standards could be more universal though - if it's doable at all (cons?)..
@DevineLuLinvega
@DevineLuLinvega 7 ай бұрын
Forth is not based on lambda calculus tho, it'd be trickier, you'd have to have to build library words that are non standard, joy and factor have those built into the standard implementations.
@docteurklein
@docteurklein 7 ай бұрын
great talk!
"Why Programming Languages Matter" by Andrew Black
56:39
Strange Loop Conference
Рет қаралды 25 М.
Маленькая и средняя фанта
00:56
Multi DO Smile Russian
Рет қаралды 4 МЛН
Why? 😭 #shorts by Leisi Crazy
00:16
Leisi Crazy
Рет қаралды 33 МЛН
Зомби Апокалипсис  часть 1 🤯#shorts
00:29
INNA SERG
Рет қаралды 7 МЛН
"Stop Writing Dead Programs" by Jack Rusher (Strange Loop 2022)
43:04
Strange Loop Conference
Рет қаралды 431 М.
"Programming a 144-computer chip to minimize power" - Chuck Moore (2013)
40:13
Strange Loop Conference
Рет қаралды 12 М.
"From Geometry to Algebra and Back Again: 4000 Years of Papers" by Jack Rusher
31:35
"The Economics of Programming Languages" by Evan Czaplicki (Strange Loop 2023)
43:58
Strange Loop Conference
Рет қаралды 118 М.
"Point-Free or Die: Tacit Programming in Haskell and Beyond" by Amar Shah
36:13
Strange Loop Conference
Рет қаралды 27 М.
"Outperforming Imperative with Pure Functional Languages" by Richard Feldman
34:55
Strange Loop Conference
Рет қаралды 85 М.
FORTH - Better than BASIC?
14:30
NCOT Technology
Рет қаралды 36 М.
"Computational Physics, Beyond the Glass" by Sam Ritchie (Strange Loop 2023)
39:11
Carregando telefone com carregador cortado
1:01
Andcarli
Рет қаралды 1,3 МЛН
Apple, как вас уделал Тюменский бренд CaseGuru? Конец удивил #caseguru #кейсгуру #наушники
0:54
CaseGuru / Наушники / Пылесосы / Смарт-часы /
Рет қаралды 4,1 МЛН
A4 Reset to zero
0:26
STYLE YT
Рет қаралды 16 М.
Добавления ключа в домофон ДомРу
0:18
Edit My Photo change back coloured with Bast Tech
0:45
BST TECH
Рет қаралды 335 М.
Индуктивность и дроссель.
1:00
Hi Dev! – Электроника
Рет қаралды 1,4 МЛН
Edit My Photo change back coloured with Bast Tech
0:45
BST TECH
Рет қаралды 335 М.