Dyalog / JSONServer

A light-weight APL-based HTTP server to call APL code from the net by passing arguments and results as JSON.
MIT License
8 stars 5 forks source link

ScriptFollows for resources in other languages makes it hard to inspect/edit in Dyalog editor #2

Closed e9gille closed 6 years ago

e9gille commented 6 years ago

It may be easy to include chunks of text using the ScriptFollows approach, but I find it harder to manage and read. I wonder if it wouldn't be easier to keep such static resources in external files and read them in where needed. See: https://github.com/Dyalog/JSONServer/blob/c890409843baefce9f8a0dc2d4831ba0f0388f2f/Source/JSONServer.dyalog#L479

Compare with: https://github.com/e9gille/JSONServer/commit/650c764b8216766254505d6f198f643c24d81a59

bpbecker commented 6 years ago

I definitely agree that it's difficult to maintain large chunks of non-APL within an APL script. The technique I've adopted to maintain the non-APL is to copy it into in a separate file (dropping off the leading comment symbol by using block copy), modify it there, then copy/paste it into my APL script and use Comment Block to turn it into comments.

My intention was that JSONServer should have as small a footprint (few dependencies) as possible - currently you can just ]load JSONServer and you're good to go (yes, there is a dependency on Conga v3.0, but we know where that it in your Dyalog installation). This makes it trivial to integrate into an existing application.

If we integrate JSONServer into the Dyalog installation, then it's essentially the same sort of dependency as Conga, and I'd be more inclined to ship a separate file.