Tetris

2009-10-06 Thread Zach Tellman
I've thrown together a very simple Tetris clone, which can be found at http://github.com/ztellman/penumbra/blob/master/src/examples/tetris.clj . Excluding the parts hidden away by the framework, it's a purely functional implementation. I figured a few people here might find it interesting. --~--

Re: Leiningen Run ?

2009-12-01 Thread Zach Tellman
On Dec 1, 8:15 am, David Nolen wrote: > On Tue, Dec 1, 2009 at 1:10 AM, Phil Hagelberg wrote: > > David Nolen writes: > > > > The problem is that JOGL needs JNIs and JNIs need to be on > > > java.library.path or java.ext.dirs, not the classpath. In order to > > > make life easier for people lear

Re: Leiningen Run ?

2009-12-02 Thread Zach Tellman
On Dec 1, 3:31 pm, David Nolen wrote: > So just to keep the conversation going: > > http://download.java.net/maven/2/net/java/dev/gluegen/http://download.java.net/maven/2/net/java/dev/jogl/ > > I note that these two maven repos specify the platform with the following: > > lib-{platform}-{arch} > >

Re: Leiningen Run ?

2009-12-02 Thread Zach Tellman
On Dec 2, 12:38 pm, David Nolen wrote: > Yeah it sounds like you'll need to package up JOGL 2 and push it to Clojars > right? > > > > On Wed, Dec 2, 2009 at 3:20 PM, Zach Tellman wrote: > > On Dec 1, 3:31 pm, David Nolen wrote: > > > So just to

Re: Trying to rewrite a loop as map/reduce

