9 ms·
Clojure from the ground up
- WoodenChair 13y agoThe guide appears to assume one is on Mac OS X or Linux without explicitly stating as such (unless I missed it, in which case my bad). That's not good for a world where most people programming on a desktop are on Windows (Mac user myself).
- aphyr 13y agoThe linked leiningen page includes detailed installation instructions for all platforms, including a windows installer.
- leishulang 13y agomot windows users wouldn't go that far. As soon as they try the "wget ..." command and nothing happened, they quit the "from the ground up" guide.
- justysebitcoin 13y agoGood point. Perhaps we need a "Terminal" program for windows that just works, installs the common bash tools for windows, and everyone is referred to. I say this because if a windows user actually opens up their terminal and types in wget, I'd say they're lucky to give up so early considering that the terminal they're using is straight trash. You can't even make it full screen.
- vezzy-fnord 13y agoIs Cygwin unsatisfactory?
- maxerickson 13y agoFor quick start, light uses it absolutely is.
- tiedmann 13y agoThis is wrong on so many levels. There are lots of ways on any given platform that will get you what you want without wget. Since powershell is installed by default since w7 it'd be nicer to just (new-object System.Net.WebClient).DownloadFile or similar. I'm also offended by the bash-referrals as a zsh-user :)
- DigitalJack 13y agoIn fact lein will use powershell if it doesn't find wget.
- randomhunt 13y agoI thought one of the changes in later versions of PowerShell was there is now an internal version of wget? I know when I use the gnu one I have use specify "wget.exe" instead of "wget" (Invoke-WebRequest) but I can't remember when I started having to. Windows 8 perhaps?
- sr-ix 13y agoOne can find windows binaries for popular unix commands.
- makmanalp 13y agoNice guide! Is there more coming? I also loved your explorations on network partitions, keep up the good work!
- aphyr 13y agoThank you, and yes, there will be more.
- basch 13y agowget ~/bin "aphyr@waterhouse:~/scratch$ lein repl"
- moomin 13y agoI'd spend a bit more time on this. Beginners are quite likely to have windows boxes, and Clojure doesn't work very well on windows. Indeed, telling them to run lein on windows is a recipe for yak-shaving of the first order. (Don't believe me: try switching to windows for a month.) I'd recommend a virtual box to new Clojure programmers on Windows.
- tiedmann 13y agoThe Guide also assumes bash. For anyone who ran any of the github installers (win included) it should work ootb.
- loganekz 13y agoAnd if you are on a mac, I would the think the preferred way to install would with homebrew (brew install leiningen)
- canweriotnow 13y agoNo, no. In fact, last time I checked, the lein docs warn about using brew because the versions may be out of date.
- danneu 13y agoFrom its README: > If your preferred package manager has a relatively > recent version of Leiningen, try that first. > Otherwise you can install by hand: It's kept up to date: https://github.com/mxcl/homebrew/blob/master/Library/Formula/leiningen.rb https://github.com/mxcl/homebrew/blob/master/Library/Formula...
- nicolethenerd 13y agoThe "who is this guide for?" section seems a bit out of place here in an otherwise technical document. While I appreciate the sentiment, studies have shown that girls/women perform worse on tests if they are reminded that they're female right before they take the test - I would imagine that a similar effect might occur when learning Clojure (for any of the discriminated groups mentioned in the welcome message). If someone has managed to find this page, chances are they already know a bit about programming and don't need a welcome message - no?
- aphyr 13y agoThree reasons. First, I want to justify and contextualize the work in the hopes of promoting more like it. Second, stereotype threat is ameliorated by explicit acknowledgement of the effect. Third, I want to challenge implicit assumptions about the audience of technical writing.
- gajomi 13y agoI only skimmed the article until I saw "lein new", so I have no comment on anything before that. But I did want to say that I liked the explanation of the tree structure with the English language example. I think I might steal it. With the respect to framing the article (or others like it you might write in the future) I wonder if you might be able to find a rhetorical strategy that responds to nicolethenerds' criticisms by writing for a specific person who is also a woman rather than groups like Women Who Code. As long as it was somehow clear that it was indeed a woman that you were writing for (I hope you have a female friend who is curious about Clojure!), you might be able to satisfy your three intentions. Necessary disclaimer: I am a guy and I have no expertise. I am just thinking out loud.
- theGimp 13y ago"Who is this guide for" usually talks about a certain level of experience or familiarity with different components or systems. I don't see why you'd put anything about gender there. I am not a woman, but I'm sure a woman would be just as frustrated as me reading that section and going "oh come on, tell me if I should read this article based on what I know, not what sex I am."
- sr-ix 13y agoI was just asking a friend of mine for some suggestions for starting up with Clojure. I loved your Jepsen series and you communicate on a level that I can relate to. As such I was thrilled to find your guide at the top of HN. Keep up the awesome work!
- leephillips 13y agoI've been playing around with clojure and clojurescript on my Ubuntu laptop for a while now, but according to this guide I'm not ready to get started because I don't have "javac" installed.
- aphyr 13y agoIt's not necessary for all development, but you'll want a java compiler for later parts of the guide.
- daurnimator 13y agoPointers to a good follow up?
- tazjin 13y agoI've been compiling Clojure-resources for learning etc. at https://github.com/tazjin/clojure-basics https://github.com/tazjin/clojure-basics - maybe you find something that works for you?
- elangoc 13y agoa blog post of mine: http://www.elangocheran.com/blog/2012/03/the-newbies-guide-learning-clojure/ http://www.elangocheran.com/blog/2012/03/the-newbies-guide-l... and a workshop that I did: https://github.com/echeran/intro-clj-pres https://github.com/echeran/intro-clj-pres
- ninetax 13y agoI have really really been getting into clojure lately. It's a functional language that doesn't feel hard to grasp. But it can be way harder to make sane comparisons between libraries and stuff with a community so small but so active as clojure's. My kingdom for a decent comparison between NodeJS+ClojureScript vs vanilla Clojure (w/Compjure maybe?) for high performance web applications!
- andrewflnr 13y agoIf you mean a performance comparison, I would be surprised if Node (V8) outperformed vanilla Clojure (JVM).
- ninetax 13y agoYeah maybe in general but what about a comparison for heavy IO applications? core.async vs node's system? I really hope Clojure catches on. It's so fun to write in, I'm never going back!
- deleted 13y ago[deleted]
- film42 13y agoReal quick: I wrote a little json-in-json-out app for working on webapps before the backend is done (first node (express)). Then, later rewrote it in clojure (compojure). They're both on heroku and perform about the same. This is by no means a real benchmark, but does show that node can keep up with the JVM for ridiculously simple apps. Node version: http://json-mirror.herokuapp.com/ http://json-mirror.herokuapp.com/ Clojure version: http://mirror-clojure.herokuapp.com/ http://mirror-clojure.herokuapp.com/ Also, ClojureScript is super interesting because a lot of clojure libraries will work (provided they're not a Java wrapper library) automatically. Draw backs though? Speed. ClojureScript uses Google Closure to optimize, which brings it close to pure JS speeds, but according to Conrad Barski, the webfui creator, it's not quite there. Check out his presentation though here if you're interested (demos and speed explanations included): http://www.youtube.com/watch?v=HeI5-D7SQe8 http://www.youtube.com/watch?v=HeI5-D7SQe8 CRAP: Should have replied to parent comment, but it's fine here as well.
- jackhammer2022 13y agoI love the thorough Guide to Programming in Clojure for Beginners: http://blackstag.com/blog.posting?id=5 http://blackstag.com/blog.posting?id=5
- mahyarm 13y agoMaybe you want to try light table. It's a pure gui experience, and is probably easier than setting up lein. Currently free.
- doorhammer 13y agoI haven't messed with light table recently, but even months ago, when I last fired it up, it was a way easier setup to jump into clojure than installing java, clojure, Leiningen, etc. So I second this idea, especially if someone doesn't have CLI experience and just wants to get cracking at some code.
- danneu 13y agoI think all noobs should still get lein. (Install it in 1 second with your package manager) That way they can run `lein new <project-name>` to get the app skeleton created. Then open it with Lighttable. In fact, anyone that wants to check out the Clojure version of Sinatra/Flask should run `lein new compojure <project-name>` and it'll create it from a template. Then run `lein ring server` from the project root to start the dev server. Someone happened to tell me those incantations my first day with Clojure and I was instantly productive.
- mahyarm 13y agoIf a newbie knows what a package manager is and has it set up on their system, then they're probably not the level of noob this article is going for.
- deleted 13y ago[deleted]
- teabaggard 13y agoclojure is lisp for the tea party.
- laureny 13y ago> I want to convince you that you can program, that you can do math, that you can design car suspensions and fire suppression systems and spacecraft control software and distributed databases, I know you are trying to help but you need to realize that the whole section, and this part in particular, is incredibly condescending and guaranteed to piss off any female who might be reading you. You want to help achieve gender equality in the technical field? Pretend that the gender of your reader is of no consequence and just write your stuff, period.
- cbp 13y agoIt's just a small motivational line with no agenda behind it. You have to pick your words perfectly on the internet because everyone is gonna feel compelled to have an opinion about it.
- laureny 13y ago> It's just a small motivational line with no agenda behind it. Just because you don't see the agenda doesn't mean it's not there. How do you explain that half of the comments in this thread are not about the content of the article but about the mysogyny of its author?
- acjohnson55 13y agoOne might argue that the author hasn't done an effective job of welcoming women to coding. One might even argue that the author has misguidedly had the opposite impact than he intended. But claiming that the author is misogynistic seems way overboard to me. And the fact that people are commenting on the author's agenda could be evidence that people are defensive or in denial that they are part of a system that is biased against women as much as it is evidence that the author maybe hasn't done the best job of combating that problem.
- wyclif 13y agoOh, please. All writing is inherently motivational. Dispassionate writing on the web isn't very inspirational. Write passionately about anything and you'll be bound to piss off some group or constituency. This walking-on-eggshells, I-can't-write-a-line-until-it's-group-vetted stuff kills creativity and makes everything it touches stale.
- shn 13y agoIMHO, It would be better to seperate two distinct things into two seperate articles. Your view in women in computing and intro to clojure.
- sriharis 13y agoThis first lesson was quite similar to Clojure in fifteen minutes: http://adambard.com/blog/clojure-in-15-minutes/ http://adambard.com/blog/clojure-in-15-minutes/. I find both pretty good, although this seems more promising. Waiting for more!
- wolfeidau 13y agoGreat tutorial, look forward to the next one. Clojure, and indeed LISP is one of the things I would really like to learn but most of the tutorials have been way to academic in there format. This one so far has been much more focused and clearer on the intent of the language. Thanks
- mattdeboard 13y agoI know I'm posting this after this article has peaked, but I did that on purpose. Maybe you won't ever read this. Probably not. Aphyr I really admired you dude until you decided to post extremely graphic descriptions of your sexual activities on Twitter. I unfollowed you because of it, and I assure you it has absolutely nothing to do with your personal sexuality. I would've unfollowed anyone who posted what you did (hint: it was the 'toilet-cleaning' tweet last week). And now this blog post. My god. Assault against women is "routine" in STEM fields? It's not routine, it's never been routine, it will never be routine. You live in a social media echo chamber that you need to break out of. You know what the tech community needs more than anything? Thought-leaders who can teach the rest of us important, practical things about the technology we take for granted every day. What we don't need more of: pandering, condescending horseradish. I honestly will not be surprised if I get attacked personally because of this post as a woman-hating or homophobic bigot. This is the level of discourse now, unfortunately. Ergo why I waited until this post had passed its peak to post. Break out of your dumb echo chamber, it's decreasing your worth as a teacher.
- deleted 13y ago[deleted]