r4d 3.2.0-beta.1

Text oriented macro processor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
--------------------------------------------------------------------------------

### Todo... First?

1. Update cindex and dcsv
2. After above two. release as 3.2-rc1.
2. Documentation
3. New macros

#### Peformance

* Think about ditching textwrap
* Inline small functions
    [src]https://matklad.github.io/2021/07/09/inline-in-rust.html
* Remove `impl AsRef` as much as possible

* Change &args.to_string() into std::mem::take
    e.g.) let content = std::mem::take(&mut args[0]);
        -> function_map_impl:2374
* Use cow for performance improvement

* Remove a pattern such as ...
```

let mut lines = content.lines();
let line_count = lines.count();

if count > line_count: yatti yatta
```

THis is bad because count consumes. Error checking while iteration is better
but simply collecting is often faster.

#### BUG

* Check CLI options

* [ ] Debugger panics from the start ;( Now it doesn't... like what is wrong with you?
* [x] Fix require strict and require comment which doesn't respect vector rules -> auto.sh
    * [ ] Find similar cases
[bugs]./bugs_to_handle.md

* [x] Make sure I understand pipe and literal rules and stream rules.
-> THis is confusing because some doesn't process but some doesn't.
    - Pipe input evalaution : Doesn't evaluate
    - Pipe STDIN evaluation : Doesn't evaluate
    - Stream-lines and stream-chunk evaluation : Doesn't evluate
        -> I simply forcefully made them `skip_expansion`
        -> THis should go for documentation

#### Documentation

* From 177 macros, 17 documentation is done... wow
* [ ] New documentation for built in codes
    - Demo for basic usage
    - Example for automated tests
* [ ] Improve documentations
    * [ ] Macro indices
    * [ ] Macro syntaxes
    * [ ] Hook macro
    * [ ] ETC...
* [ ] Add documentation why I didn't use include macro for extension.
    - Mostly because it is not controlled at all. Although it might be good.
      BUT really hard to help when user makes a mistake and it goes to
      andromeda hell.

#### New features

* [ ] Enable arguments by whitespaces for `map` variants + stream_chunk flag
* [ ] Stream related flags
    * [ ] Enable user to use anon macro in flag

#### New macro

* [ ] Flat -> Flatten indented sub lines into a single one
```
$stream(flat)
let setter = Setter::new()
    .builder()
    .yeah();
$consume
===
let setter = Setter::new().builder().yeah();
```

-> This is simlar to vim J function but works on chunk.

* [ ] Flatreg -> Flatten by regular expression. Regexed line becomes main line
  that following lines are joined to
```
$define(wow,a_content=$flatreg(Self::,$a_content()))
$stream(wow)
Self::PermissionDenied(txt, atype) => format!(
"Permission denied for \"{0}\". Use a flag \"-a {1:?}\" to allow this macro.",
txt, atype
),
Self::StrictPanic => 
    "Every error is panicking in strict mode".to_string(),
$consume
===
Self::PermissionDenied(txt, atype) => format!( "Permission denied for \"{0}\". Use a flag \"-a {1:?}\" to allow this macro.", txt, atype),
Self::StrictPanic => "Every error is panicking in strict mode".to_string(),
```
* [ ] Wrapl -> Wrap content by lines. == vim's "==" function
* [ ] Sortli -> Sort list
```
$stream(sortli)
ABCD
ABCEE
    AAAA
AA
$consume
===
AA
ABCD
ABCEE
    AAAA
```

* [ ] No pipe truncate option for macro users.
* [ ] Also add non evalexpr variant macro ( inc, dec )

#### MISC, bug detecting, Ergonomics

* [ ] Regcsv add skip parsing and skip extension maybe?
    -> Arg parser changed, so it might have been fixed pretty.
* [ ] Improve error messages for number related macros.
    e.g) strip series should indicate why index doesn't meet condition.
        -> Given content's length is ... and you gave index ...
* [ ] Check logging sanity as a whole for the time.
    * [ ] Stream related flags
    * [ ] Stream macro
    * [ ] SPread macro
* [ ] Check argument sanity ( Single argument )
* [ ] Check if macro attribute is necessary for macro name input ( map, spread )
* [ ] Check cli option

#### 4.0 IDEAS

* [ ] Should after and until macro support regex? because it doesn't for now

### TODO

$todo_start()
* [ ] Refactor
Totally change internal logic. Currently every text is processed as sequences.
Yet this approach has both pros and cons. Especially when you have to process a
file.
- To think about it, one of the power of r4d is stream based processing which
  makes concrete structure hard to be achieved... But shouldn't there be a
  hybrid way to do so?
