Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Snap! Team development discussion
- bharvey
-
1000+ posts
Snap! Team development discussion
Selim is an experienced math teacher with programming experience too. Check out his Scratch profile page!
Do you mean you want to compile to some particular (e.g., Java) bytecode, or make up your own? I've always thought we should compile Snap! to a bytecode whose only instruction is Call.
I don't know any particularly clever ways to generate bytecode, although I guess you could run your interpreter in an environment in which all the primitives have been replaced by ones that emit bytecodes. You know, likeor whatever – obviously I just made that up.
Yes, modern hygienic Scheme macros are lexically scoped, although I've never understood them so I'm the wrong one to ask. The most recent Scheme standard, which I hate hate hate, talks quite a lot about phases of processing a program, including ones for expanding macros. All that seems horribly unSchemely to me.
Sorry, I didn't manage to get to sleep last night, so I'm a little grumpy. Let me introduce you to my friend @Hardmath123, who is a teenager and therefore doesn't need to sleep, and is also an expert on programming language processing.
Do you mean you want to compile to some particular (e.g., Java) bytecode, or make up your own? I've always thought we should compile Snap! to a bytecode whose only instruction is Call.

(define (+ a b)
(emit '(pop a))
(emit '(pop b))
(emit '(add a b c))
(emit '(push c)))
Yes, modern hygienic Scheme macros are lexically scoped, although I've never understood them so I'm the wrong one to ask. The most recent Scheme standard, which I hate hate hate, talks quite a lot about phases of processing a program, including ones for expanding macros. All that seems horribly unSchemely to me.
Sorry, I didn't manage to get to sleep last night, so I'm a little grumpy. Let me introduce you to my friend @Hardmath123, who is a teenager and therefore doesn't need to sleep, and is also an expert on programming language processing.
- Jonathan50
-
1000+ posts
Snap! Team development discussion
! to a bytecode whose only instruction is Call.Don't you need lambda and variables as well? I've always thought we should compile Snap
- MegaApuTurkUltra
-
1000+ posts
Snap! Team development discussion
! to a bytecode whose only instruction is Call.mov* I've always thought we should compile Snap

- bharvey
-
1000+ posts
Snap! Team development discussion
@Liam: There's something screwy in the handling of <ul> tags in your s.b.e layout. (Or maybe I broke it when I added the nav bar at the top.) Click on Extensions in the nav bar and you'll see that the header of each box is right up against the first list item. To try to fix that, I changed <ul> to <p><br /><ul> at Mirrors, and the result is too much space. (Leaving out either the <p> or the <br /> goes back to no space at all.)
Can you figure this out? Tnx.
Can you figure this out? Tnx.
- bharvey
-
1000+ posts
Snap! Team development discussion
Lambda gives you variables. And yes, of course you need lambda, but it's a declaration, not executable, so I don't think it compiles into bytecode (although of course its body does). Don't you need lambda and variables as well?
Edit: Or, alternatively, if you think of lambda as an executable special form, then call has to know how to call it, and it's just a value input to call.
Last edited by bharvey (Sept. 23, 2016 02:07:38)
- liam48D
-
1000+ posts
Snap! Team development discussion
So – just to make sure we're heading for the same, right goal, what I'm getting is @Liam: There's something screwy in the handling of <ul> tags in your s.b.e layout. (Or maybe I broke it when I added the nav bar at the top.) Click on Extensions in the nav bar and you'll see that the header of each box is right up against the first list item. To try to fix that, I changed <ul> to <p><br /><ul> at Mirrors, and the result is too much space. (Leaving out either the <p> or the <br /> goes back to no space at all.)this is what we have now when we click on “mirrors”:
Can you figure this out? Tnx.

And this is what would be best?

(“Mirrors” is just the example I used, could be extensions or any other anchor in the nav.)
Just making sure

- bharvey
-
1000+ posts
Snap! Team development discussion
this is what would be best?Oh. Right. The fact that the tags end up hidden by the nav bar is And also problematic. By all means fix that if you can! But what I was noticing was the spacing between “any of these mirror sites” and the list of URLs.
- liam48D
-
1000+ posts
Snap! Team development discussion
Oh, I see.. duh.
First issue is custom bottom margins on heading elements. It doesn't really make sense to have that - I just decreased the margin-top a lot to fix this issue (without margin-top -> with). That has nothing to do with the lower margin so there's no need to reset that to anything.
So here's what it looks like with the margin-bottom, as it is now:

And here's what it looks like without the margin-bottom, as it should be:

Doing this change also fixes the examples section, (though specifically #projects h4 could have a smaller bottom margin.. oh well..) here's what it looks like without the change:

And here's what it looks like with the change:

The issue is actually in bootstrap.css..
If you get rid of “margin-bottom: 10px” there, it should be fixed.
Yay libraries messing things up!
First issue is custom bottom margins on heading elements. It doesn't really make sense to have that - I just decreased the margin-top a lot to fix this issue (without margin-top -> with). That has nothing to do with the lower margin so there's no need to reset that to anything.
So here's what it looks like with the margin-bottom, as it is now:

And here's what it looks like without the margin-bottom, as it should be:

Doing this change also fixes the examples section, (though specifically #projects h4 could have a smaller bottom margin.. oh well..) here's what it looks like without the change:

And here's what it looks like with the change:

The issue is actually in bootstrap.css..
h4, h5, h6 { margin-top: 10px; margin-bottom: 10px; }
If you get rid of “margin-bottom: 10px” there, it should be fixed.
Yay libraries messing things up!

Last edited by liam48D (Sept. 23, 2016 11:30:47)
- bharvey
-
1000+ posts
Snap! Team development discussion
Ah, you fixed yet a third issue, the margin under headers. But with that clue, I found the same bottom-margin=0 thing in ul. Thanks! Yay libraries messing things up!
- liam48D
-
1000+ posts
Snap! Team development discussion
Haha, the old name for the git/infra tag.. lol.
- bharvey
-
1000+ posts
Snap! Team development discussion
Okay, here's today's Brian's web problem:
I improved the Examples section of snap.berkeley.edu. It's now a table of thumbnails of projects. The problem is, why is the space between columns 2 and 3 bigger than the space between columns 1 and 2?
TIA.
I improved the Examples section of snap.berkeley.edu. It's now a table of thumbnails of projects. The problem is, why is the space between columns 2 and 3 bigger than the space between columns 1 and 2?
TIA.
- comp09
-
1000+ posts
Snap! Team development discussion
Since you are already using Bootstrap, it might be easier to use Okay, here's today's Brian's web problem:Bootstrap's grid than a table layout.
I improved the Examples section of snap.berkeley.edu. It's now a table of thumbnails of projects. The problem is, why is the space between columns 2 and 3 bigger than the space between columns 1 and 2?
TIA.
- birdoftheday
-
500+ posts
Snap! Team development discussion
It might be a better idea to get rid of bootstrap and have a nice pure website, perhaps without any CSS, just like Olden Tymes®
- bharvey
-
1000+ posts
Snap! Team development discussion
That's what I think, too, but everyone else says we have to have a spiffy modern web site or nobody will look at it. (One important “everyone else” is Jens!) It might be a better idea to get rid of bootstrap and have a nice pure website, perhaps without any CSS, just like Olden Tymes®
- bharvey
-
1000+ posts
Snap! Team development discussion
Bootstrap's grid than a table layout.Feel free to send me some HTML. Since you are already using Bootstrap, it might be easier to use

- BookOwl
-
1000+ posts
Snap! Team development discussion
I agree with dropping bootstrap, but a little CSS would still be nice. It might be a better idea to get rid of bootstrap and have a nice pure website, perhaps without any CSS, just like Olden Tymes®
Also, I think that it might be time to create a new topic, since this one is starting to take a while to load, and soon it might run into the same problem the “suggest projects to be featured” topic had.
- bharvey
-
1000+ posts
Snap! Team development discussion
Oh! I had no idea the size of a topic was relevant; I just always do /unread and it's pretty fast. Are you saying we should just abandon this one and make "Snap Also, I think that it might be time to create a new topic, since this one is starting to take a while to load, and soon it might run into the same problem the “suggest projects to be featured” topic had.! Team development discussion vol. 2"?
- blob8108
-
1000+ posts
Snap! Team development discussion
! Team development discussion vol. 2"?This is an excellent idea. Connor tells me the thread is so long it makes the ST's servers have a bother Are you saying we should just abandon this one and make "Snap
- Jonathan50
-
1000+ posts
Snap! Team development discussion
How are two 200-page threads better than one 400-page thread? This is an excellent idea. Connor tells me the thread is so long it makes the ST's servers have a bother
- comp09
-
1000+ posts
Snap! Team development discussion
Connor is probably seeing this page at the top of the “most time-consuming transactions” list in New Relic.How are two 200-page threads better than one 400-page thread? This is an excellent idea. Connor tells me the thread is so long it makes the ST's servers have a bother

Last edited by comp09 (Sept. 26, 2016 22:23:30)
- Discussion Forums
- » Advanced Topics
-
» Snap! Team development discussion