Fork me on GitHub
#clojure
<
2017-07-16
>
souenzzo00:07:17

@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.

qqq06:07:58

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

seancorfield07:07:16

I've read all the stuff about Threepenny and I still have no idea what it actually is/does...

seancorfield07:07:31

(but that's how I feel about most Haskell stuff)

qqq08:07:28

@seancorfield : imagine ghcjs did not exist

qqq08:07:41

imaginme haste did not exist; then there's no way to do js / browser dev in . ahskell

val_waeselynck08:07:05

@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

qqq08:07:43

then haskell creates the js library which talks to haskell ober websocket

qqq08:07:55

this js likbrary allows haskell to create/modify dom elements, and routes events back to haskell

michaellindon11:07:57

does anybody here have experience with loom?

darwin13:07:07

@qqq so to ship your Threepenny-based app, you have to ship the haskell-compiled binary server as well?

jpmonettas15:07:54

hi everybody! does any one knows what happens to lein :repl-options :caught in headless mode?

jpmonettas15:07:32

it works when you start lein repl, but not lein repl :headless

jpmonettas15:07:43

hmmm more related to :repl-options :caught and nrepl

donyorm15:07:02

So I'm thinking about writing a clojure desktop app. Does https://github.com/halgari/fn-fx seem relatively stable and usable?

jsa-aerial16:07:18

RE: threepenny, seems like Haskell analogue to R's Shiny https://shiny.rstudio.com/

qqq18:07:55

@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

qqq19:07:28

@jsa-aerial can R's shiny take arbitrary dom events, and send it back to R ?

jsa-aerial05:07:19

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...

flyboarder19:07:45

http://github.com/degree9/meta has a fully open ended UI solution

flyboarder19:07:37

uses edn and a template to generate a default UI or you can provide an alternate template or final cljs file for the ui

razum2um19:07:45

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

flyboarder19:07:28

Can someone toss me a basic/simple macro that works in clj/cljs/self-hosted???

weavejester19:07:28

@flyboarder like (defmacro foo [x] x) ?

flyboarder19:07:06

@weavejester hahah im looking for something that has reader conditionals, (defmacro broken [] #?(:clj "clojure" :cljs "clojurescript")) resolves to “clojure” in JVM ClojureScript

flyboarder19:07:08

ideally I would like “clojure” in clj and “clojurescript” in cljs/self-hosted

flyboarder19:07:07

@weavejester im just trying to wrap my head around the correct pattern for what I am looking for

weavejester19:07:39

@flyboarder There’s a way to do that that involves looking at a var, but I forget which one.

flyboarder19:07:54

@bronsa @weavejester yeah I looked at macrovich/case but I figured there was a proper way to do it without &env checking

gfredericks20:07:34

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.

bronsa20:07:08

yep, that's a funny trick

robert-stuttaford20:07:41

@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))

pesterhazy21:07:49

@gfredericks nice! that's actually a pretty common use case

gfredericks21:07:35

suggested usage: (doseq [[x more?] (partition-all 2 1 coll)] ...)

cfleming21:07:16

@razum2um Cursive allows you to control this, Settings-&gt;Editor-&gt;Code Style-&gt;Clojure-&gt;General-&gt;One space list indent

cfleming21:07:49

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.

jsa-aerial05:07:19

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...