Nim/tests/macros
cooldome 041d15392a Compiler plugin for implementing incremental computation in user space (#10819)
This plugin provides essential building block for implementing incremental computations in your programs. The idea behind incremental computations is that if you do the same calculation multiple times but with slightly different inputs you don't have to recompute everything from scratch. Also you don't want to adopt special algorithms either, you would like to write your code in standard from scratch manner and get incrementality for free when it is possible.

The plugin computes the digest of the proc bodies, recursively hashing all called procs as well . Such digest with the digest of the argument values gives a good "name" for the result. Terminology loosely follows paper "Incremental Computation with Names" link below. It works well if you have no side effects in your computations. If you have global state in your computations then you will need problem specific workarounds to represent global state in set of "names" . SideEffect tracking in Nim also useful in this topic.

Classical examples:

Dashboard with ticking data. New data arrives non stop and you would like to update the dashboard recomputing only changed outputs.
Excel spreadsheet where user changes one cell and you would like to recompute all cells that are affected by the change, but do not want to recompute every cell in the spreadsheet.
2019-04-11 23:09:11 +02:00
..
macro_bug.nim added tests from issue #497 2015-02-01 04:37:34 -06:00
t7454.nim Return an error symbol as macro output if needed (#8116) 2018-06-27 21:43:07 +02:00
t8997.nim fix #10591 regression (#10592) 2019-02-06 22:31:36 -06:00
tbindsym.nim cleanup tests; don't use non-working 'msg' spec field 2018-11-23 13:16:45 +01:00
tclosuremacro.nim fixes anon procs created by macros 2017-07-11 18:07:34 +02:00
tcollect.nim add tcollect test for the new for-loops as expressions feature 2018-09-11 19:14:31 +02:00
tcomplexecho.nim Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
tdumpast.nim overloading resolution for getAst; breaking change 2017-03-18 20:57:45 +01:00
tdumpast2.nim Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
tdumpastgen.nim cleanup tests; don't use non-working 'msg' spec field 2018-11-23 13:16:45 +01:00
tdumptree.nim cleanup tests; don't use non-working 'msg' spec field 2018-11-23 13:16:45 +01:00
tescape_var_into_quotedo_as_const.nim fixes #9864 [backport] 2018-12-05 10:58:18 +01:00
tforloop_macro1.nim put the new for loop macros under an experimental switch named 'forLoopMacros' 2018-08-15 17:45:57 +02:00
tgetimpl.nim cleanup tests; don't use non-working 'msg' spec field 2018-11-23 13:16:45 +01:00
tgettype.nim make run the default action of a test in tester 2018-11-23 11:58:28 +01:00
tgettype2.nim make run the default action of a test in tester 2018-11-23 11:58:28 +01:00
tgettype3.nim fixes #5131 2016-12-20 22:42:25 +01:00
tgettypeinst.nim fixes #9600 (#9601) 2018-11-07 08:40:00 +01:00
tincremental.nim Compiler plugin for implementing incremental computation in user space (#10819) 2019-04-11 23:09:11 +02:00
tmacro1.nim added test case for or operator 2018-10-18 15:39:22 +02:00
tmacro2.nim Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
tmacro3.nim Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
tmacro4.nim lots of small changes 2018-12-11 21:23:22 +01:00
tmacro5.nim Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
tmacroaspragma.nim Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
tmacrogenerics.nim require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
tmacrogensym.nim megatest can be executed 2018-12-11 21:23:21 +01:00
tmacros1.nim make tests green again 2018-06-11 01:23:14 +02:00
tmacros_issues.nim cleanup tests; don't use non-working 'msg' spec field 2018-11-23 13:16:45 +01:00
tmacros_various.nim cleanup tests; don't use non-working 'msg' spec field 2018-11-23 13:16:45 +01:00
tmacrostmt.nim fixes #10805 (#10806) 2019-03-13 10:23:06 +01:00
tmacrotypes.nim fixes #10702 (#10705) 2019-02-18 15:23:05 +01:00
tmemit.nim activated more tests, allow input in test spec 2018-11-23 11:58:28 +01:00
tmsginfo.nim compiler: show name of instantiating context in error traces (#6763) (#9207) 2018-10-11 09:34:56 +02:00
tnewlit.nim newLit works on enum (#9662) 2018-11-09 12:15:00 +01:00
tnodecompare.nim Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
tquotedo.nim fix #10339 by returning type attached to nkEmpty (#10370) 2019-01-23 11:17:32 +01:00
tquotewords.nim require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
trecmacro.nim require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
treturnsempty.nim Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
tsame_name_497.nim tester reports ignored tests and supports 'nimout'; fixes #2211 2015-02-25 12:59:32 +01:00
tsametype.nim megatest: make it green on Linux 2018-12-11 21:23:25 +01:00
tslice.nim Add proc [](n: NimNode, s: HSlice[T, U]): seq[NimNode] to macros (#7735) 2018-11-10 14:10:50 +01:00
tstaticparamsmacro.nim cleanup tests; don't use non-working 'msg' spec field 2018-11-23 13:16:45 +01:00
tstringinterp.nim Testament: refactoring; makes the test joiner green 2018-12-11 21:23:23 +01:00
tstructuredlogging.nim A motivating example for the new bindSym behavior. 2018-05-07 09:37:49 +02:00
ttemplatesymbols.nim Better support for treating templates and macros as symbols. 2018-05-07 09:37:49 +02:00
ttryparseexpr.nim Support for stmtListExpr in parser after major keywords. Scaled down version. (#10852) 2019-03-18 11:09:49 +01:00
tvarargsuntyped.nim make megatest green 2019-01-13 17:19:36 +01:00
tvtable.nim make tests green again 2017-10-01 07:46:13 +02:00
twrapiterator.nim fixes #7093 2018-01-18 11:40:18 +01:00
typesafeprintf.nim make typesafeprintf test green 2018-07-17 20:33:42 +02:00
typesapi2.nim Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00