Fork me on GitHub
#clojure
<
2015-09-13
>
pupeno08:09:57

My low level function to store a record in the database, requires all the fields to be present, username, email, name, date of birth, etc. On top of that I have a function that does validation and other things. Amongst this things, I need to fill up fields with sane defaults. I could just merge a hasmap, but I’m wondering if there’s some library I could use. I thought of schema, but it feels like an overkill. Does anybody else have an opinion about this?

mosho11:09:46

How do I set up figwheel to auto refresh the browser on server code changes?

mosho11:09:02

I understand ring's auto-refresh? does this, but not sure where to put it

tylerdiaz11:09:54

👋 Hello, fellow clojure devs!

gjnoonan13:09:49

👋 hello tylerdiaz

tylerdiaz13:09:27

(thank (user :adulteratedjedi))

pupeno15:09:04

Is there a function somewhere to convert any string into a valid-for-an-URL string? Something like stringex in Ruby (https://github.com/rsl/stringex)?

pupeno18:09:03

Is in-ns the proper way to switch to a different namespace? I seem to lose access to clojure’s core after that.

roberto18:09:45

didn’t know about in-ns

pupeno18:09:36

I use ns normally too. This is for something different.

pupeno18:09:04

I need to temporarily switch to another ns.

jcsims19:09:39

pupeno: it doesn’t refer clojure.core. You should be able to (clojure.core/use ‘clojure.core) after you’re in the new ns, but it’s not a use case I use often - there might be a better way to do it