Fork me on GitHub
#beginners
<
2018-09-01
>
m13104:09:19

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 ) - https://github.com/ahungry/ahubu - 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

m13104:09:58

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)

m13104:09:50

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

dl05:09:36

hey guys

emilaasa06:09:58

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

val_waeselynck07:09:50

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

emilaasa07:09:53

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

val_waeselynck07:09:44

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

eggsyntax17:09:04

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

sbondaryev09:09:08

Hello, how can i generate unique id in clojurescript?

suomi.esko09:09:22

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

sbondaryev09:09:29

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

tobias.vetter11:09:18

Is it normal that Leiningen uses Clojure 1.8 by default?

m13113:09:45

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

oliv17:09:24

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

val_waeselynck17:09:05

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

oliv17:09:31

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 )

oliv17:09:01

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

gaverhae19:09:12

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

val_waeselynck20:09:03

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

val_waeselynck20:09:38

And why use records instead of plain maps ?

tmladek21:09:53

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?

seancorfield22:09:47

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

seancorfield22:09:25

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