* [ ] Bug fixes
    * [ ] Split_arguments should return Option not a result... Although this is
      somewaht breaking changes. Therefore I don't know if this is proper or
      not.
        - Why not create a new method which returns simply splitted array? and
          leave a method for correctly detecting a status
    * [ ] Currently user configured macro name is not "available" in log
      message.
      - Because proc macro doesn't support it as syntax
* [ ] Feature
    * [ ] Early return
    * [ ] Implement data format pretty printer
* [ ] Documentation
    * [ ] About escape rules + parenthesis rule
* [ ] Test
    * [ ] Test windows build
$todo_end()

### LATER

* [ ] Test hook macro documentaion

--------------------------------------------------------------------------------

### Changes

### Macro ergonomics

- Macro chain : This is much harder because many internal changes

#### Hard+misc ones

* [ ] Complete wasm

* [ ] Implement array object.
* [ ] Projects performance

- Argument parsing to return a slice of values not a string would be good I guess?
    - This needs to implement cow manipulation and I'm... ok maybe later
- Utilize regex engine for fast parsing especially, define parsing. Possibly
whole parsing process, meh I don't think I can... Focus on define parsing.
- Refactor codes into multiple chunks of functions for better readability
- Use faster hashmap
- Currently lexing copies all chars into a versatile vector which may not
be the best idea. A bettter idea is to iterate and add slice from source.
But it is true that such implementation is more trivial to maintain and
extend with arguable performance boost.

