This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-06
Channels
- # aws (11)
- # beginners (51)
- # cider (61)
- # cljsrn (37)
- # clojure (51)
- # clojure-spec (5)
- # clojure-uk (6)
- # clojurescript (35)
- # core-async (29)
- # cursive (3)
- # datomic (4)
- # defnpodcast (3)
- # editors (10)
- # emacs (3)
- # fulcro (2)
- # lein-figwheel (9)
- # leiningen (3)
- # mount (3)
- # off-topic (59)
- # parinfer (6)
- # portkey (4)
- # re-frame (6)
- # shadow-cljs (136)
- # spacemacs (1)
- # specter (1)
- # tools-deps (10)
I’ve launched a new website! Do you want to help Clojure newcomers decide on their Clojure stack? Please share information on your magic mix here! http://www.clojurestacks.com/misc/2018/05/06/a-call-for-clojure-stacks.html
This is a great initiative! The community needs something like this, especially in absence of frameworks.
@stathissideris s/boot.build/build.boot/ (or maybe the mistake is an intentional hint at how hard this stuff is)
haha, not intentional, will fix asap, thanks
@stathissideris how do you intend to use this information? Just as a collection set?
initially yes
if I have enough I’ll probably do “review” posts
looking at trends, summarising etc
I am using Firebase Firestore and I need to pass a POJO to a Java method. One of the field needs to be annotated so that the server will populate the value. I can define a record like below.
(defrecord Message [text author ^ServerTimestamp timestamp])
But the clojure keywords which identify the fields don't get converted to strings. What are my options to convert the record to a POJO?If a particular Java interface is needed, there's nothing wrong with writing it in Java. Sometimes it's much easier achieve the result like that than manipulating Clojure's class generator.
records are definitely not POJOs (deftype is closer but it isn't either), also ^Foo bar
isn't an annotation, it attaches the hash map {:type Foo}
as metadata on bar. So yeah, much easier to use java to make a POJO
Thank you both. I will give that a try.
I could use recommendations on authentication/authorization libraries for use with Undertow/Immutant. There is a nice pac4j demo but I'm not sure how much clj library code I'd end up writing in order to use that with a Clojure app.
@matt220 without additional context on your needs, i suggest you start with buddy
example usage in http://github.com/robert-stuttaford/bridge if you’d like to steal all the usual login/register/forgot/validate crap stuff 🙂
in return, may i ask that if you have any feedback - whether positive or negative - please share it with me?
sure! i'm not afraid of github's message/feedback system. it might be a little while before i get into regular dev around it.
hi guys
how can i use lists like this ?
suppose i have a code which emit these type of structures and want to handle it, what is the best way?
actually the structure is "(data 2018-01-01)"
no matter how much you quote you can't have the reader read invalid tokens, 2018-01-01
is not a valid clojure token
Is there a simple way to sort a map with keys in a hierarchy, by that hierarchy so that keys in the same branch are grouped and sequential by most-parent to most-child?
https://gist.github.com/samedhi/7765488682548c4cd4f220b2b320b0d2#file-troubles-clj-L111 - I am having some trouble seeing a static method on the linked line clojure.lang.Compiler$CompilerException: java.lang.IllegalArgumentException: No matching method: addCallback, compiling:(/Users/stephen/inferno/src/inferno/server.clj:111:6)
. Not really familiar with the java side of clojure, any idea what I am doing wrong here?
For context, I am basically reproducing the behavior I see https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/pubsub/cloud-client/src/main/java/com/example/pubsub/PublisherExample.java#L61 in clojure.
inferno.server> (->> ApiFutures reflect :members (filter #(= (:name %) 'addCallback)) first)
#clojure.reflect.Method{:name addCallback, :return-type void, :declaring-class com.google.api.core.ApiFutures, :parameter-types [com.google.api.core.ApiFuture com.google.api.core.ApiFutureCallback], :exception-types [], :flags #{:public :static}}
I’mma genius. Forgot to pass the com.google.api.core.ApiFuture
as the first argument there.
@mfikes has you ever considered the difference between clucy and the datomic fulltext search. does the datomic have any benefits over that library
afaik datomic's fulltext capabilities are limited and can't be configured in any way
I went with ES (spandex https://github.com/mpenet/spandex ) instead
yep, found my source https://docs.datomic.com/on-prem/schema.html > Fulltext search is constrained by several defaults (which cannot be altered): searches are case insensitive, remove apostrophe or apostrophe and s sequences, and filter out the following common English stop words:
simply using a language other than english or requiring case sensitivity makes the feature useless, so it has no more benefits than being easier to setup
Let foo
be my project root, so my clj files are in foo/src
, and I'm starting my repl via foo$ boot repl
Now, I want to setup a folder foo/my-dyn-classes/
which contains a bunch of *.class files -- and I want the Clojure repl to constantly (via watch) reload new classes from this directory.
So when I add a new class to foo/my-dyn-classes/
, wichin 0.1 seconds, I want my repl to reload said class into the repl.
What is the simplest way to set this up?
@joelsanchez but ES needs to run another process, it's not a library like lucene, right ?
yes but you can use lucene if you prefer, I was just saying that Datomic's use of Lucene is not configurable, and it's treated as an implementation detail
yes datomic implementation is limited and if you need to search more than one filed it takes a lot of time, but i don't know why
I note that Rich Hickey's request for clojure syntax support in Confluence has been marked "gathering interest". Perhaps there's hope for this if people vote.
Alternatives have been proposed. Not sure any are a complete solution.