Parsing Lisp Code in Snap!

Yeah I'm old enough to recognize the quotation. :~)

Interesting. The book is funny and refreshingly snarky.

The best solution would be to read his code, understand what each procedure is trying to do, and reimplement it ignoring the code details. But if you want a class/instance system so you can narrowly follow his code and data structures, read Chapter VIII of the Snap! manual.

I've just been ignoring the code all together because he explains what he's trying to do right around the code in the book. (I've got stuck at getting input, though. (mostly because I'm trying to create a good console instead of using say and ask & wait.))

That's a huge project in itself! If you decide to invent a text window library, let me know -- there are a lot of things I want in that! ;~)

Okay. I'll split it off into another project.

Oh great! You should read this: Object Logo windows. You can start at the section about text windows; the most important thing is to understand editor windows and listener windows as two key special cases of text windows. Listeners in particular have a perhaps non-obvious behavior. Lemme know when you've read it and/or you have questions. All the gazillion primitives aren't equally important or relevant to the Snap! context. The crucial point, I guess, is that editor windows can be manipulated both by the program and interactively by the user; that's true for listener windows also, except that both what the program can do and what the user can do are limited, so that what's visible in the window is a true chronological picture of the sequence of events.

We can talk about specific details later... :~)

It 404'd.

Oops. I thought that didn't take long enough. Try again.

Yeah, it's just sending me to this page:


Is there somewhere else I could find it? I'm very interested in reading this.

I'm sorry, I'm just failing miserably today. Try once more.

It worked!

Okay. I need to create a popup Morph? Let me check morphic.js...

(Or, should I draw it with pen?)

I have no idea what I'm doing...

a BoxMorph 2 [383@69 | 848@51]

(I made that with devmode.)

I'm getting somewhere...

a DialogBoxMorph 5 [184@68 | 761@359]

That's a start! You should be able to use WRITE for programmatic text placement.

Really? I haven't figured out how to programatically create a morph yet, but WRITE sounds good.

Using JS would be a good starting point.

I figured I'd need JS, but I haven't got it yet.

untitled script pic

I tried this, but it didn't work.

Don't let Jens hear you say that. Using JS should be a last resort. Maybe it'll be necessary, maybe not.

Ah, I've read that conversation in the "getters and setters" announcement topic, very fun read.