B

Brian Carper

briancarper.net · Personal blog · on HN since 2008

Brian Carper writes about Clojure, Lisp, Vim, and Ruby, including a series on building an RPG in Clojure.

What HN saysHN links his post comparing keyword arguments in Ruby, Clojure, and Common Lisp, and his Clojure game development writing.
48HN people shared it
18linked it in comments
54stories submitted
2.1Kstory points
10 years agolast shared
2008people per year2026

Most-shared posts

  1. 1
    Making an RPG in Clojure (part one of many?)
    3 people · 59 points · first shared 2011 · 8 comments on HN
  2. 2
    Keyword Arguments: Ruby, Clojure, Common Lisp
    3 people · 42 points · first shared 2011 · 19 comments on HN
  3. 3
    Git info in your ZSH Prompt
    2 people · 64 points · first shared 2010 · 26 comments on HN
  4. 4
    Clojure and Compojure to the rescue, again
    2 people · 57 points · first shared 2010 · discussion on HN
  5. 5
    Vim undo tree visualization
    2 people · 55 points · first shared 2010 · 8 comments on HN
  6. 6
    Deploying Clojure websites
    2 people · 46 points · first shared 2010 · 8 comments on HN
  7. 7
    Vim regexes are awesome
    2 people · 6 points · first shared 2011 · discussion on HN
  8. 8
    Lisp Syntax Doesn't Suck
    2 people · 1 points · first shared 2011 · discussion on HN
  9. 9
    Clojure reader macros
    2 people · first shared 2011
  10. 10
    Making an RPG in Clojure (2010)
    1 people · 191 points · first shared 2016 · 39 comments on HN
  11. 11
    Emacs isn't for everyone
    1 people · 160 points · first shared 2010 · 133 comments on HN
  12. 12
    Practicality: PHP vs Lisp
    1 people · 157 points · first shared 2010 · 152 comments on HN
  13. 13
    Keeping bash history in sync between multiple terminals
    1 people · 151 points · first shared 2012 · 34 comments on HN
  14. 14
    Advertising is devastating to my well-being
    1 people · 135 points · first shared 2010 · 144 comments on HN
  15. 15
    Clojure: 1, Common Lisp: 0
    1 people · 112 points · first shared 2009 · 68 comments on HN

What HN people wrote when they linked it

