Re: om: state management considerations

2014-03-27 Thread Jeff Rose
There is some explanation about component local state in the documentation here: https://github.com/swannodette/om/wiki/Conceptual-overview UI components will often have transient state that really doesn't make sense to expose externally. For example the characters in an input as someone is t

Re: [ANN] Gorilla REPL initial release (0.1.2)

2014-02-19 Thread Jeff Rose
Hey, this looks really great, and if it could be made easily extensible I think it could gain a lot of traction. From a quick glance I have a couple thoughts: * Clojurescript!!! Why do all this work in Javascript? This is a project made for clojurescript, core.async, and maybe Om. - To mak

Re: [ANN] geva-clj 1.2 - Grammatical evolution in clojure

2012-07-26 Thread Jeff Rose
Wow, cool. Over the years we've talked about using some kind of grammar constrained evolution to generate synthesizers and musical ideas in Overtone, and this could be just the tool to do that. Would it be possible to perform iterations manually, rather than having to pass the fitness functio

A clojure encounter

2012-07-20 Thread Jeff Rose
Yesterday I was sitting on the tube in London, going home from work. A guy sat down next to me and started reading Clojure in Action. It was a good night. -Jeff -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cl

Re: reloading protocols causes problems

2012-06-21 Thread Jeff Rose
Sure, but if the protocol hasn't changed, does a new type need to be generated? Maybe this is too much to ask, but I would imagine that the compiler could inspect the current protocol of the same name and compare it with the newly evaluated one, and then only generate a new type when necessary

Re: reloading protocols causes problems

