GithubHelp home page GithubHelp logo

Readme improvements about moldable-emacs HOT 5 CLOSED

greenfork avatar greenfork commented on September 14, 2024
Readme improvements

from moldable-emacs.

Comments (5)

ag91 avatar ag91 commented on September 14, 2024 1

Thanks again for your help. I have used your snippet and I have rewritten the README once more. Surely requires some more work but I hope it got closer to be understandable :)

from moldable-emacs.

ag91 avatar ag91 commented on September 14, 2024

Thanks for your observations: I am happy to improve things.

  1. I use story because is where I want to go towards with this mode: I want to easily communicate meaning supported by moldable-emacs. What moldable-emacs does is providing you with views of some context (by default a buffer, but often even just a selection of text). I call these views molds and they can be combined to produce more complex views to communicate more complex stories to others. If one day Emacs could write the molds for me and I could focus only on the story I want to say, I would be happy.
  2. I need help with this. My intuition is that other modes focus on a single view of something (e.g., Magit presents you git data in a way you can easily manipulate), while moldable-emacs tries to make inexpensive to create custom views and compose them.
  3. Not different at all. That is roughly the way it is implemented. What I want to focus though is what you can express with its features. This moldable-emacs is a framework to create molds (pure functions) so that you can easily compose them. It comes with examples that I use often (I use the mold CodeAsTree to tell a story to myself like "Given this code, I have to refactor it because I got a lot of duplication" by viewing a source file as a todo list of the duplicated code elements).

I am pretty sure I am confusing people at the moment and you could view this mode differently. For example, in #11 you can find

That's certainly a great use. I suggest that it can also be a tool to allow user's to solve specific problems they might have by solving general problems in molds. E.g. your excellent blog post about moving private functions to the bottom. I hate having to solve the same problem over and over again in different contexts. I would much rather solve the general problem once, and then be able to use it in many contexts.

I totally agree with her. You can use moldable-emacs to solve problems in a generic way. I see this as included: if I am pair-programming with you and I am telling you this story "Given these 100 files that have a misspelt string in one of their else statement, we would take forever to do it by hand. But we can do it in in one swoop if we define the correct pattern!", I can actually solve a boring problem in a generic way through views/molds. I can also give to you the "story" by serializing the views I used and their contents (I didn't work on this, but is simple to achieve).

In summary: moldable-emacs aims to bring your focus on what you want to communicate to others (yourself included) by making that simple to express (with molds).

-- Probably this message will not make things better, sigh..

from moldable-emacs.

greenfork avatar greenfork commented on September 14, 2024

Thanks for the reply! What you have described actually makes a lot of sense.

  1. I will try to describe the problem with the word "story" a little bit more. I understand that this is the core concept used throughout the whole description and you may feel like the "story" concept just has to be there, so I will try my best to explain how I see it. The readme introduces two new concepts simultaneously: first it introduces a concept of a "story", then it introduces the concept of a "mold". The story concept is new here - because it doesn't use any conventional definition of the word "story". An already existing definition of what is called "story" in the readme would probably be "desire" or "wish". "given all the expenses I had this year, I want to see what kind of holiday I can afford" - "I want" represents a wish here. It's true that there's no concept of a "wish with a condition" in English that I know of, so the readme says that this concept is called "story". And right after that the readme explains the concept of a "mold" with a newly introduced concept of a "story". This is why I think it can cause a confusion, two concepts are introduced too fast in a succession with one of them having a "stretched definition" of a real word. Although mold also has a real world definition, here we can clearly understand that readme introduces a very different meaning of the word so it doesn't feel like a "stretched definition" because mold usually means a physical object and here we give it a more abstract meaning.

There's also a bit forced nature of a condition, not every "story" has to be formulated this way. "Given this code, I have to refactor it because I got a lot of duplication" - in this example a better English would be to say "I have to refactor this code because I got a lot of duplication". So here it is just a "wish", an "obligation" or anything else but "story".

I have come up with an example of how I would describe this package in the simplest form possible which only introduces the single concept of a "mold":

Moldable Emacs introduces a new concept - Mold. Mold is a function with a precondition which may use Emacs buffers as inputs and outputs. Molds can be highly composable and one mold can fulfill a precondition for another mold. Molds can show a multi-faceted view of some data, for example ...

It's fine to have an abstract explanation of the general idea of what molds are for but I feel like the down-to-Earth explanation is missing.

  1. Some examples which do similar job: Jupyter notebook, literate programming in org-mode, visible/infrared light cameras, gnu plot and similar programs which have graph variations: line graph, bar chart, pie chart etc.; google/youtube/grafana/whatever analytics. I don't know which example would be the best but there are definitely some existing implementations which have similar ideas.

In summary: moldable-emacs aims to bring your focus on what you want to communicate to others (yourself included) by making that simple to express (with molds).

I'm sold on the second part, molds are simple to express, they are just functions and functions can be indeed easy to express. But the first part about "bring your focus on what you want to communicate" - this sounds good and I want to believe it but in essence it looks like a sales pitch to me, when I look at the example:

(me-register-mold
 :key "FinancesToHoliday" ; your mold/story name
 :given (:fn (I-can-retrieve-my-finances?)) ; the context
 :then (:fn ; the result
        (let* ((my-finances ...)
               (my-holiday-savings (learn-that-from my-finances)))
          (with-current-buffer buffername
            (show-prettily my-holiday-savings)
            (setq-local self (list :finances my-finances :holiday-savings my-holiday-savings)) ; this sets a state that the next mold can compose upon
            ))))

I ask a question, how does this bring focus to communication in any way? There's a general idea that there are "stories" and you tell a "story" and you communicate. But how is this package unique in enabling this idea? The underlying idea about stories and communication can be applied to a wide variety of things in a similar fashion. There's a structure to molds which helps with understanding but saying that it helps to communicate is a bit over-reach in my opinion, the structure to functions is a widely known concept: Eiffel probably pioneered post/preconditions, Racket's contracts and more languages use the word "contract" to describe the idea of a structure to functions; if we call this "help to communicate", then what would be a single language feature which does not contribute to helping to communicate? The whole programming language is a tool which helps us communicate with the computer machinery.

Thanks again for reading it, it came out quite long.

from moldable-emacs.

ag91 avatar ag91 commented on September 14, 2024

Thanks for that. Sorry for the late reply, your comment is full of interesting points and I am still thinking about all of that :)

I understand where you are coming from. Definitely the story bit is a stretch: the tension comes from what I want this mode to be and the current status of things.

I like your description, I will think some more and then I can try to inject it in the README.

About "bring your focus on what you want to communicate": when I wrote that I was focusing on the presentation aspect not the extension aspect (i.e, how to write a new mold). 90% of the time I work with moldable-emacs I focus on taking some data and making it easy to read for me (or others). I do that mostly by composing existing molds. Only a 10% of time I write a new mold for myself.

For example, I have a mold to list live production errors and I show them to myself grouped by categories and (when I can) with links to the failing source code. This is a view target to me, a developer.
Still these categories of errors are kept in an Elisp plist. The strength of the presentation layer of moldable-emacs is that I can now transform that plist (targeting a developer) into a bar chart with a pre-existing mold (no code to write, it's immediate), which could make it easy to communicate to management for example. So I can communicate to different audiences the same data without needed new code or integration (unless I need a completely new way of seeing things).

from moldable-emacs.

greenfork avatar greenfork commented on September 14, 2024

Thanks! I don't think I have something to add to the discussion, so feel free to close this issue. I will also think about this unique concept, that is an interesting approach to information and representation!

from moldable-emacs.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.