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

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

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

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

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

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

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
-- 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

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

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 frank.siebenl...@gmail.com wrote: I still remember the first

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 lspec...@hampshire.edu wrote: On Mar

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

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= (bar

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.

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

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

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 jozef.wag...@gmail.com 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 right my

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)

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

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

Re: better error messages smaller stack traces

2011-02-13 Thread Jeff Rose
Here's one: user= {:a 1 :b} #CompilerException java.lang.ArrayIndexOutOfBoundsException (REPL:3) 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

Re: better error messages smaller stack traces

2011-02-11 Thread Jeff Rose
)]} ..) 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: On 10 February 2011 17:05, Jeff Rose ros...@gmail.com wrote: Sorry for the reply spam, but I've just

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 stuart.hallo...@gmail.com 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

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

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

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

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 m...@kotka.de wrote: Hi, On 6 Okt., 16:44, Jeff Rose ros...@gmail.com wrote: I've just installed the new version

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

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,

Re: logging

2010-09-15 Thread Jeff Rose
-api.html On Sep 14, 10:17 am, Jeff Rose ros...@gmail.com wrote: 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

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

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

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: Where is (re? x)

2010-08-23 Thread Jeff Rose
is a regular expression   {:added 1.3}   [x]   (instance? java.util.regex.Pattern x)) - James On 23 August 2010 16:17, Jeff Rose ros...@gmail.com wrote: It looks like regular expressions are the only type with built-in syntax that don't have a predicate function.  How about: (def

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 leonidus.b...@gmail.com wrote: I am trying to understand how efficient it would be to use Clojure to

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

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 m...@kotka.de 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

Re: ANN: Deview - Better test results

2010-07-15 Thread Jeff Rose
On Jul 15, 6:27 am, Phil Hagelberg p...@hagelb.org 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

Re: Idiomatic Clojure namespace names

2010-07-10 Thread Jeff Rose
On Jul 9, 6:22 pm, Mike Meyer mwm-keyword-googlegroups. 620...@mired.org 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

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

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

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

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: 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

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 sergey.mirya...@gmail.com wrote: Hi all,  I made a little extension for google chrome. It allows to start try- clojure

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

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 strattonbra...@gmail.com 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) ... ...)

Re: Clojure for financial applications

2010-03-10 Thread Jeff Rose
On Mar 8, 5:50 pm, Jonathan Shore jonathan.sh...@gmail.com 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

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 jozef.wag...@gmail.com wrote: Thank you. They seem to use java to generate (with GWT) both client-side html

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 performance

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

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

Re: ANN: midi-clj and osc-clj

2010-02-25 Thread Jeff Rose
: On Thu, Feb 25, 2010 at 4:41 PM, Jeff Rose ros...@gmail.com 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

ANN: byte-spec-0.1