2009-12-15 Thread Zach Tellman
At first glance I don't see a clean to make this completely higher- order, but here's a shorter (albeit a little messy) version: (loop [a a0] (let [[a b c d e] (reduce #(conj %1 (%2 (last %1))) [a] [f1 f2 f3 f4]) g (f5 c) h (-> e f2 f5)] (if (or (f6? b) (<= g h))

Re: How to fund open source Clojure development

2009-12-16 Thread Zach Tellman
All of these seem to distract from the activity we're trying to fund: the development of Clojure. If the current approach can bring in enough money, it strikes me as fairly ideal. We'll just have to wait and see if it does. -- You received this message because you are subscribed to the Google G

Inconsistent behavior in 1.2.0-master w.r.t. previous versions

2010-01-25 Thread Zach Tellman
At the REPL, in 1.2.0-master > (meta (second '(a #^b c))) nil In 1.1.0-new (and I believe all previous versions) > (meta (second '(a #^b c))) {:tag b} Is this intentional, or a bug? Is the new type hint syntax being introduced in 1.2? -- You received this message because you are subscribed t

Re: Inconsistent behavior in 1.2.0-master w.r.t. previous versions

2010-01-25 Thread Zach Tellman
I've double-checked I have the latest from github, cleaned and recompiled, and I'm still getting the same results. user=> [*clojure-version* (meta (second '(a #^b c)))] [{:interim true, :major 1, :minor 2, :incremental 0, :qualifier "master"} nil] Does anyone have an idea what's going on here? O

Re: Clojure binding for Open CL

2010-02-10 Thread Zach Tellman
A few months back I created very basic bindings for CL4Java (the code for it still exists in Penumbra, under src/opencl). It then subsequently was renamed to JOCL, which was already in use by another OpenCL library, and they started to work on combining their efforts, and I decided to wait until e

Re: jogl classpath not found

2010-03-11 Thread Zach Tellman
In the past, I haven't had a lot of luck putting the JOGL libraries on the classpath. A much better approach, I've found, is to create a custom script to load up clojure, and put the class and library paths as parameters to the java executable. My library used to target JOGL (it now uses LWJGL),

Re: Name suggestions

2010-03-18 Thread Zach Tellman
how about 'patois' or 'creole' On Mar 17, 12:08 am, mac wrote: > After just a little more test and polish I plan on calling clj-native > 1.0. But clj-native is a *really* boring name so I want to change it > before 1.0 and I don't have very good imagination when it comes to > these things. > So I

defprotocol's support for variadic arguments seems broken

2010-04-05 Thread Zach Tellman
Possibly this fall out from the latest commit requiring an explicit 'this' reference (ba6cc3b), I haven't checked any versions but the most recent. user> (defprotocol Protocol (f [a b & c])) Protocol user> (def p (reify Protocol (f [a b & c] [a b c]))) #'user/p user> (f p :a) No single method: f o

Re: defprotocol's support for variadic arguments seems broken

2010-04-06 Thread Zach Tellman
You're right, that does explain it. I assumed that variadic arguments were supported, but maybe I was wrong. Can anyone confirm whether or not this was ever intended to work? On Apr 6, 2:32 am, Jarkko Oranen wrote: > On Apr 6, 8:16 am, Zach Tellman wrote: > > > Possibly t

[ANN] 'primitive-math', a library for predictable arithmetic operations

2013-06-07 Thread Zach Tellman
What (+ x y) compiles down is highly dependent on the surrounding context, including but not limited to the local type-hints and the value of *unchecked-math*. Actually verifying that it's calling the primitive, unboxed, easily inlined clojure.lang.Numbers.add(long, long) requires either a pro

ANN: Potemkin 0.3.0

2013-06-19 Thread Zach Tellman
Potemkin [1] is a collection of facades and utilities that I've found helpful when writing larger-scale libraries or applications. I've never formally announced it before, but I think it's gotten to the point where others can benefit from it. A few highlights: * 'def-map-type', which allows f

Factual is hiring Clojure developers

2013-06-19 Thread Zach Tellman
At Factual, we build and constantly refine a canonical index of real world entities: businesses, locations, and products [1]. We also provide ways for other data to be resolved against our index [2] [3], allowing our service to act as a join table for real-world entities, breaking down barrier

[ANN] byte-streams: a rosetta stone for all the byte representations the jvm has to offer

2013-06-29 Thread Zach Tellman
I've recently been trying to pull out useful pieces from some of my more monolithic libraries. The most recent result is 'byte-streams' [1], a library that figures how how to convert between different byte representations (including character streams), and how to efficiently transfer bytes bet

Re: ANN: faster zipper implementation

2013-06-30 Thread Zach Tellman
This is really cool, thanks for taking the time to do this. I was able to eke out another 1.8x speedup by changing the keyword equality checks with 'identical?' [1], and there might be some further room for improvement by defining inline forms for some of the smaller functions. Zach [1] http

Re: ANN: faster zipper implementation

2013-06-30 Thread Zach Tellman
This is really cool, thanks for doing this. I was able to eke out another 1.8x speedup by replacing '=' with 'identical?' for the keyword comparisons [1]. There also might be further room for improvement by defining inline forms for some of the smaller functions. Zach [1] https://github.com/

Re: [ANN] byte-streams: a rosetta stone for all the byte representations the jvm has to offer

2013-07-01 Thread Zach Tellman
aybe this is as simple as the > number of steps...)? Thanks for releasing this! > > -- Dan > > On Saturday, June 29, 2013 1:57:58 PM UTC-4, Zach Tellman wrote: >> >> I've recently been trying to pull out useful pieces from some of my more >> monolithic librarie

Re: [ANN] byte-streams: a rosetta stone for all the byte representations the jvm has to offer

2013-07-02 Thread Zach Tellman
the lowest level. > > Given the amount of data-processing stuff people are doing, it seems like > a reasonable thing to have in contrib at least? > > > On Saturday, 29 June 2013 18:57:58 UTC+1, Zach Tellman wrote: >> >> I've recently been trying to pull out useful p

[ANN] Vertigo: fast, idiomatic C-style structs

2013-07-09 Thread Zach Tellman
Last year, I gave a talk at the Conj on my attempt to write an AI for the board game Go. Two things I discovered is that it was hard to get predictable performance, but even once I made sure I had all the right type hints, there was still a lot of room at the bottom for performance improvement

Re: Clojure: Elegance vs. Performance?

2013-07-09 Thread Zach Tellman
I've just released Vertigo [1], which I describe in this thread: https://groups.google.com/forum/#!topic/clojure/BayfuaqMzvs. I suspect this has some bearing on the conversation. Zach [1] https://github.com/ztellman/vertigo On Tuesday, July 9, 2013 8:11:58 AM UTC-7, Alexander Gunnarson wrote:

Re: Lamina receive-all functionality

2013-07-11 Thread Zach Tellman
Hi Patrick, A similar question has been asked in the Aleph mailing list, and you can see my answer there: https://groups.google.com/forum/#!topic/aleph-lib/SIO9Z8d3tdo. For future reference, you're more likely to get my attention, or the attention of someone else who can answer your question,

[ANN] Proteus: local mutable variables for the masses

2013-07-11 Thread Zach Tellman
There was some discussion a few days ago about how the lack of local mutable variables were harming performance, or possibly elegance, I'm not sure. Regardless, I fixed it: https://github.com/ztellman/proteus Enjoy! -- -- You received this message because you are subscribed to the Google Gro

Re: [ANN] Proteus: local mutable variables for the masses

2013-07-11 Thread Zach Tellman
java.lang.RuntimeException: Unable to resolve symbol: > it-1 in this context, compiling:(NO_SOURCE_PATH:1:1) > proteus> > > > > > On Thu, Jul 11, 2013 at 6:16 PM, Zach Tellman > > wrote: > >> There was some discussion a few days ago about how the lack of local

Re: [ANN] Proteus: local mutable variables for the masses

2013-07-11 Thread Zach Tellman
It looks like the macroexpansion code in conditions.free is fairly generic. What would you say to putting it into its own library? On Thu, Jul 11, 2013 at 6:54 PM, Ben Wolfson wrote: > On Thu, Jul 11, 2013 at 6:48 PM, Zach Tellman wrote: > >> Yeah, for safety's sake I ne

Re: [ANN] Vertigo: fast, idiomatic C-style structs

2013-07-15 Thread Zach Tellman
t would be nice to have some way to deal with strings & other > variable-length data. > > I'm also curious if its possible to make the analog of this for fressian, > basically to avoid unpacking objects that are not necessary for the > computation at hand. > > > >

Re: [ANN] Vertigo: fast, idiomatic C-style structs

2013-07-16 Thread Zach Tellman
gger segments at a time, and complete the overall sort in fewer > passes. > > > > > > > > On Mon, Jul 15, 2013 at 1:40 PM, Zach Tellman wrote: > >> If you (vertigo.core/wrap "a-file-name"), that will use mmap under the >> covers, so if no on

Re: [ANN] Vertigo: fast, idiomatic C-style structs

2013-07-17 Thread Zach Tellman
I actually haven't applied it yet. I'll post results once I have. On Wed, Jul 17, 2013 at 11:49 AM, Daniel wrote: > How did this affect performance in your Go AI? > > > On Tuesday, July 9, 2013 10:56:03 PM UTC-5, Zach Tellman wrote: >> >> Last year, I gave a

[ANN] byte-transforms: methods for hashing, compressing, and encoding bytes

2013-07-24 Thread Zach Tellman
https://github.com/ztellman/byte-transforms This is just a thin wrapper over byte-streams [1] and some best-in-class hashing and compression algorithms, but I figure there are at least a few people who, like me, have put off using Snappy or MurmurHash because they didn't feel like crawling thro

[ANN] byte-transforms: methods for hashing, compressing, and encoding bytes

2013-07-25 Thread Zach Tellman
This is just a thin wrapper over byte-streams [1] and some best-in-class hash and compression algorithms, but I figure there are at least a few people out there who'd like to use Snappy or MurmurHash but don't want to crawl through javadocs. Enjoy. Zach [1] https://github.com/ztellman/byte-st

[ANN] immutable-bitset: smalller, faster integer sets

2013-07-30 Thread Zach Tellman
https://github.com/ztellman/immutable-bitset There's not much to describe here, this provides an implementation of an integer-only set which can take up three orders of magnitude less memory under certain conditions. I needed this to implement a Bloom filter, but I figured it had applications

Re: [ANN] Vertigo: fast, idiomatic C-style structs

2013-07-31 Thread Zach Tellman
s 4]) > IllegalArgumentException Invalid field '4' for type ints-and-floats > vertigo.core/validate-lookup (core.clj:177) > user> (v/get-in s [4 :floats]) > IllegalArgumentException java.nio.Buffer.position (Buffer.java:216) > > Thanks, > Ezra > > On Tuesday,

Re: [ANN] Vertigo: fast, idiomatic C-style structs

2013-07-31 Thread Zach Tellman
Actually, looking at the readme, I can see the code you were trying to use. Sorry, I'm not sure how I didn't catch that before, but I've fixed it. Zach On Wed, Jul 31, 2013 at 10:17 AM, Zach Tellman wrote: > Hi Ezra, > > This is admittedly a little confusing, but you

ANN: clj-tuple, efficient small collections

2013-08-24 Thread Zach Tellman
I just pulled some code I wrote while trying to optimize 'memoize' into its own library: https://github.com/ztellman/clj-tuple. It only has the one function, so I assume no one will need too much explanation. However, there may still be room for performance improvements, so if anyone wants to

Re: ANN: clj-tuple, efficient small collections

2013-08-25 Thread Zach Tellman
Are the element names .e0, .e1 etc. considered part of the public > interface of tuple objects? > > > On Sat, Aug 24, 2013 at 7:38 PM, Zach Tellman > > wrote: > >> I just pulled some code I wrote while trying to optimize 'memoize' into >> its own libra

Re: ANN: clj-tuple, efficient small collections

2013-08-25 Thread Zach Tellman
instead of > specialized type for each arity. Did you check if it is not the same in > Clojure? > > If I conjoin to the tuple, does it return a tuple too? Also instead of > tupleN, you could fall back to the PersistentVector. > > JW > > > On Sun, Aug 25, 2013 at 4:3

Re: ANN: clj-tuple, efficient small collections

2013-08-26 Thread Zach Tellman
might be a good idea. > > On 8/25/13 9:35 AM, Zach Tellman wrote: > > I don't think so, even the existence of all the Tuple* types are an > > implementation detail, and you'd need to hint it as the right one to get > > sane performance. (nth t n) has good per

Re: ANN: clj-tuple, efficient small collections

2013-08-30 Thread Zach Tellman
now. Zach On Saturday, August 24, 2013 7:38:25 PM UTC-7, Zach Tellman wrote: > > I just pulled some code I wrote while trying to optimize 'memoize' into > its own library: https://github.com/ztellman/clj-tuple. It only has the > one function, so I assume no one wil

[ANN] riddley: code-walking without caveats

2013-09-02 Thread Zach Tellman
When I announced Proteus [1], it was rightfully pointed out that it didn't play nicely with macros which rely on &env, as well as a few forms like 'letfn' that I hadn't explicitly handled. This flaw has been shared by pretty much every library of this sort, and since this is a problem I've hal

Re: [ANN] riddley: code-walking without caveats

2013-09-03 Thread Zach Tellman
pansion, no generic code walking mechanism is exposed for more general transformations a la Proteus. Hope that helps, Zach On Mon, Sep 2, 2013 at 11:20 PM, Konrad Hinsen < googlegro...@khinsen.fastmail.net> wrote: > --On 2 septembre 2013 13:49:01 -0700 Zach Tellman > wrote: > >

Re: [ANN] riddley: code-walking without caveats

2013-09-03 Thread Zach Tellman
piler this way is the only way to make sure that locals are consistent everywhere, rather than just in your own targeted use to track shadowing. Hope that helps, Zach On Tue, Sep 3, 2013 at 12:41 PM, Konrad Hinsen < googlegro...@khinsen.fastmail.net> wrote: > --On 3 septembre 2013 02:08

[ANN] clj-leveldb, idiomatic LevelDB bindings from Factual

2013-09-03 Thread Zach Tellman
In the first of what I hope will be many annoucements, we're open sourcing a library we've found useful at Factual: https://github.com/Factual/clj-leveldb. This is just a simple wrapper around LevelDB, which is an in-process persistent k/v store from Google. If anyone has questions, I'm happy

Re: [ANN] riddley: code-walking without caveats

2013-09-04 Thread Zach Tellman
Wed, Sep 4, 2013 at 12:09 AM, Konrad Hinsen < googlegro...@khinsen.fastmail.net> wrote: > Zach Tellman writes: > > > I see. This is honestly something I hadn't considered, but since > > Riddley actually uses the Clojure compiler internals to track > > locals, this wou

Re: [ANN] riddley: code-walking without caveats

2013-09-04 Thread Zach Tellman
@khinsen.fastmail.net> wrote: > ** > On Wed, Sep 4, 2013, at 09:25 AM, Zach Tellman wrote: > > I'm not sure what you mean by "complete recursive expansion". Could > you expand > on that? > > Completely ;-) > > By complete recursive expansion I

Re: [ANN] riddley: code-walking without caveats

2013-09-04 Thread Zach Tellman
cts the "and". > > Arguably this is wrongheaded behavior from the get-go (it can be somewhat > confusing and makes it necessary to use something like clojure.core/and > within "where" if you want normal clojure-land "and" semantics), but it's a > style o

Re: [ANN] riddley: code-walking without caveats

2013-09-04 Thread Zach Tellman
es? On Wed, Sep 4, 2013 at 11:54 AM, Konrad Hinsen < googlegro...@khinsen.fastmail.net> wrote: > --On 4 septembre 2013 09:27:12 -0700 Zach Tellman > wrote: > > So "complete recursive expansion" is postwalk macroexpansion? It seems >> like that could break anap

Re: Handling name collisions with clojure.core

2013-09-04 Thread Zach Tellman
It is probably instructive to look at how (use-primitive-operators) works in primitive-math [1], though maybe not something you want to emulate. The basic mechanism is pretty simple: use 'ns-unmap' to get rid of the operators you want to shadow, and bring in the operators from the alternate na

Re: [ANN] riddley: code-walking without caveats

2013-09-05 Thread Zach Tellman
s an implicit argument to the macros, so anything which works "exactly" like the compiler needs to mimic that as well. Zach On Thu, Sep 5, 2013 at 3:09 AM, Konrad Hinsen < googlegro...@khinsen.fastmail.net> wrote: > ** > Zach Tellman writes: > > > I guess I'm

Re: [ANN] riddley: code-walking without caveats

2013-09-05 Thread Zach Tellman
gt; > Stathis > > [1] http://ideolalia.com/riddley/ > > > > On Monday, 2 September 2013 21:49:01 UTC+1, Zach Tellman wrote: >> >> When I announced Proteus [1], it was rightfully pointed out that it >> didn't play nicely with macros which rely on &

Re: [ANN] riddley: code-walking without caveats

2013-09-05 Thread Zach Tellman
> Best, > >Nils > > On Thursday, September 5, 2013 12:09:28 PM UTC+2, Konrad Hinsen wrote: >> >> Zach Tellman writes: >> >> > I guess I'm confused, then. You contrast "complete recursive >> > expansion" with what the compiler doe

Re: Handling name collisions with clojure.core

2013-09-05 Thread Zach Tellman
Not doing actual replacement via code-walking will prevent any functions with inline definitions actually being able to benefit from this. I'm not sure if those are used in core.matrix, though. On Thu, Sep 5, 2013 at 4:54 AM, Colin Fleming wrote: > This is actually probably not a bad solution.

Re: Use core.async executor with aleph

2015-02-18 Thread Zach Tellman
Hi Robin, You can absolutely specify an executor of :none if you're sure you won't be doing any blocking in your request handler. If everything's wrapped by a go-block, that's certainly the case, and is probably the most efficient approach. However, Aleph just needs some java.util.concurrent.

[ANN} Aleph 0.4.0 released, plus Manifold, Dirigiste, and a whole host of other libraries

2015-04-17 Thread Zach Tellman
Hey all, In preparation for Clojure/West, I'm formally releasing the latest Aleph and the libraries that surround it. Aleph 0.4.0 has been running in production at Factual for half a year now, and across a variety of services is handling at peak 600k HTTP requests/sec (spread across 15-20 mach

Re: [ANN} Aleph 0.4.0 released, plus Manifold, Dirigiste, and a whole host of other libraries

2015-04-17 Thread Zach Tellman
able for other servers where it > watches for changes in source and reloads them. I did a cursory look but > didn't spot anything like a -dev option. > > On Friday, April 17, 2015 at 5:06:30 PM UTC-4, Zach Tellman wrote: > >> Hey all, >> >> In preparation

Re: [ANN} Aleph 0.4.0 released, plus Manifold, Dirigiste, and a whole host of other libraries

2015-04-18 Thread Zach Tellman
I suspect it would, I think I was just letting the mechanics of Manifold's let-flow macro color my judgment. Happy to accept any pull requests which make my core.async examples more idiomatic. On Apr 18, 2015 8:33 AM, "Matthias Lange" wrote: > In your examples, you put a let around the reads from

[ANN] lein-jammin

2015-05-03 Thread Zach Tellman
https://github.com/ztellman/lein-jammin This one's pretty simple: you put `lein jammin ` in front of any other Leiningen task, and if it gets stuck for the specified duration, it prints out a thread dump. This especially useful for tests, and extra-especially useful for tests in a CI environme

[ANN] data.int-map 0.2.0

2015-05-25 Thread Zach Tellman
https://github.com/clojure/data.int-map The 0.1.0 release of this library was a faithful Clojure implementation of Okasaki's "Fast Mergeable Integer Maps" paper [1]. While it was much faster than Clojure's sorted-maps, it was in some cases slower than hash-maps, which was mostly due to the int

Re: Opinion on core.async vs callbacks in abstract APIs?

2015-06-02 Thread Zach Tellman
The problem with using bare callbacks is that there's no way for the invoked callback to exert backpressure, except by blocking or passing in a CPS-style callback to the callback, neither of which is ideal. If you're looking for a "neutral" choice, I'd suggest an infinite lazy-seq over callbac

Re: RejectedExecutionException? I don't think I was using anything concurrent?

2015-07-17 Thread Zach Tellman
A RejectedExecutionException is thrown when a thread-pool's queue is full. Try using 'jstack' to take a thread dump, and see who has spun up a thread pool under the covers. Possible culprits include 'at-at' and 'carmine'. On Friday, July 17, 2015 at 11:01:05 AM UTC-7, sugarste...@gmail.com w

Re: [ANN] Clojure 1.8.0-alpha2

2015-07-19 Thread Zach Tellman
You're also going to have to target [clj-tuple "0.2.2"], since something else seems to be shadowing that depedency. Sorry for all the fuss. On Sunday, July 19, 2015 at 5:02:13 PM UTC-7, Sean Corfield wrote: > > Bumping clj-http to 2.0.0 got me past that problem (and it uses Potemkin > 0.4.1) bu

Re: [ANN] Clojure 1.8.0-alpha2

2015-07-21 Thread Zach Tellman
A similar issue was reported earlier in the thread, target [potemkin "0.4.1"] and see if that fixes it. On Tuesday, July 21, 2015 at 12:24:43 PM UTC-7, Rangel Spasov wrote: > > Hey guys, > > Getting this error with 1.8.0-alpha2, I think related to aleph (using > 0.4.0, latest version at the mome

Re: Howto Use Automat ?

2014-08-26 Thread Zach Tellman
Hi Tim, Glad to see you're trying Automat out. I'm not sure what you mean by "forks in the road". If your FSM is defined as (a/or [1 3] [1 2 3]), then you can do any of the following: (reduce #(a/advance fsm %1 %2) nil [1 2 3]) (a/advance-stream fsm nil [1 2 3] ::rejected)

[ANN] data.int-map 0.1.0

2014-09-15 Thread Zach Tellman
https://github.com/clojure/data.int-map This contrib library represents the union of two other libraries [1] [2], which are now both deprecated. There's nothing too surprising here, but I'm happy to answer any questions. Zach [1] https://github.com/ztellman/immutable-int-map [2] https://githu

Re: [ANN] async-sockets - work with sockets using core.async channels

2014-10-05 Thread Zach Tellman
If I'm reading this correctly, you're using non-blocking thread pools for blocking operations on the sockets. Given more than N connections (last time I looked the thread pool's size was 42), you risk deadlock or at the very least poor average throughput. On Sunday, October 5, 2014 7:06:56 PM

Re: Re: Handling java streams..

2014-10-05 Thread Zach Tellman
Calling (-> stream .iterator iterator-seq) should give the desired result. On Wednesday, October 1, 2014 6:39:11 AM UTC-7, José Ricardo wrote: > > By nicer I meant something like being able to use, for example, map and > filter, just like I can do on a java.util.ArrayList (in clojure) and on a >

Re: [ANN] async-sockets - work with sockets using core.async channels

2014-10-05 Thread Zach Tellman
iven CompletionHandlers ( > http://docs.oracle.com/javase/7/docs/api/java/nio/channels/CompletionHandler.html) > > would be a better fit. > > On Sunday, October 5, 2014 11:57:18 PM UTC-4, Zach Tellman wrote: >> >> If I'm reading this correctly, you're using non-bloc

Re: [ANN] async-sockets - work with sockets using core.async channels

2014-10-07 Thread Zach Tellman
The reason the thread-per-connection approach is nice is because it correctly propagates backpressure. If we're copying data from a source to a sink (let's say reading it in from the network and writing to a file), it's possible that the production of data may outstrip the consumption. If thi

Re: [ANN] async-sockets - work with sockets using core.async channels

2014-10-08 Thread Zach Tellman
I wasn't aware of hermod, that's interesting. I would still characterize its approach to backpressure as "broken", though, since when the queues get full it silently drops messages on the ground. In fairness, this is very clearly documented, so it's less pernicious than some of the other cases ou

Re: [ANN] rmap - define lazy, recursive maps

2014-10-08 Thread Zach Tellman
Hi Arnout, This is interesting, but may be a lot less useful than you think without filling in all the other methods that a normal map has. For instance, you cannot do an equality check with another map (no use of clojure.lang.MapEquivalence or implementation of equals and equiv), nor use it

Re: [ANN] async-sockets - work with sockets using core.async channels

2014-10-08 Thread Zach Tellman
not familiar with netty API nor manifold's concepts, so > I'm having trouble navigating in the Aleph sources. > > Thanks, > Jozef > > On Wednesday, October 8, 2014 6:15:47 PM UTC+2, Zach Tellman wrote: >> >> I wasn't aware of hermod, that's interestin

Re: [ANN] async-sockets - work with sockets using core.async channels

2014-10-08 Thread Zach Tellman
at creates upstream backpressure. On Wed, Oct 8, 2014 at 10:16 AM, Zach Tellman wrote: > The documentation for Manifold can explain the API better than I can > here. The point where that interacts with Netty w.r.t. backpressure is > here: > https://github.com/ztellman/aleph/blob/0.4

Re: [ANN] async-sockets - work with sockets using core.async channels

2014-10-08 Thread Zach Tellman
netty/netty/blob/220660e351b2a22112b19c4af45e403eab1f73ab/transport/src/main/java/io/netty/channel/nio/NioEventLoop.java#L625 > [2] > https://github.com/netty/netty/blob/220660e351b2a22112b19c4af45e403eab1f73ab/transport/src/main/java/io/netty/channel/nio/AbstractNioChannel.java#L173 > >

Re: [ANN] async-sockets - work with sockets using core.async channels

2014-10-12 Thread Zach Tellman
ed interop for core.async" >> https://twitter.com/cgrand/status/520566182194450432 >> https://gist.github.com/cgrand/767673242b7f7c27f35a >> >> I'm interested to hear if this solves your problem or is about something >> else. >> >> Cheers &g

updated web server benchmarks

2014-11-07 Thread Zach Tellman
New benchmarks have been run for a variety of Clojure web servers, and the results can be found at https://github.com/ptaoussanis/clojure-web-server-benchmarks#ubuntu-1404--2x-xeon-x5650. The top-performing servers are based on Undertow (ring-undertow, Immutant v2), Netty (Aleph), and nginx

[ANN] s3-journal, a library for high-throughput log journaling

2014-11-17 Thread Zach Tellman
Today Factual is open sourcing two libraries, the first of which is a relatively simple library that journals data to Amazon's S3 service [1], and buffers data on disk using durable-queue [2], making it much more robust than most S3 clients to process failure, network issues, and a host of othe

[ANN] riffle, a high-performance write-once key/value storage engine

2014-11-17 Thread Zach Tellman
The second of the libraries Factual is open sourcing today is Riffle, which is a write-once key/value storage engine. By disallowing random writes, it allows for O(1) on-disk reads, and a read throughput is both faster and significantly more stable than LevelDB and other, similar databases. Of

Re: Server Sent Events under Http-Kit

2014-12-13 Thread Zach Tellman
I'm not sure about http-kit's streaming response implementation, but in Aleph [1] if you use a stream/channel as a response body each message from the stream will be immediately sent as an HTTP chunk. Best, Zach [1] https://github.com/ztellman/aleph On Saturday, December 6, 2014 9:03:41 AM UTC

Re: Server Sent Events under Http-Kit

2014-12-17 Thread Zach Tellman
Does `send!` block if it needs to exert backpressure? If so, the `go-loop` seems dangerous. If not, how does backpressure work? On Wed, Dec 17, 2014 at 8:07 AM, Malcolm Sparks wrote: > > Here is a solution for SSE over http-kit channels > > (defn server-event-source [ch] ;; Adding a mult here i

Re: Server Sent Events under Http-Kit

2014-12-17 Thread Zach Tellman
27;s output channel is > empty or not, that would certainly be a feature I'd like to see. > > Does aleph support this? > > > > > On 17 December 2014 at 18:23, Zach Tellman wrote: >> >> Does `send!` block if it needs to exert backpressure? If so, the >> `go-lo

Re: Newbie Gloss questions - dynamic buffer structure

2015-01-06 Thread Zach Tellman
Hey Tzach, If I understand what you're trying to do, you want something like this: [ :uint32 :ubyte ;; or bit-seq, depending (delimited-block (prefix uint24 #(- % 5) #(+ % 5))) ] And then you'll need to parse the final block separately. I've left defining the uint24 as an exercise for the

Re: A (foolish) plan to re-invent IO on top of core.async

2015-01-08 Thread Zach Tellman
t; this). The benefit provided is that Pedestal manages the NIO integration > directly with the container for you - optimized to the specific container. > You may thumb through the implementation for some ideas. > > You also have to be very mindful about back-pressure when usin

Re: Newbie Gloss questions - dynamic buffer structure

2015-01-12 Thread Zach Tellman
I'm sorry, that should have been :ubyte. Being able to insert arbitrary data into a codec is a feature, though. On Mon, Jan 12, 2015 at 6:27 AM, Tzach wrote: > Hi Zach > Thanks for the detailed response > > On Wednesday, January 7, 2015 at 7:28:06 AM UTC+2, Zach Tellman wrote

[ANN] Virgil 0.1.6

2017-03-16 Thread Zach Tellman
I figured it was worth reminding everyone that this library exists: https://github.com/ztellman/virgil. It now seems to work on Java projects of arbitrary size and structure (the in-process compiler is very fussy about compile order, you need to topologically sort the classes), and I've been u

Re: [ANN] Virgil 0.1.6

2017-03-16 Thread Zach Tellman
The code is split into a library and a minimal Leiningen plugin which runs it at startup. If someone wants to contribute a Boot equivalent, I'm happy to accept that PR. On Thursday, March 16, 2017 at 11:18:16 AM UTC-7, Gregg Reynolds wrote: > > > > On Mar 16, 2017 1:13

[ANN and RFC] Bifurcan: impure functional data strucures

2017-03-27 Thread Zach Tellman
This is a slightly irregular announcement, because it's not for a Clojure library. Rather, it's for a library written purely in Java: https://github.com/lacuna/bifurcan. This is a collection of mutable and immutable data structures, designed to address some of my personal frustrations with wha

Re: [ANN and RFC] Bifurcan: impure functional data strucures

2017-03-27 Thread Zach Tellman
performance for construction and lookups, it wouldn't be quite the same thing as a transient. On Mon, Mar 27, 2017 at 10:05 AM Michael Gardner wrote: > > > On Mar 27, 2017, at 09:51, Zach Tellman wrote: > > > > They also provide high-performance mutable variants of the

Re: [ANN and RFC] Bifurcan: impure functional data strucures

2017-03-27 Thread Zach Tellman
trying to wrap Bifurcan's structures in Clojure? > > As an aside, I want to draw people's attention to the sweet little > criterium + gnuplot setup you have there for generating benchmarking plots. > Nice! > > > On Mar 27, 2017, at 10:13 AM, Zach Tellman wrote: > > Be

Re: [ANN and RFC] Bifurcan: impure functional data strucures

2017-04-18 Thread Zach Tellman
f >> function calls? >> >> I'm finding myself in the process of doing some of this, at least for >> constructors. Also thinking of generating predicates/generators for use >> with spec. >> >> On Monday, March 27, 2017 at 9:51:46 AM UTC-7, Zach Tellman w

Re: [ANN and RFC] Bifurcan: impure functional data strucures

2017-04-20 Thread Zach Tellman
/github.com/ztellman/sleight On Thu, Apr 20, 2017 at 8:55 AM Dave Dixon wrote: > Sounds great. If you have time, I'd certainly like to hear your thoughts > on the issues of equality semantics and transients, maybe I can ponder and > make some suggestions based on my target use-cas

Re: [ANN and RFC] Bifurcan: impure functional data strucures

2017-04-23 Thread Zach Tellman
he algorithms tend to be > hand-tweaked for performance anyway. The big win for me in wrapping > bifurcan would be the ability to use spec without having to write > specialized specs, generators, etc. > > > On Thursday, April 20, 2017 at 9:53:56 PM UTC-7, Zach Tellman wrote: > >

[ANN] A complete draft of "Elements of Clojure" is available

2018-03-16 Thread Zach Tellman
Almost exactly two years ago, I announced on this mailing list that I was working on an intermediate-level book on Clojure [1], and released the first chapter. I've confined updates since then to a book-specific list, but I feel like it's fair to post here again to say that the fourth and fina

[ANN] 'Elements of Clojure' is complete

2018-12-02 Thread Zach Tellman
I'm very happy to announce, only two and a half years after the release of the first chapter, that Elements of Clojure is completely finished. Further details can be found here: https://groups.google.com/forum/#!topic/elements-of-clojure/UUJjqU1rllU. If you've never heard of the book before, p

Are you using Aleph in production? Tell us about it.

2018-12-16 Thread Zach Tellman
We're in the process of figuring out long-term plans for governance of Aleph [1], and it would like to understand who the current users are, and how they're using the library. If you are using it, please respond to this issue: https://github.com/ztellman/aleph/issues/450. -- You received this

[ANN] data.int-map 0.2.1

2015-08-11 Thread Zach Tellman
https://github.com/clojure/data.int-map This is a small but important update. Where 0.2.0 added the ability to use negative integers, it did *not* retain the ordered key invariant when negative numbers were used (negative numbers came after the positive numbers, because binary representations

Re: Manifold streams/deferreds raising errors downstream of a sink

2015-08-11 Thread Zach Tellman
Hi Andy, To give you some context on this, `put!` will return true if the thing directly downstream accepts the value (in this case, the stream). The fact that the callback in `consume` fails is between the stream and the callback, and is not propagated all the way back (though the exception w

Re: What does Zach Tellman mean by "factored out for greater inlining joy"

2015-08-11 Thread Zach Tellman
The inlining part is explained very well by this blog post http://normanmaurer.me/blog/2014/05/15/Inline-all-the-Things/ As for why I left all the repetition in there, I tend to let code expand before getting annoyed and compacting it. Sometimes there's a commit between those two events, somet

Re: What does Zach Tellman mean by "factored out for greater inlining joy"

2015-08-11 Thread Zach Tellman
never be inlined, if > it's identified as hot that limit goes way up, and a relatively cold method > can still be inlined even if it's small. > > I'd actually love to sit down and test this with Clojure sometime, but I > never seem to find time for it. > > On 11

Re: Manifold questions: Creating sinks/sources

2015-08-27 Thread Zach Tellman
Hi Atamert, For future reference, posting these questions to https://groups.google.com/forum/#!forum/aleph-lib will ensure I'll see them sooner. The `source-only` method is just a way to make sure that the chance for confusion is minimized, it doesn't prevent the underlying object from being

  1   2   >