Fork me on GitHub
#announcements
<
2021-11-08
>
seancorfield00:11:28

com.github.seancorfield/expectations {:mvn/version "2.0.137"} -- The clojure.test-compatible version of the Expectations testing library -- https://github.com/clojure-expectations/clojure-test -- 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
djblue03:11:59

portal Portal https://github.com/djblue/portal/releases/tag/0.17.0, a data visualization / navigation tool, is now available! 🎉 Since my last post on #announcements, a few major additions have happened: - A https://marketplace.visualstudio.com/items?itemName=djblue.portal 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 https://github.com/djblue/portal/releases/download/0.17.0/portal-extension-intellij-0.17.0.zip 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 https://github.com/djblue/portal/blob/master/CHANGELOG.md. And as always, you can try out all the UI changes via the https://djblue.github.io/portal/.

👍 22
🎉 21
❤️ 10
😻 2
catjam 1
1
jumar03:11:29

Any chance to also have “Emacs extension” soon?

djblue03:11:53

@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!

djblue03:11:09

As an emacs user, https://github.com/djblue/portal#editor-integration is my current portal+emacs integration.

jumar03:11:58

Ah, good - thanks for sharing.

djblue03:11:05

What the intellij extension looks like:

djblue03:11:03

What the vs-code extension looks like:

Ben Sless04:11:56

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

djblue04:11:41

@UK0810AQ2 I've seen https://github.com/akirakyle/emacs-webkit in the past which wasn't ready yet. Any links for XWidget embedding?

djblue04:11:31

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

Jakub Holý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

wilkerlucio17:11:15

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

djblue17:11:37

@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 👌

djblue17:11:50

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

wilkerlucio19:11:06

@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

wilkerlucio19:11:18

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

wilkerlucio19:11:35

(installation looks like this)

cjsauer15:11:13

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

clojure-spin 12
🔥 2
robert-stuttaford15:11:29

This is really interesting

cjsauer15:11:06

Thanks! I’ve been experimenting with tools like: • @U4YGF4NGM’s https://github.com/lilactown/pyramid@U051N6TTC’s https://github.com/threatgrid/asami@U0BBFDED7’s https://github.com/ribelo/doxa@U066U8JQJ’s https://github.com/wilkerlucio/pathom3 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
1
lilactown16:11:25

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

lilactown16:11:36

but more general. 😄 really cool!

lilactown16:11:00

can I print a map with cycles?

cjsauer17:11:52

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.

cjsauer17:11:29

Or maybe more generally, a denormalize function.

pithyless17:11:24

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.

pithyless17:11:14

@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).

cjsauer17:11:04

Added a https://github.com/cjsauer/joinery#prior-art 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.

pithyless17:11:26

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

cjsauer17:11:49

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

👍 1
Casey19:11:44

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

cjsauer20:11:33

@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).

Casey15:11:53

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!

lilactown17:11:27

@U70QFSCG2 if you find yourself looking to select nested trees of data - try out https://github.com/lilactown/pyramid along with it 😉

cjsauer18:11:42

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
💪 1
cjsauer18:11:56

Also thanks for trying it out 🙂

Casey18:11:18

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 https://clojars.org/clj-py-r-template/clj-template

🎉 5
☁️ 1