This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-16
Channels
- # aleph (1)
- # architecture (5)
- # beginners (43)
- # boot (23)
- # cider (5)
- # cljs-dev (143)
- # clojure (42)
- # clojure-austin (4)
- # clojure-dusseldorf (14)
- # clojure-italy (15)
- # clojure-norway (1)
- # clojure-russia (10)
- # clojure-spec (41)
- # clojure-uk (70)
- # clojurescript (262)
- # cursive (3)
- # data-science (18)
- # datomic (66)
- # figwheel (1)
- # fulcro (39)
- # hoplon (21)
- # jobs-rus (1)
- # juxt (4)
- # lein-figwheel (2)
- # leiningen (4)
- # lumo (26)
- # off-topic (4)
- # om (6)
- # onyx (19)
- # parinfer (50)
- # pedestal (9)
- # portkey (10)
- # re-frame (41)
- # schema (5)
- # spacemacs (2)
- # yada (35)
so i'm totally new to emacs... i don't see cider listed in M-x package-list-packages. how do i fix that? emacs 25.2 osx
you can start from here - https://github.com/clojure-emacs/cider#installation
@joshkh you can always install it manually via package-install
but I'd recommend Spacemacs: http://spacemacs.org/
thanks! (add-to-list 'package-archives '("melpa" . "
in my .emacs file seemed to fix it
i guess i could have googled that đ https://practicalli.github.io/spacemacs/why-spacemacs/
Hi, I dont understand 'tree-seq' function so well, where is the best place to learn it?
@daedelus1982 There are a few useful examples at https://clojuredocs.org/clojure.core/tree-seq
here is my structure, I want to create the shortest possible list of words going from "bank" to "loan"
some branches are dead ends. I have been led to believe that 'tree-seq' is the way to go?
I have tried this (map :word (tree-seq map? :children my-structure))) but thats not quite what i wanted. am i going about it the right way?
this isn't the shortest since its depth first but something like this could get you started
(defn combine [{:keys [word children] :as tree} target]
(cond
(= word target) word
(seq children) (if-let [path (filter some? (map #(combine % target) children))]
(apply conj [word] (flatten path)))
:else nil))
@dpsutton Thanks, I see what you are getting at. I was focused on tree-seq too much I think đŽ
yeah i forget what kind of tree is a "tree" to clojure. i think its more positional with vectors or with maps. tree seq might work if you had a structure more like ["bank" ["bonk" ["book" ["boor" ..] ["look" ...]]]
I'm trying to add an extern for $("some selector").foo()
.
I've tried a bunch of different variations in the externs file but without any luck. Can someone share some code maybe?
https://github.com/google/closure-compiler/blob/master/contrib/externs/jquery-3.2.js ?
@dpsutton thats a much simpler stucture than my map/vector stucture. I shall re-read the tree-seq examples on clojure docs and see if it makes sense now, cheers
but don't feel boxed into one particular style either way. its your data and you decide the best way forward
Hello, I would like to know what is the best practice if you would like to store data at user side. Build an Electron app to OSx. I saw few advice from nodejs forums like local json file, sqlite, RxD. What are your opinion about? What is the best with Clojure? (I would like to store the data âon the computerâ, not just in the session, without internet connection)
I agree with you that the map structure is more explicit, but at the moment, learning how tree-seq works is more important to me than the structure used.
the answer i was looking for
ajax.cljs deserializes automatically to :params
so if i did (:params req)
on backend i get what i needed
thank for the link @schmee
How could I accomplish something like this with clojure interop
WebDriver driver = new ChromeDriver();
((JavascriptExecutor) driver).executeScript("alert('hello world');");
My Java knowledge is rusty, but from what I remember its casting the driver variable. Can I cast from clojure?(let [driver (ChromeDriver.)] (.executeScript driver "alert('hello world')'"))
- you donât need the cast because clojure doesnât check types
casts donât modify their args, they just tell the compiler to treat the arg as something with that API
(except some cases with Numbers I guess?)
if you need the hint, it would be (let [^JavascriptExecutor driver (ChromeDriver.) ...] ...)
@nbardy the casting isnât a vm thing, itâs just a thing that makes the compiler happy
I guess it prevents clojure from needing to emit code that does reflection though - so it touches the vm in that sense, but usually you can ignore that
similarly List<Foo> is just List in clojure
I'd like to generate static HTML pages using Garden for css and turn those HTML pages into PDFs is there a set of libs that would make this convenient?
generate html from what? better to go from one doc (xml) to multiple formats. html->pdf is unreliable.
specifically, I'm making reports that can be viewed online (re-frame SPA) and I'd like to design it within clojure's web ecosystem, but also be able to export as pdfs en-bulk