So I've been musing about designing a type of syntax for specifying and plotting time-based events where you might want actions to occur. I got the idea when learning about regex (regular expression) patterns for navigating strings, and thought such a versatile language might be useful for navigating a timeline.

If this discussion goes anywhere, it might be referenced by future historians that have nothing to do with mIRC. I'm not just designing this for mIRC scripts. It should be agnostic to anything implicit to mSL.

Here's an outline of objectives and desired qualities of this new syntax.

It should mirror the qualities of regex in areas of:
- simplicity -- simple time objectives should yield a short pattern
- complexity -- the pattern should grow with increasing complexity, but remain short for common tasks
- versatility -- objectives can be achieved using a variety of approaches
- encapsulation -- patterns can fit inside other patterns, creating branches and recursion
- prestige -- like regular expressions, the language should be easy to pick up but damned hard to master smile

The syntax should be useful in these areas of form and function:
- Creating events that will trigger at given times and intervals
- Checking if the current time or an input time has already elapsed
- Replacing one input time for a different output time, and perhaps other conversions
- Validating an input
- Let this thing replace /timers and crontab.
- Other ideas?

The syntax should incorporate these features and capabilities:
- Parsing and anchoring to absolute time, such as calendar dates and the system clock
- Handling of relative time offsets, intervals and duration in different units of time
- A toolbox of time-unit shortcuts and calendar anchors that can be combined with wildcards and quantifiers to define meaning
- Definitions and modifiers for a variety of localizations, date & time formats, calendars, other interpretation shortcuts
- ... ie: Gregorian (default), Julian, Revised Julian, Coptic, etc calendars. UTC, GMT, Zulu, w-w/o DST, leap years/seconds, etc.
- ... ie: Unix Time (in seconds, in ms, in 64-bit), Windows FILETIME (100-ns intervals since 1/1/1601 UTC), NTP RFC-1305, etc.
- Access to math and calculation within the syntax, ie, to define relative time offsets and comparisons
- Syntax geared specifically to achieving the goals of different function types and producing different outputs
- What functions will these patterns be used in? What types of outputs? (ie: regex is used in grep, sed, input validation etc)

That's all for now. I may make edits to this post throughout the day.

Feel free to brainstorm with me, or tell me why this is stupid.


Edited by Raccoon (27/11/18 09:52 PM)
_________________________
doin´┐Ż things a particle can