News for hackers. Stuff that matters.

Ask HN: A side-effect-free programming language?

I am building a system that stores an event log of things that happened, and I would like the users to be able to set some custom functions that would reduce the event log into some sensible "views" of the state.

For that I would like to use an embedded programming language, could be anything but ideally doesn't have any side-effect and simply works with its input data to produce an output.

Such language would be pointless on its own of course, but does someone know if an interpreted script specifically made for embedded programming exists, or if a more "mainstream" interpreter could easily be compiled without the I/O machinery

( 4 comments | 3 points | on HN )
Re:Ask HN: A side-effect-free programming language? by mtmail on Saturday March 07, 2020 @10:28PM (#22516150)
I think 'sandbox' is the term to search for. https://github.com/mozilla-services/lua_sandbox
Re:Ask HN: A side-effect-free programming language? by ssimono on Sunday March 08, 2020 @05:39AM (#22517199)
Oh it looks like this is exactly what I am looking for, thanks a lot
Re:Ask HN: A side-effect-free programming language? by kindly_fo on Sunday March 08, 2020 @01:03AM (#22516586)
Make your simple language and translate it to sql
Re:Ask HN: A side-effect-free programming language? by PaulHoule on Saturday March 07, 2020 @08:00PM (#22515486)
SQL queries?