Re: ANN: durable-persistence for Clojure and ClojureScript

2016-09-08 Thread dgrnbrg
This sort of thing is also the goal of Datacrypt & Hitchhiker trees (https://github.com/datacrypt-project/hitchhiker-tree), which are designed to be highly optimized for I/O. We've been making progress on the GC and adding new backends--it would be awesome to be able add a CLJS port too :)

Re: Datomic namespaced idents question

2015-04-05 Thread dgrnbrg
Actually, in Datomic, the namespaces don't have any special meaning for the database itself--you can choose to use whatever namespace (or even no namespace)! Using namespaces is a convention to help you keep track of which attributes belong to which entities. We don't use a separate model

Re: [ANN] ring.middleware.logger - Easy Ring Request Logging

2014-10-02 Thread dgrnbrg
These are very useful! Thanks! On Wednesday, October 1, 2014 10:12:06 PM UTC-4, Paul Legato wrote: I'm happy to announce ring.middleware.logger https://github.com/pjlegato/ring.middleware.logger, which logs details of each Ring request to a file, or to arbitrary functions you provide. The

Re: [ANN] Async Ring 0.1.0

2014-09-10 Thread dgrnbrg
Hi Paul, Thanks for your feedback! I updated the comparison with pedestal when discussing the async queues to address this point. I am also really excited about Jet--I think that it would be a great combination with Spiral! One key difference in Spiral from Jet and Pedestal is that not only

Re: [ANN] Async Ring 0.1.0

2014-09-09 Thread dgrnbrg
quality-of-server router - Integration with Jetty and Http-Kit, more coming - Documentation and Examples Take a look here: https://github.com/dgrnbrg/async-ring Feedback and pull requests welcome! -- You received this message because you are subscribed to the Google Groups

Re: Strange behavior with alts! and :default in core async

2014-08-15 Thread dgrnbrg
before any operation happens)? On Friday, August 15, 2014 8:35:05 AM UTC-4, Daniel Solano Gómez wrote: On Thu Aug 14 19:04 2014, dgrnbrg wrote: You're all right--that was a cut paste error. I meant that I see this behavior with alt!!, not alts! With alt!!, it should probably be something

Strange behavior with alts! and :default in core async

2014-08-14 Thread dgrnbrg
When I use alts!, it seems that both the put and :default action run every time. I've included the code sample below: (let [inner-chan (async/chan (async/buffer 1000)) mult (async/mult inner-chan) (async/thread (while true (let [e (.take linked-blocking-queue)]

Re: Strange behavior with alts! and :default in core async

2014-08-14 Thread dgrnbrg
questions. Eric On Thursday, August 14, 2014 11:03:01 AM UTC-5, dgrnbrg wrote: When I use alts!, it seems that both the put and :default action run every time. I've included the code sample below: (let [inner-chan (async/chan (async/buffer 1000)) mult (async/mult inner-chan) (async

Re: http-kit AsyncChannel and clojure.core.async.impl.channels.ManyToManyChannel

2014-05-06 Thread dgrnbrg
The core of the matter is that http-kit's async channels are these: https://github.com/http-kit/http-kit/blob/master/src/java/org/httpkit/server/AsyncChannel.java And core.async's are these:

Re: Sliding Windows

2014-04-30 Thread dgrnbrg
We've had lots of luck with Narrator: https://github.com/ztellman/narrator It's got loads of powerful features, including realtime batch mode, integration with core.async and lamina, windows, functions, and recursive analyses. On Tuesday, April 29, 2014 10:25:39 PM UTC-4, Paulo Suzart wrote:

ANN Major breaking public API changes coming to several ClojureWerkz projects

2014-04-27 Thread dgrnbrg
Is this slated for Welle too? I didn't see it mentioned. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first

Re: dependencies from github

2014-03-27 Thread dgrnbrg
Voom is a Lein plugin that lets you depend on a repository and pins you to a specific commit. It also provides tools manage systems spanning multiple repos. You can find it here: https://github.com/LonoCloud/lein-voom and see the video from clojure/west here:

[ANN] Kria, an async driver for Riak 2

2014-03-07 Thread dgrnbrg
This is really exciting! One question I have is how mature is Kria? Given that riak 2 isn't yet out, I'm still curious as to what kinds of testing/burn in you've done? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email

Re: [ANN] lein-modules 0.1.0 - multi-module support in Leiningen

2014-02-10 Thread dgrnbrg
Could you compare lein-modules with lein-voom? I can see that they have different features, but I'm trying get a handle on when each might be appropriate. This looks like a great tool for large projects. Thank you! On Monday, February 10, 2014 9:36:13 AM UTC-5, Jim Crossley wrote: Maven

Re: data-readers, spyscope

