In light of the significant public interest in the AI technology and its impacts, in this research we set out to analyze the contours of public discourse and perceptions of AI, as reflected in the social media. We focus on Twitter, and analyze over two million AI related tweets posted by over 40,000 users. In addition to analyzing the macro characteristics of this whole discourse in terms of demographics, sentiment, and topics, we also provide a differential analysis of tweets from experts vs. non-experts, as well as a differential analysis of male vs. female tweeters. We see that (i) by and large the sentiments expressed in the AI discourse are more positive than is par for twitter (ii) that lay public tend to be more positive about AI than expert tweeters and (iii) that women tend to be more positive about AI impacts than men. Analysis of topics discussed also shows interesting differential patterns across experts vs. non-experts and men vs. women. For example, we see that women tend to focus more on the ethical issues surrounding AI. Our analysis provides a more nuanced picture of the public discourse on AI than can be gleaned from the media coverage.