OldCodger wrote:
In the BYOB Tools Image there is a command Cascade but I can't find any documention on it. Does it work the same way as Logo's Cascade?
Yes, basically. End test/repetition number, function, initial value.
Offline
bharvey wrote:
Hardmath123 wrote:
I can package Snap! as a standalone Mac application, down to the icon and top menu bar.
Does this mean wrapping a .app folder around a browser, or do you have a standalone HTML5 canvas thingy?
It's basically embedding a webview onto the page, and controlling the JavaScript via WebKit APIs.
(which reminds me, you need a favicon urgently).
Hmm, maybe you could let others submit their ideas?
I'm using applicative-order evaluation, so it tries to evaluate the arguments to any expression before evaluating the expression. Unfortunately, in lambda you don't want the arguments evaluated. How would one go about that?
If you're using applicative order evaluation, then you need special forms -- expressions that are exceptions to the evaluation rule and effectively use normal order. LAMBDA is one of these, along with IF, COND, DEFINE, SET!, LET, etc.
The explicit control evaluator builds each special form into the code explicitly, the way you don't like. But this exercise hints about how to use a table of special form keywords ("lambda," etc.) instead.
If this isn't helpful, you'll have to tell me more about what your evaluator looks like overall.
Ah. So I do have to code a special form for lambda, I thought so.
I found out one big mistake I was making—I was first evaluating arguments, than the actual procedure. I should have been evaluating the procedure, and the procedure's evaluation script called "evaluate" recursively on arguments which need evaluation. Does that make sense?
Offline
That http block is awesome! I could even write a web browser in snap!! I had an idea to write one in panther, which is connected to mesh with a BYOB project where BYOB parses the html and panther connects to the internet and displays it, but now I can write one in snap!, no mesh required!
Offline
http://scratch.mit.edu/forums/viewtopic.php?pid=1261579
^ an experiment using Snap4 Alpha.
Who think it would be a good idea to submit Snap as an app to the Chrome store?
Offline
Hardmath123 wrote:
It's basically embedding a webview onto the page, and controlling the JavaScript via WebKit APIs.
Hmm, well, sure, let's have a look. I was hoping to get out of the business of maintaining N separate versions of code, but perhaps it has compensating qualities. Or perhaps the same approach will work on other platforms.
Hmm, maybe you could let others submit their ideas?
You don't like it? Sure, by all means.
Ah. So I do have to code a special form for lambda, I thought so.
I found out one big mistake I was making—I was first evaluating arguments, than the actual procedure. I should have been evaluating the procedure, and the procedure's evaluation script called "evaluate" recursively on arguments which need evaluation. Does that make sense?
The first thing you do is look at the expression's first element, without evaluating it! If it's a keyword "lambda" "define" "if" etc, then you go off and evaluate each kind of special form with its own rules. No part of a lambda expression is evaluated, but (e.g.) IF immediately evaluates the second element, then decides whether to evaluate the third or the fourth, depending on the value of the second. If that first element isn't a keyword, then you evaluate everything -- doesn't matter what order.
The value of a lambda expression is essentially (list exp env), combining the expression itself with the defining environment, but in practice it's usual to add a procedure type-tag to that, so you can't later confuse it with a user-generated list.
Offline
joefarebrother wrote:
That http block is awesome! I could even write a web browser in snap!! I had an idea to write one in panther, which is connected to mesh with a BYOB project where BYOB parses the html and panther connects to the internet and displays it, but now I can write one in snap!, no mesh required!
Parsing the HTML is a great project idea. We're not quite at the point where you can actually write a complete browser, because first you need first-class costumes so that you can pull in a picture file and make that picture appear in a controlled region of the stage. But I agree that when we're finished it should be possible.
Offline
bharvey wrote:
No, please, not in alpha.
Well you can't say Snap!'ers lack enthusiasm.
Offline
bharvey wrote:
joefarebrother wrote:
That http block is awesome! I could even write a web browser in snap!! I had an idea to write one in panther, which is connected to mesh with a BYOB project where BYOB parses the html and panther connects to the internet and displays it, but now I can write one in snap!, no mesh required!
Parsing the HTML is a great project idea. We're not quite at the point where you can actually write a complete browser, because first you need first-class costumes so that you can pull in a picture file and make that picture appear in a controlled region of the stage. But I agree that when we're finished it should be possible.
good point. However, I could still write a web browser using a Panther/BYOB mesh connection, because there is a "get image from url ()" block in the block library for panther.
Offline
shadow_7283 wrote:
bharvey wrote:
No, please, not in alpha.
Well you can't say Snap!'ers lack enthusiasm.
The exclamation mark thing is really annoying me now.
Surely "Snappers!", anyway...?
Last edited by blob8108 (2012-06-02 14:45:13)
Offline
blob8108 wrote:
shadow_7283 wrote:
bharvey wrote:
No, please, not in alpha.
Well you can't say Snap!'ers lack enthusiasm.
The exclamation mark thing is really annoying me now.
Surely "Snappers!", anyway...?
Snap!pers actually
Offline
rookwood101 wrote:
blob8108 wrote:
shadow_7283 wrote:
Well you can't say Snap!'ers lack enthusiasm.The exclamation mark thing is really annoying me now.
Surely "Snappers!", anyway...?Snap!pers actually
No! No! We can't have an exclamation mark in the middle of the word!
Offline
Also if I want to ask a question about snap! it looks like:
blah blah blah snap!?
which makes it look like i'm surprised.
Offline
blob8108 wrote:
No! No! We can't have an exclamation mark in the middle of the word!
I understand that in the Latin-alphabet representation of some African languages the exclamation point is used to represent a clicking sound made with the tongue against the roof of the mouth. It's just another letter.
P.S. And by that convention, the name is onomotopoetic! So there.
Last edited by bharvey (2012-06-02 15:25:31)
Offline
joefarebrother wrote:
However, I could still write a web browser using a Panther/BYOB mesh connection, because there is a "get image from url ()" block in the block library for panther.
Ah What is the underlying primitive? Or is it a written-in-Smalltalk block? Eventually, when we have first-class costumes (which basically means first-class pictures) the HTTP block should return a costume if the URL has a picture-type extension. Similarly for sounds, etc.
Offline
coolhogs wrote:
Wait a minute, if you could submit Snap to the Apple Store...
We're not submitting it to anyplace for quite a while now! Cut it out, you guys, or you'll scare Jens into taking the alpha version off the net altogether.
Offline
bharvey wrote:
joefarebrother wrote:
However, I could still write a web browser using a Panther/BYOB mesh connection, because there is a "get image from url ()" block in the block library for panther.
Ah What is the underlying primitive? Or is it a written-in-Smalltalk block?
Yes, it's written in smalltalk.
Offline