Expressions in interpolations and starlark. #1678
Replies: 4 comments
-
I don't believe Just is trying to be Mustache compliant in any way. It just happens to use similar syntax. ;-) Embedding Python at some point is planned. I believe @casey was just waiting for the Rust version of the Python project to get more stable. I mentioned Starlark myself prior as I believe it already has a Rust version or Rust binding. But that was rejected in the desire to use actual Python 3. Which would be much nicer. Skylark would be better than nothing but it does have some pretty serious limitations and would likely just cause confusion for those expect it to be a drop-in replacement for true Python. |
Beta Was this translation helpful? Give feedback.
-
Well, I did not expect just to abide by mustache. I understand it's a "coincidence". I've myself got some mustache + starlark code embedded in a custom python cli app. I find it convenient. I just thought it would be a good idea. Starlark vs. python is a choice. I, myself, like the idempotent ideology of starlark and do believe it would be a good fit for just. I understand the "user base concern", though. Just not sure that pandering to the user base is the best long term option. As to having everything in rust, why not. I'm personally fine with a polyglot approach. A rust-centric one is also fine by me, though. |
Beta Was this translation helpful? Give feedback.
-
I agree, it probably is. Which is, as noted, why I recommended it over a year ago. If you search the closed issues for Starlark you should find the discussion around such things pretty easily.
That choice was made over a year ago. I'm sorry you missed the discussion. Pandering was not my call. I'm not the project owner. But I do tend to agree with him. He's a great guy and very thoughtful in general. Feel free to fork the project. If you embed Starlark in it I'll probably use it. I love Just but I'm quite tired of waiting for cross-platform script execution without dependancies. So I'll very likely use anything that is similar to Just that has any reasonable scripting language built into it. |
Beta Was this translation helpful? Give feedback.
-
I unfortunately won't have the leisure to clone the just repository just for that, except if a serious use case pops up. It's possible, but I highly doubt it will come to that. As to the discussion a year ago, I wasn't in quite a position, a year ago, to even be concerned with coding. Not to mention just. So, no, there is no worry about me "missing" that discussion. As to cross-platform concerns, I personally do not (yet) have a use case either to be concerned with. So do not entertain high hopes on the matter. |
Beta Was this translation helpful? Give feedback.
-
Hi.
I've got a question concerning a feature I like very much in just.
You are making mustache-style interpolation using
{{}}
but you put expressions in them. This is contrary to mustache ideology, which seems to claim to aim at mustache being logic-less interpolation. Here, you do put some logic in them.Looking at the source code on the surface, it seems to me that you are using a descent parser and not relying on any third party library for the specific logic of
{{expression()}}
. If you are, I'd like to know, as I'd like to use mustache + simple expressions in my own personal code.This brings me to a further point. Starlark would be, IMO, a good fit to expand the expressivity of expressions, while providing some guarantees on the expressions used: idempotency of evaluation of Starlark code w/r to inputs, safety, etc...
Integrating Starlark with Justfile would, IMO, make this an even greater tool than it already is. Dunno if that fits your uses cases or coding ideology, though.
My 2¢.
But if there are Mustache + Starlark examples on the net, whatever their language, I'd be very curious to know.
Beta Was this translation helpful? Give feedback.
All reactions