Better HN
topnewbestaskshowjobs
Log inSign up

nonrecursive

3,365 karma · joined Mar 28, 2007 (19y ago) · 672 submissions

www.flyingmachinestudios.com daniel at the domain above
Submissions

comment 11y ago · link · parent

Thank you for the explanation and penalty reduction, you've made my day! I blame overzealous coworkers.

comment 11y ago · link · parent

I'm pretty bummed that this submission is in HN purgatory for some reason, but it's really great to read these nice comments! I'm glad y'all have found the book useful and enjoyable :)

63.

Show HN: Clojure for the Brave and True – now free online(braveclojure.com ↗)

224 points · by nonrecursive · 11y ago · 30 comments

comment 11y ago · link · parent

Oh jesus, my site got submitted and is #1 on HN again. It kind of amazes me that a guide that begins with a Thich Nhat Hanh (buddhist monk) quote can bring out such heated debate.

A few things to clarify:

* The before/after flyers were taken from real life. These were printed out and tacked up to community boards and the like.

* One reason why I think the right poster is better is that it looks nicer on the surface and would therefore be more enticing for people to read to find the details. I think the left poster looks like it would be harder to find information. If an ad looks hard to decipher, then people aren't even going to bother. A lot of criticism here has to do with how the phone number doesn't stand out. If you're walking down the street and just see a giant phone number scrawled on a wall, would you call it? No. You need to have a reason to call it. I think that the flyer on the left gives passersby less reason to call.

* That said, I do need better examples, and the site needs to look less ugly. As it happens, my next project after finishing http://braveclojure.com is to revamp this site. If you're interested in hearing about the revamp, please sign up for an email reminder: http://eepurl.com/biiMZT . I'm going to add more content on actually implementing this stuff using CSS/SCSS. If you think the Clojure site is OK looking then you'll probably like the new visual mess content.

* For some reason, beginners seem to love this site as it is. Weird!!!

edit: If you have little or no experience trying to do visual design, I hope the site has encouraged you to give it a try, if only so that you can do better than I did :)

edit 2: Back in 2011 I wrote a blog post thanking readers, looks like it's relevant again: http://www.flyingmachinestudios.com/design/cuym-thank-you/

65.

Boot, the Fancy New Clojure Build Framework(flyingmachinestudios.com ↗)

4 points · by nonrecursive · 11y ago · discuss

comment 11y ago · link · parent

This made my day. Thank you :)

comment 11y ago · link · parent

You'll need to make sure you require/refer the core.async namespace according to the preceding code block. If you have the code there, make sure you re-evaluate the file. Here's a resource on require and refer: http://www.braveclojure.com/organization/

If you still have trouble feel free to leave a comment on the site or tweet me - I'll be able to respond more quickly that way :)

68.

Atlas Beta – The new learning environment from O’Reilly(chimera.labs.oreilly.com ↗)

52 points · by nonrecursive · 11y ago · 9 comments

69.

tmux in 5 minutes(flyingmachinestudios.com ↗)

2 points · by nonrecursive · 12y ago · discuss

70.

Interacting with Java in Clojure(braveclojure.com ↗)

4 points · by nonrecursive · 12y ago · discuss

71.

Explanation of Combinators for the Working Man(stackoverflow.com ↗)

4 points · by nonrecursive · 12y ago · discuss

72.

The Periodic Table of Storytelling(designthroughstorytelling.net ↗)

2 points · by nonrecursive · 12y ago · discuss

comment 12y ago · link · parent

The book covers functional programming because Clojure places a heavy emphasis on functional programming, and learning it is essential to learning Clojure. The book is not "Functional Programming for the Brave and True, with Clojure as the Medium." That doesn't mean that I'm merely "going through the motions" and am "not fully committed" to helping people understand functional programming, and it's bizarre, presumptuous, and rude that you would suggest that. At this point, it seems to me like you're merely being argumentative.

comment 12y ago · link · parent

You're right about being able to point to the same tail from two different lists in common lisp, of course. I'm not very experienced with scheme so I can't comment much on that. Clojure is different in the way it implements its data structures, so "structural sharing" in that context refers to its use of tree structures to implement vectors, maps, etc.

