Re: suggestion for clojure development

2011-09-28 Thread cran1988
Improve as much as possible , performances and memory management  !!






-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: How to attach debugger on clojure's repl ?

2011-09-22 Thread cran1988
Thanks !! but i am not using emacs
i will watch it and i will try to integrate it on the IDEAJ

On Sep 22, 4:04 am, Scott Jaderholm jaderh...@gmail.com wrote:
 While that still works, ritz is really where it's at for awesome debugging
 clojure in emacs. It allows stepping and stuff with a nice UI.

 https://github.com/pallet/ritz

 Video (only for overview, follow instructions at url 
 above)http://www.youtube.com/watch?v=d_L51ID36w4

 One of my favorite things with it is using it with OpenJDK w/ source so I
 can go down the rabbit hole of stepping into my code, Clojure, and the JVM
 itself (just for fun, not had a need for this yet).

 Scott

 On Wed, Sep 21, 2011 at 6:01 PM, Timothy Washington twash...@gmail.comwrote:







  This guy's put together a good video on how to use debugging to swank /
  slime.

     -http://www.youtube.com/watch?v=galfpq969Hg

  Tim Washington
  twash...@gmail.com
  416.843.9060

  On Tue, Sep 20, 2011 at 10:37 AM, cran1988 rmanolis1...@hotmail.comwrote:

  I am trying to figure out how abcl does it

  On Sep 20, 12:41 pm, Herwig Hochleitner hhochleit...@gmail.com
  wrote:
   You can debug clojure code with a normal Java Debugger.
   When using Emacs, you can tryhttp://
  georgejahad.com/clojure/swank-cdt.html

   --
   __
   Herwig Hochleitner

  --
  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
  clojure+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

   --
  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
  clojure+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: How to attach debugger on clojure's repl ?

2011-09-22 Thread cran1988
However can we integrate it on the repl using
(clojure.main/repl :eval function ) ?

It is very cool debugger!!

On Sep 22, 4:04 am, Scott Jaderholm jaderh...@gmail.com wrote:
 While that still works, ritz is really where it's at for awesome debugging
 clojure in emacs. It allows stepping and stuff with a nice UI.

 https://github.com/pallet/ritz

 Video (only for overview, follow instructions at url 
 above)http://www.youtube.com/watch?v=d_L51ID36w4

 One of my favorite things with it is using it with OpenJDK w/ source so I
 can go down the rabbit hole of stepping into my code, Clojure, and the JVM
 itself (just for fun, not had a need for this yet).

 Scott

 On Wed, Sep 21, 2011 at 6:01 PM, Timothy Washington twash...@gmail.comwrote:







  This guy's put together a good video on how to use debugging to swank /
  slime.

     -http://www.youtube.com/watch?v=galfpq969Hg

  Tim Washington
  twash...@gmail.com
  416.843.9060

  On Tue, Sep 20, 2011 at 10:37 AM, cran1988 rmanolis1...@hotmail.comwrote:

  I am trying to figure out how abcl does it

  On Sep 20, 12:41 pm, Herwig Hochleitner hhochleit...@gmail.com
  wrote:
   You can debug clojure code with a normal Java Debugger.
   When using Emacs, you can tryhttp://
  georgejahad.com/clojure/swank-cdt.html

   --
   __
   Herwig Hochleitner

  --
  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
  clojure+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

   --
  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
  clojure+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: How to attach debugger on clojure's repl ?

2011-09-20 Thread cran1988
I am trying to figure out how abcl does it

On Sep 20, 12:41 pm, Herwig Hochleitner hhochleit...@gmail.com
wrote:
 You can debug clojure code with a normal Java Debugger.
 When using Emacs, you can tryhttp://georgejahad.com/clojure/swank-cdt.html

 --
 __
 Herwig Hochleitner

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


JavaOne 2011 videos

2011-09-19 Thread cran1988
http://vimeo.com/tag:javazone2011/page:0/sort:newest

I am not sure if all the clojure videos are there.
But for sure have plenty videos about scala.
Dont worry ... clojurians will rise up and control the market , next
year!

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


How to attach debugger on clojure's repl ?

2011-09-19 Thread cran1988
I am looking forward for a debugger like in CLISP , SBCL etc..
Is there any solution out there ?
Are you going to develop such a tool and you need help ?

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Problem with Greeks!

2011-08-17 Thread cran1988
My problem started when I was trying to pass greek in hiccup and the
browser showed me this ?
So i installed clojure 1.3.0 and Noir 1.1.1 (i had a little problem
with dependencies but i cleaned it) and it works.
However lein repl had a problem with greeks (even with the new
installation) , but using your advices , i solved it !

