This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-16
Channels
- # aleph (4)
- # bangalore-clj (10)
- # beginners (39)
- # boot (24)
- # cljs-dev (66)
- # cljsrn (79)
- # clojure (39)
- # clojure-italy (7)
- # clojure-russia (6)
- # clojure-spec (4)
- # clojure-uk (1)
- # clojurescript (91)
- # core-async (1)
- # core-typed (2)
- # datomic (49)
- # hoplon (42)
- # lumo (2)
- # nyc (1)
- # off-topic (1)
- # parinfer (20)
- # pedestal (2)
- # reagent (4)
- # rum (14)
- # vim (2)
@nicoschneider
https://github.com/clojure/clojurescript/blob/797e247fbef676544060a57da995f058db061f37/src/main/cljs/cljs/core.cljs#L9803
on cljs, this function "detect" the NS of the map to print {:a/b 33}
as #:a{:b 33}
(reader 1.9 feature)
It may be usefull.
In haskell, there is something called https://hackage.haskell.org/package/threepenny-gui where there is a thin js layer, and you can write your entire app in haskell (when on localhost) Is there something similar to clojure? where when on localhost, you can write webapps in clj because the 'client' side is just a very thin cljs code that sends events back to the clj side to be processed
I've read all the stuff about Threepenny and I still have no idea what it actually is/does...
(but that's how I feel about most Haskell stuff)
@seancorfield : imagine ghcjs did not exist
@qqq in the Java world, this reminds me of Java Server Faces. Given the horrible experience I had with it, I'm not surprised it was not much reproduced in the Clojure ecosystem
this js likbrary allows haskell to create/modify dom elements, and routes events back to haskell
does anybody here have experience with loom?
@qqq so to ship your Threepenny-based app, you have to ship the haskell-compiled binary server as well?
hi everybody! does any one knows what happens to lein :repl-options :caught in headless mode?
it works when you start lein repl, but not lein repl :headless
hmmm more related to :repl-options :caught and nrepl
So I'm thinking about writing a clojure desktop app. Does https://github.com/halgari/fn-fx seem relatively stable and usable?
RE: threepenny, seems like Haskell analogue to R's Shiny https://shiny.rstudio.com/
@darwin : if you were to ship it, yes; in practice, you'd never ship it, it'd only for apps you run locally and want a browser-dom-gui
@jsa-aerial can R's shiny take arbitrary dom events, and send it back to R ?
Not entirely sure. Define 'arbitrary'. But on the face of it, I would think the answer is 'yes'. However, like all such things, it is not miraculous - it does not provide totally open ended automated UI generation...
http://github.com/degree9/meta has a fully open ended UI solution
uses edn and a template to generate a default UI or you can provide an alternate template or final cljs file for the ui
Is there a team here, who uses both emacs/cider & intelij/cursive? Did you experienced indents issues like this? https://github.com/weavejester/cljfmt/issues/97
Can someone toss me a basic/simple macro that works in clj/cljs/self-hosted???
@flyboarder like (defmacro foo [x] x)
?
@weavejester hahah im looking for something that has reader conditionals, (defmacro broken [] #?(:clj "clojure" :cljs "clojurescript"))
resolves to “clojure” in JVM ClojureScript
ideally I would like “clojure” in clj and “clojurescript” in cljs/self-hosted
@weavejester im just trying to wrap my head around the correct pattern for what I am looking for
@flyboarder There’s a way to do that that involves looking at a var, but I forget which one.
@bronsa @weavejester yeah I looked at macrovich/case but I figured there was a proper way to do it without &env
checking
I've been using clojure for 19 years and I just now figured out that you can use (partition-all 2 1 coll)
to walk a collection with awareness of whether you're at the end or not.
@gfredericks neat!
Give me some Clojure:
> (partition-all 2 1 (range 5))
((0 1) (1 2) (2 3) (3 4) (4))
> (partition-all 2 1 (range 6))
((0 1) (1 2) (2 3) (3 4) (4 5) (5))
@gfredericks nice! that's actually a pretty common use case
suggested usage: (doseq [[x more?] (partition-all 2 1 coll)] ...)
@razum2um Cursive allows you to control this, Settings->Editor->Code Style->Clojure->General->One space list indent
Recent versions of CIDER will also allow you to configure Emacs to do the opposite if you prefer that, I’m not sure what the setting is though.
Not entirely sure. Define 'arbitrary'. But on the face of it, I would think the answer is 'yes'. However, like all such things, it is not miraculous - it does not provide totally open ended automated UI generation...