Is there anyway to use the special rotation sign characters in custom blocks? I wanted to make a turn over a set amount of time block, and had to use clockwise and counterclockwise instead of the symbols. Just was curious.
Offline
Appreciating the Google logo today Brian?
Offline
Suggestion: a <(list) is linked?> block, so you could make higher order functions fast for both representations of lists!
For example, the map block could be
if <(list) is linked?> report <<call (func) with inputs (item (1 v) of (list))> in front of <map (func) over <all but first of (list)>>> else script variables (result) (index) set [index v] to (1) set [result v] to (list) //supposed to be the empty list, not the list variable (they are indistinguishable by the scratchblocks tag) repeat (length of (list)) //supposed to be the red length of block add (item (index) of (list)) to (result) change [index v] by (1) end report (result) end
Last edited by joefarebrother (2012-06-23 03:46:55)
Offline
bharvey wrote:
shadow_7283 wrote:
Appreciating the Google logo today Brian?
Ah, yes, that's very cute. Thanks for pointing it out. (I never see those things ordinarily; I'm a DuckDuckGo user.)
I cracked all six ciphers, now I'm inspired to make a Scratch-like environment for this tape stuff.
I have a feeling I've officially picked up too many coding projects.
Last edited by Hardmath123 (2012-06-23 07:17:01)
Offline
joefarebrother wrote:
Suggestion: a <(list) is linked?> block
I'm of two minds about this. What makes it not a no-brainer is that if possible I'd rather not surface that distinction at all; I have a Scratch-Team-like fear that it'd confuse people who don't know anything about data structures.
If someone is using MAP then they're doing functional programming and that list should be converted to linked form if necessary. FOR EACH is the example you should be citing. A purist would say that that's not functional and so the list should be converted to array form.
Maybe we compromise on some kludge, e.g., if you shift-click the pulldown in the IS A block, it offers you more choices, e.g., INTEGER, NON-INTEGER NUMBER, LINKED LIST, DYNAMIC ARRAY, etc. Jens would hate that, though, I'm guessing.
Offline
Jens wrote:
How did you guess?
Well, there you are, then. I'm not too worried about this sort of timing problem, anyway, because converting between formats takes linear time, and so an extra conversion thrown into a MAP or FOR EACH will only slow things down by at most a constant factor (since MAP and FOR EACH take linear time, too).
Offline
bharvey wrote:
I'm a DuckDuckGo user.
I tried using that for a while; but it never found what I wanted, so I ended up just using it to search Google for things using it's bang syntax ("!g").
Hardmath123 wrote:
now I'm inspired to make a Scratch-like environment for this tape stuff.
I believe it's called a Turing Machine, if you're interested.
Offline
blob8108 wrote:
Hardmath123 wrote:
now I'm inspired to make a Scratch-like environment for this tape stuff.
I believe it's called a Turing Machine, if you're interested.
I only just noticed that Hardmath said "Scratch-like environment" instead of "Turing machine in Scratch." You do realize, right, Hardmath, that the official representation of a Turing machine (apart from the tape) is already graphical? It's a state diagram, like a finite state machine but with tape actions associated with the transitions.
Offline
bharvey wrote:
blob8108 wrote:
Hardmath123 wrote:
now I'm inspired to make a Scratch-like environment for this tape stuff.
I believe it's called a Turing Machine, if you're interested.
I only just noticed that Hardmath said "Scratch-like environment" instead of "Turing machine in Scratch." You do realize, right, Hardmath, that the official representation of a Turing machine (apart from the tape) is already graphical? It's a state diagram, like a finite state machine but with tape actions associated with the transitions.
By Scratch-like, I implied using drag and drop to place the "instructions" on an "instruction mat" kind of thing, just like the Google simulator (I'm sorry about using bad terminology; bear with me please). Oh yes, and I did mean I was making it in Scratch, too. I'm sure Scratch is powerful enough to handle making something like that.
Offline
Hardmath123 wrote:
I'm sure Scratch is powerful enough to handle making something like that.
Yes, because the Turing machine uses the (theoretically infinite) tape to record the intermediate states of the computation, instead of recursion. So all you have to write is the finite state machine that handles each state change on the tape.
Offline
It definitely is sufficiently powerful: I've written an interpreter for the Turing-Complete language [removed] in Scratch.
[mod note - please do not refer to inappropriate names]
Last edited by scimonster (2012-06-26 08:37:29)
Offline
Taneb wrote:
It definitely is sufficiently powerful: I've written an interpreter for the Turing-Complete language [removed] in Scratch.
[mod note - please do not refer to inappropriate names]
I just don't understand that language lol.
Last edited by scimonster (2012-06-26 08:37:39)
Offline
Offline
A couple of BYOB demos now converted to run in Snap!:
tree.xml
animal-game.xml
Offline
bharvey wrote:
A couple of BYOB demos now converted to run in Snap!:
tree.xml
animal-game.xml
Thank you, these examples make it easier to understand some of the concepts described in the Draft Manual.
Offline
Hardmath123 wrote:
I have a feeling I've officially picked up too many coding projects.
Haha, i know the feeling.
Offline
Offline
I'm ashamed to be asking this question, but how do you import xml files?
Offline
shadow_7283 wrote:
I'm ashamed to be asking this question, but how do you import xml files?
I just figured that out. Save it to the desktop, then drag the file onto Snap!. <- the punctuation is disturbing xD
EDIT: And don't forget to delete it from the desktop. You don't want it to clutter the place up, do you?
Last edited by MathWizz (2012-06-26 18:01:02)
Offline
shadow_7283 wrote:
I'm ashamed to be asking this question, but how do you import xml files?
Don't be ashamed. It's our fault for not having a robust save/load up yet.
MathWizz wrote:
EDIT: And don't forget to delete it from the desktop. You don't want it to clutter the place up, do you?
It doesn't have to be the desktop; you can drag from any open folder! I made a SnapProjects folder on my desktop.
Offline
Just finished a week intro to BJC/BYOB/Snap! in boiling-hot Newark (although for some reason our lab room was freezing; you can't win for losing) for New Jersey teachers. Now they take our online course in four weeks (I hope) and then we have a wrap-up face-to-face week.
Mon: Intro to BJC, intro to BYOB/Snap!
Tue: One simulated course week, with (video) lectures, labs, discussion.
Wed: Recursion.
Thu: Higher order functions and lambda.
Fri: Discussion of how this will work in their high school classrooms.
Amazingly, this all went pretty well.
Offline