You were very helpful !!! THANK YOU MAN!


On Aug 17, 12:04 pm, Rasmus Svensson r...@lysator.liu.se wrote:
 2011/8/17 cran1988 rmanolis1...@hotmail.com:

  My jvm is already UTF-8
  however it works with clojure 1.3.0 beta1
  but i have problems i get an error
  NoSuchMethodError clojure.lang.KeywordLookupSite.init(ILclojure/lang/
  Keyword;)V  clout.core/request-url (core.clj:53)

 The encoding problem and this version incompatibility problem should
 not be related. Nothing encoding related has changed between Clojure
 1.2 and 1.3, as far as I know. I decided to reply with my answer (even
 though your problem is apparently fixed), because I had already begun
 writing it and this is a problem many people have. (So hopefully this
 could be useful for someone else too.)

 2011/8/17 cran1988 rmanolis1...@hotmail.com:

  I tried (str Γεια!)
  and i got   !
  what can I do to fix it ?

 Clojure has a modern string model in which a string is a logical
 sequence of characters, not bytes. However, Clojure cannot fix
 problems outside the Clojure process, so
 you can still get problems like this.

 Track A - You are running the Clojure REPL in a terminal window

 Before you check for any Clojure-related issues, let's make sure it's
 not caused by the terminal or your OS.

 Make sure that your locale is set to one with the UTF-8 encoding
 scheme (in most modern OSes this should be the case). In Unix-like
 systems, you can check it like this:

     raek@sirius:~$ echo $LANG
     sv_SE.utf8

 Here sv_SE means Swedish, but it's the part after the dot that's
 interesting. After this, make sure the encoding in your terminal is
 set to UTF-8 too. In gnome-terminal (default terminal application in
 Ubuntu) make sure that Unicode (UTF-8) is selected in the Terminal
 - Set Character Encoding menu. This should hopefully already be UTF-8
 in most modern OSes. In PuTTY (a common terminal application on
 Windows) go to the Window - Translation tree item and select UTF-8 in
 the topmost drop down list. UTF-8 is *not* the default encoding scheme
 in PuTTY,  - ISO 8859-1 is.

 Now when you have a confirmed UTF-8 terminal, let's look at the
 Clojure side. If you use JLine or use the default installation of
 Leiningen (which uses JLine), you should abandon it. JLine does not
 support modern encoding schemes like UTF-8 and garbles the data
 without warnings. Use the rlwrap application instead. It does the same
 thing but works for encodings like UTF-8. If you install it using your
 OS package manager (e.g. apt-get on Ubuntu), Leiningen will pick it up
 and use it instead of JLine automatically.

 At this point, using any characters in the repl should just work.
 There can be subtle problems with encodings if you happen to configure
 things badly for both the input and output of the REPL - you can have
 a problem that undoes itself. To verify that the text the Clojure REPL
 receives is really the one you wrote, you can use this simple test:

     user= (seq Γεια)
     (\Γ \ε \ι \α)

 I.e. you give Clojure a string and ask it to display its individual
 characters. If you see a sequence of four characters here (and they
 display correctly), everything is good. If you see another number of
 characters something is still wrong.

 Track B - You are using the Slime REPL in Emacs

 If you recent versions of clojure-mode use the clojure-jack-in way of
 doing things, this should just work. Oherwise you just need to set a
 variable:

     M-x customize-variable RET slime-net-coding-system
     (select utf-8-unix and save)

 Or you can add this to your config:

     (setq slime-net-coding-system 'utf-8-unix)

 And that should be it. Use the seq test above to verify.

 I hope this helps! Please tell me if any step is not working.

 the Encoding Guy at your service,
 Rasmus Svensson (raek)

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Problem with Greeks!

2011-08-16 Thread cran1988
I tried (str Γεια!)
and i got  !
what can I do to fix it ?

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Problem with Greeks!

2011-08-16 Thread cran1988
My jvm is already UTF-8
however it works with clojure 1.3.0 beta1
but i have problems i get an error
NoSuchMethodError clojure.lang.KeywordLookupSite.init(ILclojure/lang/
Keyword;)V  clout.core/request-url (core.clj:53)


On Aug 17, 3:30 am, Ken Wesson kwess...@gmail.com wrote:
 On Tue, Aug 16, 2011 at 7:56 PM, cran1988 rmanolis1...@hotmail.com wrote:
  I tried (str Γεια!)
  and i got   !
  what can I do to fix it ?

 Set something, somewhere, to UTF-8 that's probably set to ISO-8859-1
 or US-ASCII right now.

 Also, her name would be spelt Λεια, and her famous plea Ηελπ με,
 Οβι-ωαν Κενοβι! or something like that. :)

 --
 Protege: What is this seething mass of parentheses?!
 Master: Your father's Lisp REPL. This is the language of a true
 hacker. Not as clumsy or random as C++; a language for a more
 civilized age.

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Problem with Greeks!

