slime and utf-8

2011-06-26 Thread Gregg Reynolds
Hi, This seems to be an emacs problem. I'm trying to read a file with utf-8 text using (slurp foo.txt) in an emacs slime session. It chokes and says: error in process filter: Autoloading failed to define function debug Furthermore if I use utf-8 in the file name, I get: Coding system

Re: slime and utf-8

2011-06-26 Thread Max Penet
Hi, Try adding this line to your .emacs: (setq slime-net-coding-system 'utf-8-unix) On Jun 26, 1:34 pm, Gregg Reynolds d...@mobileink.com wrote: Hi, This seems to be an emacs problem.  I'm trying to read a file with utf-8 text using  (slurp foo.txt) in an emacs slime session.  It chokes and

Re: slime and utf-8

2011-06-26 Thread Gregg Reynolds
On Sun, Jun 26, 2011 at 6:55 AM, Max Penet zcams...@gmail.com wrote: Hi, Try adding this line to your .emacs: (setq slime-net-coding-system 'utf-8-unix) Perfect! Thanks! -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group,

Re: setting a xml value and save the root to a file

2011-06-26 Thread Ken Wesson
On Sat, Jun 25, 2011 at 3:23 AM, dive_mw dive...@googlemail.com wrote: Hi all, can anybody help me, how to fix the following problem? I have a function like this: (defn set-config-value  sets a new value programatically to a config key  [value tags]  ;; set the new value and save the

Tree vaadin?

2011-06-26 Thread Antonio Recio
I would like to translate a java example of tree vaadin to clojure. I have to files in the same folder: planets.clj and core.clj. I am having problems and I need help. What I am doing wrong? * * *;; In the file planets.clj:* (ns project.planets) (let [planets (doto (Object.)

Re: Tree vaadin?

2011-06-26 Thread .Bill Smith
Can you describe the problem you are having? -- 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

Re: slime and utf-8

2011-06-26 Thread Alan Malloy
This has been added to recent versions of clojure-mode. I don't know if there's an official release with this fix yet, but you can also try running clojure-mode from a git checkout at https://github.com/technomancy/clojure-mode On Jun 26, 5:48 am, Gregg Reynolds d...@mobileink.com wrote: On

Re: Tree vaadin?

2011-06-26 Thread Robert Lally
First problem: In Java: new Object[]{Venus} On 26 June 2011 18:46, .Bill Smith william.m.sm...@gmail.com wrote: Can you describe the problem you are having? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Tree vaadin?

2011-06-26 Thread Robert Lally
Ooops - gmail malfunction First problem, in Java: new Object[]{Venus} creates a new object array - containing the String Venus. Your clojure code Object. [Venus]) is trying to call the constructor of Object passing in a single argument which is a Clojure Vector. This isn't going to

Re: setting the classpath in cake+slime (was Re: Screencast: Clojure + Emacs + slime + swank + cake + Overtone)

2011-06-26 Thread lambdatronic
The classpath is specified in the lein and cake scripts respectively. lein is a shell script, and cake is a ruby script, so pop them open in your favorite text editor and take a look. ~Gary On Jun 24, 4:56 pm, Lee Spector lspec...@hampshire.edu wrote: Oops: Ignore my last BTW -- now load

Re: slime and utf-8

2011-06-26 Thread Phil Hagelberg
Alan Malloy a...@malloys.org writes: This has been added to recent versions of clojure-mode. I don't know if there's an official release with this fix yet, but you can also try running clojure-mode from a git checkout at https://github.com/technomancy/clojure-mode Well... sort of. It will

Re: setting the classpath in cake+slime (was Re: Screencast: Clojure + Emacs + slime + swank + cake + Overtone)

2011-06-26 Thread Lee Spector
Ah. Non-obvious, but now I'm beginning to see how this works -- I found and looked into the cake script. Thanks! -Lee On Jun 26, 2011, at 4:30 PM, lambdatronic wrote: The classpath is specified in the lein and cake scripts respectively. lein is a shell script, and cake is a ruby script,

Re: Tree vaadin?

2011-06-26 Thread Antonio Recio
*Could* it *possible* to use a list with peek and pop to create the planets and moons list? -- 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 -

Re: Tree vaadin?

2011-06-26 Thread Antonio Recio
Could anyone write the planet array of objects? -- 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

Handling java streams..

2011-06-26 Thread Andreas Liljeqvist
Are there any libraries out there for making java stream handling nicer? My current project involves reading images from zipfiles, scaling them and then write them to a new zipfile. Any code I have seen involve mostly writing java in clojure and setting up buffers and such. Certainly I could do

Re: Tree vaadin?

2011-06-26 Thread Antonio Recio
I could be fine this? (def planets (object-array [[Venus] [Earth The Moon] [Mars Phobos Deimos]])) -- 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

Re: Strange Problem With Cake

2011-06-26 Thread octopusgrabbus
Thank you, and you are most correct. I'm getting there w/ remembering parentheses. defproject test-csv 0.1 :description A clojure-csv test :dependencies [[org.clojure/clojure 1.2.1] [org.clojure/clojure-contrib 1.2.0] [clojure-csv/clojure-csv 1.2.1]] :main

Re: Handling java streams..

2011-06-26 Thread Alan Malloy
clojure.java.io? On Jun 26, 2:25 pm, Andreas Liljeqvist bon...@gmail.com wrote: Are there any libraries out there for making java stream handling nicer? My current project involves reading images from zipfiles, scaling them and then write them to a new zipfile. Any code I have seen involve

Clojure + PostgreSQL

2011-06-26 Thread Lars Rune Nøstdal
Hi guys, Anyone using Clojure and PostgreSQL? I'm trying to access PostgreSQL using https://github.com/clojure/java.jdbc at the moment, but it seems to have trouble with simple inserts: (insert-record :temp {:parent 42}) #PSQLException org.postgresql.util.PSQLException: A result was

Re: Clojure + PostgreSQL

2011-06-26 Thread Lars Rune Nøstdal
Quick change to do-prepared* in internal.clj: (defn do-prepared* Executes an (optionally parameterized) SQL prepared statement on the open database connection. Each param-group is a seq of values for all of the parameters. [return-keys sql param-groups] (with-open [stmt (if

Re: Clojure + PostgreSQL

2011-06-26 Thread Sean Corfield
Sorry about that - known issue: http://dev.clojure.org/jira/browse/JDBC-10 It works fine on MySQL but breaks on PostgreSQL and SQL Server. I'll get a fix in over the next couple of days (I'm away from home right now). Sean On Sun, Jun 26, 2011 at 4:13 PM, Lars Rune Nøstdal larsnost...@gmail.com

dynamically create cmdspec for clojure.contrib.command-line

2011-06-26 Thread Marc Limotte
Hi. I'm trying to understand why the following macro doesn't work. This is a trivial example, but ultimately I want to create a macro that will let me dynamically create the cmdspec for clojure.contrib.command-line/with-command-line. I haven't written many macros, so my general understanding

Re: dynamically create cmdspec for clojure.contrib.command-line

2011-06-26 Thread Ken Wesson
On Sun, Jun 26, 2011 at 11:22 AM, Marc Limotte mslimo...@gmail.com wrote: And (macroexpand (my-with-cl ...)) throws the same exception. Macroexpand's a normal function, not a macro, so you need to quote its argument. -- Protege: What is this seething mass of parentheses?! Master: Your father's

Re: Tree vaadin?

2011-06-26 Thread Antonio Recio
How I can translate this in clojure? for (int i=0; iplanets.length; i++) { String planet = (String) (planets[i][0]); tree.addItem(planet); -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

[ANN] emacs-clojure-vagrant: a sane development virtual environment

2011-06-26 Thread Justin Lilly
I've put together a simple development environment for those looking for a stable place to work on clojure code. The idea was dual purpose: a consistent environment for which to try out multiple code bases and something that is familiar to me when working on a foreign operating system. The

Re: Tree vaadin?

2011-06-26 Thread Linus Ericsson
Maybe (map #(.addItem tree (.toString (first %))) planets) where #(.addItem tree (.toString (first %))) should be replaced with the correct java interop for inserting into the tree, and the % becomes one and one of the items in the planets vector (that is regarded as a sequence) the argument.

struct sharing same key?

2011-06-26 Thread Antonio Recio
I would like to create an struct with the names of differents nationalities. When people are the same nationality I would don't need to repeat again the nationality. Is there any way t0 get that. For example, I would like to write something like that: (defstruct person :nationality :first

Re: Tree vaadin?

2011-06-26 Thread Ambrose Bonnaire-Sergeant
I've never used it, but you would use amap instead of map in this situation, because it is a Java array. http://clojuredocs.org/clojure_core/clojure.core/amap Ambrose On Mon, Jun 27, 2011 at 1:08 PM, Linus Ericsson oscarlinuserics...@gmail.com wrote: Maybe (map #(.addItem tree (.toString

Re: struct sharing same key?

2011-06-26 Thread Ken Wesson
On Mon, Jun 27, 2011 at 1:10 AM, Antonio Recio amdx6...@gmail.com wrote: I would like to create an struct with the names of differents nationalities. When people are the same nationality I would don't need to repeat again the nationality. Is there any way t0 get that. For example, I would like