This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (1)
- # beginners (183)
- # boot (2)
- # clara (4)
- # cljs-dev (20)
- # clojure (59)
- # clojure-dev (7)
- # clojure-nl (1)
- # clojure-serbia (1)
- # clojure-sg (1)
- # clojure-spec (4)
- # clojure-uk (15)
- # clojurescript (77)
- # clr (1)
- # data-science (9)
- # datomic (23)
- # docs (3)
- # duct (15)
- # emacs (8)
- # events (1)
- # fulcro (6)
- # instaparse (3)
- # juxt (1)
- # lumo (9)
- # off-topic (18)
- # perun (2)
- # portkey (13)
- # reagent (2)
- # reitit (11)
- # ring (10)
- # shadow-cljs (158)
- # tools-deps (34)
searching for boot code examples able to parse an xml template and fill it with values - anyone?
@michael.heuberger Do you mean "produce an XML document with values substituted in"? I'd look at Selmer for that. If you just want substitutions in a template, you don't need to parse it.
Alright, I was thinking maybe there are something more "repl-esque" rather than the common profiler
@hawari.rahman17 Do you just want to figure out the memory size of Clojure data structures?
You could look at
com.clojure-goes-fast/clj-memory-meter, then you can do
(require '[clj-memory-meter.core :as mm]) (mm/measure (your-expression))
Thanks @seancorfield I'll check that out. Though I must admit, being a Java novice myself, I don't really know how to diagnose a performance problem.
Usually I only need to test something that I can observe (e.g. how much time does a function took, where can it be improved)
But since now the problem is memory consumption I tend to get overwhelmed by tools available without knowing how to use it properly.
I'm using VisualVM now, and I have to praise it for being easy to approach for a novice like me
Hey, any equivalent to python pandas that you'd know of, in the Clojure world? *equivalent in performance I mean, I guess
Quick googling gets me this : > huri.core a loose set of functions on vanilla Clojure collections that constitute an ad-hoc specification of a data frame; along with some utility and math functions. https://github.com/sbelak/huri https://cbds.netlify.com/2017/10/12/data-analysis-with-clojure/
I've just finished delivering a small data science project where I had to use python, and it really reminds me why I don't find python to be that great, even for data science. But it has pandas dataframes 🙂
I think clojure maps would take X 100 more space than a dataframe would, for the same data
And all the object constructors implicated in clojure collections would make data crunching X 100 slower
@matan actually pandas is not that performant, even according to his creator: http://wesmckinney.com/blog/apache-arrow-pandas-internals/
Seems like there should be some good FP solution to the problem of data views being fast when mutable.
Stuff like core.matrix is nice but it forces you to manually choose between mutable and immutable ops.
@U07TDTQNL you mean, having macros do static analysis? What about something like
transducers transients instead?
No i mean something that analyzes Clojure code and swaps in mutable ops when it can be proven doing so won’t affect the semantics
So that something like (reduce conj  (range 10)) would automatically use transients.
someone saw bodil talk on persistent/immutable data structures in rust? 🙂 I think she does just that using ownership (ex if sole owner, it does update in place, etc etc)
So basically that becomes easy to just use them without second thought and get best performance when you can afford it without having to do anything.
I follow bodil on twitter, so read a little bit about that library. But yeah, that sounds awesome, about mutation in place. I thought it was just like regular clojure-structures with auto-RC on them
The problem is that RC is really expensive in a multi-core environment. There's a few tricks to make it faster (mostly around turning it into something more like a GC), but that often means giving up the features that make it suitable for transient tracing
So I think some sort of static analysis would need to be involved here, and preferably something that allows lookups to be moved to before modifications.
I wouldn't be surprised of Haskell does some stuff like this, but I haven't seen any examples of it.
The compiler should be able to figure out that the nths can be reordered and performed before the execution of any calls to
@U07TDTQNL I believe having features like that in the clojure compiler would make it more than just a naive interpreter 🙂 while hopefully paving the way (?) for making transducer syntax unnecessary in some cases. Transducers are nice, but their current API is horribly non-intuitive... a hallmark of a feature strapped on top a ~10 years old language
Yeah, transducers are really mini processes, but they're not modeled that way in Clojure.
it should be possible to model transducers as immutable actors, and then optimize out the performance regressions
Hi, I'm trying to figure out some basics on worker queues and messaging systems (RabbitMQ, etc). I basically want to create a queue of tasks where a consumer can fetch stuff to do. This should hopefully lead to no other consumers retrieving the same task (I don't know if there are theoretical limitations on what can be achieved in this regard -- in that case I'd probably have to go with at-least-once delivery and make sure to have my actions be idempotent). I saw
immutant used HornetQ for this kind of stuff. Does anyone know of any other cool resources to check out? Currently we're using Postgres DB:s for a lot of stuff that might be a better fit for a queue. What do other people out there use?
I’ve used langohr (for rabbitmq) at a few places, worth checking out, docs are pretty decent: http://clojurerabbitmq.info/
Yes, I've looked a bit at that, and it seems pretty nice. Do you use a relational DB for storing tasks/messages as well? Or is RabbitMQ a replacement for that (for storing just the messages/tasks I mean)?
Because I deploy on AWS, I use SQS (https://aws.amazon.com/sqs/) as a job queue - very cheap. You should use a Job queue to dispatch ephemeral commands, not durable information. I recommend http://dataintensive.net/ to get your ideas straight about such topics
I'm also using AWS so that could be interesting. You haven't experienced a lot of limitations with SQS? Thanks for the link.
RMQ supports a bunch of different paradigms so it’s worth seeing if your architecture maps on to it.
@U6GL1FLLF no limitations to report really, but we haven't put a lot of load on it, and our use case is fairly basic. Be aware that it's text-based, and that by default you cannot rely on ordering of messages, and the delivery is at-least-once.
@alan well Apache Arrow looks like the thing (!) I'm looking into which Java / clojure libraries actually implement the Arrow standard now...
> Apache Arrow and the "10 Things I Hate About pandas" I don't like python's pandas too much either.. the API is downright awkward.
A quick google search shows that Apache Arrow Java implementations are pretty much pre-alpha or so..
to be fair, the most recent version is 0.9.0 and java’s version is on par (0.9.0) http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.arrow%22%20AND%20v%3A%220.9.0%22 here’s the github https://github.com/apache/arrow/tree/master/java but otoh, they’re working on binary stability of data for 1.0.0
Apache Arrow being only a specification and effort for cross-language integration of in-the-make implementations. Would be great to use its implementations in few years as it matures!
I’m trying to create a stateful transducer,
Running the let block shows me that I’m correctly joining values. But the result output still doesn’t have the joined values.