2011-08-16 Thread cran1988
I am going to try java 7 with clojure

On Aug 17, 6:36 am, Kevin Livingston
kevinlivingston.pub...@gmail.com wrote:
 I don't know about the clojure compiler.  But we've run into some
 issues with the java compiler.  There are flags to inform it what file
 encodings are being used in a file.  For example,

 http://java.sun.com/javase/technologies/core/basic/intl/faq.jsp#set-d...

 Java will make assumptions about output format based on your machine
 too

 http://java.sun.com/javase/technologies/core/basic/intl/faq.jsp#defau...

 sorry this isn't really an answer, but it's evidence that you aren't
 hallucinating anyway,

 Kevin

 On Aug 16, 7:09 pm, cran1988 rmanolis1...@hotmail.com wrote:







  My jvm is already UTF-8
  however it works with clojure 1.3.0 beta1
  but i have problems i get an error
  NoSuchMethodError clojure.lang.KeywordLookupSite.init(ILclojure/lang/
  Keyword;)V  clout.core/request-url (core.clj:53)

  On Aug 17, 3:30 am, Ken Wesson kwess...@gmail.com wrote:

   On Tue, Aug 16, 2011 at 7:56 PM, cran1988 rmanolis1...@hotmail.com 
   wrote:
I tried (str Γεια!)
and i got   !
what can I do to fix it ?

   Set something, somewhere, to UTF-8 that's probably set to ISO-8859-1
   or US-ASCII right now.

   Also, her name would be spelt Λεια, and her famous plea Ηελπ με,
   Οβι-ωαν Κενοβι! or something like that. :)

   --
   Protege: What is this seething mass of parentheses?!
   Master: Your father's Lisp REPL. This is the language of a true
   hacker. Not as clumsy or random as C++; a language for a more
   civilized age.

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Problem with Greeks!

2011-08-16 Thread cran1988
THE PROBLEM SOLVED !!!
https://groups.google.com/group/clj-noir/browse_thread/thread/b02a740e6db62b58

Thanks for your support !

On Aug 17, 6:58 am, cran1988 rmanolis1...@hotmail.com wrote:
 I am going to try java 7 with clojure

 On Aug 17, 6:36 am, Kevin Livingston







 kevinlivingston.pub...@gmail.com wrote:
  I don't know about the clojure compiler.  But we've run into some
  issues with the java compiler.  There are flags to inform it what file
  encodings are being used in a file.  For example,

 http://java.sun.com/javase/technologies/core/basic/intl/faq.jsp#set-d...

  Java will make assumptions about output format based on your machine
  too

 http://java.sun.com/javase/technologies/core/basic/intl/faq.jsp#defau...

  sorry this isn't really an answer, but it's evidence that you aren't
  hallucinating anyway,

  Kevin

  On Aug 16, 7:09 pm, cran1988 rmanolis1...@hotmail.com wrote:

   My jvm is already UTF-8
   however it works with clojure 1.3.0 beta1
   but i have problems i get an error
   NoSuchMethodError clojure.lang.KeywordLookupSite.init(ILclojure/lang/
   Keyword;)V  clout.core/request-url (core.clj:53)

   On Aug 17, 3:30 am, Ken Wesson kwess...@gmail.com wrote:

On Tue, Aug 16, 2011 at 7:56 PM, cran1988 rmanolis1...@hotmail.com 
wrote:
 I tried (str Γεια!)
 and i got   !
 what can I do to fix it ?

Set something, somewhere, to UTF-8 that's probably set to ISO-8859-1
or US-ASCII right now.

Also, her name would be spelt Λεια, and her famous plea Ηελπ με,
Οβι-ωαν Κενοβι! or something like that. :)

--
Protege: What is this seething mass of parentheses?!
Master: Your father's Lisp REPL. This is the language of a true
hacker. Not as clumsy or random as C++; a language for a more
civilized age.

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Using Clojure To Debug Java Apps

2011-07-13 Thread cran1988
This is great !!!
But you should posting it in a blog and compare it with other
solutions.

