Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Raw" edit mode #1

Closed
benbusby opened this issue Dec 28, 2022 · 0 comments
Closed

"Raw" edit mode #1

benbusby opened this issue Dec 28, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@benbusby
Copy link
Owner

benbusby commented Dec 28, 2022

Basically the syntax seen in the "Fizz Buzz" example, or the example given in the FAQ, but parseable by the interpreter. It would need the following features:

  1. Interpreter flag to read file contents instead of timestamps
  2. Interpreter flag to export file contents to a series of files modified timestamps
  3. Ability to write comments inline without affecting the interpreter
    • Currently using the : character in documentation, but open to suggestion for
      something different
  4. (optional) Ability for the interpreter to reverse this process, including comments
    • i.e. Give the interpreter a list of regular Y2K files, read their timestamps, and output
      a "raw.y2k" file with inline comments.

The basic process should work like the following:


1 - Write a "raw.y2k" file

: raw.y2k
502 : Switch interpreter to 2 digit parsing

09 01 34 05 12 12 15 00 49 15 18 12 04 63 : Print "Hello World!"

00 00 : End print

2 - Test functionality with raw file

$ y2k -raw raw.y2k
Hello World!

3 - Convert raw file to regular Y2K files with their timestamps modified

$ y2k -convert raw.y2k
./1.y2k
./2.y2k
$ date +%s%9N -r 1.y2k
502090134051212150
$ date +%s%9N -r 2.y2k
104915181204630000

4 - Verify functionality of the newly created regular Y2K files

$ y2k .
Hello World!

This would make editing much easier, but also allow exporting for scenarios where proof of a 0-byte solution is needed.

@benbusby benbusby added the enhancement New feature or request label Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant