<div dir="ltr">Hi,<div><br></div><div>See my answers inline.</div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><span style="font-size:12.8px">- While the reason to switch away from handlebars makes sense - Why do we want to using Python as templating language? What are some of the use cases, where Python could be beneficial over any other templating language?</span></div></div></blockquote><div><br></div><div>Users can freely write their own functions. We can provide some functions either in Rust or Python (it should be transparent to the users), but we can&#39;t cover everything. I know some people who would definitely write their own extensions.</div><div> </div><div>And the Python language is a way more powerfool tool than a simple templating language.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><span style="font-size:12.8px">- Are there any existing projects using Python as templating language? How is this going to be different than passing the context data to a Python script?</span></div></div></blockquote><div><br></div><div>Maybe the &quot;templating language&quot; term I used in the project description was a little bit ambigious. I&#39;d like to use Python as a general purpose language to process the context data and generate a new log message from it.</div><div><br></div><div>I think embedding Python (or Lua) into softwares written in other languages is quite common.<br></div><div><br></div><div>I&#39;d prefer this [0] library for the Rust &lt;-&gt; Python interaction. I used it for a side project [1], it&#39;s quite flexible and actively developed/maintained. You can check the examples in the documentation and the tests in the source code.</div><div><br></div><div>[0] <a href="https://github.com/dgrunwald/rust-cpython">https://github.com/dgrunwald/rust-cpython</a></div><div>[1] <a href="https://github.com/ihrwein/python-parser">https://github.com/ihrwein/python-parser</a></div><div><br></div><div>I&#39;d like to see the final solution to be &quot;composable&quot;. I mean, by providing small, reusable components users can compose the generated log message as they want. For example, the following line can generate a log message:</div><div><br></div><div>logmsg(ctx, &quot;context name is {<a href="http://context.name">context.name</a>}, max(foo)={max_foo}&quot;, foo=&quot;bar&quot;, quz=&quot;baz&quot;, max_foo=max(ctx, &quot;foo&quot;))<br></div><div><br></div><div>where ctx contains the context data, logmsg and max is a python/Rust function. The syntax isn&#39;t settled down :)</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div> </div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><span style="font-size:12.8px">- For the SQL-like syntax mentioned in project description - Can we design it as Python library using Rust via CFFI [0].</span></div></div></blockquote><div>see my previous answer</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><span style="font-size:12.8px">I have filled the student application form.</span><span style="font-size:12.8px"> </span><span style="font-size:12.8px">I&#39;m already trying to understand the correlation library and playing around with existing tests. How can I get more involved and better understand the requirements of the project?</span></div></div></blockquote><div><br></div><div>First, I&#39;d check what information is available in the contexts (your context data): <a href="https://github.com/ihrwein/correlation/blob/master/src/config/action/message/renderer_context.rs#L36-L48">https://github.com/ihrwein/correlation/blob/master/src/config/action/message/renderer_context.rs#L36-L48</a><br></div><div><br></div><div>You you can use {{context_len}} to get the number of messages in the context, etc...<br></div><div><br></div><div>IMHO the hardest part is using the [0] libray. It&#39;s well designed, but if you are new to Rust you may find it difficult to use. So I&#39;d try that first. I don&#39;t know about any bugs in the correlation library, but you may try to refactor some code (just to see the internals).</div><div><br></div><div>The requirements are listed in the idea page as &quot;Tasks&quot;.</div><div><br></div><div>BR,</div><div>Tibor</div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div>