<div dir="ltr">Hey Ken,<div><br></div><div>Thank you for the great response. Sorry to hear about the local chaos, I won't ask but I also don't mind (I'm an asynchronous, "mull then respond" person on mailing lists myself).</div><div><br></div><div>> Question is "what do you want to end up with?". A new Morph subclass<br>> which you can then multiply instantiate? Given required backing code<br>> (packages) does this require a package to get requirements? Do you wish<br>> on the other hand to create a bunch of such Morph composites to be<br>> shared within a package to share requirements?</div><div><br></div><div>There are certainly a lot of degrees of freedom. The output I'm imaging is a string of hopefully idiomatic source code that can then be pasted where desired.</div><div><br></div><div>An example:</div><div><br></div><div><i>(BoxedMorph new :: scale: 2) sourcify</i></div><div><br></div><div>will evaluate to:</div><div><br></div><div><i>'BoxedMorph new :: scale: 2.0' .</i></div><div><i><br></i></div><div>I think this would provide a good layer to build on. It can be used directly by humans (call `sourcify`, then copy/paste the results into the system browser). But it would also provide a good foundation for other tools. I'm imagining things like being able to highlight a section of source code that creates a morph, then open it and do direct manipulation while having the changes streamed back into the source code.</div><div><br></div><div>> Terms. Hmmm.. perhaps "sourcification" and "sourcifier"?</div><br><div>Sounds perfect to me:) The more I think about this the more I'm sure it deserves its own name. Definitely related to serialization, but different because the primary goal is to be read by and useful to humans.</div><div><br></div><div>> You might get some ideas from</div>><br>> <a href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-UI/tree/main/metaproperties" rel="noreferrer" target="_blank">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-UI/tree/main/metaproperties</a><br>> and<br>> <br>> <a href="https://github.com/KenDickey/Cuis-Smalltalk-BabySteps/tree/master/IdeaMine" rel="noreferrer" target="_blank">https://github.com/KenDickey/Cuis-Smalltalk-BabySteps/tree/master/IdeaMine</a><div><br></div><div>Whoa, very cool! I think having an automatic way to display and edit visual properties is a clear and important win. The behaviors are a little freakier... they seem great but are also mind-bending.</div><div><br></div><div>> Sorry for the muddy ideas, but perhaps hey will engender some</div>> inspiration.<div><br></div><div>No, this was exactly what I was looking for, thank you!</div><div><br></div><div>~ Ian Jeffries</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, Nov 24, 2024 at 11:44 AM Ezequiel Birman via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st">cuis-dev@lists.cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Another strategy to address Ian's problem could be to record all the interactions. Emacs macros work like this.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 24 Nov 2024 at 16:16, Ezequiel Birman <<a href="mailto:ebirman77@gmail.com" target="_blank">ebirman77@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hm, do you have any examples? I don’t think you can build anything very
useful by manipulation with the mouse without writing code… you can add
submorphs to a morph, change colors and sizes, … not much more, I think…
nothing like a browser or an inspector. Maybe you should checkout
Fabrik, eToys, and other similar ideas.</blockquote><div><br></div><div><div>As Luciano said, there's not much you can do by direct manipulation, yet. One of the suggested ideas for <a href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/wiki/Helping-Cuis" target="_blank">helping Cuis</a>, by Juan and Hilaire is</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Take the SVG package and turn it into and end user Vector Graphics designer application. Like a baby Inkscape</blockquote><br></div><div>We currently lack the means to convert an arbitrary graphic entity, for example a letter, into a LetterMorph composed of VectorMorphs, and/or StrokeDrawnMorphs, back and forth; and that also opens the door to think about morph decomposition into simpler morphs all the way down to PixelMorphs, if necessary, and translations into other representations of the same entity, for example into something that Dr. Geo and/or Arrows can handle. Unlike with languages, these translations are easier coming from one direction, and harder from the other; maybe a hint that we'd always keep a good model when we need it, and derive from it, rather than the other way around.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 24 Nov 2024 at 09:55, Luciano Notarfrancesco via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Hm, do you have any examples? I don’t think you can build anything very useful by manipulation with the mouse without writing code… you can add submorphs to a morph, change colors and sizes, … not much more, I think… nothing like a browser or an inspector. Maybe you should checkout Fabrik, eToys, and other similar ideas.</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 21, 2024 at 22:27 Ian Jeffries via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi folks,<div><br></div><div>I'm experimenting with turning morphs created via direct manipulation back into source code and am looking for some tips.</div><div><br></div><div>As an example use case: I'm making a world map and would like to put my house in it. The image will be pretty simple: just three or four rectangles for the house, a rectangle for the garage, and a few circles to represent trees. Certainly I could just write this in code, but it seems like more fun to use the direct manipulation features of Morphic to create the scene (duplicate, rotate, etc), then serialize that scene to code.</div><div><br></div><div>Here's the twist: I'm already familiar with <a href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-UI/blob/a56d748ac25fadf3f1910f0666b7ea77bb3df286/tools/UI-Packager.pck.st" target="_blank">Cuis-UI-Packager</a> which is very cool, but my goal here is different. I'd like the result to be source code, not object files, ideally similar to what I would have written by hand.</div><div><br></div><div>First question: is there a term in the Smalltalk community or the academic literature for this task? Specifically for turning runtime objects back into idiomatic source code. (I realize this problem probably can't be solved in the general case since it's such a hard one-- one of the reasons I'd like to read more about it).</div><div><br></div><div>Second question: there isn't already a package for this in Cuis (or even in Pharo etc)? I wouldn't think so and can't find one by searching, but wanted to check.</div><div><br></div><div>I did find <a href="https://www.hpi.uni-potsdam.de/hirschfeld/trac/SqueakCommunityProjects/wiki/designer" target="_blank">Morphic Designer</a> in Squeak, but that's a little different since you build the morphs in a specialized app. I'm looking for something that you can target any supported runtime morph with (though I don't care how small the set of supported morphs is, any example would be helpful even if it only supported one or two).</div><div><br></div><div>I've got a little demo working for myself which has also given me some implementation questions, but I'll save those for a later thread.</div><div><br></div><div>Thanks,</div><div>Ian Jeffries</div></div>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div></div>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div>
</blockquote></div>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div>