florence
2017-7-14 07:11:13

@zenspider you don’t want the term around the expected part of the test-equal i think?


zenspider
2017-7-14 07:45:20

@florence then you get things like bind not being defined. and a call to match


zenspider
2017-7-14 07:50:11

I just learned a painful (mostly unrelated) lesson…

I’m trying to rebuild from scratch w/o going to my previous code to see if I really get this shit. I want to do it iteratively. Pure lambda calculus first, then extend with values & ops, etc.

So you normally make a language L (the grammar) and extend it for E (the evaluation context). Then you extend the grammar and context again to add the values… but the context doesn’t know about any of the grammar additions you did because it is extending E, not L2.

It seems the correct approach is to use define-union-language to close the diamond inheritance between E and L2 to E2. Something like:

(define-union-language X L2 E)

(define-extended-language E2 X
    ...

zenspider
2017-7-14 08:06:07

jeapostrophe
2017-7-14 12:16:59

zerusski: sorry to have missed your message, I don’t have slack on my phone :(


samth
2017-7-14 12:38:21

@samth has joined the channel



zenspider
2017-7-14 13:05:45

haha. So I’d write my test wrapper as: (define (:thumbsup: i e) ...)


zenspider
2017-7-14 13:07:12

oh no… I had no idea there was :neckbeard:


haroldcarr
2017-7-14 14:48:33

@mflatt Is there much support for #lang sweet-exp ? See page 5 of: “Growing a Proof Assistant” https://www.williamjbowman.com/resources/cur.pdf


mflatt
2017-7-14 14:50:27

I haven’t used it myself, but the package seems to be in working order: https://pkgd.racket-lang.org/pkgn/search?q=sweet


jack
2017-7-14 19:34:22

I extended @justin’s mystery language hashlangs to show a toolbar button that, when clicked, opens the redex stepper. https://github.com/justinpombrio/RacketSchool/pull/5


twisol
2017-7-14 19:58:52

Ooh! Nice!


johnazariah
2017-7-14 21:32:16

Thanks to everyone who organized the summer school. Fantastic event! And I loved meeting so many smart people! :)


twisol
2017-7-14 22:11:59

Yes, it was a heck of a lot of fun, and I really enjoyed learning Racket and Redex! I’ve wanted to learn more about them for a long time, and this was an amazing way to do it, I think.


vincent_nys
2017-7-15 00:14:07

It was great. Loved meeting people and collecting new ideas. By the way, if anyone wants to go for dinner, I’m planning to go the the HC at 7.


zenspider
2017-7-15 00:17:27

@vincent_nys HC?


vincent_nys
2017-7-15 00:17:54

Heritage Center


zenspider
2017-7-15 00:18:02

derp


vincent_nys
2017-7-15 00:20:52

It’s okay, all of our brains are probably a little worn out :wink:


fluffywaffles
2017-7-15 00:22:32

@vincent_ny looks like heritage center closes at 7?


fluffywaffles
2017-7-15 00:23:05

@vincent_nys


fluffywaffles
2017-7-15 00:23:17

Nadeem said something about it in an earlier message


zenspider
2017-7-15 00:25:05

@vincent_nys shit… should we go now? cc/ @fbie


vincent_nys
2017-7-15 00:25:28

Guess so. I’m going to wait in the lobby for about five minutes if anyone wants to join, then.


zenspider
2017-7-15 00:25:34

I’d rather eat something quick and easy rather than good but out of the way.


zenspider
2017-7-15 00:25:39

I’ll gather @fbie


vincent_nys
2017-7-15 00:25:59

To the lobby!


zenspider
2017-7-15 04:24:02

From our conversation at dinner… I present “Hoon”, the programming language for “Urbit”. One excerpt:

> Tall regular form starts with the sigil, followed by a gap (any whitespace except ace), followed by a bulb whose twigs are separated by gap.

> There are four body subtypes: fixed, running, jogging, and battery. Stems with a fixed number of subexpressions self-terminate. For instance, :if has three subexpressions and is self-terminating. Otherwise the twig is terminated by a gap, then either == (running or jogging, most twigs) or — (battery).

https://urbit.org/docs/hoon/syntax/

Make a redex model for that. :stuck_out_tongue:


twisol
2017-7-15 04:25:04

I want to say “Challenge accepted”, but…


zenspider
2017-7-15 04:25:24

back up and go to demo in the sidebar


zenspider
2017-7-15 04:25:33

compare the “Current” fizzbuzz to the “original”


zenspider
2017-7-15 04:25:51

oh. and look at “Glyphs and characters” in syntax


zenspider
2017-7-15 04:26:32

pronunciation guide… pal = ( par = ) ace = [1 space]


zenspider
2017-7-15 04:26:39

and it just keeps going…


twisol
2017-7-15 04:28:02

Like, honestly, it would be interesting to see a desugarer for this.


zenspider
2017-7-15 04:28:12

hah


twisol
2017-7-15 04:28:53

> In Hoon we throw away almost all these words and invent new ones, which mean almost the same things. But why?


zenspider
2017-7-15 04:29:37

it’s… yeah. I don’t know.


twisol
2017-7-15 04:30:00

I can’t look away. What have you done to me?


zenspider
2017-7-15 04:31:06

hah!


zenspider
2017-7-15 04:31:15

to be fair.. I’m glued to the webpage too


zenspider
2017-7-15 04:32:28

I’m tempted to fire this up on a VM :stuck_out_tongue:


twisol
2017-7-15 04:33:37

Have you looked at Nock yet?


zenspider
2017-7-15 04:35:15

nope


zenspider
2017-7-15 04:42:04

oh. wait. yes I had… I liked the “specification”… I’m so lost in this thing


twisol
2017-7-15 04:42:51

> The logic of this pseudocode is a pattern-matching reduction, matching from the top down. To compute Nock, repeatedly reduce with the first line that matches. Let’s jump right in!


twisol
2017-7-15 04:42:57

now that sounds Redex-able


zenspider
2017-7-15 04:43:07

nooooooo


twisol
2017-7-15 04:44:27

darn it, I can’t start on this now, I have a flight in the morning… :disappointed:


zenspider
2017-7-15 04:45:03

https://urbit.org/docs/about/glossary/

> Urbit is renowned for its exotic terminology. Here’s a simple overview from the strange words in.

> As Dijkstra put it: “The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise.”


twisol
2017-7-15 04:45:59

Wait. I think Nock has eval as a primitive instruction…


zenspider
2017-7-15 04:47:16

> Nock is a Turing-complete, non-lambda combinator interpreter.

> Hoon is a strict, higher-order typed functional language that compiles itself to Nock.

> A twig is a Hoon expression. Specifically, twig is the mold for the noun that a Hoon source expression compiles to. A twig is always a cell.

I… just… what?


twisol
2017-7-15 04:47:36

Shockingly, I understand that.


twisol
2017-7-15 04:47:38

I think I need to sleep.


zenspider
2017-7-15 04:47:47

> loobean: a Hoon boolean > 0 (%.y) is yes, 1 (%.n) is no.

> Why? It’s fresh, it’s different, it’s new. And it’s annoying. And it keeps you on your toes. And it’s also just intuitively right.


zenspider
2017-7-15 04:48:02

“just intuitively right”… yup. I’m done


twisol
2017-7-15 04:48:52

Oh heck no it’s got call/cc


zenspider
2017-7-15 04:49:48

> … / (slot) is a tree addressing operator. The root of the tree is 1; the left child of any node n is 2n; the right child is 2n+1. /[x y] is the subtree of y at address x.

> (For instance, /[1 [531 25 99]] is [531 25 99]; /[2 [531 25 99]] is 531; /[3 [531 25 99]] is [25 99]; /[6 [531 25 99]] is 25; /[12 [531 25 99]] crashes.)


zenspider
2017-7-15 04:50:08

OF COURSE THAT CRASHES


twisol
2017-7-15 04:50:13

That’s pretty tame, overall. It’s a kind of packed tree structure. :smile:


twisol
2017-7-15 04:52:06

In all seriousness, I’m going to write an interpreter for this as soon as I get home. It’s too nerdsnipey.


zenspider
2017-7-15 04:52:32

haha. well… enjoy


zenspider
2017-7-15 04:54:43

@twisol I think you should model it first and then code it up in the red like we did today


twisol
2017-7-15 04:54:55

:disappointed:


twisol
2017-7-15 04:55:18

Well, today we went from an interpreter to a model


zenspider
2017-7-15 04:56:08

True. I thought that was a lot of fun. Smalltalkers do this as “Debugger Driven Development” because they can implement the methods directly in the debugger and continue from there. It’s really neat. I wish we could do that in racket


twisol
2017-7-15 04:56:46

Hmm, I feel like that ought to be possible


twisol
2017-7-15 04:57:14

Or, well, replace “debugger” with “REPL” and I feel like that would be posslbe


zenspider
2017-7-15 04:57:45

I’ve done similar is other lisps… but errors in the repl just seem to boil to the top in racket


zenspider
2017-7-15 04:58:26

it does avoid the whole “WTF is the actual running system now” problem… but so does smalltalk by having memory be persistent