Re: Clojure Koans and others interactive exercises to learn clojure?

2011-07-05 Thread Jonathan Cardoso
Thanks for sharing this!! I didn't know that there was a Koans version for Clojure =D On 4 jul, 00:52, Antonio Recio amdx6...@gmail.com wrote: Clojure koans https://github.com/functional-koans/clojure-koans is awesome to learn clojure. Do you know other projects with exercises to learn

Re: Clojure now officially supported on Heroku

2011-07-05 Thread Jonathan Cardoso
Amazing news!! Heroku is great and simple! On 5 jul, 14:54, Mark McGranaghan mmcgr...@gmail.com wrote: I'm very excited to say that Clojure is now an officially supported deployment option on Heroku:    http://blog.heroku.com/archives/2011/7/5/clojure_on_heroku/ A big thanks to everyone in

Re: Clojure Wiki for general public

2011-07-11 Thread Jonathan Cardoso
I feel the same, although Wikibooks is kind of what you need: http://en.wikibooks.org/wiki/Clojure_Programming -- 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

Re: Anyone on Google+ yet?

2011-07-14 Thread Jonathan Cardoso
https://plus.google.com/115729535012467854741 -- 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: can't set up Clojure 1.2.1

2011-07-14 Thread Jonathan Cardoso
Weird =S. That only happens when you're not on the folder containing the clojure.jar or when you try to call clojure from a different folder without setting the classpath. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

Exception testing with clojure.test

2011-07-19 Thread Jonathan Cardoso
Hi guys, I want to test some code that throws exceptions, but I don't want exceptions to be thrown in the console. Is there a way to do that with *is* function? What is the best way to test my code with try-catch blocks? -- You received this message because you are subscribed to the Google

Re: Exception testing with clojure.test

2011-07-19 Thread Jonathan Cardoso
Thank's a lot. That's exactly what I was looking for and didn't realize there was a thrown? function in the API =S Thanks. -- 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

Reading special characters with slurp

2011-10-21 Thread Jonathan Cardoso
Hello, in portuguese there are lots of special characters (such as *á*, *é*, *ã...*), but when I need a file with slurp I don't get this characters in the result. For example, if I have this line in the file: Ferida perdida na imensidão. When I execute (slurp file-name), I get: Ferida perdida

Re: Reading special characters with slurp

2011-10-21 Thread Jonathan Cardoso
when I read* a file -- 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,

Re: Reading special characters with slurp

2011-10-21 Thread Jonathan Cardoso
Thank's a lot, bsmith.occs, it worked I haven't consider the encoding =P -- 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

Sort a vector and keep the elements' indexes

2012-01-06 Thread Jonathan Cardoso
Hi! I have a small stupid question and I hope you guys can help me... I wanted to sort a vetor, say [25 5 70] but I can't just use any sort algorithm because later I will need to get the index of the element in the original vector. When I use: (map-indexed vector [25 5 70]) I get ( [0 25] [1

Re: Sort a vector and keep the elements' indexes

2012-01-06 Thread Jonathan Cardoso
Thanks a lot, guys!! I know there was a simple way!! -- 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

Re: A STM profile tool

2012-01-16 Thread Jonathan Cardoso
Interesting! -- 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

Re: Best IDE

2012-01-18 Thread Jonathan Cardoso
Try Counterclockwise, it's good! But like Sean said, I think Emacs is still a better choice when you need, when I started learning it I thought it complicated things a little bit, but when you get used to it, it's just great, I feel much more productive. (If you are a Windows user, Lisp

Re: Best IDE

2012-01-18 Thread Jonathan Cardoso
I disagree, I found lots of tutorials on the web that helped me learn the basics of emacs and I did it in few days. Of course I'm not an advanced emacs user, but I know some emacs/SLIME commands and it's helping a lot -- You received this message because you are subscribed to the Google

Re: Could be my favourite improvement in 1.4

2012-01-18 Thread Jonathan Cardoso
brain fart lol -- 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

Exchange value between refs

2012-01-30 Thread Jonathan Cardoso
Hi, I want to change state of two refs, exchanging between them. Currently this is what I do: (dosync (let [a (first @v) b (second @v)] (alter a assoc :color (:color @b)) (alter b assoc :color (:color @a I wonder if there's a better approach,

Re: Exchange value between refs

2012-01-30 Thread Jonathan Cardoso
Actually this is wrong, I bind the value of the :color of a first, before I alter b -- 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

Re: Exchange value between refs

2012-01-30 Thread Jonathan Cardoso
Yes, that's what I've been doing What I want to know is if there's a single function that does this exchange between refs. -- 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

Re: Exchange value between refs

2012-01-30 Thread Jonathan Cardoso
yes, that works! thanks -- 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

Re: Exchange value between refs

2012-01-30 Thread Jonathan Cardoso
Nice! I liked the use of *merge* , it seems even more semantic! -- 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

Re: Change components of JPanel autonomously and simultaneously

2012-01-31 Thread Jonathan Cardoso
Thank's, I will try to adapt my code to use watch (I didn't know this feature and found it really interesting!). The problem with JPanel repaint is that, I don't surely know why but the JFrame doesn't understands it when I change and has an awkward behavior: if I click on the button that makes

Re: Change components of JPanel autonomously and simultaneously

2012-01-31 Thread Jonathan Cardoso
I used (SwingUtilities/updateComponentTreeUI *frame*), worked great and seems faster even without using watch yet. Thank's -- 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

Multi-agent framework vs Clojure concurrency

2012-02-08 Thread Jonathan Cardoso
I'm currently working with multi-agent based systems and a teacher showed me the benefits of using JADE framework for those kind of applications. I'm not sure if it's better to use a framework like this one or if it's better to take advantage of Clojure and its refs, agents, atoms How can

Re: Multi-agent framework vs Clojure concurrency

2012-02-08 Thread Jonathan Cardoso
Thank's Colin, that's what I've been thinking... Maybe some mixing is a better approach, I really enjoy concurrency programming with Clojure, but I think I need to try some other libraries/languages (such as Scala as you mentioned, which is great as well) to see where each one fits in my problem,