A Snap! Mod Idea (Part 1)

@bh Can you ask Jens what license morphic.py is under?

morphic.js
/*

    morphic.js

    a lively Web-GUI
    inspired by Squeak

    written by Jens Mönig
    jens@moenig.org

    Copyright (C) 2010-2020 by Jens Mönig

    This documentation last changed: June 9, 2020

    This file is part of Snap!.

    Snap! is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as
    published by the Free Software Foundation, either version 3 of
    the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
.
.
.
*/
morphic.py
#
#    morphic.py
#
#    a tree-based GUI for Python
#    inspired by Squeak
#
#    written by Jens Mönig
#    jens@moenig.org
#
#    version 2009-Nov-06
#
#    Copyright (C) 2009 by Jens Mönig
#
#    Permission is hereby granted, free of charge, to any person
#    obtaining a copy of this software and associated documentation
#    files (the "Software"), to deal in the Software without
#    restriction, including without limitation the rights to use, copy,
#    modify, merge, publish, distribute, sublicense, and/or sell copies
#    of the Software, and to permit persons to whom the Software is
#    furnished to do so, subject to the following conditions:
#
#    The above copyright notice and this permission notice shall be
#    included in all copies or substantial portions of the Software.
#
#    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
#    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
#    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
#    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
#    HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
#    WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
#    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
#    DEALINGS IN THE SOFTWARE.

Edit 2: https://github.com/jmoenig/morphic.py has no LICENSE file. But, the text I copied above technically gives the license, just not the name of it.

#    Permission is hereby granted, free of charge, to any person
#    obtaining a copy of this software and associated documentation
#    files (the "Software"), to deal in the Software without
#    restriction, including without limitation the rights to use, copy,
#    modify, merge, publish, distribute, sublicense, and/or sell copies
#    of the Software, and to permit persons to whom the Software is
#    furnished to do so, subject to the following conditions:
#
#    The above copyright notice and this permission notice shall be
#    included in all copies or substantial portions of the Software.

is the license.

Oh I didn't expect a reply that looked like this but whatever

Ok.

Edit: (I thought you were sir_kitten2, but no.
slate_technologies
is your pfp,
sir_kitten2
is sir_kitten2's pfp)

Snap! is technically Python but with blocks.

The "say" block is like the "print" command.
The "pen" blocks are like the "turtle" library.

The list goes on and on. My point is, that Snap! is so similar to Python, it's kind of useless to make a Snap! Python type mod.

import re
re.match(r"\d*", "928342n3y923y59837nyvt8").group(1) ==  "928342"

3 print("Hi.") =

Hi.
Hi.
Hi.

and many, many more.

Plus, I want to make pyblocks a Snap!-like interface to Python.

No, wrong, except in the sense that all Turing-complete languages do the same things.

As originally designed, Snap! was sort of like Smalltalk but with blocks.

Since I got involved (BYOB3), it's largely been Scheme but with blocks. (For example, you won't find CALL WITH CURRENT CONTINUATION in Python.)

And for the past year and a half or so, it's also been APL but with blocks. (Look up "hyperblocks" in the manual.)

What do you think it has in common with Python? Your examples aren't very convincing. Every language has a way to print text. These days, every language has a library to do turtle graphics -- but Snap!, following Scratch, has it built in, because Snap! is Logo but in blocks.

Oh, now I finally get what you're talking about.

That sort of mutation of existing morphs is fine for playing around and learning how Morphic works. But for your actual Snap! mod, you should make your own morphs, by writing your own JS code that calls new Morph or new MenuMorph or new WhateverMorph.

How do I make a new morph in dev mode?

From the JS console?

I normally use the JSFunction block to make new Morphs. Just take a(nother) look at Block and Comment Manipulation.

Sure that works too. He asked about dev mode.

I like the Scratch 1.4 Morph creation, as you can make any built-in Morph with it. Pic: (in Bingo, not Scratch 1.4 because I think I messed up my installation of Scratch 1.4)

[offtopic]
I made infinite recursion in Dream (another Scratch 1.4 mod):
Screenshot (144)
Again:
Screenshot (145)
Playing around with Dream:
Screenshot (146)
Found the comment block:
Screenshot (148)
[/offtopic]

I mean in dev mode with all those complex menus and sub-menus.

I'm not sure what you want to do and why Dev Mode?
Editable TextMorph covering the stage can be created with this minimal example
doSetVar (8)

Scrolling can be built into the app or additional ScrollFrame must be added.

"Project does not exist"

Sorry, now the project is shared.

Cool!

  • I want the textbox to cover the entire right side of the IDE.
  • As I've said before, I want it to have easy, built-in support for input to and output from the textbox.
  • Turtle graphics doesn't make sense for a text-based Snap!. So, there wouldn't be built-in sprites.
  • Clicking certain parts of the textbox activating parts of the program. (ASCII art buttons)
  • Ability to make the textbox non-editable, or editable only in certain areas.
  • Ability to change the font of the textbox.
  • Built-in scrolling of the textbox.
  • And more.

Use the library "Getters and setters".

Covering the whole entire right side of the IDE would cover the sprite selection.