Fork me on GitHub

Is there an existing term for the "state" of namespaces and vars?


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!

Shantanu Kumar15:05:19

This is a great initiative! The community needs something like this, especially in absence of frameworks.

simple_smile 4

@stathissideris s/ (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?


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 if you’d like to steal all the usual login/register/forgot/validate crap stuff 🙂


oh yes, i would love to steal as much as possible. less is more 🙂


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.


hm, i wonder if Json Web Signature = JWT


Hrm, no. RFC 7519 vs RFC 7515


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


use a string or an #inst


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?


sounds like you want a binary heap


That sounds like a topological sort on keys. Hrm.

samedhi18:05:03 - 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?


inferno.server> (->> ApiFutures reflect :members (filter #(= (:name %) 'addCallback)) first)
#clojure.reflect.Method{:name addCallback, :return-type void, :declaring-class, :parameter-types [], :exception-types [], :flags #{:public :static}}


Seems to be there…


I’mma genius. Forgot to pass the 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


I don't have any experience with Datomic.


okay thank you


afaik datomic's fulltext capabilities are limited and can't be configured in any way


yep, found my source > 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

Oliver George23:05:46

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.

Oliver George23:05:39

Alternatives have been proposed. Not sure any are a complete solution.