On Jul 12, 2:31 am, Asim Jalis asimja...@gmail.com wrote:
 I have been using the Clojure REPL to debug a large Java server app.
 It's great for exploratory testing and for validating assumptions
 about how the system works. I wanted to post the code here in case
 someone else finds this useful.

 1. Stick this in a class that is loaded early in the server/app.

 public static class Repl {
     public static final String PORT = 18081;
     public static final String NS = user;

     private final String initResult; public String getInitResult() {
 return initResult; }

     public Object invoke(String fn) { try { return
 clojure.lang.RT.var(NS, fn).invoke(); } catch (Exception e) { return
 null; } }
     public Object invoke(String fn, Object arg1) { try { return
 clojure.lang.RT.var(NS, fn).invoke(arg1); } catch (Exception e) {
 return null; } }
     public Object invoke(String fn, Object arg1, Object arg2) { try {
 return clojure.lang.RT.var(NS, fn).invoke(arg1, arg2); } catch
 (Exception e) { return null; } }
     public Object invoke(String fn, Object arg1, Object arg2, Object
 arg3) { try { return clojure.lang.RT.var(NS, fn).invoke(arg1, arg2,
 arg3); } catch (Exception e) { return null; } }

     public Repl() {
         String result;
         try {
             clojure.lang.Var eval = clojure.lang.RT.var(clojure.core, 
 eval);
             clojure.lang.Var read =
 clojure.lang.RT.var(clojure.core, read-string);
             String create_repl_server =
               (do  +
                 (use '[clojure.contrib.server-socket :only
 [create-repl-server]]) +
                 (create-repl-server  + PORT + ) + );
             result = eval.invoke(read.invoke(create_repl_server)).toString();
         } catch (Exception e) {
             result = e.toString();
         }
         initResult = result;
     }}

 public static final Repl REPL = new Repl();

 2. Use this on the command line to start the REPL:

 rlwrap --logfile $HOME/tmp/clj.log telnet localhost 18081

 Now from the REPL you can create Java objects and call methods at will.

 3. To call a Clojure function called some-function in user namespace
 from Java, use something like this:

 REPL.invoke(some-function, arg1));

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Native compiler on Clojure

2011-07-10 Thread cran1988

Did anyone started creating native compiler for Clojure language ?

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Mutable Clojure Data Structures

2011-07-08 Thread cran1988
Hi


I love Clojure ,but Clojure sucks a lot of memory  and that frustrates
me !
I am looking forward to find a way to put mutability in my code the
same way i put immutable data structures.
For example imagine ~[ 1 2 3 4 ] to be mutable vector and every
semicolon that have this ~ in front to be mutable.

But I dont know from where to start , can you give me some tips ?
Maybe i will create a fork of the compiler
or a binding library based on java collection API

I know that developers of the compiler will not like it .
However if we succeed , then there is a future  of clojure in androids
and desktop aplication !


Thank you for listening !

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Mutable Clojure Data Structures

2011-07-08 Thread cran1988
Sorry ,I just guessed that the fault is in immutability

I read about for clojure performance tips
http://gnuvince.wordpress.com/2009/05/11/clojure-performance-tips/

but i feel it is not enough.



On Jul 8, 11:02 pm, Timothy Baldridge tbaldri...@gmail.com wrote:
  I love Clojure ,but Clojure sucks a lot of memory  and that frustrates
  me !

 I seriously doubt the memory bloat is due to the immutable structures.
 During a fast inner loop that is allocating tons of structures, you
 may see a little memory bloat, but that's only until the GC catches
 up. I'm pretty sure you're barking up the wrong tree here.

 Do you have any proof that immutable structures are causing the bloat?
 Or are you just guessing. Remember, premature optimization is the
 root of much evil.

 Timothy

 --
 “One of the main causes of the fall of the Roman Empire was
 that–lacking zero–they had no way to indicate successful termination
 of their C programs.”
 (Robert Firth)

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Mutable Clojure Data Structures

2011-07-08 Thread cran1988
Thanks I will try profiling the code

On Jul 9, 12:12 am, Sean Corfield seancorfi...@gmail.com wrote:
 Have you profiled your code to determine where the performance
 bottlenecks really are?

 In Java applications, even large amounts of transient memory usage are
 not indicative of performance problems - that's kind of the point with
 automatically managed memory and garbage collection systems...

 Sean







 On Fri, Jul 8, 2011 at 12:47 PM, cran1988 rmanolis1...@hotmail.com wrote:
  I love Clojure ,but Clojure sucks a lot of memory  and that frustrates
  me !
  I am looking forward to find a way to put mutability in my code the
  same way i put immutable data structures.
  For example imagine ~[ 1 2 3 4 ] to be mutable vector and every
  semicolon that have this ~ in front to be mutable.

  But I dont know from where to start , can you give me some tips ?
  Maybe i will create a fork of the compiler
  or a binding library based on java collection API

  I know that developers of the compiler will not like it .
  However if we succeed , then there is a future  of clojure in androids
  and desktop aplication !

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en