Still, though, I think you have it wrong about Clojure's design. You mentioned the talk "the value of values." Immutability and functional programming are core to Clojure's philosophy. This is pointed out on the clojure.org home page. I'm not sure why you think it's not?

Also, Clojure is meant to be a general-purpose language. Also from the home page: "It is designed to be a general-purpose language". So I'm not sure why you think otherwise? I started learning Clojure with 0 experience with the JVM, and many others are doing the same.

I'm also not sure what you mean by "education is entirely orthogonal to Clojure." I think you're commenting on the value of producing an introductory Clojure book? In any case - you mention that "there are better languages for teaching functional programming." The point of Clojure for the Brave and True is not to teach functional programming, it's to teach Clojure.

comment 12y ago · link · parent

I don't think I read On Lisp the same way. From 3.1: "If a function is advertised as destructive, that doesn't mean that it's meant to be called for side-effects. The danger is, some destructive functions give the impression that they are. For example,(nconc x y) almost always has the same effect as (setq x (nconc x y))". Calling it dangerous sounds like a warning to me. I definitely agree, though, that he makes the case that the preferred approach is writing side-effect free functions. I'm not sure what you mean by "persistence" though, because Common Lisp doesn't have persistent data structures.

I don't know if its emphasis on functional programming and values makes Clojure unique, but that's definitely one of its core design concerns. The "article" is a chapter from a book on Clojure, and learning to write in a purely functional style is essential to learning Clojure. The point of the chapter isn't to get to the heart of what makes the language unique, it's to offer instruction on how to use it.

comment 12y ago · link · parent

The book chapter aside, I think you might actually have it backwards. Hopefully I'm not misunderstanding you terribly! The reason why PG has to spend as much time as he does warning programmers about hidden ways in which Common Lisp mangles your data structures (nconc, for example) is because Common Lisp does not come with immutable data structures out of the box. My impression is that he's telling you how to work as well as you can (strive for purely functional code) with the tools at hand. Clojure, on the other hand, was built so that you could code without having to worry about that stuff by default.

Also, you say that lisps have "always had shared structure." I'm not sure what you mean by that? Clojure implements _structural sharing_, which is what allows it to have persistent, immutable data structures. Common Lisp certainly doesn't do the same.

I'm not sure what you mean by "Lisp went on a journey to Java and was transformed by the experience." I think you're saying that Rich Hickey designed Clojure to be a lisp that's more Java-like? Could you explain how? My impression is that Rich Hickey thinks OO is broken (see the talk "Are we there yet?"), as is the notion of mutability as implemented by Java. Clojure's interop with Java is a great convenience, but the emphasis is still on functional programming. I don't think I understand what you're saying, or maybe it's just that we disagree?

Finally, from clojure.org: "Clojure is predominantly a functional programming language, and features a rich set of immutable, persistent data structures. When mutable state is needed, Clojure offers a software transactional memory system and reactive Agent system that ensure clean, correct, multithreaded designs." Maybe it's these state management features you're concerned about? If so, then I would suggest that vars, atoms, refs, and agents are not as inspired by Java as you're saying. Or maybe we just disagree that, the majority of the time, you should be writing pure functions and using immutable data structures in Clojure?

comment 12y ago · link · parent

