Fork me on GitHub
#clojure
<
2015-06-22
>
grayson.carroll03:06:49

Any recommendations on good UI libraries for Clojure? I’m attempting to build a program visualization tool vaguely reminiscent of http://noflojs.org/ and am looking for a good front end. I started hacking something together using https://github.com/daveray/seesaw, but I’m not sure I’m sold on using Swing. I know LightTable went the node-webkit/cljs route, but I always had performance issues with it.

kachayev07:06:12

@minimal: I looked at manifold library before. And yes, you’re right, let-flow macro sells pretty the same idea of using values as they don’t have "computation container” around them

niwinz07:06:11

awesome about muse! looks really nice!

niwinz07:06:54

about applicative do, hmm seems like a great idea, we can think on implement it for the next version

niwinz07:06:20

(we are waiting for final clojure 1.7 release for the next cats release)

pesterhazy07:06:03

@kachayev: really appreciated the new examples in the readme.md

kachayev07:06:30

@niwinz: would be really nice! "applicative do” is an old idea in Haskell world

niwinz07:06:24

I will create an issue with that!

dialelo07:06:34

@kachayev: looks great with mlet syntax. I read the Haxl paper and is very interesting, in case someone is curious http://community.haskell.org/~simonmar/papers/haxl-icfp14.pdf

dialelo07:06:53

@kachayev: would you consider adding CLJS support to muse?

kachayev07:06:19

I thought about it, but there are not that many use cases for CLJS

kachayev07:06:38

i’ll do this later

dialelo07:06:25

great to read that you're working on adding traverse to cats, looking forward to it

calum12:06:23

Hi, I'm new to clojure and I'm trying to fix a namespace conflict between two macros. lein dev works, but lein uberjar fails. Can anyone advise me on general debugging techniques for this? I've already made sure everything is explicitly :refer'd and I'm a bit lost as to what to do next.

pesterhazy13:06:49

@calum, I think @txus mentioned a similar problem the other day

pesterhazy13:06:13

have you tried aot'ing only the namespace containing the entry point?

txus13:06:33

calum and I work together, we reported the same issue 😄

tcrayford13:06:09

@calum @txus is that on clj 1.7?

tcrayford13:06:37

@calum @txus latest schema release has a fix for that AOT bug (iirc). lein deps :tree it

txus13:06:45

ohh nice!

txus13:06:11

using clojure 1.6.0 and schema 0.4.3 @tcrayford

tcrayford13:06:31

iirc 0.4.4 fixes a number of AOT bugs. Unsure though - I don't use schema directly (just plumbing)

txus13:06:47

thank you for the hint though simple_smile

calum13:06:06

ah thanks for all the responses guys simple_smile I'll try updating the dependencies

pesterhazy13:06:25

@calum, @txus, otherwise try creating a minimal example reproducing the bu7g

txus13:06:02

@calum: we’ll have to exclude schema from compojure-api’s dependencies and include our own with schema’s 0.4.4-SNAPSHOT

pesterhazy13:06:03

with that you should get a quick response on a bug report

calum13:06:45

@txus: right. That makes sense. Is there docs on excluding libs like that?

calum13:06:15

@pesterhazy: sure thing. I'll give that a go if updating doesn't solve it

colin.yates15:06:54

so, quick poll - fastest way to get a decent emacs on a retina mac?

colin.yates15:06:02

@sveri - simple_smile that is what I am using and love love love it. But I like to keep on top of emacs as well simple_smile

zoldar15:06:17

btw - any cursive user upgraded to idea 14.1.4?

colin.yates15:06:55

@zoldar - yep, community version running latest - all working fine for me

voxdolo15:06:26

or evil-mode if you have an aversion to RSI 😉

zoldar15:06:40

@colin.yates: thanks, just asking, because last time I recall there were hiccups

sveri15:06:58

@zoldar: I did a hour ago, no problems here so far

colin.yates15:06:00

@voxdolo: talk about a vertical learning curve! simple_smile

sveri15:06:49

@colin.yates: Ok, sounds reasonable, I know, my comment wasn't constructive, but I just cannot keep myself from giving them 😄

voxdolo15:06:18

@colin.yates: just use it in emacs mode. If you run through the instructions, it will guide you to choose vim or emacs mode. It's a great all-in-one (opinionated) packaging of the best packages in the emacs landscape. I'm using it daily for clojure dev.

voxdolo15:06:11

and to be clear it is emacs, it's just a collection of great packages with an alternative keymapping that you opt out of by choosing emacs mode.

colin.yates15:06:57

@voxdolo - thanks. How does it compare to emacs live or prelude for example (if that isn’t too big an answer)?

voxdolo15:06:08

@colin.yates: I'm not familiar with either 😕 I'm a long-time vimmer in emacs land for the first time. I've been using spacemacs for about 3 months now.

colin.yates15:06:38

@voxdolo - ok - thanks, I will take a look

jcsims15:06:31

@colin.yates: https://github.com/clojure-emacs/example-config might be a simple start for clojure-specific work

rickmoynihan15:06:54

Is there a reason you can't add metadata via the reader to a symbol? as (meta ^:foo bar) ;; => nil yet (meta (with-meta bar {:foo true})) ;;=> {:foo true}

rickmoynihan15:06:21

