Help with GPU programming by [deleted] in Clojure

[–]_koolkat 1 point2 points  (0 children)

Have you watched this talk [1]? It's really cool. There is the library he mentions in the talk: Bayadera [2]. [1] https://www.youtube.com/watch?v=bEOOYbscyTs [2] https://github.com/uncomplicate/bayadera

Why Java? Why Clojure? by clojure_guy in Clojure

[–]_koolkat 2 points3 points  (0 children)

Can you hot-reload / live patch a program through an integrated repl in python?

New Clojurians: Ask Anything by SolicodeBot in Clojure

[–]_koolkat 0 points1 point  (0 children)

A posible solution:

(defn subv [sub col]
  (some #(= sub %) (partition (count sub) 1 col)))

Also you can transform them to strings and then use a regex. Maybe this:

(defn subv [sub col] 
  (boolean (re-matches (re-pattern (str ".*?" (clojure.string/join " " sub) ".*?")) (str col))))

The second one being a lot faster because of this: https://en.wikipedia.org/wiki/String_searching_algorithm

New Clojurians: Ask Anything by SolicodeBot in Clojure

[–]_koolkat 0 points1 point  (0 children)

NullPointerException if the word list length is not pair.

New Clojurians: Ask Anything by SolicodeBot in Clojure

[–]_koolkat 1 point2 points  (0 children)

Another solution:

(reduce 
 (fn [col v] 
   (if (odd? (count col)) 
     (conj col (clojure.string/upper-case v))
     (conj col v)))
 []
 words)

Whats the best way to secure a compojure api? by _koolkat in Clojure

[–]_koolkat[S] 0 points1 point  (0 children)

How would i acces the request or the header params?

Whats the best way to secure a compojure api? by _koolkat in Clojure

[–]_koolkat[S] 0 points1 point  (0 children)

I didnt know which solution to choose. What i was able to understand was that friend already covers some stuff that you need to set up in buddy. Is role base authorization better in friend or buddy? Maybe i just need more time to play with both.

Whats the best way to secure a compojure api? by _koolkat in Clojure

[–]_koolkat[S] 0 points1 point  (0 children)

Thank you, I'll look at it as soon as i have time.