Fork me on GitHub

com.github.seancorfield/expectations {:mvn/version "2.0.137"} -- The clojure.test-compatible version of the Expectations testing library -- -- v2.0.137 is the "gold" release of the 2.0 version that has been in testing for five months (after several months of development) and is the first new release of this library since December 2019. Changes since Alpha 2 in June include: exported clj-kondo configuration, bug fix for dynamically constructed regex predicates, documentation updates (thank you @dharrigan for inspiring some of those!), and a switch to build.clj like the other projects I maintain. Follow-up in #expectations

🚀 17
🎉 7
bmo 1

portal Portal, a data visualization / navigation tool, is now available! 🎉 Since my last post on #announcements, a few major additions have happened: - A to host the portal ui directly in vs-code is available. - An intellij extension to host the portal ui directly in intellij is available. - Currently must be installed via a as it hasn't been published yet. - Multi-select functionality • This is really handy for diffing two arbitrary values! Many other improvements have happened, for more info check out the And as always, you can try out all the UI changes via the

👍 22
🎉 22
❤️ 11
😻 3
catjam 1
bmo 1

Any chance to also have “Emacs extension” soon?


@U06BE1L6T these extensions act as hosts to the Portal UI (a reagent web app) and as far as I know emacs doesn't have a readily available way to host web apps. If there is an easy way to do so, please let me know!


As an emacs user, is my current portal+emacs integration.


Ah, good - thanks for sharing.


What the intellij extension looks like:


What the vs-code extension looks like:

Ben Sless04:11:56

It is possible to embed in Emacs as a XWidget, I think.


@UK0810AQ2 I've seen in the past which wasn't ready yet. Any links for XWidget embedding?


Any embedding of the portal UI would require a js vm equivalent to v8 👌

Jakub Holý (HolyJak)15:11:50

I thought Emacs was a real web browser?! troll

😂 1
Ben Sless15:11:03

Already does, but it doesn't render js


nice, is there docs on how to use the intellij extension?


@U066U8JQJ Not yet, but all you need to do is install the extension via the zip artifact. Then make sure you have 0.17.0 installed in your process and use the portal.api as normal 👌


Ohh, also specify (def idea (portal.api/open {:launcher :intellij}))


@U1G869VNV thanks, but still not able to get it, I updated portal to 0.17.0 on my deps, installed by opening the portal-extension-intellij-0.17.0.jar on intellij, it looks its correctly installed


but when I try to run the (def idea (portal.api/open {:launcher :intellij})), nothing happens


(installation looks like this)


Introducing joinery, a protocol and stock implementation for accessing in-memory graph-like/normalized data structures using standard clojure(script) map interfaces.

clojure-spin 12
🔥 2
bmo 1

This is really interesting


Thanks! I’ve been experimenting with tools like: • @U4YGF4NGM’s’s’s’s smart-map I noticed this pattern of wanting to pass the “database” into a function pipeline (or UI tree) with map-like access being the driver of join resolution. This is as opposed to having the query in hand upfront. That “smart map” interface (coined by Wilker) is really intriguing, so this is my attempt at bringing it to other data structures.

👍 1

this looks kinda like datomic/datascript's lazy entity map


but more general. 😄 really cool!


can I print a map with cycles?


Yea, datascript’s entity impl gave me some hints at how to impl a custom map type. I really need to add a prior art section to the readme…lots of inspiration in this space. Printing just defers to the wrapped map at the moment, so cycles won’t be visible, and you’ll see joins in their unresolved state, ie [:thing/id 1] . I can see a recursive-print being useful tho. It’d have to keep track of seen entities of course to avoid infinite loops.


Or maybe more generally, a denormalize function.


This looks cool; another prior art is Fulcro's database structure - which could also give some inspiration for how maybe we can build tooling (similar to Fulcro Inspector) that is not implementation-specific.


@U6GFE9HS7 one thing I would reconsider is if is-join? protocol method should not be [this table v] - one can always ignore it (as in the case of the joined-map), but I have a suspicion sometimes the DB/Table could be responsible for returning this data (e.g. an index/cache of ident links).


Added a section to the readme. @U05476190 I think that’s a great idea. Especially given that some data structures come with an upfront schema. is-join? would need to reference not only the schema, but also the key k in order to make its decision.


ah right, just realized that the protocol says nothing about how to get values from table; just how to follow references


In fact, I could see both is-join? and join requiring an arg list like [db entity k v] to be fully flexible…

👍 1

Very interesting, I love the many takes on this pattern. Any plans to add updating, or will it remain read only?


@U70QFSCG2 me too, it’s a very interesting space. This protocol is specifically focused on read-only. Updating tends to be handled by the underlying source quite well (asami/datascript transaction, or just an update-in when using a plain table).


Took it for a spin, and it's pretty slick. I'm tooling around with a turn based game with lots of gnarly state. But every function is pure the whole way through. Was using datascript before, but datalog was feeling very heavy, joinery is a nice and lightweight way to treat the state map as a map, but keeping it normalized!


@U70QFSCG2 if you find yourself looking to select nested trees of data - try out along with it 😉


Was just going to suggest that 🙂 pyramid and joinery work really well in tandem. I like that pyramid handles the adding/normalization logic, and joinery can give you a “smart map” interface to it. Really fun combo. I also began exploring other options when datascript started feeling heavy (transactions especially), and I find this to hit a really nice niche for certain applications.

💪 1

Also thanks for trying it out 🙂


Cool! I'll check pyramid out. I've used specter for years before deciding that normalized graphs are much easier to work with (after using pathos and fulcro). Specter is really powerful, but unnecessary if you can avoid the complexity of nested data

Carsten Behring15:11:55

Version 1.6.0 of clj-py-R template for polyglot Clojure has been released. Main changes are: - far faster Docker build and minimal Dockerfile thanks to base images on Dockerhub - support for Singularity and Gitpod was added

🎉 5
☁️ 1