Fork me on GitHub
#beginners
<
2017-04-20
>
didibus06:04:02

@tbaldridge Uh, never knew about the timeout, is this done through a protocol? How would I add support for this to a type that implements Deref?

elena.poot06:04:41

It's an interface. IBlockingDeref iirc

elena.poot06:04:12

Check the source for future or promise

Drew Verlee13:04:04

When using a third party library whats the best way to discover how a function works? im using spacemacs with cider Is there some cider command to goto the func defination? is this usually the best way to go about this? Maybe launch a repl that loads in the project and call something on the function?

danmidwood13:04:01

If you have a repl open then cider-find-var will go to the function definition, it's bound to M-. by default

jumar13:04:18

@drewverlee in spacemacs the shortcut , g g can be used for "go to definition". Other than that I frequently use , h h for showing function documentation. And also playing with the function directly in buffer or in REPL.

swizzard13:04:02

could anyone give me tips about splitting up functionality with hugsql?

timo14:04:36

how do you implement oidc in clojurescript? plain or is there some good lib?

curlyfry14:04:20

@swizzard Do you have an example of what you want to do?

swizzard14:04:57

@curlyfry i have a data structure like {:value "word" :artists [{:name "main artist" :featuring false} {:name "featured artist" :featuring true}] :song-name "song" :album-name "album"}

swizzard15:04:03

i have an artists_songs table, a tokens table, and an albums table

swizzard15:04:56

i need to get the pk of each artist, the song, and the album; if they don’t exist they need to be created and their new pk retrieved

swizzard15:04:37

and then fks/m2m connections set

macrobartfast21:04:05

in the om quick start https://github.com/omcljs/om/wiki/Quick-Start-(om.next) the following code appears

(in-ns 'om-tutorial.core)
(defn read
  [{:keys [state] :as env} key params]
  (let [st @state]
    (if-let [[_ v] (find st key)]
      {:value v}
      {:value :not-found})))
why is the (let [st @state] necessary? why not just use (find @state key) in the if-let?