but the above works for collection types... e.g. (meta ^:foo []) ;; => {:foo true}

jcsims15:06:23

@colin.yates: also, there’s an #C050AN6QW channel if you have more questions

colin.yates15:06:20

@jcsims - thanks, I didn’t realise there was an official one - good to know.

zoldar15:06:21

@voxdolo: wow, spacemacs makes really nice first impression, installation went smoothly and theme looks really slick

voxdolo15:06:35

I'm a big fan simple_smile

Lambda/Sierra15:06:37

@rickmoynihan: I think you're seeing the difference between metadata applied by the reader to the symbol bar and metadata applied to the value of bar at runtime.

Lambda/Sierra15:06:26

(meta (read-string "^:foo bar")) => {:foo true}

Lambda/Sierra15:06:06

Read-time metadata is tricky; it's generally easier to use with-meta.

rickmoynihan15:06:47

@stuartsierra: Yeah I suspect its an expansion order thing... e.g. (meta '^:foo bar) => {:foo true}

rickmoynihan15:06:22

its ok this is going in a macro anyway... I'd just tried it at the REPL and was surprised

Lambda/Sierra15:06:11

Yeah, you almost always want with-meta in a macro, not reader metadata.

rickmoynihan15:06:25

@stuartsierra: but its ok for a user of the macro to call like this? (mymacro foo ^:somemeta bar) and my macro to process the metadata right?

rickmoynihan15:06:22

thanks for your help

Lambda/Sierra15:06:45

You're welcome.

tcrayford15:06:10

@stuartsierra: pretty sure that could be a "Clojure Don't", though wondering how big your backlog is on that series now 😉

bmay20:06:36

not necessarily clojure-specific question: if you're creating a method that does a SQL insert and you need to make sure the value isn't in the table, would you put the SELECT check at the beginning of the new method or before calling the new method?

cddr20:06:03

@bmay: IMO, it's easiest to just try to insert it and catch the exception but I'd be interested to hear what others think too

roberto20:06:39

the ‘check’ is ‘validation’, in IMO

roberto20:06:49

so I would put it in some function that does the validation

cddr20:06:21

Right but for unique constraints, it's easier to let the database do it's thing

roberto20:06:35

then, why do a separate ‘SELECT'

roberto20:06:39

i agree with you

settinghead20:06:16

hi guys. a possible side project i've been thinking recently: would it make sense to convert this deep learning tutorial into clojure + deeplearning4j: http://deeplearning.net/tutorial/deeplearning.pdf

settinghead20:06:05

which language makes more sense for this particular purpose: scala or clojure? also, is this too ambitions for a one-person project?

roberto20:06:27

just do it.

roberto20:06:50

also, asking in a clojure channel what language they would use, is kind of ‘misleading’.

bmay20:06:12

@cddr: good point. makes total sense

voxdolo20:06:34

Anyone used elephant (https://github.com/clojurewerkz/elephant) in production for Stripe integrations?

voxdolo20:06:27

it wraps the official Stripe Java API, which I approve of. I'm slightly wary of the "Elephant is very young and under active development." disclaimer though.

voxdolo20:06:38

But have generally enjoyed clojurewerkz libs

voxdolo20:06:42

though I suppose "active development" is preferable to the "stagnant development" that seems to prevail in the other libs for interacting with Stripe

voxdolo20:06:26

@michaelklishin: what say you? is elephant good to go for production?

michaelklishin20:06:55

@voxdolo: I'm fairly certain it doesn't have any major issues. It is not complete, though, and the docs are lacking.

arrdem20:06:18

sounds like every other clojure library

michaelklishin20:06:20

I am going live with it fairly soon

michaelklishin20:06:29

@arrdem: fortunately not most of ClojureWerkz libraries

voxdolo20:06:46

@michaelklishin: okay, thanks for the input.

voxdolo20:06:10

we've got a super straightforward integration, just a charge. I'll likely give it a whirl.

voxdolo20:06:20

@arrdem: 😄 I know that feeling

michaelklishin20:06:43

@voxdolo: my use case is focused exclusively on subscriptions

voxdolo20:06:43

big props to clojurewerkz and funcool for breaking that tendency though

michaelklishin20:06:28

@voxdolo: I don't even know if we implemented charges. The API and test suite make it easy to contribute that, though. And we wrap Stripe Java instead of working from scratch.

voxdolo20:06:09

and yeah, my other two options are wrap the Java API myself (which wouldn't be terrible) or potentially use https://github.com/racehub/stripe-clj instead, as it seems fairly active

michaelklishin20:06:04

RaceHub folks are pretty sharp. I suspect they already use stripe-clj in prod.

voxdolo20:06:15

I appreciated the fact that elephant wrapped the Java API, but yeah… stripe-clj is a contender.

voxdolo20:06:26

thanks for the thoughts @michaelklishin

michaelklishin20:06:32

Stripe Java actually misses some things that Stripe HTTP API provides

michaelklishin20:06:46

and their Java code is, ahem, Ruby-programmers-had-to-write-Java

voxdolo20:06:58

yeah… I noticed that 😄

podviaznikov23:06:51

@kachayev: muse library looks great. Liked the real world datasources examples. Going to try in my projects

ghadi23:06:14

Who uses Spark with clojure?

ghadi23:06:37

I'm curious about the rough edges