2014-02-01 Thread dgrnbrg
#'spyscope.core/print-log} user= #spy/d (println hi) #RuntimeException java.lang.RuntimeException: No reader function for tag spy/d On Saturday, February 1, 2014 8:12:53 AM UTC-5, Dave Tenny wrote: Java 1.7.0.45 Lein 2.3.4 Clojure 1.5.1 I'm trying to use https://github.com/dgrnbrg/spyscope and have

Re: clojure debugging repl

2014-01-24 Thread dgrnbrg
I have an implementation of this that's thoroughly integrated into vim. clojure code: https://github.com/dgrnbrg/redl vim plugin: https://github.com/dgrnbrg/vim-redl The code itself is written with core.async, and is capable of monitoring a thread, inspecting its stack while its running

Re: Looking for a reference binary parsing

2014-01-24 Thread dgrnbrg
I have found Gloss to be a pleasure to work with, and the fact that it handles framing, arbitrary header logic, and streaming decoding made it the best choice when I was writing codecs for binary formats whose files didn't/needed to be streamed, rather than bulk-loaded. On Friday, January 24,

Re: .cljrc

2013-11-25 Thread dgrnbrg
Another great feature of Leiningen is the :injections key in project.clj. This lets you run arbitrary code on the Leiningen-managed JVM startup. I recommend this when using Spyscope, which is a debugging tool that only needs to be required before you can use it: https://github.com/dgrnbrg

How to use core.cache to store the results of expensive computations?

2013-10-25 Thread dgrnbrg
I've been looking through examples of usages of core.cache, and I have not been able to understand how to make a ref or atom backed cache that offers a simple API to the application programmer: I want to provide a key and a thunk, and have the cache either return me the cached value (if it's in

Re: Graph API

2013-06-17 Thread dgrnbrg
I think that there's already a project working on this called Loom. The furthest-developed fork is here: https://github.com/aysylu/loom which appears to have protocols for graphs, bindings to Titanium (the Clojurewerkz graph DB library), visualization support, and implementations of several

Re: Clojure in production

2013-06-13 Thread dgrnbrg
We are using Clojure at Two Sigma to monitor, schedule, and optimize our cluster. On a related note, we're hiring: http://functionaljobs.com/jobs/149-distributed-systems-developer-at-two-sigma-investments On Monday, June 10, 2013 5:47:25 PM UTC-4, Plinio Balduino wrote: Hi there I'm

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-31 Thread dgrnbrg
I'd like to point out a similar library I wrote for Clojure called spyscope: https://github.com/dgrnbrg/spyscope With spyscope, you can write a handful of characters and get the stack frame, form, and its value pretty-printed and logged to a queue for future querying. On Thursday, May 30

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-28 Thread dgrnbrg
the thinking a lot more productive. Elsewhere on this thread: On May 27, 2013, at 9:36 PM, dgrnbrg wrote: For Vim users, I ported the debug repl. This is a tool that allows you to create a REPL in the middle of the call stack, which allows you to suspend the evaluation of functions, lazy

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 dgrnbrg
, then you just need add the vim plugin and include redl in your project.clj, and use :Repl or :ReplHere to create a repl, and then use redl.core/break and redl.core/continue to use the debugger. You can find the vim component here: https://github.com/dgrnbrg/vim-redl and the Clojure component here

Re: ANN: vim-redl -- advanced fuzzy omnicompletion and VimClojure-style repl with enhanced debugging features

2013-04-04 Thread dgrnbrg
You there are plug mappings for all the repl actions: Plugclj_repl_enter. -- key for enter press Plugclj_repl_eval. -- key to for evaluation in the middle of the repl (i.e. not at the end of the form) Plugclj_repl_hat. -- equivalent to ^ Plugclj_repl_Ins. -- equivalent to I Plugclj_repl_uphist.

How to import classes from a runtime-defined ClassLoader?

2013-02-27 Thread dgrnbrg
I am trying to include some Groovy code at runtime, which is already on the JVM's classloader path. I have succeeded in setting the groovy.lang.GroovyClassLoader with Clojure's classloader as the Thread's contextClassLoader, but I'm having troubling getting (import ...) to work. I discovered

Re: `let` to automatically add metadata / fn names?

2013-02-11 Thread dgrnbrg
vary-meta slipped my mind! I've updated the gist to include it. The reason I check for IObj and IMeta is that I want symbols and other custom deftypes to recieve the metadata as well. I thought about namespacing the let-names, but for my current purposes I don't need that extra data (although

Re: `let` to automatically add metadata / fn names?

2013-02-10 Thread dgrnbrg
I've written an implementation of this here: https://gist.github.com/dgrnbrg/4751473 It does incur a 2 instance check penalty (the branches should be 100% predictable, and never hurt in practice). I'm not sure if I could use protocols to further reduce the cost of the check. I've already put

Re: `let` to automatically add metadata / fn names?

2013-02-08 Thread dgrnbrg
I would find this very useful in several projects I'm working on, where the library would be able to give better information on where the error is in the user's code if this metadata was available. On Friday, February 8, 2013 12:18:54 PM UTC-5, vemv wrote: Given that: a) fns can have names

