Re: performance concerns (again)

2009-06-05 Thread Jonah Benton
Hi Robert, I haven't been able to dig into Clojure/JVM/GC details, so I can't speak in particular about problems e.g. with the ants application, but there are few useful conclusions that one can draw from a JVM's RSS and VIRT. It's unfortunate, but in general, Java app memory behavior can't be re

Re: performance concerns (again)

2009-06-06 Thread Jonah Benton
RSS is "resident set size"- as I recall from the days when I compiled my own kernels, it's based on a lazily-maintained not-guaranteed-to-be-accurate count of physical memory pages "in use" by the process. On linux, this number may overstate memory use by 50% or more for non-JVM processes. For JVM

Re: performance concerns (again)

2009-06-09 Thread Jonah Benton
Snippets responded to below... On Mon, Jun 8, 2009 at 5:43 PM, Robert Lehr wrote: > > I executed a simpler test in Java only, one that prints a simple > "Sleeping 30sec" message then sleeps for 30sec.  The 30sec delay is so > that I can record the memory allocated by JVM. > >    * on a Windows XP

Re: Mnesia like?

2009-06-16 Thread Jonah Benton
Another schemaless db is mongo: http://www.mongodb.org It's written in c++, so it's out of process, but using the java driver is pretty natural: http://www.mongodb.org/display/DOCS/Java+Tutorial On Tue, Jun 16, 2009 at 3:24 AM, Wilson MacGyver wrote: > > Sorry I wasn't very clear. What I mea

Re: Mnesia like?

2009-06-16 Thread Jonah Benton
Ah, that looks very nice... On Tue, Jun 16, 2009 at 1:19 PM, Jim Menard wrote: > > On Tue, Jun 16, 2009 at 9:26 AM, Jonah Benton wrote: >> >> Another schemaless db is mongo: >> >> http://www.mongodb.org >> >> It's written in c++, so it's ou

Re: [OT] Convincing others about Clojure

2009-06-25 Thread Jonah Benton
FWIW, two points- Paul Graham, among others, has talked about issues like this. See for instance (about Python): http://www.paulgraham.com/pypar.html The argument about using new technologies in the startup context is generally that smarter people want to work with better tools at higher levels

Re: Interest in creating a NYC Clojure user group?

2009-06-30 Thread Jonah Benton
Not sure if I could make it on a regular basis, but on a related note, those in NYC may be interested in: http://bits.blogs.nytimes.com/2009/06/29/new-york-city-starts-contest-for-big-apple-apps/?ref=technology Could be an interesting use case for clj + cloud resources On Thu, Jun 4, 2009 a

Re: "I don't feel the absence of a debugger, because I've learnt enough that I don't ever need a debugger."

2013-05-27 Thread Jonah Benton
I just watched that video and interpreted it to mean that of the many strategies available to understand problematic behavior in a live app: * reading the code offline + sufficient hammock time * reproducing the problem offline using test cases in an appropriate simulation environment * appropriat

Re: lazy seq termination

