News for hackers. Stuff that matters.
Re:Show HN: An in-browser text editor to easily create stati... by cxr on Thursday January 27, 2022 @05:02PM (#30107450)
Kudos. With the writer, you're practicing a software packaging and distribution approach that I'd really like to see more projects make use of. From an earlier comment I wrote:

> It would be nice if as part of the zero config effort, programs (esp. programs that aim to be easy-to-use Web-authoring tools) would focus even more on being as close to zero setup/zero installation as possible[...] one should be able to use[...] similar programs by using the browser itself to open and run the program <https://news.ycombinator.com/item?id=29382091>

Any special reason why you're distributing the writer as a ZIP and not a self-contained HTML file with all the JS and CSS inlined? The experience is much nicer in the latter case (no cognitive overhead of keeping track of what needs to be copied/moved, no fragile directory structure that can be broken by a partial copy/move, etc.) I think this format for local software is currently undervalued and stands to be exploited to greater effect.

(In case your decision to stay off the social coding sites is intentional, kudos again.)

Re:Show HN: An in-browser text editor to easily create stati... by uuddlrlrba on Thursday January 27, 2022 @05:19PM (#30107709)
Toolchains are powerful, but I agree that not having to set anything up is really nice for people without those systems already installed.

I had it as one file and agree it is nice, but it is easier to edit with things separated. I might offer that option as well.

Re:Show HN: An in-browser text editor to easily create stati... by BlueTemplar on Thursday January 27, 2022 @10:35PM (#30110446)
Not sure what you mean by "inlined", but sadly Firefox still doesn't support .mth(ml) = .eml (even though Thunderbird does !)
Re:Show HN: An in-browser text editor to easily create stati... by cxr on Friday January 28, 2022 @06:06AM (#30113147)
Inline scripts being the opposite of using the "src" attribute for referencing external resources.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sc...

Re:Show HN: An in-browser text editor to easily create stati... by bachmeier on Thursday January 27, 2022 @05:17PM (#30107691)
There would be a lot to inline:

<script src="./js/prism.js"></script> <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-z1fJDqw8ZApjGO3/unPWUPsIymfsJmyrDVWC8Tv/a1HeOtGmkwNd/7xUS0Xcnvsx" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.11.0/umd/... <script src="https://unpkg.com/tippy.js@6/dist/tippy-bundle.umd.min.js"><... <script src="https://unpkg.com/mustache@latest"></script> <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/vega@5"></script> <script src="https://cdn.jsdelivr.net/npm/vega-lite@5"></script> <script src="https://cdn.jsdelivr.net/npm/vega-embed@6"></script> <script src="https://cdn.jsdelivr.net/npm/fflate/umd/index.js"></script> <script type="text/javascript" src="./js/purify.min.js"></script> <script type="text/javascript" src="./js/papaparse.js"></script> <script type="text/javascript" src="./js/components.js"></script> <script type="text/javascript" src="./js/template.js"></script> <script type="text/javascript" src="./js/main.js"></script>

Re:Show HN: An in-browser text editor to easily create stati... by cxr on Thursday January 27, 2022 @05:37PM (#30107959)
I don't understand your point. The browser eventually has to deal with that stuff whether it's in one bundle or split up with the added overhead of extra HTTP requests/file opens. Being able to more easily avert your eyes and ignore it doesn't change that. There's no magic. If anything, being able to ignore it more easily can actually remove the motivation to wean oneself off the kinds of things that are more convenient than they are strictly necessary.
Re:Show HN: An in-browser text editor to easily create stati... by bachmeier on Thursday January 27, 2022 @06:48PM (#30108734)
It's unlikely to matter from a performance perspective. If you're only going to load, it doesn't really matter. If you want to work with the file, all the other stuff will be in your way, for little gain.
Re:Show HN: An in-browser text editor to easily create stati... by spicybright on Thursday January 27, 2022 @07:04PM (#30108889)
What do you mean work with the file?

Either way, small HTML tools like this I'd rather have dependencies in-lined any day. I'd want to be able to chuck it into a folder for 3 years and be able to use it later even if the dependency hosting goes down.

Re:Show HN: An in-browser text editor to easily create stati... by mattwad on Friday January 28, 2022 @01:55AM (#30111474)
just loading external files requires some kind of web server, or access to the disk. That's why people like binary files for programs - they don't want to have to compile your code first just to run your app.