So much good stuff to read, so few hours in a day and way too short intermissions during the hockey games on tv tonight.
Thank-you ! On Saturday, March 11, 2023 at 4:58:59 PM UTC-4 Jeffrey Fisher wrote: > This sounds to me like a form of literate programming, a style created by > Donald Knuth. The only form I am aware of that achieved some popularity is > Jupyter notebooks, but I don't know whether Jupyter lives up to Knuth's > ideas. > > > pull that together to generate a program in whatever programming > language. > > In literate programming this would be called "tangling". Taking the > document you wrote and extracting a code file (or many) in a particular > language (or languages). > > The Emacs editor has this in org-mode with org-babel > <https://orgmode.org/worg/org-contrib/babel/>. It supports putting > multiple programming languages in the same document, and interacting > between them. A block of Python code can take its input from a block of > shell code. I am not sure if it is unique in supporting multiple languages > compared to other literate programming tools. If you follow your idea > further, perhaps this could be a source of inspiration. > > > It doesn't matter what the source language is. Pseudocode, models, > etc. They are just other languages. So transpile from anything to some > language > > However your idea is definitely unique, as literate programming is focused > on prose and not models, as far as I am aware. Org Babel sort of has this > as it has its own data structures. It can represent lists, tables, etc. and > knows how to get them from and feed them to a variety of programming > languages. Org Babel becomes a glue that holds many languages together, so > that you can express each idea in the language best suited to it, and > present your ideas in an order best suited to being understood by the > reader. > > TiddlyWiki or a similar tool could take this further due to being a > generic database. > > In TiddlyWiki I find myself wishing for Emacs, and in Emacs I find myself > wishing for TiddlyWiki. And I struggle to find time for learning more about > related areas like TiddlyWikiPharo > <https://talk.tiddlywiki.org/t/tiddlywikipharo-and-critical-code-data-literacy-curriculum/2033> > > (and the tools it is built on like Pharo and Glamorous Toolkit > <https://gtoolkit.com/>), Lisp Machines, the Acme text editor (Video: A > Tour of the Acme Editor > <https://www.youtube.com/watch?v=dP1xVpMPn8M&t=472s>), Plan9, Oberon. > > I hope you or others find some of these links and ideas interesting and > inspiring. > On Saturday, March 11, 2023 at 11:24:38 AM UTC-5 Charlie Veniot wrote: > >> Hey, I wasn't announcing a project to do that kind of thing. >> >> It is just a shiny object, yet another interesting thought grabbing at my >> attention, and I was only hoping to find like-minded individuals who would >> like to talk about it, maybe suggest some related resources/happenings etc. >> >> I've got way too many interesting things on the go to take on this kind >> of TiddlyWIki project. >> >> On Saturday, March 11, 2023 at 12:14:16 PM UTC-4 [email protected] >> wrote: >> >>> (Hmmm, I thought I responded to this. Disappeared in the ether, I >>> guess!) >>> >>> Charlie Veniot wrote: >>> > Scott Sauyet wrote: >>> >>> >> So while I wish you luck in this, I personally don't hold out much >>> >> hope for such an endeavor. >>> >>> > That's the kind of wish that leaves a foul odeur de je-ne-sais-quoi in >>> my >>> > cornflakes. >>> >>> But I do mean it. I really wish you the best. I'll be on the sidelines >>> cheering you along, celebrating your victories, mourning your failures. >>> But >>> I've been heart-broken enough in trying this that I will never hold out >>> high >>> hopes. >>> >>> > Whatever I did to you to deserve that stick in my "what if" wheels of >>> fun >>> > thinking, my apologies. >>> >>> I think you're likely to run into the same sort of insurmountable >>> obstacles >>> that I have. But if you're determined to stick to this course, all I can >>> do is cross my fingers and hope you see something I never did. I don't >>> expect it; but if you manage it, I will gladly eat (some vegetarian >>> alternative to!) crow. >>> >>> I mostly answered because I did want you to know that there are others >>> who've held similar hopes, even if mine have mostly faded. I never tried >>> this with TiddlyWiki. I don't see that making a difference, but this >>> tool >>> continually surprises me. >>> >>> > If it is possible to transpile from one language to another >>> successfully. >>> > If it is possible to compile from one language to another successfully. >>> > >>> > It doesn't matter what the source language is. Pseudocode, models, >>> etc. >>> > They are just other languages. So transpile from anything to some >>> language >>> > ... why not? >>> >>> It is completely possible to store a model in TW that you could use to >>> generate code in some small set of languagues. As you say, that is what >>> compilers do, and basic compilers are relatively simple. (Optimizing >>> compilers can get arbitrarily complex.) What I don't think is likely >>> is being able to create a high-level model system that will let you >>> quickly spin up new languages that will convert such models to source >>> code for that language. >>> >>> Think of the differences between the models underlying COBOL and Prolog. >>> A single model that spans both idea-spaces would already be tricky >>> enough. Now add in Forth. Then Agda. I think very quickly you end up >>> with a model that either has no cohesion or is so abstract that the code >>> generators are impossible to get right. >>> >>> I understand that Turing completeness means that a very large class of >>> languages -- probably all we care about -- can solve the same problems. >>> But that does not mean that converting between them or from some high- >>> level model is a tractable problem. >>> >>> If you do try to pursue this, I would make one suggestion: don't try >>> to solve one language up front and move on to the next. Instead try >>> at least three languages, ones with very different models. If you >>> can do this for some very limited domains (say "Hello, World", >>> factorial, and basic arithmetic), then I think you might be onto >>> something useful. Then try expanding alternately in two directions: >>> adding some new feature you want your model to support, and adding >>> a new language, with a model as different from the existing ones >>> as you can. (Saying you can generate Java and C# isn't saying much, >>> but saying you can generate Java and Prolog is much more impressive.) >>> >>> Best of luck (and yes, I really mean that!) >>> >>> -- Scott >>> >> -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/b8631bd9-bee7-4d98-aae6-b2f7942aa35fn%40googlegroups.com.

