Fork me on GitHub

I'm working on hosting a static website on S3 but having issues with the DNS settings. Is anyone familiar with S3


I got the CNAME host as www and the value as the bucket endpoint but it's not working.


I work with a fairly large java JEE app running on WebLogic, and I hope to be able to use Clojure. It is not possible to move the app to Clojure even if I want to. So one possibility is to start with implementing some functions in Clojure library, and have the java app use this library.


Are there any Clojure libraries which are specifically built to be called from Java?


Or are there examples of Java programs using Clojure libraries or functions?


@saicheong: Haven't done it yet but I'd suggest starting here: Looks like you just need to package it in a certain way for it to be used.


@saicheong: We use a mixture of Clojure invoked via and AOT-compiled Clojure that we call just like a "native" Java library. You only need to AOT-compile your Clojure library’s "interface" namespace — you can let it call into the rest of your Clojure code and compile-on-demand when it loads.


@grounded_sage: check out this: — should get you going with minimal effort for static sites on S3


So this is kind of a generic question and may be applicable beyond clojure to any FP, but does anyone have book recommendations related to Clojure and FP? I've worked through Brave Clojure (awesome intro to the language, thanks Dan!), been using Sotnikov's Web Development in Clojure as a reference. Unboxed Okasaki's Purely Functional Data Structures from AMZN not 10 minutes ago. Does anyone have other books on clojure specifically or functional programming more generally that they would recommend? And as a corollary, any recommendations on how to read specific books in terms of ordering within or between books or organizing related work?


@bwstearns: the joy of clojure ( is also excellent. really nice complement to brave clojure with some more meaty examples


if you’re up for diving through something like okasaki, you might also really appreciate SICP


Good call. I unfortunately have a herd-acquired aversion to SICP because I hear how much discipline it requires but now that I'm actually using a lisp anyways I suppose I really should just buckle down and do it.


there was also a list of books on amazon of all the texts that had a pretty large impact on rich hickey’s design of clojure. unfortunately the link seems to eb broken:


Ah bummer. Just tried to get a cached version but Amzn must have it set up so google doesn't cache 😕


maybe internet archive?


I think a lot of how difficult sicp is depends on how deeply you dive into the exercises. I’ve found it pretty readable as long as you take it in regular small doses.


ok so marathon not sprint with SICP. Mind me asking how long it took you at approx what pace?


hah still working through it – about 2/3rds of the way through and it’s taken me a couple of months


I just try and get in 5-10 pages a day a few times a week. as long as you enjoy the journey and don’t try to get to the end as quickly as possible it’s not that much of a slog.


haha nice. ok that doesn't sound too traumatizing then.


yeah really wish that clojure bookshelf link was up. so disappointing – it had a ton of stuff. maybe someone copied it over to a blog


I found an HN discussion but unfortunately no one copied it down.

Chris O’Donnell18:03:56

@bwstearns: I found Applied Clojure to be extremely useful for learning how to design nontrivial applications


that has most of them that I can remember seeing


@codonnell: thanks for that. Definitely running into those kinds of questions especially about state management. On the cljs side it seems like the idea is to use the "big atom" pattern (anyone else can't help but hear the "big board" from dr strangelove?).


@mss thanks! That looks like an awesome list. Blog posts are awesome (and to all who publish them thank you so much) but in general I find if someone went through the trouble to kill a tree over it then there tends to be more learning per page especially when you don't precisely know what you're trying to know.


so I’m newish to jvm clojure and the java ecosystem. I’m wondering how best to structure the following given clojure’s concurrency primitives.


I have a non-thread safe, stateful object that manages a connection to an outside service. that object generates work to be done, which needs processing, and then that stateful object needs to send information to the outside service about that accomplished processing.


I’m wondering especially how something like that would fit into an application built around component


would I give that stateful object its own thread? if so, what’s the best way to communicate bidirectionally between the polling thread and the processing thread in a thread-safe way?


the first avenue I tried (before I knew more about the nature of the problem) was just throwing the object in a core.async pipeline inside a go-loop. that pretty quickly led to a ConcurrentModificationException


apologies if that’s a pretty simplistic question

Chris O’Donnell19:03:54

@mss: You could connect your object to the processor with a channel. Whenever it generates work, it puts that work into a channel which your processor consumes from. When your processor has finished processing, it sends the result into a channel which your object consumes.


awesome, I didn’t realize channels were thread-safe


that does make a lot of sense


thanks for the suggestion


@mss: so it didn't occur to me that the examples in Okasaki were in a language that I wouldn't have had any experience with. Now several hours after opening the book am on page 3 and I'm midway through learning basic ML. Do you ever feel like a slow biological build system?


ML is a nice language


It looks lovely. I know some Haskell so it's not totally as foreign as I joke, but I thought someone might get a giggle out of the idea.


the one thing that is freaking me out a bit wrt ML (using OCaml so maybe it's not the same in other MLs) is the whole no overloaded operators thing (+ vs +.), but it seems like that might just be ML's version of parentheses in that they're ugly for 30 minutes before you stop noticing them.


yeah, everytime I look at Scala I get so upset, because they could have been a good ML implementation on the jvm, but they over complicated it


yeah, OCaml has some weird syntax


UTop though is AWESOME. I want one for clojure/it seems like it'd be fun to make


I lean more towards SML


I'd like to pass a string to cloure.xml/parse. How do I make an InputStream out of a string?


Uhm, but probably passing a string is not a good idea, I'll better hang to the original byte stream.