newbie question on agent/transaction

2015-07-15 Thread William la Forge
On this page http://clojure.org/agents I read the following: "Agents are integrated with the STM - any dispatches made in a transaction are held until it commits, and are discarded if it is retried or aborted." So there must be a way to tell if a dispatch is made from within a transaction.

Re: newbie question on agent/transaction

2015-07-15 Thread William la Forge
Thanks, Ragnar. My reason for asking is that I've implemented a robust form of actor in Java https://github.com/laforge49/JActor2 and want to play with a simplified version in Clojure as a first project in the language. But I'm just hardly getting started. I've only been looking at Clojure for

Re: newbie question on agent/transaction

2015-07-15 Thread William la Forge
Or perhaps find a way to extend agents. hm? On Wednesday, July 15, 2015 at 9:45:29 AM UTC-4, William la Forge wrote: > > Thanks, Ragnar. > > My reason for asking is that I've implemented a robust form of actor in > Java https://github.com/laforge49/JActor2 and want to play

Agent order of message processing

2015-07-18 Thread William la Forge
I've been working with agents and it looked like messages are often processed in the reverse of the order received. I checked http://clojure.org/agents and confirmed that "Actions dispatched to an agent from another single agent or thread will occur in the order they were sent, potentially inte

Re: Agent order of message processing

2015-07-18 Thread William la Forge
Oh, I could be all wet about the code. It is probably a ring being used to create an immutable queue. I'm going to need to think about that some more. Not sure at all why my tests are showing old values being returned after an update. Some volatile issue? I've got some cheats in my code that I t

Re: Agent order of message processing

2015-07-19 Thread William la Forge
The code for actor looks very different this morning. Obviously an immutable queue is being used. On Sunday, July 19, 2015 at 2:12:43 AM UTC-4, William la Forge wrote: > > I've been working with agents and it looked like messages are often > processed in the reverse of the ord

Re: clojure.edn/read isn't spec compliant

2020-10-17 Thread William la Forge
My understanding is that run-time validation is often left weak in preference to speed of execution. In contrast to validation by the "compiler". Thus clojure throws many more exceptions than does the edn reader. --Bill la Forge On Friday, October 16, 2020 at 9:07:40 PM UTC-4 EuAndreh wrote: >

Re: What are resources to learn Clojure for beginners in Programming and get better?

2021-11-03 Thread William la Forge
This may seem silly at times, but I think very highly of it as a starting point: https://www.braveclojure.com/ Also, I suggest that you shift approaches from time to time. Clojure is unbelievably rich and supports programming methodologies that you've never hear of, as well as all the ones you

Re: What is this notation? "-a"

2021-12-26 Thread William la Forge
https://stackoverflow.com/questions/10846423/is-there-a-clojure-convention-for-naming-private-functions/10853372 On Saturday, December 25, 2021 at 6:53:56 PM UTC-5 hank@gmail.com wrote: > Hello -- > > Sometimes I see a notation that uses a prefix "-", as in: > > user> (def -a (atom [])) > #'u

Hoplon with websockets

2016-08-05 Thread William la Forge
I've added a new demo to hoplon which uses sente websockets in place of castra: https://github.com/hoplon/demos/tree/master/ws-simple#readme The demo is similar to the castra-simple demo, where the client requests and then displays a series of random numbers that are generated by the server. Th

Re: Hoplon with websockets

2016-08-07 Thread William la Forge
A little documentation never hurt: https://github.com/hoplon/hoplon/wiki/Hoplon-with-Sente On Friday, August 5, 2016 at 4:48:04 PM UTC-4, William la Forge wrote: > > I've added a new demo to hoplon which uses sente websockets in place of > castra: https://github.com/hoplon/demos/

Re: core.async top use cases

2016-09-19 Thread William la Forge
The really nice thing to me is that async handles side-effects while agents do not. -- 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

Re: core.async top use cases

2016-09-20 Thread William la Forge
My bad. I was thinking of atomic. Swap! doesn't work with side effects, but send does. On Tuesday, September 20, 2016 at 2:50:53 AM UTC-4, Matan Safriel wrote: > > Thanks but I'm not entirely sure about this. I could use agents for side > effects too, or at least I thought so. Care to further cl

