Did I imagine it, or is there a new edition of "Web Development with Clojure" in the making, with more re-frame in it?
I sort of remember hearing it on a podcast
U didn't imagine it
How can I write a conditional such equal to (if (or (not x) y
I'm struggling to find the right combination of any
and not
.
Maybe that's not supported?
I'm not entirely sure what the problem is 🙂 can you give a more detailed example of what you're trying to do
This is one example I'd like to write with a single {% if any first? not second? ...
{% if first? %}
<div> THE SAME THING</div>
{% else %}
{% if not second? %}
<div> THE SAME THING</div>
{% endif %}
{% endif %}
...
ah ok, yeah selmer doesn't really provide support for that, I find it's usually better to massage data before you pass it to selmer
so for example you could do group-by and then do an if for each category in selmer
Great, thanks for the response. I wasn't really sure what's possible and what not.
It's harder to replace this with nested ifs because I also have else clause
Hey @yogthos I hope this is the correct place for this post. I really enjoyed your article on Component and Mount: https://yogthos.net/posts/2016-01-19-ContrastingComponentAndMount.html I'm interested to learn more on the ending: > we have to be more careful about how we structure the application as Mount is agnostic regarding the architecture. I want to make sure I'm careful with mount when using luminus. Can you point me to any guides with examples of how to use it well, or even better, to a project on github that uses it well? Thanks!
Hi yeah sure, the main idea is to keep IO at the edges of the app so that the business logic isn't dependent on external resources. For example, if you're using mount to manage a database connection, functions that use the connection should only handle reading and writing while any data massaging should be delegated.
As a concrete example, say you're authenticating a user when they log in. You'd have one function to load the user from the database, and a separate function to handle authentication. The authentication function should accept the user as data as opposed to pulling it directly from the database.
The key reason for creating such separation is to keep application code pure as much as possible to make it easier to test and reason about