lkrubner · 2015-06-23
I am reminded of something in Brian Carper's old post "Keyword Arguments: Ruby, Clojure, Common Lisp": http://briancarper.net/blog/579/keyword-arguments-ruby-clojure-common-… This reminds me of everything I love, but also everything I hate, about Ruby. He writes: ------ With even more added sugar, you can leave off the parens in Ruby function calls. So this is pretty common in Ruby: foo :x => 123 # => {:x=>123} How nice and punctuation-less. But then things get ugly. What about this? foo {:x => 123} That won't even compile.
jrheard · 2013-01-08
Programming a game in Clojure might not be such a bad idea - mikera has some really great thoughts at http://stackoverflow.com/questions/9755882/are-functional-programming-… . Also, you might find this series of blog posts interesting: http://briancarper.net/blog/520/making-an-rpg-in-clojure-part-one-of-m…
nickik · 2011-08-03
In any language you can build a interpreter/compiler for any other language but thats not the point. The point is that you can do random AST transformation at compiletime. You think of macros as a kind of pay of for s-exp syntax. I have to say that even without macros I would think s-exp syntax is nicer. Sure in Ruby you can do alot when you play around with that suger stuff but this stuff often doesn't come free. See this blogpost for an example of what I mean: http://briancarper.net/blog/579/keyword-arguments-ruby-clojure-common-… Depending on what you do you are writting a lot of macros. In lisp the interface to a library is almost always in a DSL style witch makes them easy to use. See this list here: http://stackoverflow.com/questions/3968055/are-there-any-clojure-dsls. In your own Application your maybe not going to need them that often depending on what you do. What you discribe is just a macrosystem. Having macros in a language with syntax is duable (look at Dylan or Plot) but you will find that getting everything nice and easy to use is much harder then you think. If CoffeeScript has a macrosystem great. I don't really know CoffeeScript well enought. Could you provide me with some nice examples of how people use this in CoffeeScript? If I where you I would just learn enought lisp that you can trie it out yourself.
dr_zoidberg · 2016-05-30
That seems to be his last post on gaming/games: http://briancarper.net/tag/66.html
bitsai · 2015-06-27
Mmm, I've never used Ruby or Rails professionally, so I can't really speak to that. Prior to Clojure, I mostly worked with C++, Java, C#, and Python. At its core, Clojure is basically just data and functions. Once the switch flipped in my mind, I found that to be simpler and more straight forward than any of the languages I worked with before. When the majority of your code is side-effect-free, pure functions (and Clojure makes it very easy to structure your code this way), it becomes very easy to reason about. And very easy to test, with minimal ceremony! P.S. When I was learning Clojure, I kinda devoured all the resources I could find. A couple interesting looks at the language from the perspective of Rubyists: http://briancarper.net/blog/536/clojure-from-a-ruby-perspective http://confreaks.tv/videos/rubyconf2009-clojure-for-ruby-programmers
chetanahuja · 2014-12-06
The title of this blog-post is Emacs isn't for everyone". Another posts on the same blog is charmingly titled "Emacs undying hatred" (http://briancarper.net/blog/290/emacs-undying-hatred ). Just putting two and two together here, I'd come to the reluctant conclusion that emacs is not for brian carper (the blogger).
divs1210 · 2014-09-18
Clojure has something better than CL reader-macros [1]. These are name-space specific, and more composable than CL's reader macros. And reader-macros can be achieved with a small hack [2]. [1] http://www.infoq.com/interviews/hickey-clojure-reader [2] http://briancarper.net/blog/449/clojure-reader-macros
dxbydt · 2013-03-14
>Python..is immensely more readable than..Lisp fwiw, it is immensely easier to build a parser for (= z (+ y x)) than for z=x+y you might ask, why should that matter ? Ad outside the eyeglass store: why do we have ears ? so we can wear spectacles! The point being, we first evolved as creatures with ears and later on devised spectacles so we could wear them over the ears. But we've now taken the ears so much for granted we think of spectacles as the innovation! Parsing should have been the whole point, but we now prize readability. We then add fluffy monikers like "serious perseverance" and "Lisp dumbness" to further tilt the balance in our favor. http://briancarper.net/blog/442/lisp-syntax-doesnt-suck
juliangamble · 2012-10-26
What is the canonical implementation of markdown? > The problem with writing my own Markdown parser in Clojure is that Markdown is not a well-specified language. There is no "official" grammar, just an informal "Here's how it works" description and a really ugly reference implementation in Perl. http://briancarper.net/blog/415/ http://stackoverflow.com/questions/7307480/what-is-the-canonical-imple…
briancarper · 2011-08-31
Interesting. A similar feature built into Vim is `cursorcolumn`, which will highlight the background of whatever column the cursor is in. If you set `cursorline` as well, you get a kind of cross-hairs around the cursor. See e.g. http://briancarper.net/vim/cursorcol.png I find that feature useful enough that I've never needed indent guides. If you jump the cursor to the beginning of a line, you can easily see which other lines are indented equally with that line.
telemachos · 2011-08-02
I'm currently using[1] a PS1 that shows branch name, whether any files in the repo need to be staged or committed and whether the repo is behind or ahead of the remote. (Credit to Adam Vandenberg[2] and Brian Carper[3] for whatever good ideas it contains.) Here's what it looks like: http://cl.ly/8y50 [1] https://github.com/telemachus/dotfiles/blob/master/bashrc [2] https://github.com/adamv/dotfiles/blob/master/bashrc [3] http://briancarper.net/blog/570/git-info-in-your-zsh-prompt
nico_h · 2011-06-04
There was a thread on this subject in the clojure google group: http://groups.google.com/group/clojure/browse_thread/thread/e4bca03080… It's a bit of a sidetrack but you can use the same javascript library from both sides : http://briancarper.net/blog/415/clojure-and-markdown-and-javascript-an…
mcn · 2011-05-23
Someone (sorry for not noting your name) suggested dimming/graying the parentheses in lisp modes and gave this elisp snippet to do it. I find that I prefer reading lisp with dimmed parentheses. (defface paren-face '((((class color) (background dark)) (:foreground "grey20")) (((class color) (background light)) (:foreground "grey70"))) "Face used to dim parentheses.") (add-hook 'scheme-mode-hook (lambda () (font-lock-add-keywords nil '(("(\\|)" . 'paren-face))))) I also came across a blog post[1] which includes a slightly more complete solution. http://briancarper.net/blog/492/
cemerick · 2011-04-20
I don't see any resistance to change; it's more like Clojure folks are generally going to demand that changes be unequivocally positive. I remember the fixed-position args in Scala function literals being particularly irritating in certain circumstances; whatever one's gripe about the chosen sigils, being able to write #(%2 %) is damn handy. This widespread Scala/Clojure rift is a myth AFAICT, outside of various spitball fights on Twitter. Oh, and if you want to have userland reader macros in Clojure, have at it: http://briancarper.net/blog/449/clojure-reader-macros ;-)
tcrayford · 2010-01-10
Compojure is a good bet for clojure web applications. To get you started, have a look at the source for clojars and briancarpers cow-blog. http://github.com/ato/clojars-web http://github.com/briancarper/cow-blog Brian Carper has a load of information about using compojure on his site (http://briancarper.net). In particular interest are: compojure to the rescue: http://briancarper.net/blog/clojure-and-compojure-to-the-rescue-again deploying clojure sites http://briancarper.net/blog/deploying-clojure-websites
willismichael · 2014-01-20
Thanks! Same here in terms of "mostly a fun experiment". A while ago Brian Carper blogged about early attempts at developing a little RPG in clojure: http://briancarper.net/blog/520/making-an-rpg-in-clojure-part-one-of-m… His post indicated that he initially tried the "every entity is an agent" idea, and had performance problems with it - although maybe his real problem was that the entire world was a single ref, and all of the agents would bash on that ref. Another question, do you have any kind of reverse-lookup table implementation? I see that you're using component-based entities, do you have any way to quickly query your world for entities that match some arbitrary criteria, rather than iterate over all entities in the entire world? I ask because my game idea would involve potentially tens of thousands of entities, and I'm trying to figure out a way to build game logic mini-systems that can quickly find a subset of game entities and perform some function on them. For example "In the spring time find all fruit-bearing trees of a minimum age and spawn unripe fruit on them", or "every 15 seconds find all poisoned characters and deduct 1 health point"

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close