-
Notifications
You must be signed in to change notification settings - Fork 35
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
exclude tags #35
Comments
For the general query language problem, Text.Megaparsec.Expr is extremely well suited. It lets you define unary and binary operators of various precedence levels. If I can figure out how to contribute I plan to try to write this with it. |
I like it! While I can see the benefit (and fun!) of building this into the backend, I'm thinking it might be a pre-optimization. To me it sounds easier to just add this new logic to the frontend, and avoid the back-and-forth to the server. What do you think? |
I don't know what you mean. Are you saying just provide two windows, one for include and one for exclude? Or do you mean to parse boolean queries, just not in the backend? I'm not yet close enough to the code to know what to call back end and front end. |
I meant the latter. The javascript that powers the web UI of toodles should be able to handle this, so I was suggesting there might not be any Haskell to write here, at least not at first. |
It could be done in Javascript, I agree -- but why? It'd be far more code, and less safe, and harder to learn or modify. Megaparsec.Expr lets you write a parser for unary and binary operators of different precedence levels in as little as this much code:
|
Apologies for the late response here, must have missed the notification of your reply. I'm on board with your suggestion. Just for context on I was coming from: currently the UI does this filtering right now, so the Haskell code is not involved. So I was questioning if the complexity of the parsing you are describing even justifies the complexity of simply going back and forth with the server at all. Sounds like it does though :) |
@JeffreyBenjaminBrown let me know if you need any help getting this working! |
The filter function in toodles blows my mind. I love being able to do that.
But it would be nice to be able specify "show me everything except bla".
More generally, a boolean logic would be awesome -- something like Apache Lucene, which lets you ask for "bob AND NOT (speed OR search)". Or, perhaps more natural, it could read like Haskell: "bob && not (speed || search)".
The text was updated successfully, but these errors were encountered: