Re: One name space / Multiple Modules

2011-08-04 Thread Laurent PETIT
2011/8/4 octopusgrabbus > Can more than one module implement the same name space? In other > words, can the functions that comprise a name space be spread out in > multiple modules? > To help answer the right question, maybe you could explain what is your definition of "module" (there's current

Aw: Re: One name space / Multiple Modules

2011-08-04 Thread Meikel Brandmeyer (kotarak)
Hi, you can also spread one namespace across multiple files. In foo/bar.clj: (ns foo.bar) (def x :baz) (more code goes here) (load "frob") In foo/frob.clj: (in-ns 'foo.bar) (use eg, x here) And so on. Sincerely Meikel -- You received this message because you are subscribed to the Google

Re: Modelling relationships between objects

2011-08-04 Thread Meikel Brandmeyer (kotarak)
Hi, Am Freitag, 5. August 2011 01:18:45 UTC+2 schrieb lpetit: > What kind of "strict control over state mutation" stories can we expect > when using core.logic ? > I mean, in the above example, I see no explicit use of refs, and I see > somewhat "unmanaged" state change with the introduction

ClojureScript Compile errors

2011-08-04 Thread Timothy Baldridge
So I used to think the stacktraces from Clojure were a bit cryptichow do I deal with ClojureScript compile errors? For instance: bin/cljsc ~/projects/WebSite/src/WebSite/CLJS > ~/test.js Exception in thread "main" java.lang.UnsupportedOperationException: nth not supported on this type: Symbol

Interfacing Cljs with external libs.

2011-08-04 Thread Timothy Baldridge
I'm looking into using clojurescript on our website. However, we have several external js libraries that we need to access from ClojureScript. Is there a way to execute javascript code from ClojureScript and not have the function names resolved at compile time? Basically I want to do: (foo "test"

Re: One name space / Multiple Modules

2011-08-04 Thread tonyl
There are no modules in clojure, but just namespaces. But you can nest namespaces, so you can spread out the functions in namespaces. On Aug 4, 2:32 pm, octopusgrabbus wrote: > Can more than one module implement the same name space? In other > words, can the functions that comprise a name space b

[ANN] CongoMongo 0.1.6

2011-08-04 Thread Sean Corfield
Available on Clojars. Compatible with Clojure 1.2 and Clojure 1.3. Fixes (almost) all reflection warnings. Handles multi-server connections (bug in previous snapshot build). -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles

Re: Modelling relationships between objects

2011-08-04 Thread Laurent PETIT
Hello David, 2011/8/5 David Nolen > On Wed, Aug 3, 2011 at 5:26 AM, Rickard Lindberg wrote: > >> Hi, >> >> I am interested in Clojures approach to managing state and its use of >> immutable >> values. I believe immutable values will make the life of programmers >> easier and >> I'm trying to fig

Re: Modelling relationships between objects

2011-08-04 Thread David Nolen
On Wed, Aug 3, 2011 at 5:26 AM, Rickard Lindberg wrote: > Hi, > > I am interested in Clojures approach to managing state and its use of > immutable > values. I believe immutable values will make the life of programmers easier > and > I'm trying to figure out how I can simplify my OO code by using

Re: Modelling relationships between objects

2011-08-04 Thread Laurent PETIT
Hi, 2011/8/3 Rickard Lindberg > Hi, > > I am interested in Clojures approach to managing state and its use of > immutable > values. I believe immutable values will make the life of programmers easier > and > I'm trying to figure out how I can simplify my OO code by using more > immutable > value

Re: Agents has stopped working for me (emacs)

2011-08-04 Thread Andreas Liljeqvist
Thanks, that solved it. I went to 1.4.0-SNAPSHOT and removed any old versions of swank-clojure. 2011/8/4 Phil Hagelberg > On Thu, Aug 4, 2011 at 7:46 AM, Andreas Liljeqvist > wrote: > > Not really sure when it happened. > > It works in a repl launched from lein. > > simple example from somewh

Re: Overtone 0.2 released

2011-08-04 Thread Bruce Durling
Great stuff. Looking forward to your talk on it. cheers, Bruce On Thu, Aug 4, 2011 at 20:54, Sam Aaron wrote: > I just wanted to announce the release of Overtone 0.2. There's been a > considerable amount of work behind this and we're rapidly moving towards > having a super stable and robust mu

Re: Modelling relationships between objects

2011-08-04 Thread Jonathan Fischer Friberg
I like to have the datastructure as one big mutable structure. It's not optimal in many cases, but it is simple. In this case you could have something like: (def NoteDb (atom [{:text "a note" :category :misc} {:text "note 2" :category :misc} {:text "blabla" :category :important}])) (defn

Seattle Clojure group tonight

2011-08-04 Thread Phil Hagelberg
Thought I'd throw this out there in case there are folks local to Seattle who haven't heard yet--we're having our monthly meeting of Seajure tonight. The meeting starts at 7pm at the U District Zoka Coffee and usually goes to 9:30. We often hack together on a project or just discuss relevant Clojur

Re: Overtone 0.2 released

2011-08-04 Thread David Nolen
On Thu, Aug 4, 2011 at 3:54 PM, Sam Aaron wrote: > Hi there, > > I just wanted to announce the release of Overtone 0.2. There's been a > considerable amount of work behind this and we're rapidly moving towards > having a super stable and robust musical platform that really pushes at the > boundar

Overtone 0.2 released

2011-08-04 Thread Sam Aaron
Hi there, I just wanted to announce the release of Overtone 0.2. There's been a considerable amount of work behind this and we're rapidly moving towards having a super stable and robust musical platform that really pushes at the boundaries of what's possible with sound synthesis today. The off

One name space / Multiple Modules

2011-08-04 Thread octopusgrabbus
Can more than one module implement the same name space? In other words, can the functions that comprise a name space be spread out in multiple modules? Thanks. cmn -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to c

Re: Convert Map to string for use in URL as parameters question

2011-08-04 Thread Vinzent
On 2 авг, 04:47, Brad wrote: > I wanted to take a Map and convert it to a string suitable for use as > parameters in a URL. I have got it working below two different ways > but wondered if there was a better or more idiomatic way to do this. > > ;; My test input map > (def input {:a 1 :b 2 :c 3

Re: deftypes that implement IPersistentCollection#equiv: argument order

2011-08-04 Thread Alan Malloy
On Aug 3, 5:54 pm, Brian Marick wrote: > In Midje, I have reason to create a type Metaconstant whose instances are > "equal" to a symbol with the same name. Here's the relevant bits of the > definition: > >     (deftype Metaconstant [name storage] >       Object >       (equals [this that] >    

Re: Adding "Change History" To Clojure Modules

2011-08-04 Thread octopusgrabbus
Thanks. This makes more sense putting it there. On Aug 4, 10:46 am, Joop Kiefte wrote: > In that case I would suggest putting it on top of the file more > or less like this > with a lot of ;'s at the start. You could create a script to > update that automatically > from the CVS I s

Re: Agents has stopped working for me (emacs)

2011-08-04 Thread Phil Hagelberg
On Thu, Aug 4, 2011 at 7:46 AM, Andreas Liljeqvist wrote: > Not really sure when it happened. > It works in a repl launched from lein. > simple example from somewhere: Try upgrading to swank-clojure 1.3.2 (or 1.4.0-SNAPSHOT if you want the cdt debugger). It's a little confusing which version take

Re: Looking for a functional solution for a simple problem

2011-08-04 Thread Laurent PETIT
Hi, what is the code of the function you're currently using ? 2011/8/3 Chris Rosengren > Hi, I'm using an iterative function to do this now but I would like to > start programming in a more functional style > > I have an ordered (ascending) distinct sequence 1 4 5 34 36 38 53 55 > 59 62 > How w

Re: Adding "Change History" To Clojure Modules

2011-08-04 Thread Joop Kiefte
In that case I would suggest putting it on top of the file more or less like this with a lot of ;'s at the start. You could create a script to update that automatically from the CVS I suppose, and if you make sure it's autogenerated and that it comes from the CVS it gives a lot

Agents has stopped working for me (emacs)

2011-08-04 Thread Andreas Liljeqvist
Not really sure when it happened. It works in a repl launched from lein. simple example from somewhere: M-x clojure-jack-in (def abc (agent "Initial Value of Agent = This string")) ;; (B) The function to send a message to the agent. (defn go [] (send abc (fn [_] ;; Wa

Aw: Looking for a functional solution for a simple problem

2011-08-04 Thread Meikel Brandmeyer (kotarak)
Or using for: (for [[x y] (partition 2 1 s) :when (= (- y x) 2)] (inc x)) -- 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

Re: Are there potential licensing issues of doing a "fully packaged" ClojureScript zip for Windows ?

2011-08-04 Thread Marko Kocić
Well, even better would be able to have ClojureScript distribution as :dev-dependency in leiningen, and lein cljs plugin where you could specify what gets compiled where in project .xml file. Regards, Marko -- You received this message because you are subscribed to the Google Groups "Clojure"

Re: Problem when use google closure library when use optimizations (simple/advanced)

2011-08-04 Thread sunng
I think I got the reason. I should use goog.net.xmlhttpfactory instead of goog.net as required namespace. On 8月4日, 下午9时41分, sunng wrote: > Hi all, > > I have a problem when compiling my code into optimized js: > Aug 04, 2011 9:34:10 PM > com.google.javascript.jscomp.LoggerErrorManager println > S

Re: Looking for a functional solution for a simple problem

2011-08-04 Thread Ken Wesson
On Wed, Aug 3, 2011 at 7:03 AM, Chris Rosengren wrote: > Hi, I'm using an iterative function to do this now but I would like to > start programming in a more functional style > > I have an ordered (ascending) distinct sequence 1 4 5 34 36 38 53 55 > 59 62 > How would I write a function in a functi

Problem when use google closure library when use optimizations (simple/advanced)

2011-08-04 Thread sunng
Hi all, I have a problem when compiling my code into optimized js: Aug 04, 2011 9:34:10 PM com.google.javascript.jscomp.LoggerErrorManager println SEVERE: /home/sun/projects/rageviewer/out/rageviewer/utils.js:3: ERROR - required "goog.net" namespace never provided goog.require('goog.net');

Looking for a functional solution for a simple problem

2011-08-04 Thread Chris Rosengren
Hi, I'm using an iterative function to do this now but I would like to start programming in a more functional style I have an ordered (ascending) distinct sequence 1 4 5 34 36 38 53 55 59 62 How would I write a function in a functional style that returns the 1- gaps (integer directly on either sid

Modelling relationships between objects

2011-08-04 Thread Rickard Lindberg
Hi, I am interested in Clojures approach to managing state and its use of immutable values. I believe immutable values will make the life of programmers easier and I'm trying to figure out how I can simplify my OO code by using more immutable values. In particular, I am wondering how I can model

Re: character encoding issue in compiled .js

2011-08-04 Thread David Powell
The character at the beginning of the string isn't a corrupt ':', it is a Unicode control character '\uFDD0' which seems to be output as an internal detail so that clojurescript can distinguish keywords and strings. The clojurescript compiler outputs javascript as utf-8. So technically, everythin

Re: Adding "Change History" To Clojure Modules

2011-08-04 Thread octopusgrabbus
We have a fairly simple development environment here, not that it couldn't stand updating, but other than a consultant, I am the only developer. I need changes written directly into each file. and here is why. When I got here over seven years ago, there were well over 200 4GL modules and a smatter

Re: Clojure Group in Singapore

2011-08-04 Thread Jason
Hi Zehua Thank you for the reply. I just joined the group. Cheers, Jason -- 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 patien

Re: Adding "Change History" To Clojure Modules

2011-08-04 Thread Michael Wood
Hi On 3 August 2011 21:29, octopusgrabbus wrote: > Is there a preferred method for adding a Change History block to a > Clojure module? I'm doing this for now: > > (ns addr-verify >  ^{:author "Charles M. Norton", >    :doc "addr-verify is a small Clojure program that runs address > verification

Re: better community docs: getting started

2011-08-04 Thread Stefan Kamphausen
Hi Devin, On Thursday, August 4, 2011 5:14:19 AM UTC+2, Devin Walters (devn) wrote: > > > On Jul 29, 2011, at 7:30 PM, Stefan Kamphausen wrote: > > inc > > IMHO there are three types of people coming to Clojure > > >1. Java Programmers >2. Old-school lispers >3. all the other, who just