Re: parallel sequence side-effect processor

2016-09-23 Thread William la Forge
I've run into this when I wanted to print each item in a seq. Since println returns nil, I just did (first (keep println coll)). --Needed the first here because keep returns a lazy seq. On Friday, September 23, 2016 at 12:02:09 AM UTC-4, Mars0i wrote: > > This is almost the same as an issue I ra

Re: core.async top use cases

2016-10-13 Thread William la Forge
On Thursday, October 13, 2016 at 3:38:16 PM UTC-4, larry google groups wrote: > > So when to use agents? I've looked through Clojure repos on Github, > looking for uses of agents, and I found very few. (I was writing a blog > post about concurrency in Clojure, and I found that agents are among t

defrecord in cljc

2016-11-11 Thread William la Forge
WARNING: Protocol IPrintWithWriter implemented multiple times at line 9 src\simpleArk\rolonRecord.cljc Any ideas? (ns simpleArk.rolonRecord) #?(:clj (defrecord Rolon-record [rolon-uuid]) :cljs (defrecord Rolon-record [rolon-uuid] ;;this is line 9 IPrintWithWriter

Re: defrecord in cljc

2016-11-11 Thread William la Forge
To answer my own question, it is because IPrintWithWriter is already defined for records. Only define this with deftype. On Friday, November 11, 2016 at 3:16:46 PM UTC-5, William la Forge wrote: > > WARNING: Protocol IPrintWithWriter implemented multiple times at line 9 > src\

Re: Cyclic namespace dependencies!

2016-12-31 Thread William la Forge
I think Timothy Baldridge had a great answer. For example, I often have records which use each other's constructors. But you can put your factoy methods in a map of dependencies. I generally have a build function which takes a hash map as an argument, associates the various data and functions t

Re: Deploying multiple Clojure apps on one server using Reagent, Nginx, and Supervisor (Solved)

2017-01-02 Thread William la Forge
> > Seth, something seems amiss. 1,000 GB is 1,000,000 MB. At 84 mb per jar, >>> you can spin up 11,904 jar files. Which is worse than only being able to >>> run only dozens of PHP apps. >>> >> --b -- You received this message because you are subscribed to the Google Groups "Clojure" group. T

Is this a bug that is already fixed?

2017-02-19 Thread William la Forge
Here's my clojure data: {:local/contacts-capability contacts-capability} pr-str gives me this: #:local{:contacts-capability #uuid "--4000-8000-0003"} I pass this over to clojurescript and when I read it I get... Uncaught Error: Could not find tag parser for :local in ("sim

Re: Is this a bug that is already fixed?

2017-02-19 Thread William la Forge
> > I'll note that when I add a second entry to the map, everything is fine: > > {:fix nil :local/contacts-capability contacts-capability} -- 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

Re: Is this a bug that is already fixed?

2017-02-19 Thread William la Forge
Thanks Timothy! I found a similar issue with the same answer here: https://github.com/ptaoussanis/sente/issues/241 Closed! -- 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

Re: Is this a bug that is already fixed?

2017-02-19 Thread William la Forge
Now it gets complicated. I upgraded to the latest clojurescript. and switched to reader version 1.0.0-beta3 which holds the/a fix. No change. The bug is still present. Here's my build boot: https://github.com/rolonicArk/simpleArk/blob/master/build.boot :-( -- You received this message becau

Re: Is this a bug that is already fixed?

2017-02-19 Thread William la Forge
Upgraded clojure too and now it works. Phew! -- 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 post. To u

Re: Making a Java class implement ILookup

2017-03-01 Thread William la Forge
Alternative implementations for clojure maps are hard. You tend to use AOT a lot, which is non-idiomatic. But a number of people have done this, including myself. In retrospect, it isn't worth it. At least not most of the time. One thing that really bothers me is that Java supports subMap. And

Re: Making a Java class implement ILookup

2017-03-03 Thread William la Forge
On Friday, March 3, 2017 at 9:42:30 AM UTC-5, Ernesto Garcia wrote: > > > Can you point out to some implementation of this kind? I don't know what > you are referring to here. Would AOT compilation help in my case? > > In the clojure toolbox, the first entry under data structures is aatree: htt