Re: SIGBUS : A fatal error has been detected by the Java Runtime Environment

2013-01-28 Thread dgrnbrg
I've encountered errors like this when running where .jar files for the project were being loaded from an NFS share. Do you have that in your environment? The solution is to load the .jars from a local directory instead. On Monday, January 28, 2013 12:59:12 PM UTC-5, larry google groups wrote:

Re: What would you use a #[] data literal for?

2012-12-30 Thread dgrnbrg
You can also patch the LispReader in jvm Clojure without dropping to Java. Here's an example of that to add a #b reader literal: https://github.com/dgrnbrg/piplin/blob/master/src/piplin/types/bits.clj#L216 On Sunday, December 30, 2012 7:38:44 AM UTC-6, Ambrose Bonnaire-Sergeant wrote: Jozef

Re: Need ideas for carving project into namespaces

2012-12-13 Thread dgrnbrg
have used a few techniques to tie together all the disparate files. I have an approach for vars/fn from other namespaces, even if they're dynamic, and organization/readability in the face of a large API. You can find that here: https://github.com/dgrnbrg/piplin/tree/master/src/piplin On Thursday

Re: ANN: Guzheng 1.2.5

2012-10-26 Thread dgrnbrg
Tassilo: I've incorporated this fix and rereleased as [lein-guzheng 1.4.4] (which will automatically pull in the latest guzheng). Ambrose: Guzheng works by instrumenting all code just before it's eval'ed, using Zach Tellman's sleight library, which is essentially a way to do whole program

Re: Using gen-class to generate methods with same names and arities but different type signatures

2012-08-03 Thread dgrnbrg
I ended up digging deep through gen-class, and I learned about an interesting, undocumented feature that solves this problem: You can, in fact, overload methods of the same arity on type, and here's how: Each method you define in gen-class tries to lookup a corresponding var in the impl-ns of

Re: how do I get primitive typ hints to appear in the output of a macro?

2012-07-18 Thread dgrnbrg
I don't think that the type hint will appear in the printed output. It is metadata, so it won't be shown by the printer. If you try (let [[_ _ [b] (macroexpand-1 '(aTest))] (meta b)) you should see {:tag long}. On Wednesday, July 18, 2012 7:55:31 AM UTC-4, john wrote: Hello, how do I get

Re: docstrings of if-let and when-let incorrect

2012-05-16 Thread dgrnbrg
I too assumed that if/when-let would support multiple bindings, short- circuiting if one failed, when I started learning Clojure. It seems that short-circuiting multiple bindings isn't surprising. On May 16, 10:56 am, Jay Fields j...@jayfields.com wrote: I've also attempted to use if/when-let

Re: IllegalStateException in ns macro

2012-05-07 Thread dgrnbrg
The :refer-clojure clause has fixed my problem; however, I have 22+ symbols that I need to exclude in every namespace. Is there a way that I can ease this exclusion, as this code is a library that I'll be including in numerous files (and I'd like to have a form to simplify using it). I am not

Re: New release of Paredit mode for Vim with support for VimClojure repls and Map literals

2012-04-24 Thread dgrnbrg
now:https://bitbucket.org/kovisoft/paredit Also, there have been several important bug fixes applied to paredit in the last few months. It would be great if any improvements you've made could make it back into the official version. Dave On Sun, Apr 22, 2012 at 10:24 PM, dgrnbrg

Re: New release of Paredit mode for Vim with support for VimClojure repls and Map literals

2012-04-22 Thread dgrnbrg
.  The Greenberg version looks like it is based off a version that was forked off from Kovacs vesrion version 0.8.0 from April 2011. Have any of the differences between 0.8.0-0.9.3 been merged into this branch? On Wednesday, April 18, 2012 9:41:05 PM UTC-7, dgrnbrg wrote: Paredit mode

Re: New release of Paredit mode for Vim with support for VimClojure repls and Map literals

2012-04-22 Thread dgrnbrg
I am having trouble porting my simple VimClojure support with the version 0.9.6 of the script. The integration w/ slimv's REPL appears to have increased. I'm not sure what the best course of action is, since I don't really want to continue trying to merge the codebases, and instead just fix any

Re: Persistent collections and garbage collection

2012-02-09 Thread dgrnbrg
It seems to me that a generational collector would have problems collecting Clojure's garbage production pattern. Luckily, the oracle/ hotspot jvm has a continuous collecting compacting GC called G1. That should mitigate oldspace collection latency spikes. Enable with -XX: