Fork me on GitHub

This may be only slightly related to clojure direct, but it is relevant to my clojure project (are self plugs allowed? I'm making a webkit based browser using clojure + javafx ) - - one thing I'm adding is URLStreamFactory overwriting, so that the user can have an ignore list that simply does not get downloaded at the network level if they do not want it - but for some reason, javafx's webengine will occasionally opt to not use the bound urlstreamfactory


anyone ever run into a similar issue with java networking ? (I'm not adding a custom protocol, but inspecting the URL and then just forwarding to the parent method if it appears allowed)


my guess is maybe javafx main thread is dying and auto re-starting, or its cache related and somehow the cache engine is interfering


hey guys


Is it normal that my files read most logically from the bottom up?


That tends to happen yes; you can use declare to motigate this issue to some extent.


I sort of like it but It's a little bit odd too


It's a relatively small price to pay to get some nice code-loading properties.


@U6T7M9DBR that’s definitely what I expect when I open an unfamiliar Clojure file — typically I start at the top, read the ns docstring if any, glance briefly at any def at the top (often important constants are defined there), and then quickly scroll down to the bottom and start looking bottom-up.


Hello, how can i generate unique id in clojurescript?


I suppose there's some history on why but for some reason uuid creation function is not part of Clojure core API.


i’ve just tried (random-uuid) works well for me


Is it normal that Leiningen uses Clojure 1.8 by default?


ya, you can put 1.9 in project clj to change per proj

👍 4

hey mates, I’m creating a http client for one internal api and I have one simple ( probably every noob had the same ) question My http api requires authentication . should I use a atom on my http client or should I return one record which implement my protocol


I don't understand what problem either approach would solve ?


oh, let me try to explain better I need to create a http client for my API I’m trying to build my http lib client as much idiomatic as possible. reading some http api clients on github I found two approaches the first one is create a atom which will contain the host + api_key and every call from that namespace will be using that “configuration” the other approach ( I prefer ) is to create a record which will contain the same configuration as above ( host + api_key for authtentication )


the second approach is more flexible , because I could create as many client as I want, the configuration is not “global”


What about having the config in a map and passing that to a function?


No atom, no global config :) leave those to the users !


And why use records instead of plain maps ?


Hi, two related questions: First, having not used React, is it a good idea to get into reagent, om (etc) and learn along the way or should I learn "plain" React first? And second, I think my project might not even need such a huge framework like React as it's going to be a rather simple app (also, to be quite frank React and its prevalence are a bit unsympathethic to me) - is there an alternative, or am I left with bare DOM manipulations?


@tmladek I would start with Reagent, work through the tutorials and see what you think.


I built an app with Om, then rebuilt it with Reagent. And I've never done anything with React or JS, so I don't think you'll need to learn React itself, at least for a small app. You could also look at Hoplon -- I don't think that relies on React at all? (I haven't used it tho')

👍 4