(fail promise exception)

2015-08-07 Thread William la Forge
A future fails when it throws an exception. How to do that with a future? It looks like (fail future exception) does not do the trick: http://dev.clojure.org/display/design/Promises -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this gro

Re: (fail promise exception)

2015-08-07 Thread William la Forge
de, and to the wrapped promise either delivers the result of the > code or calls (fail private-promise raised-exception) for you. > > On Friday, August 7, 2015 at 2:14:30 PM UTC-5, William la Forge wrote: >> >> A future fails when it throws an exception. How to do that with a

Re: (fail promise exception)

2015-08-07 Thread William la Forge
-1.7.0/src/clj/clojure/core.clj#L6803 > > ) > > On Friday, August 7, 2015 at 4:09:39 PM UTC-5, William la Forge wrote: >> >> Sorry, I meant to ask how to fail with a promise? It seems that there is >> no fail method. >> >> On Friday, August 7, 2015 at 4:52:47

Re: (fail promise exception)

2015-08-08 Thread William la Forge
t; > http://aleph.io/manifold/deferreds.html > > > > On Sat, Aug 8, 2015 at 12:44 AM, William la Forge > wrote: > >> Still a newbie here, about to release my first Clojure project. But that >> clojure blob will take some digging on my part. I use a gummed up >

Release of agent2 for 2-way messaging

2015-08-08 Thread William la Forge
Agent2 adds non-blocking 2-way messaging to Clojure agents: https://github.com/laforge49/agent2#readme Release: https://clojars.org/org.clojars.laforge49/agent2 Feedback appreciated--this library is the first Clojure code I've written. :-) Bill -- You received this message because you a

Re: (fail promise exception)