2013-05-28 Thread Jonah Benton
Try: (defn fetch-atom-feed "Returns a list of ATOM chunks from the feed-url going back to the from-date" [feed-url] (if-let [chunk (fetch-atom-chunk feed-url)] (cons chunk (lazy-seq (fetch-atom-feed (:HREF (:PREVIOUS_LINK chunk))) On Tue, May 28, 2013 at 6:30 AM, mond wrote: >

Re: core.async: async java.jdbc

2013-08-01 Thread Jonah Benton
These are interesting code listings and questions, but they conflate the syntactic detail that core.async's go is implemented as a macro, with the semantic intention to support designs around lightweight data flow between independent code blocks. It might be of value to check out Go, the language,

Re: Lazy group-by for sorted maps?

2013-08-12 Thread Jonah Benton
Sounds like a job for partition-by: http://clojuredocs.org/clojure_core/clojure.core/partition-by On Mon, Aug 12, 2013 at 1:55 PM, Colin Yates wrote: > Is there such a thing as a lazy group-by for a sequence of elements when > the elements are sorted on the criteria used to group them? I can

Re: (newbie-ish) Modelling question - multi methods?

2013-08-12 Thread Jonah Benton
It sounds like it depends on whether the collaborators are properly known to the command, e.g. at command generation/creation time, or to the handler, e.g. at handler creation/registration time. If the former, then it would make sense for each command to be a record that was created with all requi

Re: idiomatic use of Stuart Sierra's component

2015-03-02 Thread Jonah Benton
Hi Colin, for me this is usually an Invented Here/Not Invented Here question. When I'm inventing a thing with state and a lifecycle I'll define it as a Record and slap the Lifecycle protocol implementation onto it. I'd do that with your Registry. When I'm using a thing someone else made, usually

Re: Idiomatic way to co-ordinate 'disconnected' services into a single transaction (ala Spring's @Transactional functionality)?

2015-03-05 Thread Jonah Benton
Hi Colin, Another option, other than HOFs or dynamic binding, is what might be called a data flow approach. At the edge of the application are the functions that explicitly take parameterized resources to perform edge state IO. These might be bare functions, or they might be protocol implementati

Re: Idiomatic way to co-ordinate 'disconnected' services into a single transaction (ala Spring's @Transactional functionality)?

2015-03-05 Thread Jonah Benton
n needs to reach out to > a repository to make a decision - how does that fit in with the data > flow approach? > > > On 5 March 2015 at 13:39, Jonah Benton wrote: > > Hi Colin, > > > > Another option, other than HOFs or dynamic binding, is what might be > called >

Re: Idiomatic way to co-ordinate 'disconnected' services into a single transaction (ala Spring's @Transactional functionality)?

2015-03-05 Thread Jonah Benton
the data flow, rather than relying solely on the call stack. On Thu, Mar 5, 2015 at 9:39 AM, Colin Yates wrote: > Sounds interesting - are there are instances that I can look at? > > On 5 March 2015 at 14:15, Jonah Benton wrote: > > Yes, exactly. > > > > That

Re: Idiomatic way to co-ordinate 'disconnected' services into a single transaction (ala Spring's @Transactional functionality)?

2015-03-05 Thread Jonah Benton
h it is less "native" to the JVM one can imagine a data flow "compiler" that makes it a little friendlier. > Thanks for the time to respond and these questions are those of > clarity not criticism :). > > Of course! > > On 5 March 2015 at 16:45, Jonah

Re: Composing Stuart Sierra's components

2015-03-11 Thread Jonah Benton
Hey Colin, it sounds like: * if the 2 systems really can't function without each other, and their start/stop lifecycles are tightly bound, then somehow they have to be merged into a single system or * if the 2 systems can't be merged into a single system because of true functional or lifecycle i

Re: timbre logging, java libs

2014-07-23 Thread Jonah Benton
Sean Corfield has a great example of writing a log4j logging backend in clojure: http://corfield.org/blog/post.cfm/real-world-clojure-logging On Tue, Jul 22, 2014 at 6:17 PM, Brian Craft wrote: > Is there any good way to use timbre in a project with java libs, e.g. > c3p0, that use java log

Re: Compilation failure to reject arguments matching formal parameters

2014-08-15 Thread Jonah Benton
Hi Dave, Somewhat related: I've been looking at Prismatic's Schema [1] along with ordinary pre and post conditions to apply stricter runtime controls on suites of functions that take and return maps: user=> (require '[schema.core :as sc]) nil user=> (def FooIn "FooIn must have a string at :bar,

Re: Is Clojure a language for growth?

2014-08-20 Thread Jonah Benton
To add a data point to this, while the technology is great, it is not necessarily right for all companies at all lifecycle stages. My experience has been that C++ skills and interests don't necessarily translate directly to Clojure. The kinds of microdecisions one makes in modeling, algorithm desi

core.async buffered channel behavior

2018-06-26 Thread Jonah Benton
Hi folks, It's been a while since I've used core.async. Documentation suggests that (chan n) where n is a number creates a fixed size channel buffer supporting n elements. The below clj repl session seems to indicate that I can put 4 items into a 3-sized buffer: user=> (def c (async/chan 3)) #

Re: [ANN] cpython bindings for clojure

2019-06-05 Thread Jonah Benton
Wow, that is incredibly cool. Eager to check it out. On Wed, Jun 5, 2019, 12:41 PM Chris Nuernberger wrote: > Good morning Clojurians, > > About 2 months ago during a talk about the tech.ml systems the point was > made that if we could load the python C libraries then that would provide > us wi

Re: Debugging idea for a constrained situation

2016-01-21 Thread Jonah Benton
If you're in a place where you're hunting for major architectural patterns to consider in what could amount to a rewrite, well, certainly there is no free lunch. But the pattern you mention- capturing external event history- is in the vein of Event Source systems http://martinfowler.com/eaaDev/Eve

Re: Core functions for searching lists of values

2016-01-27 Thread Jonah Benton
Hey cycl...@speakeasy.net, Jay's excellent main point is really about the use of anonymous functions- that in many cases it's an anti-pattern. Having a name for every function means that those functions become testable and that code consuming those functions stays readable. Another point is that

Re: Command Interpreter in Clojure?

2016-02-16 Thread Jonah Benton
Hey Nick, tools.cli is great for interpretation of command line arguments to a program; to actually provide a user with your own limited-functionality shell, take a look at wrapping JLine: https://github.com/jline/jline2 along the lines of what Reply did: https://github.com/trptcolin/reply/tree/

Re: Datascript return values

2016-02-16 Thread Jonah Benton
Hey Derek- Your datascript query is actually returning a set- syntax is #{}- of array elements, also called "tuples". You can treat the set as a sequence, use doseq to visit each item, and destructuring on the items to assign individual array/tuple members to symbols. For instance, say that each

Re: [Help] core.async and jetty

2016-02-23 Thread Jonah Benton
Hi Miguel- pipelining is essentially http keep alive. A very old jetty thread http://jetty.4.x6.nabble.com/HTTP-1-1-Request-Pipelining-handling-td18682.html indicates that for simplicity jetty will execute subsequent requests on the kept-alive socket serially. Jonah On Mon, Feb 22, 2016 at 3:3

Re: Similar lisps and emacs reimplementations?

2016-03-19 Thread Jonah Benton
I definitely don't want to get into a pointless legal discussion! Obviously everyone's situation- and legal interpretation thereof- is different, yadda yadda. Will just say in passing having gone through the language of the EPL and other licenses with IP lawyers on a few separate occasions over th

Re: 56 second GC on Heroku - seems a bit long

2014-06-17 Thread Jonah Benton
Some good tactics at bottom: https://blogs.oracle.com/poonam/entry/troubleshooting_long_gc_pauses On Tue, Jun 17, 2014 at 9:38 AM, Brian Marick wrote: > > On Jun 16, 2014, at 2:57 PM, Daniel Compton > wrote: > > > You didn't mention whether this was on the free tier or a paid dyno. I > woul

Re: Building Trees

2013-09-16 Thread Jonah Benton
I find your description interesting but I'm confused about what the actual underlying problem is- is indexing and searching for data in documents involved, or is that just an example? If the real problem is about augmenting large document data set searches with potentially relevant taxonomic or sem

Re: Lifecycle Composition

2013-09-22 Thread Jonah Benton
Hi Murtaza, The short answer is that it's not necessarily that there are pros or cons between having components know about each other in their "constructed" vs "started" forms- it's that immutability imposes limitations in the way that components can maintain local references to other components

Re: structuring a db load, back pressure

2013-10-22 Thread Jonah Benton
I tend to think of pull operations in these situations. So perhaps wrap a lazy sequence around a chunked form of the read + transform operation, perhaps parallelizing the transform, and do the insert in a doseq on the lazy sequence? On Tue, Oct 22, 2013 at 8:03 PM, Brian Craft wrote: > I'm do

Re: How to handle configuration in Clojure?

2014-01-13 Thread Jonah Benton
A middle ground between dynamic vars and passing state through functions that themselves don't need it, but which is needed by functions they call, is to build on top of defprotocol and defrecord, to refactor so that the functions that need "configuration" state in their operations are defined by p

Re: oob schemas, re: The Language of the System

2014-01-19 Thread Jonah Benton
I read these self-describing, extensible points in the context of EDN, which has a syntax/wire format for some types- maps, strings, etc- and also has an extensibility syntax: #myapp/Person {:first "Fred" :last "Mertz"} These tagged elements are "extensions" because they allow values of types not

Re: OOP question re: The Language of the System

2014-01-19 Thread Jonah Benton
I'm curious for the response re: #3 as well, but one pain point I've experienced with protocols vs multimethods is that as a system evolves, retaining the semantics that led me to bundle functions together into a protocol in the first place has sometimes been difficult, a source of incidental compl

Re: OOP question re: The Language of the System

2014-01-19 Thread Jonah Benton
Will just add, in re: an earlier thread on this talk, one way to view this is in re: the lifespan of the data. Building and evolving the components that deal with live data passed around between them is easier and more fluid when working with maps than with working with types. One can add a field

Re: How does clj-http work regarding https?

2013-02-23 Thread Jonah Benton
Try adding :insecure? true to the map. Charles dynamically generates a cert pretending to be the target host when acting as an ssl proxy, and clj-http probably has to be told to accept it. On Sat, Feb 23, 2013 at 4:18 PM, larry google groups < lawrencecloj...@gmail.com> wrote: > > This might

Re: How does clj-http work regarding https?

2013-02-23 Thread Jonah Benton
ocations" > > And I've made the change you suggested, but I still see that message. > > > > On Feb 23, 5:24 pm, Jonah Benton wrote: > > Try adding > > > > :insecure? true > > > > to the map. Charles dynamically generates a cert pretending to b

Re: How does clj-http work regarding https?

2013-02-23 Thread Jonah Benton
erstand what you are > > telling me. Are you saying that clj-http won't send its POST if it > > feels the cert is false? > > > > Charles has consistently said, in each report, "SSL Proxying not > > enabled for this host: enable in Proxy Settings, SSL locat

Re: How does clj-http work regarding https?

2013-02-23 Thread Jonah Benton
oogle groups < lawrencecloj...@gmail.com> wrote: > > Very likely it's the automatic retry logic: > > > Thank you for that. One mystery solved. I wonder why it retries? The > ping reaches Omniture, I get back a 401 error. Maybe it retries on any > 4xx error? >

Re: How does clj-http work regarding https?

2013-02-23 Thread Jonah Benton
here: > > > > http://www.charlesproxy.com/documentation/proxying/ssl-proxying/ > > > > > Thank you, that is a huge help. > > I am finding it is a real headache to use several new technologies, > all at once. > > > > > On Feb 23, 6:28 pm, Jonah Benton wrote: > > O

Re: Opinion on testing strategies?

2013-04-07 Thread Jonah Benton
The feedback that comes immediately to mind: * it sounds like property #3 complects black box vs white box and specification vs implementation concerns * it sounds like the feature functions potentially combine the state and calculation layers in ways that should be internally reused, but also are

Re: Idea for personal Clojure project

2010-07-29 Thread Jonah Benton
As others have said, there isn't an algorithm that does this. Useful results depend on precise definitions of "context" and "similarity." The waters get deep quickly. As a clojure exercise, though, there are lots of good starting points. For instance: get a set of words, create all pairs from the

Re: Libraries and build management hell

2011-07-29 Thread Jonah Benton
Re: > > Hopefully some bright spark will come along and revolutionise dependency > management, like how Rich revolutionised the notion of state in > programming.  As far as I'm aware nobody has so far, for any programming > language (or OS distro), I'm not completely happy with any of them. > > It

Re: Attractive examples of function-generating functions

2012-08-09 Thread Jonah Benton
You've probably seen these, but if not, Doug Crockford's video series on javascript walks through a number of interesting information sharing examples like the ones you're looking for using fn-generating-fns- http://yuiblog.com/crockford/ They're all great but "act 3 - function the ultimate" is e