Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Snap! user discussion
- bharvey
-
1000+ posts
Snap! user discussion
Umm, well, none of us here at EDC can figure out the differences among push, sync, and commit, for starters. Brian, why do you hate GitHub? It's not *that* bad.
EDIT: Of course you'll probably say we should read the manual. :-/
Last edited by bharvey (March 6, 2015 01:08:14)
- technoboy10
-
1000+ posts
Snap! user discussion
Sync is only in the github app, which is terrible so don't use it. Commit changed files, and then push them to the server.Umm, well, none of us here at EDC can figure out the differences among push, sync, and commit, for starters. Brian, why do you hate GitHub? It's not *that* bad.
EDIT: Of course you'll probably say we should read the manual. :-/
- Hardmath123
-
1000+ posts
Snap! user discussion
…which I will continue to refuse to acknowledge until Snapin8r happens… Any time now, Jens will officially declare victory on 4.0

(arguing about stuff like who owns the “intellectual property” that comes from the project, which is stupid since we're giving it away free so who cares)Wait, as in, who owns Snap! or who owns projects created using Snap!? In any case, can't you copy Scratch's policy?
…could you get in copyright trouble if you stole someone's copyright policy?
- nXIII
-
1000+ posts
Snap! user discussion
(IANAL, but) I think it's at least theoretically possible or the GPL wouldn't include a preamble like: …could you get in copyright trouble if you stole someone's copyright policy?
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.Since copyright protection is automatically granted to textual works created in the US, I would expect it to apply to these kinds of documents as well.
http://opensource.org/licenses/GPL-3.0
- joefarebrother
-
500+ posts
Snap! user discussion
Umm, well, none of us here at EDC can figure out the differences among push, sync, and commit, for starters. Brian, why do you hate GitHub? It's not *that* bad.
Commit saves changes on your local machine on the current branch
Push sends all your commits to the server (which in this case is github.com), which won't work if there are conflicts: if there are, do fetch, make a branch for merging, do merge, fix conflicts, merge back to the main branch, and push.
Have no idea about sync.
Also I've noticed snap has a JavaScript function block now. When I tried it out I crashed my browser

Also I forgot how to change my signiture on these forums which I need to do because the tbgs have changed domain and the old one is now an ad site.
- bharvey
-
1000+ posts
Snap! user discussion
Right, I'll bang on Jens some more. When he comes for our advisory board meeting in April I can try holding his head under water until he does it. …which I will continue to refuse to acknowledge until Snapin8r happens…

Wait, as in, who owns Snap! or who owns projects created using Snap!?Neither; the issue is about the BJC curriculum. One of the EDC management types has a fantasy about selling textbooks and making a fortune.

- bharvey
-
1000+ posts
Snap! user discussion
If you post your code here I'm sure someone will debug it for you. Also I've noticed snap has a JavaScript function block now. When I tried it out I crashed my browser

- joefarebrother
-
500+ posts
Snap! user discussion
It seems like the one thing it hates is trying to say (with the say block) the JS value undefined. I thought it was 2 things, non-existent object attributes and non returning functions, but then I realised both are really undefined.
Also I had a suggestion thatt it would be nice if snap values were converted into JS and vice-versa like if I call a JS function with a list it actually calls it with an array with the same elements but then I realised I could just implement this functionality in snap with blocks, and there are some situations where it would be nice for JS to manipulate snap objects as they are implemented, no point restricting simple functionality and forcing more complex stuff as the only option.
Also I had a suggestion thatt it would be nice if snap values were converted into JS and vice-versa like if I call a JS function with a list it actually calls it with an array with the same elements but then I realised I could just implement this functionality in snap with blocks, and there are some situations where it would be nice for JS to manipulate snap objects as they are implemented, no point restricting simple functionality and forcing more complex stuff as the only option.
- bharvey
-
1000+ posts
Snap! user discussion
Yeah, that was what I wanted too, and still do, not so much for lists (for which there are EQ-vs-EQUAL issues) as for procedures. I'd like a JS block to be able to return a JS function and have a Snap Also I had a suggestion thatt it would be nice if snap values were converted into JS and vice-versa like if I call a JS function with a list it actually calls it with an array with the same elements but then I realised I could just implement this functionality in snap with blocks, and there are some situations where it would be nice for JS to manipulate snap objects as they are implemented, no point restricting simple functionality and forcing more complex stuff as the only option.! function wrapped around it, and be able to input a Snap! function and have a JS function wrapped around it.
- joefarebrother
-
500+ posts
Snap! user discussion
I realised that it would be possible to implement that version in terms of the existing javascript block but not the other way around, also when I had a go at implementing it as a primitive (before there was one) I tried to add these features and realised you'd need a separate browser thread to handle calling snap them returning to JS, and both threads need a busy wait (while(!snapReturned){sleep(100);}) as JS has no proper thread locking. Also, continuations into JS code will be impossible unless I implement a JS parser to convert everything into CPS. Which I won't do.
- gtoal
-
1000+ posts
Snap! user discussion
One of the EDC management types has a fantasy about selling textbooks and making a fortune.![]()
No-one ever makes money out of academic publishing, except possibly the publishing houses at the expense of the authors. If you write academic texts for any reason other than the satisfaction that at least one other person has absorbed the knowledge you have and will also pass it on after you're gone, then you are deluding yourself. Even the few people who write the few outstandingly successful best sellers (Don Knuth for example) do it because they love their subject, not because they ever considered it would make them a fortune.
Be wary of investing too much of yourself in a project that sounds doomed from the start unless the attitude at the top improves. Selling this material is in direct conflict to getting it out to the largest audience. You sell support and consulting services, maybe even hard copies of the materials for convenience, but if you want this stuff to reach the audience you intend, the content itself has to be released free of charge.
Good luck with the project, I hope it works out.
Graham
- bharvey
-
1000+ posts
Snap! user discussion
ever makes money out of academic publishing, except possibly the publishing houses at the expense of the authors.Yeah, I know. The good news: As of yesterday, the lawyers have agreed on IP language, and now all that stands in the way is the binding arbitration language (Berkeley doesn't like it). Hoping for a final version Monday. No-one
PS The project will be fine; the managers don't get involved in the actual work, and our team is terrific. Thanks.
- bharvey
-
1000+ posts
Snap! user discussion
That's what I think we need – not the parser, but just doing everything in CPS in the first place. That would make native higher order functions way easier. But I haven't convinced Jens. Also, continuations into JS code will be impossible unless I implement a JS parser to convert everything into CPS. Which I won't do.
- joefarebrother
-
500+ posts
Snap! user discussion
But writing directly in CPS is difficult to follow and understand. And what I mean is if you have a hypothetical JavaScript function block capable of calling Snap! functions with JS function syntax, and it does so halfway through the function, and that Snap! function does call/cc which is eventually run more than once, what happens to the JS code that called it?
- xly
-
100+ posts
Snap! user discussion
Concerning JScript see my :
http://www.xleroy.net/ByobTuto/Thumbnails.html
where I give many examples of Snap! blocks using JS functions.
It's not very convenient, but it works fine.
And it opens wide new horizons to Snap! users.
At this stage, either one makes the effort of embedding JS scripts into his own Snap! blocks, or it uses a pre-written library of JSnap! blocks in a way similar to Snap! Tools and Examples.
For the time being Snap! has an access to all standard JS functions + all Canvas ones.
Personally I would be interested by having a solution to permit Snap! to use any “external” JS specialized library, like 3D for example.
ps for Brian : I'm very happy to have found an “almost new” “Simply scheme” book. To offer it to my 16 yr grand-son.
http://www.xleroy.net/ByobTuto/Thumbnails.html
where I give many examples of Snap! blocks using JS functions.
It's not very convenient, but it works fine.
And it opens wide new horizons to Snap! users.
At this stage, either one makes the effort of embedding JS scripts into his own Snap! blocks, or it uses a pre-written library of JSnap! blocks in a way similar to Snap! Tools and Examples.
For the time being Snap! has an access to all standard JS functions + all Canvas ones.
Personally I would be interested by having a solution to permit Snap! to use any “external” JS specialized library, like 3D for example.
ps for Brian : I'm very happy to have found an “almost new” “Simply scheme” book. To offer it to my 16 yr grand-son.
Last edited by xly (March 7, 2015 22:32:03)
- bharvey
-
1000+ posts
Snap! user discussion
The JS code didn't call it – it jumped to it, because it's using CPS. The evaluator needs to keep its own stack using lists. If a Snap But writing directly in CPS is difficult to follow and understand. And what I mean is if you have a hypothetical JavaScript function block capable of calling Snap! functions with JS function syntax, and it does so halfway through the function, and that Snap! function does call/cc which is eventually run more than once, what happens to the JS code that called it?! function yields, the evaluator will remember, not on the JS stack, where it's up to in the script, so it can just continue from where it left off.
Yay! Someday I'll rewrite it for Snap ps for Brian : I'm very happy to have found an “almost new” “Simply scheme” book. To offer it to my 16 yr grand-son. !.
- xly
-
100+ posts
Snap! user discussion
@Brian “Yay! Someday I'll rewrite it for Snap!.”
“It's elementary Mr Watson”
“It's elementary Mr Watson”
Last edited by xly (March 8, 2015 10:42:31)
- xly
-
100+ posts
Snap! user discussion
Concerning the link between JS and Snap! …
JS is a text language, Snap! is not.
But Snap! has “text handling functions”.
So you can create a JS script text with Snap! and then run it using the Javascript function.
For example you create 3 texts : header, body, tail which are part of a JS script.
You create a “script” variable by assembling these 3 texts using “ join”
You pass “script” as a parameter of Javascript function…and then you run it.
I can imagine that the opposite way is not easy, and should aim to make of Snap! a kind of Logo (which is also a text language).
IMHO a way to improve the JS-Snap! link could be to implement a true Snap! “text editor” to handle texts inside Snap! for any purpose.
JS is a text language, Snap! is not.
But Snap! has “text handling functions”.
So you can create a JS script text with Snap! and then run it using the Javascript function.
For example you create 3 texts : header, body, tail which are part of a JS script.
You create a “script” variable by assembling these 3 texts using “ join”
You pass “script” as a parameter of Javascript function…and then you run it.
I can imagine that the opposite way is not easy, and should aim to make of Snap! a kind of Logo (which is also a text language).
IMHO a way to improve the JS-Snap! link could be to implement a true Snap! “text editor” to handle texts inside Snap! for any purpose.
- bharvey
-
1000+ posts
Snap! user discussion
On my list, not for that specific purpose (although now that you mention it, it's exciting!) but text handling in general is pretty bad. I want a special kind of sprite whose “costume” is a text box that can be edited both interactively by the user and programmatically. IMHO a way to improve the JS-Snap! link could be to implement a true Snap! “text editor” to handle texts inside Snap! for any purpose.
- bharvey
-
1000+ posts
Snap! user discussion
Jens and I are proud to announce, finally, the official release of Snap! 4.0.
There are still a lot of unresolved issues in github, but the only showstopper was semi-resolved by demoting Save-to-Disk back to a shift-click option, since it doesn't work reliably in many browsers. Jens has already done a lot of the work for OOP and doesn't want to maintain two versions, so 4.0 is hereby frozen unless a new total showstopper turns up.
4.1 alpha should be available soon, but it will definitely be an alpha, i.e., you can't rely on any feature in it not disappearing! Big changes in 4.1: OOP, some form of self-reflection, macros, I forget what else. Also a start on support for screenreaders for the visually impaired.
There are still a lot of unresolved issues in github, but the only showstopper was semi-resolved by demoting Save-to-Disk back to a shift-click option, since it doesn't work reliably in many browsers. Jens has already done a lot of the work for OOP and doesn't want to maintain two versions, so 4.0 is hereby frozen unless a new total showstopper turns up.
4.1 alpha should be available soon, but it will definitely be an alpha, i.e., you can't rely on any feature in it not disappearing! Big changes in 4.1: OOP, some form of self-reflection, macros, I forget what else. Also a start on support for screenreaders for the visually impaired.