2015-08-09 Thread William la Forge
plement your own promise type which does it for you. (It's not that hard: > https://github.com/clojure/clojure/blob/clojure-1.7.0/src/clj/clojure/core.clj#L6803 > > ) > > On Friday, August 7, 2015 at 4:09:39 PM UTC-5, William la Forge wrote: >> >> Sorry, I meant t

some guidance sought

2015-08-09 Thread William la Forge
I've done a lot with AA trees in the past, creating variations that are immutable, durable (replacing b-trees) and versioned of vectors, maps and sets. I would like to migrate these ideas from Java to Clojure, while implementing the interfaces appropriate for Clojure. Still being very much a n

Re: some guidance sought

2015-08-10 Thread William la Forge
y trees aren't very suitable for implementing as an > immutable structure because they mutate on read. > > > I guess you'll get quite exact guidelines in the various core libraries on > how to implement the Java collection methods (in general, all mutating > meth

Re: some guidance sought

2015-08-11 Thread William la Forge
bigmlcom/sketchy >>> (bloom, hyperloglog, min-distance hashing etc). Another Bloom Filter: >>> https://github.com/kyleburton/clj-bloom >>> >>> >>> It is said that splay trees aren't very suitable for implementing as an >>> immutable s

Re: some guidance sought

2015-08-16 Thread William la Forge
ed to implement Set. So there is no getting around implementing the Java interfaces. Well, I'll wrap up everything else first, I am thinking. On Monday, August 10, 2015 at 2:56:53 PM UTC-4, William la Forge wrote: > > Oh! The Java collection methods! For interop with Java, I'm guessi

IteratorSequence, dead code?

2015-08-21 Thread William la Forge
I've been using Java class ItreratorSequence in package clojure.lang. But then I noticed that this class is not referenced anywhere. Is this dead code or otherwise not supported? I had been planning on subclassing this code. -- You received this message because you are subscribed to the Google

Re: IteratorSequence, dead code?

2015-08-21 Thread William la Forge
far. But I worry about using is as a starting point since the code is apparently unreferenced. On Friday, August 21, 2015 at 6:37:48 AM UTC-4, William la Forge wrote: > > I've been using Java class ItreratorSequence in package clojure.lang. But > then I noticed that this class is not

Re: IteratorSequence, dead code?

2015-08-21 Thread William la Forge
b0fecc1 > > uses RT/chunkIteratorSeq > > http://dev.clojure.org/jira/browse/CLJ-1669 : "IteratorSeq will no > longer be used but is left in case of regressions for now". > > Take care, > Moe > > On Fri, Aug 21, 2015 at 12:02 PM, William la Forge > wro

Re: IteratorSequence, dead code?

2015-08-21 Thread William la Forge
Deprecated is fine. It can not be sub-classed as it has package-scoped methods. Am rewriting it in Clojure, which is a great exercise for this raw newbie. Thanks! Only I was worried if it is out of date, which it is not looking like for now. On Friday, August 21, 2015 at 8:04:16 AM UTC-4, Alex

Cursive and gen-class

2015-08-22 Thread William la Forge
I searched and did not see anything recent on gen-class problems in Cursive. I find when I have a reference to a gen-class instance that instance? works in Cursive but .getClass does not. (Everything works with lein, of course.) What I am trying to do is to call the count method via (.count x).

Re: Cursive and gen-class

2015-08-22 Thread William la Forge
ive to compile that namespace in > *Settings->Build, > Execution, Deployment->Compiler->Clojure Compiler*. Once you've done that > things should work. Cursive doesn't currently pick the set of namespaces to > be compiled up from lein - it probably should. >

Re: Cursive and gen-class

2015-08-22 Thread William la Forge
.java:2570) java.lang.Class.privateGetPublicMethods (Class.java:2690) java.lang.Class.getMethods (Class.java:1467) On Saturday, August 22, 2015 at 5:37:13 PM UTC-4, William la Forge wrote: > > Hi Colin! > > I've set it up to compile all. No doubt this will be very helpful as I >

Re: Cursive and gen-class

2015-08-22 Thread William la Forge
Bingo! Everything works when I revert to clojure 1.6.0. On Saturday, August 22, 2015 at 5:49:24 PM UTC-4, William la Forge wrote: > > More weirdness. This works: > > (let [^Object aa (.seq a5)] > (println (.getClass aa))) > > > But not this: > > > (let [^AASetSe

Re: Cursive and gen-class

2015-08-22 Thread William la Forge
gured in your Cursive project (File->Project > Structure->Project->Project SDK and File->Project Structure->Modules->(your > module)->Module SDK) is less than that. Is that the case? > > On 22 August 2015 at 23:58, William la Forge > wrote: > >> Bingo! Ever

Re: Cursive and gen-class

2015-08-22 Thread William la Forge
m guessing that java -version on the command line will show Java 8, but > the one you have configured in your Cursive project (File->Project > Structure->Project->Project SDK and File->Project Structure->Modules->(your > module)->Module SDK) is less than that. Is

Re: Cursive and gen-class

2015-08-22 Thread William la Forge
ugust 22, 2015 at 8:12:30 PM UTC-4, William la Forge wrote: > > lean version shows java 8, but the ide sdk is java7. Didn't know they > would be connected. :0 > > On Saturday, August 22, 2015 at 6:56:46 PM UTC-4, Colin Fleming wrote: >> >> That's very strange. I&#

Re: Cursive and gen-class

2015-08-22 Thread William la Forge
Woh! I had to revert to 14.0.2 before idea accepted the clojure plugin as being compatible. On Saturday, August 22, 2015 at 8:42:42 PM UTC-4, William la Forge wrote: > > Loving this. I had uninstalled cursive so I could reinstall. But the > download of the plugin fails and when instal

Re: Cursive and gen-class

2015-08-22 Thread William la Forge
12:30 PM UTC-4, William la Forge wrote: > > lean version shows java 8, but the ide sdk is java7. Didn't know they > would be connected. :0 > > On Saturday, August 22, 2015 at 6:56:46 PM UTC-4, Colin Fleming wrote: >> >> That's very strange. I'd need more det

Re: Cursive and gen-class

2015-08-23 Thread William la Forge
n - the links are in the getting started > guide here: https://cursiveclojure.com/userguide/. It's unfortunate but > necessary that the versions coincide since the IntelliJ APIs change from > version to version. > > Cheers, > Colin > > On 23 August 2015 at 03:22, Will

Re: some guidance sought

2015-08-24 Thread William la Forge
Looking wildly useful. Many thanks! On Monday, August 24, 2015 at 8:46:12 AM UTC-4, icamts wrote: > > Not a pointer but this may help in testing your implementation: > https://github.com/ztellman/collection-check > > Il giorno lunedì 10 agosto 2015 00:31:25 UTC+2, William la Forg

Clojure bootstrap, what am I missing here?

2015-08-24 Thread William la Forge
Step 2 in the classical bootstrap process for a language is to rewrite it in itself. Clojure is more than capable of this. But Clojure continues to rely on Java code for its implementation. Is there a reason why this was not done? Efficiency issues? A rush to create something usable? I would th

Re: Clojure bootstrap, what am I missing here?

2015-08-24 Thread William la Forge
be a protocol instead of > a interface. But that could be done on the existing codebase, without the > need for a full rewrite. > > Timothy > > On Mon, Aug 24, 2015 at 9:03 AM, William la Forge > wrote: > >> Step 2 in the classical bootstrap process for a language is to

Re: Clojure bootstrap, what am I missing here?

2015-08-24 Thread William la Forge
st 24, 2015 at 11:23:07 AM UTC-4, William la Forge wrote: > > Well gosh, Timothy, isn't Clojure code easier to maintain/extend than Java > code? There's a lot less boiler plate at least. Or is it just that Clojure > is superior mostly when multi-threading because of its use

Re: Clojure bootstrap, what am I missing here?

2015-08-24 Thread William la Forge
just aren't > that many reasons why we *need* CinC. > > Timothy > > On Mon, Aug 24, 2015 at 9:23 AM, William la Forge > wrote: > >> Well gosh, Timothy, isn't Clojure code easier to maintain/extend than >> Java code? There's a lot less boiler plate at

Re: Cursive and gen-class

2015-08-25 Thread William la Forge
Actually what happened is that the cursive plugin continued working even after I upgraded to idea 14.1. Though obviously I could not reinstall the same plugin subsequent to that upgrade after an uninstall. At least, I am pretty sure that that is what happened. :-) Can we close this thread please?

Re: some guidance sought

2015-09-04 Thread William la Forge
UTC-4, icamts wrote: > > Not a pointer but this may help in testing your implementation: > https://github.com/ztellman/collection-check > > Il giorno lunedì 10 agosto 2015 00:31:25 UTC+2, William la Forge ha > scritto: >> >> I've done a lot with AA trees i

Re: some guidance sought

2015-09-04 Thread William la Forge
Here's the link to the test file: https://github.com/laforge49/aatree/blob/master/test/aatree/core_test.clj On Friday, September 4, 2015 at 2:26:52 PM UTC-4, William la Forge wrote: > > I've now finished an initial draft of AA Tree Map and it passes > collection-check: &

Re: some guidance sought

2015-09-04 Thread William la Forge
Fixed. I left out the n argument, which is not optional when specifying options: (deftest tests (assert-map-like 100 (create-aamap) gen-element gen-element {:base (sorted-map) :ordered? true})) Runs great. :-) On Friday, September 4, 2015 at 2:29:49 PM UTC-4, William la Forge

AATree release 0.1.0, an indexed sorted map

2015-09-05 Thread William la Forge
Release 0.1.0 provides an alternative to sorted-map, though it also implements the Indexed interface. Written entirely in Clojure, subclassing APersistentMap and validated with collection-check . https://github.com/laforge49/aatree As a newbie I wou

Re: AATree release 0.1.0, an indexed sorted map

2015-09-06 Thread William la Forge
support access by key. So it looks like I am still programming in Java, even though I am programming into Clojure. Typical newbie code, I figure. Gotta change that. On Saturday, September 5, 2015 at 2:27:57 PM UTC-4, William la Forge wrote: > > Release 0.1.0 provides an alternative to sort

Re: Type hint using protocol

2015-09-08 Thread William la Forge
I'm finally looking at warn on reflection. Everything is going fine except in the nodes.clj file where I define a protocol, INode, with a method, new-node and then try to call that method from a function, revise. I'm using Clojure 1.7.0 and the file is https://github.com/laforge49/aatree/blob/m

Re: Type hint using protocol

2015-09-08 Thread William la Forge
aatree.nodes.INode always gives me a class not found. But switching to definterface does it for me. Many thanks! On Tuesday, September 8, 2015 at 3:16:56 PM UTC-4, Andrey Antukh wrote: > > > > On Tue, Sep 8, 2015 at 9:31 PM, William la Forge > wrote: > >> I'

Re: Type hint using protocol

2015-09-08 Thread William la Forge
rface of the same name. You are trying to call the > "new_node" Java method directly on whatever "this" is in that context, > which requires reflection on "this" to find the implementation. > > > On Tuesday, September 8, 2015 at 1:31:10 PM UTC-5, William la F

flexible vectors with aatree 0.2.0

2015-09-11 Thread William la Forge
Second release of aatree: https://github.com/laforge49/aatree -added support for vectors -improved performance by avoiding reflection. Unlike the standard Clojure vectors, aavector also supports add/drop at any point in the vector. This was reasonable because aavector is implemented as a

Re: Lazy Sequence Results in Stack Overflow

2015-09-26 Thread William la Forge
Why not turn this problem on its head? Have a vector of lists of prime factors for each i. March through this vector and for each prime factor in the current list, add that prime factor p to list i + p. And if i has no prime factors, then it is a prime itself and add it to the list at 2 * i. So

Lazy deserialization / reserialization, aatree release 0.3.0

2015-09-28 Thread William la Forge
Too often when dealing with data saved on disk you find yourself having to deserialize a large block of data, make a small update, and then reserialize the whole thing and write it back to disk. Deserialization and reserialization are quite slow, so having to deserialize and reserialize a large

Re: Suggestions on staying up to date with Clojure

2015-09-28 Thread William la Forge
Clojure Gazette seems to try to do this. But it is an active, diverse and highly technical community. http://www.clojuregazette.com/ You will find more links here: https://www.reddit.com/r/Clojure/ On Monday, September 28, 2015 at 8:04:22 PM UTC-4, Jonathon McKitrick wrote: > > What list of blo

Towards Greater Code Reuse

2015-10-01 Thread William la Forge
Code reuse is for me the holy grail of software. It is something we lost in large measure with the adoption of top-down development. And OO has only complicated the matter. For some time now I have advocated the use of factories and interfaces as a means of decoupling, but writing reusable co

Re: Lazy deserialization / reserialization, aatree release 0.3.0

2015-10-01 Thread William la Forge
ovides an immutable/persistent data structure compatible with > Clojure maps. But then you say that serializing "updates" is done > incrementally. Could you elaborate on this? Do you mean that the new copy > to be serialized is basically diff'd agaist the old version, and

Re: Lazy deserialization / reserialization, aatree release 0.3.0

2015-10-01 Thread William la Forge
stions are appreciated twice over! :-) On Thursday, October 1, 2015 at 4:41:33 PM UTC-4, Nathan Davis wrote: > > > > On Thursday, October 1, 2015 at 2:58:15 PM UTC-5, William la Forge wrote: >> >> A value can have more than one form or implementation. For example, a >> St