2012-06-21 Thread Jeff Rose
On Tuesday, June 19, 2012 5:53:41 PM UTC+1, David Nolen wrote: > > > Looking forward to an Overtone API over WebAudio ( > http://chromium.googlecode.com/svn/trunk/samples/audio/index.html) :) > > David > This has been discussed briefly, but it would be a serious undertaking to develop something

reloading protocols causes problems

2012-06-19 Thread Jeff Rose
Hi, I'm wondering if people might have advice on how to deal with the issue of reloading protocol definitions. Currently in Overtone things break when we reload some namespaces because once a defprotocol form is re-evaluated the existing types that implement that protocol are no longer valid

How to do aynchrounous producer/consumer

2012-06-17 Thread Jeff Rose
Java has queues that will do just what you want, as well as thread pools to process the jobs. It's reasonable and idiomatic to use this stuff from Clojure. http://docs.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/ConcurrentLinkedQueue.html -Jeff -- You received this message becaus

How to do aynchrounous producer/consumer

2012-06-17 Thread Jeff Rose
-- 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 unsubscribe from this group, send email to clojur

Re: Clojure Namespace Browser (clj-ns-browser "1.0.0")

2012-04-06 Thread Jeff Rose
Cool, this will be helpful when exploring a new library. It would be nice if the namespace column could optionally use a tree though, rather than expanding everything to a single list. Thanks, Jeff On Apr 5, 6:56 am, Frank Siebenlist wrote: > I still remember the first time I was introduced to

Re: 3d modeling tools

2012-03-19 Thread Jeff Rose
If you are going to use processing from Clojure, you'll want to checkout Quil: https://github.com/quil/quil It's a more Clojure friendly take on processing sketches, and it's a lot less painful to get up and running. -Jeff On Mar 19, 4:15 pm, Lee Spector wrote: > On Mar 16, 2012, at 10:05 AM,

Re: Probabilistic programming in clojure

2011-11-19 Thread Jeff Rose
Cool!  I experimented a little bit with Church a while back, but having something like this in Clojure could be really interesting.  I don't have much experience with sampling, but if I understand it correctly, your grass-is-wet demo is defining a belief network where each sample taken represents t

Re: dynamically generated let bindings

2011-07-28 Thread Jeff Rose
I don't think it's very typical to pass a form to a function, unless you plan on using eval at runtime. If it doesn't need to happen at runtime, then you'd do this with a macro approximately like this: user=> (defmacro bar [f] `(fn [& args#] (let [~'size (count args#)] ~f))) #'user/bar user=> (ba

Re: Best/Idiomatic way of managing data that changes

2011-06-01 Thread Jeff Rose
I think the type of data structures you use will depend on how you need to access the data. For a GUI it's nice to be able to lookup a unit by ID, for example when it's clicked on, so I would probably store all units in a map by ID, and then have a separate location to ID map as you described. Th

Re: resultset-seq

2011-05-05 Thread Jeff Rose
How about extending java.sql.ResultSet to implement clojure.lang.Seqable instead? Now that we have this capability wouldn't it be ideal to not have any more foo*-seq functions? -Jeff On May 5, 6:04 am, Sean Corfield wrote: > I don't think it's flexible enough to attach this to the connection. I

Re: Clojure interest in Zurich

2011-04-15 Thread Jeff Rose
I'm hacking Clojure down in Lugano every day for the next couple months, and I'd be happy to make the trip up to Zurich and/or Geneva. -Jeff On Apr 14, 6:39 pm, Nick Zbinden wrote: > Hi im not from zurich but I life near enough. There is no clojure user > group (sadly). I acctualy don't know of

Re: examples in doc strings

2011-04-08 Thread Jeff Rose
Yeah, I've got a permanent clojuredocs tab open all the time, but still it would be nice to settle this discussion, as currently their are doc strings that require a google search or a look at the source to see what they mean though, which is not ideal. Many of us are happy to help if we can have

examples in doc strings

2011-04-08 Thread Jeff Rose
I notice that in clojure.core some doc strings contain examples while others don't. Specifically today I was checking on the arguments for defmulti and defmethod, and given the doc strings it still isn't entirely clear how to use them. For example, you have to know how a fn-tail should look. In

updating a map value

2011-03-30 Thread Jeff Rose
Hola, I'm looking for a function that updates a map value by calling a function on it. (def foo {:a 1}) So instead of this: (assoc foo :a (inc (:a foo))); => {:a 2} Something like this: (map-fn foo :a inc); => {:a 2} Does that exist somewhere, or should

Re: borneo - Clojure wrapper for Neo4j, a graph database.

2011-03-14 Thread Jeff Rose
On Mar 13, 5:55 pm, Jozef Wagner wrote: > On Thursday, March 10, 2011 12:50:13 PM UTC+1, Jeff Rose wrote: > > > Out of curiosity, why did you go with Neo4j rather than using jiraph? > > (https://github.com/ninjudd/jiraph)  I used neo4j in the past, and if > > I remember

Re: borneo - Clojure wrapper for Neo4j, a graph database.

2011-03-10 Thread Jeff Rose
Out of curiosity, why did you go with Neo4j rather than using jiraph? (https://github.com/ninjudd/jiraph) I used neo4j in the past, and if I remember right my main annoyance was that edges had to be traversed based on the type of the edge instance object, which felt annoying from a language like c

Re: with-timeout... ?

2011-03-10 Thread Jeff Rose
In Overtone we have the same situation, where we return a promise representing a server response and sometimes we want to timeout if the response never arrives. This is what we use: (defn await-promise! ([prom] (await-promise prom REPLY-TIMEOUT)) ([prom timeout] (.get (future @prom) time

Re: Master worker pattern

2011-03-03 Thread Jeff Rose
I've used something along these lines in the past for a medical imaging app. We needed to pre-fetch images and possibly pre-process them (filter, apply overlays) so that as a user was scrolling through an image set it was smooth and they weren't waiting for images to be processed. The GUI handler

Re: better error messages > smaller stack traces

2011-02-13 Thread Jeff Rose
Here's one: user=> {:a 1 :b} # Instead how about a parse error exception that specifically says something like, "Map literal requires an even number of forms." Thanks, Jeff On Feb 8, 3:01 pm, Stuart Halloway wrote: > This conversation began on Twitter [1] but I want to continue it on the > ma

Re: better error messages > smaller stack traces

2011-02-11 Thread Jeff Rose
lid"} > (some-fancy-validation x)]} ..) > > It could turn precondition to a bit more user-friendly construct. > > I would also like to have assert-args public. > > Cheers, > Hubert. > On Feb 10, 2011, at 8:10 PM, Daniel Werner wrote: > > > > > >

Re: better error messages > smaller stack traces

2011-02-10 Thread Jeff Rose
Sorry for the reply spam, but I've just remembered another error reporting issue: pre and post conditions. They are a great feature and I'd like to use them more often, but the error messages they produce are virtually useless in comparison to just writing your own check with a custom exception.

Re: better error messages > smaller stack traces

2011-02-10 Thread Jeff Rose
Here's an error I just got that could be improved upon. It shows an error in a file core.clj, but my current project uses many libraries and there are multiple files named core.clj. How about putting the full path to the file somewhere so we can jump straight to it? Thanks, Jeff ---

Re: Why no def- ?

2011-01-24 Thread Jeff Rose
On Jan 22, 5:13 pm, Stuart Halloway wrote: > Please don't. It has already been discussed and declined. The metadata > is uglier because we want doing this to be slightly ugly.. > >> The Clojure/core team is led by its technical advisors, Rich Hickey and > >> myself.  In this particula

Re: ANN: Textmash - another IDE for Clojure

2011-01-20 Thread Jeff Rose
I'd also be interested in clojure paredit as a library. We've been talking about having a stripped down editor for defining synthesizers and musical processes inside of Overtone, so some tools to get a useful little Clojure editing window would be great. -Jeff On Jan 19, 10:44 am, Laurent PETIT

Re: Clojure job scheduler

2011-01-08 Thread Jeff Rose
We use the Quartz library for job scheduling in our Clojure projects. It's nice to have this done within the JVM so that we can easily deploy to a new server without needing to configure cron (and the differences with cron across platforms...). http://www.quartz-scheduler.org/ If you want to call

Re: ANN: ClojureQL 1.0.0 finally released as public beta

2010-11-19 Thread Jeff Rose
Looks great, I'm giving it a try now. FYI, the github link in your post is the private URL so it won't work for anyone but you. -Jeff On Nov 18, 8:10 pm, LauJensen wrote: > Hi gents, > > For those of you who have followed the development > of ClojureQL over the past 2.5 years you'll be excited

compiling a protocol with types

2010-11-05 Thread Jeff Rose
Hi, I'm trying to define an interface for our automated import system written in Clojure so that we can use parsers implemented in Java. So far everything works great, but I'm wondering if there is any way to get types into the method signatures in the interface. For starters I created a simple

Re: VimClojure 2.2.0 released

2010-10-06 Thread Jeff Rose
Sorry, I'm blind. Using the patched nailgun it works fine. I'm looking forward to nRepl, it looks like a good long-term solution. -Jeff On Oct 6, 5:04 pm, Meikel Brandmeyer wrote: > Hi, > > On 6 Okt., 16:44, Jeff Rose wrote: > > > I've just installed the new

Re: VimClojure 2.2.0 released

2010-10-06 Thread Jeff Rose
Great, thanks a lot! I've just installed the new version, but it isn't connecting to nailgun using either my ng-server script or using lein nailgun, which both work with the previous version. Do we need to change port numbers or do something differently when starting nailgun now? This also remin

Re: Clojure meetup group listing

2010-09-21 Thread Jeff Rose
The Amsterdam Clojurians meet the 2nd Wednesday of every month in the center of Amsterdam. We organize on a google group here: http://groups.google.com/group/amsterdam-clojurians In the last year we've grown from 3 to 33 people, and the growth rate seems to be accelerating :-) -Jeff On Sep 21,

clojure friendly data warehouse stack

2010-09-20 Thread Jeff Rose
Hi, We are developing a data warehouse to facilitate reporting and data mining for cash register transaction data. It seems like many people in the Clojure community have data warehouse experience, so I wanted to ask for advice from people who have already done this before. Which libraries, data

Re: trace facility?

2010-09-20 Thread Jeff Rose
I'd recommend taking a look at the implementation of dotrace (last function in the file): http://github.com/richhickey/clojure-contrib/blob/master/src/main/clojure/clojure/contrib/trace.clj It let-binds a wrapper function for each of the functions you want to trace, so that within the context of

Re: logging

2010-09-15 Thread Jeff Rose
the upside, some libs (e.g., log4j) will allow > you to reload the logging configuration file. > > But as always, patches welcome.  ;) > > [1]http://clojure.github.com/clojure-contrib/branch-master/logging-api.html > > On Sep 14, 10:17 am, Jeff Rose wrote: > > > > >

logging

2010-09-14 Thread Jeff Rose
Hi, I've been using my own wrapper for Java's built-in logging so far, but today I took a look at clojure.contrib.logging because I would like to start using spy. It really seems like Clojure should have some simple logging out of the box, but this is not the case yet. Can we make it a bit more

Re: Where is (re? x)

2010-08-23 Thread Jeff Rose
ue if x is a regular expression" >   {:added "1.3"} >   [x] >   (instance? java.util.regex.Pattern x)) > > - James > > On 23 August 2010 16:17, Jeff Rose wrote: > > > > > It looks like regular expressions are the only type with built-in > > syntax

Where is (re? x)

2010-08-23 Thread Jeff Rose
It looks like regular expressions are the only type with built-in syntax that don't have a predicate function. How about: (def ^{:arglists '([x]) :doc "Return true if x is a regular expression (java.util.regex.Pattern)" :added "1.3"} re? (fn re? [x] (instance? java.util.regex.Pattern x)))

Re: JavaFX and Clojure

2010-08-23 Thread Jeff Rose
I started using the scenario scenegraph library from JavaFX to create GUI elements in project Overtone, but it seems development has stopped on the project (at least in the public repository) and we are weary of becoming dependent on a dead or closed source library. It's really too bad, because th

Re: async http client in clojure

2010-08-16 Thread Jeff Rose
You might be interested in this library: http://github.com/neotyk/ahc-clj It's a clojure layer on top of some nice Java libs for doing asynchronous HTTP. -Jeff On Aug 16, 11:12 pm, leo wrote: > I am trying to understand how efficient it would be to use Clojure to > develop an asynchronous http

Re: fast development through clojure repl

2010-07-28 Thread Jeff Rose
You mention one use case of the repl, but I think that's just one part of a typical workflow. Say you decide to write a function, you start half way and then you realize that you need to group pairs of items in a vector and then turn these pairs into a vector of maps. Oh, but what order are the a

Re: IDE agnostic question on user assistance (emacs/vimClojure users help appreciated too !)

2010-07-21 Thread Jeff Rose
On Jul 19, 8:19 pm, Meikel Brandmeyer wrote: > Starting the server is up to the user. Rule 1: Vim is not an IDE. There is a > plethora of tools for handling classpaths questions. I personally use gradle; > before that I used simple shell scripts with project relative CLASSPATH and > that's it.

Re: Aleph and Conjure

2010-07-21 Thread Jeff Rose
While Aleph's event model is slightly different from what Ring was originally designed for (the servlet API), I think it would be really easy to use with Ring. In Aleph you explicitly respond to a request, while in Ring you return a response map. Unless I'm missing out on something, you can hooku

Re: Leiningen 1.2.0 released!

2010-07-21 Thread Jeff Rose
Absolutely! Leiningen and its plugin system are wonderful in their simplicity. Thanks a lot. -Jeff On Jul 20, 6:55 pm, Brian Carper wrote: > On Jul 18, 5:17 pm, defn wrote: > > > I think I speak for everyone when I say: "thank you". > > inc > > --Brian -- You received this message because y

Re: ANN: Deview - Better test results

2010-07-15 Thread Jeff Rose
On Jul 15, 6:27 am, Phil Hagelberg wrote: > Yeah, a web display is certainly much richer. I'm totally an edge > case, but when you're remote pairing it's pretty important to keep > things in the shared context just so you can be sure you're looking at > the same thing. Another option is to use AN

Re: Idiomatic Clojure namespace names

2010-07-10 Thread Jeff Rose
On Jul 9, 6:22 pm, Mike Meyer wrote: > How have you managed to miss the second half of "that's the way they > do it in Java", which is "and we need to interoperate with other JVM > languages." Like it or not, one of the biggest draws of Clojure is > that it interoperates with Java. Nothing abou

Re: DSL with a grammar

2010-07-09 Thread Jeff Rose
Like some people mentioned, you can use a parsing library, but often times I don't think that's necessary if you are just creating a DSL. There are a couple of other strategies. One is you can use a series of nested macros that expand into a data structure. In this way your DSL will sort of auto-

Re: Idiomatic Clojure namespace names

2010-07-09 Thread Jeff Rose
I've asked myself this same question 50 times now. My best experience so far with a community that had packages was Ruby, and it was incredibly simple. Everyone can choose whatever name they like for their package as long as it isn't up on rubygems yet. I am strongly in favor of dropping these r

Re: bioinformatics toolkit in clojure: what would that look like?

2010-06-29 Thread Jeff Rose
Hi Jan, After coming from Ruby and previous OO languages I think many of us have the same questions. For starters, I'd recommend reading a couple other libraries to get a sense for how people organize libraries. That will probably give you the most concrete sense for how to really get started.

Re: Clojure distribution (like what ubuntu is for linux)

2010-06-29 Thread Jeff Rose
Just a quick note. You should also be aware of this project that came out recently: http://github.com/liebke/clj I haven't tried either yet so I can't really comment, but I like the idea of creating and integrated package manager and repl utility. Clj also seems nice in the way it integrates wi

Re: Requesting Feedback on new Relational Mapping lib for Clojure

2010-06-15 Thread Jeff Rose
Using $, !, and $1 in the examples makes it a bit annoying to read, especially if you just skip to the example queries to get a sense for the library. It would be much clearer to make these something more meaningful (e.g. lookup, query, update, find, get...) It seems like your model macro is in f

Re: : Google Chrome extension for TryClojure (try-clojure.org)

2010-06-01 Thread Jeff Rose
Awesome! Works great for me with Chromium in Ubuntu Lucid. This will be handy for trying things out and looking up docs. Thanks! -Jeff On May 31, 12:04 pm, sergey-miryanov wrote: > Hi all, > >  I made a little extension for google chrome. It allows to start try- > clojure REPL via clicking on

Re: Which GUI toolkit would you like to see wrapped in an idiomatic Clojure library?

2010-05-31 Thread Jeff Rose
We would definitely be interested in using something like this for Project Overtone. (http://project-overtone.org) We have already migrated from directly using Swing with the built-in Java interop, to creating a thin layer of clojure functions to trim out the boiler plate, to now wishing we had so

Re: How to visualise relations, bahavior and so on in functional programming ?

2010-05-12 Thread Jeff Rose
The value of any given diagram really depends on what level of understanding you are trying to communicate. A simple block diagram that outlines the major components of the system can be helpful to describe the general structure of an app. In Clojure this would probably correspond roughly to the

Re: matching symbols in a dictionary

2010-04-14 Thread Jeff Rose
On Apr 13, 11:34 pm, strattonbrazil wrote: > I want to map a dictionary and do different things depending on the > key.  I was planning on using an if-clause, but I'm not sure how to > compare symbols to strings. > > Something like > > (map (fn [k v] (if (== k "hello") ... ...) {:hello 1 :goodbye

Re: REPL in a browser

2010-03-10 Thread Jeff Rose
You mean Clojurescript? http://github.com/richhickey/clojure-contrib/tree/master/clojurescript/ It would be great to have more people working on it... On Mar 9, 12:12 pm, Jozef Wagner wrote: > Thank you. > > They seem to use java to generate (with GWT) both client-side html and > javascript, an

Re: Clojure for financial applications

2010-03-10 Thread Jeff Rose
On Mar 8, 5:50 pm, Jonathan Shore wrote: > Now OO may be antithetical to the traditional way of using lisp, however, I > see myself needing something close to an OO-style mapping for part of what I > do.   Currently my trading strategies have large and disparate state > contained in each strate

Re: Some basic guidance to designing functional vs. state parts of app

2010-03-06 Thread Jeff Rose
> > If you make a design decision to use an atom, you are effectively committing > > to never, ever being able to update that atom within a transaction. > > refs can do everything atoms can do and more.  They are slightly slower, > > perhaps, but much safer.  So > > unless you have an explicit pe

Re: functional abstraction

2010-02-28 Thread Jeff Rose
If anything, the defprotocol and deftype stuff that's on the way is more along the lines of an abstract class because you can define a protocol, acting a sort of modularized interface, and then you can compose types by grouping together functions that implement one ore more protocols. Anyway, I do

Re: ANN: midi-clj and osc-clj

2010-02-25 Thread Jeff Rose
:41 PM, Jeff Rose wrote: > > Just a quick announcement for any musical Clojurians out there.  I've > > pushed midi-clj for simple MIDI communication, and osc-clj for > > communicating with new school instruments via Open Sound Control. > > Both were developed for pro

ANN: midi-clj and osc-clj

2010-02-25 Thread Jeff Rose
Just a quick announcement for any musical Clojurians out there. I've pushed midi-clj for simple MIDI communication, and osc-clj for communicating with new school instruments via Open Sound Control. Both were developed for project Overtone, but they might be useful for other projects. Get them wit

Re: ANN: byte-spec-0.1

2010-02-18 Thread Jeff Rose
/github.com/rosejn/overtone> also looks really > interesting :) > > On Thu, Feb 18, 2010 at 11:59 AM, Jeff Rose wrote: > > Just a quick announcement for a small library recently extracted from > > Project Overtone.  It lets you specify binary formats and then > > seri

ANN: byte-spec-0.1

2010-02-18 Thread Jeff Rose
know if you have any questions. Cheers, Jeff Rose -- 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 p

Re: Leaning about VM's, JVM in particular

2010-02-17 Thread Jeff Rose
user accounts to hack and other problems to solve. Really fun stuff, and it does give you a concrete sense for what a VM has to do and how it works. cheers, Jeff Rose On Feb 16, 5:29 pm, Andrey Fedorov wrote: > Hi all, > > I'm looking for approaches to learn about VM's, the JVM in

Re: When to use loop recur / seq functions?

2010-02-16 Thread Jeff Rose
I think it's preferable to use the sequence functions when possible. This way you get laziness without having to construct lazy-seqs by hand, you get automatic chunking for better performance, and you create code that is easier for other Clojure users to parse. On the other hand, if you find yours

Re: Request for Feedback: Improve VimClojure's documentation

2010-02-12 Thread Jeff Rose
I have setup VimClojure on Linux, Mac and Windows successfully. (The classpath stuff is a major annoyance though, and sometimes I think I have problems with using different versions of clojure.jar.) I also get large error messages like the above though, which is extremely annoying. Especially si

Re: Multimethods vs. cond?

2010-02-11 Thread Jeff Rose
Yeah, in practice it seems like multimethods are pretty much just used as a way to let users of a library extend the API to support additional types. If you had a cond expression dispatching on the type of an argument, for example, then the user would have to modify the source code of your library

Re: error reporting for macro expansion

2010-02-09 Thread Jeff Rose
I agree, the error reporting from the compiler can often be hard to dig through. Besides showing both the location of the macro definition and its usage, it would be nice to hide all of the clojure.lang.* calls in the stack trace by default, or fold them into a single line. That way the user code

Re: Trait-like behavior with Protocols

2010-02-09 Thread Jeff Rose
/show/clojure/Protocols or read a recent post by Rich where he talks about some of the design decisions behind these constructs: http://groups.google.com/group/clojure/msg/330c230e8dc857a9 -Jeff Rose On Feb 9, 12:13 am, aria42 wrote: > Is it possible to have default implementations associa

Re: Dutch Clojure users

2010-02-06 Thread Jeff Rose
There is a group of us hacking Clojure in Amsterdam and Utrecht. Where are you? Join the Amsterdam Clojurians Google group, and we'll meet for a pizza. -Jeff On Feb 6, 12:26 pm, Joop Kiefte wrote: > Hello folks! > > I am from the Netherlands and I am learning Clojure now, using it at work, > an

Re: Clojure for system administration

2010-02-05 Thread Jeff Rose
On Feb 5, 6:02 pm, Phil Hagelberg wrote: > On Thu, Feb 4, 2010 at 11:55 PM, ataggart wrote: > > On Feb 4, 9:35 am, Phil Hagelberg wrote: > >> On Thu, Feb 4, 2010 at 8:33 AM, Stuart Sierra > > >> wrote: > >> > Clojure can certainly do these things; clojure-contrib contains many > >> > file and

Re: file-seq and recursive directories

2010-02-02 Thread Jeff Rose
So what would that look like? Is it sufficient to throw every canonical directory path in a set and test for membership before traversing down any directory? Or is that even sufficient because you could arrive at the same location through different paths... I wonder if you can get something more

Re: Announcement: Vijual Graph Layout Library for Clojure Version 0.1

2010-01-27 Thread Jeff Rose
I've only just skimmed the code, but it seems supporting multiple rendering layers could be a good candidate for using either multi- methods or protocols and types What information is needed by the layout algorithms? I would guess that it basically needs a bounding box and a neighbor list for each

Re: Full Disclojure - I Need Topics!

2010-01-25 Thread Jeff Rose
Thanks a lot for the videos you've done so far. I watch them all. Here are some ideas for shows, from more Clojure centric to just interesting: * defprotocol, deftype, reify, ... * data-flow programming * pattern matching * monads * performance tuning (unboxed numbers, type hints, ...?) * making

Re: Promise/Deliver use cases

2010-01-25 Thread Jeff Rose
17 pm, "Steven E. Harris" wrote: > Jeff Rose writes: > > The future is used because they have a timeout feature when using the > > .get method. > > Should there be a corresponding timeout-based `deref' function¹ > ("deref-within"?) for promises? Having to

Re: Debugging in Clojure

2010-01-23 Thread Jeff Rose
On Jan 22, 1:40 pm, Krukow wrote: > Please don't top post. Seriously, people still complain about this? It's the default behavior in Google Groups, so I think you just have to live with it. Find a news reader that doesn't suck. -- You received this message because you are subscribed to the Goo

Re: Dependency management

2010-01-23 Thread Jeff Rose
I use leiningen to download and publish libraries, but in terms of setting up for development I use a bash script that adds whatever I need for the project to the CLASSPATH and starts the nailgun server. (swank for vimclojure) This seems to work pretty well, although it would be nice if Leiningen

Re: Announcement: Vijual Graph Layout Library for Clojure Version 0.1

2010-01-23 Thread Jeff Rose
Awesome! I tried it out quickly last night using leiningen. The text rendering worked great, but graphical seems to have a problem: user=> (use 'vijual.graphical) java.lang.Exception: Unable to resolve symbol: half in this context (graphical.clj:60) -Jeff On Jan 22, 11:06 pm, Conrad wrote: >

Re: Promise/Deliver use cases

2010-01-23 Thread Jeff Rose
In a library for communicating with networked programs and devices using Open Sound Control (OSC) messages, I use promises in combination with futures to provide synchronous callbacks with an optional timeout. For example, you might send a status request message to a device and you expect an immed

Re: Autodoc for the masses

2010-01-21 Thread Jeff Rose
Just a quick note about getting setup with Leiningen. The documentation you posted says to use [autodoc "0.7.0-SNAPSHOT"] in the dev dependencies, but that is not a valid package on clojars. Using [autodoc "0.7.0"] instead works fine though. No downloading of jars necessary. Just add that, run

Re: I'm going to teach Clojure at university - suggestions/comments?

2010-01-14 Thread Jeff Rose
Dober dan gospodine, A few years ago I taught two semesters of web application programming to undergraduates using Ruby on Rails. None of them had any experience with either programming in Ruby or developing for the web before we started, but by most accounts it was a success. Maybe some of what

Re: idiomatic way to use cond.

2009-12-28 Thread Jeff Rose
I can think of a couple ways to break it up. First, you can pull the expressions inside of each do form out into separate functions. Whether they are defined above the current function or inside it using let, both would clean it up and give a label to each of the groups of expressions (the functio

Re: how 'bout a debug-repl?

2009-12-09 Thread Jeff Rose
Awesome! I've googled high and low for exactly this functionality in the past. +1 for getting this into core or contrib if it could work there. Can you wrap a require to make a whole library debuggable? (with-lexical-frames (require 'foo.bar)) It would be very handy to have a debug mode wh

Re: clojure event handling

2009-11-12 Thread Jeff Rose
On Nov 12, 1:22 am, nchubrich wrote: > I'm curious what the best idiomatic way of handling events is (e.g. > receiving a series of messages and dispatching functions on the basis > of the messages).  One could use the 'experimental' add-watch(er) > functions.  But it might also be nice to do somet

Re: vimclojure indentation problem.

2009-11-12 Thread Jeff Rose
Yes, I also have the same issue. Sometimes if I re-indent the file it goes away, and other times I re-indent the file and all of a sudden half of the functions are 2 spaces over. (2 spaces is my tab width though, so I'm not sure if it's a tab or always 2 spaces...) -Jeff On Nov 12, 9:10 am, Dav

Re: ANN: Clojure live-repl

2009-10-30 Thread Jeff Rose
Awesome! Thanks a lot. I've been needing this. -Jeff P.S. Maven is annoying. On Oct 18, 6:53 pm, "David Powell" wrote: > Hi, > > I just posted a project at . > > It uses the Java Attach API to let you connect a Clojure REPL to any running > Java or Clojur

Re: On the importance of recognizing and using maps

2009-03-12 Thread Jeff Rose
Konrad Hinsen wrote: > On Mar 12, 2009, at 10:59, Jeff Rose wrote: > >>> My main conclusion is that Clojure's system is a lot more flexible >>> but also a lot more fragile. Any function can modify data of any >>> "type" (as defined by metadata)

Re: On the importance of recognizing and using maps

2009-03-12 Thread Jeff Rose
Konrad Hinsen wrote: > On 11.03.2009, at 23:34, Chouser wrote: > >> Interacting directly with a class dict feels a little dirty, because >> you could be circumventing the API provided by the class methods, >> making it easy to get the object into a bad state. Clojure's maps >> being immutable re

Re: VimClojure 2.0.0 released (merged with Gorilla)

2009-03-10 Thread Jeff Rose
Awesome! This is really sweet. I've got it up and running, and this is really getting good now. I've got a couple quick questions: * Is there a smart way to install it? I've been copying each .vim file into its place inside my $HOME/.vim directory, but this gets repetitive and annoying fas

Re: Two quick questions on functions...

2009-03-10 Thread Jeff Rose
Rich wrote: > I'm relatively new to Clojure, and I just want to make sure I > understand things correctly. There are two issues that I'm struggling > with. Neither is major, but if there is a good solution, I'd like to > find out. > > 1) You must define a method before you call it from another fun

Re: Early registration for International Lisp Conference (Cambridge, MA, 22-25 March 2009)

2009-03-01 Thread Jeff Rose
Anyone know if they will be filming the ILC 2009? I can't fly to Boston, but I'd pay to get a quality stream. -Jeff Stephen C. Gilardi wrote: > Rich will be presenting a "Clojure in Depth" tutorial session on Sunday, > 22 March 2009 at the International Lisp Conference taking place at MIT >

Re: Waterfront - The Clojure-based editor for Clojure

2009-02-25 Thread Jeff Rose
Stephen C. Gilardi wrote: > > On Feb 25, 2009, at 1:27 PM, Mark Colburn wrote: > >> #!/bin/sh >> DP="${0%/*}" >> java -cp ~/src/clojure/clojure.jar:${DP}/clj:${DP}/java - >> Dnet.sourceforge.waterfront.plugins=${DP}/clj/net/sourceforge/ >> waterfront/ide/plugins clojure.main ${DP}/clj/net/source

Re: Directed Graphs for Contrib

2009-02-23 Thread Jeff Rose
Jeffrey Straszheim wrote: > As part of my Datalog work I'm putting together some directed graph > algorithms, mostly things like finding strongly connected components, > and building dependency stratifications (think topological sort but with > the results groups in tiers of non-interdependent

Implementing the Associative interface

2009-02-21 Thread Jeff Rose
I'm building a storage layer where I'd like to access properties of an item as if it were a regular map. If I write a proxy that implements the Associative interface does this just work? Anyone know of some example Clojure code that is doing something similar? Thanks, Jeff --~--~-~-

Re: Concurrency and file writing

2009-02-16 Thread Jeff Rose
I think it depends on whether this is CPU or IO bound, where the files will be stored and how expensive it is to generate blocks, check for existence, copy etc. Over a distributed filesystem running across data-centers the decision will probably be different than on a multi-core cpu on a sing

Re: find first match in a sequence

2009-02-10 Thread Jeff Rose
(first (filter pred coll)) > > -M > > On Feb 10, 2009, at 10:19 AM, Jeff Rose wrote: > > >> Well, in case someone else needs the same function and it isn't built- >> in, here's what I'm using in the meantime. (Based off of the some >> function t

Re: find first match in a sequence

2009-02-10 Thread Jeff Rose
pred (rest coll) Cheers, Jeff On Feb 10, 5:18 pm, Jeff Rose wrote: > Hi, >   Is there a built-in function that will return thefirstitemin a > collection that matches a predicate?  (Something equivalent to Ruby's > Enumerable#find...)  Seems pretty basic, but I can'tf

  1   2   >