I think you may be misunderstanding a few things, and I hope I can clear them up :) First, the term "pure function" does not imply "ivory tower" any more than "recursion" does. Pure functions are tools that allow you to "isolate mutation". In fact, Paul Graham mentions that experienced lisp programmers "try to segregate side-effects in a few functions, allowing the greater part of the program to be written in a purely functional style" (http://unintelligible.org/onlisp/onlisp.html#SEC27). So - don't let the terminology throw you :)

Second, the point of the point of the chapter is to show how much can be accomplished without mutating data structures. I think that's something valuable to focus on. Saying "You can do a lot with pure functions and immutable data structures" is not the same as saying "You'll never need to mutate anything" and as the author, I apologize if my writing suggests otherwise :(

Lastly, Clojure definitely places a huge emphasis on limiting mutability by using pure functions and immutable data structures. I think Rich Hickey even describes pure functions as stable bricks or stable atoms in one of his talks. My impression is that it's definitely not the love child of common lisp and java. Clojure is pragmatic, but that doesn't mean it doesn't place an emphasis on functional programming. I agree that it's "not bogged down in a theory of pure anything", but that doesn't mean it wasn't intentionally designed to support and encourage programming with pure functions and immutable data structures.

comment 12y ago · link · parent

Clojure From the Ground Up http://aphyr.com/tags/Clojure-from-the-ground-up is a good resource, and there's also my own Clojure for the Brave and True http://www.braveclojure.com/ . I actually started by going through "Land of Lisp" first. Though it covers common lisp, not Clojure, it's a very fun book.

edit: Realm of Racket is also a good lisp book, and a lot of people like "the little schemer". It's hard for me to say how good these are for people completely new to programming, though.

Finally, there's the ClojureBridge curriculum, which is targeted at new programmers: https://github.com/ClojureBridge/curriculum

comment 12y ago · link · parent

In that case I think he's wrong. Being "different" and being "less than" are two different things, but it sounds like he's equating them, as if by going out of your way to help under-represented groups you're implying that they're under-represented because they're inferior.

To clarify what I meant in my earlier post: Yes, they are different, by definition - one group is the majority, the others are minorities. That doesn't mean that they're different in terms of intelligence, ability, or worth. Treating minorities "differently", otherwise known as "helping", is logical. It recognizes that the majority already gets "special treatment", because those in the majority are already looking after each others' interests.

comment 12y ago · link · parent

This post is mostly an exposition of the author's strongly-held opinion that A) technology communities are all currently meritocracies, which is good; B) self-imposed quotas will result in something that isn't a meritocracy, which is bad; and C) organizations which strive to help minorities (women who code etc) are bad because they try to help minorities.

I'm only going to respond to C because it's the most ludicrous. Recently, I (an asian male) was a teacher assistant at the very first ClojureBridge, and during the training I learned more about why these workshops are useful and important. They create an environment where attendees feel more comfortable learning, making it much more likely that attendees will be successful in learning to program. You can argue whether or not it's "right" that women would feel more comfortable attending a workshop geared specifically toward women, but frankly I think that's irrelevant.

The author says that these organizations give the message that "These people are different from the majority so we need to treat them differently." Well, yes. What's wrong with that? The author doesn't explain. In any case, I think this is a good thing because the majority already has special treatment, thanks to human nature. There is ample evidence that women and black people are seen as less capable, even by people who have no desire to be prejudiced. How easy will it be for you to learn if the people surrounding you all assume that you're not as smart as them just because you're a woman or you're black? It's important that these conscious efforts to combat the results of our unconscious biases exist.

81.

Concurrency, Parallelism, and State. And Zombies.(braveclojure.com ↗)

6 points · by nonrecursive · 12y ago · discuss

82.

Clojure/West 2014 videos uploaded(youtube.com ↗)

2 points · by nonrecursive · 12y ago · discuss

comment 12y ago · link · parent

Makes me think that maybe I could write the code equivalent of "Scary Stories to Tell in the Dark" using Java

comment 12y ago · link · parent

This is really inspiring! I had no idea that Linda co-founded Rails Girls, and for some reason I had formed the impression that she was an illustrator before becoming a programmer. I didn't know that she had learned to draw so that she could create the book.

This advice is golden, and it's pretty cool to see such joy, enthusiasm, and generosity rewarded.

comment 12y ago · link · parent

I created something similar a few years ago: http://openhercules.com/ . It supports reusing lists through an explicit clone. Source is at https://github.com/flyingmachine/openhercules .

comment 12y ago · link · parent

I can't speak for hendzen, but your suggestion that women avoid tech because they're not as thick-skinned as men -- as opposed to being constantly exposed to hostility -- can easily be perceived as offensive. It sounds like you're propagating the myth that women are delicate flowers who just aren't as tough as men, which is part of what allows men to continue getting away with bad behavior.
12345
23