Re: Lazy deserialization / reserialization, aatree release 0.3.0

2015-10-01 Thread William la Forge
table (from a value perspective) and (b) there aren't any > examples on using the library. I think adding a few examples (with perhaps > a little explanation of what is happening under the covers) would go a long > way. > > Nathan Davis > > On Thursday, October 1, 2

Re: Lazy deserialization / reserialization, aatree release 0.3.0

2015-10-01 Thread William la Forge
Lets look at the upd function that is part of the map benchmark I posted above... (defn upd [m i] (let [m1 (assoc m i (- i)) bb (ByteBuffer/allocate (lazy-byte-length m1))] (lazy-write m1 bb) (.flip bb) (load-aamap bb))) And its invocation... (def lazy-m (reduce upd lazy

Re: Towards Greater Code Reuse

2015-10-02 Thread William la Forge
Refactoring for reuse is a kind of early optimization? Agreed! Generally for me it waits until the second or third rewrite, as by then I have a bit of an idea about where I am headed with the code. OTOH, I finally realized that when I don't know where I am going with something, keeping the logic i

Re: Towards Greater Code Reuse

2015-10-02 Thread William la Forge
I also find the cost of the explicit coupling >> that is re-use is often far more expensive than any saving offered by >> re-use of a bunch of text. I also find this _more_ expensive in Clojure >> than Java as refactoring in Java was pretty robust (IntelliJ is incredibly >>

Re: Lazy deserialization / reserialization, aatree release 0.3.0

2015-10-03 Thread William la Forge
I've just written the API for aatree: https://github.com/laforge49/aatree/wiki/API Please let me know if anything needs clarification! (I'm way way to close to all this, having worked on similar logic for the past several years.) (We should strive for beauty in the eye of the reader.) -- You

Re: Library suggestions requested for clojure-toolbox.com

2015-10-05 Thread William la Forge
{:name "aatree", :URL "https://github.com/laforge49/aatree";, :category "Data Structures"} On Monday, October 5, 2015 at 3:41:11 PM UTC-4, James Reeves wrote: > > If you've written or know about a Clojure or ClojureScript library, and > it's not already on clojure-toolbox.com

Re: Library suggestions requested for clojure-toolbox.com

2015-10-06 Thread William la Forge
Ah, sorry it is not. And having just found a race condition, I am inclined not to. So lets just say I was premature. On Mon, Oct 5, 2015 at 10:26 PM, James Reeves wrote: > On 6 October 2015 at 01:15, William la Forge wrote: > >> {:name "aatree", >> :URL "ht

Re: Library suggestions requested for clojure-toolbox.com

2015-10-06 Thread William la Forge
Reeves wrote: > > On 6 October 2015 at 01:15, William la Forge > wrote: > >> {:name "aatree", >> :URL "https://github.com/laforge49/aatree";, >> :category "Data Structures"} >> > > Where is this library deployed to? I can

aatree release 0.3.1--bug fixes, examples

2015-10-06 Thread William la Forge
The aatree project provides an alternative to Clojure sorted-map and vector, with several extensions: - AAVector supports add/drop at any point using addn and dropn. - AAMap implements Reversible, Counted, Indexed and Sorted - CountedSequence implements Counted and do not use synchronized.

aatree release 0.3.1 -- an alternative to Clojure sorted-map and vector

2015-10-06 Thread William la Forge
The aatree project provides an alternative to Clojure sorted-map and vector, with several extensions: - AAVector supports add/drop at any point using addn and dropn. - AAMap implements Reversible, Counted, Indexed and Sorted - CountedSequence implements Counted and do not use synchronized.

aatree release 0.3.2--Lazy Nesting

2015-10-09 Thread William la Forge
The aatree project provides fully compatible alternatives to Clojure sorted-map and vector, with several extensions: - AAVector supports add/drop at any point using addn and dropn. - AAMap implements Reversible, Counted, Indexed and Sorted - CountedSequence implements Counted and do not use

aatree release 0.3.3--AASet

2015-10-14 Thread William la Forge
The aatree project provides fully compatible alternatives to Clojure sorted-map, sorted-set and vector, with several extensions: - AAVector supports add/drop at any point using addn and dropn. - AAMap and AASet implement Reversible, Counted, Indexed and Sorted - CountedSequence implements Co

deprecation warnings?

2015-10-14 Thread William la Forge
Going forward, I'd like to deprecate some functions and have a warning displayed on first use. So I've done this: (def emptyAAMap ^{:deprecated "0.3.4"} (new AAMap emptyNode {:comparator RT/DEFAULT_COMPARATOR})) But I am not seeing any warnings from either lein or cursive. Do I need to add a

Re: deprecation warnings?

2015-10-14 Thread William la Forge
OK, but 1. Still no warning from cursive or lein test and 2. I think the metadata goes after the arguments when defining multi-arity functions. On Wed, Oct 14, 2015 at 12:11 PM, Colin Yates wrote: > Isn’t meta data before the symbol name? > > On 14 Oct 2015, at 17:09, William la For

Re: deprecation warnings?

2015-10-14 Thread William la Forge
*warn-on-deprecated* would be super! :D On Wed, Oct 14, 2015 at 1:44 PM, Alex Miller wrote: > You might wish to up-vote http://dev.clojure.org/jira/browse/CLJ-706 > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send e

Re: deprecation warnings?

2015-10-17 Thread William la Forge
t got mixed in with too many other things from the same web search, so I wanted clarity on common practice. And I really want to keep the dependencies as light as possible, since this is a low-level library. In any case, thanks Brian! On Sat, Oct 17, 2015 at 12:38 PM, Brian Marick wrote: > > &

aatree release 0.4.0--Durable Applications, Further Decoupling

2015-10-19 Thread William la Forge
The aatree project provides fully compatible alternatives to Clojure sorted-map, sorted-set and vector, with several extensions: - AAVector supports add/drop at any point using addn and dropn. - AAMap and AASet implement Reversible, Counted, Indexed and Sorted - CountedSequence implements Co

Re: aatree release 0.4.0--Durable Applications, Further Decoupling

2015-10-19 Thread William la Forge
e the lazy structures of aatree. (A better use of these structures would be in implementing a database, of course. But that will not be covered for a release or three.) On Monday, October 19, 2015 at 7:52:01 AM UTC-4, William la Forge wrote: > > The aatree project provides fully compatible alte

Re: How to tell buffy which file to read?

2015-10-21 Thread William la Forge
Buffers are allocated using a static method in Java, so (ByteBuffer/allocate 42) returns a byte buffer with space for 42 bytes of data. Buffers can be used in read/write operations with FileChannel. I suggest that you study the javadoc for (java.nio.channels FileChannel) and (java.nio ByteBuffe

Re: How to tell buffy which file to read?

2015-10-21 Thread William la Forge
Sounds like one of the X9 standard protocols. What a pain. -- 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 firs

aatree release 0.4.1--Make me a Database

2015-10-23 Thread William la Forge
The aatree project provides fully compatible alternatives to Clojure sorted-map, sorted-set and vector, with several extensions: - AAVector supports add/drop at any point using addn and dropn. - AAMap and AASet implement Reversible, Counted, Indexed and Sorted - CountedSequence implements Co

aatree release 0.4.2--Disk Space Management

2015-10-27 Thread William la Forge
The aatree project provides fully compatible alternatives to Clojure sorted-map, sorted-set and vector, with several extensions: - AAVector supports add/drop at any point using addn and dropn. - AAMap and AASet implement Reversible, Counted, Indexed and Sorted - CountedSequence implements Co

Re: Extending namespace loading

2015-10-28 Thread William la Forge
What about the converse? If namespaces can be dynamically loaded, can/will they be garbage collected when no longer referenced? Alternately, it would be great to be able to load a namespace from an alternative path. I.E. The standard namespace loader but working with a different directory. Or i

aatree release 0.5.0--virtual data structures

2015-11-01 Thread William la Forge
The aatree project provides fully compatible alternatives to Clojure sorted-map, sorted-set and vector, with several extensions: - AAVector supports add/drop at any point using addn and dropn. - AAMap and AASet implement Reversible, Counted, Indexed and Sorted - CountedSequence implements Co

Virtual Structures, easy to use but almost too simple to explain

2015-11-01 Thread William la Forge
Virtual persistent data structures are very easy to use, as all the database stuff is pretty much transparent to the application developer. You can query and update them the same way you query and update any Clojure persistent data structure. First, you do need to open and close the database:

core.cache limits?

2015-11-02 Thread William la Forge
The lirs cache in core.cache looks good, but I don't follow the code for setting the limits. I'd like to use this as a node cache for virtual data structures. So I need a large, but configurable, limit. Did a web search, can't find any examples for setting the limits. Most of what I found was d

Re: core.cache limits?

2015-11-02 Thread William la Forge
I am also wondering if lirs is still a good choice when the cache is large and the items are small. Perhaps lru would be better? -- 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 p

Re: core.cache limits?

2015-11-02 Thread William la Forge
It is the parameter list that threw me off: [base & {:keys [s-history-limit q-history-limit] :or {s-history-limit 32 q-history-limit 32}}] That's more destructuring than I've ever seen. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: core.cache limits?

2015-11-02 Thread William la Forge
OK, after a bit of digging into destructuring, I THINK I just pass the argument {s-history-limit 1000 q-history-limit 1000} or perhaps {:s-history-limit 1000 :q-history-limit 1000}. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this gro

  1   2   >