2010-02-18 Thread Jeff Rose
]) s (spec song-spec test song 234 r m) s2 (bytes-and-back song-spec s) m2 (:melody s2) r2 (:rhythm s2)] (is (= 5 (:n-triggers r2))) (is (= 12 (:n-notes m2))) (is (= r2)) (is (= m2)) (is (= s s Let me know if you have any questions. Cheers, Jeff Rose

Re: ANN: byte-spec-0.1

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

Re: Leaning about VM's, JVM in particular

2010-02-17 Thread Jeff Rose
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 anfedo...@gmail.com wrote: Hi all, I'm looking for approaches to learn about VM's, the JVM

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

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

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

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 ari...@gmail.com wrote: Is it possible to have default implementations

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

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 iko...@gmail.com wrote: Hello folks! I am from the Netherlands and I am learning Clojure now, using it

Re: Clojure for system administration

2010-02-05 Thread Jeff Rose
On Feb 5, 6:02 pm, Phil Hagelberg p...@hagelb.org wrote: On Thu, Feb 4, 2010 at 11:55 PM, ataggart alex.tagg...@gmail.com wrote: On Feb 4, 9:35 am, Phil Hagelberg p...@hagelb.org wrote: On Thu, Feb 4, 2010 at 8:33 AM, Stuart Sierra the.stuart.sie...@gmail.com wrote: Clojure can

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

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

Re: Promise/Deliver use cases

2010-01-25 Thread Jeff Rose
, Steven E. Harris s...@panix.com wrote: Jeff Rose ros...@gmail.com 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 close a function over your @p form

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: 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

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: Debugging in Clojure

2010-01-23 Thread Jeff Rose
On Jan 22, 1:40 pm, Krukow karl.kru...@gmail.com 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

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

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

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

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,

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 djpow...@djpowell.net wrote: Hi, I just posted a project at http://github.com/djpowell/liverepl. It uses the Java Attach API to let you connect a Clojure REPL to any running

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 reduces the

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), even without being aware of this. Modifying type tags without

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

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

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 in

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/sourceforge/

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

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

find first match in a sequence

2009-02-10 Thread Jeff Rose
Hi, Is there a built-in function that will return the first item in a collection that matches a predicate? (Something equivalent to Ruby's Enumerable#find...) Seems pretty basic, but I can't find it in the docs. Thanks, Jeff --~--~-~--~~~---~--~~ You

Re: Amsterdam.clj

2009-02-02 Thread Jeff Rose
in Amsterdam. Next meeting is next monday. At least two of us, myself included, are happily hacking clojure. On Mon, Feb 2, 2009 at 1:11 PM, Jeff Rose ros...@gmail.com wrote: Anyone else hacking Clojure in Amsterdam? How about going for a beer and talking some shop? -Jeff

Amsterdam.clj

2009-02-02 Thread Jeff Rose
Anyone else hacking Clojure in Amsterdam? How about going for a beer and talking some shop? -Jeff --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: What is a LISP dialect?

2009-01-12 Thread Jeff Rose
Lisp languages stem from the general concept of representing a program as a data structure made up of lists. Hence, LISt Processing. There are a lot of variations in how things can work though, for example how variables are scoped and bound, how variables and functions are referenced, the

Implementing .toString from Clojure

2008-12-08 Thread Jeff Rose
I've got a Clojure library based around a custom data structure stored in a struct. When printing I'd like to override the default string output for structs, but I'm not sure how to implement the .toString method used by (str ...) from Clojure. Anyone know how to do this? It would be cool

Re: Clojure template library

2008-12-05 Thread Jeff Rose
Rich Hickey wrote: On Dec 3, 1:04 pm, Jeff Rose [EMAIL PROTECTED] wrote: I've just pushed a template library for Clojure up onto github for public use. You can find it here: http://github.com/rosejn/clj-libs/tree/master This library is based loosely on erb from Ruby, which is the only

Re: function args question

2008-12-05 Thread Jeff Rose
hitesh wrote: I'm working on some opengl code in clojure and I want to specify a vertex. However, instead of passing in the three arguments it wants, I want to specify a single vector of 3 elements. How can I do this? Here's what it would normally look like (gl represents the current

Clojure template library

2008-12-03 Thread Jeff Rose
I've just pushed a template library for Clojure up onto github for public use. You can find it here: http://github.com/rosejn/clj-libs/tree/master This library is based loosely on erb from Ruby, which is the only other template system I've used, and it allows you to insert Clojure

Re: Clojure template library

2008-12-03 Thread Jeff Rose
Ok, that makes sense. I'll do it. What about the other options available in erb though? Do we use this: ?clj (doseq [doc documents] -? * ?clj= doc ? ?clj ) -? Will 'clj=' and '-?' pass for valid xml? -Jeff Stuart Sierra wrote: On Dec 3, 1:04 pm, Jeff Rose [EMAIL PROTECTED] wrote

Re: Serializing Clojure objects

2008-12-02 Thread Jeff Rose
I've been working on the same issue. So far it has mostly been just researching various options, but I can give you my two cents... It really depends on your goals and constraints. I have narrowed down to two major families of serialization for storage and networking. One is the

Not really a NullPointerException, and repl lines

2008-11-28 Thread Jeff Rose
Clojure user= (nil (println asd) ) java.lang.NullPointerException (NO_SOURCE_FILE:1) user= This seems like an odd error to get here. Couldn't it say something like invalid function as first value? It also made me wonder, would it be possible to have a line counter inside the REPL, and just

Type coercion asymmetry

2008-11-25 Thread Jeff Rose
It seems this is the best way to go currently: user= (Integer/parseInt 1234) 1234 but wouldn't it be nice if this worked: user= (str 123) 123 user= (str 12.123) 12.123 user= (int 123) java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Character (NO_SOURCE_FILE:0) user=

  1   2   >