This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-21
Channels
- # aws (3)
- # beginners (98)
- # boot (18)
- # cider (6)
- # cljsrn (8)
- # clojure (56)
- # clojure-dev (11)
- # clojure-spec (3)
- # clojure-turkiye (1)
- # clojurescript (34)
- # core-async (42)
- # cursive (8)
- # datascript (79)
- # defnpodcast (2)
- # dirac (13)
- # emacs (14)
- # jobs-discuss (3)
- # onyx (27)
- # overtone (1)
- # pedestal (1)
- # protorepl (1)
- # re-frame (40)
- # reagent (5)
- # unrepl (29)
- # vim (3)
How do you direct a http://clojure.io writer to a given path, in an OS agnostic way? I couldn't find a way with clojure.csv
you make a writer out of a http://clojure.java.io/file
A tool for data scientists, which is pretty popular. But I wouldn't say Clojure is yet "one of the most used AI languages" People are building the tools now.
I was just looking for a language to start learning AI and I saw some articles mention lisps were one of the best choices
I know some python and I know it is very popular with AI, but I don't know. I'm really enjoying clojure xD
they're good choices for playing. And Clojure is a good idea for playing. All the big stuff is built in python though. On top of high performance bindings.
I really love python, too, so if I have to start learning AI with that I don't mind, but if there was some good tutorial on clojure I would have used it. I'll check the article and Incanter, thanks!
Depends on what you mean by "tutorial on AI." It's a diverse field. Carin has made tutorials on a number of topics.
She made a genetic evolution example with clojure spec, which ended up being pretty rad.
And if by AI you mean data science, there are bunch of older tutorials on that, I believe.
If you're super excited about the deep learning trend, you'll want to jump into cortex. It's a super fresh project, with some rough edges. But Carin showed it performing decently in Kaggle, in that article I linked, I believe.
I just finished reading the article and I realize I still need to learn more clojure basics
But I think most of AI is still "R" like data science, and not just neural networks. So you might be able to get a lot of traction with tutorials on Incanter. And translating examples over from R.
Cool. Yeah I'll take it slow. I feel like I still need to know the basics well and I've started with clojure what... 3 weeks ago? I'll definitely keep an eye out for the things you mentioned, though.
Another reason you may have thought that clojure was one of "the most used AI languages" is because it is one of the best "data oriented" languages and it is used for wrestling data in a lot of places. So everyone expects it to do well in data science. Just needs to penetrate academia more.
@vitruvia check out peter norvig's classic http://norvig.com/paip.html which is AI in common lisp. this is a symbolic version of AI which as i understand is far from what modern trends are doing however
modern AI is statistics and machine learning rather than the previous symbolic and logic version, but i have lay person's understanding and am not an expert by any means
but this recently came out: http://thinktopic.com/blog/toward-cortex-1-dot-0
@dpsutton thanks! I suppose there are different techniques on AI, shouldn't hurt to study some of the older ones
i'm using https://github.com/jarohen/chord in clojurescript to create a websocket connection, and the initial ws-ch
function returns a channel, that once connected outputs another channel, that you can then receive messages from
I want to essentially pass around that message channel so I can potentially merge it/filter it/etc., however it's trapped in the go
block that creates the initial connection
lilactown: I don't understand what you mean by trapped here
mm yeah, so in the example you helped me with yesterdya:
(defn create-stream
[handler]
(let [poison (chan)]
(go (let [messages (<! (create-ws-connection "url"))]
(loop []
(let [[{:keys [message] :as m}] (alts! [messages poison])]
(when m
(handler message)
(recur))))))
poison)
^ that's pretty much my current code, but I want to be able to return a channel that outputs the message
s instead of using a callback
then replace the when block with (if message (>! out message) (close! out))
then make sure consumers of out do the right thing if it closes
like I think I could just use pipe
, except that I want the consumer to be able to close the websocket
right - you can just return both channels - or, better yet, have the consumer pass the out channel in
then they can decide what buffering they need or transducer etc.
the solution I've come up with thus far is to create a proxy channel, but I'm not sure how to then be able to close the message channel without having another channel lying around that acts as a poison channel
How do you map a two argument function? I have to check if a book has all the awards in a list of awards, I already have a has-award?
function that checks for a single award, but (map (fn [x] has-award? lord-of-light x) [:hugo :world-fantasy])
doesn't work as intended
but I want to test a list of awards on the same book (which is still an argument because it must work for different books)
you can also, if you want, write has-award?
to return a function that checks for a specific book
Maybe not what you need. You probably don't have [thing1 thing2 thing1 thing2 thing1 thing2]
But if you do, and thing 1 and thing 2 were book and award, and you need to process each in pairs, you could (partition 2 [1 2 3 4 5]) => ((1 2) (3 4) (5)))
@lilactown I'm not sure what you mean. This is my has-award? function:
(defn has-award? [book award]
(let [aw (:awards book)]
(contains? aw award)))
(defn has-award? [book]
(let [aw (:awards book)]
(fn [award] (contains? aw award)))
e.g. (has-award? lord-of-light)
returns a function that will return true for any award you pass in that lord-of-light has