-
Notifications
You must be signed in to change notification settings - Fork 327
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
Lua scripting support and 'script newcolumn' command #136
base: master
Are you sure you want to change the base?
Conversation
'xsv script newcolumn' command allows creation of new columns, calculated by Lua script based on current and previous rows. Many other commands can be added in the future (map, filter and reduce come to mind first), that�s why there is an extra 'newcolumn' sub-command.
I'm working on unit tests but decided to publish it early for code review. |
Tests are done and I've merged with the latest master. Ready for review. |
@BurntSushi do you have any comments/concerns for this change? |
@Dimagog I think this looks like a potentially neat change, but I'm not sure if it's a good fit. Practically speaking, adding a C dependency increases maintenance burden. I have very little time for this project as it is, and I really do not want to deal with a dependency on an entire programming language. In general, I'm not sure if it's a good fit for xsv, which is focused on implementing common operations very quickly. My suggestion is that if you want a CSV tool that permits arbitrary scripting, then it might be better to go and build that tool separate from xsv. |
No problem, I’ll have to keep the fork then. |
'xsv script newcolumn' command allows creation of new columns,
calculated by Lua script based on current and previous rows.
Many other commands can be added in the future
(map, filter and reduce come to mind first),
that's why there is an extra 'newcolumn' sub-command.