4 ms·
Scratch is a simplified version of Lisp/Scheme, without many important features like first class functions, lexical closures, continuations, special forms, the
by DonHopkins 7y ago
Scratch is a simplified version of Lisp/Scheme, without many important features like first class functions, lexical closures, continuations, special forms, the ability to define your own blocks and control structures, and everything being a first class object that you can bind to variables, pass around, and return from functions.
Snap! supports all those important features of Scheme (its original name was BYOB for "Build Your Own Blocks"), with the visual interface and sprite and stage and turtle graphics of Scratch, plus it's written in JavaScript, so it's efficient and easy to integrate with existing JavaScript libraries (see "etoys2learn"!), instead of running in a monolithic Smalltalk virtual machine.
- TeMPOraL 7y agoThank you! That answers all my questions. I'll go play with Snap! then. BTW. you seem to know your way around these kinds of semi-visual languages; any opinion on NetLogo? A coworker recently introduced me to it, and it looks like a great tool for doing agent simulations. I wonder if you know of anything else worth paying attention to in this space?
- DonHopkins 7y agoI haven't tried it myself, but I've heard it's really cool, and have read people who've used it praising its virtues and discussing its limitations. It sounds like something I'd like, since it's great for agents and cellular automata. NetLogo – A multi-agent programmable modeling environment (northwestern.edu) https://news.ycombinator.com/item?id=18180542 https://news.ycombinator.com/item?id=18180542 https://ccl.northwestern.edu/netlogo/ https://ccl.northwestern.edu/netlogo/ Seymour Papert has died (mit.edu) https://news.ycombinator.com/item?id=12201810 https://news.ycombinator.com/item?id=12201810 http://www.media.mit.edu/people/in-memory/papert http://www.media.mit.edu/people/in-memory/papert You might also want to check out some of the stuff in these papers, one pretty old, and the other much more recent: “A Taxonomy of Simulation Software: A work in progress” from Learning Technology Review by Kurt Schmucker at Apple (1999). http://donhopkins.com/home/documents/taxonomy.pdf http://donhopkins.com/home/documents/taxonomy.pdf "Gadget Background Survey" by Chaim Gingold (who made Earth Primer), research he did at HARC for the Gadget project with Dan Ingalls (who made Squeak and Lively), which includes Alan Kay's favorites, Rockey’s Boots and Robot Odyssey, and Chaim's amazing SimCity Reverse Diagrams, and lots of great stuff I’d never seen before: Gadget Background Survey http://chaim.io/download/Gingold%20(2017)%20Gadget%20(1)%20Survey.pdf http://chaim.io/download/Gingold%20(2017)%20Gadget%20(1)%20S... Earth Primer https://www.earthprimer.com/ https://www.earthprimer.com/ Experimental Gameplay Workshop 2015: Earth Primer https://www.youtube.com/watch?v=qtsf3nRFfwk https://www.youtube.com/watch?v=qtsf3nRFfwk YOW! 2016 Dan Ingalls - Pronto: Toward a Live Designer's Notebook #YOW https://www.youtube.com/watch?v=if72CFsF_SY https://www.youtube.com/watch?v=if72CFsF_SY The following NetLogo HN links didn't get as much discussion as they deserved, but here they are: Show HN: NetLogo Implementation of Conway's Game of Life (github.com) https://news.ycombinator.com/item?id=20074810 https://news.ycombinator.com/item?id=20074810 https://github.com/gsurma/game_of_life https://github.com/gsurma/game_of_life Biological Simulations (NetLogo, 2008) [pdf] (northwestern.edu) https://news.ycombinator.com/item?id=18188139 https://news.ycombinator.com/item?id=18188139 https://ccl.northwestern.edu/2008/colosimo_paper.pdf https://ccl.northwestern.edu/2008/colosimo_paper.pdf Linking NetLogo with Python [pdf] (surrey.ac.uk) https://news.ycombinator.com/item?id=18185528 https://news.ycombinator.com/item?id=18185528 http://jasss.soc.surrey.ac.uk/21/2/4/4.pdf http://jasss.soc.surrey.ac.uk/21/2/4/4.pdf NetLogo: Design and Implementation of a Multi-Agent Modeling Environment (2004) [pdf] (northwestern.edu) https://news.ycombinator.com/item?id=18177290 https://news.ycombinator.com/item?id=18177290 https://ccl.northwestern.edu/papers/agent2004.pdf https://ccl.northwestern.edu/papers/agent2004.pdf Distributed Channel Assignment in Dense WLAN Networks Using NetLogo (thinkmind.org) https://news.ycombinator.com/item?id=18173939 https://news.ycombinator.com/item?id=18173939 https://www.thinkmind.org/download.php?articleid=icas_2014_2_40_20060 https://www.thinkmind.org/download.php?articleid=icas_2014_2... NetLogo (programmable modeling env for simulating natural and social phenomena) [pdf] (northwestern.edu) https://news.ycombinator.com/item?id=18170128 https://news.ycombinator.com/item?id=18170128 http://ccl.northwestern.edu/netlogo/docs/NetLogo%20User%20Manual.pdf http://ccl.northwestern.edu/netlogo/docs/NetLogo%20User%20Ma... Cellular Automata for Pathfinding in NetLogo (cestlaz.github.io) https://news.ycombinator.com/item?id=10921012 https://news.ycombinator.com/item?id=10921012 Updated link that works: https://cestlaz.github.io/posts/2016-01-17-maze-ca.html/ https://cestlaz.github.io/posts/2016-01-17-maze-ca.html/ Cellular Automata, NetLogo and real problems https://news.ycombinator.com/item?id=10913564 https://news.ycombinator.com/item?id=10913564 Updated link that works: https://cestlaz.github.io/posts/2016-01-15-shift-image.html/ https://cestlaz.github.io/posts/2016-01-15-shift-image.html/ Some more links and discussion: https://news.ycombinator.com/item?id=18496880 https://news.ycombinator.com/item?id=18496880
- ngmc 7y agoScratch does allow you to make your own blocks with optional input. My math students use them to learn about abstraction. The most recent implementation was released last winter and is written in JavaScript. https://en.scratch-wiki.info/wiki/Scratch_3.0 https://en.scratch-wiki.info/wiki/Scratch_3.0
- toontalk 7y agoScratch 3 does not enable one to define new functions only new commands. Snap! user-defined functions are first-class - they can be used to define higher-order functions.
- DonHopkins 7y agoHere's the elegant Snap! visual Y Combinator: https://imgur.com/cOq8tvR https://imgur.com/cOq8tvR Visual Lambda: Note how the gray block after the "report", shrink-wrapped around the "call (fn) with inputs (fn) []", is a visual "lambda". It looks like a "gasket" or "baggie" that insulates the code inside from being immediately evaluated, returning a closure instead.
- TheAsprngHacker 7y agoSnap! takes inspiration from Scheme. I wouldn't compare Scratch to Lisp/Scheme at all, as IMO lambdas, cons-cells, and (the ability to make) expression-based control structures are all defining features of Lisp/Scheme, and Scratch does not have any of them. To my understanding, Scratch's design seems to be inspired by Kay-style OOP (Scratch's "broadcast" feature is about passing messages between sprites, and the first version of Scratch was written in Squeak).