I am not sure but this might be a thing - in orde...
# thinking-together
I am not sure but this might be a thing - in order to reduce scrolling through files I try to keep each function in respective separate file (so I have over hundred of files so far) and I wrote a simple code that copies the content of the function into the body of the html page and adds some template text like <script> tags etc. I try to find the most minimal set of tools in the motto of bicycle for mind - in other words - you don’t need a complex solution like an aircraft carrier but rather a bicycle.
the next improvement I want to add - is a simple parser that checks which helper functions are called inside each of the functions and build dependency graph, so I will copy all the dependencies automatically
Aside: As soon as the word “parser” is used, I think of DSLs for parsing. Ohm-JS, PEG, <ugh, other names will come to me in the fullness of time ... >. It used to be that parsing was usable by only a select few programmers (compiler writers), but PEG changes all of that. I have several unfinished manuscripts/essays/githubs wherein I try to show examples of how to build quickie text transpilers, kinda like REGEX-on-steroids (but different). Anyone is welcome to contact me, if interested in these WIPs.
@Oleksandr Kryvonos I like your approach, I've been doing similar things going back as far as Mu and Teliva. However it's not clear to me what problem your tool is solving. Is the
tags intended to mimic an editing experience or something else? Could you describe the larger context or workflow in which you use this tool?
currently all I did is - implementation of inliner for <script> content, in other words I implemented a bundler
but this approach I can also use to decompose large files into smaller ones
I am very interested in tooling that helps get rid of files containing multiple definitions. The reader often wants a very different organization than the writer can anticipate.
can you describe the example for your scenario?
For any change I make, I need to modify multiple files. But I'm often not consulting all of each file. There's usually some "cross-cutting concern" that's a slice of multiple files/modules/namespaces. Having all of multiple files open is almost always a waste of screen space. This isn't the most important problem in the world. Just something small that has always seemed easy to fix.
I also wrote a very simple bundler! It only really works if you code exactly like me though :) https://github.com/TodePond/Frogasaurus I really enjoy pushing for a minimal build process where possible, and I'm glad to see more and more people trying it out too, like this post: https://elk.zone/social.jvns.ca/@b0rk/109876329094276212