This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # beginners (102)
- # boot (5)
- # cider (1)
- # cljs-dev (15)
- # cljsjs (1)
- # cljsrn (20)
- # clojure (104)
- # clojure-austin (1)
- # clojure-europe (8)
- # clojure-italy (39)
- # clojure-nl (17)
- # clojure-spec (38)
- # clojure-uk (23)
- # clojurescript (33)
- # cursive (31)
- # data-science (5)
- # datomic (3)
- # emacs (28)
- # joker (1)
- # kaocha (5)
- # klipse (1)
- # leiningen (1)
- # off-topic (66)
- # quil (4)
- # reagent (35)
- # ring-swagger (1)
- # rum (1)
- # shadow-cljs (121)
- # test-check (1)
- # tools-deps (33)
- # uncomplicate (2)
- # vim (15)
- # yada (1)
What's a good alternative to luminus (ideally that has a lein template) that is perhaps more light weight? I'm noticing on a brand new luminus project, just a
lein test takes 30 seconds to execute the stub test
@m131 Depends what you mean by "alternative to luminus"... If you want something lightweight, you could start with
lein new compojure lightapp
(I tend to recommend folks start with bare bones Ring, Compojure, and gradually add the libraries they need as they understand each piece... Luminus has a lot of moving parts to understand)
what is the difference between
s/every-kv, both have similar usages ?
The doc string for
map-of says -
Unlike 'every-kv', map-of will exhaustively conform every value. What does this mean, will not every spec apply exhaustively anyways ?
Ah, you mean
s/every-kv? OK, that's like
s/every which says "Note that 'every' does not do exhaustive checking, rather it samples
coll-check-limit elements. Nor (as a result) does it do any
conforming of elements."
every-kv check a sample of elements (useful for large collections where you want a sanity check, but don't need all the values conformed), whereas
coll-of will both check the entire collection and conform all the values. That might not work for very large (or even infinite) collections.
@murtaza52 If you're working with very large/infinite collections, the overhead of validating and conforming every single element is going to be really large.
@seancorfield would you recommend to start a new project with next.jdbc or go with the standard version?
next.jdbc is the "next" version of
clojure.java.jdbc so I'd recommend using it instead of c.j.j at this point.
c.j.j will continue to get bug fix updates but that's about it.
next.jdbc is where all my effort is focused now.
I'm traveling a bit over the next week so be patient if I'm slow to answer. Hmm, 07:36 where you are? Europe?
In spacemacs, does anyone know the correct way to cancel a leader/space-bar command? Esc is kinda working but it also displays a message SPC ESC is undefined
there's also standard
C-g but it has the same effect. However, I would just ignore that message 🙂
Is there any consensus on how
.edn should be formatted? Does any style-guide exists perhaps?
If a person is not going to be examining it, then one big long line is reasonable.
If a person is going to be reading it, there are various pretty-printers that can be used, although they might not produce exactly the format you want, e.g. clojure.pprint/pprint, fipp, and a few others.
You must be cautious with the pretty printers to avoid using options that many of them have to eliminate part of the data, e.g. when a vector or list is very long, or the nesting of data goes more than N levels deep.
any examples of usng google drive with clojue? found the
google-apps-clj library but seems to be unmaintained
On running the following code -
(r/foldcat (r/mapcat prepare-event events))
(count events) ->100, the above code returns a data of type of
(count events) ->1000, the above code returns a data of type of
and the above behavior is breaking my code, why would it return different types depending on if the data was parallelized or not using the
r/cat combine fn ? Shouldn’t it always return realized data ?
Hi, i have a problem that im struggling to solve. Any help will be much appreciated.
I want to navigate inside a map. The map has
:content key that its value might be a collection of string (that i want to extract), or a collection, this collection may contain maps with
:content key as well that i want to iterate on each one of these maps (probably recursively) and extract the
:content value (when its a collection of strings and not a map).
I can't seem to catch exceptions within a map. Is this expected behavior?
user=> (try (map #(/ % 0) ) (catch Exception e "what")) Error printing return value (ArithmeticException) at clojure.lang.Numbers/divide (Numbers.java:188). Divide by zero
Without the map it works "normally"
user=> (try (/ 1 0) (catch Exception e "foo")) "foo"
@jahson Initially when I wrote the code I tested it with a small dataset, and the code worked. However when I tested it with a larger dataset, it started throwing an error, bcoz the above snippet was returning an object while the expectation was a seq.
@bennyk you can
fn over the
hash-map, and then recursively call the
fn based on the value of the
@murtaza52 Yeah, I'm trying to understand what is causing that error because according to https://clojure.org/reference/reducers
> To produce an output collection, use
clojure.core/into to choose the collection type or the provided
r/foldcat to produce a collection that is reducible, foldable, seqable, and counted.
clojure.core.spec is there a way to define relationship between two keys ? I have a hash-map which contains 2 dates, and I want to specify the relationship between them.
It is needed for generating test data, as my logic fails when the relation ship between doesnt hold true.
@murtaza52 You can "attach" any predicate on a
s/keys with a
s/and but you will have to write your own generators to ensure the property.
@seancorfield I am from Zurich :) I wish I will be able attend a Clojure conference soon to meet everyone. I have never been happier working while working with a language, it’s tools and community:)
@alpox it is a big honor :) but I think many use it, the issue are companies here are not extremely risk seeking for IT
I must have missed that! I guess I should lay my eyes on them when looking for a job 🙂 I'm from Andelfingen btw. (Kanton Zürich)
I sneaked Clojure in mine: they wanted me to build a web app with R Shiny/Python Dash, and I said NO WAY (been burned before by R Shiny)
@christian.gonzalez I maybe would, if I had more experience in that field (And with clojure) 😄
there have been discussions on here about whether clojure actually needs a dataframe library like pandas
I want to do some benchmarks to see the performance and if the price is not to high let’s check for other wrapper like scikit
I heard about Neanderthal and wondered if this or some other library in Clojure can compete/replace Numpy in Clojure?
I tried to reimplement time series with ordered maps, but the issue is you can almost never get to add matriciels
neanderthal is supposed good for matrix operations like that, was going to mention that too
Moreover, dragan (the author of Neanderthal) mentioned he could port cuDNN (cuda for Neural nets) into Clojure.
It would be great, but then do you also get all the supporting tools like tensorboard, or what not from MXNet/Pytorch/TF
I see the landscape in the datascience field is growing in clojure 😄 I'm happy to hear that!
I think there would be a utility of cuDNN bindings in Clojure but more realistically we would might start as a symbiotic language
For the data science field, we would need a community effort to have monopolistic framework (yes framework) that would centralize all the effort, this is what the data science channel is trying to achieve