* [ ] Make much more smaller binary file available as basic feature
    - Opt-lvel has huge effet (2.2M -> 1.8M)
    - codegen-units = 1 has a 0.1M gain ( increase compile time but it's small anyway )
    - upx is a holy banger (1.7M -> 500K ... Just wow...)

## Delayed, paused or stopped

* [-] Error and warning types
- Enable user to suppress specific types of warning
- Personally, I deicded it is not improtant or demanded feature. Thus discarded.

* [-] File feature with commands such as ls, pwd
- R4d is not a m4 replacement rather, it is an alternative for text processing.
R4d aims to be an booster of documentation not a build script. Thus extra
complexity for ls, pwd support are outrageous.

* [-] Custom keyword macro
- Every macro can be used as basic macro
- And I could not achieve what i wanted because I wanted optional parsing, which is hard to add as interface.
- However, to thin of combining if and function is actually impossible in plain programming languages. Of course there are no reasons why not for r4d? But I don't think it is very indeed a demand

* [-] Define regional macro -> Is it necessary? Or is it desirable?
- This maeks macro execution and debugging so much harder
- And also makes structure too complicated for small gain

* [-] Print macro information might be also useful
- However I think it needs a serious refactor of debugger logics.

* [-] Eval command in debug mode maybe useful? -> Yes but, it doesn't meet the point of debugging

* [-] Make parser separated
This is hard to make it right... for current status

Following is such hard to do cleanly, deterred
* [-] Lipsum variants
  - Lipsum width word limit (new lines after certain words)
  - Lipsum width width
  - Lipsum cache which utilizes cache files saved in tmp directory.
  is useful because calculating length and word limit is much more expensive
  simple random generation.
  - Lipsum with custom separator

### NOTE

1. About dnl and enl inside body
    - ENL or DNL doesn't work inside macro body because dnl is evaluated on every "line".
    - ENL is evaluated on "NONE" Cursor which menas enl is not evalued properly
    inside body. where lexor's cursor never goes to NONE state.

### How macro parsing works?

1. Get file buffer or stdin buffer
- It is deliberately decided to get a bufstream not a single string because
file or standard input maybe very big which is not so memory friendly and
partial processing will yield nothing if input was given as a huge chunk.
- Yet definition body processing doesn't read bufstream but a single chunk
of body for simplicity of error logging.
2. Iterate by lines
- This iteration doesn't use std's builtin lines() literator but use custom
iterator method which was blatantly copied from stack overflow. While std's
lines method always chop newline chracter, this was not ideal in r4d's
processing procedure.
3. Check if line include macro invocation
- Checking is simply done with character comparision of "$" sign existence.
4. Check if line include partial macro invocation
- This is a branch executed only when macro fragment is not empty, which means
current line is a part of long macro invocation.
5. Push lines to `chunk` until macro invocation is complete
- For 3 ~ 5 phase what so called "lexing" is introduced. Lexing has its
cursor(state machine) in its body so that lexor can define whether iterated
chracter is valid character for macro invocation or not. Invalid characters
will break the macro framgent and return original text.
6. Execute macro invocation and substitute with final result.
    - If macro doesn't exist, original text is returned
    - The order of macros are "local", "custom" and then "basic", this enables
user to override basic macro with custom macro.

### How basic macros work

Basic macros are simply a hashmap of functions with a string key. If processor
finds a macro fragment(chunk). It tries to evaluate the chunk and find sif
macro name is included in macro maps. After finding local and custom macros, if
basic macro name is found, macro call(function) is executed. Thus adding a
basic macro is as simple as creating function and insert a new hashmap item.

### DONE

* [x] Passthrough feature
* [x] BUG! : Fix unicode tail,head,strip: God damn it
* [x] New macro : $enl() remove right next newline
* [x] Error on duplicate table name
* [x] Add droptable macro
* [x] Redirect refactor with relay and hold macro

* [x] Possibly some mathematics related macros
    * [x] Min
    * [x] Max
    * [x] Ceil
    * [x] Floor
    * [x] Precision ( Floating number )
* [x] Some more text processing
    * [x] Cap -> captialize
    * [x] Low -> lower
    * [x] Num -> strip number part from given text
    * [x] Rev -> Reverse an array
    * [x] Eval with original formula support
    * [x] tarray & hms


* [x] New basic macros
    - head
    - headl
    - tail
    - taill
    - strip
    - stripl
    - Grep  ( Only print matched lines )
    - Index ( Get indexed value from array )
    - Sort  ( Sort array by values )
    - Sortl ( Sort lines by values )
    - Fold  ( Fold new lines to single line )
    - Foldl
    - Count ( Get count of array )
    - Countw( Get count of array )
    - Countl( Get count of lines )

* [x] Storage function
    * [x] update
    * [x] extract
* [x] New default macros
    * [x] Sep macro (keyword)
* [x] Indexing macros with "cindex" crate
* [x] Named pipe ( in a hashmap )
* [x] Pipe truncate option as builder pattern
- Default as none for compatibility
- From 2.0, default is true
* [x] Fix comment argument bug
* [x] DNL Macro
* [x] New basic macro
    * [x] Triml -> Trim line by line
    * [x] Wrap : But with additonal packages
    - Though I beleve it worth
    * [x] Panic macro
    * [x] Flow control macros
        * [x] Escape
        * [x] Exit

* [x] Improve signature ergonomics

* [x] Fixed unexported DiffOption and HookType re-export
* [-] Added help message before and after original help message

* [x] Make signature method
* [x] Use clap arg builder

* [x] Changed builder pattern to use move semantics rather than mutable reference
* [x] Debug sandboxing was not working

* [x] Bug : Name collision
- This was solved by clearing lower level local macros
- This was caused because nested macro was using previously declared local macro
- In a scenario apple
1 declared local macro "alpha" and nested macro 2 delcared a macro called "bravo"
This is totally fine and local macros will be all perished after 0th invocation.
- In a scenario banana
1 declared local macro "alpha" and nested macro 2 delcared a macro called "alpha"
This is also totally fine because lower level local macros are called first.
- However, in a scenario cacao
1 declared local macro alpha and nested macro 2 declared a macro called alpha.
But in this time 1 called another macro 2-1 which declard a macro called "alpha".
2-1's local macro "alpha" is treated as 2's local macro alpha and this triggered some nasty bug.

- The solution was quite straightforward. Remove all lower level macros after
every custom macro invocation. This might not be the most performant solution
but very cheap one.

* [x] Not necessarily a bug but improved
In debugging, argument was not processed in debug console. Which is somewhat
useful and not so useful. I simply added debugging feature's varaible and added
processed argument. Users can view both raw and processed arguments at the same time.

* [x] Debugging : Removed output text from promt, because if felt unnecessary
* [x] Macro attribute position fix

* [-] Eable useful basic macro customization by exposing processor state to end
user.
- You know what? This doens't look useful. Most of them are quite vulnerable to
undesired changes and not so desirable to end user usage.

* [x] Deprecating global in favor keyword macro ```static```
* [x] Deprecating bind in favor keyword macro ```let```
* [x] Declare macros
* [x] Custom special character
* [x] Comment type addition
* [x] Fixed a bug where assert result was not printed when there was no error at all.

* [x] Hook macro for macro and character
* [x] Hook macro should be temporarily disabled for specific cases
* [x] Static custom rules

* [x] Diff only changed option
* [x] Bug: Fixed default comment behaviour
* [x] Bug: Non sufficient macro invocation doesn't return whole string... wut..


* [x] Comment rule
* [x] New basic macros
    * [x] Ifenvel
    * [x] ifdefel
    * [x] abs
    * [x] arr
    * [x] envset
* [x] Newline consistency in chomp macro
* [x] Fixed a bug where unterminated macro was not properly evaluated

* [x] Merged into a single macro path becuase paths is redundant
* [x] Assert, nassert, fassert
* [x] Repl as keyword macro because replacement should not be expanded
* [x] Made error branch for invalid argument
* [x] Create unit test

* [x] Windows path sanity is broken shit...
* [x] Yield diff as error
* [x] Log as error
* [x] Segreated debugger module sueccesfully
* [x] Added a custom prompt log logic
* [x] Added a custom prompt log for from macro

* [x] Fixed keyword macros being written without chunk respect
* [x] Print macro attributes in logging
* [x] Refactor codes so that keyword and macro evaluation is merged.
* [x] Empty name is problematic or say inconsistent
* [x] Does removing piped value necessary? It doesn't give that much benefits, I think...
* [x] Change "from" syntax, a breaking change though, better choice for ergonomics.
* [x] Global bind which evaluates to value
* [x] Changed paths syntax
* [x] Overriding is prohibited in strict mode
* [x] Make strict by default
- Make lenient option rather
- Also apply to documents -> Not yet
* [x] Basic macro changes
    * [x] Make ifdef work as if and if else
    * [x] Make ifenv macro also as if and ifelse
* [x] New replace macro
* [x] Changed several cli options

* [x] Add comments for add custom rules
* [x] Make include respects currently set file
- For example, relative file is evaluated based upon currently read file's path
* [x] Made include input file is properly set, was actually a bug
* [x] No env value is currently panicking... which is not so desirable, I guess
* [x] Env values such as INPUT\_FILE or INUPT\_DIR would be usefule
- It has been decided as RAD_FILE and RAD_FILE_DIR
* [x] New basic macros
- Get parent
- Get filename
- Merge paths
* [x] Is warning for env is also harsh? Should be empty?
- Now this only yield on strict mode
* [x] Remove unnecessary hashamp clone
* [x] Make some macros a speical type
    * [x] Make if,ifelse,foreach,foloop as a keyword macro such as pause and define
    * [x] Create new struct keyword maps
* [x] Refactor sandbox environment
* [x] Add not macro

* [x] Make error messages much more accurate for various situations.
* [x] Add a diff tool for debugging
    * [x] Set diff original and diff processed when necessary
    * [x] Print diff in result if certain option was given => Diff option
* [x] Add conflicts with option for more ergonomic options

* [x] Segrate some structs into separate files
* [x] Add new error type permission denied as panicking
* [x] WriteOption::Stdout is weird in err context because it is always stderr
- Changed to WriteOption::Terminal
* [x] Panicking error red colored
* [x] Make basic macro failable not a panicking
- Make it an option
* [x] Add new basic macro with closure without knowing macrotype
* [x] Print permission
* [x] Divided io into fin and fout
* [x] Fixed a bug wherer dollar sign doesn't restart framgent check
* [-] Currently disabled escape with parenthesis for eaiser maintain
* [-] Escape rule is very inconsistent
- In arg parsing it consumes and set ending parenthesis literal
- In define parsing it is treated as it is, a character ```\```
- It costs more than its worth

* [x] Make colored optional
* [x] ~~Dry run~~ Discard run
- Problem is dry run doesn't prevent fileio fileout or redir
* [x] Authority option
- Disable IO,Syscmd,Shell by default
- And enable it by user input
- Create : AuthFlagStruct with stores array of u8 which represents u8 number of enum values.

* [x] BUG :::: Sys cmd fails to parse arguments... shit
- Simply bypassed with default greedy and space split
* [-] BUG :::: On debug mode, include triggers newly nested prompt...
- Well this might not be a bad idea to be frankly speaking
* [x] Make proper documentation for codes(docs.rs)
* [x] Consider adding custom basic macros
- This is very much easy so why not
* [x] New debug mode documentation
* [-] Check if parse_chunk_lines acts as intended in basic macros
* [x] Change logic of infinite loop warning, so that it onlys warns on body
expansion

* [-] Check if lexresult::Discard is ane behaviour
- This is ok because discard is only called when escape_nl has been set which
means it succeeded evaluation
* [x] Print line doesn't work as intended
* [x] Refactor from_yatti_yatta series into single method
* [x] Complete span command
- Remove unused caches
* [x] Make chunk_line chunk_char for more detailed debuggin and error logging
- Also parse_chunk calls freeze_number which makes error debugging hard to watch
- This was actually not so hard, surprisingly
* [x] Make interactive flag which toggles text wrapping
* [x] Make BR as not an error but a warning
* [x] Non printing macro do print empty space in debug mode
- $BR() evaluates to newline character fixed it
* [x] Log flag with debug flag yield strange output
- Line after macro evaluation is duplicated

* [x] Add debugger
  * [x] Lines option
  * [x] log option
  - Log every evaluation
  * [x] Debug command
    * [x] print, help
    * [x] step
  * [x] Breakpoint

* [x] If, ifelse is not so friendly with deterred macro
- Just remove it
* [x] Argument parsing is not properly done
- This was because I was adding new argument if there was any "blank character"
which menat consequent blank characters created more arguments
* [x] Warning system is broken in define parsing

* [x] Currently ifelse is inefficient
- Added deterred rule
* [x] Make library binding
  * [x] Make processor option setting more ergonomic with builder pattern
  * [x] Make code DRY -> Kinda done
    * [x] Processor -> parse method is too long
    * [x] lexor parts -> Actually this part is fine
    * [x] Arg parser is disastrous -> Little bit better
  * [x] Optional dependencies
  * [x] Only disclose necessary modules and structs

* [x] Add_line_number, clear local inside parse_lin
- Made builder pattern
* [x] Should move from returning self to returning mutable reference.
- Added backup methods for sandboxed form
  - File name backup works
  - Line number backup works
  - Local backup also works

* [x] Read from string method for lib usage
* [x] Hide sandbox switch from end user experience
* [x] Combination of stdin and file input
* [x] Add strict mode which is mutualy exclusive to purge mode
* [x] Temp refacotr a bit
- Made temp a file not a path
- Made temp redirect
* [x] Final render result -> Show warning and erros count
* [x] NameToArgs is not desirable
* [x] Make declartion more tolerable
* [x] Add local(bind) macro
* [x] Made error messages much easier to use.
* [x] Warn non existent include operation with error message
* [x] Improve foreach, forloop ergonomics
* [x] Make temp target change macro
* [x] Greedy is working not as it should
* [x] ENV macro
* [x] Path macro
* [x] Add literal attribute
* [x] Parent argument indicator

* [x] Enable all greedy by default option
* [x] Purge mode
* [x] Frozen file -> Bincode file
* [x] Greedy suffix which put all remainder to last element without splitting
- e.g. $pipe|+(1,2,3)

* [x] Unbalanced parenthesis warning in non fragment case.

* [x] Make expansion rule more consistent for basic macros
* [x] Literal input is stupid make, make comment-like literal rule instead
* [x] Improve macro ergonomics
* [-] Detect failed local macro definition
- This is impossible because definition can contains outer macro
* [x] Change iterator value naming -> $:
* [x] Name can be empty space which is problem
* [x] Refactor namespace rule
* [-] --Greedy double quote rules-- This is impossible or hard to make
* [x] Make error consistent so that failed invoke calways yield error message
* [x] Escape char doesn't work at all.. All escape characters all just printed as it is.
* [x] Line ending consistency
- Give user an option to use preferred line ending
* [-] Make syscmd call unsafe and allow only when sudo was given
- Maybe this is fine? Because some command should require auth anyway?
* [x] Make undef line is deleted
* [x] Error loggin
  * [x] Error message should indicate which line caused an error
  * [x] Silent option
  * [x] To stderr
  * [x] To file
* [-] Failed macro stops further evlaution.
- This is because parse chunk only executed only when macro is valid
* [-] Improve modularlity
- Define is not basic macro but reserved macro for now, Change this into basic
macro for better readability and maintainability.
Though it has some benefits, I don't think it is necessary to refactor.
* [-] Is nested parse chunk necessary? Maybe main parser is alreayd expanding all?
It was not... mostly because some macro can make another macro call...

* [x] Change from chunk write to buf writer
Currently every substituted text is saved to a single string variable, which is
problematic when ram size is not sufficient. Use buff writer to write given
string without saving to designated space.

* [x] God damn it, lines() consume all duplicate new lines
I googled a lot and shamlessly copied from stackoverflow, I Felt real needs to
learn rust much more.

* [x] Made defnition line is deleted

* [x] Enable user to override basic macro
* [x] Currently local macro is not released which is a bad idea as a final output.
* [x] Currently local macro is not perperly constructed when same macro invoked in single call
Using usize type level is not a bad idea, however it should be definite where
to add number and not

* [x] Read from file option
* [x] Output option

* [x] Make custom parser and lexor
  * [x] print out non macro text
  * [ ] Print remainder from lines that contains macro definition
    * [x] Complete register logic
      * [x] parse define macro's arguments
    * [x] Complete invoke logic
      * [x] Basic macro works for now
      * [x] Single macro in single line works
      * [x] Single macro in multiple lines
      * [x] Multiple macro in multiple lines
      * [x] Multiple macro in multiple fragmented lines
      * [x] Make custom macro works
        - Invocation should be also another
        - Thus "MacroMap"'s evaluation logic should be located in processor not
        in Macromap itself
      * [x] Make nested invocation work
        * [x] When definition includes nestedness -> This is evaluated on
        invocation
        * [x] When invocation includes nestedness -> This is evaluated with
        method name "evaluate"
  * [x] Print evaluated macro substitution
  * [x] Print failed macro
  * [x] Print a line which as multiple macros in a line
  * [x] Print a nested macro substitution

* [x] New basic macros
  * [x] Trime, chomp, compress no stripping
  * [x] Substring
  * [x] tr
  * [x] Pause macro option
  * [x] Write to temp file /tmp %TEMP%
  * [x] Literal attribute -> $test\(Literal text\)
  * [x] Make pipe rule
  * [x] Len
  * [x] Rename macro
  * [x] Csv table html format
  * [x] Define append (appdef)
  * [x] Text format
    * [x] CSV macro
    * [x] Data macro from data
      * [x] csv to markdown table
      * [x] csv to wikitext table
  * [x] Syscmd macro
  * [x] Time macro
  * [x] Undefine macro
- This needs sincere consideration because this binary targets alpine which is
not necessarily easy to combine openssl library.
- Thus using using curl command through std::process::Command might be a global
choice
  * [x] Include macro
  * [x] Repeat macro -> Same thing
  * [x] Foreach loop
  * [x] For loop -> Change by number
  * [x] If macro
  * [x] If define macro
  * [x] Remove extra new lines and spaces (Namely, "chomp" method)
  * [x] Random text -> Use lorem lipsum

* [x] Make direct subcommand option

- Buggy fixes, reserved for release notes

* [x] Fixed strange literal syntax
* [x] Removed double quotes syntax
* [x] Removed literal version of macro invocation
* [x] args_to_vec cannot parse string ```\**\``` starngely
* [x] Substring doesn't work with utf8
* [x] Foreach is broken
* [x] Changed define syntax

* [x] Decide concrete rule for versioning
* [x] Possibly relay and halt warning
* [x] Enable lib user to change write option on the way
* [x] Queue
* [x] Separte warning into two types
    * [x] System + program warning ( About security )
    * [x] Processing warning ( About execution sanity )
* [x] Merge fragmented option into single enum

From 2.0
* [x] Renamed basic to function
* [x] Renamed keyword to deterred
* [x] Created disgnated runtime macro map
* [x] Greedy as default behaviour and cannot be disabled becausew hy not
* [x] Removed closure rule
* [x] Pipe truncate as default
* [x] Made distinction between function macro and deterred macro much more consistent
* [x] Procedural macro for extension macro
* [x] Move deterred macros into function macros if possible
* [x] Hygienic processing
* [x] Relay halt as stack oriented not variable oriented
* [x] Rule files will get vector, not an option of vector
* [x] Provide auth checking in ext interface

---
For 2.1.2
* [x] Missig error message
* [x] Fixed wrong abs behaviour
* [x] Document macro
* [x] Document for macro builder
* [x] Warn user about unterminated input
* [x] Disabled read macro
* [x] Input stack bug
* [x] Include as raw option
* [x] Exec command
* [x] inplace eval
* [x] For loop nested mechanics with $:() macro
    * [x] This is breaking changes... Thus should be configured as feature until 3.0 release
* [x] Relocated function macros to deterred macro

---
For 2.1.3
* [x] Hid unnecessary extra features from users
* [x] ExtMacroBuilder's export has been feature gated by storage. What?
    - Now it's independently exported.
* [x] Ditch avoidable dependencies
    * [x] Thiserror
    * [x] Csv
    * [x] Lipsum
* [x] Remove features for better maintainability
    * [x] Storage

---
After 2.1.4

* [x] Rado
    * [x] Clap template
    * [x] Clap options
        * [x] Diff subcommand
        * [x] Edit subcommand
            * [x] Basics
            * [x] Make default rad_editor variant.
        * [x] Read subcommand rad,execute option
        * [x] Sync subcommand
            - Possibly rename later
        * [x] force subcommand
            * [x] read flag
        * [x] -o out option
        * [x] arguments option

---
3.0.0-rc.2

* [x] Hide processor and enhance Processor's documentation
* [x] Exit status handling : It exited the whole process without going further
sources
* [x] Audit auth template
* [x] Easily extend with script.rs file
* [x] Change from Vec<> into &[] if possible
* [x] Docs.rs documentation

---
3.0.0-rc.4

* [ ] New macros
    * [x] Escape blanks macro
    * [x] Grep and grepl variants separation
    * [x] Renamed arr to spilt
    * [x] Removed sep macro because, join works the same
    * [x] Removed queries macro
    * [x] Regexpr
    * [x] Unwrap
    * [x] Find
    * [x] Findm
    * [x] Input
    * [x] Temp
    * [x] Trimla ( Trim line amount )
    * [x] Indent ( Indent lines )
    * [x] Tab && space && empty
    * [x] read\_to read\_in
    * [x] join, joinl
    * [x] Number notation
    * [x] letr, staticr
    * [x] Counter macro
    * [x] Removed strip and stripl
    * [x] Align texts
* [ ] Macro ergonomics
    * [x] Renamed unwrap to strip
    * [x] Regex order change
    * [x] Changed tr order
    * [x] Newline can be repeated
    * [x] Changed fileout's argument order
    * [-] Tempout truncate option : No, but temp_to and new processor will
    delete temp file before writing contents
    * [x] Halt with boolean arguments so that, halt is queued by default
    * [x] For variant order change

* [x] Apply new(1.62) clippy fix
* [x] Ditch unnecessary "Some" arguments
* [x] Changed argument parsing behaviour frome lexor and arg parser
    * [x] Regex pattern doesn't go well with string literal "\* *\" syntax
    * [x] Should be represented as literal
* [x] Make a manual option (With signature option)
* [x] New macro attribute trim_input '='
* [x] Define macro respects trim_input
* [x] Removed cnl
* [x] Regex cache
* [x] Find possible inconsistent \n chracter usage
* [x] Trim performance with macro_rules
* [x] Changed parse_chunk_args logic and ditched parse_chunk_body
* [x] Queue is inconsistent (Queue execution timing was strange)
* [x] On parse chunk body: Unterminated string was not appended to remainder
* [x] Now comment can start in between with start type

* [x] Bug : Some macro didn't processed literal properly
* [x] Bug : Assert mode panicks on first error
* [x] Bug : Erro rmessaged cascaded as much as nested level
* [x] Bug : Exit yieled error and printed unreasonable erros when including multiple files
* [x] Modifed lex_branch_end_frag_eval_result_error to not print error on itself
* [x] Bug: Include containder had high priority over relay target
* [x] Bug: Fasssert set success as fail

* [x] Line number is strange on include. Although this persists
* [x] Enl inside macro body doesn't work... why?. Now it works

* [-] Logger doesn't work in nested context
    - I don't know but... it works now? how come...
* [-] Unbalanced parenthesis warning is repeated for no reason. This was
  because I was using it as content.

* [x] Now foreach and forline should get data as trimmed?
* [x] Trim output now consume new line if result is empty
* [x] Included signature and color as default into a binary because man flag is
critical
* [x] Now, silent's default value is any
* [x] New macros
    * [x] slice
    * [x] loge
    * [x] cmp
    * [x] ssplit
    * [x] istype
    * [x] iszero
    * [x] isempty
    * [x] ftime
    * [x] comma
    * [x] append with trailer
    * [x] chars
    * [x] squash
* [x] Feature
    * [x] Make deterred macro works like other macros
    * [x] Rado : Edit in place with io operation
* [x] Improve macro ergonomics
    * [x] Enable logm to print any local macros
    * [x] Append now also appends to local macro
    * [x] APpend is now a deterred macro
    * [x] No Breakpoint warning
    * [x] Changed from to spread
    * [x] Removed ieval because counter replaces it
    * [x] I changed queue to insert as no stripped.
* [x] Bug fix
    * [x] Literal rule is bugged ( Nested literal rule doesn't work at all )
    * [x] Setting an error option resetted a logger entirely.. why I did that?
    * [x] File operation was able to write to self
    * [x] Fixed consume newline waas not properly respected

* [x] BUG : Stdin yields error because input was not set
* [x] ERGO : Cmp is ambiguous, Change it to better name with useful variants
* [x] FET : Freeze refactor
    - Disable non-declare macros in freezing mode. ( Define or static )
    - Add new "set\_freeze\_mode" method
    - Freeze reuses out option
* [x] FET : Packaging
* [x] Documentation : 80 char cap for description + if variant refactor
* [x] Changed module name into common, relocated many common variants into
  separate ones
* [x] Now static macro is not expanded
* [x] Feature : Dry run

* [x] Pipe input macro attribute
* [x] Warn readin when relay is on. For sanity reason
* [x] Now relay and read to doesn't truncate a file
* [x] Now raw include doesn't pause but escape : More efficient + can handle
  possible breaking rad codes
* [x] Somehow container relaying priority was wrong ..?
* [x] Include call inside macro calls are not espcted behaviour
* [x] now index variants don't allocate into a separate vector but use iterator
  directly in cost of O(n) time complexity

* [x] New macro
    * [x] Dump
    * [x] indexl : Index line
    * [x] Sep : Separate
    * [x] until
    * [x] after
    * [x] map variants
    * [x] grepmap
    * [x] Capture
    * [x] Meta-processing related
        * [x] Require
        * [x] Strict
        * [x] Comment
    * [x] splitc : Maybe this can replace until or after?
        - No actually not, because splitc's user should know the exact form
        while until and after never fails thus enable dynamic input.
* [x] Negate macro attribute

- Escape characters
    - ```\\``` nees to interpreted as ```\``` because ```\,``` should be evaded
      on some cases. When ```\``` should be given as single character with
      following delimiter comma.
    - ```\,``` now interpreted as literal comma, not a delimiter
- Fixed wrong initial input backtrace
- Now path macro converts to platform specific path separator
- New macros
    * [x] Exist
    * [x] Expand
- Changed Include behaviour
- Changed readto and readin behaviour

* [x] Fix trexter bug with include macro. I can't reproduce. god damn it
- Looks like trexter track is not collected ( deleted ) after include call
- Ok, this bug was something stupid. And I have no idea why this was not
detected on first 3.0 release
- The problem was that function recover called set_input and then decreased
trexter level. But recover method increased the level thus nothing really
happned which was a bug.

---
From 3.2

* [x] Added get_static_macro -> Is this 3.2?

### Bug fix

* [x] Stream-chunk doesn't work...
* [x] Pipe input always tirggering skip_expansion is very tedious fix it asap

* CLI
    * [x] Fix manual macro cli problem...
* [x] Fixed a bug where dump didn't require fout permission.
* [x] So... pipe input was not working for the time... musseuk-tard
* [x] Looks like skip_expansion variable inside evluate method does nothing?
* [x] Pipe should escape everything. Not parse it...?
* [x] Fixed strange behaviour of stream-chunk and stream-lines
* [x] Grepmap doesn't work?
    -> Wow, this was not parsing at all... Really?

### MISC

* [x] Upgrade dependencies for sure
    * [x] Deprecate lazy_static and use once_cell
    * [x] Implemnet join for dcsv value -> Instread I imported itertools
    * [x] Check if flate crate is necessary -> Yes it is used in packaing
    * [x] Upgrade clap
        -> Currnetly clap compiles thus it should be ok?
* [x] ERGO : No such macro prints similar macro name.

### New macros

* [x] Cond  : Condense ( remove duplicate whitespaces from an input )
* [x] Condl : Condense by lines ( remove duplicate whitespaces from an input )
* [x] Add align comment character macro. Read meta's document
    * [x] Now add a documentation for it
* [x] Add rer macro ( Rearrange )
* [x] NEW: Stream macro
To compensate relay's shortcoming, add new a flag called stream. and
a macro called stream
    This macro accepts data and send to macro invocation.
    * [x] Enable anon macro in macro invocation
    * [x] Stream lines macro
* [x] Stripfl
* [x] Striprl
* [x] Pie and Mie

### New flag, features

* [x] New command `Search`
* [x] New macro attribute `skip_expansion`
* [x] New flag: Stream-lines
* [x] New flag: Stream-chunk
    * [x] Enhance stream_chunk newline stripping
    * [x] Unify starting logger index between lines and chunk
    * [x] Remove unnecessary process_string from flag related logics
    * [x] Argument for stream chunk + stream lines
* [-] Fix RAD_BACKTRACE error -> THis is not an error